Archive for September, 2009

Snow Leopard, Drupal, Macports and php

The short story is this: Snow Leopard has php 5.3.0 in, and although Drupal 6.14 now runs on that version, all previous drupal versions run on 5.2. [Solution? Manual compile - instructions below]

(Read the article)

South Africans: it’s legal to add people to your newsletters without their permission

Turns out it’s legal to spam people if you’re South African.
(Read the article)

Import the correct package for Actionscript 3 functions

Warning: geeky rant follows. If you don’t care about Flash and Actionscript, don’t bother reading. Go and play in the sunlight, or whatever you people do for fun.
(Read the article)

Stop spamming me, South Africans

Spam sucks. Americans have gotten a lot better at online marketing recently: only double-opt in lists are allowed (by law). Whereas South Africans suck email addresses out of the air and send unsolicited mail (spam) without asking the recipients to opt-in first. I can’t stop them, so the best I can do is publish their email addresses here in the hope spambots will pick them up, and send them lots of spam. Justice? I hope so.

[Update: turns out double-opt in lists aren't required, and South Africans can subscribe people to their newsletters without their permission. In my book, this exactly what spam is, but South African law doesn't agree.]

[Update: I've deleted Diane's details from this post. After emailing her, she promptly responded saying that I'd been on her database for over a year and only sent 3 emails in that time (which is true) and that I could've unsubscribed earlier, which is also true. She denies being a spammer and wants me to only go after bigger companies. While she's incorrect that she's not a spammer (i.e. she sent me unsolicited commercial email) she does say that she spends a lot of money monthly making sure she complies with the marketing regulations. Diane, legally you're in the right (i.e. you can subscribe anyone you like to your newsletter) but if you do that, you're breaching internet etiquette - double opt-in lists are the way to go. I hope you've stopped subscribing random people to your list.]

The Diamond Life @ The Bank, Rosebank, Johannesburg, Sat 19 September

Sent out by anythinggoes.co.za on Sept4 2009, this spam is about some new club launch in Jozi. Didn’t subscribe, lads.

C2IT Computer Hardware

c2it@wec2it.com sales@c2it.co.za prize@c2it.co.za

These guys make me chuckle. Their disclaimer at the bottom of their newsletter says,

We support responsible and ethical email marketing practices. Please know that we respect your right to be purged from this marketing campaign. Removal from this email distribution list is automatically enforced by our email delivery system. Please click here to start the process for email deletion.

Wow, they “respect my right to be purged from this marketing campaign.” What about my right to not be added to it in the first place?!?! They also say,

The person addressed in the email is the sole authorised recipient.

Authorised by who? Not by me, that’s for sure.

We encourage and support best practices in responsible email marketing.

Great! Best practices are double-opt in lists, otherwise you run the risk of annoying some random person out there who posts your website and your email addresses on his blog. I look forward to seeing if this post shows up higher on Google listings on searches for C2IT Computer Hardware.

These guys are also very, very annoyed by C2IT’s spammy practices.

[Updated: some Eagle-eyed car group selling Fords and Mazdas]

[Updated: kaleidoscope advertising and marketing say they got my name from Google.]

ssh logins without passwords

According to “How To Become A Hacker”, No problem should ever have to be solved twice.

My problem: logging into a particular server via ssh. Each time I do that, I’ve got to open Keychain Access, search for “ssh”, find the correct Password item which I added in there previously, open it, click “Show password”, type in my password to unlock my keychain, copy the password, paste it into terminal, and I’m in. A perfect task to be automated!

The outline of the solution is to use public/private key cryptography to automatically authenticate myself to the server without having to use a password each time. The steps are:

  • Generate a public and private key pair using using ssh-keygen -t rsa
    Just follow the prompts and choose the defaults (yes, the passphrase must be empty too). Your private key will be saved in /Users/your-name/.ssh/id_rsa and your public key will be saved in /Users/your-name/.ssh/id_rsa.pub
  • Edit id_rsa.pub and copy the key into textedit. Make sure the key ends with the username you’ll be logging into the remote system with (something like user@example.com).
  • Copy the contents in textedit, ssh into the server as per normal, and append it to the end of the authorized_keys file in the .ssh/ folder.
  • To test, log in again using ssh. If all has gone well, you shouldn’t need to re-type your password :)

You’re done! I’ve added an extra step, by creating a new file called ssh-example.com and putting my full ssh connection string in it. Then I headed over to /usr/bin and did a sudo ln -s /path/to/script/ssh-example.com which means next time I want to connect, I just type ssh-example.com into terminal.

Thanks to these guys for the help.

Weird characters after Wordpress upgrade

I’ve just upgraded a few wordpress sites, and it all went well, except for the fact that it didn’t. This site was easy and quick – I’m impressed with how polished the wordpress experience is. I uploaded the new files, visited wp-admin, and wordpress did it’s thing. Sweet! Changed the theme, realised it didn’t support widgets, so added some code which let it do so, and voila. Done.

Then I did the same for a client’s site, except once the whole upgrade was done, her site was full of characters like