InvoicePrinter: generate PDF invoices and receipts in seconds with pure Ruby

They are many options how to generate PDF versions of your invoices in Ruby and the ones that do not come with system dependencies are often built on top of Prawn library. InvoicePrinter is no different. Here is a short announcement on what it is (and aims to be) and what not. Continue reading “InvoicePrinter: generate PDF invoices and receipts in seconds with pure Ruby”

Building and consuming JSON API with Crystal

When I firstly heard about Crystal language, I got really exited. It fixes exactly four problems I sometimes have with Ruby; types, speed, memory consumption and compilation to machine code. After many months silently following its development I decided to try it out for a simple program I need — a simple server standing between Google Maps API and my application to catch the geocoding responses in local Redis instance not to hit the limit imposed on using the service (plus, Google suggests you to do it anyway). Continue reading “Building and consuming JSON API with Crystal”

Allowing NGINX to use a Puma/Unicorn UNIX socket with SELinux

If you are deploying Ruby web application on Fedora with Puma (or other) application server and NGINX web server as a proxy, you might encounter SELinux forbidding NGINX to use the Puma socket. Here is how to create a SELinux policy module that you can use during your server provisioning.
Continue reading “Allowing NGINX to use a Puma/Unicorn UNIX socket with SELinux”

Setting up git push code deploy to remote server

If you are setting up your own remote server/VPS you will probably like to make it easy to deploy your code with simple git push. In other words you want to setup something that providers such as Heroku or OpenShift let you do to deploy your code. Luckily, it’s very easy! Continue reading “Setting up git push code deploy to remote server”

Fix can’t cast RGeo::Geographic::SphericalPointImpl to point

If you are using Rails with activerecord-postgis-adapter 3.1.4 perhaps you got into a point where you were suddenly getting the following error:

Continue reading “Fix can’t cast RGeo::Geographic::SphericalPointImpl to point”

What to do if Vagrant machine becomes unresponsive (KVM)

If you are using Vagrant with KVM (with vagrant-libvirt plugin) on Fedora, you might have experienced that sometimes the KVM virtual machine becomes unresponsive. Simply put you would wait forever for trying to ssh to the machine using vagrant ssh. It unfortunately happens to me sometimes when my laptop goes to sleep. So the simple answer is to avoid this and to always halt your Vagrant VMs when you finished working. Here is another thing to try out if you that happens and you don’t want to recreate the machine from scratch (vagrant destroy && vagrant up). Continue reading “What to do if Vagrant machine becomes unresponsive (KVM)”

DNS for your Vagrant needs: with Landrush, libvirt and dnsmasq

Have you ever needed a DNS server that would be visible both on your host and your Vagrant guests? Landrush is one of those things that can pretty much save you. Unfortunately it was designed around VirtualBox and Mac OS, so it does not work on Linux out-of-the-box. And it does not work with libvirt provider at all. Until of course recently since I added the support there. Here is how to make all that work together on Fedora. Continue reading “DNS for your Vagrant needs: with Landrush, libvirt and dnsmasq”

First update for Fedora Developer Portal

First update of what? If you haven’t notice it yet, we announced a new developer portal for Fedora some time ago. Today I released a first update with some new contributions that landed on our GitHub after the announcement. So what’s new? Continue reading “First update for Fedora Developer Portal”