Create URL Shortcuts to Websites on Ubuntu

13 Mar 2024, Bangkok

Sometimes, it’s handy to store a shortcut to a URL on the desktop.

Yesterday, I was hunting for grid paper and dotted paper on the internet to print out in order to tutor a nephew on...

Read More

Using Jekyll with GitHub Pages

10 Mar 2024, Bangkok

How to embed YouTube videos

Given any YouTube video, get the html fragment by clicking on Share > Embed > Copy as per the images below:

youtube share button

Read More

Learn From Masters

Sat, 25 Dec 2021, Bangkok

theravada-novice Image courtesy of Sasin Tipchai

To learn a subject or a domain, it makes sense to learn from the masters of that subject or domain.

I’m trying to solve...

Read More

Fuzzy Bash Completion

18 Dec 2021, Bangkok

On my little laptop, I have lots of books organized by tags. And when I’m interested in a particular topic, I’d go to that tag and browse it.

However, I also have a few favourites or...

Read More

Warnings vs Errors

29 Nov 2021, Bangkok

I was reading the manual for, AS - the portable GNU assembler and found the following:

Mainly struck by two things: a) the ability of these...

Read More

Logging Policy for Microservices

20 Oct 2021, Bangkok

Policy

What is a good policy for logging in a microservices setup?

We start with policy so that it guides implementation. In the past I’ve just implemented logs here and there and it’s all rather haphazard...

Read More

Self Assembling Processes

I’ve always been fascinated with the idea of software components that can be easily wired together to provide new functionality. In a recent tech blog post, Netflix has gone further with the wonderful idea of self-assembly.

Why Self-Assembly

...
Read More

Naming things

userid+timestamp as key for user requests

The proper key for user requests is simply the user ID and timestamp.

In a recent application, the original key chosen reflected some internal data such as dates, target accounts, etc because I...

Read More

Storing and retrieving dates in SQLite

Storing dates

In Javascript, the following returns the UTC in ISO format:

x = new Date() x.toISOString() // 2014-11-30T23:51:12.287Z x.toUTCString() // Sun, 30 Nov 2014 23:51:12 GMT x.valueOf() // 1417391472287 

valueOf() is the number...

Read More

Proper Initialization of JQuery Mobile and Cordova

The Cordova library ships with a standard method for binding events to deviceready. However, if JQuery Mobile is also used, it becomes tricky to bind to the JQM Mobile ready “mobileinit” event.

Below is the template code that solves this...

Read More