Skip to content

Instantly share code, notes, and snippets.

View thde's full-sized avatar

Demian thde

View GitHub Profile
[Unit]
Description=Tunnel TCP traffic to WireGuard
After=network.target
Wants=wg-quick@.service
[Service]
Type=simple
ExecStart=/usr/bin/udptunnel -s 443 127.0.0.1/51820
Restart=on-failure
@thde
thde / Dockerfile
Last active September 12, 2016 14:00
Alpine with transmission
FROM alpine:3.4
RUN apk upgrade --no-cache && \
apk add --no-cache transmission-daemon && \
mkdir -p /var/lib/transmission/downloads && \
mkdir -p /var/lib/transmission/watch
EXPOSE 9091
VOLUME /var/lib/transmission/downloads
VOLUME /var/lib/transmission/watch
@thde
thde / APKBUILD
Created June 6, 2016 14:32
ffmpeg
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ffmpeg
pkgver=2.8.5
pkgrel=0
pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
url="http://ffmpeg.org/"
arch="all"
license="GPL"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
#!/bin/sh
SNIPPETS_DIR="snippets"
SNIPPETS_LENGTH="00:00:30"
SNIPPETS_START="00:02:00"
mkdir "${SNIPPETS_DIR}"
for file in "$@"
do
filename=$(basename "${file}" .wav)
@thde
thde / mygrator.sh
Last active April 8, 2016 07:07
A script to set a new user password after migrating from MySQL to 5.5
#!/bin/sh
# mygrator.sh v0.1
#
# Usage: mygrator.sh USER PASSWORD
set -x
MYSQLUSER="${1}"
MYSQLPASS="${2}"
@thde
thde / alpine-install.sh
Last active February 23, 2024 22:59
A script to install alpine linux on a dedicated server. Tested on Hetzner, Kimsufi / OVH
#!/bin/sh
set -ex
PATH=/bin:/sbin:/usr/bin:/usr/sbin
KEYMAP="us us"
HOST=alpine
USER=anon
ROOT_FS=ext4
BOOT_FS=ext4
#!/bin/bash
# installs/updates imapsync
TMPDIR=$(mktemp -d)
mkdir $TMPDIR/logs
apt-get update
apt-get install git make makepasswd rcs perl-doc libmail-imapclient-perl libfile-copy-recursive-perl libio-tee-perl libunicode-string-perl
#!upstart
#
description "rTorrent deamon"
setuid rt
setgid rt
start on startup
stop on shutdown
@thde
thde / update-rtorrent.sh
Last active May 9, 2019 08:40
rTorrent install/update on Ubuntu 14.04
#!/bin/bash
# installs/updates rtorrent from source on Ubuntu
TMPDIR=$(mktemp -d)
mkdir $TMPDIR/logs
install_dependencies () {
apt-get update
apt-get install -y git subversion build-essential automake libtool libcppunit-dev zlib1g-dev libcurl4-openssl-dev libncurses5-dev
@thde
thde / whois.conf
Last active September 1, 2023 07:29
/etc/whois.conf WHOIS records for nTLDs.
##
# WHOIS servers for new TLDs (http://www.iana.org/domains/root/db)
# Current as of 2017-12-10 UTC
##
\.aarp$ whois.nic.aarp
\.abarth$ whois.afilias-srs.net
\.abbott$ whois.afilias-srs.net
\.abbvie$ whois.afilias-srs.net
\.abc$ whois.nic.abc