Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

David Katz dhkatz

🏠
Working from home
View GitHub Profile
@McSimp
McSimp / parse.js
Last active Aug 20, 2021
Test script to read data from Unreal catalog assets
View parse.js
const fs = require('fs');
class DataReader {
constructor(data, context) {
this.data = data;
this.context = context;
this.offset = 0;
}
readInt32LE() {
const result = this.data.readInt32LE(this.offset);
@gricard
gricard / webpack4upgrade.md
Last active Jun 3, 2021
Just some notes about my attempt to upgrade to webpack 4
View webpack4upgrade.md

If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
@ElementW
ElementW / uexplode.py
Created Jan 30, 2018
Python3 script to extract music from UE4 .uexp files
View uexplode.py
#!/usr/bin/env python3
import sys, os, errno
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc:
if exc.errno == errno.EEXIST and os.path.isdir(path):
pass
@andyneff
andyneff / rokh.py
Last active Aug 4, 2022
Python file for parsing uasset files from Rokh
View rokh.py
import logging
import re
import collections
import struct
from StringIO import StringIO
import codecs
import binascii
import math
import sys
View PathFinder.cpp
#include <vector>
#include <algorithm>
#include "PathFinder.hpp"
namespace pft
{
std::vector <sf::Vector2i>
PathFinder::aStar(sf::Vector2i from, sf::Vector2i to, TileGrid& grid, sf::RenderWindow& window)
@oldo
oldo / video-metada-finder.py
Last active May 19, 2022
A python function utilising `ffprobe` to find any metadata related to a video file. Examples of what it can find include bitrate, fps, codec details, duration and many more. This gist returns the video height and width as an example.
View video-metada-finder.py
#!/usr/local/bin/python3
import subprocess
import shlex
import json
# function to find the resolution of the input video file
def findVideoMetada(pathToInputVideo):
cmd = "ffprobe -v quiet -print_format json -show_streams"
args = shlex.split(cmd)
args.append(pathToInputVideo)
View gist:05d444f4c4a948650589
--Three D asteroids
--The comments below are aimed at a wide variety of users
--They may be too detailed or not detailed enough, I do my best!
--Comments and questions to ignatz on the Codea forum
--There is a lot of setup work to do, but note how it's packaged into separate functions to keep tidy
function setup()
Settings() --general settings
ast={} --table of asteroids to show on screen
FPS=60 --frame rate, to check it's not too slow