Hacker News new | past | comments | ask | show | jobs | submit | gofreddygo's favorites login
   submissions | comments

When not near a keyboard, use paper. When near one, use plain text.

For your sanity, keep metadata embedded in each file. I keep k:v pairs. One per line. e.g "topic: D3", "subject: scales", "context: Side Project"

Use grep, awk (whatever). Slice, group, dice, join, merge, backup as and how you want. A bash-like shell is the only dependency. Check into git regularly.

Some scripts I use

  ## group by topic. search for lines that start with "topic". print topic and the file name
  grep -i "^topic" *.txt | awk -F ":" '{printf "%-25s%s\n",$3,$1}' | sort

  ## find all files containing the "topic" tag 
  grep -i "^topic" *.txt | awk -F ":" '{printf "%-25s%s\n",$3,$1}' | sort 

  ## find all files NOT containing "topic". useful for cleaning up 
  grep -iL "^topic" *.txt

  ## find first 10 files not containing "topic" and open each in vi sequentially
  for f in $(grep -ilL "^topic" *.txt | head); do vi $f; done

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: