Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I'm just a thin layer on top of AWS

Günter Grodotzki lifeofguenter

💭
I'm just a thin layer on top of AWS
View GitHub Profile
View supervise.config
# supervisor
#
# Author: Günter Grodotzki <gunter@grodotzki.co.za>
# Version: 2015-04-25
#
# - set param "SUPERVISE=enable" to activate
# - chmod +x supervise.sh
#
packages:
yum:
@lifeofguenter
lifeofguenter / Dockerfile
Created May 10, 2021
Multistep Docker build with Golang
View Dockerfile
# builder
FROM golang:1.16-buster AS builder
ARG DEBIAN_FRONTEND="noninteractive"
RUN set -ex && \
apt-get -qq update && apt-get -y -qq install \
gcc
WORKDIR /go/src/app
View Dockerfile
ARG spinnaker_version
FROM us-docker.pkg.dev/spinnaker-community/docker/front50:spinnaker-${spinnaker_version}
COPY services/front50/*.yml /opt/front50/config/
COPY spinnaker.yml /opt/front50/config/
@lifeofguenter
lifeofguenter / entrypoint.sh
Last active Jun 10, 2020
Dynamically set php-fpm workers in docker containers.
View entrypoint.sh
#!/usr/bin/env bash
set -eo pipefail
logger() {
printf '%s (%s) %s [%s]: %s\n' "$(date)" "$(whoami)" "${BASH_SOURCE}" "${1}" "${2}"
}
# determine maxprocs according to cgroup-mem-limit
memory_available="$(cat /sys/fs/cgroup/memory/memory.limit_in_bytes)"
View firefox.desktop
[Desktop Entry]
Name=Firefox
Comment=Web Browser
GenericName=Web Browser
X-GNOME-FullName=Firefox Web Browser
Exec=env MOZ_ACCELERATED=1 MOZ_WEBRENDER=1 /opt/firefox/firefox %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/opt/firefox/browser/chrome/icons/default/default128.png
@lifeofguenter
lifeofguenter / EventHandlers.vbs
Created Jun 28, 2019
hMailServer: remove/anonymise "received" header from outgoing emails
View EventHandlers.vbs
' Anonymise "Received" header on outgoing emails
Sub OnAcceptMessage(oClient, oMessage)
' Only delete received headers from own clients/submissions
If Len(oClient.Username) > 0 Then
Dim oHeaders
set oHeaders = oMessage.Headers
Dim i
For i = oHeaders.Count -1 To 0 Step -1
@lifeofguenter
lifeofguenter / jenkins-cleanup-nodes.sh
Created Mar 23, 2018
cleanup offline nodes (jenkins / ecs)
View jenkins-cleanup-nodes.sh
#!/usr/bin/env bash
throw_exception() {
echo "Ooops!"
echo 'Stack trace:' 1>&2
while caller $((n++)) 1>&2; do :; done;
exit 1
}
set -E
@lifeofguenter
lifeofguenter / lighttpd-libressl.patch
Last active Dec 8, 2018
Lighttpd 1.4.35 + LibreSSL 2.0.5 Patch
View lighttpd-libressl.patch
--- a/configure 2014-08-11 12:45:44.000000000 +0200
+++ b/configure 2014-08-11 12:52:00.000000000 +0200
@@ -14330,9 +14330,9 @@
if test "x$use_openssl" = "xyes"; then
- if test "x$use_kerberos" != "xyes"; then
- CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_KRB5"
- fi
+# if test "x$use_kerberos" != "xyes"; then
@lifeofguenter
lifeofguenter / Z
Last active Nov 11, 2018
NZBGet Transcoders
View Z
#!/bin/bash
##############################################################################
### NZBGET POST-PROCESSING SCRIPT ###
# Move files if all daisy-chained PP prior succeeded.
# Version: 0.1.0
#
#
# NOTE: For support visit the forum thread: http://nzbget.net/forum/viewtopic.php?f=8&t=1265
@lifeofguenter
lifeofguenter / aws.sh
Created Nov 7, 2018
bash_profile functions
View aws.sh
# will search either by instance-name or instance-id
# on instance-id it will return the first match, on instance-name it will return all matches
# will iterate through all your ~/.aws/credentials profiles
#
# Usage: aws-find-ec2 NAME-OR-INSTANCE-ID
# Example output:
# ~  aws-find-ec2 i-1234567abcdefghijk
# - checking company-master...
# - checking company-development...
# asg-platform / i-1234567abcdefghijk / 172.0.1.200