Showing all posts tagged #ididntknow:


"I Didn't Know" #2

Posted on January 20th, 2014

I found out about “git add -p” today. Too often my git commits are too large, incorporating more than one change. git add -p (patch mode) lets you add some of the changes in a file and not others. John Kary has an excellent set of videos on git add -p.

http://johnkary.net/blog/git-add-p-the-most-powerful-git-feature-youre-not-using-yet/

I wish I knew about this a long time ago.


"I Didn't Know" #1

Posted on December 18th, 2013

I didn’t know it was possible with curl to specify multiple files to download with one command. I probably did know at some point but forgot. That’s one benefit of aging, you can make the same happy little discoveries over and over again.

curl -O "https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/OSX/IE7_Vista/IE7.Vista.For.MacVirtualBox.part{1.sfx,2.rar,3.rar,4.rar,5.rar}”

This means you can do something like this:

$ for i in "file1.txt file2.txt file3.txt"
do
    curl -O http://address/${i}
done

Eric Snyder

Software consultant at Chariot Solutions with 19 years experience with a variety of technologies. Current favorites include golang and clojure.