Skip to content

Instantly share code, notes, and snippets.

@sampowers
sampowers / xsbackup.pl
Created January 3, 2011 19:47
XenServer backup script
#!/usr/bin/perl
use POSIX qw(strftime);
use Data::Dumper;
sub timestamp { return strftime("%H:%M:%S", localtime(time)); }
sub datestamp { return strftime("%b %d", localtime(time)); }
sub l {
my ($msg) = shift;
printf("$0: %s %s $msg\n", datestamp(), timestamp());
@sampowers
sampowers / catgame.sh
Created January 20, 2011 04:13
a game to play with your cats
#!/bin/sh
while read; do eject ; read ; eject -t ; done

A Gopher Rising

Inspired by Maya Angelou's Still I Rise

You may walk through my GitHub history,
With it’s non idiomatic and fragal lines,
You may value me less than dirt,
But still, like dust, I’ll rise.
@mgoodness
mgoodness / helm-rbac.md
Last active October 30, 2021 17:04
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
@Joaquin6
Joaquin6 / greetings.js
Created May 16, 2017 08:46
JSON file containing multiple ways of saying "Hello"
module.exports = [{
code: 'AD',
name: 'Andorra',
greeting: 'Hola'
}, {
code: 'AE',
name: 'United Arab Emirates',
greeting: 'Marhaba'
}, {
code: 'AF',