Skip to content

Instantly share code, notes, and snippets.

@rantt
rantt / timelapse.sh
Created April 16, 2015 00:09
Timelapse Script
#!/bin/bash
while [ 1 ];do vardate=$(date +%d\-%m\-%Y\_%H.%M.%S); screencapture -t jpg -x ~/gamedev/vidcaps/timelapse/$vardate.jpg; sleep 10; done
#Run ffmpeg after to turn jpg's into video
#ffmpeg -i '%*.jpg' -r 30 -q:v 2 timelapse.mp4
@rantt
rantt / shib_attr.md
Last active January 25, 2018 22:10
Shibboleth 2 IdP - Adding Attributes

This assumes that you already have the Shibboleth IdP installed. If you haven't done that yet you can read how to set it up at Install CAF FedSSO (Shibboleth) w/ idp-caf-installer

Tasks

Allow the following attributes to be released from our Identity Provider (IdP) to a Service Provider (SP). In this case I'll be giving access to testshib.org and CAF (eduroam). Since I don't have an SP I use testshib.org so I can see what gets processed on the SP side.

  • eduPersonTargetedID: unique id autogenerated by Shibboleth
  • eduPersonPrincipalName: if you’re using the CAF installer, this will be built from the “sAMAccountName” field in AD with @domain.ca on the end (for example, “[email protected]”)
  • mail: email address, comes from “mail” field in AD (example: [email protected])
@rantt
rantt / rm_kern.sh
Last active December 19, 2015 21:29
Remove Unused Kernels
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge