Skip to content

Instantly share code, notes, and snippets.

View mhogerheijde's full-sized avatar

Matthias Hogerheijde mhogerheijde

View GitHub Profile
@mhogerheijde
mhogerheijde / keybase.md
Last active December 29, 2018 13:52
Keybase.io proof

Keybase proof

I hereby claim:

  • I am mhogerheijde on github.
  • I am mhogerheijde (https://keybase.io/mhogerheijde) on keybase.
  • I have a public key ASDjPLCPfPei5Myst6RGx6Wknw-dPMUCikH_koGYngPxfQo

To claim this, I am signing this object:

@mhogerheijde
mhogerheijde / Vagrantfile
Created September 9, 2017 17:22
Vagrantfile to create a target host to install AWX on.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y python python-pip
pip install docker-py
@mhogerheijde
mhogerheijde / prune-boot.zsh
Last active December 1, 2016 09:19
Prune boot linux packages
# This file can/should be sourced (add "source prune-boot.zsh" to your ~/.zshrc)
confirm () {
# call with a prompt string or use a default
echo -n "${1:-Are you sure?} [y/N] "
read response
case $response in
[yY][eE][sS]|[yY])
true
;;
var global;
var SaxonJS = function () {
// "use strict";
// Copyright (c) Saxonica Limited 2016
var platform = {};
// The following #include directives are used by the Build.java tool to concatenate all modules
@mhogerheijde
mhogerheijde / Yubikey remove autolock session
Last active March 2, 2016 08:42
Automatically lock current session when your Yubikey is removed (or when any other event happens).
#!/bin/bash
log="/var/log/yubilock.log"
#yubimap="/etc/sysconfig/yubikeys"
userid=`ps auxn | grep -v root | grep gnome-session | head -n 1 | awk '{print $1}'`
user=`id -nu $userid`
sessionids=`/bin/loginctl list-sessions | grep ${user} | awk '{print $1}'`
for id in $sessionids; do
echo "$(date) [SCREENLOCK] $user $id '$0' '$1'" >> ${log}
/bin/loginctl lock-session $id