Skip to content

Instantly share code, notes, and snippets.

View brpowell's full-sized avatar
🦁

Bryan Powell brpowell

🦁
View GitHub Profile
@brpowell
brpowell / romsync.py
Last active March 28, 2023 23:40
Dropbox ROM syncing
# - write token and cursor to .romsync
# * update cursor every delta check
# * config file format
# token=token_string
# cursor=cursor_string
# db_roms=path_to_dropbox_roms
# local_roms=path_to_local_roms
# * upload new config to dropbox
import os
@brpowell
brpowell / hex_manipulate.py
Created April 26, 2015 05:21
Manipulating hex numbers
#
# Takes a hexidecimal number, converts it to every base between 2 and 15,
# and concatenates the result for each to a super_string. Starts at 16 and
# converts through to base-2.
#
# e.g. 0x52 --> 52575c646a75821011221452143121102100011010010
#
# Count the occurances of each character, and create a new string. The string
# contains each unique character ordered by number of occurances first, then
# ordered by value highest to lowest.
0x6515DF88F4abF5606dD12F51eB160Be66e05629C