Skip to content

Instantly share code, notes, and snippets.

@gonzoua
gonzoua / au-select.sh
Created November 23, 2018 19:52
dialog(1)-based audio device selection for FreeBSD
#!/bin/sh
: ${DIALOG_CANCEL=1}
IFS="
"
UNITS=""
for dev in $(cat /dev/sndstat | fgrep '(play'); do
unit=$(echo $dev | sed s/^pcm// | sed 's/:.*//')
description=$(echo $dev | sed 's/.*<//' | sed 's/>.*//')
@x29a
x29a / update.sh
Created January 7, 2017 20:41
SPDYN/SPDNS update via bash
#!/bin/bash
# registered domains. might be the same for v4 and v6
DOMAINV4=foobar.my-router.de
DOMAINV6=${DOMAINV4}
# generated token for each domain
TOKENV4=abcd-abcd-abcd
TOKENV6=abcd-abcd-abcd
@jperkin
jperkin / smartos-pppoe-router.md
Last active September 8, 2024 13:06
SmartOS PPPoE Router (AAISP, v6, DNS/DHCP)

Intro

This documents my setup of a SmartOS server as my PPPoE router, providing DNS/DHCP services to the local network.

Basic setup:

  • DSL modem (VMG1312) in bridge mode handling the DSL connection
  • 192.168.1.0/24 local network
  • 192.168.1.5 will be the IP address of the router zone
  • e1000g0 is the configured internal 'admin' interface