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 / jest-helpers-api.js
Last active August 16, 2023 17:03
Jest Testing Helpers for React Components with Promises
import fetch from 'isomorphic-fetch';
expost const get = async (url, headers = {}) => fetch(url, {
method: 'GET',
headers: {
Accept: 'application/json',
...headers,
},
});
@MatthewCallis
MatthewCallis / country-codes.json
Created March 9, 2021 01:00
Country Codes & Locale Language Codes as JSON
[
{ "title": "Andorra", "value": "AD" },
{ "title": "United Arab Emirates", "value": "AE" },
{ "title": "Afghanistan", "value": "AF" },
{ "title": "Antigua and Barbuda", "value": "AG" },
{ "title": "Anguilla", "value": "AI" },
{ "title": "Albania", "value": "AL" },
{ "title": "Armenia", "value": "AM" },
{ "title": "Angola", "value": "AO" },
{ "title": "Antarctica", "value": "AQ" },
@MatthewCallis
MatthewCallis / deadlines-summary.md
Created February 16, 2021 22:41
This is a summary of a Clubhouse conversation between several people, but predominantly @shl from Gumroad and @jasonfried from Basecamp.
@MatthewCallis
MatthewCallis / flash.md
Last active December 3, 2023 22:58
Disable Flash EOL Warnings
Disable EOL uninstall warnings:
	Disable auto updates when installing
	Add "EOLUninstallDisable=1" to mmc.cfg in C:\WINDOWS\system32\Macromed\Flash
	(C:\Windows\SysWOW64\Macromed\Flash on 64-bit)

---

Defuse flash player time bomb:
@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 May 5, 2026 16:53
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