Skip to content

Instantly share code, notes, and snippets.

View thebiss's full-sized avatar
⁉️

thebiss

⁉️
View GitHub Profile
#!/usr/bin/bash
# from: https://hub.docker.com/r/jacobalberty/unifi
set -euo pipefail
set -x
_sharedir="/var/mnt/vmshare"
mkdir -p "${_sharedir}/unifi/data"
mkdir -p "${_sharedir}/unifi/log"
@thebiss
thebiss / notes.md
Last active October 17, 2023 21:28
Chromecast Notes

Steps

  1. Listen for Chromecast, using nc

nc -v -l 808

  1. Tell chromecast to fetch a page, using catt project

catt cast_site http://192.168.1.10:8080

@thebiss
thebiss / BHVYE-under-pfsense-25.md
Last active September 19, 2022 22:45
Bhyve under PFSense 2.5
@thebiss
thebiss / music-bsd.sh
Created April 13, 2021 00:30
Adaptation of Antonio Macchi's music player, for freebsd sh (from https://tldp.org/LDP/abs/html/devref1.html#MUSICSCR)
#!/bin/sh
# music.sh
# Music without external files
# Author: Antonio Macchi
# Used in ABS Guide with permission.
#
# revised for SH by BB
# 1. Some echo's don't support -e -n, so use printf instead
@thebiss
thebiss / dnsfix.sh
Last active April 26, 2021 23:22
Fix Windows Subsystem for Linux DNS after connecting to a VPN
#
# Refresh WSL's DNS
# for .bashrc
#
type dnsfix &> /dev/null
if [ $? -ne 0 ]; then
dnsfix () {
local search=$(grep -F "search" /etc/resolv.conf);
local ipv4dnsraw=$(/mnt/c/Windows/system32/netsh.exe interface ip show dns | tr -d '\r');
local ipv6dnsraw=$(/mnt/c/Windows/system32/netsh.exe interface ipv6 show dns | tr -d '\r');
@thebiss
thebiss / boot.sh
Last active December 3, 2019 14:36
RancherOs v1.5.4 on pfSense v2.4.4. Requires grub2-bhyve-0.40_4
#!/bin/sh
grub-bhyve -r host -M 1024 -d . -m device.map rancherOs1 < grub.cfg
grub_exit=$?
if [ $grub_exit -ne 0 ] ; then
echo "Not starting. grub exited code ${grub_exit}"
fi