brew install cmake
brew install python
sudo easy_install pip
Add powerline bin to your path. In your zshrc file (or the paths files sourced in zshrc) add the following line
PATH="/usr/local/share/python/:$PATH"
| # Usage: | |
| # source iterm2.zsh | |
| # iTerm2 tab color commands | |
| # https://iterm2.com/documentation-escape-codes.html | |
| if [[ -n "$ITERM_SESSION_ID" ]]; then | |
| tab-color() { | |
| echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
| echo -ne "\033]6;1;bg;green;brightness;$2\a" |
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
The difference between XYZ and TMS tiles and how to convert between them
Lots of tile-based maps use either the XYZ or TMS scheme. These are the maps that have tiles
ending in /0/0/0.png or something. Sometimes if it's a script, it'll look like
&z=0&y=0&x=0 instead. Anyway, these are usually maps in Spherical Mercator.
Good examples are OpenStreetMap, Google Maps, MapBox, MapQuest, etc. Lots of maps.
Most of those are in XYZ. The best documentation for that is slippy map tilenames on the OSM Wiki, and Klokan's Tiles a la Google.
| var CubicBezier = function(canvas, opts){ | |
| if(!opts) opts = {}; | |
| this.start = opts.start || new Vec2(100,100); | |
| this.end = opts.end || new Vec2(400, 400); | |
| this.c1 = opts.c1 || new Vec2(100, 300); | |
| this.c2 = opts.c2 || new Vec2(300, 100); | |
| this.curve = new fabric.Path( this.toSVGPath() ); |
This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.
by alexander white ©
| //------------------------------------------ | |
| //Compact bitmap datastructure | |
| //Memory efficient array of bool flags | |
| var Bitmap = function(size){ | |
| this._cols = 8; | |
| this._shift = 3; | |
| this._rows = (size>>this._shift)+1; | |
| this._buf = new ArrayBuffer(this._rows); | |
| this._bin = new Uint8Array(this._buf); | |
| }; |