Hacker News new | ask | show | jobs
by zer0th 3799 days ago
Some years ago I came up with a system which I still use extensively. I added these lines to my .bashrc file:

  log(){
  pushd ~/logs;
  echo >> $*;
  date >> $*;
  cat >> $*;
  } 
So whenever I have a piece of information that I'd like to keep - a thought on a project, a word from a foreign language I am learning, ideas for christmas gifts, some bash-fu and so on... - I fire up a terminal (mod+return, in my case) and enter

  log filename
Now I can type down that piece of information right away. File names could be "english" (for vocab) or "xmas" (for gifts) or the name of a project. So either the file already exists and I thus add to it or a new file is created instantly.

It is super quick and non-distracting (i.e. I don't 'accidentally' get carried away by looking at previous thoughts or tweaking the config of a journal application etc.) What's more I find it very convenient that the function automatically adds the current date to each entry.

Btw, I've got another function called "show" which I can call whenever I feel like just briefly skimming through a file

  show(){
  cat ~/logs/$*;
  }
For my daily todo list I enjoy abusing markdown syntax. I do this because syntax highlighting makes it easier to quickly scan through the files. (I use gedit with the monokai theme)

So at the beginning the list looks something likes this:

Task 1

Task 2

<!-- some details on task 2 -->

Task3

Task4

<!-- some details on task 4 -->

(comments turn gray so that actual tasks stand out)

Whenever I begin a task I place a "-" in front of its line. Now I see this red minus and thus know that I have started a task that needs to be completed. When I've finished the task I replace the - with a # and now the whole line turns blue. I've line numbers enabled in gedit so when I want to change the status of an item I simply hit ctrl+i and enter the corresponding line number. Some tasks occur daily, at least for a while. In that case I revisit a task's line again at the end of the day and remove the "#". Similarly, when I want to delete an unnecessary task I go to its line and hit ctrl+d and thus delete it. It is super primitive but I like it. ;)

3 comments

> So either the file already exists and I thus add to it or a new file is created instantly.

If you want the same thing but want to do it in an app instead of manually in the terminal you should check out Notational Velocity (http://notational.net).

Looks interesting.

But only MacOS? No Linux?

Encrypted database? I once tried a password keeper. I think it was called xpassword or something like that. After having a corrupted database twice within days, I pass.

I you want privacy your HDD should be encrypted anyway.

nvpy is a functional but admitedly very ugly linux clone. Both can use Simplenote, which works similarly if you're fine with a webapp.

For the windows crowd there is the also ugly-but-functional ResophNotes.

Encryption is optional. Online syncing (w/ Simplenote) is optional.
In the same vein, I have various org-mode files that I can switch buffer to whenever a thought needs to be noted. org-twbs outputs a nice html rendering with a couple of keystrokes.
You can replace cat in show() with tail -n +0 which will also output each file's name as a heading.