View stylebot-noz.css
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
/** | |
* Quick-and-dirty CSS-Anweisungen für Stylebot, um das | |
* neue mehrspaltige Layout der NOZ (noz.de) in eine Listenanzeige | |
* umzuformen. | |
* | |
* Chrome: https://chrome.google.com/webstore/detail/stylebot/ | |
* Firefox: https://addons.mozilla.org/de/firefox/addon/stylebot-web/ | |
*/ | |
.grid { |
View inside-export-ga.py
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 | |
""" | |
Exports group addresses from ETS Inside project. Usage: | |
python3 inside-export-ga.py path/to/project | |
""" | |
import sys | |
import json | |
import xml.etree.ElementTree as ET |
View sort-access-log
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 | |
### | |
# Sorts the rows of one or multiple apache access_log files | |
# by date (ascending) and converts them from 'common' log format | |
# into 'combined' (if you switched the log file format meanwhile). | |
# | |
# This is useful when you want to merge multiple log files, e.g. when | |
# you have different files for HTTP and HTTPS. | |
# | |
# Usage: |
View stamp-last-page.sh
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 | |
if [ "$1" == "" -o "$2" == "" -o "$3" == "" -o "$4" != "" -o "$1" == "-h" -o "$1" == "--help" ]; then | |
echo "Puts a stamp (as PDF file) onto the last page of the input" >&2 | |
echo "file using PDFTK". >&2 | |
echo "" >&2 | |
echo "Usage: $0 INPUT.pdf STAMP.pdf OUTPUT.pdf" >&2 | |
exit 1 | |
fi |
View suspend-on-idle.service
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
# /etc/systemd/system/suspend-on-idle.service | |
# call "systemctl daemon-reload" after creation / modification | |
# call "systemctl status suspend-on-idle.service" to see last log line | |
# call "journalctl -b0 -u suspend-on-idle" to see all log line | |
[Unit] | |
Description=Suspend on idle | |
Wants=network-online.target | |
After=network.target network-online.target | |
[Service] |
View verify_ssha_passwd.py
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 python | |
### | |
# Takes a username from environment variable PAM_USER, a password from STDIN | |
# and tries to verify the shadow's password using LDAP's SSHA algorithm: | |
# | |
# {SSHA}...base64encodedString... | |
# | |
# If used within PAM auth this provides a compatibility layer that allows | |
# to migrate LDAP user into Unix user accounts. When the user's password |
View redmine-ldapsync.py
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 python | |
# syncldap.py - Sync user accounts from an LDAP or Active Directory to Redmine | |
# | |
# Usage: syncldap.py <database.yml> [environment] | |
# | |
# Where database.yml is the database configuration file for a redmine instance, | |
# and environment is the rails environment that should be used (defaults to | |
# 'production'). | |
# | |
# Author: |
View adblock.sh
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 | |
#Put in /etc/adblock.sh | |
#Script to grab and sort a list of adservers and malware | |
#Check proper DHCP config and, if necessary, update it | |
uci get dhcp.@dnsmasq[0].addnhosts > /dev/null 2>&1 || uci add_list dhcp.@dnsmasq[0].addnhosts=/etc/block.hosts && uci commit | |
#Leave crontab alone, or add to it | |
grep -q "/etc/adblock.sh" /etc/crontabs/root || echo "0 4 * * 0,3 sh /etc/adblock.sh" >> /etc/crontabs/root |