Skip to content

Instantly share code, notes, and snippets.

View vasi's full-sized avatar

Dave Vasilevsky vasi

  • Montreal
View GitHub Profile
@vasi
vasi / archive-desc.py
Created September 4, 2024 04:39
Update Internet Archive descriptions from HTML files
#!/home/vasi/.local/pipx/venvs/internetarchive/bin/python
from internetarchive import get_session, modify_metadata
import sys
get_session(config_file="/home/vasi/.config/internetachive/ia.ini")
file, ident = sys.argv[1:]
with open(file) as f:
data = f.read()
@vasi
vasi / apt-show-versions
Last active September 8, 2024 17:16
apt-show-versions hacked to show full release path
#!/usr/bin/perl -w
# apt-show-versions - Lists available package versions with distribution
# This program parses the dpkg status file and the APT lists for the
# installed and available package versions and distribution and shows
# upgrade options within the specific distribution of the selected
# package
# Copyright (C) 2001 - 2014 Christoph Martin
@vasi
vasi / config-6.10.4-powerpc
Created August 16, 2024 03:54
powerpc 6.10.4-1 kernel config
#
# Automatically generated file; DO NOT EDIT.
# Linux/powerpc 6.10.4 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="powerpc-linux-gnu-gcc-13 (Debian 13.3.0-2) 13.3.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130300
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24250
@vasi
vasi / LockOptions IFR.txt
Created June 19, 2024 19:24
Dell XPS 7590 BIOS 1.28.0 Undervolt
0x3C6A5 VarStore: VarStoreId: 0x1 [EC87D643-EBA4-4BB5-A1E5-3F3E36B20DA9], Size: 0x17FD, Name: Setup {24 1C 43 D6 87 EC A4 EB B5 4B A1 E5 3F 3E 36 B2 0D A9 01 00 FD 17 53 65 74 75 70 00}
0x4C7CB Form: View/Configure CPU Lock Options, FormId: 0x273D {01 86 3D 27 B7 01}
0x4C7D1 One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x6ED, VarStore: 0x1, QuestionId: 0x380, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 B0 03 B1 03 80 03 01 00 ED 06 10 10 00 01 00}
0x4C7E2 One Of Option: Disabled, Value (8 bit): 0x0 {09 07 04 00 00 00 00}
0x4C7E9 One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 03 00 30 00 01}
0x4C7F0 End One Of {29 02}
0x4C7F2 One Of: Overclocking Lock, VarStoreInfo (VarOffset/VarName): 0x789, VarStore: 0x1, QuestionId: 0x381, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 AC 03 AD 03 81 03 01 00 89 07 10 10 00 01 00}
0x4C803 One Of Option: Disabled, Value (8 bit): 0x0 {09 07 04 00 00 00 00}
0x4C80A One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 03 00 30 00 0
@vasi
vasi / monarch_balances.py
Created June 1, 2024 10:41
Monarch Money balances
#!/usr/bin/env python3
from monarchmoney import MonarchMoney, LoginFailedException
import asyncio
import csv
import getpass
import json
import os
from pathlib import Path

Connect to dali via either local or remote DNS, depending on whether it appears locally. Sucks that I can't set my router to customize DNS, but so it goes, and this works fine.

To use, put in ~/.ssh/config:

Host dali
  ProxyCommand bash -c "nc $(dali-name) 22"

Can then forward other hosts thorugh the DMZ, eg:

PARALLEL_JOBS=3
USE_TMPFS=all
TMPFS_LIMIT=30
TMPFS_BLACKLIST="rust chromium electron* llvm* firefox *webkit* *webengine* libreoffice"
ZPOOL=zroot
RESOLV_CONF=/etc/resolv.conf
BASEFS=/usr/local/poudriere
USE_PORTLINT=no
TMPFS_BLACKLIST_TMPDIR="${BASEFS}/data/cache/tmp"
@vasi
vasi / inst
Created April 11, 2024 03:16
Script to build and install with poudriere
#!/bin/sh
cp ~vasi/poudriere.list ~vasi/poudriere.list.bak
cp ~vasi/poudriere.list ~vasi/.poudriere.list.tmp
for i in "$@"; do
if ! echo "$i" | grep -q /; then
echo "$i does not have a category!"
exit 1
fi
echo "$i" >> ~vasi/.poudriere.list.tmp
@vasi
vasi / touchegg
Created April 4, 2024 21:30
rc.d script for touchegg
#!/bin/sh
# PROVIDE: touchegg
# REQUIRE: DAEMON
# KEYWORD: nojail
. /etc/rc.subr
name="touchegg"
rcvar="${name}_enable"
@vasi
vasi / intel_undervolt
Created April 4, 2024 08:19
FreeBSD intel-undervolt rc script
#!/bin/sh
# PROVIDE: intel_undervolt
# REQUIRE: DAEMON
# KEYWORD: nojail
. /etc/rc.subr
name="intel_undervolt"
rcvar="intel_undervolt_enable"