Skip to content

Instantly share code, notes, and snippets.

View vothanhkiet's full-sized avatar
🎯
99% of ideas are worth nothing without good execution.

Kiệt Thành Võ vothanhkiet

🎯
99% of ideas are worth nothing without good execution.
View GitHub Profile
@vothanhkiet
vothanhkiet / LICENSE
Created April 15, 2021 10:20 — forked from wlib/LICENSE
Run a shell script with bash, line-by-line, prompted on each command. Useful for running unknown scripts or debugging. Not a secure substitute for understanding a script beforehand.
MIT License
Copyright (c) 2021 Daniel Ethridge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@vothanhkiet
vothanhkiet / app.js
Created September 11, 2020 08:43 — forked from tj/app.js
users online with redis
var express = require('express');
var redis = require('redis');
var db = redis.createClient();
var app = express();
// track users online (replace UA string with user id)
app.use(function(req, res, next){
var ua = req.headers['user-agent'];
function(number, fractionSize) {
if (number === null) return null;
if (number === 0) return "0";
if (!fractionSize || fractionSize < 0) fractionSize = 1;
var abs = Math.abs(number);
var rounder = Math.pow(10, fractionSize);
var isNegative = number < 0;
var key = "";
@vothanhkiet
vothanhkiet / install react-devtools v3
Created June 24, 2020 05:03 — forked from oztune/install react-devtools v3
How to install React Dev Tools v3 so that you can have highlight updates again
1. Somewhere on your machine clone the project.
```
> git clone https://github.com/facebook/react-devtools.git
> cd react-devtools
```
2. Switch to the v3 branch
```
> git checkout v3
```
@vothanhkiet
vothanhkiet / os-x-local-dnsmasq.sh
Created March 24, 2020 08:09 — forked from oko/os-x-local-dnsmasq.sh
Configure a local dnsmasq server on OS X.
#!/bin/bash
sudo port -v install dnsmasq
sudo port -v load dnsmasq
sudo mkdir /etc/resolver
echo -n "nameserver 127.0.0.1" | sudo tee /etc/resolver/dev
echo "address=/dev/127.0.0.1" | sudo tee -a /opt/local/etc/dnsmasq.conf
echo "address=/test/127.0.0.1" | sudo tee -a /opt/local/etc/dnsmasq.conf
sudo kill -9 $(pgrep dnsmasq)
sleep 1
@vothanhkiet
vothanhkiet / creative-cloud-disable.md
Created February 12, 2020 01:59 — forked from andreibosco/creative-cloud-disable.md
disable creative cloud startup on mac
@vothanhkiet
vothanhkiet / setup.md
Created December 28, 2019 13:39 — forked from monkeygroover/setup.md
Chromebook container setup
  • install container

  • sudo apt install fish tmux

  • sudo chsh <username>

    • /usr/bin/fish
  • curl -L https://get.oh-my.fish | fish

    • omf install bobthefish
@vothanhkiet
vothanhkiet / malaysia.geojson
Last active December 19, 2019 01:08
Malaysia
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vothanhkiet
vothanhkiet / malaysia.json
Last active May 10, 2021 07:01 — forked from heiswayi/malaysia.geojson
Malaysia Map GeoJSON
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vothanhkiet
vothanhkiet / init.vim
Created November 12, 2019 07:14 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'