Skip to content

Instantly share code, notes, and snippets.

View jonsatrom's full-sized avatar

Jon Satrom jonsatrom

View GitHub Profile
@fnky
fnky / ANSI.md
Last active May 3, 2024 17:31
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@b-meson
b-meson / mr_requests.py
Created August 3, 2017 05:22
MuckRock basic API request
import json
import requests
from datetime import datetime
import dateutil.relativedelta
import os
mr_username = ''
mr_pass = ''
api_url = 'https://www.muckrock.com/api_v1/'
@yurivish
yurivish / venn-diagrams.js
Last active December 26, 2020 03:20
Area-proportional Venn Diagrams
// Since `overlapArea` function is monotonic increasing, we can perform a
// simple bisection search to find the distance that leads to an overlap
// area within epsilon of the desired overlap.
function distanceForOverlapArea(r1, r2, desiredOverlap) {
// Ensure r1 <= r2
if (r1 > r2) {
var temp = r2;
r2 = r1;
r1 = temp;
}
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007