Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am alex1702 on github.
  • I am alexfinkhaeuser (https://keybase.io/alexfinkhaeuser) on keybase.
  • I have a public key whose fingerprint is 63C8 EB33 4041 79D2 EAF4 CF6D 1EB8 81AE 5AEA DB13

To claim this, I am signing this object:

@alex1702
alex1702 / rpl.py
Last active June 7, 2019 09:33 — forked from calvinbui/rpl.py
FreeNAS Replication Details
"""
FreeNAS Replication status
"""
import os
import time
import sys
from datetime import datetime, timedelta
def bytes_to_gb(filesize):
return filesize / 1024 / 1024 / 1024
@alex1702
alex1702 / peervpn_dockercompose
Last active September 6, 2017 07:35
PeerVPN docker compose Datei.
version: '3'
services:
peervpn:
image: thomasleister/peervpn
network_mode: "host"
cap_add:
- NET_ADMIN
restart: "always"
environment:
@alex1702
alex1702 / docker-cleanup
Created September 6, 2017 06:15 — forked from wdullaer/docker-cleanup
Cleanup unused Docker images and containers
#!/bin/sh
# Cleanup docker files: untagged containers and images.
#
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6).
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}'
@alex1702
alex1702 / install_docker.sh
Last active September 6, 2017 07:10 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
#!/bin/sh
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
-- Based on Simple SQL Authentication module for Prosody IM
-- Copyright (C) 2011 Tomasz Sterna <tomek@xiaoka.com>
-- Copyright (C) 2011 Waqas Hussain <waqas20@gmail.com>
--
-- 25/05/2014: Modified for Diaspora by Anahuac de Paula Gil - anahuac@anahuac.eu
-- 06/08/2014: Cleaned up and fixed SASL auth by Jonne Haß <me@jhass.eu>
-- 22/11/2014: Allow token authentication by Jonne Haß <me@jhass.eu>
local log = require "util.logger".init("auth_diaspora")
local new_sasl = require "util.sasl".new