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
# Check /etc git is clean (from etckeeper) | |
if sudo -n true 2> /dev/null; then # if we can run sudo without prompting | |
cd /etc/ | |
if [[ `sudo git status --porcelain` ]]; then # if git is not clean | |
echo -e "\033[0;31mPlease commit changes in /etc first\033[0m" | |
exec sudo bash -l # start a new bash (i.e. abort logout) as root in /etc | |
# the login bash is now running as root | |
fi | |
fi |
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
for f in *mp3; do eyeD3 --encoding=utf8 --to-v2.4 --add-image cover.jpg:FRONT_COVER "$f"; 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
@echo off | |
if [%1] == [] goto usage | |
if [%2] == [] goto usage | |
if [%3] == [] ( | |
set /a offset=0 | |
) else ( | |
set /a offset=%3 | |
) |
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
# Adblock script for OpenWRT | |
# (c) 2014 by Jan Holthuis | |
# | |
# This is an adblocker script for OpenWRT. Simply run this script as a | |
# daily cronjob on your OpenWRT-router. This works since OpenWRT | |
# revision 39312 [1] and does not manipulate any files in /etc/. | |
# Instead, this adds the adblock serverlist as a separate file | |
# to /tmp/dnsmasq.d/. It also checks the file with grep to make sure | |
# that it doesn't contain malicious commands. | |
# |