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 / 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
@vasi
vasi / binscan
Last active March 28, 2024 00:39
Scanning distfiles
#!/bin/sh
base="$HOME/binscan"
reg="$base/reg"
new="$base/new"
empty="$base/empty"
tmp="$base/tmp"
scan() {
file="$1"