This file contains 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 request = require('request'); | |
// app below needs to be a Connect/Express app. | |
// Subscribing: use https://push.superfeedr.com/ to use Superfeedr (works with any feed!) | |
function subscribe(url, conf, cb) { | |
var hub = conf.hub; | |
var params = { | |
method: 'POST', | |
uri: hub, |
This file contains 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 foo = { | |
key1: "a", | |
key2: "b", | |
key3: "c" | |
}; | |
// node, modern browsers | |
Object.keys(foo).forEach(function (key, i, keys) { | |
console.log(key, foo[key]); | |
}); |
This file contains 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
## install mapnik 2.x (trunk) from nightlies | |
# be careful with this because these change nightly | |
# and may require you re-compile apps using mapnik | |
# after you run `apt-get upgrade` post installation of mapnik | |
apt-get install python-software-properties | |
apt-add-repository ppa:mapnik/nightly-trunk | |
sudo apt-get update | |
sudo apt-get install libmapnik2 libmapnik2-dev mapnik2-utils python-mapnik2 | |
## install ruby |
This file contains 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
require 'tweetstream' | |
require 'json' | |
require 'irc-socket' | |
SETTINGS = JSON.load(File.open("settings.json")) | |
@irc = IRCSocket.new(SETTINGS["server"]) | |
@irc.connect | |
@irc.nick SETTINGS["nick"] | |
@irc.user SETTINGS["nick"], 0, "*", "Neuron Bot" | |
@irc.join("#pdxtwitter") |
This file contains 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 icalendar import Calendar, Event | |
import simplejson as json | |
import re | |
import web | |
from mimerender import mimerender | |
import sys | |
import urllib2 | |
event = {} |
This file contains 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
def get_distance | |
venues = [] | |
venues << Venue.new(:lat => 45.572952,:lon => -122.68394,:name => "my house", :vid => 6129841) | |
venues << Venue.new(:lat => 45.569133, :lon => -122.681568, :name => "new seasons", :vid => 42031) | |
venues << Venue.new(:lat => 45.429839, :lon => -122.574021, :name => "24 hour fitness clackamas", :vid => 115506) | |
venues << Venue.new(:vid => 89015, :name => "Fred Meyer, Arbor Lodge", :lat=> 45.577137, :lon => -122.68199) | |
venues << Venue.new(:vid => 39705, :name => "The Green Dragon", :lat => 45.515798, :lon => -122.656703) | |
venues << Venue.new(:vid => 36395, :name => "Oregon Convention Center", :lat => 45.528311, :lon => -122.663204) |
NewerOlder