Tung on Cloud

Using Selda with Servant

How to use Selda SQL library in your Servant API the neat and beautiful way. Code listing is boring, so I also include my process of finding out how to make these two libraries working together.

Use TEXT instead of VARCHAR with PostgreSQL

I've always thought `VARCHAR` is for small text and `TEXT` is for longer form which you usually treat as a blob and don't want to index. I guess I will start using `TEXT` exclusively from now on.

Extract components painlessly from Tachyons with Less

Tachyons, and any other CSS utility library is cool for rapid prototyping. However when it comes to extract the classes to component we can use a little help from Less.

Ractive Component Brunch Plugin

So I made a [Brunch](http://brunch.io) plugin to compile [Ractive](https://ractive.js.org/)’s single file component format. You can take a look at it here: https://github.com/tungd/ractive-component-brunch.

Build a web application in Haskell

My take on building production-ready web application in Haskell.

My first Haskell package: time-locale-vietnamese

My experience publishing my first package to Hackage: `time-locale-vietnamese`. It was too easy just `stack upload .`

WooCommerce custom order state

Let’s say you’re selling leather goods, and allow customers to have their name engrave into the tag. You have a partner that do this for you and want to track the items you sent them. Here's how you can use WooCommerce custom order state to implement this feature.

Fixing python-build on macOS High Sierra

High Sierra does not ship with the libssl headers, so `pyenv install` fails. Here's how I fixed it.