Skip to content

Instantly share code, notes, and snippets.

Subject: You are not following the rules of the Sydney DevOps Meetup group
Hi James,
I'm dropping you a note to let you know that this post:
http://www.meetup.com/devops-sydney/messages/boards/thread/29390522
Is currently in contravention of the Sydney DevOps Meetup group rules around posting from recruiters:
http://www.meetup.com/devops-sydney/about/
partition "raw" do
raw <<-RAW
####################
# policy #
####################
iptables --policy INPUT DROP
iptables --policy FORWARD DROP
iptables --policy OUTPUT ACCEPT
iptables --table mangle --policy PREROUTING ACCEPT
iptables --table mangle --policy OUTPUT ACCEPT
hbase
=====
# dependencies
sudo aptitude install -y python-software-properties
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo aptitude install -y sun-java6-jre sun-java6-plugin sun-java6-fonts sun-java6-jdk
# install hbase
wget http://www.apache.org/dist/hbase/hbase-0.90.3/hbase-0.90.3.tar.gz
def rrd_update(pdp)
archives.each do |archive|
consolidated_data_point = archive.downsample(pdp)
archive.update(consolidated_data_point)
end
end
primary_data_point = {:time => 1231551425, :value => 42}
rrd_update(primary_data_point)
# For easier parsing of command line arguments in cap
def get_argument(parameter, opts={})
default = opts[:default] || false
result = ENV[parameter.downcase] || ENV[parameter.upcase] or return default
trues, falses = %w(y yes t true), %w(n no f false)
if (trues + falses).include?(result.downcase)
result = false if falses.include?(result.downcase)
result = true if trues.include?(result.downcase)
~ ➔ mtr --report --report-wide www.fastly.com
HOST: pugilist.local Loss% Snt Last Avg Best Wrst StDev
1.|-- 192.168.1.1 0.0% 10 2.1 1.5 0.8 3.6 1.0
2.|-- nexthop.nsw.iinet.net.au 0.0% 10 354.1 353.8 336.6 367.3 9.4
3.|-- te1-1.syd-mas-bdr2.iinet.net.au 0.0% 10 376.2 361.9 350.4 376.2 9.4
4.|-- po3-100.syd-mas-bdr1.on.ii.net 0.0% 10 374.4 359.2 335.6 374.4 12.2
5.|-- ae2.syd-mas-core1.on.ii.net 0.0% 10 382.1 363.9 344.6 428.1 24.7
6.|-- xe-7-0-9-10.br1.syd4.on.ii.net 0.0% 10 377.4 396.6 353.2 505.4 58.7
| `|-- 203.16.213.65
7.|-- ae0.br1.syd7.on.ii.net 0.0% 10 548.5 537.0 517.1 551.6 12.5
bp@bpvest-dvmh-maint-01:~$ mtr --report --report-wide www.fastly.com
HOST: bpvest-dvmh-maint-01 Loss% Snt Last Avg Best Wrst StDev
1. 10.1.23.0-24-gw.inf.bulletproof.net 0.0% 10 0.6 7.8 0.6 43.7 13.2
2. v90.b3fw-01.inf.bulletproof.net 0.0% 10 0.2 0.2 0.1 0.3 0.0
3. vl41-0.ds03.syd07.aunsw.bltprf.net 0.0% 10 0.5 0.6 0.4 1.1 0.2
4. Ten0-0-0-0-8.bdr04.syd07.aunsw.bltprf.net 0.0% 10 2.7 2.3 1.0 3.6 1.0
5. Ten0-0-0-0-8.bdr03.syd07.aunsw.bltprf.net 0.0% 10 1.1 2.0 1.1 4.8 1.3
6. ten-0-0-0-905.bdr02.syd01.nsw.VOCUS.net.au 0.0% 10 0.7 0.8 0.6 1.2 0.2
7. ten-0-2-0-0.cor03.syd03.nsw.VOCUS.net.au 0.0% 10 24.3 24.4 24.2 24.6 0.1
8. ten-0-1-0-1.cor01.alb01.akl.VOCUS.net.nz 0.0% 10 24.7 24.8 24.5 25.2 0.2
options = OpenStruct.new
# do some real cli option parsing here, but for example's sake:
options.warning = 10
options.critical = 15
# load plugin
threshold :warning => options.warning, :critical => options.critical do
longterm.last
end
@auxesis
auxesis / gist:5706084
Last active December 18, 2015 01:48
Hadoop build instructions for Ubuntu
sudo aptitude install -y maven ant protobuf-compiler libprotobuf-java libprotobuf-dev subversion liblzo2-dev libsnappy-dev libsnappy1 cmake build-essential zlib1g-dev libssl-dev
git clone https://github.com/apache/hadoop-common/
cd hadoop-common
git branch --track branch-2.0.3-alpha origin/branch-2.0.3-alpha
git checkout branch-2.0.3-alpha
mvn package -Pdist,native -DskipTests -Dtar
# Tarball will be created under hadoop-dist/