This file contains hidden or 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
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require "rspec/rails" | |
require "capybara/rspec" | |
OmniAuth.config.test_mode = true | |
OmniAuth.config.mock_auth[:default] = { | |
'user_info' => { | |
'name' => "Foo Bar", | |
'email' => "[email protected]", |
This file contains hidden or 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
- pres = UserPresenter.new(@user) | |
- content_for :title, "#{pres.github_login}'s profile" | |
#user-profile | |
= image_tag pres.gravatar_image_url, class: :avatar | |
%h2= pres.name | |
%ul | |
%li.pairing-preference |
This file contains hidden or 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
- pres = UserPresenter.new(@user).render do | |
- content_for :title, "#{github_login}'s profile" | |
#user-profile | |
= image_tag gravatar_image_url, class: :avatar | |
%h2= name | |
%ul | |
%li.pairing-preference |
This file contains hidden or 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
=> 1: - binding.pry | |
2: - pres = UserPresenter.new(@user).render do | |
3: - content_for :title, "#{github_login}'s profile" | |
4: | |
5: #user-profile | |
6: = image_tag gravatar_image_url, class: :avatar | |
pry(#<#<Class:0x00000105340e30>>)> self.class | |
=> #<Class:0x00000105340e30> | |
pry(#<#<Class:0x00000105340e30>>)> self.class.ancestors | |
=> [#<Class:0x00000105340e30>, |
This file contains hidden or 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
ruby-1.9.2-p290 :001 > a = [1,2,3] | |
=> [1, 2, 3] | |
ruby-1.9.2-p290 :002 > b = a | |
=> [1, 2, 3] | |
ruby-1.9.2-p290 :003 > b.delete 1 | |
=> 1 | |
ruby-1.9.2-p290 :004 > b | |
=> [2, 3] | |
ruby-1.9.2-p290 :005 > a | |
=> [2, 3] |
This file contains hidden or 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
HARD CORE | |
--------- | |
1130 CoffeeScript, 9, Josh | |
1210 Compass / SASS, 11, DJ | |
1250 LUNCH | |
1400 JS Testing, 11, Trevor & Derek | |
1440 NoSQL, 9, Brandon & Ali & Brad | |
1520 DCI, 9, Jim | |
1600 Fast Rails Test, 7, Evan | |
1640 Puppet / Chef, 8, Josh |
This file contains hidden or 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
# Ran against github.com/rubypair/rubypair | |
/Users/light/.rvm/gems/ruby-1.9.3-preview1@rubypair/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `require': dlopen(/Users/light/.rvm/gems/ruby-1.9.3-preview1@rubypair/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle, 9): Symbol not found: _ruby_current_thread (LoadError) | |
Referenced from: /Users/light/.rvm/gems/ruby-1.9.3-preview1@rubypair/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle | |
Expected in: flat namespace | |
in /Users/light/.rvm/gems/ruby-1.9.3-preview1@rubypair/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle - /Users/light/.rvm/gems/ruby-1.9.3-preview1@rubypair/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle | |
from /Users/light/.rvm/gems/ruby-1.9.3-preview1@rubypair/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `<top (required)>' | |
from /Users/light/.rvm/gems/ruby-1.9.3-preview1@rubypair/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `require' | |
from /Users/light/.rvm/gems/ruby-1.9.3-preview1@rubypair/gems/ruby- |
This file contains hidden or 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 | |
def delete_ssh_user(username) | |
`rm -rf /Users/#{username}` | |
`dseditgroup -o edit -d #{username} -t user com.apple.access_ssh` | |
`dscl . -delete /Users/#{username}` | |
end | |
username = ARGV.shift | |
delete_ssh_user username |
This file contains hidden or 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 | |
CHARACTERS = (('A'..'Z').to_a + ('a'..'z').to_a + (0..9).to_a) | |
GROUP = 53 | |
MY_MACHINE_DYNDNS_ADDRESS = "Put your DynDns DNS name here" | |
MY_SSH_PORT = "Your router's external port that will forward to SSH" # as a Fixnum | |
def ridiculous_password | |
(1..20).map do |
This file contains hidden or 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 User < ActiveRecord::Base | |
# ... lots of persistence stuff | |
end | |
class GitHubUserProvisioner < SimpleDelegator | |
def provision_with!(user_info, extra_user_hash) | |
self.github_login = extra_user_hash['login'] | |
self.name = user_info['name'] | |
self.email = user_info['email'] | |
self.github_url = user_info['urls']['GitHub'] |