Skip to content

Instantly share code, notes, and snippets.

@mheffner
mheffner / gist:c3671966d50d69909af1
Created July 19, 2014 16:26
Base packages for ruby on ubuntu
apt-get -y install ruby git xutils-dev ruby-dev make g++ libssl-dev autoconf libsasl2-dev libmysqlclient-dev scons
@mheffner
mheffner / gist:9dd3edf7f5ebbb629730
Last active August 29, 2015 14:09
raid_ephemeral.sh
#!/bin/bash
#
# this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe
# mounted at /mnt. It should be run early on the first boot of the system.
#
# Beware, This script is NOT fully idempotent.
#
METADATA_URL_BASE="http://169.254.169.254/2012-01-12"
@mheffner
mheffner / measure.sh
Created February 15, 2015 20:14
USB thermometer to Librato measure
#!/bin/bash
# Submit USB thermometer temperature to Librato
#
# Use with: https://github.com/petechap/usb-thermometer
#
#
# FILL OUT:
#
testing
equire 'url)
(re-search-backward "^Location: \\(.*\\)$")
(kill-buffer (current-buffer))))))
(define-key global-map [(control f3)] 'cscope-set-initial-directory)
(re-search-backward "^Location: \\(.*\\)$")
rhel 5.1
--------
10% I/O hit
P: 9668, I: 1000, Min: 9922, Max: 10033, Avg: 9999.77, Dev: 0.0% (2.97), Steal pct: 0.0%
P: 9666, I: 1000, Min: 8993, Max: 11427, Avg: 9999.77, Dev: 0.6% (56.95), Steal pct: 0.0%
P: 9667, I: 1000, Min: 9922, Max: 10022, Avg: 9999.77, Dev: 0.0% (2.83), Steal pct: 0.0%
P: 9668, I: 1000, Min: 7998, Max: 12373, Avg: 10000.14, Dev: 1.0% (98.43), Steal pct: 0.0%
P: 9666, I: 1000, Min: 7299, Max: 12702, Avg: 9999.35, Dev: 1.2% (121.69), Steal pct: 0.0%
P: 9667, I: 1000, Min: 9924, Max: 10032, Avg: 9999.77, Dev: 0.0% (3.17), Steal pct: 0.0%