Skip to content

Instantly share code, notes, and snippets.

View viegelinsch's full-sized avatar

viegelinsch viegelinsch

  • Germany
View GitHub Profile
@viegelinsch
viegelinsch / revealjs_as_submodule.md
Created November 29, 2016 14:43
Using reveal.js as presentation framework for learning resources
@viegelinsch
viegelinsch / fix_munin_dynazoom.md
Last active February 18, 2024 09:34
fix no graphic in munin dynazoom

You have something like "[WARNING] Could not draw graph "/var/lib/munin/cgi-tmp/munin-cgi-graph/" in your /var/log/munin/munin-cgi-graph.log ???

Check the directory permissions!

ls -l /var/lib/munin/cgi-tmp/

shows something like

drwxr-xr-x 3 munin www-data 4,0K Mär 29  2013 munin-cgi-graph/
@viegelinsch
viegelinsch / munin-update-manually.sh
Created February 20, 2015 16:14
run munin-update manually as root
!#/bin/bash
su - munin --shell=/bin/bash
/usr/share/munin/munin-update
exit
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done
@viegelinsch
viegelinsch / etc-kbd-config.patch
Created February 21, 2015 15:30
patch for /etc/kbd/config to prevent Raspberry Pi from sleeping
--- /etc/kbd/config 2015-02-21 16:24:59.653062112 +0100
+++ /etc/kbd/config.new 2015-02-21 16:24:28.554492138 +0100
@@ -38,7 +38,8 @@
# screen blanking timeout. monitor remains on, but the screen is cleared to
# range: 0-60 min (0==never) kernels I've looked at default to 10 minutes.
# (see linux/drivers/char/console.c)
-BLANK_TIME=30
+#BLANK_TIME=30
+BLANK_TIME=0
@viegelinsch
viegelinsch / install duply
Last active December 24, 2015 13:49
install 'duply' on Ubuntu
apt-get install duply python-paramiko
mkdir /etc/duply
duply backupname create
@viegelinsch
viegelinsch / brew_update_force
Last active December 18, 2015 07:49
force "brew update"
taken from: https://github.com/mxcl/homebrew/issues/11448
cd `brew --prefix`
git remote add origin https://github.com/mxcl/homebrew.git
git fetch origin
sudo git reset --hard origin/master
# Add list of files that Git should not compress
EXTENSIONS="jpg jpeg png tiff gif flac mp3 ogg oga avi mov mpg mpeg mkv ogv ogx webm zip gz bz bz2 rpm deb tgz rar ace 7z pak iso dmg"
for EXTENSION in $EXTENSIONS; do
sleep 0.05
echo -ne " -> echo \"*.$EXTENSION -delta\" >> trans/info/attributes \r"
echo "*.$EXTENSION -delta" >> "trans/info/attributes"
sleep 0.05
EXTENSION_UPPERCASE=`echo $EXTENSION | tr '[:lower:]' '[:upper:]'`
echo -ne " -> echo \"*.$EXTENSION_UPPERCASE -delta\" >> trans/info/attributes \r"
echo "*.$EXTENSION_UPPERCASE -delta" >> "trans/info/attributes"
# creating a private git repository to use with SparkleShare
cd Documents/
# let's name it "trans"
git init --bare trans
git config --file trans/config receive.denyNonFastForwards true
bash /tmp/add_attributes.sh
less trans/info/attributes
cd ..
chmod --recursive o-rwx Documents
@viegelinsch
viegelinsch / brew-update-notifier.sh
Last active September 29, 2015 14:48 — forked from SimonSimCity/brew-update-notifier.sh
Extended the script, written by @streeter to exclude the pinned formulae in the list of formulas to update.
#!/bin/bash
#
# Notify of Homebrew updates via Notification Center on Mac OS X
#
# Author: Chris Streeter http://www.chrisstreeter.com
# Requires: terminal-notifier. Install with:
# brew install terminal-notifier
TERM_APP='/Applications/Terminal.app'
BREW_EXEC='/usr/local/bin/brew'