Posts tagged: TIPS

A MAC address regex

Today I worked on a form and script used for registering users on a restricted-access wireless network. Here’s a nice compact regex for checking that MAC addresses have been entered in the correct format. (If you’re using this in a double-quoted PHP string, escape the “$” with a backslash.) /^([0-9A-F]{2}:){5}[0-9A-F]{2}$/i Bjoern commented on Mon Jun 4 09:09:14 2007: Hi, great regex! exactly what I was looking for. It only does not match lower case also the windows output of ipconfig/all (using a dash as delimiter) is not covered

Movin' on up

My last post was about a server migration at work; this one’s about moving my own stuff, an operation completed late last night. It was easier in that it’s less critical (nobody’s likely to freak out if my blog disappears for a day) but harder in that it also involved mail. I hate dealing with mail; though I did manage the switch without losing any, as far as I know. My thanks to the JohnCompanies.

Root, sweet root

For several weeks at work I’ve been prepping for a server move; this week we flipped the switch. It was the most serious migration I’ve ever done, and it went very well. Some notes: Previously we shared a dedicated box at a certain very large colo provider. A few weeks ago, in the course of swapping out a failing drive in our box, staffers at the colo 1) wiped out the live backup of the drive and then 2) destroyed the contents of the failing drive, overwriting it with a week-old backup.

Offsite, online backup: rsync.net

This week at work we’ve been dealing with a hellish situation: our colocation provider (who will for now go unnamed) wiped out the live backup of one of our drives – then overwrote the drive with a seven-day-old tape backup. Nice going, guys! So now I’m digging through my “stashed-this-away-just-in-case” backups for missing data from the past week. We’re switching to JohnCompanies.com for hosting – I’ve been using them for nearly three years for my own stuff (including this site), quite happily.

Jumpcut is back

I got an e-mail from Steve Cook today. For a couple years now I’ve been using a great little utility Steve wrote called Jumpcut. It’s what I call a “clipboard stack” – it records multiple cuts/copies and allows you to paste them back out in whatever sequence you wish. And it does all this without requiring you to use the mouse – essential. (I was led to Jumpcut by a comment on this post of mine from June 2004.

Trac spam

It’s a problem. Trac is a fantastic, world-dominating software project management and bug-tracking system written in Python. It integrates with Subversion and has a wiki and just works. Even the Rails guys use it. It’s possible that if Trac and Chuck Norris walked into a bar, only Trac would leave. But unfortunately, the comment-spammers and wiki-spammers have noticed Trac and have been updating their scripts. Hence the 12,000 15,000 hits for “trac spam.

Random crufty open source release of the day

Last year a client asked for help moving his website to a new host from XO.com. The tricky part was that his 200 pages of content were locked into an obsolescent proprietary tool called “Site Builder” that offered no exporting options. The file format was a flatfile that looked like this: #Page-Type "html" #UID "1000" #Access-PublicRead "on" #Access-PublicWrite "off" #Page-Links-Style "links_outline.nhtml" #addbrs "off" #hidenav "off" #HTML ... The file structure went like this: a parent directory named nss-objects; child directories bearing page names (or slugs, really); and inside each, an empty directory named !