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
“Most inventors and engineers I’ve met are like me … they live in their heads. They’re almost like artists. In fact, the very best of them are artists. And artists work best alone …. I’m going to give you some advice that might be hard to take. That advice is: Work alone… Not on a committee. Not on a team.”
“Je n’ai fait celle-ci plus longue que parce que n’ai pas eu le loisir de la faire plus courte.”
Raphael JS
Amazing framework for SVG in a browser.
Advantages over canvas include DOM scripting, scaling, and events support to help with interactive animations.

[ Python & Ruby Log ]
Author: Jason R Seney
Key: [+ good] [- bad] [~ indifferent]
_____( Python )____
+ Exellent scientific computation libraries
- No syntatic markup, just indents
+ Tons of built in functionality
+ Consise code
+ Easy imports
+ Has automatic enumeration with ” for i in array: “
~ Many functions are global for type “casting”
ex: str(x) where x=4 , len(myList) where myList = [1,2,3]
_____( Ruby )_____
+ Interactive mode usefull for quick tests of code
+ AWSOME Regex support! Sooo easy to use and get back references
ex. “This is a test”.match(/(\w+) (\w+)) puts x[0] puts x[1]
- No support for incrementors/decrementors ( “n++” or “—i” etc)
- Can use {} or “do … end” or “if … end” which leads to inconsistancy
- Uses blocks instead of for(int i=0; i