Skip to content

Instantly share code, notes, and snippets.

Nick Newell blotto

  • KillerGeeks
Block or report user

Report or block blotto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
blotto / IronMQ example1
Last active Aug 29, 2015
IronMQ example
View IronMQ example1
function postTerm(term) {
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
var data = {
"messages": [
"body": term
blotto / gist:8005531b9c94f3732240
Last active Aug 29, 2015
Sample Unicorn.rb File
View gist:8005531b9c94f3732240
worker_processes ENV['WEB_CONCURRENCY'].to_i > 0 ? ENV['WEB_CONCURRENCY'].to_i : 3
timeout ENV['REQUEST_TIMEOUT'].to_i > 0 ? ENV['REQUEST_TIMEOUT'].to_i : 15
preload_app true
before_fork do |server, worker|
Signal.trap 'TERM' do
puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
blotto / cleaners.rb
Created Apr 9, 2014
Some Sidekiq helper methods
View cleaners.rb
module AsyncTools
module Cleaners
def self.find_job_for_object_by_method(klass, method)
jobs = { |job|
blotto / deploy
Created Jan 27, 2014
CI Deploy to Heroku
View deploy
#one off to ensure heroku remote is added to repo
heroku git:remote -a myApp
git remote add heroku
curl -X POST -H "X-Api-Key: APIKEY"
heroku maintenance:on --app myApp
#push to heroku
git push --force heroku master
heroku run rake db:migrate --app myApp
View urbanspoon_reservations.rb
require 'rubygems'
require 'mechanize'
EMAIL = ''
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }
blotto / set_jenkins_permGen_heapSize
Created Feb 26, 2013
increase permGen heapSize for Jenkins on MacOSx
View set_jenkins_permGen_heapSize
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo touch /Library/Preferences/org.jenkins-ci
sudo defaults write /Library/Preferences/org.jenkins-ci permGen 512m
sudo defaults write /Library/Preferences/org.jenkins-ci heapSize 2048m
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
You can’t perform that action at this time.