Skip to content

Instantly share code, notes, and snippets.

View luigi's full-sized avatar

Luigi Ray-Montañez luigi

  • Atlanta, GA
  • 20:41 (UTC -04:00)
View GitHub Profile
validates_presence_of :first_name, :last_name, :zip
validates_length_of :password, :within => 6..40, :if => :password_required?
validates_confirmation_of :password, :if => :password_required?
validates_length_of :login, :within => 2..50, :too_short => "email must be at least 2 characters", :too_long => "email is too long!"
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, :message => "is not formatted properly"
validates_uniqueness_of :email, :case_sensitive => false, :message => "is already in the system"
describe "Sending Membership Invites" do
before :each do
user = mock_model(User)
group = mock_model(Group, :user => user, :name => "What's up holmes?")
invitee = mock_model(User)
membership = mock_model(Membership, :user => invitee, :group => group)
@message = Message.create_for_membership_invitation(membership)
end
export PATH=/usr/local/mysql/bin:$PATH
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export PATH=~/bin:~/bin:$PATH
export PATH=/usr/local/sbin:$PATH
export PATH=/usr/local/nginx/sbin:$PATH
export PATH=/usr/local/bin:$PATH
export MANPATH=/opt/local/share/man:$MANPATH
# Use TextMate as our editor
LOAD DATA INFILE '/tmp/my_file.csv' INTO TABLE my_table
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES
cd /var/www/apps/myapp/current && /opt/ree/bin/ruby script/runner -e production "Some Ruby Code or path/to/ruby/script"
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')
We couldn’t find that file to show.
We couldn’t find that file to show.

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.