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/sh | |
rm -rf /var/lib/cloud/sem/* /var/lib/cloud/instance /var/lib/cloud/instances/* | |
cloud-init start 2>&1 > /dev/null | |
cloud-init-cfg all final |
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
# enable the plugin | |
workflow enable drybuckets auto-melt | |
# farming | |
workflow amount FOOD 120 30 | |
workflow amount DRINK 300 50 | |
workflow amount THREAD//GRASS_TAIL_PIG:THREAD 30 20 | |
workflow count LIQUID_MISC//POD_SWEET:EXTRACT 20 10 | |
# storage |
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/sh | |
# Simplified from this script, (less robust and more to the point): | |
# http://gmodarelli.com/2015/02/code-reviews-rubocop-git-pre-commit/ | |
# Installation: copy this code into <REPO>.git/hooks/pre-commit.sh | |
# Select only staged Ruby files | |
FILES="$(git diff --cached --name-only --diff-filter=AMC | grep "\.rb$" | tr '\n' ' ')" |
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
# iops | |
resource "aws_db_instance" "rds" { | |
identifier = "${var.identifier}" | |
allocated_storage = "${var.allocated_storage}" | |
iops = "${var.iops}" | |
engine = "${var.engine}" | |
engine_version = "${var.engine_version}" | |
instance_class = "${var.instance_class}" | |
name = "${var.db_name}" | |
username = "${var.db_username}" |
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 | |
wget https://github.com/gravitational/teleport/releases/download/v0.2.0-beta.1/teleport-v0.2.0-beta.1-linux-amd64-bin.tar.gz | |
tar -xvzf teleport-v0.2.0-beta.1-linux-amd64-bin.tar.gz | |
cd teleport | |
sudo mkdir -p /opt/bin /opt/teleport | |
sudo cp -af build/* /opt/bin/ | |
sudo cp -fr src/github.com/gravitational/teleport/web/dist/* /opt/teleport/ |
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
# stacktrace java as one message | |
multiline { | |
#type => "all" # no type means for all inputs | |
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)" | |
what => "previous" | |
} | |
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
from checks import AgentCheck | |
class LinuxEntropyCheck(AgentCheck): | |
def check(self, instance): | |
with open('/proc/sys/kernel/random/entropy_avail', 'r') as procfile: | |
data = procfile.read().strip() | |
self.gauge('system.kernel.entropy_available', int(data)) |
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
FROM debian:jessie | |
RUN apt-get update \ | |
&& apt-get install -y python-pip \ | |
&& pip install --upgrade pip flask | |
COPY ./server.py /server.py | |
EXPOSE 5000 | |
ENV FLASK_APP=server.py |
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
# Content of the file /etc/logstash/conf.d/squid.conf | |
# Squid logs MAC address of the source host | |
# Logs are sending by syslog-ng raw without standard log headers | |
input { | |
tcp { | |
host => "xxx.xxx.xxx.xxx" | |
port => xxxx | |
type => SQUID | |
tags => [SQUID] |
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
# using rvm with ruby-1.8.7-p249 | |
# latest version 2.7.7 2010-06-17 | |
brew install libxml2 | |
# installing libxslt from source code | |
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz | |
tar xvfz libxslt-1.1.26.tar.gz | |
cd libxslt-1.1.26 | |
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.7 |