Skip to content

Instantly share code, notes, and snippets.

View kyleterry's full-sized avatar

Kyle Terry kyleterry

View GitHub Profile
$ cat chef/cookbooks/zumiez-base/recipes/resolver.rb
#
# Cookbook Name:: zumiez-base
# Recipe:: resolver
#
template "/etc/resolvconf/resolv.conf.d/base" do
source "resolver/base.erb"
owner "root"
group "root"
deploy@util1-sea:~/zum_tests$ type cd
cd is a function
cd ()
{
if builtin cd "$@"; then
[[ -n "${rvm_current_rvmrc:-}" && "$*" == "." ]] && rvm_current_rvmrc="" || true;
__rvm_cd_functions_set;
return 0;
else
return $?;
@kyleterry
kyleterry / gist:de507c3d1f45f4a3b753
Created September 26, 2014 07:33
General deploy script
#!/usr/bin/env bash
set -u
set -e
### Non-function Echos and Conditionals
cat <<"HERE"
_____ _ _
| __ \ | | (_)
| | | | ___ _ __ | | ___ _ _ _ _ __ __ _
[ 3645 OK kyle@insomnia:~ ]
$ ab -n 100000 -c 100 http://127.0.0.1:8080/testdb/test
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
[ 3204 ERR 130 kyle@sleepless:~/src/OlegDB ]
[ git:feature/go-frontend ]
$ make liboleg
cc -Wall -Werror -g3 -O2 -Wstrict-aliasing=2 -I./include -c -fPIC c_src/murmur3.c
cc -Wall -Werror -g3 -O2 -Wstrict-aliasing=2 -I./include -c -fPIC c_src/oleg.c
cc -Wall -Werror -g3 -O2 -Wstrict-aliasing=2 -I./include -c -fPIC c_src/logging.c
cc -Wall -Werror -g3 -O2 -Wstrict-aliasing=2 -I./include -c -fPIC c_src/aol.c
cc -Wall -Werror -g3 -O2 -Wstrict-aliasing=2 -I./include -c -fPIC c_src/rehash.c
cc -Wall -Werror -g3 -O2 -Wstrict-aliasing=2 -I./include -c -fPIC c_src/file.c
cc -Wall -Werror -g3 -O2 -Wstrict-aliasing=2 -I./include -c -fPIC c_src/utils.c
[ 3203 OK kyle@sleepless:~/src/OlegDB ]
[ git:feature/go-frontend ]
$ go test ./...
# _/home/kyle/src/OlegDB/frontend/goleg
/usr/bin/ld: cannot find -loleg
/usr/bin/ld: cannot find -loleg
collect2: error: ld returned 1 exit status
- execute /opt/chef-server/bin/chef-server-ctl start erchef
Recipe: chef-server::bootstrap
* execute[verify-system-status] action run
================================================================================
Error executing action `run` on resource 'execute[verify-system-status]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
deploy@util3:~$ for node in web{10..20}; do knife bootstrap ${node} --sudo -x deploy -E production -r 'role[base_spk],role[web_spk]' & done
[1] 12309
[2] 12310
[3] 12311
[4] 12312
[5] 12313
[6] 12314
[7] 12315
[8] 12316
[9] 12317
@kyleterry
kyleterry / gist:e4596d2b3547bc85adde
Created September 3, 2014 04:09
Home router build
Motherboard: http://www.gigabyte.com/products/product-page.aspx?pid=4918#ov
RAM: http://www.amazon.com/Crucial-PC3-12800-204-Pin-Notebook-CT25664BF160B/dp/B005LDLP8W/ref=sr_1_2?s=electronics&ie=UTF8&qid=1409717153&sr=1-2&keywords=2gb+ddr3+sodimm
Hard drive: http://www.amazon.com/gp/product/B008U3038I/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1
Case: http://www.amazon.com/gp/product/B00HWYRYMY/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1
OS: Debian Wheezy
Software: iptables, isc-dhcp*, bind9, openvpn