Skip to content

Instantly share code, notes, and snippets.

View thde's full-sized avatar

Demian thde

View GitHub Profile
@thde
thde / README.md
Last active April 25, 2025 10:06
Windows Bootstrap

Windows

winget upgrade --all
winget import --import-file "winget.json"

WSL

// @name Bandcamp Purchase Export
// @description Allows to export Bandcamp purchases as a CSV file.
const main = async () => {
const currentRates = rates("CHF");
await loadAllPurchases();
const allPurchases = purchases(await currentRates);
if (allPurchases.length == 0) {
alert(
[Unit]
Description=Tunnel TCP traffic to WireGuard
After=network.target
[email protected]
[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 <[email protected]>
# Maintainer: Natanael Copa <[email protected]>
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 September 17, 2024 03:27
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