Skip to content
View gist:f66782e13bd8c327a9fe
user_pass = "password1"
User.where(:email => '').first.update(password: user_pass, password_confirmation: user_pass)
resource = User.find_by_email("")
bcrypt =
password = BCrypt::Engine.hash_secret("#{user_pass}", bcrypt.salt)
valid = Devise.secure_compare(password, resource.encrypted_password)
View gem_updated
GEM_NAME = "ls-secure_gmaps"
COMMIT_MESSAGE = "update to latest ls-secure_gmaps\n This makes sure all calls are made with the correct keys for our new contract"
APPS = ["browse", "browse-service", "escapes", "events", "preferences", "sponsors"]
CMDS = ["git pull origin master",
"bundle install",
"bundle exec rake",
"bundle update #{GEM_NAME}",
"bundle exec rake",
View covercheck.rb
def method_a
puts "hi"
def method_b
puts "boom goes the awesome"
View gist:2288a470c5d83616c489
#specific commiter
git log --numstat --pretty="%H" --author="dan.mayer" --since="2 years ago" app | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}
#team total
git log --numstat --pretty="%H" --since="2 years ago" app | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}
View gist:9477044
a counterpoint
a pair, article and a response
View gist:8816670
#!/usr/bin/env ruby
require 'jenkins_api_client'
require 'ruby-debug'
CI_PROJECT_NAME = "server_responder"
@client = => 'localhost',
:server_port => '8888',
:username => 'somename',
View churn_swagger_client.rb
$:.unshift "#{File.dirname(__FILE__)}/lib"
require "swagger"
# Get request API endpoints
require "index_api"
require "project_name_api.rb"
require "project_path_api.rb"
# Post request endpoints
View gist:8610207
./bin/ -DskipErrors com.wordnik.swagger.codegen.BasicRubyGenerator "key"
base path is
********* Failed to read swagger json!
Error: Operation - responseClass | missing required field
**** ignoring errors and continuing
swagger version: 1.2
api version: 1.0
missing models: Set()
View gist:7295057
Crepes with veggies:
Corn cakes, if there is still any corn tomorrow:
Stuffed peppers:
Chili mac and cheese;
View tap_with_each.rb
# do this opposed to each_with_object or inject
# from
by_id = {}.tap{ |h| items.each{ |item| h[] = item } }
Something went wrong with that request. Please try again.