Skip to content

Instantly share code, notes, and snippets.

View davidbirdsong's full-sized avatar

david birdsong davidbirdsong

  • Bellingham, WA
  • 18:50 (UTC -07:00)
View GitHub Profile
@davidbirdsong
davidbirdsong / inventory_example
Created September 27, 2013 01:23
Inventory objects are easy to use
>>> from pprint import pprint as pr
>>> pr(Inventory('hosts').get_host('svac20').get_variables())
{'coloc': 'sv1',
'domain': 'undef',
'elected': 'undef',
'group_names': ['rack_svac', 'sv1'],
'inventory_hostname': 'svac20',
'inventory_hostname_short': 'svac20',
'os': 'linux',
'server': 'undef',
@davidbirdsong
davidbirdsong / npms
Created September 27, 2013 22:07
epel npm packagse available
nodejs.x86_64 0.10.5-3.el6 @epel
nodejs-abbrev.noarch 1.0.4-4.el6 @epel
nodejs-ansi.noarch 0.1.2-7.el6.1 @epel
nodejs-archy.noarch 0.0.2-7.el6 @epel
nodejs-async.noarch 0.2.6-2.el6 @epel
nodejs-aws-sign.noarch 0.2.0-2.el6 @epel
nodejs-block-stream.noarch 0.0.6-6.el6 @epel
nodejs-boom.noarch 0.4.0-2.el6 @epel
nodejs-chmodr.noarch 0.1.0-3.el6 @epel
nodejs-chownr.noarch 0.0.1-8.el6 @epel
@davidbirdsong
davidbirdsong / gist:7366779
Created November 8, 2013 05:50
ansible-accelerate
Nov 8 05:48:47 svac18 ansible-accelerate: waiting for data
Nov 8 05:48:47 svac18 ansible-accelerate: in recv_data(), waiting for the header
Nov 8 05:48:47 svac18 ansible-accelerate: in recv_data(), got the header, unpacking
Nov 8 05:48:47 svac18 ansible-accelerate: data received so far (expecting 329): 0
Nov 8 05:48:47 svac18 ansible-accelerate: data received so far (expecting 329): 329
Nov 8 05:48:47 svac18 ansible-accelerate: received all of the data, returning
Nov 8 05:48:47 svac18 ansible-accelerate: got data, decrypting
Nov 8 05:48:47 svac18 ansible-accelerate: bad decrypt, skipping...
Nov 8 05:48:47 svac18 ansible-accelerate: encountered an unhandled exception in the handle() function
Nov 8 05:48:47 svac18 ansible-accelerate: error was:#012Traceback (most recent call last):#012 File "/home/david/.ansible/tmp/ansible-1383887931.03-151983451607992/accelerate", line 236, in handle#012NameError: global name 'send_data' is not defined
@davidbirdsong
davidbirdsong / ansible_rpm_err
Created November 23, 2013 07:20
ansible rpm packaging broken
Requires: /usr/bin/env /usr/bin/python python(abi) = 2.6
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/david/src/infra/redhat/BUILDROOT/ansible-1.4-1.el6.x86_64
error: Installed (but unpackaged) file(s) found:
/home/david/.ansible_modules/:/usr/share/ansible/cloud/cloudformation
/home/david/.ansible_modules/:/usr/share/ansible/cloud/digital_ocean
/home/david/.ansible_modules/:/usr/share/ansible/cloud/docker
/home/david/.ansible_modules/:/usr/share/ansible/cloud/ec2
/home/david/.ansible_modules/:/usr/share/ansible/cloud/ec2_ami
/home/david/.ansible_modules/:/usr/share/ansible/cloud/ec2_eip
/home/david/.ansible_modules/:/usr/share/ansible/cloud/ec2_elb
@davidbirdsong
davidbirdsong / bdist_err
Created November 23, 2013 07:23
python setup.py bdist_rpm error
+ python setup.py build
Traceback (most recent call last):
File "setup.py", line 13, in <module>
dirs=os.listdir("./library/")
OSError: [Errno 2] No such file or directory: './library/'
error: Bad exit status from /var/tmp/rpm-tmp.6UD5n2 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.6UD5n2 (%build)
@davidbirdsong
davidbirdsong / ca_bundle
Created December 6, 2013 00:37
no new root certs, many removed
349d320
< ComSign CA
400d370
< NetLock Qualified (Class QA) Root
409d378
< S-TRUST Authentication and Encryption Root CA 2005 PN
416d384
< Sonera Class 1 Root CA
427d394
< SwissSign Platinum CA - G2
@davidbirdsong
davidbirdsong / sysctl_for_tcpcopy
Created December 7, 2013 00:00
output of: sudo sysctl -a | grep net | grep -v ipv6
net.netfilter.nf_log.0 = NONE
net.netfilter.nf_log.1 = NONE
net.netfilter.nf_log.2 = NONE
net.netfilter.nf_log.3 = NONE
net.netfilter.nf_log.4 = NONE
net.netfilter.nf_log.5 = NONE
net.netfilter.nf_log.6 = NONE
net.netfilter.nf_log.7 = NONE
net.netfilter.nf_log.8 = NONE
net.netfilter.nf_log.9 = NONE
@davidbirdsong
davidbirdsong / gozk_fault
Last active December 31, 2015 02:29
fault on null zknode value
getting: /staging/kafka/brokers/topics
unexpected fault address 0xc200200000
fatal error: fault
[signal 0xb code=0x1 addr=0xc200200000 pc=0x42651f]
goroutine 8 [running]:
[fp=0x7fc0e3cf3b18] runtime.throw(0xa6b677)
/usr/lib64/golang/src/pkg/runtime/panic.c:473 +0x67
[fp=0x7fc0e3cf3b30] runtime.sigpanic()
/usr/lib64/golang/src/pkg/runtime/os_linux.c:239 +0xe7
@davidbirdsong
davidbirdsong / hekad_local_clone
Created December 16, 2013 05:23
cmake hack to make hekad work w/ local clones
diff --git a/cmake/externals.cmake b/cmake/externals.cmake
index 78c09f0..05e7a08 100644
--- a/cmake/externals.cmake
+++ b/cmake/externals.cmake
@@ -63,12 +63,19 @@ function(hg_clone url tag)
add_dependencies(GoPackages ${_name})
endfunction(hg_clone)
+function(local_clone ${_url})
+ string(REGEX REPLACE ".*/" "" _name ${url})
@davidbirdsong
davidbirdsong / gist:8258163
Created January 4, 2014 17:55
simple logline regex decoder
[diamond-carbon]
type = "LogfileInput"
logger = "diamond-carbon"
logfile = "/data/log/diamond-archive/archive.log"
parser_type = "regexp"
delimiter = '/^servers.+example\.my\.example\.metric \w+ \w+\n$/'