Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋

Luat Nguyen luatnd

:octocat:
🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋
View GitHub Profile
@luatnd
luatnd / caesar-cypher-with-password.md
Last active Jun 4, 2022
Caesar cypher with password - simple method for storing password, private key, mnemonic
View caesar-cypher-with-password.md

mxn0 encode with password

The simple encode method:

  • phrase was split into words by space seperator: "hello world this is an example" => ['hello', 'world', 'this', 'is', 'an', 'example']

  • words will be encoded by a customized caesar cypher encoding:

    supported_chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';

    password = "your free password"

  • encode by base64: '.....'

@luatnd
luatnd / Number.ts
Last active Jun 28, 2022
[typescript/utils] A functions with currency and number formatting - useful for financial app
View Number.ts
import numeral from 'numeral'
import {isClientDevMode} from "./Env";
type NumberFormatOption = {
// whether to show +/- sign before formatter number
sign?: boolean
separator?: string
// trim non-meaningful zero character
zero_trim?: boolean
// no round: Eg: in case of decimal = 2 ==> 0.129 will not be rounded to 0.13
@luatnd
luatnd / index.html
Last active May 21, 2019 — forked from TimothyGu/index.html
JS Object: Iteration performance (https://jsbench.github.io/#7e111014592d2a6fd7a0e9284100891a) #jsbench #jsperf
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>JS Object: Iteration performance</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@luatnd
luatnd / README-Template.md
Created Jul 19, 2017 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.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