Skip to content

Instantly share code, notes, and snippets.

View jack126guy's full-sized avatar

Half-Gray jack126guy

View GitHub Profile
@jack126guy
jack126guy / electribe-sampler-e2ssample-format.md
Last active March 24, 2023 17:13
Partial format specification for the e2sSample.all file used by the Korg Electribe Sampler
View electribe-sampler-e2ssample-format.md

Electribe Sampler e2sSample.all Data Format

Based on examination of the source code for e2sEdit and Oe2sSLE.

Overview

The file is just a concatenation of WAVE files with a header to indicate where each file begins. Additional metadata such as sample name and loop point are stored in each WAVE file as a RIFF chunk with type "korg", which is conventionally at the end of the file.

Unless otherwise specified, all integers are little-endian unsigned.

@jack126guy
jack126guy / sytcid.user.js
Last active January 3, 2023 19:08
Userscript to show YouTube channel ID next to channel name
View sytcid.user.js
// ==UserScript==
// @name Show YouTube channel ID
// @description Add YouTube channel ID next to channel name for visibility
// @version 4
// @match https://*.youtube.com/*
// @grant GM.setClipboard
// ==/UserScript==
(function (window, document, setClipboard) {
function getChannelId(event) {
@jack126guy
jack126guy / audiocmp.py
Last active February 5, 2022 22:19
Check if two audio files have identical audio
View audiocmp.py
#!/usr/bin/env python
"""Check if two audio files have identical audio.
The ffmpeg command-line utility must be installed.
Usage: python audiocmp.py [file 1] [file 2]
"""
import sys
@jack126guy
jack126guy / cleanwhitespace.pl
Last active February 1, 2022 16:01
Remove trailing whitespace
View cleanwhitespace.pl
#!/usr/bin/perl
#This does not read the file from standard input; rather, it processes a list of files, one per line, from standard input.
#This script is in the public domain (http://creativecommons.org/publicdomain/zero/1.0/)
use strict;
use feature 'unicode_strings';
use File::Copy 'move';
while(<STDIN>) {
chomp;
print 'Processing ', $_, "\n";
my ($SOURCEFILE, $NEWSOURCE);
@jack126guy
jack126guy / DefinitelyUniqueMediaBlock.sol
Last active January 21, 2022 12:07
Ethereum smart contract for NFTs representing media that is Definitely Unique™
View DefinitelyUniqueMediaBlock.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract DefinitelyUniqueMediaBlock is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _lastTokenId;
@jack126guy
jack126guy / apt-get
Last active March 5, 2021 06:38
"apt-get-rekt" Debian package contents
View apt-get
#!/bin/sh
APT_GET_REAL="apt-get.real"
EXIT_FAILURE=100
if [ "$#" -lt 1 ]; then
#No action specified
$APT_GET_REAL #Print default help
echo 'Get rekt.'
exit
@jack126guy
jack126guy / oneactrecords_createdb.sql
Created November 18, 2020 18:07
Database creation script for One Act Records
View oneactrecords_createdb.sql
CREATE TABLE `commonlinks` (
`releaseid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`formname` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`linkname` tinytext COLLATE utf8mb4_unicode_ci,
`linkref` text COLLATE utf8mb4_unicode_ci,
`linkdesc` text COLLATE utf8mb4_unicode_ci,
`linktech` text COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`releaseid`(100),`formname`(20))
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
@jack126guy
jack126guy / pause
Last active May 28, 2020 21:22
Emulate the DOS/Windows PAUSE command on Unix-like systems
View pause
#!/bin/sh
#You probably want to put this in /usr/local/bin
echo "Press Enter to continue... "
read REPLY
@jack126guy
jack126guy / babscon-https.md
Last active May 28, 2020 21:14
Comments on BABSCon's HTTPS config
View babscon-https.md

Update (2020-05-28): Another test was conducted around 2020-05-28T21:00Z and the results are much better:

The original notes follow.


@jack126guy
jack126guy / gradient-test.svg
Last active March 24, 2019 19:09
Test of support for "currentColor" in SVG gradients
View gradient-test.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.