Skip to content

Instantly share code, notes, and snippets.

View Higgs1's full-sized avatar

No GitHub Higgs1

  • Justice
  • The Future
  • 03:41 (UTC +02:00)
View GitHub Profile
@Higgs1
Higgs1 / Adding a trusted RPM repo by URL.md
Last active October 5, 2020 16:09
Various OpenSUSE guides

Execute for each repo you wish to add by URL:

sudo zypper -n ar -f <URL or path of repo file>

This command will error (with code 4) if an identical repository has already been added to the system.

# Requires the "kinit" command
# Fedora: krb5-workstation
# OpenSUSE: krb5-client
# Ubuntu: krb5-user
# TODO: allow use of environment variables
USERN="$USER"
while (( "$#" )); do
get_dev_by_usb_id() {
idV=${1%:*}
idP=${1#*:}
for path in $(find /sys/ -name idVendor 2> /dev/null | rev | cut -d/ -f 2- | rev); do
if grep -q $idV $path/idVendor; then
if grep -q $idP $path/idProduct; then
for bd in $(find $path -name 'device' | grep 'block' | rev | cut -d / -f 2 | rev); do
echo "/dev/$bd"
done
fi
@Higgs1
Higgs1 / key.py
Last active September 16, 2025 03:15
import cryptography
import datetime
import pgpy
pkalg = pgpy.constants.PubKeyAlgorithm.ECDSA
curve = pgpy.constants.EllipticCurveOID.NIST_P384
super_secret_number = 12345
created = 0 # datetime
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Higgs1
Higgs1 / mods.md
Last active June 20, 2022 19:25
Foxxy's Essential Cities Skylines Mods

ERR mods total. BloodyPenguin is responsible for ERR% of them.

Modless Vanilla Mods

  1. From the main menu, go to Content Manager -> Styles, and then enable all the styles you like (e.g. "European / Vanilla")

Vanilla-Compatible (DLC may be required)

These mods either do not permanately alter the save game, or alter the save game in such a way that permits loading the save game without the mod installed while perserving the inteded changes. Additionally, while these mods may change the balance of the game by making certain things easier, they do not significantly change the core game mechanics in a way that is not in the spirit of the vanilla game experience.

| Name | Author | Steam | Description

#!
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=armorpaint-git
# npm i -g google-closure-compiler
COMPILER=gcc # clang, gcc
GRAPHICS=opengl # opengl, vulkan (seg faults)
OPTIMIZE=s #0, 1, 2, 3, fast, g, s
DIST_PATH="$HOME/Downloads/armorpaint/dist"
@Higgs1
Higgs1 / tar.sh
Created December 3, 2021 22:15
TAR, AR, and DEB in Bash!!!
#!
# todo: is dd or for-printf faster?
# tar_write_str <length> <string>
tar_write_str () {
set -- "$1" "${2:0:$1}"
printf '%s' "$2"
dd if=/dev/zero count=1 bs=$(($1-${#2})) 2> /dev/null
}