Skip to content

Instantly share code, notes, and snippets.

Avatar

guedressel guedressel

  • CYLEDGE Media GmbH
  • Vienna
View GitHub Profile
View read network interfaces
#!/bin/bash
echo
echo
DEVS=($(cat /proc/net/dev | tail -n+3 | cut -d: -f1 | tr -d " "))
for i in "${DEVS[@]}"
@guedressel
guedressel / graphite-fcgi
Created May 7, 2014
Init-script to run graphite-web as FastCGI Daemon (based on ubuntu package graphite-web 0.9.12+debian-3) + lighttpd example config
View graphite-fcgi
#! /bin/sh
### BEGIN INIT INFO
# Provides: FastCGI server for graphite
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: Start/Stop FastCGI server of graphite-web package.
# Description: Grahpite-web is a Django webapp. Django has a built-in FastCGI server
# which is started/stopped by this init script.
@guedressel
guedressel / ext_keyboard_layout.sh
Created May 28, 2014
Switch layout of keyboard in X11
View ext_keyboard_layout.sh
#!/bin/bash
#
# switch keyboardlayout of my external cherry keyboard to german layout
#
set -e
DEV_NAME="HID 046a:0023"
LAYOUT="at"
@guedressel
guedressel / gist:524f30b1296add6f9a4f
Created Dec 5, 2014
List sizes of Zimbra Mailboxes
View gist:524f30b1296add6f9a4f
#> zmaccts | grep '@' | awk -F" " '{print $1}' > /tmp/accounts
#> for account in $(< /tmp/accounts); do size=$(zmmailbox -z -m $account gms); echo $account $size; done
@guedressel
guedressel / nineteen.sh
Last active Sep 20, 2015 — forked from bhundven/nineteen.sh
Enlightenment 19 build script for Ubuntu/Debian
View nineteen.sh
#!/bin/bash
#
# NINETEEN.SH
# This script allows you to install/update Enlightenment 19 git version on
# Ubuntu 14.04 LTS or Debian wheezy/sid, or remove E19 git from your system.
# Originally from: http://ubuntuforums.org/showthread.php?t=2203190
# By: Philippe J. Guillaumie (batden AT sfr DOT fr).
# Additional updates by: Bryan Hundven (bryanhundven AT gmail DOT com).
#
# Tip:
@guedressel
guedressel / benchmark.php
Last active Oct 1, 2015
Simple speed benchmarking utilitiy to test PHP functions for their runtime.
View benchmark.php
<?php
class Timer {
private $start = 0;
private $stop = 0;
function Timer( $start = TRUE ) {
if ( $start )
@guedressel
guedressel / enable-openldap-tls.ldif
Created Apr 28, 2016
Enabling TLS support in slapd (OpenLDAP)
View enable-openldap-tls.ldif
dn: cn=config
changetype: modify
# Security - TLS section
add: olcTLSCertificateFile
olcTLSCertificateFile: /path/cert_bundle.crt
-
add: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /path/cert.rsa.key
-
add: olcTLSDHParamFile
View keybase.md

Keybase proof

I hereby claim:

  • I am guedressel on github.
  • I am guedressel (https://keybase.io/guedressel) on keybase.
  • I have a public key whose fingerprint is A283 E1EF 9F79 135C F85E 0A85 7D1A E15E 9E21 9A30

To claim this, I am signing this object:

@guedressel
guedressel / settings.php
Last active Jun 21, 2017
A minimal Drupal settings.php
View settings.php
<?php
//
// Basic Drupal settings.php
// (As I use it for development)
//
//
// Database settings
@guedressel
guedressel / reset-sticky-group-permission.sh
Last active Jan 24, 2018
Resets permissions of a directory to have guid set on directories and everything group writable (recursively)
View reset-sticky-group-permission.sh
#!/bin/bash
find . -type d -exec chmod u=rwx,g=rwxs,o=rx {} \;
find . -type f -exec chmod g-s {} \;
You can’t perform that action at this time.