This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!window.requestAnimationFrame) { | |
window.requestAnimationFrame = (window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.oRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
function (callback) { | |
return window.setTimeout(callback, 1000/60); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box | |
# http://wildfish.com | |
# add the ubuntu gis ppa | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box | |
# http://wildfish.com | |
# add the ubuntu gis ppa | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
id: "163943", | |
factual_id: "a5c5daa8-44e6-40e1-8919-d2a35d4461d0", | |
name: "Leader's Challenge", | |
address: "1600 Broadway", | |
address_extended: "Ste 1460", | |
po_box: null, | |
locality: "Denver", | |
region: "CO", | |
country: "US", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
id: "6", | |
altitude: null, | |
content: null, | |
vqr_type: null, | |
feed_type: null, | |
channel: null, | |
user_id: null, | |
place_id: "175278", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXPLAIN ANALYZE SELECT places.*, | |
(SELECT COUNT(*) FROM vqrs WHERE vqrs.place_id = places.id) vqr_count, | |
ST_Distance(location, 'POINT(-104.987389 39.741727)')/1000/1.609344 d | |
FROM places | |
WHERE places.region = 'CO' AND | |
places.locality = 'Denver' AND | |
ST_DWithin(location, 'POINT(-104.987389 39.741727)', 845.344, false) | |
ORDER BY d ASC | |
LIMIT 20 | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXPLAIN ANALYZE SELECT places.*, | |
(SELECT COUNT(*) FROM vqrs WHERE vqrs.place_id = places.id) vqr_count, | |
ST_Distance(location, 'POINT(-104.987389 39.741727)')/1000/1.609344 d, | |
rtrim(split_part(ST_AsText(places.location), ' ', 2), ')') lat, | |
ltrim(split_part(ST_AsText(places.location), ' ', 1), 'POINT(') long | |
FROM places | |
WHERE places.region = 'CO' AND | |
places.locality = 'Denver' AND | |
ST_DWithin(location, 'POINT(-104.987389 39.741727)', 845.344, false) | |
ORDER BY d ASC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'), | |
fs = require('fs'), | |
gm = require('gm'); | |
var server = http.createServer(function(req, res) { | |
var readStream = fs.createReadStream(__dirname + "/neckbeard.jpeg"); | |
res.writeHead(200, {'Content-Type': 'image/jpeg'}); | |
gm(readStream, 'neckbeard.jpeg') | |
.resize('200', '200') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Open iPhone Simulator on default location for XCode 4.3 if found | |
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open iPhone Simulator on default location for XCode 4.2 if found | |
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | |
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; | |
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] | |
|| window[vendors[x]+'CancelRequestAnimationFrame']; | |
} | |
if (!window.requestAnimationFrame) |