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 InterpreterFinder | |
extend MyFinder | |
attr_accessor :job_request | |
finds_interpreters :willing_to_travel_to, the_job_request(:physical_address) | |
finds_interpreters :available_on, the_job_request(:start_datetime) | |
finds_interpreters :with_gender, of_the_job_request(:gender_range) | |
finds_interpreters :not_blacklisted_by, the_job_request(:client) |
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 'paycom' | |
login = Paycom::Login.new 'user_name', 'password', 'ssn_last_four_digits' | |
# This will fill out the week vanillia style | |
Paycom.week_punch login, Date.today | |
# This will fill out next week | |
Paycom.week_punch login, 1.week.from_now |
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 String | |
def is_anagram?(other) | |
length == other.length && byte_sum == other.byte_sum | |
end | |
def byte_sum | |
bytes.inject(:+) | |
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
If you're on Ubuntu Server, first do this: | |
sudo apt-get install python-software-properties | |
Then, do this: | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs |
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 | |
module DarkHorse | |
class << self | |
def included(base) | |
base.send(:extend, DarkHorse::SingletonMethods) | |
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
module TopSecret | |
def super_attr(attr) | |
value = nil | |
define_method "#{attr}" do | |
value | |
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
4.9.14_05_28_22_32 |
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
# Base up and running... | |
sudo apt-get update -y | |
sudo apt-get install build-essential -y | |
sudo apt-get install cmake -y | |
sudo apt-get install python-software-properties -y | |
sudo apt-get install python-dev -y | |
sudo apt-get install curl -y | |
sudo apt-get install git -y | |
sudo apt-get install xclip -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 'active_record' | |
ActiveRecord::Base.logger = Logger.new(STDERR) | |
ActiveRecord::Base.establish_connection( | |
:adapter => "sqlite3", | |
:database => ":memory:" | |
) |
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 'active_record' | |
require 'pstore' | |
ActiveRecord::Base.logger = Logger.new(STDERR) | |
ActiveRecord::Base.establish_connection( | |
:adapter => "sqlite3", | |
:database => ":memory:" | |
) |
OlderNewer