Next Spaceship

Driving into future...

Why EMV QR Code Was NOT Designed Well

| Comments

EMV QA code is being widely used in payment areas, actually it’s kind of a defacto standard for a lot of payment flows. Everyone can download the standard on official website.

A lot of governments’ authorities created their QR code standards based on EMV QR code. For instance, SGQR from Singapore, BR Code from Brazil etc.

Even though EMV QR code is ubiqus, yet I don’t think it’s designed well from the beginning. Actually, to me, the EMV QR code looks very likely to be designed by someone with very little engineering excellence knowledge.

Singapore Weekend Activity Rotations

| Comments

  • Sungei Buloh Wetland Reserve
  • Botanic Gardens & Jacob Ballas Children’s Garden
  • Singapore Science Centre
  • Sentosa Luge & Beach Play
  • Sentosa Cable Car & Beach Play
  • Pulau Ubin Cycling
  • Saint John’s Island & Kasu Ireland
  • Bukit Batok Nature Park
  • Bukit Timah Nature Reserve

Resolve Ubiquiti Router Web Console HTTPS Certificate Issue

| Comments

Having been bothered by Ubiquiti’s HTTPS certificate issue for years, today I finally find some time to resolve this. There are multiple ways to resolve this, but I’m not able to find a perfect solution on the internet, so I write down my solution here.

I’m not going to use a public domain name, neither will I issue a certificate through a public issuer, for example, letencrypt, which I’ve been vasively used for my public websites. The reason is for me, I don’t want my router to be exposed to the public internet, and the less exposion, the better. Setting up a letsencrypt certificate, most probably I need verify I own this domain name and the server, which means I will reveal my public IP address for my router, and that is not my intension.

With that, I’m going to generate a self signed certificate with a generated CA on a domain name I generated dedicated for my router (router.local). Then I will import my CA to my devices that need to access the router. Finally I’ll redirect my router’s local IP address to a local domain name (router.local).

Mod Supermicro Motherboard BIOS to Support NVME

| Comments

Sometimes when we think something is too hard to begin, the only reason is that we don’t understand it. With a little determination, we can archive something that we could never believe we were able to.

I kept telling myself not to modify/re-program BIOS/UEFI for a long time. Why? I thought the stability of a motherboard is super important. If I did, could it break it? Besides, if the power gets shut down while flashing a new version of BIOS, I could permanently lose a motherboard. Do I have to buy a UPS before that? I’m not that rich to buy UPS without considering the cost. If you would like to sponsor one, please let me know.

These days, I’m playing some Supermicro motherboards. One of the most important reasons I like Supermicro is IPMI/BMC. With IPMI, I don’t need to physically connect my monitor to the machine anymore. I can do anything, install a new operating system for the computer, change BIOS settings, or even upgrade the BIOS version remotely.

IPMI gives me confidence that I can play with BIOS now. Even if I flash with a corrupt BIOS file, then I can flash it back. So there is nothing to worry about.

MikroTik vs Ubiquiti

| Comments

Talking about router and switch, we have 2 markets, the enterprise one, and the consumer one. In the enterprise market, Cisco is a dominant player. Cisco devices are costly, but companies would like to pay for them, mostly for the service. Whenever an issue happens, a phone call gets human tech support at 24x7. On the other side, in the consumer market, users have no intention to pay for such service, but would instead buy hardware and resolve issues by themselves.

Now today, I want to talk about equipment across the 2 markets, MikroTik and Ubiquiti. They have enterprise quality without real-time tech support, which is perfect for technical people who have a pursuit of quality and speed.

So what would you consider for choosing a router or switch? I don’t know you, but I would consider (from most important to least important): Security > Reliability > Noise Level > Performance (Throughput) > Hardware Interface > Scalability > User Experience > Power Source > Power Cost > Technical Support > Rack Mount

Caveat: Use Ubiquiti ER-X in China

| Comments

After reading some articles about Ubiquiti EdegeRouter X, I realize this is a device I have no resistance not to buy it. Gigabyte Ethernet, multi-WAN, configurable by CLI (thus a lot of fun), reasonable price, and most importantly, high reliability. I enjoy exploring configurations, and in the meantime, it’s a double-edge knife, if not configured well, it could have a very negative effect on your network performance. In this article, I will describe 2 configurations that could severely affect the performance when using it in China.

From GPU Computing to Cryptocurrency Miner

| Comments

OpenCL (Open Computing Language) is a new framework for writing programs that execute in parallel on different computing devices (such as CPUs and GPUs) from different vendors (AMD, Intel, ATI, Nvidia etc.). The framework defines a language to write “kernels” in. These kernels are the functions which are to run on the different computing devices. In this post, I explain how to get started with OpenCL and how to make a small OpenCL program that will compute the sum of two lists in parallel. After that, I will show you how to write a GPU Cryptocurrency miner with the help of OpenCL based on the knowledge we just learned.

Southeast Asia's Diversity in Language.

| Comments

English, Bahsa Indonesia, Bahasa Malaysia, Burmese (Zawgyi), Thai, Vietnamese, Chinese, Khmer.

Even if we count Simplified Chinese and Traditional Chinese as one language, we still have eight languages that are widely used in Southeast Asia.

What We Use Make Who We Are

| Comments

For a start up, for a tech team, or for a community, what we use make who we are. They are the source of culture and they show what we believe.

Which operating system, Windows, Linux or OS X, do you use as the default developing environment? Which operating system do you use as the production environment, Debian based, Red hat based, or Gentoo? Which cloud server do you use, AWS or other? Which language do you use as the main backend language, Python, Ruby, Node.js, or Java, PHP, C++? Which infrastructure do you use?

Integrate Everything Into Slack

| Comments

Slack is gradually becoming the standard for modern office communication. While you may argue that technically Slack is no different than, say, IRC – the polished experience is what makes it stand out in the crowd of messaging services. Using less gentler words, Slack is killing email for office communications. And has built in support for code snippets with syntax highlighting. Boom.

Actually, Slack is more than just a communication tool. What makes it extraordinary is it provides the possibility to integrate everything and make your workflow complete. In this post we’re highlighting some of the most useful new workflows that Slack is enabling. All these are currently heavily in use in our team, and we find they are exceptionally helpful.

How to Be a Good Tech Lead for a Start Up

| Comments

To be a good tech lead in a start up is totally different from being CTO at a mature big company. There are numerous theories and technologies about managment in big companies. Unfortunately, there are not so much knowledges about how to lead a technical start up. Today, I’m gonna to give my advices. Hope they will inspire you.

I’m gonna talk this in 9 respects. They are not all ordered by importances, even though some are.

Cast Android and iPhone Screen Onto Macbook

| Comments

This guides is for casting Android and iPhone Screen onto a Macbook or other computers through a USB cable. If you’re searching a wireless solution, this is not. Actually after searching a lot, I find no good solution for wireless cast, so I admit this is a compromise solution. After all, fluency and resolution are more important.

Proxy All TCP Traffic on a Remote Server

| Comments

Even though SOCKS is a higher level protocol and more appropriate for doing proxy thing, there are no easy solution for building a global proxy for a Linux server except doing that on a router. For a remote server, normally a cloud server, it’s not always convenient to access the router. So after several tries, I decide drop the SOCKS solution, and simply use Linux’s iptables.

The easiest way I find from my recent research is with shadowsocks-libev. Shadowsocks-libev is a lightweight secured SOCKS5 proxy for embedded devices and low-end boxes. Shadowsocks-libev is written in pure C and only depends on libev and OpenSSL or PolarSSL. The use of mbedTLS is added but still for testing, and it is not officially supported yet.

9 Most Useful Jenkins Plugins

| Comments

To your disappointment, I’m not gonna to show up some theme plugins even though I do think there are much space for Jenkins to improve in this scope. I’m gonna to show you something that really really useful, much more useful than that kind of simple theme plugins.

Throttle Concurrent Builds Plugin

This plugin allows for throttling the number of concurrent builds of a project running per node or globally.

Atlassian License Analytics

| Comments

Bitbucket Server, Jira, Confluence, Crowd etc, so many excellent software come from a same company — Atlassian. Some of them are technically designed well (even though not best), so they are good study cases. These days I’m interested in the license generating algorithm, so I dig into them for studying. Its license algorithm is DSA. Theoritically, it’s impossible to know the private key, so the private key can be think as unknown and safe. Without private key, it’s impossible to generate the corresponding signature for raw text. In this way, it makes sure that every issued license is from the owner.

To better understand the relationship between orignal text and the license text, I write a Python code to uncover the original text from a license text.

Modify Java .class in a .jar

| Comments

Sometimes I need to know what’s inside to figure out a best solution, like modifying a Java .class file in a .jar file. After searching google and stack overflow for a while, I found this question is little cared, and almost all information is not complete. So I wrap them up and make the whole process runnable.

Transform All Files to UTF-8

| Comments

I wrote a blog several years ago about transform all files in a folder recursively from one encoding to another. Today I decide to solve this issue more completely.

I wrap all this to a Python egg package, upload it to PyPi, and everyone who want to use this don’t need to copy & paste code any more. Just install it and use it.

pip install toutf8

This ships with a shell command, so after installing, just type


to transform a single file to UTF-8 encoding, or


POJ 1020 Anniversary Cake

| Comments

This is a simple search problem. With some pruning job it’s sufficient to pass test cases.

The biggest possible area of cake is \(16 \times 10 \times 10\), so the biggest possbile side of cake is \(40\).

Image a cake as a matrix with rows and colums. Each element of this matrix is a 1x1 cell. The problem can be translated to if there exists a method to fill this matrix with squares.

Now fill the matrix in this order: find the lowest leftmost empty cell \(C_{i,j}\). Find successive cells \(C_{i,j}, C_{i, j+1}, \dots, C_{i, j+w}\) with the same height as \(C_{i,j}\).

Choose a square and put it into an area with left upper cell as \(C_{i, j}\). If this can not construct a solution, backtrack to use another squre, otherwise continue to the end and get a solution.