Skip to content

Instantly share code, notes, and snippets.

@TimoDJatomika
TimoDJatomika / firewall.service
Created December 24, 2018 09:16
Firewall startup script for systemd
# place the file @ /etc/systemd/system/firewall.service
# autostart the firewall with systemctl enable firewall
[Unit]
Description=Firewall
[Service]
Type=oneshot
ExecStart=/root/firewall.sh start
ExecStop=/root/firewall.sh stop
@TimoDJatomika
TimoDJatomika / install-openvpn-ubuntu-18.04.md
Last active December 24, 2018 09:13
How to install OpenVPN on a Ubuntu 18.04 Server

How to install OpenVPN on Ubuntu 18.04

by Timo Stankowitz github@brainoftimo.com

apt

sudo su
apt update -y
apt install openvpn -y
@TimoDJatomika
TimoDJatomika / Dockerfile
Created December 8, 2018 20:14
composer Dockerfile for Laravel with LDAP
FROM ubuntu:18.04
LABEL maintainer="Timo Stankowitz <timo.stankowitz@gmail.com>"
# no interaction for tzdata
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Berlin
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y php
@TimoDJatomika
TimoDJatomika / kvm-ubunt-18-04.md
Last active September 26, 2018 23:19
KVM Installation Ubuntu 18.04

Ubuntu Server 18.04 als KVM Host

Im folgenden wird beschrieben, wie man KVM/QEMU auf einem Ubuntu Server 18.04 installiert

changelog

  • create date: 2016-02-07 17:15
  • last change: 2018-09-27

Schritt 1: Prüfen, ob man KVM installieren kann

egrep '(vmx|svm)' /proc/cpuinfo

@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 laravel@brainoftimo.com

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).

@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 / 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 / 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 / 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 timo.stankowitz@gmail.com 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 / 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 <timo@dwins.de>
# 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