Skip to content

Instantly share code, notes, and snippets.

View cfdrake's full-sized avatar

Colin Drake cfdrake

View GitHub Profile
@cfdrake
cfdrake / j2objc-ios-17-issue.swift
Created June 26, 2023 14:46
j2objc iOS 17 issue
// On iOS 16 I see that the reader indicates it is ready, the stream has 10 characters
// available to read, and the loop executes printing each character out line by line.
//
// With no changes, on iOS 17 beta I see that the reader indicates it is ready, the first
// byte is read, but the loop only executes once printing 65533 and exiting.
func testDecodeStream() {
let testString = "{testtest}"
let data = testString.data(using: .utf8)
let byteArray = IOSByteArray(nsData: data)
let stream: JavaIoInputStream = JavaIoByteArrayInputStream(byteArray: byteArray)
@cfdrake
cfdrake / liteplus.lua
Created August 11, 2021 19:43
wrms + passersby
--
-- wrms/lite
--
-- simple stereo delay & looper
--
-- version 2.0.0 @andrew
-- https://norns.community/
-- authors/andrew/
-- wrms#wrmslite
--
@cfdrake
cfdrake / rasterbars.asm
Last active June 7, 2021 03:47
c64 rasterbars wip
processor 6502
MACRO DELAY ;; {1} - loop iterations
ldx {1}
.loop:
dex
bne .loop
ENDM
MACRO RASTER ;; {1} - background color to set
-- FM7 Polyphonic Synthesizer
-- With 6 Operator Frequency
-- And wrms
-- Modulation
-- ///////////////////////////
-- key 2: random phase mods
-- key 3: play a random note
-- ///////////////////////////
-- grid pattern player:
-- 1-16 1 high voice
-- mouse
-- by @cfd90
MusicUtil = require "musicutil"
hs = require('awake/lib/halfsecond')
engine.name = "PolyPerc"
last_x = 4
last_y = 4
@cfdrake
cfdrake / 64.lua
Created January 28, 2021 16:49
glut-64
-- glut64
--
-- granular sampler in progress
-- (currently requires a grid)
--
-- trigger voices
-- using grid rows 2-8
--
-- mute voices and record
-- patterns using grid row 1
@cfdrake
cfdrake / vimeo.txt
Created December 13, 2020 03:30
Angel Tears Forever Vimeo Embeds
{{< top-aligned-video id="477427614" height="518" img="https://i.vimeocdn.com/video/1014202042_480.jpg" >}}
{{< top-aligned-video id="476969261" height="518" img="https://i.vimeocdn.com/video/1014202292_480.jpg" >}}
{{< top-aligned-video id="476969354" height="395" img="https://i.vimeocdn.com/video/1014202537_480.jpg" >}}
{{< top-aligned-video id="476969093" height="405" img="https://i.vimeocdn.com/video/1014202968_480.jpg" >}}
{{< top-aligned-video id="477431886" height="425" img="https://i.vimeocdn.com/video/1014203384_480.jpg" >}}
{{< top-aligned-video id="477431946" height="464" img="https://i.vimeocdn.com/video/1014203733_480.jpg" >}}
{{< top-aligned-video id="476969177" height="392" img="https://i.vimeocdn.com/video/1014204029_480.jpg" >}}
{{< top-aligned-video id="476969250" height="459" img="https://i.vimeocdn.com/video/1014204280_480.jpg" >}}
{{< top-aligned-video id="476969148" height="381" img="https://i.vimeocdn.com/video/1014205021_480.jpg" >}}
{{< top-aligned-video id="477431987" height="360" im
void setup() {
// Set window size.
size(600, 600);
// Use for high def monitors.
pixelDensity(2);
// Turn off looping draw(), only run once.
noLoop();
}
@cfdrake
cfdrake / focused.css
Last active April 21, 2017 21:41
"Focused" Theme for Standard Notes
/* Dim tags in editor view. */
#editor-title-bar .editor-tags .tags-input {
color: rgba(0,0,0,0.23) !important;
}
/* Hide note previews in list view. */
.app .notes .note .note-preview {
display: none !important;
}
@cfdrake
cfdrake / gaggia.md
Created April 2, 2017 23:31
Operating the Gaggia Classic

Gaggia Classic

Buttons

  • Left: POWER
    • Lights up when ON.
  • Middle: ESPRESSO/STEAM MODE TOGGLE
    • Up is espresso mode, down is steam mode.
  • Right: BREW
    • Will light up when the machine is ready/warmed up enough to perform the operation that the MODE button is in. The light does not mean that it is "on" or doing anything per-se, but rather "ready".