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 :requeue_failed do | |
| (Resque::Failure.count-1).downto(0).each do |i| | |
| Resque::Failure.requeue(i) | |
| Resque::Failure.remove(i) | |
| end | |
| 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
| sudo kill -9 `ps aux | grep [r]esque | grep -v grep | cut -c 10-16` |
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
| echo `ps aux | grep [r]esque | grep -v grep | cut -c 10-16` |
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 :requeue_failed do | |
| (Resque::Failure.count-1).downto(0).each do |i| | |
| Resque::Failure.requeue(i) | |
| Resque::Failure.remove(i) | |
| end | |
| 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
| rails_env = ENV['RAILS_ENV'] || "production" | |
| rails_root = ENV['RAILS_ROOT'] || "/mnt/data-store/html/gogobot/current" | |
| WORKER_TIMEOUT = 60 * 10 # 10 minutes | |
| # Stale workers | |
| Thread.new do | |
| loop do | |
| begin | |
| `ps -e -o pid,command | grep [r]esque`.split("\n").each do |line| | |
| parts = line.split(' ') |
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
| SELECT * FROM information_schema.`COLUMNS` C WHERE TABLE_SCHEMA = 'your_db_name' and column_name = 'your_column_name' |
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
| gunzip < production.sql.gz | mysql {database_name} --user={user} --password={password} --host={host} |
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
| all_tables=`mysql {database} -B -N --user={user} --password={password} --host={host} -e "SHOW TABLES;"` | |
| exclude_tables=(table_names) | |
| tables=`comm -2 -3 <(echo ${all_tables} | tr ' ' '\n' | sort) <(echo ${exclude_tables[*]} | tr ' ' '\n' | sort)` | |
| mysqldump {database} ${tables} --user={user} --password={password} --host={host} --skip-lock-tables | gzip > production.sql.gz |
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
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| body, html { | |
| height: 100%; | |
| min-height: 100%; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| 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
| /* line 4, ../sass/screen.scss */ | |
| a.button { | |
| display: block; | |
| width: 120px; | |
| height: 35px; | |
| border-radius: 4px; | |
| text-align: center; | |
| line-height: 35px; | |
| text-decoration: none; |