Skip to content

Instantly share code, notes, and snippets.

View trungnt13's full-sized avatar
:octocat:
Coding, coding, ... and still coding

Trung Ngo trungnt13

:octocat:
Coding, coding, ... and still coding
View GitHub Profile
@trungnt13
trungnt13 / GitCheatSheet.md
Last active April 17, 2024 09:40
[CheatSheet] Git common workflow and command, Precommit
@trungnt13
trungnt13 / c_cpp_properties.json
Last active April 24, 2023 21:52
[VSCode] C/C++ c_cpp_properties.json
// env: an array of user-defined variables for substitution in configurations
// configurations: an array of configuration objects for IntelliSense engine
// version: tracks current version of c_cpp_properties.json file
{
"env": {
"myDefaultIncludePath": [
"${workspaceFolder}",
"${workspaceFolder}/include"
],
"myCompilerPath": "/usr/local/bin/gcc-7"
@trungnt13
trungnt13 / AzureFunctionHost.json
Created April 18, 2023 18:30
[Ref] Azure Function host.json
// https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json
{
"version": "2.0",
// Specifies how many function invocations are aggregated when calculating metrics for Application Insights.
"aggregator": {
"batchSize": 1000,
"flushTimeout": "00:00:30"
},
"concurrency": {
"dynamicConcurrencyEnabled": true,
@trungnt13
trungnt13 / QuietLightVSCode.json
Created April 17, 2023 11:52
[Ref] Quiet Light Theme VSCode
{
"author": "Ian Beck",
"comment": "Light, peaceful coding.",
"name": "Quiet Light for VSC",
"tokenColors": [
{
"name": "Comments",
"scope": [
"comment",
"punctuation.definition.comment"
@trungnt13
trungnt13 / Kubernetes.md
Last active April 17, 2023 11:08
[CheatSheet] Kubernets

Kubernetes

microk8s status --wait-ready

microk8s enable dashboard dns ingress

If you mainly use MicroK8s you can make our kubectl the default one on your command-line with alias mkctl=”microk8s kubectl”

microk8s kubectl get all --all-namespaces

@trungnt13
trungnt13 / vscode_convert_keybindings.py
Last active April 26, 2023 08:48
[Code] Convert vscode MacOS keybindings to Linux/Windows keybindings
"""
19/04/2023: MacOS
- cmd+shift+y: select all selected occurence
- cmd+ctrl+o: outline
20/04/2023: Search Editor (MacOS)
- ctrl+f: open
- ctrl+0 or 9: focus Next or prev
- cmd+[ or ]: next or prev input box
- better split vertical and horizontal (> 2 editor tabs)
24/04/2023: diff editor (MacOS)
@trungnt13
trungnt13 / tmux_config.sh
Last active May 3, 2023 19:23
Tmux autocomplete and configuration
#!/bin/bash
########## Check for tmux and bash-completion installed
if [[ "$(uname)" == "Darwin" ]]; then
if ! command -v brew >/dev/null 2>&1; then
echo "Homebrew is not installed. Please install Homebrew and try again."
exit 1
else
# Install tmux if not installed
if ! command -v tmux >/dev/null 2>&1; then
@trungnt13
trungnt13 / mermaid.md
Last active December 19, 2023 21:37
[CheatSheet] mermaid diagram, tree, graph, etc
@trungnt13
trungnt13 / .clang-tidy
Last active April 14, 2023 12:48
[CheatSheet] Clang Tidy
Checks: 'clang-diagnostic-*,clang-analyzer-*,-modernize-*,-clang-diagnostic-#pragma-messages,-readability-identifier-naming,-clang-diagnostic-switch'
WarningsAsErrors: '*'
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: none
CheckOptions:
- key: cert-dcl16-c.NewSuffixes
value: 'L;LL;LU;LLU'
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: '1'