News for hackers. Stuff that matters.
Re:Ask HN: Do You Email Yourself? by Jugurtha on Saturday November 09, 2019 @06:52PM (#21495368)
Among many lines, I have the following in my .zshrc:

  alias note='vi +star +'\''normal Go'\'' +'\''r!date +\%F\ \%T'\'' ~/workspace/notes/notes.md +'\''normal Go'\'' +'\''normal Go'\'


  function nupd() {
      git -C ~/workspace/notes commit -a -m "Update notes $(whoami)@$(hostname)"
      git -C ~/workspace/notes push
  }



It allows me to type:

  note
And opens a file, `notes.md`, with vi in insert mode with a timestamp.

When I'm done, I type:

  nupd
It commits the changes and pushes them to a repo. When I go to other machines, I just pull.

I also used to have a todo alias, but now I switched to TaskWarrior. I made the `.task` directory a git repo and have a function

  function tupd() {
      git  -C ~/.task commit -a -m "Update tasks $(whoami)@$(hostname)"
      git  -C ~/.task push
  }

Whenever I use TaskWarrior for creation, etc, I run tupd. I wrote hooks before but became frustrated. When I use other machines, I just pull the repo and have my tasks ready. The commit message contains the username and hostname so I know from which machine I did it.

I have files like these (knowledge base repo that automatically builds a page https://jhadjar.gitlab.io/kbase/ , which reminds me it's been way too long I haven't pushed to it). I also have a file called lessons.md, listing the many times I screwd up (dates, context, why it was a screw up). A function called "learn" does a `bat` (better cat) on that file to review the lessons.

There are no comments on this comment yet.