Skip to content

Instantly share code, notes, and snippets.

View sloev's full-sized avatar
https://www.buymeacoffee.com/sloev

sloev sloev

https://www.buymeacoffee.com/sloev
View GitHub Profile
@sloev
sloev / foo.h
Last active November 18, 2025 15:31
#ifndef OF_BILINEAR_WARP_H
#define OF_BILINEAR_WARP_H
#include "ofMain.h"
#include "uid.h"
#include <algorithm>
#include <unordered_set>
#include "textures.h"
class ofBilinearWarp
@sloev
sloev / md5.h
Last active November 6, 2025 10:05
// md5.hpp
// ---------------------------------------------------------------
// Header-only MD5 implementation (public domain)
// Source: https://github.com/Chocobo1/Hash/blob/master/src/md5.h
// ---------------------------------------------------------------
#ifndef MD5_HPP
#define MD5_HPP
#include <array>
#include <cstdint>
@sloev
sloev / ip.h
Created October 30, 2025 14:57
cpp get local lan ip and broadcast address
// preferred_ip_broadcast.hpp
// ------------------------------------------------------------
// Portable C++17 header-only library
// Returns:
// * preferred outbound IPv4 address
// * broadcast address of the same subnet
// ------------------------------------------------------------
#pragma once
#include <string>
// paulstretch.js
// Copyright (C) 2014 Sébastien Piquemal
// Copyright (C) 2006-2011 Nasca Octavian Paul
import * as utils from './utils.js'
import * as blockHelpers from './block-helpers.js'
import * as arrayHelpers from './array-helpers.js'
export class PaulStretch {
@sloev
sloev / Dockerfile
Created January 16, 2025 19:41
docker build openframeworks
FROM ubuntu:22.04 as base
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR /src
RUN apt-get update && \
apt-get remove libunwind-14 -y && \
apt-get install -y \
wget git lsb-release apt-utils unzip sudo
@sloev
sloev / main.kt
Last active December 17, 2024 10:05
quad texture mapping
import org.openrndr.application
import org.openrndr.draw.*
import org.openrndr.ffmpeg.VideoPlayerConfiguration
import org.openrndr.ffmpeg.VideoPlayerFFMPEG
import org.openrndr.math.Polar
import org.openrndr.math.Vector2
import org.openrndr.math.Vector3
import kotlin.math.sin
import org.openrndr.ffmpeg.PlayMode
import org.openrndr.math.mix
@sloev
sloev / gist:8554e028ef8f7ccc942222b047b2525d
Created March 1, 2024 10:32
realtime microphone to spectrogram to imagehash
import ffmpeg
import numpy as np
import cv2
import sys
# pip install ffmpeg-python
# pip install opencv-python
# pip install opencv-contrib-python
@sloev
sloev / index.js
Created February 29, 2024 12:05
microphone to spectrogram to phash realtime using ffmpeg and nodejs
import Pipe2Pam from 'pipe2pam';
import process from 'node:process';
import {spawn} from 'child_process';
import imghash from 'imghash';
let counter = 0;
const params = [
'-loglevel',
@sloev
sloev / gist:52f79e0b3923de439257e97aed7a7da4
Last active January 13, 2024 17:03
install windows / linux on lenovo x131e chromebooks
1. open up computer and flip write switch to not-write protected
remove battery from chromebook
remove power
add power
hold esc+refresh while powering on computer
go through and press enter
power off
power on
ctrl+d
wait for dev transitioning
https://www.myfonts.com/products/modern-twenty-atmodern-twenty-342197
https://render.myfonts.net/fonts/font_rend.php?id=329faf6da65317e72cd89ca34784223f&rt=You%20Make%20Me%20Smile&rs=5000&w=40000&rbe=&sc=2&nie=true&fg=94CC65&bg=000000&ft=&nf=1