Skip to content

Instantly share code, notes, and snippets.

View vuquangthinh's full-sized avatar
⚠️
Warning compiled with 0 warnings

Vũ Quang Thịnh vuquangthinh

⚠️
Warning compiled with 0 warnings
View GitHub Profile
@vuquangthinh
vuquangthinh / main.rs
Created October 19, 2022 07:41 — forked from andelf/main.rs
Embed Deno in Rust
use deno_core::Op;
use deno_core::ZeroCopyBuf;
use deno_core::{CoreIsolate, StartupData};
use std::str;
fn main() {
println!("v8 version: {}", deno_core::v8_version());
let mut isolate = CoreIsolate::new(StartupData::None, false);
@vuquangthinh
vuquangthinh / README.md
Created September 22, 2022 09:29 — forked from cocoastorm/README.md
rexray/s3fs Docker Plugin Install with Minio

Getting Started

Make sure Docker is installed!

Get your Minio endpoint url, accesskey, and secretkey ready!

Install Docker Plugin

docker plugin install rexray/s3fs \
@vuquangthinh
vuquangthinh / sharded-balancing-nginx.txt
Created September 14, 2022 00:05 — forked from zzzcpan/sharded-balancing-nginx.txt
Sharded load balancing with nginx and perl
# Balancing over 4 nodes by hashing URI (consistently with md5)
# onto 16 shards.
upstream x0 { server 192.168.0.2; server 192.168.0.3 backup; }
upstream x1 { server 192.168.0.2; server 192.168.0.4 backup; }
upstream x2 { server 192.168.0.2; server 192.168.0.5 backup; }
upstream x3 { server 192.168.0.2; server 192.168.0.3 backup; }
upstream x4 { server 192.168.0.3; server 192.168.0.4 backup; }
@vuquangthinh
vuquangthinh / code.js
Created September 6, 2021 02:32
simple ether scan
/// watch blockchain network & execute in background
const ethers = require('ethers');
const fs = require('fs');
const abiDecode = require('abi-decoder');
abiDecode.addABI(require('./erc20.abi.json'));
const provider = new ethers.providers.JsonRpcProvider('https://ropsten.infura.io/v3/0720d1c4ec394f4090d9be740db47db0');
const getLastScanBlockIndex = async () => parseInt(fs.readFileSync(__dirname + '/../lastScanBlockIndex'));
@vuquangthinh
vuquangthinh / emscripten vscode setup.md
Created March 5, 2021 03:28 — forked from wayou/emscripten vscode setup.md
setup emscripten for vscode intelli sense

install emscripten

$ brew install emscripten

and setup by following the instruction after the installation.

get the location of emscripten header files

server {
# see: http://wiki.nginx.org/Pitfalls
# see: http://wiki.nginx.org/IfIsEvil
listen 80;
root /app;
index index.html index.htm index.php;
error_page 404 /index.php;
# Make site accessible from http://set-ip-address.xip.io
@vuquangthinh
vuquangthinh / i18next-scanner.config.js
Created July 22, 2020 02:12
i18next scanner config with typescript support
const fs = require('fs');
const path = require('path');
const typescript = require('typescript');
const DEFAULT_NS = 'translation';
module.exports = {
input: ['src/**/*.{js,jsx,ts,tsx}'],
options: {
[123,123,111]
$link.click(function(e) {
e.preventDefault();
var headerHeight = $header.height();
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname==this.hostname) {
var $target = $(this.hash);
var topValue = $target.offset().top;
$target = $target.length ? target : $('[name=' + this.hash.slice(1) + ']');
var p[], s[], n, m, f[];
doc input
// trong đó
n = length(s)
m = số phần tử của p