Skip to content

Instantly share code, notes, and snippets.

View larsfuehrer's full-sized avatar
🏠
Working from home

Lars Fuehrer larsfuehrer

🏠
Working from home
  • Rostock, Germany
View GitHub Profile
mydir=/home/ec2-user/certs
truststore=${mydir}/rds-truststore.jks
storepassword=sysbench
mkdir /home/ec2-user/certs
curl -sS "https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem" > ${mydir}/rds-combined-ca-bundle.pem
awk 'split_after == 1 {n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1}{print > "rds-ca-" n ".pem"}' < ${mydir}/rds-combined-ca-bundle.pem
for CERT in rds-ca-*; do
alias=$(openssl x509 -noout -text -in $CERT | perl -ne 'next unless /Subject:/; s/.*(CN=|CN = )//; print')
@larsfuehrer
larsfuehrer / add-github-orgs-to-user-meta.js
Created March 7, 2021 09:58 — forked from aslafy-z/add-github-orgs-to-user-meta.js
Auth0 rule to check organization of Github users
// Auth0 custom rule
// Add Github Organizations to the user metadata
//
// This rule need the following configurations values
// AUTH0_DOMAIN_NAME: your auth0 domain name
// MANAGEMENT_CLIENT_ID: your auth0 management api client id
// MANAGEMENT_CLIENT_SECRET: your auth0 management api client secret
//
// You have to create an Management API Application with proper
// scope to allow rule to fetch user organizations.
@larsfuehrer
larsfuehrer / get-terragrunt
Created February 27, 2021 11:06
Script to get Terragrunt
#!/usr/bin/env bash
: ${BINARY_NAME:="terragrunt"}
: ${USE_SUDO:="true"}
: ${DEBUG:="false"}
: ${TERRAGRUNT_INSTALL_DIR:="/usr/local/bin"}
HAS_CURL="$(type "curl" &> /dev/null && echo true || echo false)"
HAS_WGET="$(type "wget" &> /dev/null && echo true || echo false)"
@larsfuehrer
larsfuehrer / get-helmfile
Created February 27, 2021 10:06
Script to get Helmfile
#!/usr/bin/env bash
: ${BINARY_NAME:="helmfile"}
: ${USE_SUDO:="true"}
: ${DEBUG:="false"}
: ${HELMFILE_INSTALL_DIR:="/usr/local/bin"}
HAS_CURL="$(type "curl" &> /dev/null && echo true || echo false)"
HAS_WGET="$(type "wget" &> /dev/null && echo true || echo false)"
@larsfuehrer
larsfuehrer / get-kubeval
Last active February 27, 2021 10:02
Script to get Kubeval
#!/usr/bin/env bash
: ${BINARY_NAME:="kubeval"}
: ${USE_SUDO:="true"}
: ${DEBUG:="false"}
: ${KUBEVAL_INSTALL_DIR:="/usr/local/bin"}
HAS_CURL="$(type "curl" &> /dev/null && echo true || echo false)"
HAS_WGET="$(type "wget" &> /dev/null && echo true || echo false)"
@larsfuehrer
larsfuehrer / get-velero
Last active February 27, 2021 10:04
Script to get Velero
#!/usr/bin/env bash
: ${BINARY_NAME:="velero"}
: ${USE_SUDO:="true"}
: ${DEBUG:="false"}
: ${VELERO_INSTALL_DIR:="/usr/local/bin"}
HAS_CURL="$(type "curl" &> /dev/null && echo true || echo false)"
HAS_WGET="$(type "wget" &> /dev/null && echo true || echo false)"