Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
Consumer key: CjulERsDeqhhjSme66ECg
| gem 'turbolinks', git: 'git://github.com/porras/turbolinks.git', branch: 'disable-url-management' |
| Given /^I randomly fail (\d+)% of the time$/ do |i| | |
| r = rand | |
| t = i.to_i / 100.0 | |
| raise 'RandomFailure' if r < t | |
| end |
Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
Consumer key: CjulERsDeqhhjSme66ECg
| # Changing terminal color in MacOSX when SSHing (so you know at a glance that you're no longer in Kansas) | |
| # Adapted from http://www.rngtng.com/2011/01/14/mac-os-x-terminal-visual-indication-for-your-ssh-connection/ | |
| # 1. Create a theme in your terminal setting with the name "SSH" and the desired colors, background, etc. | |
| # 2. Add this to your .bash_profile (or .bashrc, I always forget the difference ;)) | |
| # 3. Optional but useful: in the terminal, go to Settings > Startup and set "New tabs open with" to | |
| # "default settings" (otherwise, if you open a new tab from the changed one, you get a local tab with | |
| # the SSH colors) | |
| function tabc() { | |
| NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi # if you have trouble with this, change |
| class FancyDSL | |
| def initialize(&block) | |
| instance_eval(&block) | |
| end | |
| def setup(value) | |
| @setup = value | |
| end | |
| end |
| irb(main):001:0> class A; private; attr_reader :a; end | |
| => nil | |
| irb(main):002:0> A.new.a | |
| NoMethodError: private method `a' called for #<A:0x007fbbca0403c0> | |
| from (irb):2 | |
| from /Users/sergiogil/.rbenv/versions/1.9.3-p448/bin/irb:12:in `<main>' |
| class A | |
| private | |
| def self.a | |
| :a | |
| end | |
| end | |
| class B | |
| class << self |
| >> require 'date' | |
| => true | |
| >> Date.today.next_month | |
| => #<Date: 2014-09-19 (4913839/2,0,2299161)> | |
| >> Date.today.next_month - 1 | |
| => #<Date: 2014-09-18 (4913837/2,0,2299161)> | |
| >> Date.today.next_month -1 | |
| => #<Date: 2014-07-19 (4913715/2,0,2299161)> |
| class Object | |
| def to_app | |
| lambda do |env| | |
| _, method, args = env['REQUEST_PATH'].split('/') | |
| [200, {}, [self.send(method, *args).to_s]] | |
| end | |
| end | |
| end | |
| class HelloWorld |
| class ObjectThatInsistsOnCallingRead | |
| def initialize(io) | |
| while s = io.read(10) | |
| print s | |
| end | |
| end | |
| end | |
| class WrapperToWhichYouCanWrite | |
| def initialize |