Skip to content

Instantly share code, notes, and snippets.

yum update
yum install docker
systemctl start docker.service
docker run --name docker-postgres -v /some/path/on/host:/var/lib/postgresql/data -e POSTGRES_PASSWORD=PASSWORD_HERE -d postgres
docker run --rm glyptodon/guacamole /opt/guacamole/bin/ --postgres > initdb.sql
docker run -it --link docker-postgres:postgres --rm postgres sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres'
# Enter your postgresql password from line 5
CREATE DATABASE guacamole_db;
kernel-sanders / nginx_for_letsencrypt.txt
Last active December 10, 2015 23:22
Nginx config and commands for let's encrypt
# This should be in your nginx config
# You can put the location block in whichever server blocks need a let's encrypt cert
server {
listen 80;
server_name sub.domain.tld sub2.domain.tld;
location '/.well-known/acme-challenge' {
default_type "text/plain";
root /tmp/letsencrypt-auto;
kernel-sanders /
Last active March 21, 2019 16:00
mkdir -p \
$HOME/.cache/Amazon-Cloud-Drive/local.encrypted \
$HOME/.cache/Amazon-Cloud-Drive/local.plaintext \
$HOME/.cache/Amazon-Cloud-Drive/cloud.encrypted \
ENCFS6_CONFIG=$HOME/.cache/encfs6.xml encfs -o allow_other $HOME/.cache/Amazon-Cloud-Drive/local.encrypted $HOME/.cache/Amazon-Cloud-Drive/local.plaintext
acd_cli mount --modules="subdir,subdir=/Encrypted" $HOME/.cache/Amazon-Cloud-Drive/cloud.encrypted
kernel-sanders /
Last active August 7, 2018 18:16
Shell script to set up a L2TP over IPSec VPN on Debian/Ubuntu (tested on rasbian)
# Kernel Sanders, MAR 2015
# Simple script for easy set up of L2TP over IPsec VPN on Debain based systems (tested on rasbian)
# Steps modified from:
# Must be root to run the script
if [ ! $UID = "0" ]; then
echo "You must be root to run this script"
exit 1