I am very happy with my SSL certificate installation!

That’s right… All of massyn.net is now running as an encrypted site.  I just managed to finish up the last bit of config on my .htaccess file, and WordPress is also very happy with running on SSL.

I’m really glad I switched to my own virtual machine..  This is very cool.

So you have that favourite song that you’d like to turn into a ringtone on  your iPhone, but Apple is just making it so darn difficult.. Have no fear.  This procedure will describe how you take your audio clip and turn it into an iPhone ringtone.

  1. By now you probably have the audio clip that you’d like to ringtone.
  2. Edit the clip in your favourite audio editor.  If you don’t have one, Audacity works just as well.
  3. Strip out no more than 30 seconds of audio.  This is important!  It won’t work if it’s longer than 30 seconds.
  4. Save the 30 second clip as a WAV file.
  5. Import the WAV file into iTunes.
    1. Open iTunes
    2. Click File, Add File to Library
  6. Convert it to MP4
    1. Find the imported file in the iTunes library
    2. Right click on it, and select “Create AAC version”
    3. When it’s converted, you will see two files in iTunes.
  7. Find it in Windows Explorer.
    1. Right click on the newly created music file, and select “Show in Windows Explorer”
  8. Rename the file’s extension from a m4a file to a m4r.
  9. Import the newly renamed m4r file into iTunes again by clicking on “File”, “Add File to Library”
  10. Now when you open up “Tones” in iTunes, you’ll see the ring tone.
  11. Sync the ring tones to your iPhone like you would any other song.

I travel on the train every week day, so the the Opal card roll-out in Sydney would certainly affect me.  I was trying to hold out as long as I could, but it would seem the paper tickets will start to fade away, so I might as well get on board.

One thing people have been saying, is that Opal is more expensive.  When you look on the Opal website, they are very quick to explain how will save a whopping $1 on a ticket.  Ok, that’s great.. or is it..

Let’s compare..

A weekly train ticket (according to the said website) from Wyong to Central would cost $60.  Comparing this to the paper tickets, we get the following :

Type Cost for 1 week Cost for 2 weeks Cost for 4 weeks
Opal $60 $120 $240
Adult weekly $61 - -
Fortnight Adult - $122 -
Adult Monthly - - $222

I have logged a question to Sydney Trains to find out what the deal is. It just seems wrong that they would send so much propaganda around the “saving” on a weekly ticket, but neglect to say that you will now cough up more since you’re travelling on the train monthly.

Watch this space… I think I can already predict what Sydney Trains is going to say to me.

I remember growing up, we attended some church seminars.  The one I remember, was the subliminal messages that are embedded in rock music.  I distinctly recall the preacher citing Queen’s “Another one bites the dust”.  The theory was that if you play the song backwards, you’ll hear the message : It’s fun to smoke marijuana.  I tried it (playing the song backwards!!) and I don’t hear the message.

Then there’s also the talk about how barcodes are the devil!  Yep, this preacher had it in his mind that the introduction of barcodes is the sign of the end times, and how it relates to the mark of the beast as written in the book of Revelations.

Really?  How can this little image be the mark of the beast?  It’s data encoding.  It’s a mechanism to represent data in a format that is easy for a computer to read, to improve the management of materials in a distribution center, reducing human error when capturing the numbers, and improving performance in capturing data.

There is no security built into a barcode.  Any one can read it, any one can produce one.  You will not get a barcode tattooed on your forehead.  The chances of someone copying it and pretend to be you is huge, so no, it won’t happen.

So fellow Christians, I love you guys, but really, please do your research into topics before you get on your soap box trying to save the world.  Sometimes you make the rest of us look like a bunch of idiots.

I think it was back in 2009 that I wrote the Yubikey authentication modules.  One authenticates against the Yubico servers, the others will decrypt the code itself.

I do recall someone making a comment that they would have liked to see some server code in action, so I decided to do it.

Head on over to Github, and download the yubikey-server.  It’s just a few perl scripts with a mySQL backend, that plugs into my decrypter module.

A few things to keep in mind… This server has not been security validated yet.  I’m putting this up as an example on how you could do your own authentication using the Yubikey hardware.  For one, I’m not particularly proud of storing the AES key in clear text in the mySQL database, but since this is only as an example, I don’t really mind.

The repository is on Github, so I don’t see a need to prevent it’s development from continuing.  So if you’re keen to know how to do your own authentication, head on over and have a look at the code.

I started using the Google Authenticator app on my iPhone, and started researching how the TOTP algoritm works. With a bit of research I managed to get the algorithm working in Perl.

# Phil's Google Authenticator code in Perl
use strict;
use Digest::SHA qw(hmac_sha1);
use Convert::Base32;
my $otp = &generateOTP('abcd efgh ijkl mnop');
print "Your OTP is $otp\n";
sub generateOTP
	my ($key,$interval) = @_;
	# Turn the key into a standard string, no spaces, all upper case
	$key = uc($key);
	$key =~ s/\ //g;
	# decode the key from base32
	my $key_decoded = decode_base32($key);
	# Read the time, and produce the 30 second slice
	my $time = int(time / 30) + $interval;
	# Pack the time to binary
	$time = chr(0) . chr(0) . chr(0) . chr(0) . pack('N*',$time);
	# hash the time with the key
	my $hmac = hmac_sha1 ($time,$key_decoded);
	# get the offset
	my $offset = ord(substr($hmac,-1)) & 0x0F;
	# use the offset to get part of the hash
	my $hashpart = substr($hmac,$offset,4);
	# get the first number
	my @val = unpack("N",$hashpart);
	my $value = $val[0];
	# grab the first 32 bits	
	$value = $value & 0x7FFFFFFF;
	$value = $value % 1000000;
	return $value;	

After a number of years, I’ve decided to ditch GoDaddy.

A few months ago I signed up for a virtual machine, where I had full control over the entire box.  At $5 p/m, I thought it wasn’t a bad deal.  My GoDaddy hosting renewal came up, and when I reviewed how much I’m paying, vs what I’m actually doing on the web, I decided to “downgrade” by moving to a different hosting provider.

With a virtual machine, I have the control.  I can install as many databases as the resources would allow, I can run as many scripts as I want, without having to worry about GoDaddy killing the process midway.

Now there’s a downside.. I have to be in control, that means I have to review the logs, and keep the box secure, because now it’s exposed.. Now the whole world and his dog will try to crack into it (and looking at the logs, it did not take long!)

I now have SSL (but not a signed certificate yet)… Yes, that will come… Until then, it gives (at least some) level of confidence, although not much.  I’ve also enabled the Google Authenticator, which seems to be a nice way to ensure that I’m the only one able to log onto my site.

I do like the idea of being able to load whatever Perl module I can think of, without having to worry about any other service provider.

Don’t worry GoDaddy, I’m still leaving my domains with you… Only my hosting is moving away…  And now we wait for DNS to replicate….

A number of Silicon Valley ventures are now pursuing artificial intelligence. Google recently acquiredDeepMind and although it is still a young company, there must be something special about them for Google to be interested. There are a number of AI projects today that are particularly interesting, one that comes to mind is a project known as BlueBrain, that tries to emulate the human brain by reproducing the brain’s neurons in software. They’ve had some success, and continues to go forward.

I’ve been playing around with chatbots, which you could argue is a subset of AI. I’ve been trying to build a chatbot that is capable of human interaction, and in my pursuit of AI, I realized that there’s a difference between true intelligence and perceived intelligence.

Focusing on a chatbot, it’s main goal is to engage in a conversation with someone else. I’ve been reviewing the AIML code of A.L.I.C.E.created byRichard Wallace. Wallace has been working on Alice for a number of years, and she boasts with more than 100,000 entries in her database. He has taken an approach where on (almost) everything being said is updating a variable somewhere that influences future responses. She’s a reasonable size chatbot, and won a few awards over time. When you actually engage in chatting with the bot, you realize that the responses are mecahnical. This is no fault of Richard Wallace. This comes down to the sheer magnitude of human complexity, how we communicate and interact with each other.

The problem with chatbots like ALICE, be they written in AIML, RiveScript, Chatscript, or handcoded in any other programming language, is that basic knowledge, skill and capability are being combined into a single file. Taking the ALICE example, she has some (really) basic deductive capabilities, which are build into the AIML language. The issue is that we are trying to build the skills and ability of the “brain” into the same knowledge repository of the bot.If you consider the waythehuman brain works, we have a repository of knowledge, bits of information we acquire over our life time. We acquire skills and abilities over time, and on topof thatour personality also develops.The human brain is one of the best pattern recognition devicesin the universe, and it’s a skill thatis very difficult to implement in software or hardware. It is this pattern recogntion ability thatkeeps human beings in cognitive jobs.

Regardless of what AI platform you use, you could argue that a single AIML category in a chatbot is equivalent to a single neuron in the human brain (ok, maybe not quite, but you get the idea). With enough AIML categories a chatbot could theoretically start to exhibit real human personality and emotion. With the volume of chatbots on the web today, there appears to be enough appeal for chatbot writers across the world to unite their efforts, and start building the super bot, that, like a child, can grow over time with knowledge constantly pouring into it from multiple sources, rather than trickling from one author over the period of many years.

Projects like BlueBrain is making headway in this space, realizing that the building blocks for cognitive ability starts with the neurons. The thought of an intelligence artificial being, with feelings, emotion, and “human” rights will pose some very interesting debates in the future of the world.

Na hoeveel maande is potgooi.com weer aan die gang. Daar was ‘n paar probleme met GoDaddy, en die site wou net nie lekker werk nie. Ek het ‘n ander diens gekry, en het sopas al die scripts oor geskuif gekry, so potgooi.com is nou weer aan die gang.

potgooi.com is die sentrale plek waar jy al die Afrikaanse potgooie wereldwyd kan kry. Al die nuutste episodes is beskikbaar op die blad. Moet my asseblief nie kontak en vra waar jy laas Woensdag se praatjie op RSG kan kry nie.. Ek kan jou regtig nie help nie. Jy moet in so ‘n geval vir RSG kontak.

Die Afrikaanse potgooi “mark” lyk so bietjie vaal op die stadium. Ek wonder of ek nie self weer die mikrofoon moet nader sleep nie. Ons sal maar sien.

As jy ‘n potgooier is, en wonder hoekom jou potgooi nie gelys is nie, stuur vir my ‘n email met jou RSS feed adres, en hy word maklik in getrek. Die link is op potgooi.com

I do a lot of conference calls. I’ve been using a Plantronics headset at work. I’ve had no complaints with it. With that, I decided to invest in one for home, and I topped it off with the purchase of the MO300 adapter cable for my iPhone.

The headset is nice, but the MO300 adapter is a joke. A few minutes into the call, it would drop the call, and start playing music on my iPhone. I tried it on both an iPhone 4 and an iPhone 5, same thing.

And here’s the best part.. When I do Facetime, there is no problem! No dropping of the call. Only when making a regular phone call the cable would drop my call, and initiate music.

We know that the earphone jack on the iPhone can be used for sending data back to the phone. For some reason, the Plantronics cable does exactly that.

Now I see it is a discontinued product. Oh well… I won’t make the Plantronics mistake again.