Skip to content

Instantly share code, notes, and snippets.

View alchen99's full-sized avatar

Alice Chen alchen99

View GitHub Profile
@alchen99
alchen99 / aws-hourly-instance-cost.txt
Last active February 8, 2017 06:58
Easily parseable list of the cost/hr of each type of AWS instance
t1.micro=0.020
t2.nano=0.0059
t2.micro=0.012
t2.small=0.023
t2.medium=0.047
t2.large=0.094
t2.xlarge=0.188
t2.2xlarge=0.376
m1.small=0.044
m1.medium=0.087
"{\"Add\":[{\"UserId\":\"ACCOUNTNUMBER\"}]}"
@alchen99
alchen99 / awsAddLaunchPermission.json
Last active February 16, 2018 05:36
JSON to grant another AWS account Launch Permissions
{"Add":[{"UserId":"ACCOUNTNUMBER"}]}
@alchen99
alchen99 / debugAwsLambda.txt
Last active October 13, 2018 00:38
Debugging AWS Lambda Python scripts
import json
logger.info('Event: %s' % json.dumps(event, indent=2))
See https://gist.github.com/gene1wood/24e431859c7590c8c834
time aws lambda invoke --invocation-type RequestResponse --function-name reportUntaggedInstances --region us-west-2 --log-type Tail --payload '{"region": "us-west-2"}' lambda.log
awslogs groups
awslogs get /aws/lambda/reportUntaggedInstances --no-group --no-stream -s '15 min ago'

Keybase proof

I hereby claim:

  • I am alchen99 on github.
  • I am alchen99 (https://keybase.io/alchen99) on keybase.
  • I have a public key ASD8OU5MTvF7eFV9cIT5-moxprq3A008_9aSxPTDd93bLwo

To claim this, I am signing this object:

@alchen99
alchen99 / .screenrc
Created July 28, 2020 00:17
Screen rc file
shell -${SHELL}
# kill startup message
startup_message off
# define bigger scrollback, default is 100 lines
defscrollback 10000
# Prefer an audible bell to the visual one
vbell off
@alchen99
alchen99 / .bashrc-append
Created July 28, 2020 01:00
Append to .bashrc
# enable custom bash stuff
if [ -f ~/.bashrc-ext ]; then
source ~/.bashrc-ext
fi
@alchen99
alchen99 / prometheus_clusterrole_patch.diff
Created September 10, 2020 20:49
Patch prometheus clusterrole in JSONNET from repo https://github.com/carlosedp/cluster-monitoring.git.
diff --git base_operator_stack.jsonnet base_operator_stack.jsonnet
index e8fca74..4980cf3 100644
--- base_operator_stack.jsonnet
+++ base_operator_stack.jsonnet
@@ -89,6 +89,16 @@ local vars = import 'vars.jsonnet';
},
} else {}),
},
+ // add additional clusterrole policies
+ local clusterRole = k.rbac.v1.clusterRole,
@alchen99
alchen99 / cloud-init-minnaker-prereq
Last active November 3, 2020 22:17
Cloud Init for Minnaker to Spinnaker Operator
#cloud-config
repo_update: true
repo_upgrade: all
packages:
- curl
- golang
- httpie
- jq
- make
@alchen99
alchen99 / clouddriver.yml
Created November 4, 2020 17:37
Spinnaker Summit - Kubernetes Clouddriver sample config
apiVersion: spinnaker.armory.io/v1alpha2
kind: SpinnakerService
metadata:
name: spinnaker
spec:
validation:
providers:
kubernetes:
enabled: true # Default: true. Indicate if operator should do connectivity checks to configured kubernetes accounts before applying the manifest
spinnakerConfig: