October 2, 2014

What I learned today

Work I learned that Google Analytics Reporting api has a limit in the number of characters that you can send as filters. Found it the hard way, when doing a query, and filtering for a set of domains (excluding test sites, demo sites, etc), the api returned an error. 400 : Invalid expression. Expression exceeds max size of 4096 which interestingly is not documented in Google Api Errors. Read more

September 30, 2014

What I learned today

Work I learned that in Ruby on Rails, Sidekiq can run cron-like jobs with the help of Sidetiq. It’s as easy as writing a Worker and adding this line after the definition: Class ScheduledWorker: include Sidekiq::Worker include Sidetiq::Schedulable recurrent { hourly } ... end And you can substitute hourly by minutely, daily or minutely(5) if you want the worker to run every 5 minutes for example. Read more

September 30, 2014

How to easily set up Subdomain routing in Nginx

As i was going through the fun process of setting up a Digital Ocean instance for my blog, I realized that i had a couple other projects I would like to spin of in the same instance. All of those projects are web applications, and thus, require an opened port to receive the incoming requests. Previously I had been happy with Dokku, an open source Docker-based heroku, but the lack of support (it is an open source project after all) and my lack of Docker knowledge made me spend more time fixing dokku than I was happy with. Read more

Powered by Hugo & Kiss.