logo

lifelong journey with

understanding and presenting

Mon, Mar 18, 2019
Update the colour theme for my terminal, and more...

Quick Tips

Update the colour theme for my terminal, and more...

Have fun with my terminal.app, update colour theme and fonts. Add configurations in zsh and powerlevel9k.

continue reading
Fri, Dec 21, 2018
The countinuation-passing style in JavaScript

JavaScript Notes

The countinuation-passing style in JavaScript

In JavaScript, a callback is a function that is passed as an argument to another function and is invoked with the result when the operation completes. In functional programming, this way of propagating the result is called continuation-passing style (CPS). It simply indicates that a result is propagated by passing it to another function (the callback), instead of directly returning it to the caller.

continue reading
Mon, Dec 17, 2018
Practising closures in JavaScript

JavaScript Notes

Practising closures in JavaScript

JavaScript is a very function-oriented language. As we know, functions are first class objects and can be easily assigned to variables, passed as arguments, returned from another function invocation, or stored into data structures. A function can access variable outside of it. But what happens when an outer variable changes? Does a function get the most recent value or the one that existed when the function was created? Also, what happens when a function invoked in another place - does it get access to the outer variables of the new place?

continue reading
Thu, Sep 06, 2018
Seamless integration Cmder in Hyper for a better terminal emulator on Windows

Quick Tips

Seamless integration Cmder in Hyper for a better terminal emulator on Windows

Hyper looks pretty good and Cmder offers lots of functions. Why not combining them together to get a better terminal emulator on Windows.

continue reading
Fri, May 11, 2018
Get a JavaScript array with unique values

JavaScript Notes

Get a JavaScript array with unique values

As I need to update an array in Firebase Cloud Firestore with duplicate-free values, let's summarise the methods I found and see how they perform.

continue reading
Thu, May 03, 2018
Loop with async and await in JavaScript

JavaScript Notes

Loop with async and await in JavaScript

Well, just got some problems in JavaScript loop with http request inside. Take a short note showing how to deal with it which got ideas from the post JavaScript: async/await with forEach().

continue reading
Sun, Apr 22, 2018
National Geographic 'Photo of the Day' Downloader with Shell script

Shell Notes

National Geographic 'Photo of the Day' Downloader with Shell script

A shell script to automate the process of downloading National Geographic Photo of the Day. The script saves the image of Photo of the Day in the same directory where the script itself resides. You can use cron to make it automatically running everyday.

continue reading
twitter github weibo linkedin
to top