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
From 6bbccf1fe0e000fd73e945368466cd27291483e3 Mon Sep 17 00:00:00 2001 | |
From: Igor Zinkovsky <[email protected]> | |
Date: Thu, 1 Mar 2012 12:11:12 -0800 | |
Subject: [PATCH] windows: return UV_ENOTSOCK when doing uv_pipe_connect to a | |
file | |
--- | |
src/win/error.c | 1 + | |
src/win/pipe.c | 6 ++++++ | |
test/test-list.h | 2 ++ |
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
Building GDAL 1.9 with MDB (PGeo) support on OS X Lion | |
- Download and install the "Java for Mac OS X 10.7 Update 1 Developer Package" from https://developer.apple.com/downloads/index.action | |
- Download jackcess-1.2.6.jar from http://sourceforge.net/projects/jackcess/files/jackcess/1.2.6/jackcess-1.2.6.jar/download | |
- Download http://mdb-sqlite.googlecode.com/files/mdb-sqlite-1.0.2.tar.bz2 to get commons-lang-2.4.jar and commons-logging-1.1.1.jar. They will go alongside jackcess in the $CLASSPATH after it builds. | |
- In the GDAL source root, edit the configure.in and replace it with https://gist.github.com/1975654 |
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') | |
var fork = require('child_process').fork; | |
function fib(n) { | |
if (n < 2) { | |
return 1; | |
} else { | |
return fib(n - 2) + fib(n - 1); | |
} | |
} |
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
Layer = Backbone.Model.extend(); | |
Layer.prototype.initialize = function() { | |
var lyr = new olCls(this.get('name'), this.get('url'), opts); | |
this.set({ olLayer: lyr }); | |
}; | |
LayerView.prototype.render = function() { | |
var view = this; | |
var trucks = new Layer({name: 'Vehicles'); | |
view.map.addLayer(trucks); | |
// refresh the vehicles and turn them into markers |
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
#!/usr/bin/env python | |
from math import pi,cos,sin,log,exp,atan | |
import sys, os | |
DEG_TO_RAD = pi/180 | |
RAD_TO_DEG = 180/pi | |
def minmax (a,b,c): | |
a = max(a,b) |
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
#!/usr/bin/env node | |
/* | |
* Parsing BIG compressed data with Node.js and SAX | |
* Probably some bugs, but worked fine for OpenStreetMap Great Britain bz2 | |
* Greg Miell 2012 | |
*/ | |
// Simple string trim prototype extension | |
String.prototype.trim = function() { |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs" background-color="rgb(255,255,255)"> | |
<Style name="drainage"> | |
<Rule> | |
<Filter>([HYC]=8)</Filter> | |
<CompositingSymbolizer fill="rgb(153,204,255,127)" smooth="1" comp-op="exclusion"/> | |
</Rule> | |
</Style> | |
<Style name="highway-border"> | |
<Rule> |
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
#!/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 | |
# |
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
pep8 --statistics -qq --filename=*.py /usr/local/src/madrona/madrona/ | |
pep8 --select=E202,E201 --repeat . > ~/pep8.txt | |
vim -q ~/pep8.txt | |
# :map z :cn | |
# type z to cycle through all instances; puts your cursor right on the spot |
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
/* | |
In a child process, each of the stdio streams may be set to | |
one of the following: | |
1. A new file descriptor in the child, dup2'ed to the parent and | |
exposed to JS as a Stream object. | |
2. A copy of a file descriptor from the parent, with no other | |
added magical stuff. | |
3. A black hole - no pipe created. |