Skip to content

Instantly share code, notes, and snippets.

{
picksheet: {
id: 77777
state: "picked"
picksheet_batch_id: 15
},
bag_required: true / false,
error: ""
}
[{
"id":1,
"email":"jon.smith@example.com",
"name":"Jon Smith",
"pin_number":"0000",
"roles":"worker,admin,reporting",
"state":"active"
},{
"id":2,
"email":"frank.joe@example.com",
{
"id":1,
"created_at":"2012-06-24T15:17:44Z",
"email":"jon.smith@example.com",
"mongo_id":"4f830177a491c85627000001",
"name":"Jon Smith",
"pin_number":"0000",
"roles":"worker,admin,reporting",
"state":"active",
"updated_at":"2012-06-24T15:17:44Z"
@chrishomer
chrishomer / developer_trail_maps.md
Created March 28, 2012 21:02 — forked from croaky/developer_trail_maps.md
A trail map shows different paths someone can take. Everyone starts at different places and wants to go different places. Pick the ones that make sense for you.

Structure

  • Have a breakable toy side Rails project. It anchors your learning. Apply new skills/techniques here.
  • Put the code in Github. Give mentors access to the project. They'll review your code.
  • Understand the code review process and other style guidelines.
  • Deploy your breakable toy to Heroku.
  • Set learning goals weekly (e.g. X chapters of the Pickaxe, X Railscasts/week).
  • Keep a text document (using vim) to record interesting commands/concepts/things you've learned.
  • Review the text document daily for comprehension.
@chrishomer
chrishomer / .gitignore
Created March 4, 2012 20:12 — forked from atty303/.gitignore
Initial gitignore for iOS project.
# xcode noise
build/*
*.perspective
*.perspectivev3
*.pbxuser
*.xcworkspace
*.mode1
*.mode2v3
*.mode1v3
xcuserdata
@chrishomer
chrishomer / ec2-ebs-instance-resize.sh
Created October 17, 2011 18:05
Resizing an instance backed by an EBS drive on ec2
# IMPORTANT: On your machine, with the ec2 instance running
# Basic Config variables
instanceid=<instance-id>
size=50
#Get the root EBS volume id and availability zone for this instance:
oldvolumeid=$(ec2-describe-instances $instanceid |
egrep "^BLOCKDEVICE./dev/sda1" | cut -f3)
zone=$(ec2-describe-instances $instanceid | egrep ^INSTANCE | cut -f12)
echo "instance $instanceid in $zone with original volume $oldvolumeid"
class Delayed::Worker
alias_method :original_handle_failed_job, :handle_failed_job
def handle_failed_job(job, error)
HoptoadNotifier.notify(error,{:parameters => {:job => job.attributes}})
if Rails.env.test?
ap "FAILED DELAYED JOB"
ap job
ap error
ap error.backtrace
class Delayed::Worker
alias_method :original_handle_failed_job, :handle_failed_job
def handle_failed_job(job, error)
HoptoadNotifier.notify(error)
original_handle_failed_job(job, error)
end
end
Spork.prefork do
if Spork.using_spork?
require "thinking_sphinx"
Spork.trap_method(ThinkingSphinx::Context, :load_models)
end
...
end
Spork.prefork do
require "thinking_sphinx"
Spork.trap_method(ThinkingSphinx::Context, :load_models)
...
end