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 | |
function usage { | |
echo "Creates a new local virutal host." | |
echo "usage: newhost [-s] sitename" | |
echo "Parameters:" | |
echo " s : Create HTTPS virtual host as well." | |
} | |
function safename { |
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 | |
# Thanks to Toby Kurien for this awesome trick | |
# Run this script then any applications launched from this terminal | |
# will have access to the internet, anything else will not be able to connect | |
# To create another terminal with the power of internet use 'sudo -g internet -s' | |
# NOTE: This script will create an "internet" group if one doesn't exist | |
# Firewall apps - only allow apps run from "internet" group to run | |
egrep -i "^internet$" /etc/group > /dev/null | |
if [ $? -ne 0 ]; then |
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
# Install rvm system-wide | |
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) | |
# Update the packages | |
apt-get update | |
apt-get upgrade | |
apt-get install build-essential | |
# get the packages required by ruby | |
rvm pkg install zlib |
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 | |
# Create environment variables for docker containers on the host machine | |
containers=( | |
"DB0:postgres" | |
"ES0:elasticsearch" | |
"REDIS0:redis" | |
) |
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
server { | |
server_name <%= ENV['hostname'] %>; | |
access_log /var/log/nginx/nginx.access.log; | |
error_log /var/log/nginx/nginx.error.log; | |
default_type application/x-php; | |
root <%= ENV['app_root'] %>; | |
index index.html index.htm index.php; | |
try_files $uri $uri/ /index.php?it=$uri&$args; |
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' |
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
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
// 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
# to add | |
tc qdisc add dev lo root netem delay 500ms | |
# to remove | |
tc qdisc delete dev lo root netem delay 500ms |
OlderNewer