Skip to content

Instantly share code, notes, and snippets.

View coolaj86's full-sized avatar
😎
🐹 Go 🦎 Zig πŸ“¦ Node 🐧 POSIX πŸͺŸ PowerShell

AJ ONeal coolaj86

😎
🐹 Go 🦎 Zig πŸ“¦ Node 🐧 POSIX πŸͺŸ PowerShell
View GitHub Profile

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
coolaj86 / base62.md
Last active December 16, 2022 18:42
for base62 in javascript / go / pseudocode + github base62 token format
{
"regions": [
{
"name": "New York 1",
"slug": "nyc1",
"features": [
"backups",
"ipv6",
"metadata",
"install_agent",
  • 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
coolaj86 / format-credit-card-digits.js
Last active October 31, 2021 00:45
How to Format a (Visa) Credit Card input
var CC = {};
window.CC = CC;
(function () {
"use strict";
// 4242-4242-4242-4242
function formatVisa(digits, pos) {
var all = "";
all += digits.slice(0, 4);
'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 = {

How to create a Bootable Monterey ISO

set -e
set -u

# Create an empty
hdiutil create -o /tmp/empty -size 8400m -volname "Monterey" -layout SPUD -fs HFS+J

# Rename to .img since this isn't a compressed disk image