Tech & Toys
-
IPTABLES String match support
I am planning on trying out iptables string match support at some point soon and have found this nice HOWTO on getting it compiled into your kernel
-
CSS Column layout examples
Nice examples of multi column css layout here (Broken link
http://www.bluerobot.com/web/layouts/)
-
CSS Support charts
While researching css I’ve found this (Broken link
http://devedge.netscape.com/library/xref/2003/css-support/) useful site with an amazingly useful css browser support chart (Broken linkhttp://devedge.netscape.com/library/xref/2003/css-support/)
-
Arithmetic in sh
never remember this
LIMIT=15 a=1 cd $SRC for filename in * do if (( a <= LIMIT )) then mv "$filename" "$TARG" ((a += 1)) fi done
-
URL Regex
Justin sent over a regex he wrote for catching the various bits of a url:
(http|ftp):\/\/((?:[^./]+\.){1,}(?:[^./]+))((?:/[^/]+)*/)([^/]+)\.([^./]+)
-
Parsing ftp xferlogs
I need to parse ftp xferlogs and our current regex was broken by spaces in uploaded filenames. Have fixed it, is shown below with the names of the fields.
$_ =~ /^(\w{3} \w{3} \s?\d\d? \d\d:\d\d:\d\d \d{4}) (\d\d?)(\S+) (\d+) (.+) ([ab]) (_|C|U|T) (i|o) (a|g|r) (\w+) (\w+) (0|1) (\w+|\*) ([c|i])$/o; $current_time = $1; $transfer_time = $2; $remote_host = $3; $byte_count = $4; $filename = $5; $transfer_type = $6; $special_action_flag = $7; $direction = $8; $access_mode = $9; $username = $10; $service_name =$11; $authentication_method = $12; $authenticated_user_id=$13; $completion_status = $14;
-
London Tube and DLR Station Postcodes
I recently needed a list of Tube and DLR station postcodes but couldn’t find one anyway. I ended up having to screen scrape a couple of sites, but now I have a list. Thanks to Paul Berry who commented on this post with a postcode for Heron Quays.
Update February 2019
After this file was moved around a couple of times and the link broken I finally made a Git repo for it which you can find here.
-
SCSI Connectors
Found a nice page with pictures of SCSI connectors. I never remember which one I need…
-
Adding static routes to RedHat 8 and 9
To add a static route to modern RedHat distributions you need to do the following:
Assuming you want to add a route to the
192.168.1.0/24
network via theeth0
network interface to the gateway at172.16.254
you would create a file called/etc/sysconfig/network-scripts/route-eth0
and in that file put the route:192.168.1.0/24 via 172.16.1.254
Either
ifdown
andifup
the interfaces or reboot to see the changes.Of course you could just add the route manually until the next boot:
route add -net 192.168.1.0 netmask 255.255.255.0 gw 172.16.1.254 dev eth1
-
Screen information
Ells posted a nice site which details some of the features of screen, here (Broken link
http://cosmic.homeunix.net/blog/old/00000018.html)