KatPadi's Point

TIL: Action Cable x WebSockets

So I finally had time exploring Rails 5 after quite a busy schedule. First order of business– check out Action Cable as it seems to be one of the most promising features to Rails 5. To understand Action Cable, I had to understand WebSockets first. WebSockets…wut?  Clearly, the online world has been largely built around the…

Ruby Gem That Makes Your Model Activatable

Aktibibo is a simple Ruby gem that makes your model activatable. It allows an ActiveRecord model to be declared as “activatable” thus providing scopes for querying and filtering objects. Of course, the module adds convenience methods for setting an instance as active, inactive or deactivated. As an additional feature, it also saves the activation and deactivation dates because it uses datetime DB…

Policy Object Adventures

A few months back, I wrote something about my service object adventures to handle extraction of a business logic from a Rails model or controller. Recently, I got introduced and experimented on the concept of policy object. Policy objects are pretty much just like service objects. In fact, from what I understand, policy object is actually…

Time-Lapse Video Generator Using Raspberry Pi

So, I’ve been tinkering with my Raspberry Pi for the past couple of days. This weekend, I started with my time-lapse video generator using Raspberry Pi and its camera module. Taking snapshots is easy because RPi has a built-in raspistill command: raspistill -hf -vf -x -o melody.jpg There are many options which you can find here. When I connected the camera…