Skip to content

Instantly share code, notes, and snippets.

@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
}
#!
# 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 / 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

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Higgs1
Higgs1 / key.py
Last active March 22, 2021 07:29
import cryptography
import datetime
import pgpy
pkalg = pgpy.constants.PubKeyAlgorithm.ECDSA
curve = pgpy.constants.EllipticCurveOID.NIST_P384
super_secret_number = 12345
created = 0 # datetime
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
# Requires the "kinit" command
# Fedora: krb5-workstation
# OpenSUSE: krb5-client
# Ubuntu: krb5-user
# TODO: allow use of environment variables
USERN="$USER"
while (( "$#" )); do
@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.

@Higgs1
Higgs1 / _Factory Idle Mods.md
Last active January 29, 2023 02:52
Foxxie's Fantastical Factory Idle Mods

Foxxie's Fantastical Factory Idle Mods

Welcome to my collection of fantastically fabulous fox Factory Idle mods. All of these mods are completely free under the Hug-Ware license: "If we meet some day, and you think this stuff is worth it, you can give me a hug in return."

These mods do various neat things to help enhance your Factory Idle playing experience. Here's a short description of each and a link to automatically install them (assuming you already have the required software installed).

Enable Right Click Context Menu [disable right click.user.js]

Makes your normal right clicky context menu pop up when you right click, except in the map area so you can still delete things.