Skip to content

Instantly share code, notes, and snippets.

View MatthewCallis's full-sized avatar
🍖
Hungry Goriya

Matthew Callis MatthewCallis

🍖
Hungry Goriya
View GitHub Profile
@MatthewCallis
MatthewCallis / wav-checker.js
Last active January 19, 2021 03:55
Check for broken *.WAV Files
// npm install @uttori/audio-wave
// UTTORI_AUDIOWAV_DEBUG=1 DEBUG=AudioWAV node wav-checker.js
const path = require('path');
const { readdir, readFile } = require('fs').promises;
const { AudioWAV } = require('@uttori/audio-wave');
async function* getFiles(dir) {
const dirents = await readdir(dir, { withFileTypes: true });
for (const dirent of dirents) {
const res = path.resolve(dir, dirent.name);
@MatthewCallis
MatthewCallis / markdown.js
Last active November 16, 2020 17:22
Generate Markdown HTML Example
const fs = require('fs');
const MarkdownItRenderer = require('@uttori/plugin-renderer-markdown-it');
const config = {
// Uttori Specific Configuration
uttori: {
// Prefix for relative URLs, useful when the Express app is not at root.
baseUrl: '',
// Good Noodle List, f a domain is not in this list, it is set to 'external nofollow noreferrer'.
@MatthewCallis
MatthewCallis / !INTERESTIN SPAM.md
Last active December 4, 2022 19:18
Interesting SPAM: I collect interesting SPAM emails.

SPAM Emails

I collect interesting SPAM emails.

Possible Ideas / Why would you do this?

  • Train your own spam detection
  • Generate hilarious SPAM-esque content
  • Create an English-2-Spam converter
  • Create a terrible chat bot to respond to and occupy the time of SPAMers
@MatthewCallis
MatthewCallis / kintaroinstaller.sh
Created August 14, 2018 04:29
Kintaro Super Kuma 9000 & Super Ursus Driver Install Script
#!/bin/bash
curl -s https://packagecloud.io/install/repositories/kintaro/pcb/script.deb.sh | sudo bash
sudo apt-get -y install kintarosnes
@MatthewCallis
MatthewCallis / media_file_management.sh
Last active March 3, 2018 18:19
Media FIle Management Tasks
# Compress WAV Files with FLAC
find . -name "*.wav" -exec flac --best -A "tukey(0.5)" -A flattop --exhaustive-model-search --replay-gain --verify --delete-input-file {} \;
# Re-Encode FLAC Files
find . -name "*.flac" -exec flac --best -A "tukey(0.5)" -A flattop --exhaustive-model-search --replay-gain --force --verify {} \;
# Convert SHN to FLAC
for file in ./*.shn; do
ffmpeg -i "$file" "$file.flac"
done
@MatthewCallis
MatthewCallis / .gitconfig
Last active February 25, 2021 19:52
.gitconfig
[user]
name = Matthew Callis
email =
signingkey = XXXXXXXXXXXXXXXX
[github]
user = MatthewCallis
[push]
default = current
[pull]
default = current
@MatthewCallis
MatthewCallis / u.php
Last active January 4, 2018 18:56
Drag & Drop File Upload
<?php
$max_file_size = 5 * 1024 * 1024 * 10; // 50MB
$path = "💎/"; # "~/domain.tld/cool_files/uploads/"; // Upload Directory, outside of web access dir.
// $valid_formats = array("rar","zip","7z","pdf","xlsx","xls","docx","doc","txt");
// $valid_formats_server = array(
// "application/pdf",
// "application/octet-stream",
// "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
// "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
// "application/msword",
@MatthewCallis
MatthewCallis / toggles.scss
Created November 3, 2017 18:17
CSS3 Toggles
// http://callmenick.com/2014/05/13/css-toggle-switch-examples/
$toggle-size: 26px;
$toggle-width: $toggle-size * 2;
$toggle-speed: 0.2s;
input {
&.toggle {
position: absolute;
// margin-left: -9999px
@MatthewCallis
MatthewCallis / console.sass
Created March 3, 2017 19:10
Console Styles
.console
.warn
margin-top: 1em
label
font-weight: 700
input,
textarea
font-family: Monaco, Menlo, Consolas, "Courier New", monospace
font-size: 12px
line-height: 1.7em
@MatthewCallis
MatthewCallis / SNES TODO.md
Created January 8, 2017 03:31
eludevisibility.org To-Do List

SNES Carts Need Labels Printed & Holes Cut: