Small things and tips I learn every day
Whenever I learn something new I add it here in til.md
. The format is simple.
## title (topic/s)
[Content]
[Reference]
Title: Meaningful and concise, what I learned in a few words.
Topic/s: One or two (maybe three) topics. Alongside with the title, the topics are a way to easily search. The less topics the easier it will be to search, for example for JavaScript entries don't use "js" in ones and "javascript" in others.
Content: A longer explanation of what I learned. A short description, snippet, repl.it, CodeSandbox and/or recording of the terminal (using the awesome asciinema). If I happen to forget about this I can come back and quickly remember. That's the whole point!
Reference: It's important to give credit to where/who I learned from. Also the reference might give a longer/deeper explanation.
I have this function in my dotfiles to search by title and topic/s.
function til {
cat til.md | rg '#' | cut -d ' ' -f 2- | rg -i $@
}
See it working herehere.
NOTE: I'm using the amazing ripgrep (rg) but you can replace it with your grep tool of choice.