Skip to content

Instantly share code, notes, and snippets.

View baszoetekouw's full-sized avatar

Bas Zoetekouw baszoetekouw

View GitHub Profile
@baszoetekouw
baszoetekouw / edugain-entity.sh
Last active September 30, 2016 08:30
Fetch a specific entity from edugain
#!/bin/sh
set -e
MDS=http://mds.edugain.org/
MDSCACHE=/tmp/edugain.mds.xml
MAXAGE=3600
ENTITY=$1
AGE=$(expr $MAXAGE + 1)
if [ -e $MDSCACHE ]; then
#!/bin/bash
#
# This script can be used to generate/renew/refresh Letsencrypt SSL certificates
# Simply edit the config variables below, and run it (as root, or make sure your user has access to write to all approriate directories).
# It depends on acem-tiny (https://github.com/diafygi/acme-tiny) for the actual interaction with the Letsencrypt ACME service
#
set -e
# base dir where Letsencrypt this script is installed and acme-tiny is checked out
@baszoetekouw
baszoetekouw / gist:291a7d4898a77822861fd6d3bd3f57b5
Created April 13, 2016 12:40
script that works both in /etc/pm/sleep.d and /lib/systemd/system-sleep
#!/bin/sh
set -e
# support both /etc/pm/sleep.d and /lib/systemd/system/sleep arguments
if [ -z "$2" ]
then
# old-style /etc/pm format
if [ "$1" = "suspend" ]; then STAGE="pre"; TYPE="sleep"; fi