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
module FourToedFrontFeet | |
def number_of_toes | |
4 | |
end | |
end | |
module Quadruped | |
include FourToedFrontFeet | |
def number_of_legs | |
4 |
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
defaults write com.macromates.textmate OakDefaultLanguage E00B62AC-6B1C-11D9-9B1F-000D93589AF6 |
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
a = [] | |
a << false ? "bad" : "awesome" | |
puts a.inspect # => [false] | |
a = [] | |
a << (false ? "bad" : "awesome") | |
puts a.inspect # => ["awesome"] |
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
class Dude < Person | |
awesomeness "SUPER AWESOME" | |
intellect 80 | |
end | |
# Dude.awesomeness #=> "SUPER AWESOME" | |
# Dude.new.intellect #=> 80 |
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
Specification From ... To (exclusive) | |
">= 3.0" 3.0 ... ∞ | |
"~> 3.0" 3.0 ... 4.0 | |
"~> 3.0.0" 3.0.0 ... 3.1 | |
"~> 3.5" 3.5 ... 4.0 | |
"~> 3.5.0" 3.5.0 ... 3.6 | |
taken from: http://rubygems.rubyforge.org/rubygems-update/Gem/Version.html |
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
Put this in an automator service as described by | |
http://blog.fosketts.net/2010/08/09/assign-keyboard-shortcut-applescript-automator-service/ |
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 'formtastic/validations' | |
module Formtastic | |
class SemanticFormBuilder < ActionView::Helpers::FormBuilder | |
@@validate_by_default = false | |
cattr_accessor :validate_by_default | |
end | |
end | |
Formtastic::SemanticFormBuilder.validate_by_default = true |
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
#! | |
ps -e -f | grep `ruby -e 'puts "[#{ARGV[0][0,1]}]#{ARGV[0][1..-1]}"' $*` | awk '{print $2}' | xargs kill -9 |
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
<html> | |
<head> | |
<script type="text/javascript" charset="utf-8"> | |
var FB = function(){ | |
//defaults and accessors | |
var initialized = false, | |
loggedIn = null, | |
shouldSucceed = true, | |
uid = '12345'; |
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
<html> | |
<head> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script type="text/javascript" src="http://code.google.com/apis/gears/gears_init.js"></script> | |
<script type="text/javascript" src="http://cdn.simplegeo.com/js/1.2/simplegeo.all.jq.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
;var Maps = function(){ |