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
gs -dNOPAUSE -dNOCACHE -dBATCH -sDEVICE=epswrite -sOutputFile=output.eps input.pdf |
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
namespace :parallel do | |
task(:prepare_pg, [:count] => "db:test:prepare") do |t, args| | |
num_processes = ParallelTests.determine_number_of_processes(args[:count]) | |
original_test_env_number = ENV['TEST_ENV_NUMBER'] | |
test_db_name = ActiveRecord::Base.configurations['test']['database'] | |
Postgresql.drop_connections(test_db_name) | |
db = ActiveRecord::Base.connection |
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
#!/usr/bin/env ruby | |
gem 'activesupport' | |
gem 'pivotal-tracker' | |
require 'active_support/core_ext/string' | |
require 'pivotal_tracker' | |
API_TOKEN = "YOUR_API_TOKEN" | |
PROJECT_ID = "YOUR_PROJECT_ID" |
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
def clone_data(src_conn, dest_conn, table_name, options = {}) | |
puts "Cloning #{table_name} data" | |
copyable = if options[:conditions] | |
"(SELECT * FROM #{table_name} WHERE #{options[:conditions]})" | |
else | |
table_name | |
end | |
copy_command = "COPY #{copyable} TO STDOUT" |
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($) { | |
// Monkey patch jQuery-UI 1.8.1 so IE retains scroll position when opening a dialog. | |
var oldDialogOpen = $.ui.dialog.prototype.open; | |
$.ui.dialog.prototype.open = function() { | |
var originalScrollTop = $(window).scrollTop(), | |
result = oldDialogOpen.apply(this, arguments); | |
$(window).scrollTop(originalScrollTop); | |
}; | |
})(jQuery); |