Skip to content

Instantly share code, notes, and snippets.

View endreszabo's full-sized avatar
💭
I may be slow to respond. Btw I use Arch.

Endre Szabo endreszabo

💭
I may be slow to respond. Btw I use Arch.
View GitHub Profile
@endreszabo
endreszabo / irc-dramatic.pl
Created September 9, 2012 12:30
irc dramatic
#!/usr/bin/env perl
# in irssi you can set off this with /exec -o irc-dramatic.pl <o hai der>
use strict;
use warnings;
use Encode qw/decode/;
binmode(*STDOUT, ":utf8");
$|=1;
my @a=(0x3000,0xff01,0x201d,0xff03..0xff06,0x2019,0xff08..0xff0c,0x2212,0xff0e..0xff5d,0x301c,0xffe5,0xffe2);
@endreszabo
endreszabo / dramatic-utf8.pl
Created July 20, 2012 07:06
unicode output dramatic script
#!/usr/bin/env perl
# in irssi you can set off this with /exec -o irc-dramatic.pl <o hai der>
use strict;
use warnings;
use Encode qw/decode/;
binmode(*STDOUT, ":utf8");
$|=1;
my @a=(0x3000,0xff01,0x201d,0xff03..0xff06,0x2019,0xff08..0xff0c,0x2212,0xff0e..0xff5d,0x301c,0xffe5,0xffe2);
@endreszabo
endreszabo / macchange.sh
Created December 15, 2011 00:09
changes mac for fun and profit
#!/bin/sh
if [ "$1" == "wired" ]; then
IFACE=eth0
else
IFACE=wlan0
fi
if [ "$2" == "trusted0" ]; then
MAC="ff:ee:bb:cc:dd:aa"
@endreszabo
endreszabo / backup.sh
Created November 14, 2011 19:43
backup script
#!/bin/bash
set -o nounset
DEST=/mnt/backup/l
INCLUDE=/etc/backup-include
EXCLUDE=/etc/backup-exclude
LOGPATH=/var/log
MAX=100m
#if ! mount | grep -q $DEST; then
#!/bin/bash
# Tmux based TeX editor helper
EDITOR="${EDITOR:-vim}"
DOCUMENT="${1:-deriv}"
SESSIONID="tmuxtexex_${DOCUMENT}_$$"
tmux new-session -d -s "${SESSIONID}" && tmux new-window -t "${SESSIONID}:1" -n 'TmuxTeXEx' "$EDITOR ${DOCUMENT}.tex" && tmux split-window -v -l 6 -t "${SESSIONID}:1" "while :; do inotifywait -e modify \"${DOCUMENT}.tex\" && { make || pdflatex \"${DOCUMENT}.tex\" } && jobs %% || { evince \"${DOCUMENT}.pdf\" & }; done" && tmux select-pane -U -t "${SESSIONID}:1" && tmux -2 attach-session -t "${SESSIONID}"