Hoke’s Ramblings

Tech

PayPal finally in South Africa!

by Chris on Mar.26, 2010, under Pathetic jokes, Tech

At long last PayPal finally has a presence here in South Africa through the good folks at FNB. If you want to see how it works, you can try out the link below ;)



4 Comments more...

XBMC – a fantastic pice of free software

by Chris on May.29, 2009, under Entertainment, Tech

Quick post for a Friday/first half of 2009/whatever…

I really, really love this HTPC software. It’s just lacking the EPG and TV recording, otherwise it’s the bomb

Try it out, share the love, vote, and encourage them to integrate the tv stuff :)

Leave a Comment more...

Websites that are too smart

by Chris on Nov.26, 2008, under Tech, Travel

I wrote a post ages ago saying how cool it was that websites could figure out where you are based on your IP address. The downside of this is that they sometimes mistakenly assume you speak Kazakh, just because you happen to be sitting in a hotel room in central Asia.
kazakh-search-results.PNG
What ticks me off even more is that to try and find the English option, there’s nothing that actually says “English”. So not only do they assume you can speak the local lingo, you know what your own language is called in it. I had to resort to “Pirate” and then after that I could choose English in “Me Likes an’ Dislikes”.
select-pirate.PNG

EDIT: I subsquently found a “Google.com in English” link at the bottom of the pge, but the main point of my rant stands – language selections usually tend to be based on the langugage you’re stuck in at the moment, which sometimes makes it very hard to work your way out.

Leave a Comment more...

WebMarshal Fail

by Chris on Nov.22, 2008, under Personal, Tech

webmrshall-hokemon1.PNG

2 Comments more...

Picasa 3 finally gets Ken Burns effect

by Chris on Sep.29, 2008, under Tech

I’ve long been a fan of Google’s Picasa image editing/viewing software, but have found it lacking in one area; The slide shows were very static, and lacking the dynamic pizazz of iPhoto’s “Ken Burns” effect.

Well the beta release of Picasa 3 has included this much anticipated (to me at least) feature! It has the rather inane name of “Pan and Zoom”, but I guess it will avoid some lawsuits.

Another nifty addition (I don’t know if Picasa 2 had this though, I just discovered it by accident) – If you have dual monitors, and activate the Picasa screensaver, it will show separate images on each screen – now you can view your Lolcats in stereo!

Leave a Comment more...

Wake On LAN Through the Internet

by Chris on Jun.14, 2008, under Tech

Wow. Four posts in as many days! This blog is smokin’!

Firstly, I’d like to say that to add to the super l33tness of this post, I used WOL and VNC from halfway around the globe to get local admin access to my router to check all the settings necessary for this to work. l33t.

Wake on LAN is a very useful tool that allows you to send what is known as a ‘magic packet’ over a LOCAL area network to boot up a specific PC, whose MAC address appears in the packet. Googling this will give you any number of applications and tutorials to accomplish this. Getting this to work from outside your LAN however, is a tad trickier.
(continue reading…)

Leave a Comment more...

DIY Email to SMS Gateway

by Chris on Jun.14, 2008, under Tech

Well, despite the ‘Wake on LAN’ being the ‘popular’ choice for my first how-to, as Murphy would have it, it’s not working now for some inexplicable reason. Hence the subject of this post will be getting emails to be automagically rerouted to your cell-phone by SMS.

Firstly, you unfortunately need to pay somebody to send you SMSes. Good choices in South Africa are WinSMS or BulkSMS. In both cases you sign up for an account and prepay a certain amount of SMSes. The example below uses BulkSMS.

Next, you need to set up a mail forwarder to execute a php script. I’m not entirely sure it’s possible with all hosts, but it is with Site5.

Create a mail account (I get bounce errors if the account doesn’t actually exist) eg “sms2me@mydomain.com”. Instead of forwarding to another email address, specify the following:

| /usr/local/bin/php /home/your_home_dir/path_to/sms2mail.php

Next you need the script to actually take the mail passed to it and ship it off through your third party gateway.

Disclaimer: This is code was pulled in from all over until I got the cursed thing to work. Requires curl libraries to do the form post. No warranties express, implied or otherwise apply. Some emails still come through with rich formatting etc, which uses up all your 160 available characters. I need to look into this at some stage.

#!/usr/bin/php
<?php
   // read from stdin
   $fd = fopen("php://stdin", "r");
   $email = "";
   while (!feof($fd)) {
      $email .= fread($fd, 1024);
   }
   fclose($fd);

   // handle email
   $lines = explode("\n", $email);

   // empty vars
   $from = "";
   $subject = "";
   $headers = "";
   $message = "";
   $splittingheaders = true;

   for ($i=0; $i < count($lines); $i++) {
      if ($splittingheaders) {
         // this is a header
         $headers .= $lines[$i]."\n";

         // look out for special headers
         if (preg_match("/^Subject: (.*)/", $lines[$i], $matches)) {
            $subject = $matches[1];
         }
         if (preg_match("/^From: (.*)/", $lines[$i], $matches)) {
            $from = $matches[1];
         }
      } else {
         // not a header, but message
         $message .= $lines[$i]."\n";
      }

      if (trim($lines[$i])=="") {
         // empty line, header section has ended
         $splittingheaders = false;
      }
   }

   $headers2 = "From: $from\r\n" .
      "Reply-To: $from\r\n";

   mail('###@gmail.com', "[SMS] ".$subject, $message, $headers2);

   $message = substr($message,0,155); // make sure it fits

   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, 'http://bulksms.2way.co.za:5567/eapi/submission/send_sms/2/2.0');
   curl_setopt ($ch, CURLOPT_POST, 1);
   $post_fields = "username=###&password=###&message=$message&msisdn=27#########";
   curl_setopt ($ch, CURLOPT_POSTFIELDS, $post_fields);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   $response_string = curl_exec($ch);
   curl_close($ch);
?>


Now back to getting my wake on wan to work again…

1 Comment more...

What is this blog for?

by Chris on Jun.12, 2008, under Tech

Ok, so clearly I (and you, the blessed reader) aren’t getting enough bang for my buck, blog-wise, so why on earth did I renew for another year, you might ask?

Well, besides blogging, I’ve hacked together a couple of useful server-side scripts over the years that I still find immensely useful, in my personal capacity, reader-be-damned. Here are a few of them:

  1. Screenscraping TVsite.co.za to get the day’s telly viewing on one page, one click from my bookmarks toolbar
  2. Sending Wake-on-Lan “magic packets” to my router, which passes them on to my desktop at home, so that I can boot up my PC from anywhere in the world to use VNC, with just a click of one of my (non-shared) del.ico.us bookmarks.
  3. Automatically emailing my gmail account when above happens, so I know my PC’s booted up properly (ok, this has nothing to do with my webhosting, but my ISP’s open mail server)
  4. Emails to a private account on my domain get forwarded through an SMS gateway to my number, so I can get booking confirmations etc sent straight to my phone.

A couple of these, particularly the Wake-on-Lan and email gateway story were a bit of a headache to get to work, so if people are interested, I may actually write some blog-entries with how-tos!

3 Comments more...

Google Earth Traceroute database update

by Chris on Jan.08, 2008, under Tech

After analysing the logs for my website, it appears that the majority of the traffic coming here is for my Google Earth Traceroute. So being a diligent netizen, I have updated the IP georeferencing database to the Jan 2008 release. It appears to be quite a bit more accurate than the one I was using from 2006!

As per terms of use, I am obliged to say:

This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/.

Leave a Comment more...

Pathetic Jokes

by Chris on Apr.27, 2007, under Pathetic jokes, Tech

While my fountain of pathetic jokes may be running a little dry of late, I was delighted to note when perusing my weblogs that I actually got some search engine hits (one) for ‘pathetic jokes’. Seems there’s a demand, so I’ll be redoubling my efforts!

I’m not sure which search engine it was, but it seems like I’m #6 on MSN.

1 Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!