This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sidekiq interaction and startup script | |
commands: | |
create_post_dir: | |
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post" | |
ignoreErrors: true | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
mode: "000755" | |
owner: root | |
group: root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function ($, window) { | |
var intervals = {}; | |
var removeListener = function(selector) { | |
if (intervals[selector]) { | |
window.clearInterval(intervals[selector]); | |
intervals[selector] = null; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jid = 'ff07b7f9897d2472e1a4536c' | |
score = Time.parse('2014-05-29 11:00:00').to_f | |
scheduled_job = Sidekiq::ScheduledSet.new.fetch(score, jid).first | |
failed_job = Sidekiq::Failures::FailureSet.new.fetch(score, jid).first |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# blog post: | |
require 'formtastic/version' | |
# Formtastic sets default input types for ActiveRecord column types. This does | |
# the same for Mongoid field types. | |
module Mongoid::Document | |
FORMTASTIC_2_2 = Formtastic::VERSION[/\A2\.2\.\d\z/] | |
# Map Mongoid field types to either ActiveRecord column types (which |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Git preferences | |
git config push.default current | |
# Some useful git aliases | |
## Basics | |
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.ci commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Returns a hash of all unique values for a given field and the number of objects | |
# in the array which have that value. | |
# ex: | |
# Post.all.uniq_value_counts(:status) | |
# => { | |
# "published" => 10, | |
# "draft" => 13, | |
# "archived" => 34 | |
# } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCAL_MARKET_DISTRIBUTION = [ | |
[4.5, 5.0], | |
[6, 4.5], | |
[8, 4.0], | |
[10.5, 3.5], | |
[13, 3.0], | |
[16, 2.5], | |
[21, 2.0], | |
[17, 1.5], | |
[4, 1.0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if defined?(RSpec) | |
namespace :spec do | |
desc 'Run the acceptance specs in spec/acceptance' | |
task :acceptance => :environment do | |
exec 'rspec spec --tag acceptance' | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html><body style=\"width: 653px; font-family: Arial; font-size: 12px; background-color: #cccccc;\" bgcolor=\"#cccccc\">\n \n \n <OpenTracking />\n \n <table style=\"font-family: Arial; width: 653px; background-color: #ffffff; border: 1px solid #999;\" bgcolor=\"#ffffff\">\n <tr>\n <td style=\"width: 653px;\">\n <a href=\"http://www.dealradar.com/deals/chicago?src=email&utm_source=custom_digest&utm_medium=email&utm_term=header&utm_campaign=chicago\" style=\"color: #027986; text-decoration: none;\"><img alt=\"\" src=\"http://s3.amazonaws.com/dealradar_assets/email_assets/email_header.png\" style=\"border: none;\" border=\"0\" /></a>\n <h1 style=\"margin-top: 15px; margin-left: 20px; margin-bottom: 0px; font-size: 15px; font-family: Arial; color: #027986;\">Local Deals in Chicago - Thursday June 14, 2012</h1>\n <p style=\"font-family: Arial; margin-top: 5px; padding-top: 0px; font-size: 12px; margin-left: 20px; padding-bottom: |