Skip to content

Instantly share code, notes, and snippets.

View voutilad's full-sized avatar
🥸

Dave Voutila voutilad

🥸
View GitHub Profile
@voutilad
voutilad / smtpd.conf
Last active December 5, 2017 02:23
Example smtpd.conf for relay different Gmail accounts
# $OpenBSD: smtpd.conf,v 1.9 2016/05/03 18:43:45 jung Exp $
# This is the smtpd server system-wide configuration file.
# See smtpd.conf(5) for more information.
table aliases file:/etc/mail/aliases
table secrets file:/etc/mail/secrets
# To accept external mail, replace with: listen on all
#
@voutilad
voutilad / fstab
Created September 17, 2017 00:42
Alpine Example /etc/fstab
UUID=700e8051-4707-4ad4-b8c9-cee9ca8fbd7c / ext4 rw,relatime,data=ordered 0 0
UUID=2eb35135-0ce4-42ff-bbe6-aa9c1ce1234c /boot ext4 rw,relatime,data=ordered 0 0
UUID=2a912f13-7e3b-4a15-935d-e9710f8d2c9e swap swap defaults 0 0
UUID=2fc3aff6-5a80-4ef7-809b-33de8a3ceb17 /data ext4 rw,relatime,user 0 0
/dev/cdrom /media/cdrom iso9660 noauto,ro 0 0
/dev/fd0 /media/floppy vfat noauto 0 0
/dev/usbdisk /media/usb vfat noauto 0 0
@voutilad
voutilad / tar_exclude.sh
Created June 9, 2017 01:01
POSIX `tar` excluding a file/directory
tar -cvf ../standalone/mybackup.tar $(ls /var/postgresql/data | grep -v -e 'pg_xlog')
@voutilad
voutilad / .profile
Created June 7, 2017 21:19
KSH PS1 settings for ok color
export PS1="$(printf "\033[1;32m%s\033[;37m@\033[1;33m%s\033[0m$ " $(logname) $(hostname -s))"
@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
@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 / 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 / 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
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

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: