Here what the library can do for other people
dead simple code example
| var textWidth = (function() { | |
| function charW(w, c) { | |
| if (c == 'W' || c == 'M') w += 15; | |
| else if (c == 'w' || c == 'm') w += 12; | |
| else if (c == 'I' || c == 'i' || c == 'l' || c == 't' || c == 'f') w += 4; | |
| else if (c == 'r') w += 8; | |
| else if (c == c.toUpperCase()) w += 12; | |
| else w += 10; | |
| return w; | |
| } |
ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
| #!/bin/bash | |
| # GTK+ and Firefox for Amazon Linux | |
| # Written by Joseph Lawson 2012-06-03 | |
| # http://joekiller.com | |
| # http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/ | |
| # chmod 755 ./gtk-firefox.sh | |
| # sudo ./gtk-firefox.sh | |
| #!/usr/bin/env python | |
| ############################################################################### | |
| # $Id$ | |
| # | |
| # Project: GDAL2Tiles, Google Summer of Code 2007 & 2008 | |
| # Global Map Tiles Classes | |
| # Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326, | |
| # generate a simple HTML viewers based on Google Maps and OpenLayers | |
| # Author: Klokan Petr Pridal, klokan at klokan dot cz | |
| # Web: http://www.klokan.cz/projects/gdal2tiles/ |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| import urlparse | |
| import oauth2 as oauth | |
| consumer_key = '' | |
| consumer_secret = '' | |
| request_token_url = 'http://www.tumblr.com/oauth/request_token' | |
| access_token_url = 'http://www.tumblr.com/oauth/access_token' | |
| authorize_url = 'http://www.tumblr.com/oauth/authorize' |
| <html> | |
| <style> | |
| body { | |
| margin: 0; | |
| padding 0; | |
| } | |
| </style> | |
| <body> | |
| <script> |