Skip to content

Instantly share code, notes, and snippets.

View seveas's full-sized avatar

Dennis Kaarsemaker seveas

View GitHub Profile
@seveas
seveas / .gitconfig
Created November 24, 2012 14:34
Hist alias
[alias]
hist = log --graph --color=always --pretty='[%C(cyan)%h%Creset]%C(bold cyan)%d%Creset %s' --all
@seveas
seveas / post-receive
Created November 2, 2012 20:19
Post receive publishing hook
#!/bin/bash
#
# Hook to copy the contents of a static blog generator to its final location.
# Publishing is now a matter of 'git push blog'
set -e
read oldrev newrev refname
if [ $refname = refs/heads/master ]; then
rev=$(echo $newrev | cut -c1-7)
@seveas
seveas / github_mirror.py
Created July 20, 2012 11:37
Github mirror script
#!/usr/bin/python
#
# Script to mirror github repositories and keep them up-to-date
#
# Usage:
#
# ./github_mirror
#
# It mirrors the configured repositories in the current directory
#
@seveas
seveas / gitconfig.sh
Created April 20, 2012 20:47
Git config from ldap (/etc/profile.d/gitconfig.sh)
# Set git user/email based on ldap values
test -x /usr/bin/git || return
test -x /usr/bin/ldapsearch || return
git config --global user.name > /dev/null || {
name=$(ldapsearch -x -LLL "(uid=$USER)" cn | sed -ne 's/^cn: //p')
test -n "$name" && git config --global user.name "$name"
}
@seveas
seveas / mutt-keyring
Created February 5, 2012 23:38
Make mutt fetch passwords from gnome-keyring
#!/usr/bin/python
#
# Fetch passwords for imap/smtp accounts from gnome-keyring
# Adding passwords to gnome-keyring is up to yourself. Passwords added
# by evolution will be picked up, which may help.
#
# Usage in .muttrc:
# source "~/bin/mutt-keyring $folder $smtp_url|"
import gnomekeyring as gk
@seveas
seveas / init.pp
Created September 27, 2011 21:17
lvm recipe for puppet
class lvm {
}
define lvm::volume(
$lv = "LogVol01",
$vg = "VolGroup00",
$size = "",
$auto_extend = true,
$owner = "root",