Skip to content

Instantly share code, notes, and snippets.

View pmint93's full-sized avatar
Working from anywhere

Thanh Pham Minh pmint93

Working from anywhere
View GitHub Profile
@pmint93
pmint93 / tcpdump.md
Created July 31, 2023 14:23 — forked from dacr/tcpdump.md
tcpdump cheat sheet / published by https://github.com/dacr/code-examples-manager #dc012b03-0968-4a22-adec-c9483bdab8c6/9af294dd1dbac76b4ac789383de5794632247810
@pmint93
pmint93 / elasticsearch-poststart-settings.yaml
Last active May 17, 2023 07:55
Elasticsearch post-start script to automatic update indicies settings (example with docker-compose)
version: "3.3"
services:
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.3.1
restart: unless-stopped
ports:
- "9200:9200"
environment:
@pmint93
pmint93 / k8s-systemd-networkd-journal-reader.yaml
Created December 31, 2022 17:01
Tail systemd-networkd journal log from K8s Daemonset
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
labels:
app: journal-reader
name: journal-reader
namespace: kube-system
spec:
selector:
@pmint93
pmint93 / k8s-ip-monitor-ds.yaml
Created December 31, 2022 03:39
Monitor ip stack on K8s nodes from DaemonSet, for debugging purpose
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
labels:
app: ip-monitor
name: ip-monitor
namespace: kube-system
spec:
selector:
@pmint93
pmint93 / k8s-dhcp-renew
Last active January 20, 2026 04:56
Renew DHCP through DaemonSet (example for eth1 interface)
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
labels:
app: dhcp-renew
name: dhcp-renew
namespace: kube-system
spec:
selector:
@pmint93
pmint93 / self-signed-certificate-with-custom-ca.md
Created April 11, 2019 09:15 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@pmint93
pmint93 / rabbitmq-autocluster_k8s_persistent.bash
Last active March 23, 2019 03:14
Deploy rabbitmq-autocluster on k8s with persistent storage
#!/bin/bash
set -eo pipefail
export KUBE_NAMESPACE=test
export REPLICA_COUNT=3
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1beta1
kind: StatefulSet
@pmint93
pmint93 / encrypt_openssl.md
Created January 5, 2018 04:28 — forked from dreikanter/encrypt_openssl.md
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

Make IP phone call

METHOD: SOAP
URL: http://remote_host/TPCDialOut2/services/CallCenter?wsdl
PARAMS:
  agent_code: <Staff email>
@pmint93
pmint93 / fontbox.vn.downloader.temp.js
Created September 19, 2015 02:56
Fontbox.vn Temporary Downloader fix
//Buy Form
jQuery.fn.fontbox_buy_form = function(variables){
var z_this_form = jQuery(this);
var a_check_all = jQuery('#buy_check_all');
var b_check_box_child_class = '.buy-check-box';
var c_check_box_class = '.check-box';
var d_total_price = 0;
var e_total_price_obj = jQuery('#buy_total_price');
var f_total_check_box_child = jQuery(b_check_box_child_class).size();
var g_download_iframe = jQuery('#buy_download_iframe');