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
$.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); | |
}); |
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
#!/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 |
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 parse(x) | |
$joined = 0 | |
$counter = 0 | |
# INITIALIZE VARIABLES | |
upmynick = $irc_nick | |
mynick = upmynick.downcase | |
nick = "" | |
chan = "" |
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 '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 |
NewerOlder