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 / 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": {
{
"meta": {
"theme": "wraypro"
},
"basics": {
"name": "Sam Wray",
"label": "Creative Technologist",
"picture": "https://wray.pro/assets/thumb/about.jpg",
"email": "sam@wray.pro",
"phone": "(+44)7561557458",
@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 / gist:c22b2fa77401d8e89d04d7963079dd34
Created January 12, 2023 11:55
grandiose npm i output
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /home/username/.nvm/versions/node/v18.13.0/bin/node /home/username/.nvm/versions/node/v18.13.0/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/home/username/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > grandiose@0.1.0 install
npm ERR! > pkg-prebuilds-verify ./binding-options.js || node-gyp rebuild
npm ERR!
npm ERR! make: Entering directory '/home/username/.npm/_cacache/tmp/git-cloneRvcC0i/build'
npm ERR! CXX(target) Release/obj.target/grandiose/src/grandiose_util.o
npm ERR! CXX(target) Release/obj.target/grandiose/src/grandiose_find.o
npm ERR! CXX(target) Release/obj.target/grandiose/src/grandiose_send.o
@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",
};