Skip to content

Instantly share code, notes, and snippets.

View pawelz's full-sized avatar

Paweł Zuzelski pawelz

View GitHub Profile
#!/bin/sh
# This script searches directory for maildirs.
# It is designed to work with mutt. Add following line to your muttrc:
# mailboxes `/path/to/maildirscan.sh /path/to/top/level/maildir
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
#!/bin/sh
# just an example of how you could handle your downloads
# try some pattern matching on the uri to determine what we should do
# Some sites block the default wget --user-agent..
GET="wget --user-agent=Firefox --content-disposition --load-cookies=${HOME}/.local/share/uzbl/cookies.txt -nv "
dest="$HOME/Downloads/"
url="$8"
@pawelz
pawelz / pawelz.theme
Created February 6, 2010 14:31
My ekg2 theme
/set ncurses:contacts_size 15
theme pawelz
known_user %1
known_user,speech %1
unknown_user %1
Irc Version
message %b<%w%1%b>> %n%3
chat <%g%1%n> %n%3
sent <%w%1%n> %n%3
#!/bin/sh
xwininfo -int -root -children \
| awk -vFS='"' '/Uzbl browser/ {
gsub("^ ", "");
sub("^", "'"'"'", $2);
sub("$", "'"'"'", $2);
print $2
}' \
| tail -n1 \
| awk '{
#!/bin/sh
xwininfo -int -root -children \
| awk -vFS='"' '/Uzbl browser/ {
gsub("^ ", "");
sub("^", "'"'"'", $2);
sub("$", "'"'"'", $2);
print $2
}' \
| dmenu -b -i -l 30 \
| awk '{
function clientfind (properties)
local clients = client.get()
local rv = nil
for i, c in pairs(clients) do
if match(properties, c) then
rv = c
end
end
return rv
end
# vim:fileencoding=utf-8:sw=4
# Copyright (c) 2009 by Paweł Zuzelski <pawelz@pld-linux.org>
# Licensed under terms of WTFPL, see http://sam.zoy.org/wtfpl/
import ekg
import sys
def messageHandler(session, uid, type, text, stime, ignore_level):
sys.stdout.write("\a")
#!/usr/bin/python
# vim:fileencoding=utf-8
"""
Copyrights (c) 2001, Paweł Zuzelski <pawelz@pld-linux.org>
Usage:
Move mode:
./timemove.py [-]HHMMSS file1 [file2 ...]
#!/bin/sh -e
config=$1;
shift
pid=$1;
shift
xid=$1;
shift
fifo=$1;
shift
diffcol() {
sed -e '
s,^[,^[[44m^[^[[49m,g;
s,^G,^[[44m^G^[[49m,g;
s,^\(Index:\|diff\|---\|+++\) .*$,^[[32m&,;
s,^@@ ,^[[33m&,;
s,^-,^[[35m&,;
s,^+,^[[36m&,;
s,\r,^[[44m^M^[[49m,g;
s, , ,g;