Skip to content

Instantly share code, notes, and snippets.

View voutilad's full-sized avatar
🥸

Dave Voutila voutilad

🥸
View GitHub Profile
@voutilad
voutilad / freebsd-manual-install.md
Last active May 29, 2019 16:58
Manually Installing FreeBSD with ZFS root capable of Boot Environments

Use Case

I want to:

  1. dual boot macOS Sierra and FreeBSD 12-CURRENT (or HardenedBSD 12-CURRENT),
  2. use rEFInd to manage EFI boot selection,
  3. use ZFS for my root disk laid out to support boot environments (via beadm)

The current guided installer only does a full root ZFS install when using the whole disk, which defeats #1 above.

Let's do this

Less talkin' more walkin'...

@voutilad
voutilad / 90-macbook-air-dpi.conf
Created April 27, 2017 16:03
Setting proper X11 (Xorg) DPI settings for 11" macbook air
Section "Monitor"
Identifier "Monitor0"
DisplaySize 257 144 # In millimeters
EndSection
Section "InputClass"
Identifier "Keyboard Setting"
MatchIsKeyboard "yes"
Option "XkbOptions" "ctrl:swapcaps"
EndSection
@voutilad
voutilad / bl-brightness
Created April 27, 2017 18:55
Backlight brightness control for MacBook Air 11" on Gentoo using Intel driver. (Adapted from https://wiki.gentoo.org/wiki/Apple_Macbook_Pro_Retina_(early_2013)#Display_backlight)
#!/bin/bash
bldb='/sys/class/backlight/intel_backlight/brightness'
step=113
current=`cat $bldb`
new=$current
if [ "$1" == "up" ];then
new=$(($current + $step))
elif [ "$1" == "down" ];then
new=$(($current - $step))
fi

Keybase proof

I hereby claim:

  • I am voutilad on github.
  • I am dave_voutila (https://keybase.io/dave_voutila) on keybase.
  • I have a public key ASDq8gNV2pXnaX4dYUH7sysTMXbY69_WM5BFJ7ncpzPC5Ao

To claim this, I am signing this object:

XTerm.termName: xterm-256color
! Colors
URxvt*background: #000000
URxvt*foreground: #B2B2B2
! black
URxvt*color0: #000000
URxvt*color8: #686868
! red
URxvt*color1: #B21818
URxvt*color9: #FF5454
@voutilad
voutilad / vmm-alpine.sh
Created May 29, 2017 15:16
Installing Alpine Linux in OpenBSD's VMM Hypervisor
# Assuming you're a regular user that has doas allowances for vmctl
mkdir -p ~/vmm
cd ~/vmm
# Grab the the one of the virt iso's of Alpine Linux
curl https://nl.alpinelinux.org/alpine/v3.6/releases/x86_64/alpine-virt-3.6.0-x86_64.iso -o alpine-virt-3.6.0-x86_64.iso
# Make a new virtual disk image, change the size as needed
vmctl create alpine-virt.img -s 6G
@voutilad
voutilad / avahi-daemon.conf
Created May 29, 2017 16:08
Snippet of my avahi-daemon.conf on OpenBSD
### ...stuff above
[server]
host-name=hondje
domain-name=local
#browse-domains=0pointer.de, zeroconf.org
use-ipv4=yes
use-ipv6=yes
#allow-interfaces=eth0
deny-interfaces=vether0
@voutilad
voutilad / extlinux.conf
Last active September 14, 2017 02:03
Example extlinux.conf for Alpine Linux to use in OpenBSD's VMM
SERIAL 0 115200
DEFAULT hardened
PROMPT 0
LABEL hardened
MENU LABEL Linux hardened
LINUX vmlinuz-hardened
INITRD initramfs-hardened
APPEND root=UUID=001c5e4f-af70-4f6f-bdbc-ceff9d23c6f3 modules=sd-mod,usb-storage,ext4 rootfstype=ext4 console=ttyS0,115200
@voutilad
voutilad / docker_nuke.sh
Created June 5, 2017 13:24
Delete all Docker images including intermediates
#!/bin/bash
docker images --format "{{.ID}}" -a | xargs docker rmi -f