This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| sudo apt-get install wget | |
| sudo apt-get install build-essential | |
| sudo apt-get install libc6-dev | |
| wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.27.tar.gz | |
| tar -xzf freetds-1.00.27.tar.gz | |
| cd freetds-1.00.27 | |
| ./configure --prefix=/usr/local --with-tdsver=7.3 | |
| make | |
| make install |
| def sprintf(format) | |
| format = format.to_s | |
| if format.index("%").nil? | |
| return format | |
| end | |
| return format.gsub(/%\{[^}]+\}/) do |tok| | |
| # Take the inside of the %{ ... } | |
| key = tok[2 ... -1] |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer