Skip to content

Instantly share code, notes, and snippets.

View bbg-deploy's full-sized avatar

Blue Box Implementations Team bbg-deploy

View GitHub Profile
[root@app10 /]# dig financials.dcs.in.gov @199.91.168.70 -trace
;; Warning, ignoring invalid type race
; <<>> DiG 9.7.3-P3-RedHat-9.7.3-8.P3.el6_2.3 <<>> financials.dcs.in.gov @199.91.168.70 -trace
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 27159
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
before_fork do |server, worker|
# No need for master process to hold a connection
defined?(ActiveRecord::Base) and
ActiveRecord::Base.connection.disconnect!
# Kill off the old master
old_pid = "#{server.pid}.oldbin"
if File.exists?(old_pid) && server.pid != old_pid
begin
Process.kill("QUIT", File.read(old_pid).to_i)
-bash-4.1# hostname
db201.c45063.blueboxgrid.com
-bash-4.1# time ping -c1 app201.c45063.blueboxgrid.com
PING app201.c45063.blueboxgrid.com (67.214.216.163) 56(84) bytes of data.
64 bytes from app201.c45063.blueboxgrid.com (67.214.216.163): icmp_seq=1 ttl=62 time=0.151 ms
--- app201.c45063.blueboxgrid.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.151/0.151/0.151/0.000 ms
@bbg-deploy
bbg-deploy / load.patch
Created September 26, 2013 21:18
load.patch please do not delete
--- a/load.c 2010-10-23 05:36:38.000000000 -0400
+++ b/patchload.c 2011-06-05 08:58:00.000000000 -0400
@@ -40,14 +40,6 @@
VALUE ary;
long i;
- for (i = 0; i < RARRAY_LEN(load_path); ++i) {
- VALUE str = rb_check_string_type(RARRAY_PTR(load_path)[i]);
- if (NIL_P(str) || !rb_is_absolute_path(RSTRING_PTR(str)))
- goto relative_path_found;
[root@ds1103 ~]# hostname
ds1103.blueboxgrid.com
[root@ds1103 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:25:90:a7:ac:f8 brd ff:ff:ff:ff:ff:ff
@bbg-deploy
bbg-deploy / rbenv-custom-ruby-1_9_2.txt
Last active December 20, 2015 14:08
rbenv config please do not delete
build_package_load_patch() {
local package_name="$1"
{
curl https://gist.github.com/bbg-deploy/6720705/raw/54dafcefd3b86cd881bd2c195f4ee7c12287975c/load.patch | patch -p1
autoconf
./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS
make -j 8
make install
} >&4 2>&1
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$HOME/.rbenv/bin
export PATH
eval "$(rbenv init -)"
@bbg-deploy
bbg-deploy / gist:6075612
Created July 24, 2013 23:34
example generic unicorn.rb
# config/unicorn.rb
worker_processes 4
working_directory "/home/deploy/rails_apps/$app/current"
listen "/tmp/unicorn.sock", :backlog => 64
timeout 30
pid "/home/deploy/rails_apps/$app/shared/pids/unicorn.pid"
stderr_path "/home/deploy/rails_apps/$app/shared/log/unicorn.stderr.log"
stdout_path "/home/deploy/rails_apps/$app/shared/log/unicorn.stdout.log"
@bbg-deploy
bbg-deploy / gist:5868436
Created June 26, 2013 15:34
in-depth redis check for monit
if failed host 127.0.0.1 port 6379
send "SET MONIT-TEST value\r\n" expect "OK"
send "EXISTS MONIT-TEST\r\n" expect ":1"
[root@greenfield-SL6 /]# traceroute 199.91.168.103
traceroute to 199.91.168.103 (199.91.168.103), 30 hops max, 60 byte packets
1 ds1055.blueboxgrid.com (67.214.212.141) 0.039 ms 0.012 ms *
2 cr02-v10.tkwl01.bbgrp.net (208.85.151.170) 0.318 ms 0.383 ms 0.442 ms
3 cr1-tuk-t8-2.bb.spectrumnet.us (216.243.26.133) 0.499 ms 0.483 ms 0.527 ms
4 six.above.net (206.81.80.19) 0.450 ms 0.482 ms 0.475 ms
5 xe-1-0-0.mpr2.sea1.us.above.net (64.125.31.14) 0.739 ms 0.767 ms 0.808 ms
6 xe-1-2-0.cr2.ord2.us.above.net (64.125.31.2) 53.117 ms 53.059 ms 53.038 ms
7 xe-2-0-0.cr2.lga5.us.above.net (64.125.24.29) 70.246 ms 70.228 ms 70.218 ms
8 xe-3-2-0.cr2.dca2.us.above.net (64.125.26.109) 74.532 ms 74.528 ms 74.518 ms