Skip to content

Instantly share code, notes, and snippets.

View danielmoniz's full-sized avatar

danielmoniz

  • Toronto, ON, Canada
View GitHub Profile
@PixnBits
PixnBits / md5.js
Last active August 31, 2024 22:27 — forked from jhoff/md5.js
invalid reference fix
/*
* http://www.myersdaily.org/joseph/javascript/md5-text.html
*/
(function (global) {
var md5cycle = function (x, k) {
var a = x[0],
b = x[1],
c = x[2],
d = x[3];
@argusdusty
argusdusty / parse_rb_updates.py
Created October 8, 2017 20:16
Converts Rocket League rattletrap replay JSON data into only rigid body updates in an easier-to-use format
# Filters rattletrap replay JSON data into only rigid body updates in an easier-to-use format
def parseRBupdates(data):
playerNameMap = dict() # real_actor_id -> player_name
ballId = 0 # actor_id int - set later in the code (hopefully)
actorIdMap = dict() # temp_actor_id -> real_actor_id
rigidBodyUpdates = []
for frame_number, frame in enumerate(data['content']['frames']):
for i, replication in enumerate(frame['replications']):
actorId = replication['actor_id']['value']
if 'spawned_replication_value' in replication['value']: # Spawned something