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
require 'json' | |
response = `aws ec2 describe-volumes --region eu-west-1` | |
parsed_response = JSON.parse response | |
parsed_response["Volumes"].each do |vol| | |
if vol["State"] == "available" | |
`aws ec2 delete-volume --volume-id #{vol["VolumeId"]} --region eu-west-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
brew_install_or_upgrade 'android-sdk' | |
brew_install_or_upgrade 'atlassian-plugin-sdk' | |
brew_install_or_upgrade 'autoconf' | |
brew_install_or_upgrade 'automake' | |
brew_install_or_upgrade 'bash-completion' | |
brew_install_or_upgrade 'boost' | |
brew_install_or_upgrade 'brew-cask' | |
brew_install_or_upgrade 'c-ares' | |
brew_install_or_upgrade 'chromedriver' | |
brew_install_or_upgrade 'cmake' |
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
package logger | |
import ( | |
"net/http" | |
log "github.com/Sirupsen/logrus" | |
) | |
func Log(inner http.Handler, name string) http.Handler { | |
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
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
curl -L http://pkgs.repoforge.org/htop/htop-1.0.2-1.el6.rf.x86_64.rpm -o /tmp/test.rpm && sudo rpm -i /tmp/test.rpm && htop |
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
normal = lambda { |x| x + 1 } | |
stabby = ->(x) { x + 1 } | |
normal.(4) | |
stabby.(4) |
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
cd .. | |
wget http://curl.haxx.se/download/curl-7.41.0.tar.gz | |
tar -xvf curl-7.41.0.tar.gz | |
cd curl-7.41.0 | |
./configure | |
make | |
make install |
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
# Welcome to the InfluxDB configuration file. | |
# If hostname (on the OS) doesn't return a name that can be resolved by the other | |
# systems in the cluster, you'll have to set the hostname to an IP or something | |
# that can be resolved here. | |
# hostname = "" | |
bind-address = "0.0.0.0" | |
[logging] |
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 bash | |
### BEGIN INIT INFO | |
# Provides: influxdb | |
# Required-Start: $all | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start influxdb at boot time | |
### END INIT INFO |
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 | |
echo "stopping elasticsearch" | |
docker kill bbcnews-elasticsearch >/dev/null 2>&1 | |
docker rm bbcnews-elasticsearch >/dev/null 2>&1 | |
echo "stopping carbon" | |
docker kill bbcnews-carbon >/dev/null 2>&1 | |
docker rm bbcnews-carbon >/dev/null 2>&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
require 'sinatra' | |
require 'statsd' | |
$statsd = Statsd.new '192.168.59.103', 8125 | |
get '/' do | |
$statsd.increment 'visits' | |
"Hello, world" | |
end |