Skip to content

Instantly share code, notes, and snippets.

View khanhtc1202's full-sized avatar
💬
Someone is typing…

Khanh Tran khanhtc1202

💬
Someone is typing…
View GitHub Profile
@khanhtc1202
khanhtc1202 / README.md
Created January 20, 2019 03:09 — forked from Lazza/README.md
VPNGate Python script

vpngate.py

This script allows to use the free VPN service provided by VPNGate in an easy way. The user just needs to provide the desidered output country, and the script automatically chooses the best server.

After this step, OpenVPN is launched with the proper configuration. The VPN can be terminated by pressing Ctrl+C.

Usage

Run the script by providing the desired output country:

@khanhtc1202
khanhtc1202 / tmux.cheat
Created July 20, 2018 03:27 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@khanhtc1202
khanhtc1202 / promises.md
Created June 19, 2018 10:35 — forked from domenic/promises.md
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.