Format a moment duration as Hours and Minutes

Just a quick helper on how to format a MomentJS duration correctly as hours and minutes.

read more

share

AWS ECS instance has high CPU load from dmeventd

Today we found two of our ECS instances in a cluster had unusually high CPU loads. A quick look revealed dmeventd was responsible for that.

Turns out old containers and images are not getting cleaned up by ECS.

We got back to normal levels by removing old containers and images from the instance:

read more

share

Let Nginx handle browserconfig.xml 404 errors with this inline config

If you find lots of 404 errors for browserconfig.xml files in your log files then this little trick might help. Since Windows 8 Microsofts IE requests this file from the site root to configure the desktop tiles in Windows 8.

read more

share

Serve robots.txt inline in Nginx

To quickly serve a robots.txt from Nginx without actually having access to the physical file you can define the content of the robots.txt file in the Nginx .conf file.

read more

share

Create an EC2 instance-store AMI from a running Ubuntu instance

Since Amazon started offering EBS instances the classic instance-store images have gotten little love. But when you want to spawn lots and lots of instances a simple instance-store AMI is more flexible and cheaper.

The following steps let you create an instance-store AMI from a running Ubuntu 14.04 LTS instance.

read more

share

Creating trees from SQL queries in Javascript

Storing tree structures in a database is simple. Add a column for the parentid and everything makes sense.

read more

share

Mac OS X and Google Chrome: Set printer defaults from color to black and white / grayscale

Google Chrome on Mac OS X does not use the printer defaults set in the system.
To set the defaults for the Chrome print interface, for example to set the default color mode to black and white / grayscale, follow these steps:

read more

share

MS-SQL: List table sizes and row count

Need to list all table sizes and their row count of a single database in MS-SQL Server? This neat script works on MS-SQL 2008 - please comment if it works on other versions.

read more

share

How to prevent the creation of .DS_Store files on network drives

When working on network drives with Mac OS X every Mac user will by default create .DS_Store files. Those files are used by OS X to store custom attributes like icon positions. For more info on .DS_Store files read this article.

read more

share

Set AWS IAM Permissions for s3cmd backup to a single bucket

Our Linux machines use a S3 bucket to backup some files every night.

The machines only need write access (PutObject) to a single bucket on S3.

read more

share