Skip to content

Instantly share code, notes, and snippets.

$.getJSON('http://api.flickr.com/services/rest/?method=flickr.places.getInfo&api_key=get_your_own&woe_id=44418&format=json&jsoncallback=?', function(data) {
if(data.place.has_shapedata == 1) {
var bounds = new GLatLngBounds();
$.each(data.place.shapedata.polylines.polyline, function(index,polyline) {
thepoints = [];
$.each(polyline._content.split(/ /), function(pindex, point) {
lat = parseFloat(point.split(/,/)[0]);
lng = parseFloat(point.split(/,/)[1]);
thepoints[pindex] = new GLatLng(lat, lng);
});
#!/usr/bin/env ruby
require '/Users/mattb/Work/Dopplr/code/dopplr/config/environment'
require 'fire_hydrant'
config = YAML.load(File.read("fire_hydrant.yml"))
hydrant = FireHydrant.new(config, false)
hydrant.jack!(OAuthPubSubJack)
hydrant.on_startup do
defer :subscribed do
def parse(x)
$joined = 0
$counter = 0
# INITIALIZE VARIABLES
upmynick = $irc_nick
mynick = upmynick.downcase
nick = ""
chan = ""
require 'rubygems'
require 'fireeagle'
require 'twitter'
# get yourself an access token by hand on the irb commandline with the oauth gem
fe = FireEagle::Client.new(:consumer_key => "<yourkey>", :consumer_secret => "<yoursecret>", :access_token => "<youraccesstoken>", :access_token_secret => "<youraccesstokensecret>")
t=Twitter::Base.new "<yournick>","<yourpassword>"
lat = nil
lng = nil
while true