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
new_method = User.method(:new) | |
User.stub(:new).and_return do |*args| | |
instance = new_method.call *args | |
instance.stub(:project_changes).with(@project.to_param).and_return(@changes_array) | |
instance | |
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
$ ruby -v | |
ruby 1.9.2p136 (2010-12-25) | |
$ ruby symbol_literals.rb | |
valid as first char: | |
@$_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz | |
valid as middle char: | |
_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 | |
valid as end char: | |
!_=?ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 |
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
Hi David, | |
I came across your profile online and wanted to reach out about Development | |
Opportunities here at Groupon. The company is growing, and we're always | |
looking for folks with solid skills that can make positive contribution to | |
our continued success. Any chance you'd be open to a quick conversation | |
about opportunities, or for any possible networking potential? If so, let me | |
know when you're free and we can set up a time to chat. Also, if you are | |
interested, it would be great if you could forward a current resume over | |
that I can take a look at. I look forward to hearing back from you! Please | |
let me know if you have any questions. |
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
# for other JRuby processes, use nailgun and 1.9 | |
export JRUBY_OPTS="--ng --1.9" | |
# to start a nailgun server | |
export JRUBY_OPTS='--1.9' | |
function rbenvsudo(){ | |
executable=$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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'rspec/autorun' | |
require 'capybara/rspec' | |
require 'webmock/rspec' | |
require 'factory_girl' | |
require 'factory_girl_rails' | |
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} |
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
#Please tell me there is a better way to do this | |
#(And by 'a better way', I don't mean incorporating the cut within the awk script) | |
npm ls | grep -E "^(├|└)─" | cut -d" " -f2 | awk '{FS = "@"; print "\""$1"\"", ":", "\""$2"\""}' |
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 | |
# one way (older scala version will be installed) | |
# sudo apt-get install scala | |
#2nd way | |
sudo apt-get remove scala-library scala | |
wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb | |
sudo dpkg -i scala-2.11.4.deb | |
sudo apt-get update |