Skip to content

Instantly share code, notes, and snippets.

@TimoDJatomika
TimoDJatomika / pom.xml
Created May 24, 2016 07:30
Example of how to build a java package with mvn package
<project>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
@TimoDJatomika
TimoDJatomika / unifiLedControllScript.sh
Last active December 17, 2021 08:44
Just a simple script to controll the led color of your ubiquiti unifi AP (PRO)
#!/bin/sh
# author: Timo Stankowitz <timo.stankowitz@gmail.com>
# create date: 2016-07-10
# last change: 2016-07-10
# with this script you can change the led color of your ubiquiti unifi AP
# usage: ./script.sh colorValue
# e.g.: ./script.sh 2
@TimoDJatomika
TimoDJatomika / postfix-relay-autoconfig.sh
Last active November 5, 2017 18:09
autoconfig a relayhost in postfix
#!/bin/bash
# author: Timo Stankowitz <timo.stankowitz@gmail.com>
# create date: 2016-08-15
# last change: 2017-11-
# Dieses Script konfiguriert Postfix so, dass mailgun (oder andere) als e-mail relay konfiguriert wird
# somit werden e-mails über mailgun, und nicht direkt von Postfix gesendet.
# Dies hat den Vorteil, dass die e-mails nicht im Spam Ordern, oder überhaupt nicht beim client landen.
postfixMainConfig="/etc/postfix/main.cf"
@TimoDJatomika
TimoDJatomika / php-composer-docker.sh
Created November 12, 2016 12:37
Run PHP Composer as Docker Cotainer with current UID
docker run -u 1000 --rm -v $(pwd):/app composer/composer install
@TimoDJatomika
TimoDJatomika / open-vpn-win.ovpn
Created November 18, 2016 12:48
Openvpn für Windows User
# please save as .ovpn file
# Specify that we are a client and that we
# will be pulling certain config file directives
# from the server.
client
# keyname
ca ca.crt
cert user.crt
@TimoDJatomika
TimoDJatomika / bootstrap-hello-world.html
Last active November 14, 2022 10:40
Simple Bootstrap Hello World HTML File
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
@TimoDJatomika
TimoDJatomika / firewall.service
Last active December 1, 2016 19:26
Put the script into /etc/systemd/system and name it firewall.service
[Unit]
Description=Firewall
[Service]
Type=oneshot
ExecStart=/root/firewall.sh start
ExecStop=/root/firewall.sh stop
RemainAfterExit=yes
[Install]
@TimoDJatomika
TimoDJatomika / firewall.sh
Created November 24, 2016 14:35
Simple Firewall script
#!/bin/bash
# create date: 2016-11-24
# last change: 2016-11-24
# author: Timo Stankowitz <timo.stankowitz@gmail.com>
# purpose: Firewall
ipt=/sbin/iptables
ipt6=/sbin/ip6tables
ext=eth0
@TimoDJatomika
TimoDJatomika / rc.local
Last active December 26, 2016 18:07
IP Forward + NAT im Autostart
#!/bin/bash
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -j SNAT --to-source 207.154.207.69 -o eth0
exit 0
@TimoDJatomika
TimoDJatomika / ipsec.secrets
Last active December 26, 2016 20:40
ipsec.secrets example file
# This file holds shared secrets or RSA private keys for authentication.
# das der private key von dem Server
# gespeichert in /etc/ipsec.d/private/serverKey.der
: RSA serverKey.der
# die clients koennen sich mit Benutzername + Passwort anmelden
lisa : EAP "j8j3hk-olkwH23z"
bob : EAP "a9kjhg2pM21-feqK"