Skip to content

Instantly share code, notes, and snippets.

View grammy-jiang's full-sized avatar
:octocat:
Do one thing, do it well

Grammy Jiang grammy-jiang

:octocat:
Do one thing, do it well
View GitHub Profile
@grammy-jiang
grammy-jiang / download_gitignore.sh
Last active October 13, 2023 01:47
git configurations
# Download the file:
wget --output-document .gitignore https://www.toptal.com/developers/gitignore/api/linux,windows,macos,vim,emacs,jetbrains+all,visualstudiocode,c,c++,go,java,node,python,rust,helm,bazel
@squidpickles
squidpickles / README.md
Last active June 14, 2024 13:38
Multi-platform (amd64 and arm) Kubernetes cluster

Multiplatform (amd64 and arm) Kubernetes cluster setup

The official guide for setting up Kubernetes using kubeadm works well for clusters of one architecture. But, the main problem that crops up is the kube-proxy image defaults to the architecture of the master node (where kubeadm was run in the first place).

This causes issues when arm nodes join the cluster, as they will try to execute the amd64 version of kube-proxy, and will fail.

It turns out that the pod running kube-proxy is configured using a DaemonSet. With a small edit to the configuration, it's possible to create multiple DaemonSets—one for each architecture.

Steps

Follow the instructions at https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ for setting up the master node. I've been using Weave Net as the network plugin; it see

@alexellis
alexellis / k8s-pi.md
Last active April 11, 2024 14:17
K8s on Raspbian
@mpneuried
mpneuried / Makefile
Last active July 7, 2024 14:30
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)
@eyecatchup
eyecatchup / secure_flashing_hammerhead_lrx21o.txt
Created November 13, 2014 11:40
The safest way to flash factory images - This is a manual step-by-step procedure to flash Android 5.0 (LRX21O) factory images onto the Nexus 5 (aka hammerhead).
# Create a new working directory and cd into it
~$ mkdir -p /path/n5update && cd /path/n5update
# Download all files you need
/path/n5update$ wget --no-check-certificates https://dl.google.com/dl/android/aosp/hammerhead-lrx21o-factory-01315e08.tgz
/path/n5update$ wget --no-check-certificates https://copy.com/pV8d7OdciGi2EUQu/openrecovery-twrp-2.8.1.0-hammerhead.img
# @chainfire: I really hope it's not too cheeky, I just so wanted a hotlink for this one. :| As soon as you ask, it's gone.
/path/n5update$ wget --no-check-certificates https://copy.com/spuYd3VhHiAULMCL/CF-Auto-Root-hammerhead-hammerhead-nexus5.zip
# Extract downloaded file archives
@rothgar
rothgar / install-tmux
Last active April 5, 2023 06:53 — forked from ekiara/how_to_install_tmux_on_centos
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
DOWNLOAD_HANDLERS = {
'http': 'myspider.socks5_http.Socks5DownloadHandler',
'https': 'myspider.socks5_http.Socks5DownloadHandler'
}