Skip to content

Instantly share code, notes, and snippets.

View hermzz's full-sized avatar

Hermann Käser hermzz

View GitHub Profile
@hermzz
hermzz / init.nginx.sh
Last active October 6, 2015 18:07
Improved nginx start script
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@hermzz
hermzz / init.lsyncd.sh
Last active April 27, 2016 16:26
Lsyncd2 init.d script for Debian Squeeze
#! /bin/sh
### BEGIN INIT INFO
# Provides: lsyncd
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the lsyncd daemon
# Description: starts lsyncd using start-stop-daemon
@hermzz
hermzz / SSL notes.md
Last active December 17, 2015 18:59

Use namespace SSL cert

cat $HOST.key $HOST.crt > $HOST.pem
cat AddTrustExternalCARoot.crt COMODORSA* > sslbundle.crt

Generate self-signed SSL cert

openssl genrsa -des3 -passout pass:x -out $HOST.pass.key 2048
openssl rsa -passin pass:x -in $HOST.pass.key -out $HOST.key

rm $HOST.pass.key

@hermzz
hermzz / owncloud-update.sh
Last active December 28, 2015 21:09
ownCloud update steps
rm -rf old.owncloud
cp -a owncloud old.owncloud
rm -rf owncloud-latest.tar.bz2
wget http://download.owncloud.org/community/owncloud-latest.tar.bz2
sed "s/maintenance' => false/maintenance' => true/g" owncloud/config/config.php
tar xf owncloud-latest.tar.bz2
chmod -R 775 owncloud/config owncloud/apps
sed "s/maintenance' => true/maintenance' => false/g" owncloud/config/config.php
@hermzz
hermzz / postfix_howto.txt
Created January 13, 2014 10:50
postfix howto
## Queue
- List messages
postqueue -p
- Flush the queue:
postqueue -f
- Attempt deliver of one message
postqueue -i [ID]
- Delete message
postsuper -d [ID]

Keybase proof

I hereby claim:

  • I am hermzz on github.
  • I am hermzz (https://keybase.io/hermzz) on keybase.
  • I have a public key whose fingerprint is FA17 D5CB 0005 E7F1 ECCF BD2A 34CB 36F9 7D55 9359

To claim this, I am signing this object:

@hermzz
hermzz / byobu.patch
Last active August 29, 2015 14:06
byobu arrows fix
=== modified file 'usr/share/byobu/keybindings/f-keys.screen'
--- usr/share/byobu/keybindings/f-keys.screen 2012-02-17 05:54:13 +0000
+++ usr/share/byobu/keybindings/f-keys.screen 2012-09-27 23:46:21 +0000
@@ -46,10 +46,10 @@
bindkey "^[[1;2C" focus down # shift-right | focus down
# No ctrl-shift-F3 (move pane) in Screen
# No ctrl-shift-F4 (move pane) in Screen
-bindkey "^[[1;5A" resize +1 # ctrl-up | resize +1
-bindkey "^[[1;5B" resize -1 # ctrl-down | resize -1
-bindkey "^[[1;5D" resize -1 # ctrl-left | resize -1
#! /bin/sh -
#
# Install OpenVPN connections for all available
# regions to NetworkManager
#
# Requirements:
# should be run as root
# python and openvpn (will be installed if not present)
#
# Usage:

Receive a key

gpg --recv-keys --keyserver [keyserver.example.com] [0xKEY]

Verify a signature

gpg --verify file.sig file

Sign a key

@hermzz
hermzz / Prepare negative
Created April 2, 2015 15:20
Inverts and white balances a negative film scan
; Negtive processing script based on:
; https://code.google.com/p/mcclanahoochie/source/browse/gimp_scripts/auto-wb-lce.scm
;
; It applies:
; - Invert
; - Auto White Balance
; - Local Contrast Enhancement
; effects to an image.
;
; Requires Fx-Foundry (gimp-plugin-registry)