Skip to content

Instantly share code, notes, and snippets.

@zhuowei
zhuowei / unpackpdx.py
Last active January 2, 2024 10:43
Unpacks a .pdx/.pdz file from the PlayDate
import sys
import os
import zlib
with open(sys.argv[1], "rb") as infile:
indata = infile.read()
magic = b"Playdate PDX\0\0\0\0"
magic_new = b"Playdate PDZ\0\0\0\0"
if not indata[0:len(magic)] in [magic, magic_new]:
@HactarCE
HactarCE / README.md
Last active December 24, 2023 15:28
Factorio blueprint book list

This is just a collection of useful Factorio blueprint books I have either found online or made myself. (Links are included where applicable.) I recommend using this Chrome extension to quickly copy these into Factorio.

All blueprints use blue belts unless stated otherwise.

See also:

@evanscottgray
evanscottgray / docker_kill.sh
Last active November 7, 2023 03:40
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt
@ollym
ollym / gist:1662767
Created January 23, 2012 12:08
ECMA5 Object Cloning
Object.clone = function(obj) {
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyNames(obj).reduce(function(memo, name) {
return (memo[name] = Object.getOwnPropertyDescriptor(obj, name)) && memo;
}, {}));
}