Skip to content

Instantly share code, notes, and snippets.

Avatar

Till Wiese m3adow

View GitHub Profile
@m3adow
m3adow / steamfix.reg
Last active Dec 1, 2020
A Registry entry to fix Steam dependency installation on each start of a game
View steamfix.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Valve\Steam\Apps\{{ INSERTYOURAPPIDHERE }}]
"adobeair"=dword:00000001
"amd"=dword:00000001
"d3d11"=dword:00000001
"directx"=dword:00000001
"DXSetup"=dword:00000001
"microsoft.net"=dword:00000001
"msvc redist"=dword:00000001
@m3adow
m3adow / patch-k3s-iptables.sh
Last active Jul 4, 2020
A quick 'n dirty script to remove theIptables redirection for ports 80 and 443 of k3s from one IP. Substitute the IP in ADD_LINE with the one you don't want k3s to redirect. Add the script as "ExecStartPost" to /etc/systemd/system/k3s.service.
View patch-k3s-iptables.sh
#!/bin/bash
#############################
# Author: Till Wiese/m3adow #
#############################
set -euo pipefail
set -x
@m3adow
m3adow / borg-latest.sh
Last active Nov 29, 2019
Bash script to download newewst version of borg if not installed before executing it
View borg-latest.sh
#!/bin/bash
set -ueo pipefail
# set -x
BORG_ARCH=${BORG_ARCH:-linux64}
BORG_PATH=${BORG_PATH:-}
BORG_UPDATE_ONLY=${BORG_UPDATE_ONLY:-0}
if [ -z "${BORG_PATH}" ]
then
@m3adow
m3adow / wifileech.sh
Last active Jun 17, 2018
Script to periodically change the MAC address of an interface an reconnect to WiFi in Ubuntu. Can be used for circumventing public WiFi limits. Has been tested with "WIFIonICE" WiFi from Deutsche Bahn.
View wifileech.sh
#!/bin/bash
set -euo pipefail
#set -x
change_mac(){
OLDMAC=$(ip link show wlan0 |grep -oP '([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})'|head -1)
ifconfig ${1} down
set +e
while true
do
@m3adow
m3adow / cmder_batch.bat
Created Apr 17, 2017
Batch file to start other applications (or batches) in CMDer
View cmder_batch.bat
@echo off
rem Set CMDER_ROOT to your actual cmder installation directory
set CMDER_ROOT=%~dp0
start %CMDER_ROOT%\vendor\conemu-maximus5\ConEmu.exe /icon "%CMDER_ROOT%\cmder.exe" /title Cmder /loadcfgfile "%CMDER_ROOT%\config\ConEmu.xml" /cmd cmd /k "%CMDER_ROOT%\vendor\init.bat cd %CD% && %~1
@m3adow
m3adow / brainfm-bubble-block
Created Nov 11, 2016
uBlock Origin Custom rule to block brain.fm bubbles in the background
View brainfm-bubble-block
# Just add this to "My filters" in uBlocks settings
www.brain.fm###bg_bubbles_container
View parse_json_for_obs.py
import json
import argparse
from time import sleep
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('input_file', metavar='INPUT')
parser.add_argument('output_file', metavar='OUTPUT')
@m3adow
m3adow / node1.yml
Created May 4, 2016
CoreOS cloud-configs utilising kontena 0.12 (example files)
View node1.yml
#cloud-config
hostname: "node1"
coreos:
update:
reboot-strategy: "best-effort"
group: "alpha"
units:
- name: settimezone.service
command: start
@m3adow
m3adow / change_uid_www.sh
Created Dec 6, 2015
Changing the UID/GID of a docker user before starting the process
View change_uid_www.sh
#!/bin/bash
set -e
set -u
DEFAULT_UID=33
DEFAULT_GID=33
usage(){
printf "Usage: ./%s -u NEW_UID [-f Force, needed if NEW_UID = 0 ]\n" "$0"
}
@m3adow
m3adow / zmq_rcon_dirty.py
Last active Nov 16, 2015
Very(!!!) dirty hack to make zmq_rcon execute arguments as commands without polling STDIN
View zmq_rcon_dirty.py
#!/usr/bin/env python
import sys
import time
import struct
import argparse
import uuid
import threading
import Queue