Flask Command Line

Happy New Year! Hope everything becomes better in 2018! From the version 0.11.0, Flask began to support shell command. Something you probably you already saw when you are using other web project, such as Django: ./manage.py shell To achieve that, it is quite simple as it only needs two steps: 1. Set up the environment.
Read More »

Get Start with RabbitMQ

RabbitMQ is an open source & enterprise level messsage broker using AMQP protocal. The AMQP protocol is designed for asychronization and message dispatch. RabbitMQ can be used in time-consuming backend jobs such as sending emails to client, generating file for user to download, and so on. Install on Mac brew update brew install rabbitmq Then
Read More »

Using Jinja2 with Flask

Jinja2 is a flexible HTML Template along with with Flask, another commonly used Flask template is Mako. Install Jinja2 Install with PIP pip install jinja2 Basic Operation 1. Determine whether a variable is set or not {# user is a variable, and none is not None #} {% if user is not none %} in
Read More »

RESTful API with Authentication (Part 2)

Compared with HTTP Basic Authentication and Access Token, API Key + Security Key + Sign is the most frequently used way of creating RESTful with Authentication. One Example using such a (similar) protocol is JWT https://jwt.io/. The workflow is (from its own website): The JWT is just a string consisted of header, payload and signature.
Read More »

OpenSource: react-appstore-button module

react-appstore-button version: 0.0.9 🎒 NPM URL: https://www.npmjs.com/package/react-appstore-button 🕶 Github URL: https://github.com/arkilis/react-AppStore-Button What is this? An React component which allows you to create an AppStore Download Button in a few seconds. This button: Using vector format, svg file , so don’t worry about the resolution Can specify your App Store button with customised url, width and
Read More »

Module in NodeJS and ES6

Modules are frequently used techniques which is an important part of decoupling and make the code more readable and organised. Module in NodeJS In NodeJS, keywords module, exports and required are exploited to create/import a module. Here are three ways of creating a module. Some examples: [gist https://gist.github.com/arkilis/78bc95a7c450f85c9b5e7ff8ca009424/] Module in ES6 In ES6, we can
Read More »

Iterator and Generator in ES6

Iterator and Generator are commonly used features in ES6. In this post, we will walk through the key features of iterator and generator in depth. Iterator In JavaScript, an object can be iterated due to it has an inner-built property/object: iterator (which objects?). So in order to let an ordinary object can be iterator, we
Read More »

Pass values using Props

Arguments passed to components are called props in React, which looks like HTML element attributes, such as src, width, etc. props can be accessed such as: this.props.autor Define props in Component Comment [gist https://gist.github.com/arkilis/90e8471639872662fab973b41af807b5/] Pass values to Component Comment using props [gist https://gist.github.com/arkilis/9e41b652d59b296d557fde6ee9506d20/] A full example on passing parameters values [gist https://gist.github.com/arkilis/7180ffebff893516edfda3c19224833f/] Notice: function such
Read More »