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, 0 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
# even simpler colorization for everything (assuming you're not using a lesspipe.sh already) | |
# (add to your .bashrc) | |
export LESS="-r" | |
export LESSOPEN="|pygmentize %s" |
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
jsonpretty: A command-line JSON pretty-printer. | |
Get it: gem install jsonpretty | |
Source: http://github.com/nicksieger/jsonpretty | |
Example: | |
$ curl -i http://github.com/api/v1/json/nicksieger | jsonpretty | pygmentize -l js | |
HTTP/1.1 200 OK | |
Server: nginx/0.6.26 |
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 -rubygems | |
require 'oauth' | |
require 'optparse' | |
options = {} | |
option_parser = OptionParser.new do |opts| | |
opts.banner = "Usage: #{$0} [options] <query>" |
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
{ | |
"query":{ | |
"latitude":37.778381, | |
"longitude":-122.389388 | |
}, | |
"timestamp":1291766899.794, | |
"weather": { | |
"temperature": "65F", | |
"conditions": "light haze" | |
}, { |
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
package com.simplejavaapp; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import com.simplegeo.client.SimpleGeoPlacesClient; | |
import com.simplegeo.client.callbacks.FeatureCollectionCallback; | |
import com.simplegeo.types.Feature; | |
import com.simplegeo.types.FeatureCollection; |
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
{ | |
"geometry":{ | |
"type":"Point", | |
"coordinates":[ | |
-122.421583, | |
37.795027 | |
] | |
}, | |
"type":"Feature", | |
"id":"SG_5JkVsYK82eLj26eomFrI7S_37.795027_-122.421583@1291796505", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{ | |
"layer": "mojodna.net", | |
"id": "simplegeo-boulder", | |
"type": "Feature", | |
"geometry": { | |
"type": "Point", | |
"coordinates": [ | |
-105.27728, | |
40.01690 | |
] |
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
web: node app.js | |
worker: node consumer.js |
OlderNewer