A hands-on introduction to live-coded music in the browser
Strudel is a JavaScript-derived live-coding environment that lets you make music directly in a browser REPL. Each snippet you evaluate becomes part of a real-time musical texture.
| // ==UserScript== | |
| // @name Ctrl Drag Crop + Auto Scroll (Anchored) | |
| // @namespace https://un4ckn0wl3z.dev/tm/crop-links-scroll-fixed | |
| // @version 1.3 | |
| // @description Ctrl + drag to crop, auto-scroll with anchored start point | |
| // @match *://*/* | |
| // @grant GM_setClipboard | |
| // ==/UserScript== | |
| (function () { |
| class Vec3 { | |
| constructor(x, y, z) { | |
| this.x = x; | |
| this.y = y; | |
| this.z = z; | |
| } | |
| add(v) { | |
| this.x += v.x; | |
| this.y += v.y; |
| class Vec3 { | |
| constructor(x, y, z) { | |
| this.x = x; | |
| this.y = y; | |
| this.z = z; | |
| } | |
| add(v) { | |
| this.x += v.x; | |
| this.y += v.y; |
| @Injectable({scope: Scope.DEFAULT}) | |
| export class EventSchedulerService { | |
| private appName: string | |
| constructor( | |
| ) { | |
| } | |
| @Cron(CronScheduleEnum.TaskSchedule1) // <--- this caused warning | |
| async handleTaskSchedule() { |
| // ip-logger.js | |
| // Simple IP logger using Express | |
| // Run: node ip-logger.js | |
| // Requires: npm install express | |
| const express = require('express'); | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const PORT = process.env.PORT || 3000; |
| const http = require('http'); | |
| // Sample predefined JSON array (100 records for example) | |
| const data = Array.from({ length: 100000 }, (_, i) => ({ | |
| id: i + 1, | |
| name: `Item${i + 1}`, | |
| value: Math.random().toFixed(4) | |
| })); | |
| // Async generator to yield CSV chunks from JSON array |
| ffmpeg -i input.mp4 -filter:a loudnorm output.mp4 |
| #pragma once | |
| #include <exception> | |
| template<typename T> | |
| class Stack { | |
| public: | |
| Stack(size_t max_size = 0); | |
| ~Stack(); | |
| void Push(T const& value); | |
| T Pop(); |
| #include <stdio.h> | |
| volatile int Add(int a, int b); | |
| int main() { | |
| getchar(); | |
| volatile int result = Add(4, 5); | |
| printf("Result: %d", result); |