Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
$REGEXP = shift || die "no email-adress given (regexp-style, e.g. bl.*\@yahoo.com)!";
@data = qx</usr/sbin/postqueue -p>;
for (@data) {
if (/^(\w+)(\*|\!)?\s/) {
$queue_id = $1;
}
if($queue_id) {
http://search.cpan.org/~ribasushi/SQL-Translator-0.11005/script/sqlt-diff
@mathewpeterson
mathewpeterson / hack.sh
Created March 31, 2012 12:13 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@mathewpeterson
mathewpeterson / fubot-init.sh
Created February 12, 2012 01:51 — forked from philchristensen/fubot-init.sh
hubot init script
#! /bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/opt/fubot/bin/hubot
NAME=fubot
DESC="Jabber Bot"
CONF="-a xmpp --name $NAME"
BOT_USER=fubot
BOT_GROUP=fubot
@mathewpeterson
mathewpeterson / .config
Created January 10, 2012 01:38
linux-3.0.4-xen config
#
# Automatically generated make config: don't edit
# Linux/x86_64 3.0.4 Kernel Configuration
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
@mathewpeterson
mathewpeterson / gitconfig
Created October 27, 2011 19:55
useful gitconfig settings
[alias]
update = !git fetch origin && git rebase origin/master
add-all = !git add -A && git status
done = !git fetch && git rebase origin/master && git checkout master && git merge @{-1} && git push
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
ir = !git rebase -i origin/master
unstage = reset HEAD
log-branch = log origin/master..
undo-commit = reset --soft HEAD^
branch-name = !git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD`
@mathewpeterson
mathewpeterson / gitconfig
Created October 27, 2011 16:45
useful gitconfig settings
[alias]
update = !git fetch origin && git rebase origin/master
addall = !git add -A && git status
done = !git fetch && git rebase origin/master && git checkout master && git merge @{-1} && git push
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
ir = !git rebase -i origin/master
unstage = reset HEAD
[color]
ui = auto
@mathewpeterson
mathewpeterson / get_files.sh
Created October 21, 2011 19:39
Get files from folder a and copy them to folder b.
#!/bin/bash
SRC_PATH=''
DEST_PATH=''
FILES_LIST=`cat $1`
for file in $FILES_LIST
do
cd ${DEST_PATH} && cp -R ${SRC_PATH}/${file} ${file}
#!/bin/bash
perl -e 'printf "00:16:3E:%02X:%02X:%02X\n", rand 0xFF, rand 0xFF, rand 0xFF'
@mathewpeterson
mathewpeterson / create_unhashed_links.rb
Created August 13, 2011 03:10
Creates links that are unhashed to the Gitorious repositories.