Spottedsun - spottedsun.com - Code, Hacks and Other Nerdy Things

Latest News:

MacBook Pro Keyboard Lighting Not Working 3 Jul 2013 | 01:17 pm

Recently I tried to upgrade my RAM and afterwards the lighting on the back of the laptop’s keyboard wouldn’t work. This made me furious. WHY NOT?! I demanded an answer from Google but didn’t really g...

How to lock your Mac 2 Jul 2013 | 01:30 pm

My co-blog owner, Torleif wrote a post about how to lock your Mac, http://spottedsun.com/lock-your-mac-using-keys/ However, recently I upgraded my MacBook Pro to have an SSD hard-drive (after finding...

Question marks appearing in text from MSSQL database 20 Jun 2013 | 05:44 am

If you have question marks (?) appearing in place of special characters from a MS-SQL connection, simply force the database to return UTF-8 characters. You can do this with: $pdo = new PDO("dblib:host...

C code – save array to TGA image file 12 May 2013 | 02:24 pm

This snippet will write a TGA image file for you. RBitmap is a struct which has a width * height, and data (simply an array of an array, each pixel being a 32 bit int) TGA is one of the simplest image...

Creating an email image using ImageMagick 27 Apr 2013 | 01:27 pm

Most of us hate spam, and we know that if we put a plaintext email address anywhere on the Internet, some evil person is going to find it. I’ve been putting my emails in images for a long time, and th...

Android device not showing up 24 Apr 2013 | 03:50 pm

If your android device is not showing up on Mac OS X when you try and run your application from Eclipse (or you can’t see your device in the list in the command line) you need to change the USB settin...

How to lock your Mac when AFK 5 Mar 2013 | 01:05 pm

To lock your mac (in the same way win+L does on windows), press control + shift + eject (⏏) Alternatively, you can always set up a hot corner: Next, click the “Screen Saver” tab, and on the lower left...

Food for hackers 4 Mar 2013 | 12:03 pm

Bacon. If you ever find yourself in Dunedin, New Zealand, grab yourself a Bacon Buttie. I find that if I eat a fulfilling breakfast, that I can code better during the day. Probably not so good to eat ...

Listening to music with hearing aids 26 Feb 2013 | 05:48 am

If you’re hard of hearing, deaf, or whatever stupid PC term it is these days you do not need a pair of $400 headphones, or $300 earbuds moulded into the shape of your ear to get the best out of listen...

Codename Android 11 Jan 2013 | 08:51 am

Recently, I got myself a new smartphone – the Samsung Galaxy Nexus. An absolute stunner of a phone. Being a geek, I decided to root it then install a custom ROM. I’ve always used Cyanogen Mod on my Ne...

Recently parsed news:

Recent searches: