This file contains hidden or 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
| local timeInit = require("time_module") | |
| local oreInit = require("orescanner_module") | |
| local modules = peripheral.find("neuralInterface") | |
| if not modules then error("Must have a neural interface", 0) end | |
| if not modules.hasModule("plethora:glasses") then error("The overlay glasses are missing", 0) end | |
| if not modules.hasModule("plethora:scanner") then error("The block scanner is missing", 0) end | |
| local canvas = modules.canvas() | |
| canvas.clear() |
This file contains hidden or 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 python3 | |
| import time | |
| import argparse | |
| #python3 -m pip install python-xlib | |
| from Xlib import X | |
| from Xlib.display import Display | |
| from Xlib.ext.xtest import fake_input | |
| from Xlib.XK import XK_Scroll_Lock |
This file contains hidden or 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 python | |
| import os, sys | |
| import subprocess, shutil, shlex | |
| from pathlib import Path | |
| def getShebangLine(executable_path): | |
| with open(executable_path, "rb") as f: | |
| magic = f.read(2) | |
| if magic != b"#!": |
This file contains hidden or 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
| "use strict"; | |
| export const settings = { | |
| debug: false | |
| }; | |
| function padBits(bit_string, divisible_by) { | |
| const is_divisible = bit_string.length % divisible_by === 0; | |
| if(is_divisible) { | |
| return bit_string; |
This file contains hidden or 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 python2 | |
| import launchpad_rtmidi_py as launchpad | |
| import time | |
| lp = launchpad.Launchpad() | |
| if not lp.Open(): | |
| print("Failed...\nReconnect...") | |
| quadrants = [ |
This file contains hidden or 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 python3 | |
| import sys, subprocess, shlex, json | |
| from pathlib import Path | |
| temp_folder = "/tmp" | |
| album_art_filename = Path(temp_folder, "script_album_art.jpg") | |
| try: | |
| audio_path = Path(sys.argv[1].strip()) |
This file contains hidden or 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
| #include <stdio.h> | |
| int main() { | |
| struct { | |
| char buffer[sizeof(int)]; //must be word aligned or will be forced by the compiler | |
| volatile int modified; | |
| } container; | |
| container.modified = 0; | |
This file contains hidden or 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
| folder_dir = "/tmp/" --must have a slash proceding the location - lua doesn't have a pathing stdlib | |
| --[[ | |
| This is specifically for OBS, but can be altered pretty easily for other uses | |
| It's mostly useful for documenting the MPV metadata grabbing functions, as they are a little bit of a hassle to find | |
| Just to note, if a tag is not found, it will create a blank file - this should never happen with the title though | |
| ]]-- | |
| function save_file(filename, metadata) |
This file contains hidden or 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
| "use strict"; | |
| function OggParser(file) { | |
| const uint8 = new Uint8Array(file); | |
| this.getMetadata = () => { | |
| return _parseMetadataSegments( _getMetadataSegments() ); | |
| }; | |
| this.parsePage = (starting_index) => { |
This file contains hidden or 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
| function gaplessAudio() { | |
| const audio = new AudioContext(); | |
| let buffer_source; | |
| this.load = async (url) => { | |
| const file_contents = await (await fetch(url)).arrayBuffer(); | |
| audio.decodeAudioData(file_contents, function(buffer) { | |
| if(buffer_source) buffer_source.disconnect(); | |
| buffer_source = audio.createBufferSource(); |
NewerOlder