Skip to content

Instantly share code, notes, and snippets.

View tecteun's full-sized avatar
💭
🤠

tecteun

💭
🤠
View GitHub Profile
@tecteun
tecteun / unoclock.ino
Last active October 7, 2025 20:22
Arduino UNO eurorack clock sync multiplier/division tool
// Generated by GPT-5 with some help from humans
// === External clock div/mult generator with per-channel Swing, EEPROM, and LCD menu ===
// - Clock IN: D2 (FALLING edge)
// - Clock OUTs: D3, D11, D12, D13 (avoid D10; common LCD shields use D10 for backlight)
// - Each output: Numerator (Mul: x1..x8), Denominator (Div: /1..16), Swing% (0..75%)
// - Pulses are ~1 ms wide, shaped by TIMER0_COMPA ISR (~1 kHz)
// - EEPROM autosave 1 s after changes; global phase reset with long-press SELECT (~700 ms)
//
// Libraries required:
// SpinTimer: https://github.com/dniklaus/spin-timer
@tecteun
tecteun / midi_seed_pio_usb_rp2040.ino
Last active October 10, 2025 13:46
XIAO MIDI Synthesizer RP2040 USB midi HOST/DEVICE hybrid
// be sure to run at / enable 240mhz
// enable operating system "FreeRTOS"
// otherwise it crashes somewhere, after few minutes
/*********************************************************************
MIT license, check LICENSE for more information
Copyright (c) 2023 rppicomidi
Modified from device_info.ino from
https://github.com/sekigon-gonnoc/Pico-PIO-USB/blob/main/examples/arduino/device_info/device_info.ino
2nd Copyright notice below included per license terms.
*********************************************************************/
@tecteun
tecteun / midi_seed_rp2040.ino
Created July 18, 2025 19:33
XIAO MIDI Synthesizer RP2040 USB midi
#include <Arduino.h>
#include <Adafruit_TinyUSB.h>
#include <MIDI.h>
#include "SAM2695Synth.h"
#include <SoftwareSerial.h>
SoftwareSerial SSerial(D7, D6); // RX, TX
#define COM_SERIAL SSerial
SAM2695Synth<SoftwareSerial> synth = SAM2695Synth<SoftwareSerial>::getInstance();
@tecteun
tecteun / utc.sh
Created November 22, 2024 10:05
UTC timestamps unix
date -u +"%Y-%m-%dT%H:%M:%S.000"
#Shows current UTC
date -u --date="+30 seconds" +"%Y-%m-%dT%H:%M:%S.000"
#Shows current UTC +30sec
date -u --date="-30 seconds" +"%Y-%m-%dT%H:%M:%S.000"
#Shows current UTC -30sec
@tecteun
tecteun / ip.js
Created June 15, 2023 11:21
get ip js
var now = Date.now();
var s = document.createElement('script'); s.onload = s.onerror = () => s.parentElement.removeChild(s);
window[`_ip_${now}`] = (_) => console.log(_.data.ip);
s.src = `https://stat.ripe.net/data/whats-my-ip/data.json?callback=_ip_${now}`;
document.body.appendChild(s)
@tecteun
tecteun / corsproxypatch.patch
Created August 8, 2022 10:02
flutter tool cors patch
diff --git a/packages/flutter_tools/lib/src/isolated/devfs_web.dart b/packages/flutter_tools/lib/src/isolated/devfs_web.dart
index e9fd1d07b6..5e6c648962 100644
--- a/packages/flutter_tools/lib/src/isolated/devfs_web.dart
+++ b/packages/flutter_tools/lib/src/isolated/devfs_web.dart
@@ -17,6 +17,7 @@ import 'package:mime/mime.dart' as mime;
import 'package:package_config/package_config.dart';
import 'package:shelf/shelf.dart' as shelf;
import 'package:shelf/shelf_io.dart' as shelf;
+import 'package:shelf_proxy/shelf_proxy.dart';
import 'package:vm_service/vm_service.dart' as vm_service;
@tecteun
tecteun / main.dart
Last active July 12, 2022 09:40
scrolling ribbon
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
@tecteun
tecteun / main.dart
Last active May 3, 2022 13:16
big scroll test
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(
MyApp(
items: List<String>.generate(130, (i) => 'Item $i'),
),
);
}
@tecteun
tecteun / unosyncer.ino
Created February 1, 2021 23:07
DIY Arduino Eurorack clock divider / multiplier using interrupt
// Timer library, https://github.com/dniklaus/wiring-timer,
// add it by using the Arduino IDE Library Manager (search for wiring-timer)
#include <Timer.h>
// LcdKeypad, https://github.com/dniklaus/arduino-display-lcdkeypad,
// add it by using the Arduino IDE Library Manager (search for arduino-display-lcdkeypad)
#include <LcdKeypad.h>
@tecteun
tecteun / steam.sh
Last active December 26, 2020 19:15
steam proton config stash
# Improving proton performance:
# https://www.protondb.com/help/improving-performance
# Feral Gamemode:
# https://launchpad.net/~samoilov-lex/+archive/ubuntu/gamemode
ENABLE_VK_LAYER_VALVE_steam_fossilize_1=1 DXVK_STATE_CACHE=0 PROTON_NO_GLSL=0 PROTON_USE_D9VK=1 PROTON_NO_ESYNC=0 DXVK_ASYNC=1 %command% --waitforpreload --noasync --nodx9ex --gc2 --nologo