avatar

Chanux

I am nothing

Static Site With Authentication

Have you ever wanted to just make a static website and throw it behind an authwall? Maybe to make your personal notes, playbooks that are too specific and not very helpful to share publicly available to you over the interwebs. Or else to use the static site system that you know works well to manage your company knowledge base. I have had both these problems and didn’t really find a nice, straightforward enough system.

Mechanical Life

So, I finally gave in and bought a Mechanical Keyboard. Just to be upfront, I never really liked the idea. I felt like the keys with a lot of travel just trip me up a lot. This is probably because I was using a lot of bad/cheap keyboards until got my hands on laptops. And then I just started liking the low travel keyboards. The first time I worked next to someone using a proper mechanical keyboard was quite late into my career and I found the noise to be super annoying.

Sayura on Android

TLDR: Something I built had issues due to browser/platform quirks. keypress (deprecated), keydown, keyup are not supported on browsers on Android. The next option input event behaves differently on mobile platforms. Firefox on Android emits input event for soft edits too. Sayura is a project I built to scratch my own itch which is not being able to type Sinhala anywhere. It was done in a time we had worse support for Sinhala input than it is now.

Automate Static Site Publishing on GCP

I. Love. Material for MkDocs! I’ve been using the MkDocs - Material for MkDocs combination in every. single. place. I worked in, to document things. And everyone loves it. Recently I had to share some of my notes with my colleagues and realized we are oceans apart. So I put it on a VM and shared. Nothing fancy. I had a shell script involving a bit of rsync to deploy the site.

Foreign Exchange Rates Api

Once upon a time I wanted to keep track of foreign exchange rates and probably do something useful with it. I looked for any APIs which would ideally present data in JSON. Unsurprisingly I didn’t find any. So I had to build it myself. Now, the only way to do this was scraping exchange rates pages of the banks I am interested in. Even though I knew this scraping thing is an ugly, dirty thing, I was too excited about the idea to just give up on it.

LKY on LK

The adventures of Lee Kuan Yew was not a strange topic for me. We Sri Lankans get to hear about him a lot. Mostly in the context how useless our politicians are. Oh, and how Singapore was built taking Sri Lanka as an example. We’d probably get to that later. He was more or less the man who built an almost heaven, out of mostly thin air. Or so the story goes.

Unixy Terminal on Windows

When I started at my current workplace my world was shattered (Obvious exaggeration). I realized I had to work on windows day in day out. Of course I would be logging in to Linux servers for most of the actual work but I really missed the comfy and friendly unixy tools. Yes there were options but they did not even come close to the user experience I were used to.

Some Ansible Lessons

I have been working with Ansible for some time at work now. This new project uses quite a bit of Ansible so I have been learning a lot. I had touched Ansible before but that was just to put together something to help me with copying stuff over and over to a bunch of servers. The requirement of current project is to programmatically run an Ansible playbook on a server newly provisioned.

Using X-Accel-Redirect with lua

I had used X-Accel-Redirect with Python/Flask and nginx at work. I wanted to do the same with lua for a hobby project. So the title is what I Googled for when I wanted to serve files with nginx-lua. I soon realized I was looking for the wrong thing. My search term was wrong. Hence the title is misleading too :D. You can’t actually use X-Accel-Redirect meaningfully with nginx-lua. X-Accel-Redirect is apparently only processed by modules like ngx_proxy, ngx_fastcgi etc.

The First Post

Another superfluous achievement in the chase of new and shiny. Oh who am I kidding?. Static sites have been here forever. Hugo has been here for so long. Heck this blog post itself has been on my machine since last year. It’s just that I never put it online. Or write this text until now (2016-06-07) #YOLO. Such is adult life. Well It’s nothing wrong about adult life either. It’s just me being lazy.