Skip to content

Instantly share code, notes, and snippets.

@siefkenj
siefkenj / gist:7dfda23a744585d39ca37612bd219f2e
Created April 6, 2023 04:20
Javascript p-adic finder via console
// Brute force method to guess p-adic solution to an equation
// Copy and paste this to the Javascript console and run
// Function to evaluate
func = (x) => x ** 2;
// Number base
p = 7;
console.table(
Array.from({ length: p }).map((_, i) => {
@siefkenj
siefkenj / example.coffee
Created October 16, 2012 05:30 — forked from devongovett/example.coffee
A CoffeeScript class that parses and renders SVG paths to the <canvas> element.
# fill path to ctx
Path.fill(ctx, "M250 150 L150 350 L350 350 Z")
# stroke
Path.stroke(ctx, "M250 150 L150 350 L350 350 Z")
# clip
Path.render(ctx, "M250 150 L150 350 L350 350 Z")
ctx.clip()