Today I successfully (with a bit of help from friends) managed to add JSONP support to the Nginx upload progress module C code. I’m dead chuffed since: 1) this is the first time I have ever managed to modify a C program to do what I want, 2) the Nginx code is ninja. What the hell is JSONP ??? Good question. Its a way to get around the restriction that AJAX calls can only be sent to the same domain as that of the page. You embed a dynamic script element in the page and point it at the server which returns JSONP. Its just like usual JSON but wrapped in parenthesis and prefixed with the value of the ‘jsonp’ parameter passed with the get request. This turns plain JSON data into JSON data wrapped in a callback function call. An example is probably in order..
JSON:
GET /foo
{hello:’world’}
JSONP:
GET /foo?jsonp=callback_1
callback_1({hello:’world’})
Once I have tested the code a bit more I will send a patch to the original module author. But if you are feeling daring you can download the hacked module here.
Filed under: Uncategorized | Leave a Comment
Erlang The Movie
Incase you are wondering what Erlang is all about, this video tries to explain but will probably just result in a good laugh.
I’m just testing embedding videos really
Filed under: erlang, video | 1 Comment
I have been bugging them for this feature since I got my first slice. You can now save a backup of a slice ( a Zen VPS server ) and rebuild another slice using this image. This opens the door for creating a master slice server image which can be reused whenever we need a new slice and also for the possibility of saving a snapshot of a production slice, restoring it to a spare slice, preforming a complex upgrade or doing some debugging, saving the a script of the procedure, rebuilding the test slice, running the script, checking everything is correct, then applying the script to production. This should minimize messing about on the production slice. Perfect. I love virtualization, knowing slices are backed up daily and can be restored in minutes in the event of hardware problems helps me sleep at night. Slicehost you are leading the way.
Filed under: Uncategorized | 2 Comments
Big up to rocking bloggers
I have added some links to the blog roll in the sidebar on the right. At the moment its a mix of flash, ruby, erlang, and old time cocoon people who’s blogs I have enjoyed over the years. Have a click and a read, there are some seriously smart people in that list. Will add more when I get some time.
Filed under: Uncategorized | Leave a Comment
Living in Thailand I can’t just pop into Barns and Noble or order books online using One Click™ without silly postage costs. So I often end up paying for the PDF version and reading on my laptop. This is OK for small documents but strains the eyes when trying to read real books on an LCD (sorry LED) display. Sure we have a printer but its an Inkjet and its not practical to print a whole book. Think of the Trees! not to mention the cost of replacing the every 10 minutes.
So I’ve been reading up on these ebookie reader things. The Sony’s reader looks nice, but by the sounds of things page turning takes for ever, and well as my T-Shirt says “Fuck Sony”. Then there is the Amazon Kindle with its wireless support. But hang on you have to have it connected to a mobile phone network, and it only works in the US. God! When will these companies learn. In short neither product is for me. Are you listening Mr Jobs.. forget the iPhone, come up with a well designed iBook MacBook heck just call it iPaper and I will be first in line.
I had almost given up on the idea, when I read a post about a guy programming (Forth!) on the XO. I fancied one of these funky little green laptops from the start and really like the idea of them being open source and hackable. So I did a little research, turns out they are great little book readers, screen which flips round, 200dpi direct sunlight monotone mode, PDF reader, WIFI, only uses 2watts power. I want one!!! What’s more for 200 quid (about the same you fork out for Sony’s and Amazon’s crippled machines) you can Give 1, Get 1. OK, so its not a 100 dollar laptop, its actually four times as much but you do get the satisfaction of knowing that a child in a developing nation will also be enjoying this funky little green machine.

Until everyone is lucky enough to get their hands on an XO, here are some tips for people like me stuck reading lots of PDF books in OSX.
1. Don’t bother reading it, you can have the computer read it to you. I have mapped CTRL + S to be read this text. Leopard’s new computer voice Alex is the first almost human sounding computer voice I have heard. This works ok for a few pages, but is generally slower than reading and you the computer will mess up on some words.
2. Jirasak showed me this cool trick: CTRL + ALT + CONTROL + 8. Inverts the display colors so that black text on white is now, white on black. It makes reading easier for me at least. YMMV.
Filed under: Uncategorized | Leave a Comment
Tags: gadgets
Grr.. Snap shots on my blog.
WTF !#%&*… I hover over a link to be presented with that bloody annoying screenshot popup. I hate those widgets. They are right up there with Mick Hucknall and Stuffit on OSX in my list of pet hates. Techcrunch as almost unreadable thanks to “Snap shots” ad infested widget. Luckily I managed to kill them, in wordpress you go to presentation -> extras then uncheck ”Enable Snap Preview Anywhere on this blog”.
Filed under: Uncategorized | Leave a Comment
Search
Recent Entries
- Barcamp Bangkok Is Coming!
- Black is the new yellow
- Barcalys taking the piss. Three strikes and you are out. (Updated)
- Adding JSONP to Nginx Upload Progress Module
- BarCamp Bangkok (26th Jan, 2008)
- Erlang The Movie
- Slicehost adds named backups and cloning
- Big up to rocking bloggers
- Looking for an ebook reader, found an excuse to get an XO
- Grr.. Snap shots on my blog.
- Forget everything think you know and learn Erlang
Categories
- erlang (1)
- expat (1)
- thailand (3)
- Uncategorized (8)
- video (1)

