Skip to content

Instantly share code, notes, and snippets.

View gijs's full-sized avatar

Gijs Nijholt gijs

View GitHub Profile
@gijs
gijs / gist:4313624
Created December 16, 2012 22:10
Vagrant file for pgrouting app
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise64"
@gijs
gijs / leaflet-google.js
Created July 24, 2012 12:09 — forked from crofty/leaflet-google.js
Leaflet plugin that enables the use of Google Map tiles - http://matchingnotes.com/using-google-map-tiles-with-leaflet
/*
* L.TileLayer is used for standard xyz-numbered tile layers.
*/
L.Google = L.Class.extend({
includes: L.Mixin.Events,
options: {
minZoom: 0,
maxZoom: 18,
tileSize: 256,
@gijs
gijs / index.html
Created July 4, 2012 16:56 — forked from pere/index.html
d3.js circles in leaflet.js
<html>
<head>
<title>Testing d3.js in Leaflet.js</title>
<link rel="stylesheet" href="leaflet.css" />
<script type="text/javascript" src="http://d3js.org/d3.v2.min.js?2.9.3"></script>
<script src="http://code.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<style type="text/css">
@gijs
gijs / cocoa_keypress_monitor.py
Created June 29, 2012 21:26 — forked from ljos/cocoa_keypress_monitor.py
Showing how to listen to all keypresses in OS X through the Cocoa API using Python and PyObjC
# cocoa_keypress_monitor.py by Bjarte Johansen is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
from AppKit import NSApplication, NSApp
from Foundation import NSObject, NSLog
from Cocoa import NSEvent, NSKeyDownMask
from PyObjCTools import AppHelper
class AppDelegate(NSObject):
def applicationDidFinishLaunching_(self, notification):
mask = NSKeyDownMask
@gijs
gijs / TileLayer.TileJSON.js
Created June 13, 2012 10:53 — forked from idolmind/TileLayer.TileJSON.js
Leaflet TileCanvas
L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({
options: {
debug: false
},
tileSize: 256,
initialize: function (options) {
L.Util.setOptions(this, options);
@gijs
gijs / tile.js
Created June 13, 2012 10:21 — forked from RandomEtc/tile.js
shape rendering in nodejs with LearnBoost's node-canvas
// node.js geo polygon map tile rendering!
// requires https://github.com/learnboost/node-canvas and GeoJSON data files
// e.g.
// data from naturalearthdata.com converted to GeoJSON with GDAL's ogr2ogr
// or from datasf.org, reprojected too:
// ogr2ogr -f GeoJSON sfbay.js sfbay.shp -t_srs EPSG:4326
var Canvas = require('./vendor/node-canvas/lib/canvas'),
http = require('http'),
fs = require('fs');
@gijs
gijs / TileLayer.TileJSON.js
Created June 12, 2012 19:21 — forked from brunob/TileLayer.TileJSON.js
Leaflet TileCanvas
L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({
options: {
debug: false
},
tileSize: 256,
initialize: function (options) {
L.Util.setOptions(this, options);
@gijs
gijs / TileLayer.TileJSON.js
Created June 12, 2012 19:20 — forked from DGuidi/TileLayer.TileJSON.js
Leaflet TileCanvas
L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({
options: {
debug: false
},
tileSize: 256,
initialize: function (options) {
L.Util.setOptions(this, options);
@gijs
gijs / app.js
Created June 3, 2012 13:30
Error: Schema hasn't been registered for model "tenant1234Workspaces".
require("v8-profiler")
var express = require('express'),
passport = require('passport'),
path = require('path'),
http = require('http'),
url = require('url'),
DropboxClient = require('dropbox').DropboxClient,
MongoStore = require('connect-mongo')(express),
mongoose = require('mongoose'),
Schema = mongoose.Schema,
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.jsuereth#sbt-site-plugin;0.4.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.jsuereth:sbt-site-plugin:0.4.0 (sbtVersion=0.11.2, scalaVersion=2.9.1)
[warn]
[error] {git://github.com/jsuereth/xsbt-ghpages-plugin.git}sbt-ghpages-plugin/*:update: sbt.ResolveException: unresolved dependency: com.jsuereth#sbt-site-plugin;0.4.0: not found