Skip to content

Instantly share code, notes, and snippets.

View luigi's full-sized avatar

Luigi Ray-Montañez luigi

  • Atlanta, GA
  • 21:50 (UTC -04:00)
View GitHub Profile

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.

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.

# 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 {
require 'ostruct'
require 'pp'
class NewStruct < OpenStruct
def self.new(hash)
if hash.nil? || hash.empty?
return nil
else
super(hash)
@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

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.

module Rack
class ChromeFrame
def initialize(app, options={})
@app = app
end
def call(env)
status, headers, response = @app.call(env)
if env['HTTP_USER_AGENT'] =~ /MSIE/ && response.content_type == 'text/html'
# Adapted from ActiveSupport's parameterize
# http://github.com/rails/rails/blob/ea0e41d8fa5a132a2d2771e9785833b7663203ac/activesupport/lib/active_support/inflector.rb#L259
def slugify(str, sep = '-')
str.gsub!(/[^a-z0-9\-_\+]+/i, sep)
unless sep.nil? || sep == ''
re_sep = Regexp.escape(sep)
str.gsub!(/#{re_sep}{2,}/, sep)
str.gsub!(/^#{re_sep}|#{re_sep}$/i, '')
end
@luigi
luigi / steelify.html
Created October 16, 2009 21:15
steelify any web page!
<style type="text/css">
#mSteele {
width:576px;
height:388px;
position:absolute;
top:100px;
right:0;
background: transparent;
}
</style>

National Data Catalog - Catalog Scraper Specification

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

Here are some resources: