View gist:f66782e13bd8c327a9fe
1 2 3 4 5 6 7 8 9
user_pass = "password1"
User.where(:email => 'danmayer@gmail.com').first.update(password: user_pass, password_confirmation: user_pass)
 
resource = User.find_by_email("danmayer@gmail.com")
 
bcrypt = BCrypt::Password.new(resource.encrypted_password)
password = BCrypt::Engine.hash_secret("#{user_pass}", bcrypt.salt)
valid = Devise.secure_compare(password, resource.encrypted_password)
#true
View gem_updated
1 2 3 4 5 6 7 8 9 10
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
1 2 3 4 5 6 7 8 9 10
def method_a
puts "hi"
end
 
def method_b
puts "boom goes the awesome"
end
 
 
method_a
View gist:2288a470c5d83616c489
1 2 3 4 5
#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
1 2 3 4 5 6 7 8 9 10
http://www.wired.com/wiredenterprise/2013/04/developers-age/
http://www.linkedin.com/today/post/article/20130422020049-8451-the-tech-industry-s-darkest-secret-it-s-all-about-age
http://www.bloombergview.com/articles/2012-04-22/software-engineers-will-work-one-day-for-english-majors
http://heartmindcode.com/2013/08/16/loyalty-and-layoffs/
 
a counterpoint
http://coding-and-more.blogspot.com/2011/06/its-official-developers-get-better-with.html
 
a pair, article and a response
http://prog21.dadgum.com/154.html
View gist:8816670
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env ruby
 
require 'jenkins_api_client'
require 'ruby-debug'
 
CI_PROJECT_NAME = "server_responder"
 
@client = JenkinsApi::Client.new(:server_ip => 'localhost',
:server_port => '8888',
:username => 'somename',
View churn_swagger_client.rb
1 2 3 4 5 6 7 8 9 10
$:.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
1 2 3 4 5 6 7 8 9 10
./bin/runscala.sh -DskipErrors com.wordnik.swagger.codegen.BasicRubyGenerator http://churn.picoappz.com/api-docs "key"
base path is http://churn.picoappz.com/api-docs
********* Failed to read swagger json!
Error: Operation - responseClass | missing required field
**** ignoring errors and continuing
swagger version: 1.2
basePath:
api version: 1.0
missing models: Set()
----------
View gist:7295057
1 2 3 4 5 6 7
Crepes with veggies: http://projects.washingtonpost.com/recipes/2013/07/10/ratatouille-tomato-crepes/
 
Corn cakes, if there is still any corn tomorrow: http://www.nytimes.com/recipes/1014967/sweet-corn-blini.html
 
Stuffed peppers: http://www.nytimes.com/recipes/1014968/feta-stuffed-peppers.html
 
Chili mac and cheese; http://www.gracelaced.com/2011/09/26/baked-green-chile-mac-and-cheese/
View tap_with_each.rb
1 2 3
# do this opposed to each_with_object or inject
# from http://phrogz.net/tap-vs-each_with_object
by_id = {}.tap{ |h| items.each{ |item| h[item.id] = item } }
Something went wrong with that request. Please try again.