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
git :init | |
submodule = yes?("Do you love submodules?") ? true : false | |
[ ['rspec', 'git://github.com/dchelimsky/rspec.git'], | |
['rspec-rails', 'git://github.com/dchelimsky/rspec-rails.git'], | |
['resource_controller', 'git://github.com/giraffesoft/resource_controller.git'], | |
['cucumber', 'git://github.com/aslakhellesoy/cucumber.git'], | |
['paperclip', 'git://github.com/thoughtbot/paperclip.git'], | |
['exception_notifier', 'git://github.com/rails/exception_notification.git'], | |
['jrails', 'git://github.com/aaronchi/jrails.git'] |
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
run "haml --rails #{run "pwd"}" |
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
User-agent: * | |
Disallow: / |
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
str = '\243119' | |
str.toutf8 | |
# you would expect it to display "119", but it returns: | |
# => "19 " |
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 Callbacks | |
def callbacks | |
@_callbacks ||= {} | |
end | |
def bind(callback_name, &block) | |
callbacks[callback_name] ||= [] | |
callbacks[callback_name] << block | |
end |
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
Scenario: create (no shogun global config) # features/create.feature:6 | |
Given a directory named "mycoolapp" # aruba-0.2.3/lib/aruba/cucumber.rb:62 | |
And I cd to "mycoolapp" # aruba-0.2.3/lib/aruba/cucumber.rb:86 | |
When I run "ruby ../../../bin/shogun create" interactively # aruba-0.2.3/lib/aruba/cucumber.rb:98 | |
Then the output should contain "Please type in your api token: " # aruba-0.2.3/lib/aruba/cucumber.rb:106 | |
And I type "32h23d9823dj9832d89" # aruba-0.2.3/lib/aruba/cucumber.rb:102 | |
Broken pipe (Errno::EPIPE) | |
/Library/Ruby/Gems/1.8/gems/aruba-0.2.3/lib/aruba/api.rb:175:in `write' | |
/Library/Ruby/Gems/1.8/gems/aruba-0.2.3/lib/aruba/api.rb:175:in `write_interactive' | |
/Library/Ruby/Gems/1.8/gems/aruba-0.2.3/lib/aruba/cucumber.rb:103 |
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 'rubygems' | |
require 'steak' | |
require 'cucumber' | |
class Opinion | |
def self.give(topic, subjects) | |
case topic | |
when "which is better?" | |
if self.is_a_code_bastard? |
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
# app.coffee | |
fs = require 'fs' | |
express = require 'express' | |
tasty = require './tasty.js' | |
app = express.createServer() | |
md = require("node-markdown").Markdown | |
firstArticleData = '' | |
articleList = [] | |
fs.readdir 'articles', (err, files) -> |
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
if [[ -s /Users/paulbjensen/.rvm/scripts/rvm ]] ; then source /Users/paulbjensen/.rvm/scripts/rvm ; fi | |
# Bundle Aliases | |
alias bi='bundle install' | |
alias be='bundle exec' | |
# Git Aliases | |
alias ga='git add' | |
alias grm='git rm' |
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
// Stupid JavaScript Date inconsistency | |
//So, Say you have a string Date | |
var lastDayOf2010 = "2010-12-31"; | |
var choppedLastDayOf2010 = lastDayOf2010.split('-'); | |
// Let's say you decide to parse the date like so: | |
var badDate = new Date( |
OlderNewer