This file contains 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 | |
$http_host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : "(not sure)"; | |
$remote_addr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "(not sure)"; | |
$ipv = 0; | |
if ((strpos($remote_addr, ".") > 0) && ((strpos($remote_addr, ":") == FALSE))) { | |
$ipv = 4; | |
$remote_addr_show = $remote_addr; | |
} else { | |
$ipv = 6; |
This file contains 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
Section "ServerFlags" | |
Option "AllowEmptyInput" "false" | |
Option "AutoAddDevices" "false" | |
EndSection | |
Section "InputDevice" | |
Identifier "Mouse1" | |
Driver "mouse" | |
Option "Protocol" "IMPS/2" | |
Option "Device" "/dev/input/mice" |
This file contains 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
@import url(http://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic); | |
div.postContent { | |
text-align: justify; | |
font-family: "Droid Serif", serif; | |
font-size: 16px; | |
line-height: 24px; | |
} | |
div.cdmContentInner { |
This file contains 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
#!/usr/bin/wish | |
# ====== .i3/config ====== | |
# # monitor setup | |
# for_window [title="^qscr$"] floating enable | |
# exec --no-startup-id wish /home/ts/.screenlayout/startup.tcl | |
# # XF86Display = Fn+F7 (@Lenovo T440p) | |
# bindsym XF86Display exec --no-startup-id wish /home/ts/.screenlayout/startup.tcl | |
# ======================== | |
# Buttons |
This file contains 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/sh | |
OPENPORT="22" | |
NETDEVICE="eth0" | |
MYIPV6=$(ip addr show dev ${NETDEVICE} | grep -P 'inet6 (?!fe80)' | awk '{print $2}' | sed -e "s/\/64//" | sed -e "s/\:/\%3A/g") | |
CSRF=$(curl -s http://192.168.0.1/login.asp | grep -e "\"CSRFValue\"" | sed -e "s/.*value=\(.*\)>.*/\1/") | |
curl -s -d "CSRFValue=${CSRF}&loginUsername=admin&loginPassword=password&logoffUser=1" http://192.168.0.1/goform/login | |
CSRF=$(curl -s http://192.168.0.1/advanced/forwarding.asp | grep -e "\"CSRFValue\"" | sed -e "s/.*value=\(.*\)>.*/\1/") | |
curl -s -d "CSRFValue=${CSRF}&ForwardingPortRange1=${OPENPORT}&ForwardingTargetIp1=${MYIPV6}&ForwardingTargetPort1=${OPENPORT}&ForwardingProtocol1=2&ForwardingPortRange2=0-0&ForwardingTargetIp2=0.0.0.0&ForwardingTargetPort2=0-0&ForwardingProtocol2=0&ForwardingDelete2=1&ForwardingPortRange3=0-0&ForwardingTargetIp3=0.0.0.0&ForwardingTargetPort3=0-0&ForwardingProtocol3=0&ForwardingDelete3=1&ForwardingPortRange4=0-0&ForwardingTargetIp4=0.0.0.0&ForwardingTargetPort4=0-0&ForwardingProtocol4=0&ForwardingDelete4 |
This file contains 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 | |
# Dateiname: | |
# autoshutdown.sh | |
# Lizenz: | |
# MIT-Lizenz (http://opensource.org/licenses/MIT) | |
# Beschreibung: | |
# Faehrt den Rechner herunter, wenn nach 2 Durchlaeufen des Skripts (optimalerweise alle ~20 Minuten | |
# via cron/runwhen/whatever ausgefuehrt) folgende Bedingungen erfuellt sind: | |
# * Es existiert keine Datei "stop.txt" (Inhalt egal) im Root-Verzeichnis der Public-Freigabe | |
# des Samba-Servers (ermoeglicht es den Usern, einen System-Shutdown einfach zu blockieren) |
This file contains 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
Show hidden characters
{ | |
"scope": "text.tex.latex - (string.other.math, meta.environment.math)", | |
"completions": | |
[ | |
{ "trigger": "pc", "contents": "\\parencite[vgl.][$1]$0"}, | |
{ "trigger": "bits", "contents": "\\begin{itemize}[noitemsep]\n\t\\item $0\n\\end{itemize}\n"}, | |
{ "trigger": "fm", "contents": "\\fm{$1}$0"}, | |
{ "trigger": "zf", "contents": "\\zf{$1}$0"}, |
This file contains 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
#!/usr/bin/env python3 | |
#### TODO: Flexibilität: https://docs.python.org/3.3/library/argparse.html#argparse.ArgumentParser.add_argument | |
import random | |
import hashlib | |
import urllib.request | |
import logging | |
from subprocess import call |
This file contains 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 | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
for i in ${DIR}/*/.git | |
do | |
echo $i | |
cd $i/.. | |
git pull | |
done |
This file contains 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/sh | |
rm ~/.config/plasma-org.kde.plasma.desktop-appletsrc | |
cp ~/.config/plasma-org.kde.plasma.desktop-appletsrc.orig ~/.config/plasma-org.kde.plasma.desktop-appletsrc | |
killall plasmashell && kstart plasmashell |
OlderNewer