Posts in 'Tech'

Convert Multiple Images Into One Single PDF

A lot of manga series found online are in image format, like JPG or PNG and it's one image for one page. Mac's Preview app can read them if needed, but that's not very convenient. It would be nice to convert them into one single PDF file so that it can be read in any device and easily shared with others. This can be accomplished with a command-line tool ImageMagick on Mac.

Basic PostgreSQL Commands

We use MySQL for Linkqlo app as that was part of the good old stack of PHP-MySQL chosen by the IT vendor we worked with. In 2015~2016 as we gradually refactored PHP endpoints into Haskell, we started running into various issues of MySQL since some of its libraries didn't work well with Haskell or our deployment script. Eventually they were all fixed, but it was a big hassle. For our new Mirror Mirror app, since it was built from scratch, we chose a stack that would fully leverage our technical capability - Haskell for endpoints, React-Native for front-end, PostgreSQL for database, and Nix for deployment.

Blogging On Pelican

I've come to really enjoy Pelican since moving my personal blog from wordpress to static site generator Pelican on a Github Page in 2014. It's not the easiest thing to set up in the beginning and it took me months in countless iterations to settle down a well-tuned configuration that met my needs. The end-game is very satisfying though.

How To Git Tag A Commit

Tagging helps to keep track of key versions of a codebase. During the last few frenzy days toward submission of a new app to iTunes Connect, I sometimes make 10~20 commits a day to clean up various small patches here and there. One month from now when memory becomes hazy, it's important to be able to identify exactly which version of the binary on the git server corresponds to the one that is currently available in App Store. I follow the below workflow to tag a particular commit.

My Git Work Flow

Here's the git flow I use while working on our latest iOS app Mirror Mirror

How to Serve Wordpress Site from Subdirectory

Wordpress by default is installed in the root directory var/www/abc.com/public_html. This causes a lot of inconvenience as often we need to install other files into separate subdirectories under root directory. A good installation practice should keep every project in its own subdirectory.

Set Up VPS on Linode - Part 2

Continuing from Set Up VPS on Linode - Part 1, here's Part 2 on DNS (nameserver and IP address), Apache (folder structure, virtual hosts), and enabling HTTPS with SSL certificate from Let's Encrypt.

Set Up VPS on Linode - Part 1

Recently I had to set up virtual-private-server (VPS) for both my personal blog the Good, the Bad, and the Curious and Linkqlo's website. Here is my workflow to set up Ubuntu Linux, Apache server and the server environment on Linode, which is one of the more popular VPS service providers along with Digital Ocean. Linode's Getting Started Guide is a helpful reference for the basics.

从海外成为网易云音乐付费用户。。。的代价

2016年在海外听网上音乐,最好的就是网易云音乐,其他的都不值一提,譬如QQ音乐,曲库太差。去年我在网易云音乐上编辑的《一个最低限度的华语歌单》在QQ上有起码2/3的歌都找不到。网易云音乐前几年都是免费的,从曲库广度,质量,内容发现,UX/UI各方面轻松秒杀所有网络音乐平台。2015年底跟腾讯妥协后,为了可以让腾讯允许在朋友圈上分享云音乐,开始走版权化路线。我的很多歌单上的歌一夜之间都因为网易的版权问题无法播放了。

How To Share Files and Photos Without Any Cloud Service

使用情景:用户A把自己电脑上的文件夹分享给用户B