Skip to content

Instantly share code, notes, and snippets.

View vagmi's full-sized avatar

Vagmi Mudumbai vagmi

View GitHub Profile
@vagmi
vagmi / hello.go
Created August 13, 2018 17:21
AS2 (RFC 4130) in Golang
package main
import (
"bytes"
"crypto"
_ "crypto/md5" // for crypto.MD5
_ "crypto/sha1" // for crypto.SHA1
_ "crypto/sha512" // for crypto.SHA384 & 512
"crypto/x509"
"encoding/asn1"
function! RandomNumber(limit)
let components = split(reltimestr(reltime()), '\.')
let microseconds = components[-1] + 0
return microseconds % a:limit
endfunction
function! RandomScheme()
let choices = []
for fname in split(globpath(&runtimepath, 'colors/*.vim'), '\n')
let name = fnamemodify(fname, ':t:r')
@vagmi
vagmi / resume.md
Last active October 13, 2022 20:51
Vagmi's Resume

Vagmi Mudumbai

Github | LinkedIn | Website | Talks | Blog

Technology leader with over 20 years of experience building software and software teams. I enjoy building software as much as I enjoy building great teams.

Skills: Go, Rust, Typescript, Postgres, Distributed Systems, TDD, Kubernetes, Docker

Tarka Labs, A division of Sedin Technologies

// A mini java http server
// courtesy http://cs.au.dk/~amoeller/WWW/examples/FileServer.java
import java.net.*;
import java.io.*;
import java.util.*;
public class FileServer
{
public static void main(String[] args)
@vagmi
vagmi / bookmarklet.js
Last active December 28, 2021 15:22
PrinceJS hacks
(function() {
document.addEventListener("keypress", function(evt) {
console.log(evt.which);
let state = Phaser.GAMES[0].state.getCurrentState();
let player = state.ui.player;
if (evt.which == 116 && player != null) {
player.addLife();
};
if (evt.which == 102 && player != null) {
player.floatFall();
@vagmi
vagmi / snowman.js
Created March 30, 2020 13:19
for oorja
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
fill('black');
circle(200,100,30);
fill('white');
circle(200,130,50);
@vagmi
vagmi / create-secret.sh
Created January 16, 2019 20:54
mysql k8s descriptors
#!/bin/bash
if [ -z "$DB_PASS" ]; then
echo "DB_PASS environment variable unset"
exit 1
fi
kubectl create secret generic mysql-pass --from-literal=password=$DB_PASS
@vagmi
vagmi / pg_application_name_patch.rb
Created May 11, 2012 06:13
Set the application name for a postgres connection in Rails 3
module ActiveRecord
module ApplicationName
def self.included(base)
unless base.respond_to? :establish_connection_with_application_name
base.extend ClassMethods
base.class_eval do
class << self
alias_method_chain :establish_connection, :application_name
end
end
@vagmi
vagmi / oklog-stateful-set.yaml
Created June 29, 2018 12:31
A stateful set to deploy oklog
---
apiVersion: v1
kind: Service
metadata:
labels:
app: oklog
name: oklog
spec:
ports:
- name: api-default

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: