Skip to content

Instantly share code, notes, and snippets.

View duyhenryer's full-sized avatar
🥦
Củ Cải Trắng

Duy nè duyhenryer

🥦
Củ Cải Trắng
View GitHub Profile
@duyhenryer
duyhenryer / haproxy.sh
Created February 12, 2025 06:54 — forked from trungv0/haproxy.sh
RabbitMQ cluster with HAProxy & Keepalived for high availability
# install haproxy
yum install -y haproxy
# config haproxy for rabbitmq
cat > /etc/haproxy/haproxy.cfg << "EOF"
global
log 127.0.0.1 local0 notice
maxconn 10000
user haproxy
@duyhenryer
duyhenryer / bash_strict_mode.md
Created November 28, 2024 10:22 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@duyhenryer
duyhenryer / iptables.md
Created June 18, 2024 08:58 — forked from DominicBreuker/iptables.md
iptables firewall

iptables cheat sheet

Concepts

iptables defines tables, which group features:

  • filter: use it to filter traffic
  • nat: use it to implement NAT
  • raw: use it to define which connections iptables should track (stateful firewall)
  • mangle: use it to change some fields in packets (e.g., TTL)
  • security: use it to define access control
@duyhenryer
duyhenryer / KongJwt.md
Created December 7, 2021 09:10 — forked from martinheld/KongJwt.md
Short example to use JWT with Kong

JWT Kong Example

  • Get and Start Kong and Co
git clone [email protected]:Mashape/docker-kong.git
cd docker-kong/compose
docker-compose up
  • Create Kong API Route
@duyhenryer
duyhenryer / config
Created November 26, 2021 10:01 — forked from justinpawela/config
AWS CodeCommit Multiple Account Config
# This file is: ~/.ssh/config
# You may have other (non-CodeCommit) SSH credentials stored in this
# config file – in addition to the CodeCommit settings shown below.
# NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file!
# Credentials for Account1
Host awscc-account1 # 'awscc-account1' is a name you pick
Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region
@duyhenryer
duyhenryer / rancher-argocd.md
Created November 26, 2021 08:33 — forked from janeczku/rancher-argocd.md
How to register Rancher managed Kubernetes clusters in Argo CD

How to register Rancher managed Kubernetes clusters in Argo CD

Registering Rancher managed clusters in Argo CD doesn't work out of the box unless the Authorized Cluster Endpoint is used. Many users will prefer an integration of Argo CD via the central Rancher authentication proxy (which shares the network endpoint of the Rancher API/GUI). So let's find out why registering clusters via Rancher auth proxy fails and how to make it work.

Hint: If you are just looking for the solution scroll to the bottom of this page.

Why do i get an error when running argocd cluster add?

Service Account tokens and the Rancher authentication proxy

@duyhenryer
duyhenryer / dump_route53_records.md
Created October 28, 2021 03:05 — forked from porjo/dump_route53_records.md
Export route53 records to CSV

Retrieve hosted zones with aws route53 list-hosted-zones then enter the zone Id below:

aws route53 list-resource-record-sets --hosted-zone-id "/hostedzone/xxxxxxxxxxx" | \
   jq -r '.ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?]  | @tsv'
@duyhenryer
duyhenryer / starship.toml
Created October 17, 2021 16:38 — forked from ryo-ARAKI/starship.toml
Starship configuration file
# ~/.config/starship.toml
[battery]
full_symbol = "🔋"
charging_symbol = "🔌"
discharging_symbol = ""
[[battery.display]]
threshold = 30
style = "bold red"
# Start minikube
minikube ip || minikube start --vm-driver=kvm2 --cpus=8 --memory=10000 --insecure-registry=192.168.0.0/16
for addon in default-storageclass ingress storage-provisioner
do
minikube addons list | grep $addon | grep -q enabled || minikube addons enable $addon
done
# Init helm
helm repo add gitlab https://charts.gitlab.io/
helm repo update
# Gensecrets