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 / bondup.sh
Created September 10, 2012 19:18
wifi+ethernet bonding
#!/bin/sh
ip link set eth0 down
ip link set wlan0 down
ip link set bond0 down
modprobe bonding mode=1 miimon=100 downdelay=20 updelay=20 use_carrier=1 primary=eth0
dhcpcd -C resolv.conf --noarp --denyinterfaces 'eth0 wlan0' --background
ip link set eth0 up
ip link set wlan0 up
ip link set bond0 up
ifenslave bond0 eth0 wlan0
@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