This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FULLNAME=`finger "$USER" | awk -F: '{ print $3 }' | head -n1 | sed 's/^ //'` | |
# Git needs to know who you are! | |
git config --global user.name "${FULLNAME}" | |
git config --global user.email "${USER}@newrelic.com" | |
# SVN style shortcuts | |
git config --global alias.st status | |
git config --global alias.ci commit | |
git config --global alias.co checkout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ssh-agent needs to be running and we need to export the SSH_AUTH_SOCK | |
# environment variable to point to its location in /tmp/ssh-something/agent.PID | |
# so, find the ssh-agent PID and derive the socket filename from it, and then | |
# find that file in its randomly-named directory in /tmp and export that for | |
# ssh to use. | |
set -x | |
SSH_AGENT_PID=`pgrep -n -u $USER ssh-agent` | |
if [ -n "$SSH_AGENT_PID" ]; then | |
guessed_ppid=`expr $SSH_AGENT_PID - 1` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ls -l --time-style="+%Y-%m-%d" *.?.gz | awk '{ print $7,$6 }' | \ | |
while read line; do | |
set -- $line | |
original=$1 | |
datestamp=$2 | |
filebase=`echo $original | rev | cut -f3- -d. | rev` | |
/bin/mv -vu $original $filebase.$datestamp.gz | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df ; echo ; pvs | |
vgchange --available n VolGroupBackUps | |
multipath -ll | |
multipath -f mpath2 | |
/etc/init.d/multipathd stop | |
chkconfig multipathd off | |
iscsiadm -m node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
wget -O /etc/apt/sources.list https://gist.github.com/benders/8426266/raw/b4969acb524ba727b64cf8eaee7a6a31be8ae6fb/precise-sources.list | |
apt-get update | |
wget -O /tmp/pe3-install.sh https://gist.github.com/benders/8426266/raw/b1d4c9b6ea41839b74842f05f2ae9efba7a10394/ubuntu-pe-3-install.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FastLED.h> | |
#include <MicroView.h> | |
#include <RBD_Timer.h> | |
#include <RBD_Button.h> | |
FASTLED_USING_NAMESPACE | |
// FastLED "100-lines-of-code" demo reel, showing just a few | |
// of the kinds of animation patterns you can quickly and easily | |
// compose using FastLED. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
count(*) as count, priority, object, method from ( | |
SELECT | |
@load_start := LOCATE('object: LOAD;', handler), | |
@method_start := LOCATE('method: ', handler) + 9, | |
@method_end := LOCATE('args:', handler) - 1, | |
IF(@load_start, | |
@object_start := @load_start + 13, | |
@object_start := LOCATE('object: !ruby/object:', handler) + 21 | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Oh ho ho, let's see if we can have some fun with the Ruby Agent - Nic 2013-10-18 | |
require 'rubygems' | |
require 'newrelic_rpm' | |
require 'new_relic/agent/instrumentation/rack' | |
# END monkey-business | |
# A "config.ru", for use with every Rack-compatible webserver. | |
# SSL needs to be handled outside this, though. | |
$0 = "master" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Repair Homebrew permissions | |
sudo chmod g+w /usr/local/ | |
Put Chrome and Firefox on dock | |
Download and Install | |
TextMate | |
GitX | |
Run TextMate and setup terminal helper in /usr/local/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'zlib' | |
print Zlib::Inflate.new.inflate($<.read) |