Skip to content

Instantly share code, notes, and snippets.

@dploeger
dploeger / getawspolicydocuments.fish
Last active December 5, 2023 09:44
Get all customer managed AWS policy documents (in Fish)
for POLICYARN in (aws iam list-policies --scope Local | jq -r .Policies[].Arn)
for POLICYVERSION in (aws iam list-policy-versions --policy-arn $POLICYARN | jq -r .Versions[].VersionId)
echo $POLICYARN/$POLICYVERSION
aws iam get-policy-version --policy-arn $POLICYARN --version-id $POLICYVERSION
end
end
@dploeger
dploeger / loki-expressions.md
Created January 18, 2023 10:02
Loki pattern expressions for common log formats
  • Apache commons logger
<source> - - [<timestamp>] "<method> <url> <type>" <status> <bytes>
@dploeger
dploeger / Elgg.php
Last active July 18, 2022 07:30
FileGator Elgg Auth Adapter
<?php
/*
* Elgg Auth Adaptor for FileGator (https://filegator.io)
* (c) 2022 Waldbühne Heessen
*/
namespace Filegator\Services\Auth\Adapters;
use Filegator\Services\Auth\AuthInterface;
use Filegator\Services\Auth\User;
@dploeger
dploeger / azure.tf.handlebars
Last active September 29, 2021 10:14
AWS to Azure Terraform script
resource "azurerm_dns_zone" "{{ resourceName zone }}" {
name = "{{ zone }}"
resource_group_name = {{ resourceGroupVar }}
}
{{#each records}}
{{#with this}}
{{#if (isRecordType "A" type)}}
resource "azurerm_dns_a_record" "{{ resourceName name }}_{{ resourceName ../zone }}" {
name = "{{ name }}"
@dploeger
dploeger / LookingForFemaleWriters.md
Last active June 21, 2021 20:16
TeammateCallSafeHouse

Hi there.

I'm currently working on the narrative point and click game Safe House, which will be released as a free game when it's done. For that I'm currently searching for female writers (and possibly voice artists). I have three female characters in the cast and as a white cis-man I probably can't write them good enough. The characters are Marjorie, a black woman (cis, the main character; unspecified occupation), Rebeca, a female latin police detective (cis or non-binary) and Brianna, a female district attorney (cis or non-binary).

Here's the abstract of the game:

A mob murder witness is taken into a safe house by the police for five days before her testimony. Although she's protected by two police officers, the house might not be as safe as everybody thinks.

If you're interested, please check out the in-progress game design document over at Github: https://github.com/deep-entertainment/safehouse/blob/main/design/Safe%20House%20-%20Game%20Design%20Document.md

@dploeger
dploeger / tampermonkey.foremanswitchtodashboard.user.js
Last active June 16, 2020 09:48
Tampermonkey script to automatically switch from hosts view to dashboard in Foreman
// ==UserScript==
// @name foremanswitchtodashboard
// @namespace https://kps.com/
// @version 0.1
// @description Switch from Foreman hosts view to dashboard
// @author Dennis Ploeger <dennis.ploeger@kps.com>
// @grant none
// @downloadUrl https://gist.github.com/dploeger/7116408c9ea7155f4ed22cec8514ea4f/raw
// @updateUrl https://gist.github.com/dploeger/7116408c9ea7155f4ed22cec8514ea4f/raw
// ==/UserScript==
@dploeger
dploeger / tampermonkey.grayloglogin.user.js
Last active June 16, 2020 09:45
Tampermonkey script to automatically login into graylog
// ==UserScript==
// @name Graylog login
// @namespace https://kps.com/
// @version 0.1
// @description Automatically logs in into Graylog
// @author Dennis Ploeger <dennis.ploeger@kps.com>
// @grant none
// @downloadUrl https://gist.github.com/dploeger/5f51c3ea9046a35f386d6bf376fbfa83/raw
// @uploadUrl https://gist.github.com/dploeger/5f51c3ea9046a35f386d6bf376fbfa83/raw
// ==/UserScript==
@dploeger
dploeger / tampermonkey.foremanlogin.user.js
Last active June 16, 2020 09:41
Tampermonkey script to automatically login into Foreman
// ==UserScript==
// @name Foreman Autologin
// @namespace https://kps.com/
// @version 0.2
// @description Automatically login into Foreman
// @author Dennis Ploeger <dennis.ploeger@kps.com>
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// @grant none
// @downloadUrl https://gist.github.com/dploeger/30d5c0e3bed70b1fbb06a45a6d7a6ced/raw
// @updateUrl https://gist.github.com/dploeger/30d5c0e3bed70b1fbb06a45a6d7a6ced/raw
@dploeger
dploeger / tampermonkey.autologinelastichq.user.js
Last active June 16, 2020 09:50
Tampermonkey script to automatically login into Elastic HQ
// ==UserScript==
// @name Autologin ElasticHQ
// @namespace https://kps.com/
// @version 0.3
// @description Login into ElasticHQ
// @author Dennis Ploeger <dennis.ploeger@kps.com>
// @grant none
// @downloadUrl https://gist.github.com/dploeger/c30aeeaf1fa5fe8f2a5b2b3b6a58abec/raw
// @updateUrl https://gist.github.com/dploeger/c30aeeaf1fa5fe8f2a5b2b3b6a58abec/raw
// ==/UserScript==
@dploeger
dploeger / tampermonkey.xymonalarm.user.js
Last active June 16, 2020 09:35
Tampermonkey script to ring a bell an xymon alerts
// ==UserScript==
// @name Alarm on Xymon alert
// @namespace https://kps.com/
// @version 0.2
// @description Run an alert on Xymon reds
// @author Dennis Ploeger <dennis.ploeger@kps.com>
// @grant none
// @downloadUrl https://gist.githubusercontent.com/dploeger/3ad7dbc7f22d9e1f5991b0553fa569c0/raw
// @updateUrl https://gist.githubusercontent.com/dploeger/3ad7dbc7f22d9e1f5991b0553fa569c0/raw
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js