Skip to content

Instantly share code, notes, and snippets.

View 2xAA's full-sized avatar
👨‍💻
doin a code

Sam Wray 2xAA

👨‍💻
doin a code
View GitHub Profile
@2xAA
2xAA / LSDJprep.py
Last active June 23, 2016 20:58
Double the speed of LSDJ samples that are over 2.843 seconds, but less than double that for valid sample lengths with the LSD-Patcher for LSDJ.
import wave
import os
import glob
import contextlib
Change_RATE = 2
EXPORT_DIR = './LSDJprep/'
VALID_RESPONSES = ('yes', 'y')
# the maximum length file LSDJ can have in a kit

Keybase proof

I hereby claim:

  • I am 2xaa on github.
  • I am 2xaa (https://keybase.io/2xaa) on keybase.
  • I have a public key ASDZQDteqVvIDn72TPLh-P2u1Ta9za3iJ2KGroh8KJ7SRAo

To claim this, I am signing this object:

@2xAA
2xAA / iterm-colors-to-vscode.js
Last active September 23, 2024 20:51
Convert iTerm2 "itermcolors" file to VSCode terminal color scheme
/* Generate colors using: `plutil -convert json` in your terminal */
const col = [] // run your .itermcolors file through the above parser and replace the array with the output
function componentToHex(c) {
const hex = c.toString(16)
return hex.length === 1 ? `0${hex}` : hex
}
const mapping = {
'terminal.background':'Background Color',
{
"meta": {
"theme": "wraypro"
},
"basics": {
"name": "Sam Wray",
"label": "Creative Technologist",
"picture": "https://wray.pro/assets/thumb/about.jpg",
"email": "[email protected]",
"phone": "(+44)7561557458",
@2xAA
2xAA / Standard-DoubleSided.shader
Created January 17, 2020 13:01 — forked from jminor/Standard-DoubleSided.shader
Unity Standard-DoubleSided.shader
Shader "Standard-DoubleSided"
{
Properties
{
_Color("Color", Color) = (1,1,1,1)
_MainTex("Albedo", 2D) = "white" {}
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5
@2xAA
2xAA / m8s JSON.json
Last active September 27, 2020 23:46
No Instruments, effects, mixer and incomplete project settings
This file has been truncated, but you can view the full file.
{
"M8 Version Header": {
"value": "M8VERSION\u00002100",
"label": null
},
"Project File Directory": {
"value": "/Songs/",
"label": null
},
"Project Transpose": {
@2xAA
2xAA / genmdm-alt.ino
Created October 1, 2021 11:09
Alternate firmware for genMDM devices to work as a Port 2 Serial cable for rhargreaves/mega-drive-midi-interface
#include <SoftwareSerial.h>
SoftwareSerial softSerial(11, 2);
void setup()
{
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for Native USB only
}
@2xAA
2xAA / genmdm-alt-usb-midi.ino
Last active October 5, 2021 21:22
Alternate firmware for genMDM devices to work as a Port 2 Serial cable for rhargreaves/mega-drive-midi-interface without Hairless MIDI Bridge
#include <SoftwareSerial.h>
#include "MIDIUSB.h"
SoftwareSerial softSerial(11, 2);
byte incomingDinMidiMessage[3];
byte incomingUsbMidiMessage[3];
void setup() {
Serial1.begin(31250);
@2xAA
2xAA / sort-files-into-alphabetical-directories.js
Created October 28, 2022 14:31
Take a directory of files and move them into directories based on the first letter of the file
// Usage:
// 1. npm init -y && npm i minimist
// 2. node sort-files-into-alphabetical-directories.js /directory-of-files /directory-of-files/output
const fs = require("fs");
const path = require("path");
const argv = require("minimist")(process.argv.slice(2));
const alphabet = [..."abcdefghijklmnopqrstuvwxyz"];
@2xAA
2xAA / Better-Azure-DevOps-userscript.js
Last active June 22, 2023 08:20
A userscript to add a copy branch name button and other useful defaults to Azure DevOps.
// ==UserScript==
// @name Better Azure DevOps
// @description Fixes AzureDevOps' bullshit
// @match *://dev.azure.com/*
// ==/UserScript==
const constants = {
copyBranchNameButton: "BAD-COPY_BRANCH_NAME_BUTTON",
};