Skip to content

Instantly share code, notes, and snippets.

@robhurring
robhurring / Rakefile
Created December 7, 2010 20:09
Delayed Job with Sinatra -- without sinatra specific gems, etc.
task :environment do
require './dj-sinatra'
end
namespace :jobs do
desc "Clear the delayed_job queue."
task :clear => :environment do
Delayed::Job.delete_all
end
@rbrooks
rbrooks / gh_to_pt.rb
Created May 15, 2012 18:20
Migrate GitHub Issues to Pivotal Tracker
#!/usr/bin/env ruby
# Author: Russ Brooks, TelVue Corporation (www.telvue.com)
# Description: Migrates GitHub Issues to Pivotal Tracker.
# Dependencies: Ruby 1.9.2+
# GitHub API gem: https://github.com/peter-murach/github
# Pivtal Tracker gem: https://github.com/jsmestad/pivotal-tracker
# 1. Change the constants below accordingly for your project.
# 2. Change the options in list_repo() method for your GitHub project.
# 3. Change the options in stories.create() method accordingly.
@meineerde
meineerde / gist:4754693
Last active December 12, 2015 09:49
This fails only on Psych. On Syck, it works fine.
require 'yaml'
str = <<-EOF
- foo
2012-06-04 12:02:16.979
EOF
str.to_yaml
#
# TypeError: can't convert nil into Integer
# from /Users/hjust/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/psych/scalar_scanner.rb:111:in `utc'