Skip to content

Instantly share code, notes, and snippets.

@Dunedan
Dunedan / usr.games.pyrogenesis
Created Mar 30, 2018
apparmor profile for 0ad
View usr.games.pyrogenesis
#include <tunables/global>
/usr/games/pyrogenesis {
#include <abstractions/audio>
#include <abstractions/base>
#include <abstractions/dbus-session-strict>
#include <abstractions/freedesktop.org>
#include <abstractions/nameservice>
#include <abstractions/nvidia>
#include <abstractions/wayland>
View ruby_revealer.sh
#!/usr/bin/sudo sh
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+.
## From `strings ruby_concealer.so`:
##
## > This obfuscation is intended to discourage GitHub Enterprise customers
## > from making modifications to the VM.
##
## Well, good, as long as its not intended to discourage *me* from doing this!
@Dunedan
Dunedan / respawn.sh
Last active Mar 24, 2017
Executes the command provided as argument and respawns it if it got terminated.
View respawn.sh
#!/bin/sh
# Executes the command provided as argument and respawns it if it got
# terminated.
#
# Licensed under CC0 <https://creativecommons.org/publicdomain/zero/1.0/>
$@ &
PID=$!
while :
@Dunedan
Dunedan / aws-s3-get-bucket-lifecycles.sh
Last active May 2, 2018
Small bash script to get the lifecycle transitions of all buckets in an AWS account.
View aws-s3-get-bucket-lifecycles.sh
#!/bin/bash
# Licensed under CC0 <https://creativecommons.org/publicdomain/zero/1.0/>
AWS_PROFILE="default"
BUCKETS=$(aws --profile $AWS_PROFILE s3api list-buckets --query 'Buckets[*].Name' --output text)
echo -e "bucket name\tstatus of the transition\tprefix the transition applies to\tdays after which the transition applies\tto storage class\tdelete after days\tdescription"
for bucket in $BUCKETS; do
@Dunedan
Dunedan / otp.sh
Last active Apr 10, 2017
OTP token generation script
View otp.sh
#!/bin/sh
# Reads OTP secrets belonging to an readable name from a file and generates OTP
# tokens. The secrets should be in a file, separated by a colon.
# E.g. test:secretkey
#
# Works really nicely together with an alias:
# alias otp='~/otp.sh'
#
# Licensed under CC0 <https://creativecommons.org/publicdomain/zero/1.0/>
You can’t perform that action at this time.