JB's Blog

/au/SysAdmin

Archive for June, 2004

Aliasing Ethernet addresses

with 19 comments

Was hunting in the Network section in Mac OS X for a way to add a second IP address. Failing to find anything helpful I used trusty ifconfig!

sudo ifconfig en0 alias 10.0.0.5 netmask 255.255.255.0

Won’t work on reboots, but a nice little hack. Thank you Apple for using BSD!

Written by JB Hewitt

June 22nd, 2004 at 10:34 am

Posted in Mac OS X

wp-mail.php

with 167 comments

Started using WordPress a few days ago and love the clean look/design/code. But it got me thinking about photos, I love photos but hate having to upload stuff and linking to it (CMS style). In fact I’m so lazy, I decided to have a hack at wp-mail.php
What I ended up doing was replacing most of the code in wp-mail.php for wordpress 1.2, didn’t anticipate that when I first started but the results are nice.

This hack is a ‘drop in’ replacement for the current wp-mail.php. It uses pear as a mime compliant email ‘decoder’. What’s cool is that you can attach images inline in your email messages and they’ll be shown as an image in your wordpress article. It does this by decoding the image attachments and writing them to ‘wp-photos’ directory (not in default wp install).

It has all the abilities of the current wp-mail.php plus:

  • Allows image attachments (posts inline)
  • Checks if user email address is in the database (otherwise discards message)
  • Allows other file attachments (zip’s, exe’s, etc)
  • Fairly good cleaner for removing excessive line breaks

I’m planning on more updates, but would love to see this update included in future wordpress releases. Would be happy to maintain it to, I’m fairly sure it complies with most of the coding guidelines I’ve read on the wordpress website.

To install you grab the zip file: wp-mail.zip

  1. Drop the two files (wp-mail.php & mimedecode.php) into a wordpress 1.2 root directory
  2. Create the directories ‘wp-photos’ and ‘wp-filez’ in the wordpress root directory(with writing permissions (probably 0777).

Let me know what you guys think!

Written by JB Hewitt

June 16th, 2004 at 1:41 pm

Posted in Code,General

Robosapien!

with 21 comments

This toy robot is cool – I saw one on Rove Live last night and now I want to grab one. Who wouldn’t want a robot that dances?

body_01.jpg

As far as I can tell, an Australian scientist is the engineer who designed it which is heart warming. Sure it’s not the most advanced piece of machinery out there but it’s affordable for a grown ups toy. Imagine the chicks I can pull with this baby.
Looks like it receives its commands via infrared (it’s eyes are the sensors). Maybe with a little luck I’ll be able to make an appropriate LIRC driver and send commands to it via a computer. Sure line of sight would be a pain, but the possibility is there.

Hopefully this baby will be in stores around the states when I head over there in two weeks.
Robosapien website!”

Written by JohnBlade

June 16th, 2004 at 11:36 am

Posted in General

Lachlan!

with 7 comments

Me and Lachlan in my panel van….
If anyone has listened to Triple J for the past few months would have heard of the song Lachlan. It’s not technically the greatest song in the world but I just can’t get it out of my head. After searching around JB-Hifi and HMV and turning up empty handed I google’d for a copy and surged victorious!

For a mere $AUD18.55 including postage and handling you can order yourself a copy without even leaving your chair. Well, at least until you have to go to the door and pickup your postage package.

Grab your copy online here: trifekta.com.au

Written by JB Hewitt

June 15th, 2004 at 9:57 pm

Posted in General

More wp-mail fixes

with 9 comments

Fixed a few bugs today in my wp-mail modifications. Nothing major, just tided up some code and a few fixes here and there.
Also updated my CSS for the homepage, again nothing major just some tidying up. I’m trying to get this homepage/blog working 90% before I head off for my trip to America in a few weeks – so far looking good. Wish I could say the same about my development of the Soapbox linux server. I suppose it’s just a matter of time and energy.
Would love for the WordPress boys to include my new wp-mail.php in their CVS; wouldn’t mind maintaining it either. Have shot off an email to helpout@wordpress.org a few days ago – still no reply. Not sure how active the developers are but I would be keen in hearing what they have to say.

Written by JB Hewitt

June 12th, 2004 at 10:36 pm

Posted in Technical

Animated gif’s… (Modified by John B. Hewitt)

with 22 comments

I thought it was over… I thought that the web was over sites that had
millions of swirling animated gifs with ‘Under Construction!’ and 3D
mailboxes spinning around.

And then I get this in my inbox:

unknown.gif
Yes look at that guy go.
Granted that this wasn’t from a website but an email; it did scare me
back in the mid 90′s though. When website ‘design’ was a metaphor of
how quickly you could download tens if not hundreds of pictures of your
site. Thank god for websites with clean interfaces and pleasing
colours.

Maybe I am living in a dream world after all? :P

Written by JB Hewitt

June 11th, 2004 at 3:29 pm

Posted in General