Skip to content

Instantly share code, notes, and snippets.

View apinstein's full-sized avatar

Alan Pinstein apinstein

  • Atlanta, GA
View GitHub Profile
"Hostnames (A Records)
Hostname IP Address
ns2.tourbuzz.net 174.129.10.139
stl.tourbuzz.net 209.135.134.188
www0.us-east-1a.aws.tourbuzz.net 54.243.211.209
*.tourbuzz.net 54.243.211.209
staging.tourbuzz.net 54.243.60.216
db0.us-east-1a.aws.tourbuzz.net 54.243.212.52
readonly.us-east-1b.aws.tourbuzz.net 23.20.74.23
tour.tourbuzz.net 54.243.211.209
apache 2.2.22 upgrade
rpm --import http://yum.jasonlitka.com/RPM-GPG-KEY-jlitka
# into /etc/yum.repos.d/utterramblings.repo
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://yum.jasonlitka.com/EL$releasever/$basearch/
enabled=1
gpgcheck=1
@apinstein
apinstein / gist:5749468
Last active December 18, 2015 07:49
comcast performance issue 6/10/2013 @ 11AM EST plugged directly into cable modem
Cannot get to certainm parts of the internet...
google.com = bad
yahoo.com = good
My traceroute [v0.82]
Alan-Pinsteins-MacBook-Pro.local (0.0.0.0) Wed Jul 10 09:37:35 2013
Keys: Help Display mode Restart statistics Order of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
; Enable xdebug extension module
zend_extension=/usr/lib64/php/modules/xdebug.so
xdebug.remote_enable = true
xdebug.remote_host = 127.0.0.1
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
; To generate TRACES of script execution; see http://www.xdebug.org/docs/execution_trace
; this will happen ALWAYS (or set to 0 and use xdebug_start_trace; sadly no XDEBUG_XXX method to enable this via URL)
;xdebug.auto_trace=1
@apinstein
apinstein / gist:5528179
Created May 6, 2013 21:03
how to configure a raspberry pi for wpa2 personal wifi
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
# disable the manual setup
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
in file.scss:
@import "tourbuzz-layout-images/*.png";
@include all-tourbuzz-layout-images-sprites;
...
@media screen and (max-width: 1023px) {
...
.main-nav-toggle { @include tourbuzz-layout-images-sprite(main-nav-toggle); }
}
generates err:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial timeout="15">404-461-9639</Dial>
<Say>Hello, you have reached Tourbuzz. Please leave us a message and we will get back to you as soon as possible.</Say>
<Record transcribe="true" transcribeCallback="http://twimlets.com/[email protected]"/>
</Response>
@apinstein
apinstein / shef tips
Last active December 16, 2015 08:09
Using shef (with chef-solo) to debug chef runs
# from inside a "chef-managed" instance (in this case, vagrant)
sudo shef -s -j /tmp/vagrant-chef-1/dna.json -c /tmp/vagrant-chef-1/solo.rb
=> will have nothing in the run list, but all cookbooks loaded.
=> http://stevendanna.github.com/blog/2012/01/28/shef-debugging-tips-1/
# add recipe from source
load_recipe "apache2::mod_fastcgi"
# run chef...
run_chef
@apinstein
apinstein / gist:5264406
Created March 28, 2013 16:02
Emergency devops
# manually ban IP's (to a named iptables chain)
iptables -nL
iptables -A fail2ban-apache-badbots -p all -s 74.117.180.16 -j DROP
# just a png
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
96.99 35.865105 18768 1911 256 futex
0.55 0.203601 461 442 poll
0.53 0.197358 49 3990 gettimeofday
0.46 0.171303 10706 16 select
0.24 0.088853 100 890 semop
0.24 0.087636 198 443 writev
0.20 0.072347 164 441 times