Skip to content

Instantly share code, notes, and snippets.

View Bachsau's full-sized avatar

Bachsau

View GitHub Profile
@Bachsau
Bachsau / sysctl.conf
Created November 7, 2024 20:58
Kernel configuration for Bachsau machines
# Kernel configuration for `hostname` by Bachsau
# Static domain (for servers)
#kernel.domainname = example.com
# Disable the magic-sysrq key
kernel.sysrq = 0
# IPv6 address pool
net.ipv6.conf.default.max_addresses = 256
@Bachsau
Bachsau / Windows 10 Default App.exe
Last active November 7, 2024 20:46
Allows to remove Internet Explorer specific settings from the Internet Properties window
@Bachsau
Bachsau / cli.ini
Last active September 8, 2024 17:28
Non-patronizing Certbot configuration
# Certbot configuration by Bachsau
# System
max-log-backups = 0
#no-random-sleep-on-renew = true
verbose = 1
# CA settings
#server = https://acme-staging-v02.api.letsencrypt.org/directory
preferred-chain = ISRG Root X1
@Bachsau
Bachsau / yay_config.json
Last active August 14, 2024 21:11
Yay, don't bother me!
{
"aururl": "https://aur.archlinux.org",
"aurrpcurl": "https://aur.archlinux.org/rpc?",
"buildDir": "/Users/Sven/.cache/yay",
"editor": "nano",
"editorflags": "",
"makepkgbin": "makepkg",
"makepkgconf": "",
"pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf",
@Bachsau
Bachsau / IPv6_config.cmd
Created July 30, 2024 12:20
My preferred IPv6 settings on Windows
@echo on
netsh interface teredo set state disabled
netsh interface ipv6 set teredo disable
netsh interface ipv6 set privacy state=enabled
netsh interface ipv6 set privacy maxpreferredlifetime=1d
netsh interface ipv6 set privacy maxvalidlifetime=2d
netsh interface ipv6 set global randomizeidentifiers=disabled
pause
@Bachsau
Bachsau / localhost.pem
Last active December 5, 2023 02:06
TLS certificate for testing on localhost
-----BEGIN PRIVATE KEY-----
MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDCS1cz8+MwcnN6
A5qK30AQX+CPXNwuYF738+1zhlVuHzdo/3X76Go1lCfFM+8lpYYxKPOsz6cgLf5f
HWfc3Ikj1OCmHs5LorfQKVormkbBW9aBwaN79Uq+Y8+r6dz0pT0HyLzcWQ/DDgbX
GAzU1hZcuYw5UjN4dptpZk27sTKTrukgNcMttC0CRYgpV1ICCgeT7D1mVAoB+oeF
0I+OxkX5vkPZAab/nzGSuW+hMHiwsf0OoNtkAxkGjrPvHXmB6t/MrYDByCQBi3x9
jhRKZ4ADPXCZMTw7iUoAqBDJ4imMbHN/cfonuKmU0YSbQJYLrZFhOVWHHGJeeXqW
8EuYojaxsxR8YRirNKNVSaUA+7zo0zMWo1Ig1tqONSwZys3QbZA4W3nibICZA8bR
0onKo1iyq+ASHxD7hEEKHLuZnfgs5y8jXbIyxOMAiiFHJoRwwckJ3PcsmvUmpHuG
MinJisbDAVGk2wAzZ7clZs9l510sgFw9RrEGvedB1lO6UFxs2VxxyH6sOfWc4HTs
@Bachsau
Bachsau / deploy.cgi
Last active March 13, 2023 10:57
The simplest of Git deployment scripts: Just ping it!
#!/bin/sh -eu
while read -r discard; do :; done; unset -v discard
echo 'Content-Type: text/plain; charset=UTF-8'
echo 'Cache-Control: no-store, max-age=0'
echo
git fetch -q github main
git reset --hard github/main
git clean -d -e '/deploy.cgi' -x
@Bachsau
Bachsau / post:10etckeeper.sh
Created February 28, 2023 21:15
Certbot hooks for etckeeper; place them in /etc/letsencrypt/renewal-hooks/(pre|post)/
#!/bin/sh -eu
# Run etckeeper after certificate renewal (by Bachsau)
if command -v etckeeper >/dev/null && etckeeper unclean; then
etckeeper commit "committing updates to certificate configuration files after renewal"
fi
@Bachsau
Bachsau / configuration_manager.py
Last active March 2, 2023 15:29
A simple abstraction of Python’s ConfigParser
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# A simple abstraction of Python’s ConfigParser.
# It features implicit type conversion and defaults through prior
# registration of settings. It can be used to save and read settings
# without bothering about the specifics of ConfigParser or the INI files
# themselves. It could also serve as a starting point to abstract
# platform-specific saving methods through its general API.
@Bachsau
Bachsau / dwarf-fortress.svg
Last active February 26, 2023 01:22
Handmade vector icon for Dwarf Fortress
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.