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
{
"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
@coolaj86
coolaj86 / Creeds of Craftsmanship Part 1 - The Zen of Python.md
Created October 25, 2021 07:49
Transcript of Creeds of Craftsmanship Part 1 - The Zen of Python - https://www.youtube.com/watch?v=zpKZ1bqmlHI

Transcripition of https://www.youtube.com/watch?v=zpKZ1bqmlHI

So there's no Python, I would call this in a programming, because these are succinct stances that apply to all programming languages really. And there's nothing here that is specific about Python. And because it's a very high level, I don't think that there's anything here that that can't be understood by all programmers. Because the go the go proverbs three, as you'll see there, the language is more towards a systems programmer. But whether you're a web developer or a systems programmer, I think you can get this. So beautiful is better than ugly. I think that this is its objective, but it's also something, the old quote, I know it when I see it, you can look at code, and you can say this has sort of that aesthetic style to it. And that style is generally Dave cheney gives a really good example where he draws a line through the center, well, not the center through the margin of the code. But basically, if you notice that most of your code aligns

{ "success": true }