Skip to content

Instantly share code, notes, and snippets.

# 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.
#!/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]
tell application "Caffeine" to turn on
set volume alert volume 0
#!/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 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,
@endolith
endolith / Has weird right-to-left characters.txt
Last active June 1, 2024 10:58
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
#!/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"
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
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
$ 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'