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
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html | |
Hi everyone, I'm Chris Wanstrath. | |
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But | |
then I took a few moments and thought, Wait, why? Why me? What am I supposed | |
to say that's interesting? Something about Ruby, perhaps. Maybe the | |
future of it. The future of something, at least. That sounds | |
keynote-y. | |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'mechanize' | |
MY_NAME = 'Yossef Mendelssohn' | |
CHECKIN_REQUEST_URL = 'http://www.southwest.com/flight/retrieveCheckinDoc.html' | |
prompt = false | |
conf = ARGV[0] |
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
tell application "Caffeine" to turn on | |
set volume alert volume 0 |
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
#!/bin/sh | |
BRANCHES=`git branch` | |
if [ $? != 0 ]; then | |
exit | |
fi | |
GIT_SVN=0 | |
git branch -r | grep 'git-svn' > /dev/null | |
if [ $? = 0 ]; then | |
GIT_SVN=1 |
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
This allowed for automatic render overrides based on controller | |
An example: | |
controller = UsersController | |
action = show | |
normal path = RAILS_ROOT/app/views/users/show.html.erb (or haml or rhtml or rjs or whatever) | |
With this in place, |
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
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |
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
#!/usr/bin/env ruby -w | |
require 'hpricot' | |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
require 'tempfile' | |
test_http = "http://gist.github.com/69452" | |
test_https = "https://gist.github.com/42af948558a3b3704bab" |
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 'spec/runner/formatter/progress_bar_formatter' | |
class NescafeFormatter < Spec::Runner::Formatter::ProgressBarFormatter | |
def example_failed(example, counter, failure) | |
super | |
dump_failure(counter, failure) | |
end | |
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
class Punch | |
class << self | |
original_load = self.instance_method(:load) | |
# if you want to call the original use: | |
# original_load.bind(self).call | |
define_method(:load) do |file| | |
raise ArgumentError, 'no filename supplied' unless file | |
@data = YAML.load(File.read(file)) | |
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
$ bundle --version | |
Bundler version 0.9.26 | |
$ bundle version | |
Bundler version 0.9.26 | |
$ bundle install --version | |
Unknown switches '--version' | |
$ bundle --version | |
Bundler version 0.9.26 | |
$ bundle --version --version | |
Unknown switches '--version' |
OlderNewer