This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
userprofile_dir=$(wslpath "$(wslvar USERPROFILE)") | |
journal_dir="$userprofile_dir/Saved Games/Frontier Developments/Elite Dangerous" | |
status_file="$journal_dir/Status.json" | |
journal_credits=$(cat "$status_file" | jq -r .Balance) | |
[[ "$journal_credits" == null ]] && journal_credits=999999999 | |
# journal_system_id=$(cat "$status_file" | jq -r .Destination.System) | |
# journal_system_name=$(curl -s https://spansh.co.uk/api/system/$journal_system_id | jq -r .record.name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To give your project a unique name, this code must be | |
// placed into a .c file (its own tab). It can not be in | |
// a .cpp file or your main sketch (the .ino file). | |
#include "usb_names.h" | |
// Edit these lines to create your own name. The length must | |
// match the number of characters in your custom name. | |
#define MIDI_NAME {'S','y','n','c','a','t','r','o','n'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:<<"::CMDLITERAL" | |
@echo off | |
FOR /F "tokens=* USEBACKQ" %%F IN (`wsl wslpath '%~f0'`) DO ( | |
SET script_path=%%F | |
) | |
bash -c "'%script_path%'" | |
exit /b | |
::CMDLITERAL | |
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To give your project a unique name, this code must be | |
// placed into a .c file (its own tab). It can not be in | |
// a .cpp file or your main sketch (the .ino file). | |
#include "usb_names.h" | |
// Edit these lines to create your own name. The length must | |
// match the number of characters in your custom name. | |
#define MIDI_NAME {'R','e','n','a','m','e',' ','M','e',' ','D','u','d','e'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To give your project a unique name, this code must be | |
// placed into a .c file (its own tab). It can not be in | |
// a .cpp file or your main sketch (the .ino file). | |
#include "usb_names.h" | |
// Edit these lines to create your own name. The length must | |
// match the number of characters in your custom name. | |
#define MIDI_NAME {'C','B',' ','S','u','p','e','r',' ','L','a','u','n','c','h','k','e','y'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Settings: | |
// Tools > Board = "Teensy 4.1" | |
// Tools > USB Type to "MIDI" | |
#include <USBHost_t36.h> // access to USB MIDI devices (plugged into 2nd USB port) | |
// Create the ports for USB devices plugged into Teensy's 2nd USB port (via hubs) | |
USBHost myusb; | |
USBHub hub1(myusb); | |
MIDIDevice midiDevice(myusb); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To give your project a unique name, this code must be | |
// placed into a .c file (its own tab). It can not be in | |
// a .cpp file or your main sketch (the .ino file). | |
#include "usb_names.h" | |
// Edit these lines to create your own name. The length must | |
// match the number of characters in your custom name. | |
#define MIDI_NAME {'C', 'o', 'w', 'b', 'o', 'y', ' ', 'F', 'i', 'l', 't', 'e', 'r'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// =============================================================== | |
// Misc utilities for OpenSCAD | |
// 2022 "Cowboy" Ben Alman | |
// | |
// https://gist.github.com/cowboy/0a536021bcf1d07b2a59e808dcddd278 | |
// =============================================================== | |
// Epsilon value for merging solids | |
eps=0.001; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// =============================================================== | |
// MIDI to 24 PPQN Clock + Run (USB MIDI) - Teensy LC Firmware | |
// "Cowboy" Ben Alman, 2022 | |
// https://gist.github.com/cowboy/1af3a69d4b6cae6a099fcf76431bda02 | |
// =============================================================== | |
int PPQN = 24; | |
int RUN_PIN = 26; | |
int RUN_LED_PIN = 20; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this in the console at https://midi.amitszone.com/LPP_LIGHTSHOW_BUILDER/ | |
// to get it to work with the Launchpad Mini Mk3. It may work with other new | |
// Launchpads, I'm not sure (If it does, comment below, thanks!) | |
(() => { | |
// Create mapping of Launchpad Pro -> Mini Mk3 notes | |
// (This is only the mapping for the 8x8 grid area) | |
const noteMap = {} | |
for (let i = 1; i <= 8; i++) { | |
for (let j = 1; j <= 8; j++) { |
NewerOlder