mac automator

September 26th, 2009

Someone at work who recently made the switch to the mac asked me to install some network managment scripts on her mac. When she was on the pc I had an .hta application that called ran various .vbs and .bat scripts to switch machines on/off and to copy sets of files on tot the desktops so I’ve got to re-do them for the mac, shouldn’t be too hard, eh?

This is my first bash at using automator but it was very simple. I’ve created an app that accepts folder or files droped on it and copies it to all the machines, just by showing selecting where they are from finder… how easy was that?

Tried to do the same to delete the files, but “computer says no…”, so back to a bit of bash scripting, shouldn’t be too difficult.

Also got to find a WOL (Wake on Lan) binary for mac… found this [http://www.coriolis.ch/en/wakeup/] but cant find a CLI version for bash.

php email verification

September 21st, 2009

Just sent out 2200 emails to users on a mailing list we had and got about 300 bounces.

Think I might allocate some time to write an email verification plugin for phplist, whereby you select a list and it’ll run through every email address and it will firstly check the format using a regex then use getmxrr() to check if an MX record for that domain exists.

Also, it might be possible using an fsockopen() on port 25 to see if the user exists on that server?

Will use these links below to try and get something running for PHPList.

http://www.webdigi.co.uk/blog/wp-content/uploads/2009/01/smtpvalidateclassphp.txt

http://www.devshed.com/c/a/PHP/Email-Address-Verification-with-PHP/5/

nk2 extraction

September 18th, 2009

Managed to convince a colleague to switch over and make the PC to mac jump today…

One thing she did request was the ability to have the autofill feature from outlook in Mail, I have transfered nk2 files before but wasn’t sure about importing them into Address Book. I thought it was going to take a lot of text hacking with Textwrangler, greps and csv imports… but.. a quick google managed to find a little app for extracting nk2 files… debunk2, very quick and handy!

http://code.google.com/p/debunk2/

smbfs mounting

September 18th, 2009

A company I do some work for has just acquired another server so I’ve chucked Ubuntu 8.0.4 LTS server edition on it, after trying to install ubuntu server 9.04 that couldn’t see the HP Proliant ML115 server RAID disks, but 8.04 could… strange? …  anyways, got it all running but, no RAID so will have to settle with 4 disks instead of two and just rsync them.

They already have an Ubuntu file server in the office so what I’ve done is just created a simple share (guest access = yes) on the new SMB server and mounted it via a smbfs entry in fstab…

firstly install smbfs support by typing:

apt-get install smbfs

type the following command (as root)

mkdir /mnt/sharename

then

nano /etc/fstab

then add this line at the bottom:

//your-servers-ip/sharename /mnt/sharename smbfs username=guest,password= 0 0

remount all your drives by the follwoing command:

mount -a

then… you should be able to browse the new servers folders by cd’ing into /mnt/sharename