Skip to content

Instantly share code, notes, and snippets.

@wrothe
wrothe / wan_up
Last active April 21, 2023 20:13
pfsense slow boot up from modem causes no ip on wan
#!/bin/sh
# pfsense, should be compatible with most ifconfig output
# slow boot up from modem causes no ip on wan
# I believe this is fixed, documenting the work around
wan="em0"
# if inet isn't found check "status:", look for "no" in "no carrier"
currip_or_stat=$(ifconfig ${wan} | awk '/inet |status: / { printf $2 }')
@wrothe
wrothe / prefs
Created February 9, 2022 21:21
spotify proxy
# ~/Library/Application\ Support/Spotify/prefs
# socks4
network.proxy.mode=3
network.proxy.addr="localhost:8080@socks4"
# http
network.proxy.mode=2
network.proxy.addr="192.168.0.2:8080@http"
# stupid xonsh tricks
# These aren't current, 0.8.X maybe?
# https://xon.sh
from datetime import datetime
cp test @(test + datetime.now().strftime("%Y%m%d"))
# space with mtime
cp 'Dropbox (Sparkred)/serverlist' @('Dropbox (Sparkred)/serverlist' + date.fromtimestamp(os.stat('Dropbox (Sparkred)/serverlist')[8]).strftime('%F'))
# use python re

Keybase proof

I hereby claim:

  • I am wrothe on github.
  • I am wrothe (https://keybase.io/wrothe) on keybase.
  • I have a public key ASBs0SduZaoa31hcUD0TeoK_Y73KovzDEJHGpk803d5nQQo

To claim this, I am signing this object:

@wrothe
wrothe / .zshrc
Last active December 10, 2018 06:17
# I've moved this to gitlab
# The following lines were added by compinstall
zstyle ':completion:*' completer _match _complete _list _oldlist _expand _ignored _correct _approximate _prefix
zstyle ':completion:*' completions 1
zstyle ':completion:*' format 'completing %d'
zstyle ':completion:*' glob 1
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' matcher-list '' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*' 'm:{[:lower:]}={[:upper:]} m:{[:lower:][:upper:]}={[:upper:][:lower:]}'