Skip to content

Instantly share code, notes, and snippets.

View sthen's full-sized avatar
💭
(⧖)

Stuart Henderson sthen

💭
(⧖)
  • Ottery St. Mary, Devon, UK
View GitHub Profile
# routeros netwatch config to attempt to reset a crashed LTE modem
/tool netwatch add down-script="/system scheduler remove [find where name~\"RePowerUSBv\"];\
\n/system scheduler add name=RePowerUSBv1 interval=5m on-event={/system scheduler remove [find where name=RePowerUSBv1]; /system routerboard usb power-reset duration=3};\
\n/system scheduler add name=RePowerUSBv2 interval=7m on-event={/system scheduler remove [find where name=RePowerUSBv2]; /interface lte disable [find]; delay 3s; /interface lte enable [find]};\
\n/system scheduler add name=RePowerUSBv3 interval=15m on-event={/system scheduler remove [find where name=RePowerUSBv3]; /system reboot};" host=1.1.1.1 interval=30s timeout=4s up-script="/system scheduler remove [find where name~\"RePowerUSBv\"];"
#!/bin/ksh
# diffsyms='for i in `make print-plist | perl -n -e "print if s/\@lib //" | sed s,^,/usr/local/, `; do check_sym.ports $i; done'
get_lib_name()
{
sed -n 's/^[ ]*LIB[ ]*=[ ]*\([^ ]*\).*/\1/p' "$@"
}
pick_highest()

Keybase proof

I hereby claim:

  • I am sthen on github.
  • I am sthen (https://keybase.io/sthen) on keybase.
  • I have a public key whose fingerprint is 93BD 0833 1FE2 0999 BDF1 01ED 9D17 51E8 EF16 D5B0

To claim this, I am signing this object:

@sthen
sthen / vipkg
Created February 8, 2012 22:09
#!/bin/sh
# ^^^^^^^ the sign of a high-quality 5-minute hack job :)
# visual editor to run pkg_delete or mark packages as auto/manual installed
# released to the public domain.
log() {
echo "$*" >> /tmp/vipkg.log
echo "$*"
}