“I thought maybe VCs had access to some brilliant new software that evaluated prospective investments in startups. But no. What we’re talking about is good old fashioned experience, which is what you get to call induction when you’re making money and what you say you earned instead of cash when you were losing money.”
— Alex Payne - On Business Madness
A great article, and hat tip to pattern matching reference in programming.
“A human being is a part of the whole called by us universe, a part limited in time and space. He experiences himself, his thoughts and feeling as something separated from the rest, a kind of optical delusion of his consciousness. This delusion is a kind of prison for us, restricting us to our personal desires and to affection for a few persons nearest to us. Our task must be to free ourselves from this prison by widening our circle of compassion to embrace all living creatures and the whole of nature in its beauty.”
“Finding the root cause of a failure is like finding the root cause of a success.”
Open, Edit & Save Encrypted Files with Vim and GPG
If you’ve ever want to save sensitive text on your computer - encrypting it is the only way to ensure it is secure. Using vim and gpg we can open, edit, and save only the encrypted file and leave nothing in plain text on the hard drive.
Note: In order to run gpg on OS X, you’ll need to first install MacGPG2.
To Open an Encrypted File (from shell)
gpg -d myfile.mkdn.gpg | vim - -n -i "NONE" "+set filetype=markdown"
-d to decrypt
| pipe stdout of gpg into vim
- to accept stdin instead of file
-n turns off swap file - important!
-i turns off .viminfo - important!
+set filetype set the file type (for syntax highlighting, etc) since there is no file name for vim to detect
Bonus: Add a function (and easy alias) to your ~/.bash_profile file:
vimdecrypt() { gpg -d "$1" | vim - -n -i "NONE" "+set filetype=$2"; }
alias vd="vimdecrypt"
You can now simply type (2nd argument optional):
$ vd myfile.mkdn.gpg markdown
To Save and Encrypt a File (from vim)
:w !gpg -c -o myfile.mkdn.gpg
:w to write buffer
!gpg escape to shell and run gpg, accepts vim buffer as stdin
-c to set symetric encryption
-o to set file name
Bonus: Add a command to your ~/.vimrc file:
command -nargs=1 WriteEncrypted w !gpg -c -o <q-args>
Now, from within vim you type
WriteEncrypted myfile.txt.gpg