Simple poller library in TypeScript

typescript and javascript

Here is a very simple library of pollers written in TypeScript. It uses async / await so if you want to transpile it to ES3 or ES5 you’ll need TypeScript 2.1 or higher.

Collecting translation keys during TypeScript build

typescript and i18n

I found myself in the position of building a lightweight i18n mechanism for the frontend of an enterprise app recently. I implemented a couple of decorators that inject translations into properties. I also extended the Gulp build process to gather all translation keys into a single file for me, which I could then use on the backend to deliver only the required translations, rather than send over the entire dictionary. Here’s how.

Running the Glassfish pkg tool on 64 bit Ubuntu

glassfish, linux, and ubuntu

The Glassfish Java application server comes with a number of tools, including pkg. Unfortunately, pkg is a 32 bit Python application and almost all of us run 64 bit systems. So you need a couple of compatibility libraries to run the tool. Here’s how you do that on Ubuntu 16.04.

Social share snippet for Jekyll

jekyll and liquid

To set up this blog, I wrote a snippet of Jekyll template code (Liquid) to create social share links. You can find it on Github if you’re interested.

ttime: a critical shell trick

In which I demonstrate two shell aliases that every office-worker absolutely must have in order to function.

Angular vs React vs Aurelia

javascript, angular, react, aurelia, and frontend
In which I try out three JavaScript frameworks to see which is best suited for building individual frontend widgets.

Romke's Checklists

I've released a very simple webapp that has some checklists I find useful. I started it off with a checklist to go through before committing code.

Insert hard linebreaks into textareas with vanilla JavaScript

javascript and html

While working on my little checklist app I needed a way to hard-wrap text entered into a <textarea> and preserve the linebreaks when copy-pasting it somewhere else. HTML and CSS don’t support this, so I wrote some vanille JavaScript code to insert the linebreaks, trying to break on words whenever possible.

docker-gen: automatic nginx config with a human touch

docker, nginx, mariadb, mysql, upstart, and wordpress

In this article I will demonstrate a setup using Docker, docker-gen and nginx that will add new Docker containers to nginx automatically as an upstream instruction, but still let you manually configure how these containers are publicly served by writing the site instructions yourself.

Easy access to a dockerized mysql server

docker, shell, mysql, and mariadb
Deploying a new mysql server using Docker is quite easy. But once the server is up, you want root access to it from your command-line. Here's a little shell function that'll do it for you.

Update your projects:

bash, shell, svn, git, and development

I have a number of frameworks, platforms and reference projects in my workspace that I want to update daily. Rather than going to each of them and doing svn up or git pull by hand, I’ve written a little Bash script to do it for me. I just keep a list of all projects I want updated. Now I need only run ./ once a day.

suspend_until and suspend_for

bash and shell

Here are two Bash scripts I wrote some years ago that allow you to send your computer to sleep for a specified time and then wake up automatically. They work with the rtcwake and pm-suspend tools.

Renderable: simple template inheritance in PHP

php and templating
I wrote this PHP class some time ago. I've used it in a number of tools I've written in PHP. It gives you a simple yet versatile templating mechanism.

Dokku and Docker on the same server: power and control

docker, dokku, mysql, mariadb, nginx, ubuntu, and wordpress

Docker is a platform that allows you to deploy any kind of app in a uniform way. Dokku builds on this to create a full PaaS. It allows you to simply push your code repository to your server and let Dokku build and deploy it for you, automatically.