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 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 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 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 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 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 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 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 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 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(); |
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 python3 | |
import subprocess, sys, multiprocessing, json, os, shlex, re | |
from datetime import timedelta | |
error_messages = { | |
"param_len": """Not enough parameters | |
Format: %s [input_file] (optional)[parameters] [movie_title] | |
""" | |
} |
NewerOlder