Skip to content

Instantly share code, notes, and snippets.

@drubin
drubin / Dockerfile
Created November 9, 2018 13:00
Garden Demo Bug
FROM nginx:1.15.6-alpine
@drubin
drubin / cordon-drain-pool
Last active May 3, 2022 14:21
Cordon and Drain GKE Node pools
#!/bin/bash -e
# Cordons and drains a node pool
display_usage() {
echo "Cordons and drains a nodepool"
echo -e "\nUsage:\n ./cordon-drain-pool [nodepool-name] "
echo -e " ./cordon-drain-pool pool-1 \n"
}
if [ $# -le 1 ]
then
@drubin
drubin / fetchkeys.js
Created October 24, 2017 17:31 — forked from voxpelli/fetchkeys.js
Check the ssh key length of specified users
// Replace this list with the result of to-run-on-org-page.js
// And remember to do an "npm install"
var users = ["voxpelli"];
var https = require('https');
var fs = require('fs');
var exec = require('child_process').exec;
var tmp = require('temporary-directory')
var cuid = require('cuid');
var chalk = require('chalk');
@drubin
drubin / keybase.md
Created August 16, 2017 08:36
keybase.md

Keybase proof

I hereby claim:

  • I am drubin on github.
  • I am drubin (https://keybase.io/drubin) on keybase.
  • I have a public key ASCwI3b0bW5U2DpOQGjQIeLERt1Mbwzlo1nuz0r4aWBNgQo

To claim this, I am signing this object:

@drubin
drubin / Commands.md
Last active April 24, 2017 05:48
Useful git commands

Clean remote branches

git remote prune origin 

Clean branches already merged into master

git checkout master
for k in $(git branch -a --merged|grep -v "\->"|sed s/^..//);do echo -e $(git branch -d "$k");done