Skip to content

Instantly share code, notes, and snippets.

🐹 Go 🦀 Rust 📦 Node 🐧 Linux

AJ ONeal coolaj86

🐹 Go 🦀 Rust 📦 Node 🐧 Linux
View GitHub Profile
View How to uninstall

Get that nasty brew out of your system directories!

sudo rm -rf /usr/local/Homebrew/
sudo rm -rf /usr/local/Caskroom/
sudo rm -rf /usr/local/Cellar/

Now remove all broken symlinks from /usr/local/opt/ which, on a typical brew-infected system, will be all of them:


Re: NodeJS vs Go error handling

This is in response to Kai Hendry's NodeJS vs Go error handling

  • 0:00 Storytime: TJ leaves node because it sucks
  • 0:25 Example: A simple service to increment a number
  • 0:40 - 0:51 Node.js: A Naive Route Implementation
coolaj86 /
Last active Jan 3, 2022
for base62 in javascript / go / pseudocode + github base62 token format
View regions.json
"regions": [
"name": "New York 1",
"slug": "nyc1",
"features": [
  • Film is captured at 23.976 fps (not actually 24 fps)
  • A USA Blu-Ray is played at 24 fps
  • EU broadcast is 25 fps

If you want to pair Latvian audio from a Tet+ stream (Baltic Streaming service) with a USA Blu-Ray, you need to adjust the video playback to be 25.025025024 fps - which turns out to be 24 * (25 / 23.976).

It's better to squish the USA video than to expand the EU audio because the audio has already lost information that cannot be reexpanded, but the video has extra frames that can be dropped or merged with minimal loss of quality.

coolaj86 / format-credit-card-digits.js
Last active Oct 31, 2021
How to Format a (Visa) Credit Card input
View format-credit-card-digits.js
var CC = {};
window.CC = CC;
(function () {
"use strict";
// 4242-4242-4242-4242
function formatVisa(digits, pos) {
var all = "";
all += digits.slice(0, 4);
View mailgun-to-postmark.js
'use strict';
let request = require('@root/request');
let Postmark = module.exports;
Postmark._serverToken = process.env.POSTMARK_SERVER_TOKEN || '';
// Divide streams into Transactional vs Bulk and Important vs Casual
Postmark.streams = {