Skip to content

Instantly share code, notes, and snippets.

View imbriaco's full-sized avatar

Mark Imbriaco imbriaco

View GitHub Profile
def process_metric(event)
metric_setter = "#{event[:metric]}="
send(metric_setter, event[:value]) if respond_to? metric_setter
end
D, [2011-08-13T22:11:06.310036 #99479] DEBUG -- net.ssh.service.forward[810e839c]: received connection on #<UNIXServer:0x0000010201baf0>
D, [2011-08-13T22:11:06.310289 #99479] DEBUG -- tcpsocket[808a3b28]: queueing packet nr 7 type 90 len 60
D, [2011-08-13T22:11:06.310603 #99479] DEBUG -- tcpsocket[808a3b28]: sent 84 bytes
D, [2011-08-13T22:11:06.337773 #99479] DEBUG -- tcpsocket[808a3b28]: read 52 bytes
D, [2011-08-13T22:11:06.337942 #99479] DEBUG -- tcpsocket[808a3b28]: received packet nr 7 type 91 len 28
I, [2011-08-13T22:11:06.338075 #99479] INFO -- net.ssh.connection.session[810e8518]: channel_open_confirmation: 0 0 2097152 32768
I, [2011-08-13T22:11:06.338156 #99479] INFO -- net.ssh.connection.channel[810df620]: direct channel established
D, [2011-08-13T22:11:09.485092 #99479] DEBUG -- unixsocket[810e23e8]: read 13 bytes
D, [2011-08-13T22:11:09.485237 #99479] DEBUG -- net.ssh.connection.channel[810df620]: read 13 bytes from client, sending over local forwarded connection
D, [2011-08-13T22:11:09.485418
namespace :pending do
desc <<-DESC
Displays the `diff' since your last deploy. This is useful if you want \
to examine what changes are about to be deployed. Note that this might \
not be supported on all SCM's.
DESC
task :diff, :except => { :no_release => true } do
system(source.local.diff(current_revision))
end
% dig www.amazon.com @pdns4.ultradns.org
; <<>> DiG 9.6.0-APPLE-P2 <<>> www.amazon.com @pdns4.ultradns.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5429
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 4, ADDITIONAL: 4
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
erlang - Concurrent, real-time, distributed functional language
erlang-appmon - Erlang/OTP application monitor
erlang-asn1 - Erlang/OTP modules for ASN.1 support
erlang-base - Erlang/OTP virtual machine and base applications
erlang-base-hipe - Erlang/OTP HiPE enabled virtual machine and base applications
erlang-common-test - Erlang/OTP application for automated testing
erlang-corba - Erlang/OTP applications for CORBA support
erlang-crypto - Erlang/OTP cryprographic modules
erlang-debugger - Erlang/OTP application for debugging and testing
erlang-dev - Erlang/OTP development libraries and headers
Bluepill.application("app_name") do |app|
app.process("app_name") do |process|
process.start_command = "cd /u/apps/app_name/current && /usr/local/bin/unicorn_rails -c /u/apps/app_name/current/config/unicorn.conf.rb -E production -D"
process.stop_command = "kill -QUIT `cat /u/apps/app_name/current/tmp/pids/unicorn.pid`"
process.restart = "kill -USR2 `cat /u/apps/app_name/current/tmp/pids/unicorn.pid`"
process.stdout = process.stderr = "/u/apps/app_name/current/log/unicorn.log"
process.pid_file = "/u/apps/app_name/current/tmp/pids/unicorn.pid"
process.checks :mem_usage, :every => 10.seconds, :below => 250.megabytes, :times => [3, 5]
process.uid = "app"
process.gid = "app"
(ido-mode t)
(setq ido-enable-prefix nil
ido-enable-flex-matching t
ido-create-new-buffer 'always
ido-use-filename-at-point t
ido-max-prospects 10)
name 'some-role'
description 'some role that needs some users'
default_attributes :active_groups => { :somegroup => { :enabled => true },
:someothergroup => { :enabled => true } }
class Foo
some_dsl_method :foo => { :key => 'value' },
:bar => { :key => 'bar' }
end
if MACOS_VERSION >= 10.6 or ENV['HOMEBREW_USE_LLVM']
ENV['CC'] = '/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2'
ENV['CXX'] = '/Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2'
cflags = ['-O4'] # O4 baby!
else
ENV['CC']="gcc-4.2"
ENV['CXX']="g++-4.2"
cflags = ['-O3']
end