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 / 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
resource "aws_autoscaling_group" "hosting" {
name = "hosting"
availability_zones = [ "us-west-2a", "us-west-2b", "us-west-2c"]
max_size = 9
min_size = 3
desired_capacity = 3
health_check_type = "EC2"
force_delete = true
#!/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
#!/bin/bash
#
# Lego-admin.sh - create, renew, revoke certificates
#
### START CONFIGURATION ###
# Where lego stores certificattes
LEGO_HOME=/efs/lego
certificates=$LEGO_HOME/certificates

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:

$ journalctl |grep -B 10 guestbook-67f65745c-cjpf4
--
May 07 06:17:45 ip-10-10-93-194.us-west-2.compute.internal dhclient[3456]: XMT: Solicit on eth0, interval 111230ms.
May 07 06:17:59 ip-10-10-93-194.us-west-2.compute.internal kubelet[4365]: I0507 06:17:59.016255 4365 reconciler.go:217] operationExecutor.VerifyControllerAttachedVolume started for volume "default-token-8t6sp" (UniqueName: "kubernetes.io/secret/6368583c-51be-11e8-8c05-06c1c5de4864-default-token-8t6sp") pod "guestbook-67f65745c-qx7rp" (UID: "6368583c-51be-11e8-8c05-06c1c5de4864")
May 07 06:17:59 ip-10-10-93-194.us-west-2.compute.internal systemd[1]: Started Kubernetes transient mount for /var/lib/kubelet/pods/6368583c-51be-11e8-8c05-06c1c5de4864/volumes/kubernetes.io~secret/default-token-8t6sp.
May 07 06:17:59 ip-10-10-93-194.us-west-2.compute.internal systemd[1]: Starting Kubernetes transient mount for /var/lib/kubelet/pods/6368583c-51be-11e8-8c05-06c1c5de4864/volumes/kubernetes.io~secret/default-token-8t6sp.
May 07 06:17:59 ip-10-10-93-
@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
@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