Skip to content

Instantly share code, notes, and snippets.

View InAnimaTe's full-sized avatar
🕹️
Decomposing the Monolith

Mario InAnimaTe

🕹️
Decomposing the Monolith
View GitHub Profile
@InAnimaTe
InAnimaTe / serviceaccount-role-rolebinding-helm-template
Created March 6, 2017 19:42
example rbac (non-cluster roles)
kind: Role
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
name: {{ template "fullname" . }}
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "watch", "list"]
nonResourceURLs: []
---
@InAnimaTe
InAnimaTe / kcsh
Last active March 7, 2017 18:30
kubectl exec helper
function kcsh () {
if [ $# -eq 4 ]; then
kubectl exec -ti "${2}" -c "${3}" --namespace="${1}" -- "${4}"
else
echo "Usage: $0 <namespace> <pod> <container> <command>"
fi
}
@InAnimaTe
InAnimaTe / pacaur_install.sh
Created August 25, 2016 21:30 — forked from tadly/pacaur_install.sh
A simple shell script to quickly / easily install "pacaur" on archlinux
#!/bin/sh
# If you are new to arch, I encourage you to at least read and understand what
# this script does befor blindley running it.
# That's why I didn't make a one-liner out of it so you have an easier time
# reading and understanding it :)
#
# This scripts purpose is purly to save you a few seconds on your new installation.
#
# Enjoy your time on an awesome system. Arch FTW!
@InAnimaTe
InAnimaTe / gist:ec7dffb78af10e65e83d
Created February 12, 2015 01:29
ipt function for safe importing of rulesets
# setup for easy management of iptables
function ipt {
if [[ "$1" == "clear" ]]; then
print -P "\e[95mFlushing firewall and allowing everyone...\n"
sudo iptables -F
sudo iptables -X
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t mangle -F
sudo iptables -t mangle -X
@InAnimaTe
InAnimaTe / gist:2e2b1058af02d3ac2033
Last active August 29, 2015 14:14
PositiveSSL Setup on Nginx
  • UPDATE: I have edited the below method to not include the AddTrustExternalCARoot.crt as part of the trusted certificate since, to my knowledge (and most people on the web), this cert should already exist in the clients' browser.
unzip scriptthe_net.zip
cat scriptthe_net.crt COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt > ssl_certificate
cat COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt > ssl_trusted_certificate

This is how I setup my ssl keys for nginx. The file im catting them to is the associated configuration parameter in your server config. You'll define it like so:

@InAnimaTe
InAnimaTe / gist:dfc9371ef2ef5fecc023
Created December 17, 2014 16:08
Update function for dotfiles/env
function update () {
function submod_push () {
CHANGE_LIST=("${(@f)$(git status --porcelain)}")
if [ $? -eq 0 ]; then
# command ran fine..continue
if [ ${CHANGE_LIST[1]} ]; then
echo -en " ${txtyellow}*${reset} ${txtlitepurple}The following changes exist:${reset}\n"
for change in ${CHANGE_LIST[@]}; do
echo -en " ${txtyellow}*${reset} ${txtlitegray}${change}${reset}\n"
done

Keybase proof

I hereby claim:

  • I am inanimate on github.
  • I am supermario (https://keybase.io/supermario) on keybase.
  • I have a public key whose fingerprint is F717 95C8 0EB3 D57F A8C5 96B9 5A56 5953 1FAC CE9F

To claim this, I am signing this object: