Skip to content

Instantly share code, notes, and snippets.

View 0b5vr's full-sized avatar

0b5vr 0b5vr

View GitHub Profile
@0b5vr
0b5vr / config.json
Last active December 9, 2023 06:39
Bonzomatic MIDI config for Novation LaunchControl XL
{
// ...
"midi": {
"fKnobA1": 13,
"fKnobA2": 14,
"fKnobA3": 15,
"fKnobA4": 16,
"fKnobA5": 17,
"fKnobA6": 18,
"fKnobA7": 19,
@0b5vr
0b5vr / bonzo-fft.frag
Created December 7, 2023 15:13
BonzomaticのFFTを丁寧に使う
// (c) 2023 0b5vr, MIT License
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR O
@0b5vr
0b5vr / command.bat
Created September 7, 2023 13:56
Minification result of MinimalGL default shader
rem based on minify.bat
"C:\Users\0b5vr\Documents\Workspace\minimal_gl\x64\Release\shader_minifier.exe" graphics_fragment_shader.i -o graphics_fragment_shader.inl --format c-array || exit /b 5
@0b5vr
0b5vr / mod.hexpat
Created August 26, 2023 06:05
rough prototype of protracker module pattern for imhex
#include <std/io.pat>
#include <std/math.pat>
fn charString(str value) {
return value;
};
fn u16LengthInWords(u16 value) {
return 2 * value;
};
@0b5vr
0b5vr / gl-constants.js
Created March 15, 2023 19:25
GL Constants as an ESM
// SPDX-License-Identifier: CC0-1.0
// I forgot how I make this file tbh
export const GL_ACTIVE_ATTRIBUTES = 0x8b89;
export const GL_ACTIVE_TEXTURE = 0x84e0;
export const GL_ACTIVE_UNIFORM_BLOCKS = 0x8a36;
export const GL_ACTIVE_UNIFORMS = 0x8b86;
export const GL_ALIASED_LINE_WIDTH_RANGE = 0x846e;
export const GL_ALIASED_POINT_SIZE_RANGE = 0x846d;
@0b5vr
0b5vr / download.ts
Last active March 3, 2023 15:08
A deno script that downloads all files in the Slack export archive
/**
* A deno script that downloads all files in the Slack export archive
* 2023-03-03
*
* Copyright (c) 2023 0b5vr
* SPDX-License-Identifier: MIT
*
* Usage:
* - Install deno - https://deno.land/
* - `deno run --allow-read --allow-write --allow-net download.ts <export>`
@0b5vr
0b5vr / vite-shader-minifier-plugin.ts
Last active January 31, 2024 12:19
vite-shader-minifier-plugin
// vite-shader-minifier-plugin
// Copyright (c) 2022 0b5vr
// SPDX-License-Identifier: MIT
// Compatible with Shader Minifier 1.2
// https://github.com/laurentlb/Shader_Minifier/releases/tag/1.2
// Usage:
// - Make sure `shader_minifier.exe` is visible via PATH
@0b5vr
0b5vr / compeko.js
Last active April 3, 2024 03:11
compeko: pack JavaScript into a self-extracting html+deflate
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-run
// compeko - pack JavaScript into a self-extracting html+deflate
// v2.0.0
// Copyright (c) 2022-2024 0b5vr
// SPDX-License-Identifier: MIT
// Usage:
// - prepare a js code, which will be fed into `eval`
@0b5vr
0b5vr / vhs.hlsl
Last active May 26, 2023 03:58
Windows Terminal VHS Pixel Shader You Definitely Are Not Gonna Need This
/**
* (c) 2021 FMS_Cat, MIT License
* Original shader: https://www.shadertoy.com/view/MdffD7
* I dumbass don't know what it says despite it's my own shader
*/
Texture2D shaderTexture;
SamplerState samplerState;
cbuffer PixelShaderSettings {
@0b5vr
0b5vr / asdf.md
Last active February 11, 2021 12:20
mod rush couples 2 summary

Almost all scores are pad sightread

Every attempts are played in FailOff

title score misses comment
Audiovisual 85.56 10 (Actually not a sightread. The cab was malfunctioning on sightread) This is a good level. Really fun to parse the rhythms
Disgrace 56.19 (Dead) 54 It's bit too much for me. Effects and sync are cool though
END OF SYSTEM 12.30 (Dead) 194 Not fun at all
Funky Cha-Cha Part 2 46.56 5 I don't get it