Skip to content

Instantly share code, notes, and snippets.

@acobaugh
acobaugh / gist:5aecffbaaa593d80022b3534e5363a2d
Created August 11, 2017 02:32
MIT Kerberos Logstash filter
# Kerberos krb5kdc/kadmind/kpropd
if [program] == "kadmind" {
grok {
match => { "syslog_msg" => "^Request: %{DATA:kadmind_request}, client=%{DATA:kadmind_client}, service=%{DATA:kadmind_service}, addr=%{IP:kadmind_addr}$" }
match => { "syslog_msg" => "^%{DATA:kadmind_other}$" }
add_tag => [ "kadmind" ]
}
}
if [program] == "krb5kdc" {
grok {
xbps-install -S
xbps-install void-repo-nonfree
xbps-install -S
xbps-install \
alacritty artwiz-fonts base-system bc chromium cryptsetup dmenu docker feh firefox fluxbox git git-crypt gkrellm google-fonts-ttf grub-i-efi grub-x-efi lvm lxdm lxdm-theme-vdojo mdadm network-manager-applet notify-osd notify-send.sh ntp-p ohsnap-font pass pavucontrol pm-utils redshift screen setxkbmap slock terraform tlp upower vim xautolock xf-input-synaptics xf-video-fbdev xf-video-intel xfontsel xmodmap xorg-fonts xorg-input-drivers xrdb xterm zsh clearlooks-phenix-darkpurpy-theme pulseaudio
@acobaugh
acobaugh / rebuild_fstab.sh
Created April 24, 2019 15:47
A silly little script to potentially rebuild an fstab file based on the contents of mtab.
#!/usr/bin/env bash
while read line ; do
if [ "$(echo $line | egrep '^\/dev\/sd')" != "" ] ; then
dev="$(echo $line | awk '{ print $1 }')"
id="$(blkid $dev | awk '{ print $2 }')"
echo $line | sed -e "s|$dev|$id|"
else
echo $line
fi
@acobaugh
acobaugh / gist:656d671c13adfa83a3492ceb0bfe188f
Last active August 17, 2019 05:07
Terraform get only symlinks first missing instance of local module
% TF_LOG=trace tf get
2019/08/17 01:01:33 [INFO] Terraform version: 0.12.6
2019/08/17 01:01:33 [INFO] Go runtime version: go1.12.7
2019/08/17 01:01:33 [INFO] CLI args: []string{"/usr/bin/terraform", "get"}
2019/08/17 01:01:33 [DEBUG] Attempting to open CLI config file: /home/acobaugh/.terraformrc
2019/08/17 01:01:33 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/08/17 01:01:33 [INFO] CLI command args: []string{"get"}
2019/08/17 01:01:33 [TRACE] ModuleInstaller: installing child modules for . into .terraform/modules
2019/08/17 01:01:33 [DEBUG] Module installer: begin acm
2019/08/17 01:01:33 [TRACE] ModuleInstaller: Module installer: acm 2.2.0 already installed in .terraform/modules/acm/terraform-aws-modules-terraform-aws-acm-1318df0
@acobaugh
acobaugh / git-crypt-list-keys.sh
Created September 29, 2017 15:23
List git-crypt gpg keys
for key in .git-crypt/keys/default/0/* ; do gpg -k $(echo $(basename $key) | sed -e 's/.gpg//') ; done ;