Skip to content

Instantly share code, notes, and snippets.

View nduytg's full-sized avatar
🏠
Working from home

Duy Nguyen nduytg

🏠
Working from home
View GitHub Profile
@sbailliez
sbailliez / vagrant-vmware-tech-preview-apple-m1-pro.md
Last active April 10, 2024 07:51
Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

UPDATE November 20, 2022: VMWare Fusion 13

VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.

Summary

This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated

@maxbrunet
maxbrunet / README.md
Last active February 17, 2023 20:02
Argo CD Application Controller Custom Sharding

Argo CD Application Controller Custom Sharding

This short Go program uses a Fist-fit-decreasing Bin Packing algorithm to assign Kubernetes clusters to different Argo CD Application Controller shard based on their resources count. It bases its calculations on the output of the argocd-util cluster stats command. The output can be used to update the undocumented shard key of the cluster secrets.

Example usage

argocd-util cluster stats --namespace=argocd | go run reshard.go
@MicahParks
MicahParks / go get private GitLab with group and subgroup (Golang modules).md
Last active January 12, 2024 05:43
go get private GitLab with group and subgroup (Golang modules)

Problem

The go command line tool needs to be able to fetch dependencies from your private GitLab, but authenticaiton is required.

This assumes your private GitLab is hosted at privategitlab.company.com.

Environment variables

The following environment variables are recommended:

export GO111MODULE=on
export GOPRIVATE=privategitlab.company.com
@pertoft
pertoft / ceph-commands.txt
Last active April 25, 2024 10:37
Ceph command cheatsheet
ceph -w
ceph health detail
ceph osd df
ceph osd find
ceph osd blocked-by
ceph osd pool ls detail
ceph osd pool get rbd all
ceph pg dump | grep pgid
ceph pg pgid
@wayanjimmy
wayanjimmy / cli-apps-dev.md
Last active February 4, 2024 11:23
I curate a list of interesting CLI tools, below are some command line tools that I personally love and use

I curate a list of interesting CLI tools, below are some command line tools that I personally love and use

  • tmux - Terminal multiplexer.
  • ripgrep - Search text for patterns fast.
  • fzf - Command-line fuzzy finder.
  • exa - Replacement for ls written in rust.
  • git - Version control.
  • create-react-app - Create React apps with no build configuration.
  • npx - Execute npm package binaries.
  • wifi-password - Get the password of the WiFi you're on.
@josecoelho
josecoelho / INSTALL CENTOS.md
Last active February 24, 2023 18:34
Load testing using WRK2 + LUA + Redis

Lua 5.1 installed already

Installing luarocks

# yum install lua-devel
# wget http://luarocks.org/releases/luarocks-2.3.3.tar.gz
# tar -xzvf luarocks-2.2.1.tar.gz
# cd luarocks-2.2.1
# ./configure
# make bootstrap
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@ricjcosme
ricjcosme / dump-restore
Created September 13, 2017 17:33
DUMP / RESTORE PostgreSQL Kubernetes
DUMP
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
kubectl exec [pod-name] -- bash -c "pg_dump -U [postgres-user] [database-name]" > database.sql
RESTORE
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active September 28, 2023 14:54
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@mariotacke
mariotacke / README.md
Created March 7, 2017 04:36
Default nginx log format (combined) and grok pattern