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
it "should be working with tests" do | |
Code.should be_tested | |
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
javascript_include_tag "file1", "file2", :cache => "production.js" |
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
Feature: Generate a new Synapse app | |
lorem ipsum else | |
Scenario: Generate a new synapse app | |
Given I have no synapse app "my/new/app" # Test that there are no files/dirs for the app | |
When I generate a synapse app "my/new/app" # Trigger the app build | |
Then I should have the generated files for "my/new/app" # Test that all the files are there, Use an after hook to get rid of them after |
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
Mon Dec 6 21:48:33 [conn6190] query issues_production.delayed_backend_mongoid_jobs ntoreturn:5 scanAndOrder reslen:36 nscanned:98618 { $query: { run_at: { $lte: new Date(1291672113000) }, failed_at: null, locked_by: "delayed_job host:webby4139 pid:4791" }, $orderby: { priority: 1, run_at: 1 } } nreturned:0 178ms | |
Mon Dec 6 21:48:36 [conn6190] query issues_production.delayed_backend_mongoid_jobs ntoreturn:5 scanAndOrder reslen:801 nscanned:98618 { $query: { run_at: { $lte: new Date(1291672113000) }, failed_at: null, $where: "this.locked_at == null || this.locked_at < new Date(1291657713266.2422)" }, $orderby: { priority: 1, run_at: 1 } } nreturned:5 3385ms | |
Mon Dec 6 21:48:39 [conn6190] query issues_production.delayed_backend_mongoid_jobs ntoreturn:5 scanAndOrder reslen:36 nscanned:98618 { $query: { run_at: { $lte: new Date(1291672119000) }, failed_at: null, locked_by: "delayed_job host:webby4139 pid:4791" }, $orderby: { priority: 1, run_at: 1 } } nreturned:0 181ms | |
Mon Dec 6 21:48:42 [conn6190] query i |
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
.input | |
= f.text_area :body | |
= f.hidden_field :commented_by, :value => current_user.email |
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
class KlassB | |
def do_something | |
save | |
send email or some such thing | |
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
⚡ rake spec | |
rake aborted! | |
dlsym(0x1027f1510, Init_libxml_ruby): symbol not found - /Users/chris/.rvm/gems/ruby-1.8.7-p330/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle |
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
## This is just mangled out of the resque repo | |
check process resque with pidfile /path/to/pidfile.pid | |
start program = "/bin/sh -c 'cd /path/to/app/current; /usr/bin/env RAILS_ENV=production /usr/bin/env QUEUE="*" VERBOSE=1 /usr/bin/rake environment resque:work & > log/resque.log && echo $! > tmp/pids/resque.pid'" as uid rails and gid rails | |
stop program = "/bin/sh -c 'cd /path/to/app/current && kill -s QUIT `cat tmp/pids/resque.pid` && rm -f tmp/pids/resque.pid; exit 0;'" | |
if totalmem is greater than 100 MB for 10 cycles then restart # eating up memory? | |
group resque_workers |
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
# Postgres backup script | |
# mynameisrufus | |
# | |
# Cron tab examples: | |
# | |
# daily keeping the last 5 days (run at 1:00AM, 2 minutes after the hour) | |
# | |
# 02 1 * * * postgres /script/db_backup.sh daily /var/backups/db $DATABASE_OWNER 5 >> /var/backups/db/backup.log 2>&1 | |
# | |
# |
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
Before do | |
Capybara.default_host = 'example.com' | |
DatabaseCleaner.start | |
end | |
After do | |
DatabaseCleaner.clean | |
FileUtils.rm_r(Dir.glob("#{Rails.root}/tmp/uploads/*")) | |
FileUtils.rm_r(Dir.glob("#{Rails.root}/uploads/test*")) | |
FileUtils.rm_r(Dir.glob("#{Rails.root}/public/uploads/tmp/*")) |