December 6, 2015

Migrating applications to AWS

Today I want to demonstrate how to move a web application into “the cloud”, specifically AWS. Along the way I’ll point out some details about the general steps necessary. I’ll be using a simple Sinatra based url-shortener service I found on github. The general steps look like this: create an AMI containing all necessary dependencies create the necessary infrastructure in the cloud adjust deployment strategies Before going into the details, I’m aiming for a reliable solution, which ideally scales quickly. Read more

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.ListenAndServe(":3000", http.StripPrefix("/", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { if bs, err := Asset(req. 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

© Raphael Randschau 2010 - 2018 | Impressum