Taka’s blog

A software engineer's blog who works at a start-up in London

Ruby

Make Images Watermarked with RMagick (+ CarrierWave)

Summary This post explains how to cover images with an array of a watermark. Plus, I show an example how to use it with CarrierWave. What is Watermark? Watermark is an image which often covers sample images. I made a sample of fotowa*1 log…

Separate JavaScript Easily and Moderately from Rails with WebPack

Introduction To dive into the world of front-end, I came up with an idea to separate JavaScript easily and moderately from a Rails project. Some have already shared various ideas, but I found them too much or required more than couple of t…

Went to RubyKaigi 2016 as a Ruby Sponsor

I went to RubyKaigi 2016 that was held at Kyoto International Conference Center in Kyoto, Japan from Sep. 8th to 10th. rubykaigi.org My company, PIXTA, was one of the Ruby sponsors*1 of this conference. I had plans on the Saturday so I was…

Cool Way to Control Retry with ActiveJob

ActiveJob brings benefits but it has just simple features yet. So, I've made a module with the APIs published officially to add some features of controlling retry. An Issue about Retry ActiveJob doesn't have enough features about retrying …

Have made a gem to retrieve holidays from Google Calendar

I've made a gem to retrieve national holidays from Google Calendar with simple interface. github.com What motivates me is there is no suitable gem for my purpose as far as I can see. What I want to do What I want to do and some features th…

How to read a text file in batches with Ruby

When I was reviewing my colleague's source, I found awful code in his program. Like this: File.open("./production.log") do |file| results = {} file.readline # skip header file.each_line do |line| key, value = process(line) results[key] = v…