Skip to content

Instantly share code, notes, and snippets.

View noqqe's full-sized avatar
😴

Florian Baumann noqqe

😴
View GitHub Profile
@noqqe
noqqe / 0ocrawl.bash
Created June 12, 2012 19:11
0ocrawl.bash: Easy webcrawling with redis
#!/bin/bash
# 0ocrawl.bash: Easy webcrawling with redis
# Copyright: (C) 2012 Florian Baumann
# License: GPL-3 <http://www.gnu.org/licenses/gpl-3.0.txt>
# Date: Friday 2012-06-08
## Configuration
REDIS="/usr/bin/redis-cli"
REDISOPTS="--raw -h localhost"
@noqqe
noqqe / gitolite-slave.sh
Created February 17, 2013 18:55
Simple bash version of a gitolite slave.
#!/bin/bash
MASTER="[email protected]"
BASEDIR="/data/gitslave/"
for repo in $(ssh $MASTER | grep '^ R' | awk '{print $3}') ; do
if [ -d $BASEDIR/$repo ]; then
cd $BASEDIR/$repo
for rbranch in $(git branch -a | grep -v '^*\ master\|HEAD\ -' | awk -F/ '{print $3}'); do
git checkout $rbranch
# Block anything
block in all
block out all
block return
# Anti SSH Bruteforce
table <bruteforce> persist
table <admins> { 1.2.3.4/32 }
# Disallow bruteforcing IPs except <admins>
@noqqe
noqqe / gitit
Created June 29, 2013 10:55
my OpenBSD rc script for gitit
#!/bin/sh
#
# $OpenBSD: gitit,v 1.0 2013/06/28 14:34:36 noqqe Exp $
daemon="/usr/local/bin/gitit"
daemon_user="gitit"
daemon_flags="-f /etc/gitit.conf"
rc_bg=YES
@noqqe
noqqe / sqltraffic.bash
Last active December 19, 2015 03:39
Simply generate some read and write SQL queries to a database cluster (mariadb in my case).
#!/bin/bash
## manual section
#
# options
# --rqmax Define the max read queries
# --rqpm Define read queries per minute
# --wqmax Define the max wirte queries
# --wqpm Define write queries per minute
#
@noqqe
noqqe / AveryLabels.tex
Last active December 21, 2015 05:59
TeX Document for Avery Lever Arch Filing Labels (L6061-25, 192 x 59 mm) http://www.amazon.de/gp/product/B0002S4B9G/
%%% Packages
\documentclass[paper=a4, fontsize=11pt, pdftex]{scrartcl} % Article class of KOMA-script with 11pt font and a4 format
\usepackage[english]{babel} % English language/hyphenation
\usepackage[protrusion=true,expansion=true]{microtype} % Better typography
\usepackage[cm]{fullpage}
%%% Begin document
\pagestyle{empty}
\begin{document}
\vspace*{25mm}
@noqqe
noqqe / convert_mailheader.py
Last active December 23, 2015 01:39
Simply convert internationalized mailheaders (http://tools.ietf.org/html/rfc2047.html) into utf-8
#!/usr/bin/env python
# -*- coding: utf-8 -*-
## About
# Simply convert internationalized mailheaders into utf-8
# See: http://tools.ietf.org/html/rfc2047.html
## Usage
# $ echo 'Check german umlauts =?iso-8859-1?B?5CD8?= =?iso-8859-1?Q?_=F6?=' | ./convert_mailheader.py
# > Check german umlauts ä ü ö
@noqqe
noqqe / mutt2task.py
Last active December 23, 2015 01:48
I was running into some encoding errors with internationalized mailheaders in the traditional mutt2task. So this is a improved, more reliable, charset- and limiter-save version of mutt2task from http://www.nixternal.com/mark-e-mails-in-mutt-as-tasks-in-taskwarrior/ written in Python.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
## About
# Add the subject of a mail as task to taskwarrior
#
## Usage
# add this to your .muttrc:
# macro index,pager t "<pipe-message>~/path/to/mutt2task.py<enter>"
// Startup
void setup() {
// read seed for harder randomization
randomSeed(analogRead(0));
turnoff();
delay(1000);
neon();
@noqqe
noqqe / isso
Last active December 27, 2015 22:19
OpenBSD rc.d script for "Isso - Ich schrei sonst"
#!/bin/sh
#
# $OpenBSD: isso,v 1.0 2013/11/10 14:34:36 noqqe Exp $
daemon="/usr/local/bin/isso"
issolog="/home/isso/comments.log"
issoconf="/home/isso/isso.cfg"
daemon_user="isso"
daemon_flags="-c $issoconf run 1>>$issolog 2>>$issolog"