How To: Set up X-Accel-redirect for send_file with nginx, rails and passenger 5
Published 02 August 2017 under software

If you need provide the ability for users to download protected files when using rails you can store the files in a non-public directory and serve them within a rails action using send_file. In...

Read more →

How To: Convert an RGB888 image to RGB565 in C
Published 24 March 2017 under software

Here's some C code to convert RGB888 to RGB565. #include #include #include uint16_t rgb888torgb565(uint8_t *rgb888Pixel) { uint8_t red = rgb888Pixel[0]; uint8_t green = rgb888Pixel[1]; uint8_t...

Read more →

How To: Simple Firebase REST API server authentication using Ruby
Published 02 December 2016 under software, firebase, real-time database, rubyonrails

Firebase is a set oftools and infrastructure which includes a real-time database. We recently needed to get a Ruby on Rails application talking to a Firebase real-time database over their REST API....

Read more →

Integrating Sage 50 with Ruby on Rails
Published 08 November 2016 under sage, ruby on rails

Many small businesses use Sage to manage their accounts and it can be really useful to automatically get stock levels from Sage and place orders directly from a website (in this example written in...

Read more →

Interactive GCHQ christmas puzzle 2015
Published 10 December 2015 under puzzles

Can you solve GCHQ's Christmas card puzzle? The BBC and Guardian have reported on a puzzle sent by GCHQ in their christmas card this year: Britain's most secretive organisation - GCHQ - has added a...

Read more →