Skip to content

Instantly share code, notes, and snippets.

View GregBrimble's full-sized avatar

Greg Brimble GregBrimble

View GitHub Profile
@colecrouter
colecrouter / preview.png.ts
Last active March 20, 2022 07:48
ES6 janky png editing NO CANVAS Cloudflare Workers/Pages Functions
import { Inventory, Item, SharedKit } from '../types/kit';
import { decode, encode, toRGBA8 } from 'upng-js';
let MCTEXTURES: Textures;
const INV_WIDTH = 181;
const INV_HEIGHT = 115;
const ITEM_WIDTH = 32;
const ITEM_HEIGHT = 32;
@surma
surma / README.md
Last active January 4, 2025 01:26
webpack-emscripten-wasm

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@remojansen
remojansen / class_decorator.ts
Last active September 14, 2023 14:54
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}