Skip to content

Instantly share code, notes, and snippets.

View dhkatz's full-sized avatar
🏠
Working from home

David Katz dhkatz

🏠
Working from home
View GitHub Profile
@dermotbalson
dermotbalson / gist:05d444f4c4a948650589
Last active February 21, 2021 03:28
Asteroids 3D
--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
@oldo
oldo / video-metada-finder.py
Last active March 2, 2023 22:33
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.
#!/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)
#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)
@andyneff
andyneff / rokh.py
Last active August 4, 2022 08:24
Python file for parsing uasset files from Rokh
import logging
import re
import collections
import struct
from StringIO import StringIO
import codecs
import binascii
import math
import sys
@ElementW
ElementW / uexplode.py
Created January 30, 2018 20:14
Python3 script to extract music from UE4 .uexp files
#!/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
@gricard
gricard / webpack4upgrade.md
Last active February 29, 2024 20:23
Just some notes about my attempt to upgrade to webpack 4

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
@McSimp
McSimp / parse.js
Last active August 20, 2021 01:25
Test script to read data from Unreal catalog assets
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);