Skip to content

Instantly share code, notes, and snippets.

from manim import *
LM_MONO = "Latin Modern Mono"
if sys.platform == "win32":
# Windows names this font differently for unknown reasons
LM_MONO = "LM Mono 10"
ROBOTO_MONO = "Roboto Mono"
RED_60 = "#da1e28"
@kjlubick
kjlubick / !pyramid_dice.go
Last active July 16, 2022 15:08
Pyramid Dice Simulation
package main
import (
"fmt"
"math/rand"
"time"
)
func d6(rng *rand.Rand) int {
return rng.Intn(6) + 1
@kjlubick
kjlubick / family_fan_chart.js
Last active March 12, 2019 02:21
Family Tree Map
canvas.width = 3000;
canvas.height = 2200;
canvas.style.width = "900px";
const surface = CanvasKit.MakeCanvasSurface(canvas);
if (!surface) {
throw 'Could not make surface';
}
const skcanvas = surface.getCanvas();
const paint = new CanvasKit.SkPaint();
@kjlubick
kjlubick / 1_toContainRegexMatcher.js
Last active September 26, 2018 13:32
Custom matcher for Jasmine - matcher for a list of strings to have (at least) one that matches a given regex.
const toContainRegexMatcher = {
// see https://jasmine.github.io/tutorials/custom_matcher
// for docs on the factory that returns a matcher.
'toContainRegex': function(util, customEqualityTesters) {
return {
'compare': function(actual, regex) {
if (!(regex instanceof RegExp)) {
throw `toContainRegex expects a regex, got ${JSON.stringify(regex)}`;
}
let result = {};
@kjlubick
kjlubick / docker-cleanup-resources.md
Created March 13, 2018 15:12 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@kjlubick
kjlubick / spanish_letters.ahk
Created May 28, 2016 19:23
Autohotkey script to easily add spanish letters to keyboards w/o numpads
#Hotstring EndChars `n `t
# Type ' then letter for lower case " then letter for uppercase
# The accented letter will appear after you hit tab, return or space.
::'a::
Send, {U+00E1}
Return
::"A::
Send, {U+00C1}
@kjlubick
kjlubick / d3-svg-example-animation.md
Last active May 18, 2016 13:32
This is an example for Google I/O of the D3 visualization, with animation.
@kjlubick
kjlubick / afl-fuzz-readme.md
Last active October 28, 2015 16:41
Readme for afl-fuzz

================== american fuzzy lop

Written and maintained by Michal Zalewski lcamtuf@google.com

Copyright 2013, 2014, 2015 Google Inc. All rights reserved. Released under terms and conditions of Apache License, Version 2.0.

For new versions and additional information, check out:

@kjlubick
kjlubick / afl-fuzz-help.txt
Created October 28, 2015 16:28
Help text for afl-fuzz
./afl-fuzz [ options ] -- /path/to/fuzzed_app [ ... ]
Required parameters:
-i dir - input directory with test cases
-o dir - output directory for fuzzer findings
Execution control settings:
-f file - location read by the fuzzed program (stdin)
@kjlubick
kjlubick / afl-fuzz-whitepaper.md
Last active October 28, 2015 14:27
Technical "whitepaper" for afl-fuzz. Copied from http://lcamtuf.coredump.cx/afl/technical_details.txt, (which is released under the Apache 2.0 License) and slightly modified for GitHub Flavored Markdown

=================================== Technical "whitepaper" for afl-fuzz

This document provides a quick overview of the guts of American Fuzzy Lop. See README for the general instruction manual; and for a discussion of motivations and design goals behind AFL, see historical_notes.txt.

  1. Design statement