Skip to content

Instantly share code, notes, and snippets.

View vasi's full-sized avatar

Dave Vasilevsky vasi

  • Stripe
  • Montreal
View GitHub Profile
@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"
@vasi
vasi / 01-hybrid.conf
Last active April 2, 2024 01:20
Xorg conf for hybrid graphics
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
@vasi
vasi / 99-oss-default.conf
Created April 1, 2024 18:51
Proxy ALSA to OSS
pcm.!default {
type oss
}
ctl.!default {
type oss
}
@vasi
vasi / dnsmasq.conf
Created March 31, 2024 08:46
dnsmasq.conf
port=0
no-resolv
server=1.1.1.1
except-interface=lo0
bind-interfaces
local-service
dhcp-authoritative
dhcp-option=option:dns-server,1.1.1.1
interface=bridge0
dhcp-range=10.1.1.11,10.1.1.99