Jerry's blog

Ubuntu Development Set Up

This article show how to setup a ubuntu development with i3, oh-my-zsh and spaceVim. Preparation Download virtualbox if windows or mac Download Ubuntu and install it Set up oh my zsh install zsh and set as default sh sudo apt update && sudo apt install zsh # install zsh sudo chsh $USER -s `which zsh` # also works on aws ub...
Click to read more ...

ToyOS Development Journal - 2

This is second part of ToyOS development journal. In the first part, we successfully print “Hello World” in a naked i386 system. Now, let us move to memory management. Pre-knowledge Before we directly jump to memory management of 32 bit, we need to learn how memory was handled in 8086. In 8086 Registers we know 8086 is 16 bits cpu whose ALU an...
Click to read more ...

ToyOS Development Journal - 1

This development journal collects my study notes when I develop toyOS following Viktor Engelmann’s writting your own operation system tutorial series. ToyOS is a toy project for tutorial purpose. In this article, I will cover how to setup the environment and how to write a simple boot program. Development Environment Setup The first thing ...
Click to read more ...

ELF Format

ELF represents Executable and Linkable Format, which is a common standard file format for executable files, object code, shared libraries, and core dumps. It is a standard binary file format for *nix-like systems on x86 processors. let us make a simple program // hello.c #include <stdlib.h> char str[] = "Hello World\n"; int main (int arg...
Click to read more ...

Implement Virtual Dom In ES6

In order to understand MVVM, I was trying to revert wheel for virtual dom which is essential part for MVVM framework such as reactjs and vuejs. To begin with, we need to know why virtual dom? This is because dom is too heavy as it must implement at least those standards: HTMLElement - Web API Interfaces Element - Web API Interfaces Glob...
Click to read more ...

Postgresql query optimization practice

Recently, I was develop a RESTful API for all business data in Australia. There are some thoughts I’d like to mark down for notes. Guides Denormalize if necessary Understand sql query order Small table join big table Denormalize When designing models, we tend to normalize the database into a very detailed level because it makes sense...
Click to read more ...

Javascript Blind Spot

This is a collection of javascript blind spot. Array map parameters ['1', '2', '3'].map(parseInt) // [1, NaN, NaN] ['1', '2', '3'].map((currentValue, index, array) => { console.log(currentValue) console.log(index) console.log(array) }) // parseInt(1, 0) == parseInt(1, 10) 1 // parseInt(2, 1) NaN // parseInt(3, 2) NaN map w...
Click to read more ...

Free Hosting Methods

In this article, I am going to introduce three way to free hosting your simple website. Google Firebase Firebase Hosting is a static and dynamic web hosting service that launched on May 13, 2014. It supports hosting static files such as CSS, HTML, JavaScript and other files, as well as dynamic Node.js support through Cloud Functions. The se...
Click to read more ...

ES6 Variable - ES6 Study

ES6 variable study notes. block level variable { let a = 10; var b = 1; } a // ReferenceError: a is not defined. b // 1 No variable lift up console.log(foo); // 输出undefined console.log(bar); // 报错ReferenceError var foo = 2; let bar = 2; variable blind in block temporal dead zone,aka TDZ var tmp = 123; if (true) { tmp = 'abc'; //...
Click to read more ...

How To Setup Free Email Host In Zoho

This article introduce how to set up a free business email in zoho. Preparation Must have a domain name first a phone number never apply zoho email before Zoho features 10 free accounts per domain ( possible get more ) 5G for each accounts CRM, Project, Docs and other – Free version of Google business S...
Click to read more ...

Introduction to flexbox

Flex enable containers to adust items’ width/height/order to best fill the space in different kinds of screen sizes in a simple way. How to use .flex-element { display: -webkit-flex; /* Webkit core browerer such as Safari */ display: flex; } Then all the children elements will lose float, clear,vertical-align properties. The layout of a ...
Click to read more ...

Useful Comments

Useful comments /** * ┏┓ ┏┓+ + * ┏┛┻━━━━━┛┻┓ + + * ┃    ┃ * ┃   ━ ┃ ++ + + + * ████━████ ┃+ * ┃    ┃ + * ┃ ┻ ┃ * ┃ ┃ + + *       ┗━┓   ┏━┛ *         ┃   ┃ *         ┃   ┃ + + + + *         ┃   ┃    Bug free ...
Click to read more ...

Linux Log Files

logs in linux /var/log/boot.log: The process of kernel detecting devices during booting and initing core functions will be record here. Only record for each booting. /var/log/cron: cron jobs go here /var/log/lastlog: last login /var/log/maillog 或 /var/log/mail/*: for postfix (SMTP) and dovecot (POP3) /var/log/messages...
Click to read more ...

Useful Regex

Useful regex check password must include number and uppercase and lowercase no special characters ^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,10}$ check chinese ^[\\u4e00-\\u9fa5]{0,}$ check email [\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[\\w](?:[\\w-]*[\\w])? check url ^...
Click to read more ...

Shell Study Notes

Linux shell variables tutorial. Variable don’t usually declare variables in the shell before we use them. Instead, we create them when we first use them get at the contents of a variable by preceding its name with a $ character and outputting its contents with the echo command we need to give variables a preceding $, except when an assignment...
Click to read more ...

Linux Program Notes

Applications under Linux / UNIX are represented by two special types of file: executables and scripts. Executable files are programs that can be run directly by the computer and correspond to DOS .exe files. Scripts are collections of instructions for another program, an interpreter, to follow. These correspond to DOS .bat files, or interpreted ...
Click to read more ...