Skip to content

Instantly share code, notes, and snippets.


Stefan Husch jfqd

View GitHub Profile
jfqd / install_openvpn.bash
Created May 5, 2021
Install OpenVPN with Homebrew on macOS
View install_openvpn.bash
# install homebrew if not yet done
/usr/bin/ruby -e "$(curl -fsSL"
# fix me!
brew analytics off
brew install openvpn
jfqd / build_minio_client_on_SmartOS
Last active May 3, 2021
Build minio version 2021-04-22T15-44-28Z on SmartOS with pkgsrc:
View build_minio_client_on_SmartOS
go get -d
GOOS=solaris GOARCH=amd64 GO111MODULE=on go get
jfqd / dial
Created May 2, 2021
This script dials a phone-number given on the command line on macOS via a SNOM hardware phone
View dial
pn=$(echo $@ | tr -d " \t\n\r" | sed "s#+49#0#")
curl -k -m 3 "https://user:password@${pn}"
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
jfqd / shodan_ip_list.txt
Created Nov 14, 2020
shodan ip list for blocking traffic
View shodan_ip_list.txt
jfqd / z.bash
Created Nov 11, 2020
convenient login script for SmartOS zones (native, lx, kvm)
View z.bash
if [[ "$1" =~ ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ ]]; then
if [[ $(/usr/sbin/vmadm lookup uuid="$1" -j -o type | /opt/tools/bin/jq '.[][]') = "KVM" ]]; then
/usr/sbin/vmadm console "$1"
/usr/sbin/zlogin "$1"
uuid=$(/usr/sbin/vmadm lookup alias="$1")
brand=$(/usr/sbin/vmadm lookup alias="$1" -j -o type | /opt/tools/bin/jq '.[][]' |sed 's/"//g')
jfqd / gist:03146ff38b5e3f8da6bc65579330c38d
Created Oct 13, 2020
Create Debian-10 lx-brand image
View gist:03146ff38b5e3f8da6bc65579330c38d
Download and install a fresh debian-10 iso in VirtualBox. After boot and login run:
apt-get install git debootstrap curl
git clone
cd debian-lx-brand-image-builder
mkdir /mnt/chroot
./install -r buster -d /mnt/chroot -m -i debian-10 -p "Debian 10 lx-brand" -D "Debian 10 64-bit lx-brand image." -u
curl -s -u "$USER:$PASSWORD" -T ./debian-10-20200713.tar.gz
View gist:a21c9c8d31a1b3c120c22dc38b6eb01b
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='keycloak'>
jfqd /
Created Jun 14, 2020
Little app that kills stuck Nexcloud Sync-Client on macOS
-- paste this into the macOS '' and save it as an app
on run
do shell script "ps auxwwww |grep \"MacOS/nextcloud\" |grep -v grep | awk '{print $2}' | xargs kill -9"
end run
jfqd / mysql_zbx_part
Created May 23, 2020
Zabbix housekeeping script for use on SmartOS with pkgsrc
View mysql_zbx_part
use strict;
use Data::Dumper;
use DBI;
use Sys::Syslog qw(:standard :macros);
use DateTime;
use POSIX qw(strftime);
openlog("mysql_zbx_part", "ndelay,pid", LOG_LOCAL0);