Posts

  • IPv6, Docker(-compose), and Shorewall6/ip6tables

    The default docker configuration is limited to IPv4 networking and the docker daemon transparently takes care of IPv4-based SNAT. However, when IPv6 is enabled, this automagic is neither included nor has been built into docker. This write-up will walkthough the 3 approaches to address this shortcoming.

    · · ·
  • Jekyll 3 Post Excerpts

    When I upgraded from Jekyll 2.x to 3.x, there were some minor incompatibilities, the most significant is that my code for adding “Read More” links to excepted posts on the index page broke.

    · · ·
  • Why I Gym Religiously

    Since my graduation from university, I have picked up a routine to visit the gym on a regular basis, starting from 2 times a week, to the current 5 times a week. The gradual progression took place over a span of 1.5 years as I learnt more about my body.

    · · ·
  • S3 Custom Redirection Rules

    Amazon Web Services (AWS) Simple Storage Service (S3) is a really economical way of hosting static websites. With advanced “redirection rules” support, a static blog, even with legacy permalinks, can be hosted completely on AWS S3. When configured with CloudFront and CloudFlare, full SSL support for your own custom certificates can be used.

    Prior to S3 supporting advanced redirection rules, there was only a binary option to redirect all requests to a specified hostname. While this feature is useful for handling blanket redirections, but useless if you need selective redirection like what a .htaccess file can do, it is insufficient for site that have legacy permalinks to maintain.

    Fortunately, S3’s advanced redirect rules allows you to somewhat mimic a subset of what an Apache .htaccess file can do: 1) substitute the hostname; and/or 2) substitute the path, based on 2 possible conditions: a) HTTP error codes from S3, and/or b) request path prefix, albeit with a clumsy XML syntax. With a good text-editor with XML intelligence, it’s not too challenging to hand-craft.

    Thanks to this feature, I’ve managed to set up redirect rules to map permalinks from my previous blog engine to the current permalinks layout.

    · · ·