Skip to content

Instantly share code, notes, and snippets.

View tanftw's full-sized avatar
😅
Fixing bugs

Tan Nguyen tanftw

😅
Fixing bugs
View GitHub Profile
@tanftw
tanftw / w10-ethernet-drop-fix.md
Created September 3, 2019 16:49
Win10 Ethernet Drop Fix
@tanftw
tanftw / shrink_grow.md
Created August 26, 2019 03:05
Shrink/Grow VSCode
@tanftw
tanftw / quickopen.md
Created August 16, 2019 08:53
VSCode: Quick Open File in sidebar with Enter instead of Cmd Down
  1. Change key binding by pressing Cmd K S
  2. Find Command list.select
  3. Keybinding, select Enter
  4. When, enter explorerViewletVisible && filesExplorerFocus
@tanftw
tanftw / firestore.md
Created July 10, 2019 08:09
Firestore Reference

Creating Reference

 DocumentReference userRef = Firestore.instance.collection('users').document(userId);
 
 Firestore.instance.collection('bookings').document().setData({
  'user': userRef
 });
@tanftw
tanftw / linux.md
Last active June 24, 2019 19:47
Linux Resources
@tanftw
tanftw / todo-vue.html
Last active May 19, 2019 03:23
Minimal TodoList in Vue, for Training Purpose
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>VueJS Demo</title>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
@tanftw
tanftw / git_config.sh
Last active April 20, 2019 13:23
Git Config
## Ignore Permissions change
git config --global core.fileMode false
## Credentials
git config --global user.name "Gary Lamp"
git config --global user.email "[email protected]"
@tanftw
tanftw / ApplicationToContext.md
Created April 18, 2019 12:57
Context Key in OSX

Application to Context Key in macOS

By default, the Application key does nothing, for heavy keyboard users like me, the context key is really useful. I know that we can use Shift + F10 do achieve that but these buttons take more time to press than a context key.

This is the Karabiner configuration file to do that.

{
    "global": {
@tanftw
tanftw / Mongo
Created September 2, 2018 18:46
Run Docker MongoDB on Windows
Create a volume to persist the Mongo database:
```sh
docker volume create --name=mongodata
```
The run a MongoDB instance:
```sh
docker run -d -p 27017:27017 -v mongodata:/data/db mongo
@tanftw
tanftw / default
Last active November 14, 2018 05:52
Nginx Vhost WSL
server {
listen 80;
root /var/www/code/wp;
index index.php index.html index.htm index.nginx-debian.html;
server_name wp.test;
location / {
try_files $uri $uri/ /index.php?$query_string;
}