- Bracket Pair Colorizer 2 -
ext install CoenraadS.bracket-pair-colorizer-2
- C/C++ -
ext install ms-vscode.cpptools
- CMake Tools -
ext install ms-vscode.cmake-tools
- CodeSnap -
ext install adpyke.codesnap
- EditorConfig for VS Code -
ext install EditorConfig.EditorConfig
- ESLint -
ext install dbaeumer.vscode-eslint
- Git Graph -
ext install mhutchie.git-graph
- [Go](https://marketplace.visualstudio.com/items?itemName=golang.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This module is a decorator which use to measure the total execution time of a function. | |
""" | |
__author__ = 'Khiem Doan' | |
__email__ = 'doankhiem.crazy@gmail.com' | |
from functools import wraps | |
from logging import Logger | |
from time import process_time, time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Config static ip in ubuntu (netplan) | |
# /etc/netplan/01-netcfg.yaml | |
network: | |
version: 2 | |
ethernets: | |
ens32: | |
dhcp4: no | |
addresses: | |
- 172.16.175.130/24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install microk8s from the edge channel (Rancher requires Helm 2.15.1 or above) | |
sudo snap install microk8s --classic | |
# Enable useful plugins | |
sudo microk8s.enable dns dashboard storage ingress helm | |
# Allow running priviledged Pods (required by Rancher's `cattle-node-agent`) | |
sudo sh -c 'echo "--allow-privileged=true" >> /var/snap/microk8s/current/args/kube-apiserver' | |
sudo systemctl restart snap.microk8s.daemon-apiserver.service | |
# Setup and install Tiller (part of Helm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ansible-playbook shutdown.yml -K | |
--- | |
- name: shutdown | |
hosts: all | |
become: 'yes' | |
become_method: sudo | |
tasks: | |
- name: shutdown hosts | |
command: /sbin/shutdown -h now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WSL 2 in CLI Mode: | |
winver (needs Windows 10 2004 or above) | |
Open> Turn Windows features on and off | |
Select> | |
- Virtual Machine Platform | |
- Windows Subsystem for Linux | |
Press> OK (system restart) |
mkdir -p ~/.ssh
echo "Host *" > ~/.ssh/config
echo " StrictHostKeyChecking no" >> ~/.ssh/config
ssh -o StrictHostKeyChecking=no user@host
git config --global pull.rebase false
git config --global fetch.prune true
git config --global diff.colorMoved zebra
git config --global commit.gpgsign true