Skip to content

Instantly share code, notes, and snippets.

so0k so0k

Block or report user

Report or block so0k

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@azihsoyn
azihsoyn / circle.yml
Created Mar 23, 2018
example circleci 2.0 with go 1.10
View circle.yml
version: 2
jobs:
build:
working_directory: /go/src/github.com/your_company/your_app
docker:
- image: circleci/golang:1.10.0
environment:
- GOCACHE: "/tmp/go/cache"
- DEP_VERSION: 0.4.1
steps:
@jgrahamc
jgrahamc / pwnd.js
Created Feb 24, 2018
Cloudflare Workers that adds an "Cf-Password-Pwnd" header to a POST request indicating whether the 'password' field appears in Troy Hunt's database of pwned passwords.
View pwnd.js
addEventListener('fetch', event => {
event.respondWith(fetchAndCheckPassword(event.request))
})
async function fetchAndCheckPassword(req) {
if (req.method == "POST") {
try {
const post = await req.formData();
const pwd = post.get('password')
const enc = new TextEncoder("utf-8").encode(pwd)
@mgoodness
mgoodness / helm-rbac.md
Last active Jun 8, 2019
Helm RBAC setup for K8s v1.6+ (tested on minikube)
View helm-rbac.md
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
@ryanj
ryanj / Operator-Hack-Night-at-CoreOS-SF.html
Last active Apr 10, 2017
CoreOS Kube Operators Workshop at the CoreOS SF Meetup on March 30, 2017 http://bit.ly/operatorhacks
View Operator-Hack-Night-at-CoreOS-SF.html
<section>
<section data-markdown>
# Operator Hack Night
at
## CoreOS SF
[CoreOS SF Meetup - March 30, 2017](https://www.meetup.com/coreos/events/238226876/)
@jpsilvashy
jpsilvashy / README.md
Last active Dec 19, 2019
Post Google Sheets form entries to Slack
View README.md

Post Google Sheets form entries to Slack

By using Google Form's script editor, you can call Slack webhooks when form submissions are made. You can use this script to do things like creating a live feedback form for taking questions from an audience or notifying your team when someone signs up for an event.

Setup

First, be sure you're collecting the email address in the form:

'img'

@staltz
staltz / .bashrc
Created Mar 7, 2017
Show a macOS notification when a terminal task is done
View .bashrc
# Name it whatever you want. I like `y` because in my keyboard layout it's close to `;`
function y() {
previous=$?
if [ $previous -eq 0 ]; then
osascript -e "display notification \"Done\" with title \"Terminal Task\"" && say "it is done";
else
osascript -e "display notification \"Failed\" with title \"Terminal Task\"" && say "it went to the trees";
fi
}
View bashrc
NORMAL="\[\033[00m\]"
BLUE="\[\033[01;34m\]"
RED="\[\e[1;31m\]"
YELLOW="\[\e[1;33m\]"
GREEN="\[\e[1;32m\]"
PS1_WORKDIR="\w"
PS1_HOSTNAME="\h"
PS1_USER="\u"
__kube_ps1()
@mgoodness
mgoodness / k8s-svc-annotations.md
Last active Jan 24, 2020
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
View k8s-svc-annotations.md

AWS Service annotations

  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
@miketheman
miketheman / datadog-role-delegation.tf
Last active Aug 12, 2019
Datadog AWS Integration Automated Setup
View datadog-role-delegation.tf
# Read more about variables and how to override them here:
# https://www.terraform.io/docs/configuration/variables.html
variable "aws_region" {
type = "string"
default = "us-east-1"
}
variable "shared_secret" {
type = "string"
default = "SOOPERSEKRET"
@xiongchiamiov
xiongchiamiov / why.sh
Last active Nov 28, 2019
Use this when Amazon gives you an "Encoded authorization failure message" and you need to turn it into something readable. If you only get a request id... you're out of luck.
View why.sh
function decode-authorization-failure-message {
if [ $# -ne 1 ] || [ "$1" = -h ] || [ "$1" = --help ]; then
cat <<'EOT'
Usage: decode-authorization-failure-message <message>
Use this when Amazon gives you an "Encoded authorization failure message" and
you need to turn it into something readable.
EOT
return 1
fi
You can’t perform that action at this time.