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
environment 'production' | |
workers 2 | |
threads 2,8 | |
preload_app! | |
stdout_redirect File.join(Dir.pwd, 'log', 'puma.stdout.log'), File.join(Dir.pwd, 'log', 'puma.stderr.log') | |
daemonize true | |
pidfile File.join(Dir.pwd, 'tmp', 'pids', 'puma.pid') |
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
require 'mina/rails' | |
require 'mina/git' | |
require 'mina/rvm' | |
set :application_name, 'hex' | |
set :domain, 'hex.chainresearch.org' | |
set :port, '50022' | |
set :deploy_to, '/var/projects/hex' | |
set :repository, 'ssh://git@gitlab.chainresearch.org:50022/exchange/hex.git' | |
set :branch, 'master' |
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
require 'net/telnet' | |
require 'trollop' | |
opts = Trollop::options do | |
version "meman 0.1 (c) 2013 wuminzhe" | |
banner <<-EOS | |
A script to manage memcached keys | |
Usage: | |
memcache [options] |
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
#!/usr/bin/env ruby | |
require 'net/telnet' | |
cache_dump_limit = 100 | |
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 11211, "Timeout" => 3) | |
slab_ids = [] | |
localhost.cmd("String" => "stats items", "Match" => /^END/) do |c| | |
matches = c.scan(/STAT items:(\d+):/) | |
slab_ids = matches.flatten.uniq | |
end |
NewerOlder