Node.js – the programmers “Save the World” tutorial

What this tutorial is

This tutorial was designed to help you understand how to create your own node.js program – not how to copy and paste someone else’s code! (However… you might have some luck finding the complete code at https://bitbucket.org/akademy/save-the-world/src).

It is assumed you are a programmer, with some experience of javascript and other programming languages such as Python, Ruby or Java. It’s really written for other programmers and tries to get to the points quickly (except for the odd alien invasion)!

It may be useful to imagine: Earth has only minutes to live and you are our only hope – your teacher is barking orders at you in a manic attempt to teach you the skills you’ll need to defeat the invading armada. You need to set up a node.js server before the laser bolts start burning! Quick!

Continue reading “Node.js – the programmers “Save the World” tutorial”

KeePass with Putty sessions in ssh

This blog is about launching SSH sessions through putty but from within KeePass, mostly using Windows although other Operating Systems may also work. Putty essentially organises and launches SSH sessions between computers; KeePass is a Password Safe storage system. By manipulating the form of the URLs in KeePass we can simply right click an Entry and select open URL to launch a putty session.

KeePass and Putty

Continue reading “KeePass with Putty sessions in ssh”

Controlling JavaScript with LazyLoad – a ShareThis example

Forgive me for the break in communication. Let’s get right back into it.

In the last few months I’ve been looking into website load times and implementing a few on my own. My hoster doesn’t run the most efficient servers and so my webpages really weren’t appearing as first as they might. One interesting area I looked into was javascript – in particular how the position and method of including can impact the rendering of a webpage and the speed it appears.

Some of the worst things you can do is include javascript files near the top of your HTML page. Unless you are careful, any javascript you include in the <head> or <body> sections will stop a browser from reading and rendering your page. This is because the browser does not know whether or not that javascript will output code and therefore require some rendering of its own.

Continue reading “Controlling JavaScript with LazyLoad – a ShareThis example”

StereoImage

In July of last year I purchased the LG Optimus 3D, a mobile phone which comes with dual cameras to take spectroscopic images. I’ve been very happy with the camera and consequently have quite a collection of 3D images. However, there are no easy ways to display the 3D photos online – this is why I created “StereoImage”.

StereoImage is a way to display stereoscopic images on a HTML5 canvas. It works on jps and pns files which are fundementally two jpegs / pngs joined together side by side. Using StereoImage a user can quickly switch between different ways of displaying the images.

See it here:

Your browser does not support the canvas element.


The different ways to show include:

  • Horizontal, one on top of the other,
  • Vertical, side by side,
  • Show just the left,
  • Show just the right,
  • Flick between both images (at variable rate)
  • Stereoscopic – reduce size with circle eye alignment.
  • Anaglyph – red and green/blue view (for use with glasses)

The code is open source, so feel free to use it. You can find more details on my website here: http://www.akademy.co.uk/software/stereoimage/ . Download or checkout the code via BitBucket here: https://bitbucket.org/akademy/stereoimage

 

The Samsung Running App

The samsung running app (called “Samsung Hope Relay”) is a nice idea. Samsung will donate a pound to charity for every mile you walk, run o4 cycle (and probably anything else under a 20mph…), but it records distance so no point using it in the gym! It is a little buggy though:

image

But hasnt stopped them giving £200’000 so far. Get it quick before the Olympics and raise a bit of money (and probably loose a few pounds!)

Laser eye day

Just a few hours till my Laser eye surgery… and yes I’m a little nervous. It’s been booked for about a month, but I’ve been so busy I’ve not really given it much thought – but as it’s a approached I’ve been thinking about little else.

I’ve gone through all the material they’ve given, and it explains the whole procedure, interjected with: “This horrific thing could happen” (Eeek!) “but it’s quite rare”… It isn’t really a pleasant read, but a couple of days later you start to understand what will happen on the day and become a little more calmer about it (or possibly just forget all the bad stuff) – if you are having the procedure, don’t leave it to the last minute to read it!
Continue reading “Laser eye day”