Skip to content

Instantly share code, notes, and snippets.

View geemus's full-sized avatar

Wesley Beary geemus

View GitHub Profile
module Base
module_function
BASE_CHARACTERS = '0123456789BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz'
def encode(int)
str = ''
while int > 0
character = int % BASE_CHARACTERS.length
int = int / BASE_CHARACTERS.length
str = BASE_CHARACTERS[character..character] + str