A collection of 45 articles

My Reading Workflow and IFTTT Applets

I categorize reading into 3 different categories: Skim Reading: This includes the feeds I subscribed in Inoreader, websites I frequently visit and articles shared from my friends. I quickly skim them using fragmented time, usually less than half an hour in total per day, and save the articles which worth reading to Instapaper. Insensitive Reading: Instapaper sends me 20 unread articles to Kindle every morning. If I can spare at least 10 minutes, I will read them on the Kindle. Challenging Reading: Papers are definitely in this category. There are also articles hard to understand, I will print them into PDF. I schedule the time in advance, usually one hour or more, and read the PDF files on Sony Digital Paper. I’ll share the detailed workflow and the IFTTT applets used in the process.

Updated  •  2 min read

Read Various RSA Keys in Ruby

I recently worked in a Ruby on Rails project which should integrate with many different payment systems. There system mostly use RSA in encryption and signature. However they provide the RSA keys in different formats, it is a challenge to choose a right way to read the keys in Ruby. RSA is an asymmetric cryptographic algorithm, thus it requires two keys, private key and public key. The key itself is just binary, but it can be encoded in different format.

Updated  •  2 min read

Nginx as UDP Load Balance

Just upgraded Graylog to cluster in a project. Because syslog UDP is used as input, a UDP load balance is required to distribute logs to servers in the cluster. Since the servers are hosted in Aliyun, I tried Aliyun UDP Load Balance first. But it does not forward requests evenly, and health detection diagram cannot be disabled. The popular HTTP load balance tool HAProxy does not support UDP. Fortunately, Nginx can be used as a UDP load balance.

Updated  •  2 min read