News for hackers. Stuff that matters.
Re:Ask HN: How do you keep your notes organized? by digitalsushi on Tuesday December 17, 2019 @09:05AM (#21813496)
I have a 15 year old svn-turned-git repo called commonplace-book and keep my notes, plans, quotes and tidbits in there under a terse, relevant filename in a flat directory.

And I have a bash function called 'cheat', that will look for things in there based on the filename, or contents or however I happen to have it written.

As I learn new things I can append an existing file; I run 'cheat git' once per week and 'cheat tmux' every time I forget how to clone a session. Since this all invariable dumps to stdout, I can continue grepping when it suits.

I have another very dirty hack that will get me in trouble eventually - I'll share it because I find I can often improve my code by self shaming - ghetto secrets management:

echo '1,$'|vim --cmd "set key=${password}" ${filename} -es

This is the nugget around a lot of boilerplate, but this invokes vim and makes it decrypt a file and dump to stdout. From here I have my own little grammar and grepper for storing quasi-secure strings or even just secure texts. I'm positive it's going to get me into hot water but it's been extremely portable for me and I trust it on systems that I have the audacity to believe I am alone on.

I know there's a vimdecrypt plugin floating around that is almost definitely superior, but, mine works on stock linux, mac, and git bash.

Re:Ask HN: How do you keep your notes organized? by robsun on Tuesday December 17, 2019 @01:50PM (#21817129)
This. I do exactly the same. I have bunch of python scripts in git repo that manage my notes / flashcards and so one stored in csv files.