Skip to content

Instantly share code, notes, and snippets.

@SansGuidon
Last active April 7, 2018 09:25
Show Gist options
  • Save SansGuidon/9110653a2088012982081acf02cc3f44 to your computer and use it in GitHub Desktop.
Save SansGuidon/9110653a2088012982081acf02cc3f44 to your computer and use it in GitHub Desktop.
Simple notes taking + cheatsheet

Inspired by https://dev.to/ricardomol/note-taking-from-the-command-line-156

Setup

Add the following to your ~/.bashrc or ~/.bash_profile

# to take quick notes on useful commands
notes() {
    echo $1 >> $HOME/notes.md
}
cheat() {
    echo $(fc -ln -1) >> $HOME/notes.md
}

Usage

Remember ideas, commands, whatever :

$ notes "my_command -which -I -want -to remember"
$ notes "remember the milk"
$ notes "slow down and improve, then you will be more productive"

Or directly use this shortcut to remember the last executed command : $ cheat

Read your notes

$ more ~/notes.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment