Skip to content

Instantly share code, notes, and snippets.

@ianoxley
ianoxley / base58.py
Created March 11, 2011 14:00
base58 encoding in Python
""" base58 encoding / decoding functions """
import unittest
alphabet = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'
base_count = len(alphabet)
def encode(num):
""" Returns num in a base58-encoded string """
encode = ''
@mxriverlynn
mxriverlynn / 1-ModelWithChangedEvents.js
Created June 15, 2011 03:12
simple backbone.js examples
var SomeModel = Backbone.Model.extend({});
someModel = new SomeModel();
someModel.bind("change", function(model, collection){
alert("You set some_attribute to " + model.get('some_attribute'));
});
someModel.set({some_attribute: "some value"});
@shane-c
shane-c / template-openstack-interfaces.cfg
Last active December 14, 2017 07:19
template for /etc/network/interfaces/openstack-interfaces.cfg
# VXLAN - Management
auto vxlan-mgmt
iface vxlan-mgmt inet manual
pre-up ip link add vxlan-mgmt type vxlan id 10 group 239.0.0.10 dev em1 || true
up ip link set \$IFACE up
down ip link set \$IFACE down
post-down ip link del vxlan-mgmt || true
# VXLAN - VXLAN
auto vxlan-vxlan