Skip to content

Instantly share code, notes, and snippets.


Trung Vo trungk18

View GitHub Profile
trungk18 /
Created January 4, 2021 12:16 — forked from jesstelford/
What is the JS Event Loop and Call Stack?

Regular Event Loop

This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)

Given the code

View ll-20.ts
import { ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Input, Type, ViewContainerRef } from '@angular/core';
import { Subscription } from 'rxjs';
selector: '[lazyComp]'
export class LazyCompDirective {
private _inputs;
private _outputs;
private subscription = new Subscription();
trungk18 /
Created June 18, 2020 02:58 — forked from nartc/
Văn hoá CodersX team

Văn hoá CodersX

CodersX là một. Chúng ta hoạt động vì một mục đích duy nhất: Thay đổi thế giới một cách tích cực, bắt đầu bằng việc tạo nên một nền giáo dục miễn phí.


  1. Thay đổi thế giới ← 2. Cùng nhau làm các startup có ảnh hưởng tích cực tới cuộc sống xung quanh ← 1. Làm mới hệ thống giáo dục ← 0. Giúp tất cả mọi người tiếp cận với lập trình

Giúp đỡ các thành viên trong team

Một team chỉ mạnh khi tất cả mọi người support lẫn nhau, và cùng nhau làm việc vì một mục tiêu duy nhất. Nếu chỉ nghĩ đến bản thân thì một lúc nào đó team sẽ tan rã (nếu nhiều người cùng nghĩ về bản thân), hoặc tự loại mình ra khỏi team.

Nghĩ tới người xung quanh

trungk18 / gist:e11965a61c9624265ca82769009e1d51
Created June 12, 2020 12:01 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup
View gist:e11965a61c9624265ca82769009e1d51


:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
trungk18 / youtube-vimeo-url-parser.js
Created February 3, 2019 07:49 — forked from yangshun/youtube-vimeo-url-parser.js
YouTube Vimeo URL Parser
View youtube-vimeo-url-parser.js
function parseVideo (url) {
// - Supported YouTube URL formats:
// -
// -
// -
// - Supported Vimeo URL formats:
// -
// -
// - Also supports relative URLs:
// - //
trungk18 / any.component.html
Created December 18, 2018 09:57 — forked from arniebradfo/any.component.html
Angular *ngFor recursive list tree template
View any.component.html
<h1>Angular 2 Recursive List</h1>
<ng-template #recursiveList let-list>
<li *ngFor="let item of list">
<ul *ngIf="item.children.length > 0">
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.children }"></ng-container>
trungk18 /
Created March 28, 2017 08:43 — forked from btroncone/
A Comprehensive Introduction to @ngrx/store - Companion to Series

#Comprehensive Introduction to @ngrx/store By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

trungk18 /
Created March 1, 2017 07:01 — forked from staltz/
The introduction to Reactive Programming you've been missing
trungk18 /
Created February 17, 2017 07:43 — forked from jareware/
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso


Comparison of ASP.NET and Node.js for Backend Programming

We will compare ASP.NET and Node.js for backend programming.
Source codes from examples.


This document was published on 21.09.2015 for a freelance employer. Some changes since then (14.02.2016):

  1. Koa.js no longer uses co-routines, it has switched to Babel's async/await. yield and await are used almost in the same way, so I see no point to rewrite the examples.