Skip to content

Instantly share code, notes, and snippets.

View toobulkeh's full-sized avatar
🎯
Focusing

Dan Moore toobulkeh

🎯
Focusing
View GitHub Profile
require 'nokogiri'
require 'open-uri'
MARK_FILE = "mark.dat"
MAX_THREADS = 5
def wait_for_threads(threads)
print "Waiting for downloads to finish..."
threads.each { |t| t.join }
puts " ok"
@toobulkeh
toobulkeh / deploy.rb
Created January 2, 2014 02:42 — forked from benedikt/rails.rb
Updated for Capistrano 3.
# encoding: UTF-8
# Place in config/deploy.rb
namespace :rails do
desc "Open the rails console on each of the remote servers"
task :console do
on roles(:app) do |host| #does it for each host, bad.
rails_env = fetch(:stage)
execute_interactively "ruby #{current_path}/script/rails console #{rails_env}"