Skip to content

Instantly share code, notes, and snippets.

View davemacdo's full-sized avatar

David MacDonald davemacdo

View GitHub Profile
@davemacdo
davemacdo / read via WSU.js
Created January 10, 2023 01:58
read via WSU bookmarklet
javascript:(function() {
var currentUrl = window.location.href;
var urlParts = currentUrl.split('/');
var subdomain = urlParts[2].replace(/\./g, '-');
window.location.href = 'https://' + subdomain + '.proxy.wichita.edu/' + urlParts.slice(3).join('/');
})();
@davemacdo
davemacdo / Dropkick to v3.scpt
Created April 13, 2017 14:18
Copy-paste columns from Numbers (or Excel) to v3 webform
// Input from clipboard formatted in two columns: | Grade | HTML comment |
// Pastes into the v3 form
function run(input, parameters) {
currentApp = Application.currentApplication();
se = Application("System Events");
currentApp.includeStandardAdditions = true;
clip = currentApp.theClipboard();
@davemacdo
davemacdo / even-tuning.ck
Created June 4, 2016 15:01
Calculate frequencies for even octave divisions in ChucK
SinOsc s => dac; // could be any unit generator
440.0 => float baseFreq; // starting frequency
5.0 => float divs; // number of even divisions of the octave
1 => int i; // number of steps above base
// Playtest
// baseFreq => s.freq; // play base freq
// 1::second => now;