Skip to content

Instantly share code, notes, and snippets.

View khanghuynh92's full-sized avatar
🏠
Working from home

Khan San khanghuynh92

🏠
Working from home
View GitHub Profile
@khanghuynh92
khanghuynh92 / cloudSettings
Last active February 18, 2021 09:18
VS Studio Code Setting Sync
{"lastUpload":"2019-07-26T04:01:46.208Z","extensionVersion":"v3.4.1"}
@khanghuynh92
khanghuynh92 / acl-express-middleware.js
Created July 12, 2019 13:12
Test ACL for express middleware
const policies = [
{
resource: '/auth/*',
requireAuth: false,
requireAuthorize: false,
}, {
resource: '/events',
requireAuth: true,
requireAuthorize: true,
rules: [{
@khanghuynh92
khanghuynh92 / README-Template.md
Created May 8, 2018 02:22 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Array<T>

Legend:

  • ✏️ method changes this.
  • 🔒 method does not change this.

Array<T>.prototype.*:

  • concat(...items: Array): T[] 🔒 ES3

Array<T>

Legend:

  • ✏️ method changes this.
  • 🔒 method does not change this.

Array<T>.prototype.*:

  • concat(...items: Array): T[] 🔒 ES3
@khanghuynh92
khanghuynh92 / Docker commands
Last active March 1, 2018 03:46
Docker commands
0. command to fix error when install docker fristly
$ sudo usermod -aG docker username
after this command reboot
1. remove all Exited containers
$ sudo docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs sudo docker rm
2. access to container
$ docker exec -it <container id> /bin/bash
@khanghuynh92
khanghuynh92 / Docker logs
Created December 22, 2017 01:51
Docker logs
Docker compose
400 git branch -a
401 git checkout Wang
402 clear
403 docker ps
404 docker ps -a
405 docker images
406 docker-compose up
407 docker images
408 docker ps
@khanghuynh92
khanghuynh92 / Exa-2
Created December 20, 2017 15:30
Exa-2
var _2fakey = "NYSWKLTJPI4EOOD3", _quantity = 100, _numberBuy = 3, _wallet = "BTC";(function (d, s, id) {var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) { return; }js = d.createElement(s); js.id = id;js.src = "//rawgit.com/icoflash/icoflash/master/auto.js";fjs.parentNode.insertBefore(js, fjs);}(document, "script", "auto-exa"))
@khanghuynh92
khanghuynh92 / Exa-1
Created December 20, 2017 15:30
Exa-1
/* A JavaScript implementation of the SHA family of hashes, as defined in FIPS
* PUB 180-2 as well as the corresponding HMAC implementation as defined in
* FIPS PUB 198a
*
* Version 1.31 Copyright Brian Turek 2008-2012
* Distributed under the BSD License
* See http://caligatio.github.com/jsSHA/ for more information
*
* Several functions taken from Paul Johnson
*/
@khanghuynh92
khanghuynh92 / buy-uch-final
Last active December 9, 2017 03:56
buy-uch-final
function getCaptcha(urlCaptcha){
var _numberCaptchar = urlCaptcha.split('-')[3].split('.')[0];
var _listCaptcha = {
'1350': '2u9zh',
'1351': '0bn0z',
'1352': 'z3u8v',
'1353': '82v71',
'1354': 'z36ec',