A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
I like Rdio and linux. Rdio works great in a browser except for one thing: keyboard shortcuts!!!
When coding, I like to be able to play/pause my music quickly, meaning I don't want to switch windows. I figured out a way to do this:
First, I made a file in my ~/bin called rdio that runs:
google-chrome --app=http://rdio.com| -- PostgreSQL 9.2 beta (for the new JSON datatype) | |
| -- You can actually use an earlier version and a TEXT type too | |
| -- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8 | |
| -- Inspired by | |
| -- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html | |
| -- http://ssql-pgaustin.herokuapp.com/#1 | |
| -- JSON Types need to be mapped into corresponding PG types | |
| -- |
| # calculate the mixing matrix of in igraph graph object 'mygraph', by some vertex attribute 'attrib' | |
| # can change the default use.density=FALSE to return a matrix with raw number of edges rather than density | |
| mixmat <- function(mygraph, attrib, use.density=TRUE) { | |
| require(igraph) | |
| # get unique list of characteristics of the attribute | |
| attlist <- sort(unique(get.vertex.attribute(mygraph,attrib))) | |
NOTE: You can check, if your config here:
http://www.sslshopper.com/ssl-checker.html
Decrypt the private key using the password you entered when you created your key:
openssl rsa -in ssl.key -out /etc/nginx/conf/ssl.key
Protect your key from prying eyes:
chmod 600 /etc/nginx/conf/ssl.key
| """ | |
| Straight Include template tag by @HenrikJoreteg | |
| Django templates don't give us any way to escape template tags. | |
| So if you ever need to include client side templates for ICanHaz.js (or anything else that | |
| may confuse django's templating engine) You can is this little snippet. | |
| Just use it as you would a normal {% include %} tag. It just won't process the included text. |
| example map for | |
| strenght: .AG. GC.. ...A ..GC | AC.. GT.. T.TC .... | |
| size: CG.. .... ...C ..T. | ..AC .... ...C ..A. | |
| ant 1: TTTC AAAG GGGG GAGC TGTA AGGA TTCT CCAG | |
| ant 2: CCGC GGGC AGGT TTAC TACT TGGA TACC ACTC | |
| Then we match each gene in strength and size against the ant unless it's a '.' | |
| If we have match the score is increased. If we have a similarity (A<->G or C<->T) | |
| the score is not changed and otherwise it's decreased. |
| # computed sample at https://gist.github.com/164138 | |
| genes = %w(A C G T) | |
| strength = ".AG. GC.. ...A ..GC AC.. GT.. T.TC ...." | |
| size = "CG.. .... ...C ..T. ..AC .... ...C ..A." | |
| weight = "TC.C C... ..CG TG.C .... GC.A .GG. .AAA" | |
| ant = '' | |
| (0..31).each do |i| | |
| ant += genes[rand(4)] |