-
Thanks for Making it Unnecessarily Hard to Get a Harry Potter Book on My Daughter’s Kindle
Exclusive Dealers Apparently, JK Rowling made a deal with Sony to exclusively sell Harry Potter e-books on the Sony e-book through the Pottermore site, through January 2012. What I found out today was that I still had to go to that site in order to buy any e-book version of the Harry Potter books. That posed a major…
-
zsh grep and mvim: search for a string in a directory in file type, and open that point
open_all {pattern} {extension} #!/bin/zsh grep -n $1 **/*$2 | sed ‘s/^([a-zA-Z_/.]*):([0-9]*).*$/2 1/’ | while read line file do mvim –remote-tab-silent +$line $file done Usage: # find all occurrences of “def” as a whole word and open the files in separate tabs: open_all ” .rb
-
Creating a Readable List of Playlist songs on Mac
1. Select Export… by two-finger/right-clicking on the playlist. 2. Export as plain text. 3. I had to do a little command-line scripting to change carriage returns to new lines and select only the first two tab-limited columns: cd ~/Desktop cat Power of Two.txt | tr ‘r’ ‘n’ | awk -F ‘t’ ‘{print $1 “::” $2}’…