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 python | |
import argparse | |
import json | |
from subprocess import check_output | |
def inspect(container): | |
return json.loads(check_output(["docker", "inspect", container])) | |
def prep_arg(string): |
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
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: drone-agent | |
namespace: app-support | |
labels: | |
tier: support | |
spec: | |
replicas: 2 | |
selector: |
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 | |
set -e | |
echo "---> Installing aws cli (if neccessary)" | |
type aws 1>/dev/null 2>&1 || pip install awscli | |
echo "---> Packaging app" |
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 | |
set -eo pipefail | |
DEPS='openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig' | |
echo $DEPS | xargs apt-get -y install | |
rm -f /tmp/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb | |
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb -P /tmp | |
dpkg -i /tmp/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb |
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 | |
set -eo pipefail | |
# Install rbenv | |
if [[ ! -d ~/.rbenv ]]; then | |
echo "Installing rbenv" | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
if [[ ! `grep 'eval "\$(rbenv init -)"' ~/.bashrc` ]]; then | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc |
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
# to add | |
tc qdisc add dev lo root netem delay 500ms | |
# to remove | |
tc qdisc delete dev lo root netem delay 500ms |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
git clone https://github.com/statianzo/dokku-supervisord.git /var/lib/dokku/plugins/dokku-supervisord | |
dokku plugins-install | |
git clone https://github.com/scottatron/dokku-rebuild /var/lib/dokku/plugins/rebuild | |
dokku plugins-install | |
git clone https://github.com/musicglue/dokku-user-env-compile.git /var/lib/dokku/plugins/user-env-compile | |
dokku plugins-install | |
git clone https://github.com/mikexstudios/dokku-nginx-alt.git /var/lib/dokku/plugins/dokku-nginx-alt |
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
<?php | |
# phppgmyadmin/conf/config.inc.php | |
(...) | |
// Docker postgres connections | |
$server_i = 1; | |
$containers = explode("\n", trim(`docker ps`)); | |
array_shift($containers); | |
foreach ($containers as $cid) { | |
if (!preg_match('/postgres/', $cid)) { continue; } |
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
AA: 'Afar' | |
AB: 'Abkhaz' | |
AE: 'Avestan' | |
AF: 'Afrikaans' | |
AK: 'Akan' | |
AM: 'Amharic' | |
AN: 'Aragonese' | |
AR: 'Arabic' | |
AS: 'Assamese' | |
AV: 'Avaric' |