Skip to content

Instantly share code, notes, and snippets.

@orazdow
orazdow / Makefile
Last active January 2, 2020 06:13
useful makefiles
TARGET := out.exe
SRC := main.cpp
# INCLUDE = -ID:/Libraries/portaudio/include
# LIBS = -LD:/Libraries/portaudio/build
# LIBS += -lportaudio
CXX := g++
FLAGS := -pthread -Wall
@orazdow
orazdow / rb.c
Last active May 7, 2018 03:05
two ring buffers
#include "ringbuffer.h"
#include "stdlib.h"
size_t rb_push(RingBuffer* r, short* data, size_t num){
size_t written = 0;
while((r->head+1) % r->size != r->tail && written != num){
r->buffer[r->head] = *data++;
r->head = (r->head+1) % r->size;
written++;
}
@orazdow
orazdow / m_sched.c
Created May 9, 2018 00:51
pure data's main scheduler
/* Copyright (c) 1997-1999 Miller Puckette.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
/* scheduling stuff */
#include "m_pd.h"
#include "m_imp.h"
#include "s_stuff.h"
#ifdef _WIN32
@orazdow
orazdow / _webdl.bat
Last active November 16, 2020 14:16
site saving script. only _webdl.bat need (other uses cpp regex)
@echo off
rem webpage downloader: wget and sed for windows required
wget -k -E --default-page=webdl.html %1
setlocal enableDelayedExpansion
if exist webdl.html (
@orazdow
orazdow / ORazdow_resum.docx
Last active January 5, 2021 23:03
resume - click Raw to download
@orazdow
orazdow / Makefile
Last active January 2, 2020 06:22
GLFW cpp
TARGET = out
SRC = main.cpp
SRC2 = D:/Libraries/glad/src
SRC += $(SRC2)/glad.c
INCLUDE = -I D:/Libraries/glad/include
INCLUDE += -I D:/Libraries/glfw/include
LIBS = -L D:/Libraries/glfw/lib-mingw
@orazdow
orazdow / mnist.py
Created January 22, 2020 11:11
mnist
import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import load_digits
from sklearn.linear_model import LogisticRegression
digits = load_digits()
fig, ax = plt.subplots(2, 5)
plt.gray()
@orazdow
orazdow / proj.txt
Last active May 23, 2020 07:38
projects
figure out glslviewer
try jucetestbed
finish SAR
test glsl primitive shapes/colors shaders
comtinue learnopegl glm/camera/lighting/buffers
test ffmpeg filtering
learn pd object api, make pd object
make value/perlin object
revisit soundlib, try c sruct based interface, compare to juce/stk, naysaer
soudlib subpatch compiler/scheduler
@orazdow
orazdow / band.pd
Last active November 5, 2020 23:51
vocoder test
#N canvas 721 331 450 300 10;
#N canvas 114 82 474 324 bandanalysis 0;
#X obj 198 130 bp~;
#X obj 197 168 bp~;
#X obj 155 92 inlet~;
#X obj 217 74 inlet;
#X obj 199 192 env~ 1024;
#X obj 198 245 line~;
#X obj 197 272 outlet~;
#X obj 234 109 r q;
@orazdow
orazdow / hidebar-nightlight-wintop.ahk
Last active September 3, 2023 06:29
ahk script: winontop, hidebar, nightlight
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
; SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; #NoTrayIcon
#Persistent
Menu, Tray, Tip ,alt-l nightlight`nctl-alt-b hidebar`nctl-alt-up winontop