This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Slugid | |
{ | |
private $bytes; | |
public function __construct($slug) | |
{ | |
if (gettype($slug) == "array") { | |
if (count($slug) != 16) { | |
throw new InvalidArgumentException("Slugid array must have 16 bytes"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import re | |
from subprocess import run | |
from argparse import ArgumentParser | |
from pathlib import Path | |
from os import environ as ENV | |
from typing import Iterable, TypeVar, Optional, List, Tuple | |
from binascii import crc32 | |
T = TypeVar("T") |