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 | |
for host in *; do NAME=`echo $host | cut -f1 -d.`; DOMAIN=`echo $host | cut -f2 -d.`; IPMI="$NAME.ipmi.$DOMAIN.resonatedigital.net"; IP=`host $IPMI | cut -f4 -d' '`; if [ "$IP" != "found:" ]; then cat TEMPLATE.cfg | sed -e "s:NAME:$NAME.ipmi.$DOMAIN:" -e "s:IPADDRESS:$IP:" -e 's:rsnt_iad_linux_physical_hadoop:rsnt_iad_oob_ipmi:' -e 's:generic-rsnt-iad-linux-host:generic-rsnt-iad-host:' | grep -v 'register' > ../../../oob/ipmi/$NAME.ipmi.$DOMAIN.cfg; fi; 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
# Do no try this at home kids | |
dpkg -l | grep -E 'linux-(image|headers)' | grep -v $(uname -r|sed 's:-generic::g') | awk '{print $2}' | xargs apt-get -y remove |
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
seq 25 | xargs -P25 -I{} zsh -c "http get https://api.github.com/user/starred\?per_page\=100\&page\={} | jq -r '.[]|[.pushed_at,.stargazers_count,.language,.html_url,.description]|@csv' &" | sort -Vu > /tmp/stars.csv |
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
def pig(string): | |
return ' '.join(map(lambda x: x + 'ay' if x in 'aeiou' else x[1:] + x[:1] + 'ay', string.split())) |
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 "Install the necessary tools" | |
sudo apt-get -y install make flex bison libtool libevent-dev automake pkg-config libssl-dev libboost-all-dev libbz2-dev build-essential g++ python-dev git | |
echo "git cloning Thrift" | |
git clone https://github.com/apache/thrift.git | |
pushd thrift |
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 | |
# Exit on error | |
set -e | |
# Logging utility | |
log() { | |
# Escape codes for colored output | |
C_GREEN="\033[32m" | |
C_NORMAL="\033[0m" | |
C_RED="\033[31m" |
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
variable "aws_access_key" {} | |
variable "aws_secret_key" {} | |
provider "aws" { | |
access_key = "${var.aws_access_key}" | |
secret_key = "${var.aws_secret_key}" | |
region = "us-east-1" | |
} | |
resource "aws_vpc" "terraform-testing" { |
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
import json | |
import re | |
import subprocess | |
def get_data(): | |
patt = re.compile("[^\s]+") | |
p = subprocess.Popen(['consul', 'members', '-detailed'], shell=False, stdout=subprocess.PIPE) | |
d, _ = p.communicate() |
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
2015/07/07 17:56:59 [INFO] Terraform version: 0.6.0 dev e19304a783bda4babd381a8459ecc5de06476e22+CHANGES | |
2015/07/07 17:56:59 Detected home directory from env var: /home/vagrant | |
2015/07/07 17:56:59 [DEBUG] Discovered plugin: atlas = /opt/gopath/src/github.com/hashicorp/terraform/bin/terraform-provider-atlas | |
2015/07/07 17:56:59 [DEBUG] Discovered plugin: aws = /opt/gopath/src/github.com/hashicorp/terraform/bin/terraform-provider-aws | |
2015/07/07 17:56:59 [DEBUG] Discovered plugin: azure = /opt/gopath/src/github.com/hashicorp/terraform/bin/terraform-provider-azure | |
2015/07/07 17:56:59 [DEBUG] Discovered plugin: cloudflare = /opt/gopath/src/github.com/hashicorp/terraform/bin/terraform-provider-cloudflare | |
2015/07/07 17:56:59 [DEBUG] Discovered plugin: cloudstack = /opt/gopath/src/github.com/hashicorp/terraform/bin/terraform-provider-cloudstack | |
2015/07/07 17:56:59 [DEBUG] Discovered plugin: consul = /opt/gopath/src/github.com/hashicorp/terraform/bin/terraform-provider-consul | |
2015/07/07 17:56:59 [DEBUG] Discovered plug |
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 'formula' | |
class CBTerraform < Formula | |
desc "Chartboost monkey-patched Terraform with the aws_route resource" | |
homepage "https://terraform.io" | |
url "https://s3.amazonaws.com/chartboost/ops/tools/terraform_0.6.1-dev_dawrin_amd64.tar.gz" | |
sha256 "eead54352cd136c90e1780d496e3a0dfbd89ab5f9283f4d4e8c2808a39aad836" | |
head "https://github.com/gkze/terraform.git", :branch => "master" | |
end |
OlderNewer