Skip to content

Instantly share code, notes, and snippets.

@KushalP
KushalP / Makefile
Created October 6, 2017 11:27
Example of how I like to use dep, make, and golang
BINARY := service-versions # This is whatever you want to name the binary
all: build
deps:
dep ensure
build: deps
go build -o $(BINARY)
@KushalP
KushalP / redis.yml
Created September 27, 2017 15:49
Example of how to set up a redis cluster in kubernetes. To apply: `kubectl create -f redis.yml` Raw
---
apiVersion: v1
kind: ConfigMap
metadata:
name: redis-cluster
labels:
app: redis-cluster
data:
redis.conf: |+
cluster-enabled yes

Keybase proof

I hereby claim:

  • I am KushalP on github.
  • I am kushalp (https://keybase.io/kushalp) on keybase.
  • I have a public key whose fingerprint is 1377 AE6A 7099 D218 A2D2 B362 2E27 39B8 09E5 8708

To claim this, I am signing this object:

@KushalP
KushalP / pink_number.cc
Last active November 9, 2015 17:28
Annotated some of the source of code that exists here: http://www.firstpr.com.au/dsp/pink-noise/#Voss I've annotated using multiline code blocks that are surrounded with /** and */
#include <iostream>
#include <stdlib.h>
class PinkNumber {
private:
int max_key;
int key;
unsigned int range;
unsigned int white_values[5];

Keybase proof

I hereby claim:

  • I am KushalP on github.
  • I am kushalp (https://keybase.io/kushalp) on keybase.
  • I have a public key whose fingerprint is 3FB4 8ECC 5BE5 633F 3C12 7710 599F 6341 5239 F653

To claim this, I am signing this object:

Practical / Tactical

Be on time to meetings or alert an hour ahead of time if you'll be late

Meetings need a goal and a runner to get that goal accomplished

Defend your time from distractions and use it effectively on moving product forward

Prefer Slack over email over in person interruptions over a set block of time

@KushalP
KushalP / vat_rate.py
Created June 9, 2015 14:47
A small script to add the VAT rate to the open register. It requires the python-requests library to be installed: http://docs.python-requests.org/en/latest/
import json
import requests
import os
class OpenRegister(object):
def __init__(self, endpoint):
self.endpoint = endpoint
def create(self, data):
@KushalP
KushalP / client.js
Last active August 29, 2015 14:22
Artefacts from the Open Register hack day. These are the bits of JavaScript I made on the day.
(function() {
var jQuery = window.$;
var OpenRegister = function(endpoint) {
this.endpoint = endpoint;
};
OpenRegister.prototype.buildURL = function(path) {
return this.endpoint + path + ".json?_callback=?";
};
class UserInput {
public static void main(String[] args) {
// Create a two dimensional array to hold user input. Using
// a boolean because we only care about there being
// "user input" present or not.
boolean[][] inputs = new boolean[18][28];
// Set some values to show where user input has been triggered.
inputs[1][17] = true;
inputs[5][4] = true;
@KushalP
KushalP / keybase.md
Created September 25, 2014 21:42
Verify GitHub identity for Keybase

Keybase proof

I hereby claim:

  • I am KushalP on github.
  • I am kushalp (https://keybase.io/kushalp) on keybase.
  • I have a public key whose fingerprint is 0608 71FD E634 9BFA 658D 535B 0ED0 AB97 314D 1107

To claim this, I am signing this object: