Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View slokhorst's full-sized avatar

Sebastiaan Lokhorst slokhorst

View GitHub Profile
#!/bin/bash
##### Fill out the following #####
# Your domains
domain="example.com"
additional_domains="www.$domain" # colon-separated (:)
# DirectAdmin login
user="debXXX"
password=""
# For Let's Encrypt notifications
diff --git a/libtransmission/rpc-server.c b/libtransmission/rpc-server.c
index e86a4a3..e32fe36 100644
--- a/libtransmission/rpc-server.c
+++ b/libtransmission/rpc-server.c
@@ -54,7 +54,7 @@ struct tr_rpc_server
bool isWhitelistEnabled;
tr_port port;
char * url;
- struct in_addr bindAddress;
+ struct in6_addr bindAddress;
@slokhorst
slokhorst / example.js
Created February 7, 2018 23:32
Monitor ALSA microphone audio level with Node.js (VU meter)
const { spawn } = require('child_process');
arOptions = {
channels: 2,
rate: 16000,
format: 'S16_LE',
device: 'front:CARD=C920' // find out with `arecord -L`
}
callback = function(level) {
@slokhorst
slokhorst / PKGBUILD
Last active April 3, 2019 18:38
freecad-git
# Maintainer: Grey Christoforo <first name at last name dot net>
# Maintainer: Sebastiaan Lokhorst <sebastiaanlokhorst@gmail.com>
_appname=freecad
pkgname="${_appname}-git"
pkgver=0.19pre.r168.gd4f01c440
pkgrel=1
epoch=1
pkgdesc='A general purpose 3D CAD modeler - git checkout'
arch=('x86_64')
@slokhorst
slokhorst / fms-certimport.sh
Last active May 30, 2019 21:12
Automatically import a Let's Encrypt certificate into FileMaker Server (18)
!/bin/sh
LETSENCRYPT_DIR='/etc/letsencrypt/live/example.com'
FMS_DIR='/Library/FileMaker Server'
FMS_USERNAME='admin'
FMS_PASSWORD='hunter2'
cp $LETSENCRYPT_DIR/{privkey,fullchain}.pem "$FMS_DIR/CStore/"
# the import will fail if CStore/serverKey.pem already exists
@slokhorst
slokhorst / PKGBUILD
Created April 5, 2020 12:59
ntopng PKGBUILD
# Maintainer: Barry Smith <brrtsm at gmmal dot com>
# Contributor: johnnybash <jb at wachenzell dot org> PGP D126E2910543DE2D
# Contributor: jrdemasi <jrdemasi@gmai.com>
# Contributor: Fernando Manfredi <contact at acidhub.click>
# Contributor: Evan Teitelman <teitelmanevan at gmail dot com>
# Contributor: Ari Mizrahi <codemunchies@gmail.com>
# Contributor: CRT <cirkit@kode.email>
validpgpkeys=('EFD9413B17293AFDFE6EA6F1402A088DEDF104CB')
pkgname=ntopng
pkgver=4.0