This file contains hidden or 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
def failed(job) | |
begin | |
if job.payload_object.respond_to? :on_permanent_failure | |
say "Running on_permanent_failure hook" | |
job.payload_object.on_permanent_failure | |
end | |
rescue DeserializationError | |
# do nothing | |
end | |
This file contains hidden or 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
def failed(job) | |
begin | |
if job.payload_object.respond_to? :on_permanent_failure | |
say "Running on_permanent_failure hook" | |
job.payload_object.on_permanent_failure | |
end | |
rescue DeserializationError | |
# do nothing | |
end | |
This file contains hidden or 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
require 'youtube_it' | |
module Says | |
class Youtube | |
attr_accessor :video, :vid, :client | |
def initialize(url=nil, username=nil, password=nil, dev_key=nil) | |
@url = url | |
@username = username | |
@password = password | |
@dev_key = dev_key |
This file contains hidden or 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
// Place all the behaviors and hooks related to the matching controller here. | |
// All this logic will automatically be available in application.js. | |
//= require underscore | |
//= require backbone | |
// TODO: move this out | |
$.fn.serializeObject = function() { | |
var o = {}; | |
var a = this.serializeArray(); |
This file contains hidden or 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
# Sample verbose configuration file for Unicorn (not Rack) | |
# | |
# This configuration file documents many features of Unicorn | |
# that may not be needed for some applications. See | |
# http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb | |
# for a much simpler configuration file. | |
# | |
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete | |
# documentation. |
This file contains hidden or 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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: says-dot-com-production | |
# Required-Start: $all | |
# Required-Stop: $network $local_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start the says-dot-com-production unicorns at boot | |
# Description: Enable says-dot-com-staging at boot time. | |
### END INIT INFO |
This file contains hidden or 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
<div class="post card laidout" data-postid="2416174" id="post_2416174" style="top: 0px; left: 261px; width: 250px; height: 192px; "> <div class="photo" style="width: 250px; height: 162px; "> | |
<img class="needs-center-letterbox lazy-loaded center-letterboxed" data-lazy-src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/314433_10150264072250981_567335980_8068159_6857977_n.jpg" src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/314433_10150264072250981_567335980_8068159_6857977_n.jpg" alt="" data-height="540" data-width="720" style="height: auto; width: 250px; margin-left: 0px; margin-top: -9px; opacity: 1; "> | |
<div class="enlarge-overlay overlay fade-in" style="width: 250px; height: 162px; display: none; "></div> | |
</div> | |
</div> |
This file contains hidden or 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
Bluepill.application("says", :log_file => "/var/www/says-dot-com-staging/current/log/bluepill.log") do |app| | |
app.process("delayed_job") do |process| | |
process.working_dir = "/var/www/says-dot-com-staging/current" | |
process.stdout = process.stderr = "/var/www/says-dot-com-staging/current/log/delayed_job.log" | |
process.start_grace_time = 60.seconds | |
process.stop_grace_time = 60.seconds | |
process.restart_grace_time = 60.seconds | |
process.start_command = "/usr/bin/env RAILS_ENV=staging bundle exec script/delayed_job start --db=us --pid-dir=/var/www/says-dot-com-staging/shared/pids --prefix staging" |
This file contains hidden or 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
Loading development environment (Rails 3.1.1) | |
:001 > user = User.create(:name => "user1") | |
(0.5ms) BEGIN | |
SQL (9.7ms) INSERT INTO `users` (`created_at`, `name`, `updated_at`) VALUES ('2011-11-01 05:35:51', 'user1', '2011-11-01 05:35:51') | |
(0.5ms) COMMIT | |
=> #<User id: 2, name: "user1", created_at: "2011-11-01 05:35:51", updated_at: "2011-11-01 05:35:51"> | |
:002 > story1 = Story.create(:title => "title1") | |
=> #<Story _id: BSON::ObjectId('4eaf85562ab0f56c6e000001'), title: "title1"> | |
:003 > story2 = Story.create(:title => "title2", :featured => true) | |
=> #<Story _id: BSON::ObjectId('4eaf85762ab0f56c6e000003'), featured: true, title: "title2"> |
This file contains hidden or 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
rake, version 0.9.2.2 |
OlderNewer