Skip to content

Instantly share code, notes, and snippets.

View luigi's full-sized avatar

Luigi Ray-Montañez luigi

View GitHub Profile

National Data Catalog API

The National Data Catalog stores metadata about data sets and APIs published by all leves of government. It helps developers search for, identify, and work with data sources that would otherwise take significant effort to track down.

Currently, the National Data Catalog consists of a web front-end that is powered by an API back-end.

Accessing the API

The API is RESTful and speaks JSON. It will throw appropriate HTTP status codes on errors, along with a helpful error message passed as a JSON object.

@luigi
luigi / gt.md
Created September 18, 2009 15:39

Local and remote branches

Create and checkout topic branch

gt start my_topic

Create and checkout topic branch with corresponding remote branch

gt start_and_pushup my_topic
require 'ostruct'
require 'pp'
class NewStruct < OpenStruct
def self.new(hash)
if hash.nil? || hash.empty?
return nil
else
super(hash)
# For Mac OS X users who don't want to manually add entries into /etc/hosts
# Stick these functions in your .bash_login or equivalent
#
# From the command line:
# $ add_localhost foo
# will create foo.local
#
# No error checking, so don't mess up...
function add_localhost {

Proposal for the National Data Catalog

Prepared by David James and Luigi Montanez

Overview

The National Data Catalog aims to be a complete catalog of all data sets and APIs that are either put out by the government or are derived from the government. Scoped to all government levels (federal, state, and local), and all branches (executive, legislative, judicial), NDC will be the one-stop shop for developers, researchers, and investigative journalists interested in government data.

NDC will tap into the social benefits of having users come together around common interests. More than just a catalog, it will be a place for community-supported documentation about government data.

Did you follow this gist, wallowing in its awesomeness, only to realize your Visual Voicemail stopped working? You just need to reset your carrier settings file, and you’ll get to keep tethering and get your Visual Voicemail back!

  1. Connect your iPhone and fire up iTunes. Option-click on the Restore button like you did before.
  2. Navigate to your-username | Library | iTunes | iPhone Carrier Support
  3. Click on the file in there to reset your carrier settings.
We couldn’t find that file to show.
We couldn’t find that file to show.
require 'open-uri'
require 'nokogiri'
def pluck_article(url)
# get the raw HTML
doc = Nokogiri::HTML(open(url))
# get the paragraphs
paragraphs = doc.search('p')
cd /var/www/apps/myapp/current && /opt/ree/bin/ruby script/runner -e production "Some Ruby Code or path/to/ruby/script"