February 16, 2013

deploying with mina & current git revision

At the time of writing mina does not support writing a REVISION file on deployment, like capistrano does by default. Mina also deletes the .git directory at the end of each deployment, leaving you no option to access your git log to retrieve the currently deployed revision (note that this might change in the future). Luckily, most software that depends on your app running out of a git revisioned directory, like for example squash, support fallback modes which rely on your REVISION file existing somewhere. Read more

February 11, 2013

Automate commands using AutomatedCommands

Since DHH released commands some months ago I was thinking about how to properly automated this so one does not have to manually run test "unit" and similar every time you change a file. The result is AutomatedCommands. A combination of a simple rake task and named pipes to communicate with your rails instance. So how does it work, exactly? First commands: commands enables you to run your TestUnit tests from within your rails console, if you are running the console in test environment. Read more

February 6, 2013

phased-restarts using puma

In my original post about zero downtime deployments I wanted to use puma. At the time of writing puma did not support zero downtime restarts: while the connection was kept alive, all workers were killed at once so no requests could be served until the new workers had fully started up. This changed as of puma v2.0.0.b6. Now you can send SIGUSR1 to the puma master process and puma will phase out old workers while starting new workers one at a time. Read more

February 3, 2013

say hello to url_plumber

Last week I solved a recurring problem in my job as a software developer: Combining different parts of a user interface which all need to change the URL parameters to work properly. The Problem Take for a example a dataset presented using a paginated table. The table can be ordered using any of the displayed columns and the dataset can be filtered using a form and some links. The resulting URL could consist of the following parameters: Read more

January 20, 2013

iced-rails released

I’ve been playing around with IcedCoffeeScript for a while now and wanted an easy integration with Ruby on Rails Asset Pipeline. The result is iced-rails. I decided to introduce the .iced file extension for IcedCoffeeScript, rather than overwriting .coffee even though IcedCoffeeScript is a superset of CoffeeScript. The Iced command line also defaults to .iced and I want to avoid surprises when using the gem. IcedCoffeeScript generates continuations to avoid callback pyramids by introducing two new keywords, await and defer. Read more

January 19, 2013

traq updated with bash-completion

Just recently traq reached v0.1. There have been three notable changes since its initial release: support for bash autocompletion. The setup instructions have been updated accordingly. the generated data files are now stored in a separate directory, which can be configured using the TRAQ_DATA_DIR environment variable. Pascal Hartig was kind enough to suggest this separation and also issued a pull request on github. the directory structure contains a new subdirectory, grouping entries by the year they were created in. Read more

January 5, 2013

Using will_paginate with Arrays

I really like [will_paginate][1] for Ruby on Rails because it’s easy to setup and the intent of pagination is communicated well. The only thing that bothers me is that it can be used with ActiveRecord only. My blog runs on Rails without ActiveRecord and all posts are kept in a git repository as simple markdown files. So I needed to write a wrapper that returns a WillPaginate::Collection and works on Arrays. Read more

December 31, 2012

a Review of 2012

Today 2012 ends. Time to review the past year. This is just a short list of things I found most important in my life: on September 6th I’ve married Katharina Bauer. She is by far the most important person in my life. I can talk to her about anything and everything. She’s always helping me out in some kind, and I’m really lucky to have her as my wife. Read more

December 14, 2012

bash based time tracking

Time tracking has been a recurring theme in my career as software developer. I’ve previously developed multiple solutions to do this myself, but this is the one that I like the most - and since I’ve been using it for about half a year now it’s time to publish it: say hello to traq - bash based time tracking which works on Linux and OS X I like to be in control of my own data. Read more

December 8, 2012

authenticate sudo using Yubikey

I’m a huge fan of security by “Something You Have” in combination with “Something You Know”. A good example for web developers probably is their public/ private key pair they use to authenticate access via ssh to their web servers. When I read about the Yubikey I immediatly wanted to use it to authenticate sudo access on my web server. I’ve been using my ssh agent to do that via pam-ssh-auth, but I can add a physical component to my authentication setup with a yubikey. Read more

© Raphael Randschau 2010 - 2022 | Impressum