July 29, 2015

Farewell Balto

you were a true companion, always - and a great guide. you will always be with us in our hearts. Forever.

April 9, 2015

serving static, embedded assets with go

Today I’d like to share a tiny example of why I’ve come to love golang as a programming language during the last two years: how to embed into & serve static assets from your compiled binary. First, the entire code for this example: // main.go package main import ( "bytes" "io" "net/http" ) //go:generate go-bindata -pkg main -o bindata.go frontend/ func main() { http. Read more

December 17, 2014

building a currency exchange rates api

While working on umsatz I had to build a tiny currency exchange rates api in go. While the original API works fine, it clocks in at more than 400 lines of code. Let’s write a shorter version! In this post we’ll re-build the api, in three steps: download, parse & cache the EUR exchange rates history xml, provided by the ECB 1 add a tiny HTTP JSON API to request rates periodically update the cache with new data This will leave use with a tiny, HTTP currency exchange rates api. Read more

December 15, 2014

present a project: umsatz

In the last post regarding open source side projects I presented traq, a CLI time tracking application I use for my everyday work. Today I decided to present and walk you through the setup of umsatz, my open source accounting application. But let’s first introduce umsatz: umsatz was written to ensure that my book keeping informations are kept safe - that is only locally accessible, not from the internet. It’s not that my information are particularly sensitive. Read more

August 29, 2014

cleaning multiple databases with DatabaseCleaner

TL;DR; the database cleaner gem can easily be used to clean multiple databases at once. I work and maintain some rails projects which connect to multiple databases, some legacy (read: not managed by ActiveRecord), some not. In order to write proper integration tests you might need to load test data into multiple databases, which in turn leads to the need to have clean databases available for all your test runs. Read more

August 17, 2014

present a project: traq

In the last post regarding open source side projects I presented revisioneer, an API to track application deployments. Today I’ll be showcasing traq, a command line application which tracks your times. I’ve also blogged about it before. The initial proof of concept was entirely written in bash with a focus on simplicity and understandability. This meant that traq uses a simple folder structure and plain text files to store the tracked times. Read more

June 14, 2014

present a project: revisioneer

I’ve am working on multiple projects in my free time and I’d like to take the time to write about them, one by one. The basic idea is to describe the project briefly: what it does, why I started working on it, and what my plans are for the future. Today I’d like to talk about revisioneer Revisioneer is an API which tracks application deployments per server. Every time you deploy your application via ansible or mina you can send the current SHA including the changeset to revisioneer, and later use that information in whatever way you like. Read more

February 5, 2014

writing and testing custom ansible libraries

This post is about testing custom ansible library code. Specifically the tests I wrote while working on ansible-rails, a wrapper utility for bundler and rake useful when deploying rails applications with ansible. Sadly the documentation on how to test custom library code is really thin. Hopefully this will change but for now, here’s how I write and test custom libraries using a very simplistic example. Most ansible libaries will look somewhat like this: Read more

January 12, 2014

scraping nsscreencast

Today I decided to catch up with NSScreencast. NSScreencast has currently over 100 episodes and I stopped somewhere at 40. I like to watch them offline when I have time but downloading the missing ~60+ episodes by hand would take too long. Having recently installed GNU Parallels I decided to give it a spin. My goal was to generate PDFs of all episodes as well as to download the mp4 files of every episode. Read more

December 28, 2013

deploying rails applications with ansible

Fellow web developers might know ansible - a lightweight, extensible solution for automating your application provisioning. Since ansible galaxy opened its doors sharing roles became very easy which is why I started sharing the deployment and rollback roles I’m using for some Ruby on Rails projects I’m working on. First, some thoughts on why I switched deployments from mina to ansible: development of mina stagnated over the past year Mina still lacks some important features like rollbacks, while other features like multi host deployments are only possible through hacks. Read more

© Raphael Randschau 2010 - 2022 | Impressum