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
/opt/redis/bin/redis-cli save | |
sudo s3cmd put /redis/dump.rdb s3://elastic-cache-snapshots | |
echo "I AM AMAZING" |
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
tail -f /var/log/app/current |grep ip-11-26-26-121|grep total=|ruby -ane 'p $F.grep(/total/)' |
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
sudo sed -n -i 's/pool\: [0-9]/pool\: '$SIZE'/g' /opt/app/config/database.yml |
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
if dpkg-query -W mysql-client &> /dev/null; then | |
echo "INSTALLED" | |
else | |
echo "NOT INSTALLED" | |
fi |
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
require 'sinatra' | |
require 'omniauth' | |
# A small Sinatra app that can be used to catch a service provider | |
# callback (e. g. from Facebook, Twitter or Google) using OmniAuth. | |
# It can be mounted in the routes. This Sinatra app can be useful | |
# if you have a Rails API app without any cookies / sessions. | |
# | |
# Examples | |
# |
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
# Check for xterm_clipboard support | |
vim --version | |
# Get the compile-dependencies of vim | |
sudo apt-get build-dep vim | |
# If you haven't got mercurial, get it | |
sudo apt-get install mercurial | |
# Get the source |
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
Redis::Client#process | |
Redis::Client#logging | |
Redis::Client#ensure_connected | |
Redis::Client#connected? | |
Redis::Connection::Ruby#connected? <0.000003> | |
Redis::Client#connected? <0.000010> | |
Process.pid <0.000004> | |
Array#each | |
Array#first <0.000003> | |
Redis::Client#write |
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
GIT | |
remote: git://github.com/softa/activerecord-postgres-hstore.git | |
revision: a211841295882aa3e2c267750037b8bc58da5546 | |
ref: a211841295882aa3e2c267750037b8bc58da5546 | |
specs: | |
activerecord-postgres-hstore (0.4.0) | |
pg | |
rails | |
rake |
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
require 'bcrypt' | |
silence_warnings do | |
BCrypt::Engine::DEFAULT_COST = BCrypt::Engine::MIN_COST | |
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
# Public: This class contains methods for deferred garbage collection which | |
# improves the time consumption of integration and unit tests. | |
class DeferredGarbageCollection | |
# Public: The time threshold used by the deferred garbage collection. It's | |
# either set as an environment variable or defaults to 5 seconds. | |
GC_THRESHOLD = (ENV['DEFER_GC'] || 5.0).to_f | |
# Public: The last time the GC has run. | |
@@last_gc_run = Time.now |