Skip to content

Instantly share code, notes, and snippets.

View chrahunt's full-sized avatar

Chris Hunt chrahunt

View GitHub Profile
@chrahunt
chrahunt / webp.js
Created November 23, 2016 02:27
Attempted whammy rewrite. Unusable.
/**
* Generates a WebM video from an array of WebP images by making all
* of them key frames.
* For references, see:
* * WebP container format: https://developers.google.com/speed/webp/docs/riff_container
* * VP8 spec: https://datatracker.ietf.org/doc/rfc6386/?include_text=1
* * EBML guide: https://matroska-org.github.io/libebml/specs.html
*
* To use in the browser, compile and pass to Blob constructor:
* blob = new Blob(video.compile(), { type: "video/webm" });
@chrahunt
chrahunt / convert.js
Created December 13, 2016 02:19
Convert replays
const {ArgumentParser} = require('argparse');
const glob = require('glob');
const fs = require('fs');
const {round10} = require('round10');
function main() {
let parser = new ArgumentParser({ description: "minify replay files."});
parser.addArgument('glob');
let args = parser.parseArgs();
let stats = [];
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chrahunt
chrahunt / ClientLibrary.py
Created September 8, 2018 13:56
Websocket test library example.
import asyncio
import functools
import inspect
import os
import re
import subprocess
import sys
import threading

Output of inspect.is* for all members of

class Example:
 @property
 def _property(self):
  pass
 async def _coroutine(self):
  pass
 async def _coroutinegen(self):
@chrahunt
chrahunt / README.md
Last active September 10, 2019 13:15
Python installation candidate handling

states.yml lists some possible states we can consider for installable candidates and how we can create new artifacts that give us more information during the installation process.

Conventions:

  1. If no action applies, than it's a failure
  2. If no conditional state within an action applies, then it's a failure

One possible implementation may look like: