Skip to content

Instantly share code, notes, and snippets.

@salkin-mada
salkin-mada / fetch_computer_music_journals.sh
Created March 4, 2021 10:11
download all volumes of the computer music journal
#!/bin/bash
base_dir=computer_music_journals
download_count=0
mkdir -p $base_dir && cd $base_dir
for volume in {23..43}; do
mkdir -p "volume_$volume" && cd "volume_$volume"
for issue in {1..4}; do
if [[ $volume -eq 43 ]]
then
@salkin-mada
salkin-mada / TEENSY3_USB_DESCRIPTIONS.md
Last active May 11, 2021 00:34
You want Keyboard+Midi or Keyboard+Midi+Serial USB mode in platformio?
  • add these lines
    "USB_KEYBOARD_MIDI",
    "USB_KEYBOARD_MIDI_SERIAL",

to the BUILTIN_USB_FLAGS list in /home/$USER/.platformio/platforms/teensy/builder/frameworks/arduino.py

  • and add the following two elifs to /home/$USER/.platformio/packages/framework-arduinoteensy/cores/teensy3/usb_desc.h
#elif defined(USB_KEYBOARD_MIDI)
alias sed-get-between-comments='sed -n "/\/\//,/\/\//{/\/\//b;/\/\//b;p}"'
function sed-get-between-duplicate() {
sed -n '/'$1'/,/'$1'/{/'$1'/b;/'$1'/b;p}' $2
}