This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote rename origin upstream | |
git add remote origin [email protected]:user/fork.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object CheckCommand "check_wmi" { | |
import "plugin-check-command" | |
command = [ PluginDir + "/check_wmi_plus.pl" ] | |
arguments = { | |
"--inidir" = "$wmi_inidir$" | |
"-H" = "$host.name$" | |
"-A" = "$wmi_authfile_path$" | |
"-m" = "$check_mode$" | |
"-s" = "$wmi_submode$" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@s:/opt# cat autorenew.sh | |
#/bin/bash | |
cd /opt/letsencrypt/ | |
git pull | |
/etc/init.d/nginx stop | |
result=$(/opt/letsencrypt/letsencrypt-auto renew) | |
/etc/init.d/nginx start | |
zertdate=$(echo | openssl s_client -connect ***.eu:443 2>/dev/null | openssl x509 -noout -startdate) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upstart file at /etc/init/couchdb.conf | |
# CouchDB | |
start on runlevel [2345] | |
stop on runlevel [06] | |
pre-start script | |
chown -R couchdb /usr/local/etc/couchdb | |
chown -R couchdb /usr/local/lib/couchdb | |
chown -R couchdb /usr/local/var/log/couchdb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$subdomain = array_shift((explode(".",$_SERVER['HTTP_HOST']))); | |
$urlmap = [ | |
"spiel1" => "http://quiz.tivi.de/quiz/1057-toleranz-und-respekt/", | |
"spiel2" => "http://quartett.tivi.de/krasse-kolosse/", | |
"spiel3" => "http://fehlersuche.spiel.tivi.de/game/E2123874", | |
"spiel4" => "http://fehlersuche.spiel.tivi.de/game/A66FAF75", | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Goal of this document is to describe how to setup a vpn tunnel with two pfSense boxes | |
having the same LAN subnet, for the purpose of this doc we'll use 192.168.1.1/24 on | |
both firewalls LAN interfaces | |
We have to make some dummy networks here to NAT to so as far as Site A will be concerned, | |
site B will be 192.168.2.0/24, and as far as Site B is concerened site A will be 192.168.3.0/24 | |
SiteA (LAN 192.168.1.1) | |
OpenVPN Server: | |
Standard Setup and we'll use 10.0.1.0/24 as the Tunnel Network (I can elaborate here later) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadScript(url,callback,args) { | |
scriptEl = document.createElement('script'); | |
scriptEl.type = 'text/javascript'; | |
scriptEl.async = true; | |
scriptEl.src = url; | |
if (typeof(callback) === 'function'){ | |
if ("onload" in scriptEl){ | |
scriptEl.onload = function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function insertScript(url) { | |
scriptEl = document.createElement('script'); | |
scriptEl.type = 'text/javascript'; | |
scriptEl.async = true; | |
scriptEl.src = url; | |
document.getElementsByTagName('head')[0].appendChild(scriptEl); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install usb-modeswitch-\* | |
/usr/sbin/usb_modeswitch -v 12d1 -p 1446 -t option-zerocd | |
#dann neu reinstecken | |
udev erstellen: | |
/etc/udev/rules.d/70-usb-modeswitch.rules | |
# eigene udev-Regeln für UMTS-Sticks | |
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="/usr/sbin/usb_modeswitch -v 12d1 -p 1446 -M '55534243123456780000000000000011062000000100000000000000000000'" | |
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1001", RUN+="/bin/bash -c 'modprobe option && echo 12d1 1001 > /sys/bus/usb-serial/drivers/option1/new_id'" |