Skip to content

Instantly share code, notes, and snippets.

@rzbrk
rzbrk / startvm
Last active August 29, 2015 13:57
#!/bin/bash
#
# This init script autostarts necessary vms at boot
# and saves running vms on shutdown
# Inspired by:
# http://ubuntuforums.org/showthread.php?t=2181095&s=d46e80841d9fedc49cfbb37ba885af9d&p=12826048#post12826048
#
# Execute this script when perform boot-up and shutdown
# sudo update-rc.d startvm defaults 99 01
@rzbrk
rzbrk / RasPI-OwnCloud-Anleitung.txt
Last active July 8, 2022 17:08
HowTo: Installation von lighttpd und OwnCloud auf einem Raspberry PI
HOWTO: INSTALLATION VON LIGHTTPD UND OWNCLOUD AUF DEM RASPBERRY PI
===========================================================
Autor: Jan Grosser <email@jan-grosser.de>
Erstellt: 2014/02/02
Lizenz: CC-BY-4.0 Unported
Quellen
=======
@rzbrk
rzbrk / .nanorc
Created January 18, 2014 11:28
My current ~/.nanorc as a Perl programmer. Inspired by https://github.com/alekstorm/nanorc/blob/master/main.nanorc
## Global Settings
##
set tabstospaces # Tab key inserts spaces (Ctrl+t for verbatim mode)
set tabsize 4 # Insert 4 spaces per tab
set fill 76 # Justify command (Ctrl+j) wraps at 76 columns
set autoindent # Jump to current indent level after inserting a newline
set morespace # Use the second row (usually blank) for editing space
set quickblank # Clear status messages after a single keystroke
set multibuffer # Allow opening multiple files (Alt+< and Alt+> to switch)
set historylog # Remember command history
@rzbrk
rzbrk / mysql_backup.sh
Created November 29, 2013 22:31
Performs mysql backup (via mysql_dump). The database password is retrieved from /etc/mysql/debian.cnf. Therefore, run this script as root
#!/bin/bash
mysql_conf_file="/etc/mysql/debian.cnf"
mysqldump_opts="--all-databases --events --add-drop-table --add-locks --create-options --disable-keys --lock-tables --quick --set-charset"
now=$(date '+%Y%m%d-%H%M%S')
#Extract password for MySQL user debian-sys-maint from /etc/mysql/debian.cnf. Two
#code lines are necessary to cope with files that include to identical lines
#defining the password
temp=$(cat $mysql_conf_file | grep "password =" | sed -e '{:q;N;s/\n/ /g;t q}')