Skip to content

Instantly share code, notes, and snippets.

messick

Block or report user

Report or block messick

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
@messick
messick / pull_request_500
Created May 2, 2014
Pull Request 500 Error
View pull_request_500
// Request Headers
Request URL: https://sprint.ly/product/20177/commits/N8RcXc2LmxkEgN4Y6TSLN3jk6Xwag6kd
Request method: POST
content-type: application/x-www-form-urlencoded
Expect:
User-Agent: GitHub Hookshot 7c7c383
X-GitHub-Delivery: 0af05580-d231-11e3-945f-14e51215ab21
X-GitHub-Event: pull_request
// Request Payload
View invalid.json
{
"duration": 165.419006,
"bitrate": 987.312988,
"video": [],
"audio": [{
"codec": "alac",
"samplerate": 44100,
"channels": 2,
"bitrate": 986.385010,
"id": 0
View resque_retry.rb
# inspired by http://ariejan.net/2010/08/23/resque-how-to-requeue-failed-jobs
# retry all failed Resque jobs except the ones that have already been retried
# This is, for instance, useful if you have already retried some jobs via the web interface.
Resque::Failure.count.times do |i|
Resque::Failure.requeue(i) unless Resque::Failure.all(i, 1)['retried_at'].present?
end
# retry all :)
Resque::Failure.count.times do |i|
View rube-hackfest.md

QuckLeft Rube Goldberg Hackfest

API Endpoints

/api/events
/api/runs
/api/teams

View upload.coffee
handleFileUpload: (e) ->
file = e.target.files[0]
reader = new FileReader();
reader.onload = (e) =>
@image = new Image()
@image.onload = @renderImage
@image.src = e.target.result
reader.readAsDataURL(file)
@messick
messick / gist:3296967
Created Aug 8, 2012
part of /lib/rubber/recipes/rubber/volumes.rb
View gist:3296967
namespace :rubber do
desc <<-DESC
Sets up persistent volumes in the cloud
All volumes defined in rubber.yml will be created if necessary, and attached/mounted on their associated instances
DESC
required_task :setup_volumes do
rubber_instances.filtered.each do |ic|
env = rubber_cfg.environment.bind(ic.role_names, ic.name)
created_vols = []
@messick
messick / gist:3288624
Created Aug 7, 2012
RAID Rubber Config
View gist:3288624
rd1:
availability_zone: us-east-1a
local_volumes:
- partition_device: /dev/xvdb
zero: false # zeros out disk for improved performance
- partition_device: /dev/xvdc
zero: false # zeros out disk for improved performance
packages: [xfsprogs, mdadm]
raid_volumes:
- device: /dev/md0 # OS device to to create raid array on
@messick
messick / deploy.rb
Created Jun 22, 2012 — forked from bkutil/deploy.rb
Start and Stop tasks for resque workers and resque scheduler with capistrano deploy hook (without God)
View deploy.rb
after "deploy:symlink", "deploy:restart_workers"
after "deploy:restart_workers", "deploy:restart_scheduler"
##
# Rake helper task.
# http://pastie.org/255489
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/
def run_remote_rake(rake_cmd)
rake_args = ENV['RAKE_ARGS'].to_s.split(',')
@messick
messick / gist:2784581
Created May 24, 2012
cat ~/Library/Logs/Homebrew/config.log | pbcopy
View gist:2784581
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by pango configure 1.30.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --disable-dependency-tracking --disable-debug --prefix=/usr/local/Cellar/pango/1.30.0 --enable-man --with-x --with-html-dir=/usr/local/Cellar/pango/1.30.0/share/doc --disable-introspection
## --------- ##
## Platform. ##
@messick
messick / gist:2784573
Created May 24, 2012
brew doctor 2>&1 | pbcopy
View gist:2784573
Error: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:
brew install pango
Run `brew missing` for more details.
You can’t perform that action at this time.