Skip to content

Instantly share code, notes, and snippets.

View voutilad's full-sized avatar
🥸

Dave Voutila voutilad

🥸
View GitHub Profile
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 / 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 / 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 / .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 / 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 / Current Shell Prompt
Last active July 17, 2017 21:58
Just my current shell prompt...
# Kyle's old prompt:
# PS1="\[\033[0;33m\][\!]\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[\u.\h: \`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\W"; else echo "\\w"; fi\`]\$\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007"
# Current one that's Git-friendly:
# (make sure to grab:
# curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
# )
PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\]\[\e[1;33m\]$(__git_ps1 "(%s)")\[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'
@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