Skip to content

Instantly share code, notes, and snippets.

View nzbr's full-sized avatar
💾

nzbr

💾
View GitHub Profile
@nzbr
nzbr / show-rawr.user.js
Last active October 16, 2023 03:29
User script to replace the text on the "Raw" button on GitHub with "Rawr"
// ==UserScript==
// @name Show Rawr
// @namespace Violentmonkey Scripts
// @match https://github.com/**
// @match https://gist.github.com/**
// @match https://codeberg.org/**
// @grant none
// @version 1.0
// @author nzbr
// @description Replaces the Raw button on GitHub with Rawr
@nzbr
nzbr / reddit-like-its-2023-06-11.user.js
Created June 15, 2023 20:42
User script to redirect any Reddit site to its archive.org capture of just before the blackout
// ==UserScript==
// @name Reddit like it's 2023-06-11
// @namespace Violentmonkey Scripts
// @match https://www.reddit.com/*
// @grant none
// @version 1.0
// @author nzbr
// @description Redirect any Reddit site to its archive.org capture of just before the blackout
// ==/UserScript==
@nzbr
nzbr / Moodle-Login-Redirect.user.js
Last active November 23, 2020 18:02
Redirect to login page when not logged in on moodle.tu-dortmund.de
// ==UserScript==
// @name Moodle Login
// @namespace https://nzbr.de
// @version 0.1
// @description Redirect to login page when not logged in on moodle.tu-dortmund.de
// @author nzbr
// @match https://moodle.tu-dortmund.de/
// @match https://moodle.tu-dortmund.de/login/index.php
// @grant none
// ==/UserScript==
@nzbr
nzbr / UDP.cs
Last active May 26, 2021 21:21
UDP Device Script for Aurora
using Aurora;
using Aurora.Devices;
using Aurora.Settings;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Net.Sockets;
using System.Threading.Tasks;
using System.Diagnostics;
@nzbr
nzbr / zoomvm.nix
Last active January 29, 2024 00:42
NixOS Configuration for Running Zoom in a VM, where it belongs, because you have to...
# INSTRUCTIONS:
# 1. Follow the installation instructions at
# https://nixos.org/nixos/manual/index.html until
# /mnt/etc/nixos/configuration.nix is edited
# 2. Replace that file with this one:
# -> curl -L -o /mnt/etc/nixos/configuration.nix https://go.nzbr.de/zoomvm
# 3. You will need to edit this configuration if you want a locale other than
# german (i18n and xserver.locale) or not use UEFI (boot.loader)
# 4. Run `nix-env -i git` to install git on the live system (may take some time)
# 5. Run nixos-install
@nzbr
nzbr / traefik-auto-yaml.user.js
Created January 28, 2020 15:51
Automatically switch configuration examples to YAML in the traefic-docs
// ==UserScript==
// @name Traefik auto-yaml
// @version 1
// @grant none
// @include https://docs.traefik.io/*
// ==/UserScript==
Array.from(document.getElementsByTagName("label")).forEach((elem) => {
if (elem.innerHTML === "File (YAML)") {
elem.click();
@nzbr
nzbr / smile_amazon_de.user.js
Last active November 16, 2019 13:32 — forked from orderthruchaos/smile_amazon_com.user.js
Greasemonkey User Script: ensure that you are on smile.amazon.com. (Fork for amazon.de)
// ==UserScript==
// @name smile_amazon_de
// @namespace http://orderthruchaos.bitbucket.org/
// @copyright 2015+, Brett DiFrischia
// @license
// @description Always remember to smile!
// @grant GM_log
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// @include http://www.amazon.de/*
// @include https://www.amazon.de/*
@nzbr
nzbr / vlang.mk
Last active October 11, 2019 11:00
Makefile that compiles .v and .c files into a single binary
V=v
CC=gcc
LD=gcc
LINKFLAGS=-lm -lpthread -ldl
BINARY=program.elf
OBJECTS=_vcode.o $(patsubst %.c,%.o,$(wildcard *.c))
all : $(BINARY)
@nzbr
nzbr / wghosts.py
Created July 23, 2019 19:29
Creates hosts-file entries from a wireguard config
#!/usr/bin/python3
import sys
import os
if len(sys.argv) != 2:
print("Usage:\twghosts.py <interface>")
sys.exit(1)
interface = sys.argv[1]
conffile = "/etc/wireguard/%s.conf" % interface
@nzbr
nzbr / pass-export.py
Created July 21, 2019 19:34
Creates a CSV export from a pass password-store (can be imported as a LastPass export, for example in Bitwarden)
#!/usr/bin/python3
import os
from sys import stdout, stderr
from subprocess import Popen, PIPE, DEVNULL
def eprint(text: str) -> None:
stderr.write(text+"\n")
stderr.flush()