Skip to content

Instantly share code, notes, and snippets.

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

Thorsten Hoeger hoegertn

🏠
Working from home
View GitHub Profile
@hoegertn
hoegertn / init.py
Created September 14, 2020 09:04
CDK bootstrap helper
import json
import inquirer
import boto3
import os
import sys
import subprocess
def select_account():
@hoegertn
hoegertn / README.md
Created August 17, 2019 11:10
SSM Instance Connect
  1. Copy the file ssm-connect to a folder in your path
  2. Run ssm-connect setup, it will create a new SSH key-pair and configure SSH config
  3. Use it like ssh user@i-1234567890
@hoegertn
hoegertn / index.js
Last active December 23, 2021 03:16
Rich Social Sharing with CloudFront
exports.handler = (event, context, callback) => {
'use strict';
const request = event.Records[0].cf.request;
const userAgent = request.headers['user-agent'][0].value;
let prerender = 0;
// user agent is known social bot
if (userAgent.match(/baiduspider|twitterbot|facebookexternalhit|googlebot|bingbot|yandex|rogerbot|linkedinbot|embedly|quora link preview|showyoubot|outbrain|pinterest|slackbot|vkShare|W3C_Validator/i)) {
prerender = 1;
}
@hoegertn
hoegertn / gist:9296992
Last active August 29, 2015 13:56
Install CloudConductor-Agent
#!/bin/bash
# USERDATA
# $CLOUDCONDUCTOR_URL=host:port
# $TEMPLATE_NAME=name of the template to use
yum -y update
# EPEL repo
rpm -ivh http://ftp.tu-chemnitz.de/pub/linux/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
@hoegertn
hoegertn / gist:9296926
Last active August 29, 2015 13:56
Install CloudConductor
#!/bin/bash
# USERDATA
# $BUCKET=s3 bucket
yum -y update
# EPEL repo
rpm -ivh http://ftp.tu-chemnitz.de/pub/linux/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
yum -y clean all
@hoegertn
hoegertn / init script
Created September 14, 2012 21:07
stunnel init script
#!/bin/sh
#
# stunnel Start/Stop the stunnel daemons
#
# description: stunnel is a script that runs stunnel daemons
# version 1.00
#
# chkconfig: 345 40 60
#
# processname: stunnel