Skip to content

Instantly share code, notes, and snippets.

View lokimeyburg's full-sized avatar
:shipit:
2022 resolution: learn Typescript and GraphQL

Loki Meyburg lokimeyburg

:shipit:
2022 resolution: learn Typescript and GraphQL
View GitHub Profile
@philfreo
philfreo / stripe_rev.py
Last active December 17, 2015 03:28
Calculate how much active/current subscription revenue you have for all your Stripe customers, considering discounts, trials, etc.
from __future__ import division
import collections
from texttable import Texttable
by_status = collections.defaultdict(list)
per_page = 100
offset = 0
while True:
@matthewrobertson
matthewrobertson / gist:4053020
Last active October 12, 2015 16:08
GIT delete all local merged branches
git branch --merged | grep -v 'master$' | xargs git branch -d
@mloughran
mloughran / pubsub_example.rb
Created September 14, 2011 15:05
em-hiredis pubsub example
require 'em-hiredis'
EM.run {
require 'em-hiredis'
redis = EM::Hiredis.connect
# If you pass a block to subscribe it will be called whenever a message
# is received on this channel
redis.pubsub.subscribe('foo') { |msg|
p [:received_foo, msg]