Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/barretlee/snippets
Code Snippets
https://github.com/barretlee/snippets
snippets
Last synced: 4 days ago
JSON representation
Code Snippets
- Host: GitHub
- URL: https://github.com/barretlee/snippets
- Owner: barretlee
- Created: 2015-09-26T15:12:26.000Z (over 9 years ago)
- Default Branch: gh-pages
- Last Pushed: 2020-10-01T07:07:49.000Z (over 4 years ago)
- Last Synced: 2025-02-07T11:09:00.337Z (11 days ago)
- Topics: snippets
- Language: JavaScript
- Homepage: http://snippets.barretlee.com
- Size: 602 KB
- Stars: 316
- Watchers: 17
- Forks: 89
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Snippets
很多语言、很多配置、很多语法,太多太多东西,不能单靠大脑来记忆。[本应用](http://snippets.barretlee.com) 收集了一些平时常用以及网上寻觅的代码片段,并且在页面中提供了搜索功能,可以快速找到我们平时记下的代码,这里保存的部分片段还是十分有价值的。
本应用对应的网址为:

### 贡献代码
如果你希望帮助丰富代码片段库,可以操作如下流程:
- fork [barretlee/snippets](https://github.com/barretlee/snippets.git) 仓库
- 然后执行如下命令
```
git clone https://github.com/{YOUR_GITHUB_NAME}/snippets.git
cd snippets
git checkout -b gh-pages
cd snippets
# 选择你想提交的文件类型,比如 html
cd html
touch {YOUR_CONTRIBUTE_FILE_NAME}.snippet
```
其中,`{YOUR_CONTRIBUTE_FILE_NAME}.snippet` 的格式为:
```
---
title: {NAME}
---{CONTENT}
```
可以使用 markdown 语法。
- 提交代码
```
git add --all
git commit -m "add file html/{YOUR_CONTRIBUTE_FILE_NAME}.snippet"
git push origin gh-pages
```
- 然后在你的 [PR](https://github.com/{YOUR_GITHUB_NAME}/snippets/pulls) 页面提交一个 PR 到 `barretlee/snippets` 的仓库### 关于

[小胡子哥的联系方式](http://www.barretlee.com/about/)
### LISCENSE
MIT LISCENSE.
自由分享使用,注意保留署名。