Skip to content

Instantly share code, notes, and snippets.

@kig
kig / changelist.js
Created August 13, 2013 11:07
ChangeList library to do OT on JSON and Strings.
var ChangeList = {};
if (typeof module !== 'undefined') {
module.exports = ChangeList;
}
// Creates a new change list struct.
//
ChangeList.create = function(type) {
var type = type || ChangeList.Object;
@TACIXAT
TACIXAT / cutout.py
Last active July 17, 2024 22:47
Python OpenCV command line implementation for Photoshop's Cutout Filter
import cv2
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt
import numpy as np
import random
import argparse
# big thanks to this answer for the sketch
# https://stackoverflow.com/a/63647647/1176872
@adtac
adtac / Dockerfile
Last active November 1, 2024 03:05
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3