- You can start anywhere in the Castro, Mission (home of the burrito), or downtown. I'd recommend starting at Chow at Market & Church or The Pork Store on 16th at Valencia. If you wanted to go upscale on the weekend, Maverick at 17th and Mission is a fantastic brunch. Another option is to start in Chinatown (just north of Union Squre) for dim sum.
- From Castro take one of the N, J, etc. trains (every light rail train route in the city intersects at Church and Market) down to the Powell Street station. From the Mission you can take BART a couple of stops up to Powell Street.
- Once at Powell Street hop on the Powell Street trolley. A quintessential SF experience.
- Take the trolley up through the city where it will eventually stop at Lombard Street, which is known as the most crooked street in the world. Walk down the hill, take a few pictures and laugh at the tourists trying to drive down the damn thing.
- Once at the bottom of the hill, turn left. You'll be walking towards the w
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
$ = jQuery | |
$.fn.lineHeight or= -> | |
if height = @data('lineHeight') | |
return height | |
# Create a hidden div with the same font | |
# properties, then measure its height | |
$shadow = $('<span />') | |
$shadow.css({ |
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
# MAC manipulators | |
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`' | |
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE' |
Jim Weirich:
This is how I explain it… Ruby has Procs and Lambdas. Procs are created with
Proc.new { }
, lambdas are created withlambda {}
and->() {}
.
In Ruby 1.8,
proc {}
creates lambda, and Ruby 1.9 it creates procs (don't ask).
Lambdas use method semantics when handling parameters, procs use assignment semantics when handling parameters.
This means lambdas, like methods, will raise an ArgumentError when called with fewer arguments than they were defined with. Procs will simply assign nil to variables for arguments that were not passed in.
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 'pony' | |
Pony.options = { | |
:via => :smtp, | |
:from => "Somebody <[email protected]>" | |
} | |
if ENV['RACK_ENV'] == 'development' | |
require "letter_opener" | |
Pony.options.merge!({ | |
via: LetterOpener::DeliveryMethod, |
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
log | |
tags | |
tmp |
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
source "https://rubygems.org" | |
gem 'sprockets' | |
gem 'sprockets-sass' | |
gem 'sass' | |
gem 'compass' | |
gem 'bootstrap-sass' | |
gem 'handlebars_assets' | |
gem 'coffee-script' |