This file contains hidden or 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 python | |
# | |
import hashlib | |
def hasher(s): | |
m=hashlib.sha1() | |
m.update(s) | |
return m.hexdigest() | |
def stringify_keyspace(a): |
This file contains hidden or 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
#centralizedSyslog | |
# | |
SET -e | |
apt-get update --fix-missing -y | |
apt-get install rsyslog-gnutls -y | |
echo '# /etc/rsyslog.conf | |
\$ModLoad imuxsock # provides support for local system logging | |
\$ModLoad imklog # provides kernel logging support |
This file contains hidden or 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
#See documentation at http://nginx.com/resources/admin-guide/load-balancer/ | |
upstream loadbalancer { | |
#LHS:80 load balancer end point | |
server 127.0.0.1 max_fails=1 fail_timeout=5s; | |
#RHS:80 load balancer end point | |
server 127.0.0.2 max_fails=1 fail_timeout=5s; | |
} | |
server { | |
# |
This file contains hidden or 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
# Git project structure | |
#/-- | |
# DockerFile | |
# /src/monalisa.tar.gz | |
# <git source tarball from wercker for monalisa> | |
# /bin | |
#Install the Java Runtime | |
# ./installJre | |
#Install Maven |
This file contains hidden or 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 | |
### BEGIN INIT INFO | |
# Provides: SERVICE_NAME | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: SERVICE_DESCRIPTION | |
# Description: starts named service using start-stop-daemon |
This file contains hidden or 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
sudo dd if=/dev/zero of=/swap count=1048576 bs=2048 | |
sudo mkswap /swap | |
sudo swapon /swap |
This file contains hidden or 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 | |
sudo apt-get update --fix-missing -y | |
sudo apt-get install unzip -y | |
wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip | |
unzip awscli-bundle.zip | |
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws | |
rm -rf awscli-bundle* |
This file contains hidden or 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 | |
[ ! -f ./stackdriver.conf ] && { | |
$(cat ./stackdriver.conf) | |
export DEBIAN_FRONTEND=noninteractive; | |
export APTOPT='-y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold --force-yes --yes --fix-missing -qq'; | |
curl -s -o /etc/apt/sources.list.d/stackdriver.list https://repo.stackdriver.com/wheezy.list | |
curl -s --silent https://app.stackdriver.com/RPM-GPG-KEY-stackdriver |apt-key add - | |
apt-get update -y | |
apt-get install stackdriver-agent | |
sudo sed -i -e "s/STACKDRIVER_API_KEY=\"\"/STACKDRIVER_API_KEY=\"\"/' /etc/default/stackdriver-agent |
This file contains hidden or 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
cat > /etc/sudoer << EOF | |
Enter your file contents here. | |
EOF |
This file contains hidden or 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
# Example specifies *.war. | |
# | |
# It would work for *.log for developers who git -A . when they shouldn't and upload the contents of /var/log/* | |
# Just change the --ignore-unmatch parameter. | |
# | |
git filter-branch \ | |
--prune-empty \ | |
-d ../scratch \ | |
--index-filter "git rm --cached -f --ignore-unmatch *.war" \ | |
--tag-name-filter cat -- --all |
NewerOlder