Skip to content

Instantly share code, notes, and snippets.

viegelinsch viegelinsch

  • Germany
View GitHub Profile
View fail2ban-allstatus.sh
#!/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 / wget.bash
Created Jun 28, 2017
"archive" website and ignore robots.txt
View wget.bash
#!/bin/bash
wget \
--recursive \
--no-clobber \
--page-requisites \
--convert-links \
--restrict-file-names=windows \
-e robots=off --wait 1 \
URL
@viegelinsch
viegelinsch / revealjs_as_submodule.md
Created Nov 29, 2016
Using reveal.js as presentation framework for learning resources
View revealjs_as_submodule.md
@viegelinsch
viegelinsch / brew-update-notifier.sh
Last active Sep 29, 2015 — 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.
View brew-update-notifier.sh
#!/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'
@viegelinsch
viegelinsch / cross_linking.md
Created Jul 13, 2015
creating recursive symbolic links from another directory
View cross_linking.md

Creating symbolic links for all files and subdirectories from one (source) directory to another (target directory).

Documentation says: ln -st TARGETDIRECTORY SOURCEDIRECTORY

Example: `ln -st . ../something/*``

Purpose: cross-linking to seperate directories (here: git repositories) that need to be combined.

@viegelinsch
viegelinsch / add-ip-to-etc-issue
Created Jul 13, 2015
Add current IP to /etc/issue (aka linux login greeting)
View add-ip-to-etc-issue
#!/bin/sh
# file: /etc/network/if-up.d/add-ip-to-etc-issue
# source: "stolen" somewhere
if [ "$METHOD" = loopback ]; then
exit 0
fi
# Only run from ifup.
if [ "$MODE" != start ]; then
View byobu.md
@viegelinsch
viegelinsch / fix_munin_dynazoom.md
Last active Jan 22, 2020
fix no graphic in munin dynazoom
View fix_munin_dynazoom.md

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 / owncloud_external_site_icon
Created Feb 21, 2015
custom icons for external sites in owncloud
View owncloud_external_site_icon
# icon size 32x32 px
cp LOGO-32x32.png /var/www/owncloud/apps/external/img/
chown -R www-data:www-data /var/www/owncloud/apps/external/img/
@viegelinsch
viegelinsch / etc-kbd-config.patch
Created Feb 21, 2015
patch for /etc/kbd/config to prevent Raspberry Pi from sleeping
View etc-kbd-config.patch
--- /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
You can’t perform that action at this time.