Snippets of Code

Snippets of code that don't quite fit anywhere else.

Showing everything matching: clear

2019

Running Laravel on Google App Engine

vuejs laravel php maps openlayers google app engine

I recently deployed GNR Comparo. I initially built it with Laravel on Google App Engine because that’s works well for prototypes when you’re unsure if you need a frontend, backend, API or fullstack app. Here’s some notes about my experience deploying this stack.

(Eventually GNRComparo ended up using Lumen instead, but even that proved to be overkill. The app ended up entirely client-side so shoudl be redeployed as a static app without any server frameworks).

More...
2016

OL3 Feature Hovering

openlayers maps

This post demonstrates hovering over features on a map and setting their borders to blue. Basically this repurposes the OL3 Box Selection Demo to use an ol3.interaction.Select interaction instead of click/drag box interactions. There’s some notes at the bottom about using map.on('pointermove') for an alternative way of doing it.

More...

Add an Image to an OL3 Map

openlayers maps

This post demonstrates adding an icon image to an OL3 map.

More...

OL3 and CAMS

openlayers maps

This post demonstrates integrating the ECMWF public CAMS WMS products with Open Layers 3.

More...

Confluence TOC Macro Bug

wiki confluence

I’ve just been doing some customisation on the Confluence wiki, and ran into a bug while using the old Documentation theme. I hacked this JavaScript to create a fix that works for me. It needs to go in the Custom HTML, in the ‘end of Body’ section.

More...
2014

Google App Engine HTTP Auth

python google app engine

Google App Engine can serve static content as well as apps, which makes it a handy place to run sites like this one powered by Jekyll (more info here). But familiar features from other webservers are missing and need reinventing, such as default directory indexes and HTTP Basic Auth. Here’s some info about how to add Basic Auth.

More...