Skip to content

Instantly share code, notes, and snippets.

View kuno's full-sized avatar

kuno kuno

View GitHub Profile

Author: Sean Gillies Version: 1.0

Abstract

This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.

Introduction

- certain endpoints are always blocked
if nginx_uri == "/_access_token" or nginx_uri == "/_me" then
ngx.exit(403)
end
-- import requirements
local cjson = require "cjson"
-- setup some app-level vars
local app_id = "APP_ID"
# this will install everything as root, so take that into account before you run it
# need cmake, python development headers, ZLib and OpenSSL
sudo apt-get install cmake python2.7-dev zlib1g-dev libssl-dev
mkdir libgit && cd libgit
git clone git://github.com/libgit2/libgit2.git
cd libgit2
// Named constants with unique integer values
var C = {};
// Tokenizer States
var START = C.START = 0x11;
var TRUE1 = C.TRUE1 = 0x21;
var TRUE2 = C.TRUE2 = 0x22;
var TRUE3 = C.TRUE3 = 0x23;
var FALSE1 = C.FALSE1 = 0x31;
var FALSE2 = C.FALSE2 = 0x32;
var FALSE3 = C.FALSE3 = 0x33;
var zmq = require('zmq');
function Majordomo(options)
{
this.requests = zmq.socket('router');
this.requests.identity = 'majordomo:incoming:' + process.pid;
this.responders = zmq.socket('dealer');
this.responders.identity = 'majordomo:outgoing:' + process.pid;
if (options)
this.configure(options);
@kuno
kuno / pi.diff
Created March 29, 2013 14:49 — forked from davecheney/pi.diff
diff -r d2213960ade2 src/cmd/5l/asm.c
--- a/src/cmd/5l/asm.c Sat Jul 14 15:59:52 2012 +0400
+++ b/src/cmd/5l/asm.c Sun Jul 15 19:45:39 2012 +1000
@@ -33,6 +33,7 @@
#include "l.h"
#include "../ld/lib.h"
#include "../ld/elf.h"
+#include "../ld/dwarf.h"
static Prog *PP;
@kuno
kuno / es.sh
Created March 20, 2013 06:14 — forked from sgringwe/es.sh
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
# Download the compiled elasticsearch rather than the source.
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.5.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@kuno
kuno / gist:4251236
Created December 10, 2012 15:25 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@kuno
kuno / source_maps.rb
Created November 20, 2012 05:20 — forked from alexspeller/source_maps.rb
Coffeescript Source Maps in Rails
# config/initializers/source_maps.rb
if Rails.env.development?
require 'open3'
module CoffeeScript
class SourceMapError < StandardError; end;
class << self
def map_dir
@kuno
kuno / app.js
Created November 15, 2012 14:09 — forked from pixelhandler/app.js
Develop a RESTful API Using Node.js With Express and Mongoose - See: http://pixelhandler.com/blog/2012/02/09/develop-a-restful-api-using-node-js-with-express-and-mongoose/
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');