Skip to content

Instantly share code, notes, and snippets.

@TimoDJatomika
TimoDJatomika / consul-docker-config.sh
Last active December 24, 2018 17:36
setup of a high availability vault cluster: consul setup
#!/bin/bash
# author: Timo Stankowitz <[email protected]>
# version: 6
# last (working) test: 2018-12-24
# prerequirement: all instances must have the "aws tag" "Cluster" with the value of "vault-cluster"
# create directories
mkdir consul-persistent-data
mkdir consul-config
@TimoDJatomika
TimoDJatomika / config-other-consul-instance.sh
Last active January 18, 2018 09:12
setup of a high availability vault cluster: other instances - setup consul
#!/bin/bash
# author: Timo Stankowitz <[email protected]>
# version: 2
# other instances: setup consul
# create directory
mkdir consul-persistent-data
mkdir consul-config
@TimoDJatomika
TimoDJatomika / config-vault.sh
Last active December 24, 2018 17:45
setup of a high availability vault cluster: setup vault
#!/bin/bash
# author: Timo Stankowitz <[email protected]>
# version: 6
# last (working) test: 2018-12-24
# use the script to configure vault.
mkdir vault-config vault-log
cd vault-config
wget https://vault-ha.de/files/vault-config.hcl
@TimoDJatomika
TimoDJatomika / current-dyn-ip.sh
Last active February 13, 2018 14:51
Everytime your dynamic IP changes you get a slack notification. How cool is that!
#!/bin/bash
# author: Timo Stankowitz <[email protected]>
# create date: 2017-11-17
# last change: 2018-02-13
# version 3
# everytime your dynamic ip changes you get a notification to your slack channel
# with the current dynamic ip of your router
# create a cronjob and let the script execute every 5 minutes
@TimoDJatomika
TimoDJatomika / manage-vpn-security-group.sh
Created December 4, 2017 15:44
You can use this script to modify port 22 of your aws security-group.
#!/bin/bash
# author: Timo Stankowitz <[email protected]>
# create date: 2017-12-04
# last modify: 2017-12-04
# version: 1
# You can use this script to modify port 22 of your aws security-group.
# usage:
# first check if port 22 is open for everyone: ./manage-vpn-security-group.sh check-port
@TimoDJatomika
TimoDJatomika / install-radius-manual.md
Created March 19, 2018 19:15
How to install Radius on a Raspberry Pi

How to install Radius on a Raspberry Pi

Written by Timo Stankowitz [email protected] on 2018-03-19. The installation was tested on a RPI2 running Raspbian 9.

Note: Radius uses UDP and not TCP

First step: Install Radius

sudo su
apt update
apt upgrade -y
@TimoDJatomika
TimoDJatomika / lambda-to-custom.py
Created March 28, 2018 13:03
Function that takes an alexa request an in input and redirects the request to a custom api endpoint.
import requests
import json
def lambda_handler(event, context):
url = "https://api.example.com/alexa.php"
r = requests.post(url, data=json.dumps(event))
return r.json()
@TimoDJatomika
TimoDJatomika / git_alias.sh
Created March 28, 2018 20:15
Git Alias for bash
# git stuff
alias gs="git status"
alias gl="git log"
alias gpl="git pull"
alias gpu="git push"
alias gad="git add"
alias gcm="git commit"
@TimoDJatomika
TimoDJatomika / setup-gpio-on-rpi.sh
Last active June 7, 2018 18:48
Raspberry Pi - GPIO Setup
#!/bin/bash
# how to setup GPIO on Raspberry Pi
sudo su
apt-get install python3-pip
pip3 install RPi.GPIO
pip3 install requests
@TimoDJatomika
TimoDJatomika / laravel.md
Last active March 19, 2020 15:04
How to work with Laravel and Docker

Using Laravel and Docker

by Timo Stankowitz [email protected]

The latest version of Laravel with Apache webserver in just one Docker container.

If you have any questions of any suggestions just reach out to me.

Create a new project with composer

Don't create an extra directory. Comperser will do this for you. The folder name will be project-name (change to your actual project name).