Skip to content

Instantly share code, notes, and snippets.

View chongshenng's full-sized avatar

Chong Shen Ng chongshenng

View GitHub Profile
@chongshenng
chongshenng / bash_strict_mode.md
Created May 29, 2025 14:49 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@chongshenng
chongshenng / GitRecovery
Created March 17, 2023 14:08 — forked from pce1991/GitRecovery
Repair git says object files are empty/corrupted
find .git/objects/ -type f -empty | xargs rm
git fetch -p
git fsck --full
http://stackoverflow.com/questions/11706215/how-to-fix-git-error-object-file-is-empty
@chongshenng
chongshenng / K3sInstallationNotes.md
Created August 2, 2022 12:43 — forked from ben-z/K3sInstallationNotes.md
K3s Installation Notes

K3s Installation Notes (for running Gitlab Runner)

Install k3s master and expose api:

curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --write-kubeconfig-mode 644 --bind-address 0.0.0.0" sh -

The --write-kubeconfig-mode 644 gives /etc/rancher/k3s/k3s.yaml group and world read permissions so that we can run kubectl without sudo. The INSTALL_K3S_EXEC argument can be modified at /etc/systemd/system/multi-user.target.wants/k3s.service.

@chongshenng
chongshenng / Makefile
Created October 8, 2021 09:49 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@chongshenng
chongshenng / Plot_Examples.md
Created January 25, 2021 15:57 — forked from gizmaa/Plot_Examples.md
Various Julia plotting examples using PyPlot