WordPress & code formatting

I’ve been using the WordPress plugin “developer formatter” for years and it worked pretty good … for a while. Unfortunately it stopped being developed sometime in 2008, which was OK since it did everything I wanted and worked fine. Unfortunately months later I noticed that the plugin broke the visual editor for new posting in my SVN version of WordPress, and unsusprisingly when the WordPress changes wenn to a live version it broke my editor there. But I liked the plugin so much, that I just started using the html editor to make postings here (and have been doing so for over a year). It works, but it isn’t the easies way to write up postings.

I finally bit in the sour apple and searched for alternatives that work without breaking a current WordPress. Turns out there are a few, and none really do exactly I want 😉
Right now I’ve narrowed down the selection to either My Syntax or WP-Syntax I’m going to play around with both, and as soon as I’ve decided which one fits my needs better, I’ll start fixing all the code tags in the blog (ugh). SO bear with me the next few days without code formating.

Wireshark remote capturing

yeah, this is real simple stuff, not really worth writing a script for it. but on the other hand it saves me from remembering how to do it every time I need it (which isn’t often). So here is a little script to setup remote capturing with wireshark.
All it basically does is ssh to the remote host and tcpdump sucking the output via stdout through the ssh connection to a local pipe, that is then used by wireshark to display the stream. Because of this you may want to make sure you aren’t capturing your own ssh data when doing this 😉

MySQL selecting IPs via CIDR

Quick little snippet here for selecting IPs from a database based off a CIDR subnet. First off a table structure with some test data:

Now let’s say we want all IPs from the subnet 173.192.175.16/28, using a simple 173.192.175.% would provide false results since you don’t want the whole /24.

If your IP is stored as an unsigned int (good for you) than you can use this snippet to search for matching IPs:

If your IP is stored as a varchar (for whatever reason), the only difference is a inet_aton() around the IP field.

No matter which one you use, the result will be:

Moving to the USA

I haven’t posted here for a while. One of the reasons is that I started posting more day-to-day stuff on facebook, but the main reason was that the last few months my wife and I have been busy organizing stuff. She got a job offer over here, so December and January we were busy getting everything organized to move from Germany to USA. In December we flew over for a week to get an apartment rented, buy a car, set up a bank account, insurance, … all the fun stuff you go through when moving to a new place. Let it be said, that christmas time is not the advised time to organize such stuff :-p
Steffi flew in on the 15th, and I came over a week later. And now our new home is in (the cold) Twin Cities 🙂 Our internet conenction isn’t going to be installed till Feb 1st (along with phone and TV), so I don’t have much to do except for cleaning the appartment, assembling furniture (IKEA is just around the corner) and shopping … and of course keeping an eye out for interresting jobs here. I’ll keep you all posted on how things are going here, If the sun ever comes out I’ll go out to shoot some photos.