Skip to content

Instantly share code, notes, and snippets.

View xueshanf's full-sized avatar

Xueshan Feng xueshanf

  • Stanford University
View GitHub Profile
@xueshanf
xueshanf / ski-checklist.md
Last active December 17, 2023 05:40
Ski pack list

Travel

  • Currency
  • Passport
  • Epic Passes

Outdoor

  • Boots
  • Gloves
  • Goggles
  • Hats

Keybase proof

I hereby claim:

  • I am xueshanf on github.
  • I am xueshanf (https://keybase.io/xueshanf) on keybase.
  • I have a public key ASDhMpAFMJk5yu-PkCI_ODDeEQbM2svyV8gRCpBJ_GLUjQo

To claim this, I am signing this object:

@xueshanf
xueshanf / extract_kubecfg_cert.sh
Last active February 13, 2023 13:45
Extract kubernetes cluster credentials from kubecfg
#!/bin/bash
# Input: ./extract_kubecfg_cert.sh my-cluster-name username
# Output: ./my-cluster-name-ca.crt ./username.crt ./username.key
# Exit on error
abort(){
echo $1 && exit 1
}
# Prerequistes
#!/bin/bash
#
# Lego-admin.sh - create, renew, revoke certificates
#
### START CONFIGURATION ###
# Where lego stores certificattes
LEGO_HOME=/efs/lego
certificates=$LEGO_HOME/certificates
#!/bin/bash
# Script to verify key, cert. Generate a pem bundle for haproxy.
AWS_PROFILE=${AWS_PROFILE:-NODEFAULT}
CERT_BUCKET=${CERT_BUCKET:-DODEFAULT}
fqdn=$1
shortname=${fqdn/.example.com/}
# Error checking
@xueshanf
xueshanf / Yostemite-2015.md
Last active August 29, 2015 14:23
Pack list

Food

  • nuts
  • tea
  • bagels, cream
  • salt, oil
  • chicken drumsticks
  • whole wheat bread, cheese, ham
  • vegetables
  • instant noodles