|
1 |
| -# futureofcoding.org |
2 |
| - |
3 |
| -Hello! My name is Steve Krouse. This is the repo for http://futureofcoding.org. |
| 1 | +# [futureofcoding.org](http://futureofcoding.org) |
4 | 2 |
|
5 | 3 | If you find any typos or have any suggestions, feel free to edit anything and send me a pull request.
|
6 | 4 |
|
7 | 5 | You can also take a look at [the issues](https://github.com/stevekrouse/futureofcoding.org/issues) to see the other things in my todo list. I'd appreciate your feedback on any of those items. Or if you have anything to add there, feel free to create a new issue and I'll comment on it to let you know if I'm going to get it done.
|
8 | 6 |
|
9 | 7 | Feel free to shoot me an email as well. I'm steve at futureofcoding.org.
|
10 | 8 |
|
| 9 | +## Stuff to know |
| 10 | + |
| 11 | +### Remove large media files locally |
| 12 | + |
| 13 | +First run: |
| 14 | + |
| 15 | +```bash |
| 16 | +git config core.sparsecheckout true |
| 17 | +``` |
| 18 | + |
| 19 | +Then put the following into `.git/info/sparse-checkout`: |
| 20 | + |
| 21 | +``` |
| 22 | +*.html |
| 23 | +*.md |
| 24 | +*.gitignore |
| 25 | +*.txt |
| 26 | +*.js |
| 27 | +*.css |
| 28 | +*.yml |
| 29 | +*.json |
| 30 | +``` |
| 31 | + |
| 32 | +And then run |
| 33 | + |
| 34 | + |
| 35 | +```bash |
| 36 | +git read-tree -mu HEAD |
| 37 | +``` |
| 38 | + |
| 39 | + |
| 40 | +### Add _data/git-log.json changes |
| 41 | + |
| 42 | +This is how I generage [futureofcoding.org/log](futureofcoding.org/log). |
| 43 | + |
| 44 | +First, `pip install git2json` as explained [here](https://github.com/tarmstrong/git2json#installation). |
| 45 | + |
| 46 | +Then create `.git/hooks/post-commit` with the following contents: |
| 47 | + |
| 48 | +```bash |
| 49 | +git2json > _data/git-log.json |
| 50 | + |
| 51 | +previousMessage=$(git log -1 --pretty=%B) |
| 52 | + |
| 53 | +if [ "$previousMessage" != "updated git log" ] |
| 54 | +then |
| 55 | + git add _data/git-log.json |
| 56 | + git commit -m "updated git log" |
| 57 | +fi |
| 58 | + |
| 59 | +exit 1 |
| 60 | +``` |
| 61 | + |
| 62 | +### Quick access to journal |
| 63 | + |
| 64 | +Add the following to `~/.bashrc`: |
| 65 | + |
| 66 | +```bash |
| 67 | +function empty_message { |
| 68 | + sleep 0.1 |
| 69 | + echo -e "## Title\n\n* TOC\n{: toc }\n\n" > .git/COMMIT_EDITMSG |
| 70 | +} |
| 71 | + |
| 72 | +function journal { |
| 73 | + empty_message & |
| 74 | + git commit --allow-empty --cleanup=verbatim |
| 75 | +} |
| 76 | +``` |
| 77 | + |
11 | 78 | <script repoPath="stevekrouse/futureofcoding.org" type="text/javascript" src="/unbreakable-links/index.js"></script>
|
0 commit comments