Skip to content

Instantly share code, notes, and snippets.

Working from home

Pahud Hsieh pahud

Working from home
View GitHub Profile
arun-gupta / readme.adoc
Last active Mar 22, 2020
Kubernetes Cluster on AWS
View readme.adoc
  1. kops:

    1. Getting Started Guide:

    2. Installing Kubernetes on AWS with kops:

    3. Mulit-master Kubernetes Cluster on AWS with kops:

    4. Booting Kubernetes on Amazon Elastic Compute with kops:

    5. Setting up an HA Kubernetes Cluster in AWS with private topology with kops 1.5.1:

    6. Kubernetes on AWS:

    7. Your 2nd day with Kubernetes on AWS:

  2. Tectonic (Terraform):

mgoodness /
Last active Jun 8, 2019
Helm RBAC setup for K8s v1.6+ (tested on minikube)
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
ravibhure /
Last active Oct 18, 2021
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

ctaggart / watchPods.go
Last active Jan 19, 2019
Kubernetes watch pods
View watchPods.go
// some updates for
// and
import (
rpgreen / master.vm
Created Feb 23, 2016
API Gateway "Send Everything" Mapping Template
View master.vm
## API Gateway "Send Everything" Mapping Template - Ryan Green -
## See
#set($allParams = $input.params())
"body-json" : "$input.json('$')",
"params" : {
#foreach($type in $allParams.keySet())
#set($params = $allParams.get($type))
"$type" : {
#foreach($paramName in $params.keySet())
View aws-api-gateway-form-to-json.ftl
## convert HTML POST data or HTTP GET query string to JSON
## get the raw post data from the AWS built-in variable and give it a nicer name
#if ($context.httpMethod == "POST")
#set($rawAPIData = $input.path('$'))
#elseif ($context.httpMethod == "GET")
#set($rawAPIData = $input.params().querystring)
#set($rawAPIData = $rawAPIData.toString())
#set($rawAPIDataLength = $rawAPIData.length() - 1)
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength))
jimmyislive /
Created Jan 4, 2015
Redis Elasticache Export
from optparse import OptionParser
import sys
import redis
__author__ = 'Jimmy John'
__doc__ = '''
This is a script to make a copy of a redis db. Mainly to be used for cloning AWS Elasticache
instancces. Elasticache seems to disable the SAVE/BGSAVE commands and you do not have access to
the physical redis instances. The UI allows you to create 'Snapshots', but no way to download