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
function copyIntoClipboard(text) { | |
var flashId = 'flashId-HKxmj5'; | |
/* Replace this with your clipboard.swf location */ | |
//var clipboardSWF = 'http://appengine.bravo9.com/copy-into-clipboard/clipboard.swf'; | |
var clipboardSWF = '/clipboard.swf'; | |
if(!document.getElementById(flashId)) { | |
var div = document.createElement('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
[email protected] | |
RAILS_ENV=production | |
######### Staging Tasks ########## | |
*/10 * * * * cd -P /data/tweety_jobs/staging && RAILS_ENV=staging rake mailer:jobseekers:send_incomplete_signup_notification | |
######### Production Tasks ########## |
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
*.* @b2.tweetyjobs.com | |
# Log all kernel messages to the console. | |
# Logging much else clutters up the screen. | |
#kern.* /dev/console | |
# Log anything (except mail) of level info or higher. | |
# Don't log private authentication messages! | |
*.info;mail.none;authpriv.none;cron.none /var/log/messages |
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 page_description | |
[ | |
page_title, | |
screen_name, | |
resume && resume.qualifications.to_a.to_sentence(:last_word_connector => ', '), | |
"#{last_employer_history.try(:title)} at #{last_employer_history.try(:employer)}", | |
"resume" | |
].compact.join(', ') | |
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
git clone git://github.com/ezmobius/redis-rb.git | |
cd redis-rb/ | |
rake redis:install | |
rake dtach:install | |
rake redis:start & | |
rake install | |
cat <<EOF >>test.rb | |
require 'rubygems' | |
require 'redis' |
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
#!/usr/bin/ruby | |
servers = [:tweety_jobs_01, :tweety_jobs_02,:tweety_jobs_03,:db_master,:db_slave,:batch_01,:batch_02] | |
servers = servers.map(&:to_s).grep( Regexp.new "^" + ARGV[0] ) if ARGV.size == 2 | |
p "Executing #{ARGV[-1].dump} on #{servers.map(&:to_s).join(',')}" | |
servers.each do |server| | |
p ("=" * 10) + server.to_s + ("=" * 10) |
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 "rubygems" | |
require "net/http" | |
require "uri" | |
require "open-uri" | |
require "json" | |
require "nokogiri" | |
require "youtube_g" | |
query = "karel apppel" |
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
<script type='text/javascript'> | |
var default_speed = 100; //ms | |
var current_frame = 0; | |
var frames = [] | |
var stepper; | |
function getImages(){ | |
var img_urls = [] | |
var images = document.images |
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
task :production do | |
role :web, "70.42.333.411:8043" # tweetyjobs [mongrel] [mysql50-5-master] | |
role :app, "70.42.333.411:8043", :mongrel => true | |
role :db , "70.42.333.411:8043", :primary => true | |
role :app, "70.42.333.411:8044", :no_release => true, :mongrel => true | |
set :rails_env, "production" | |
set :environment_database, defer { production_database } | |
set :environment_dbhost, defer { production_dbhost } | |
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 'config/deploy/ferret.rb' | |
set :application, "nooknack" | |
set :rails_env, "ec2" | |
set :repository, "[email protected]:justinvt/nooknack.git" | |
set :branch, "master" | |
role :web, "ec2-12-xx-xx-xx.z-1.compute-1.amazonaws.com" |