This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "lit", | |
"license": "MIT", | |
"scripts": { | |
"build": "npm install && rollup -c" | |
}, | |
"dependencies": { | |
"@rollup/plugin-node-resolve": "^13.0.0", | |
"lit": "^2.0.0-rc.2", | |
"rollup": "^2.52.7" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {TAU, sampleRate} from "./utils.js"; | |
/* | |
http://www.music.mcgill.ca/~gary/courses/papers/Karplus-Strong-CMJ-1983.pdf | |
http://musicweb.ucsd.edu/~trsmyth/papers/KSExtensions.pdf | |
Simple explanation: http://amid.fish/karplus-strong | |
+---+ b +---+ | |
x / 0 ------->| B +-+-->| D +--> y | |
^ +---+ | +---+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import subprocess, sys, os, tempfile, re | |
""" | |
How to use this: | |
1. create a git repo | |
2. commit something to it | |
3. run ./chainy.py <number of zeroes> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
def getSpiral(n): | |
out = [] | |
for d in range(n+1): | |
for x in range(-d, d+1): | |
out.append((x, -d)) | |
if d != 0: | |
out.append((x, d)) | |
for y in range(-d+1, d): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<style> | |
body { | |
font-family: verdana; | |
} | |
p { | |
width: 750px; | |
} | |
h3 { | |
margin-bottom: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Given a Vec2 vector class... | |
function hitPolygonAxis(points: Array<Vec2>, ret: Array<Float>) { | |
for (i in 0...points.length) { | |
var a = points[i]; | |
var b = points[(i+1) % points.length]; | |
var v = Vec2.make(b.x - a.x, b.y - a.y).normal(); | |
// we should be able to only use half circunference. | |
ret.push(v.angle()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyClass { | |
/* | |
usage: | |
function x() { | |
var c = new MyClass(); | |
var x = c.func(10); | |
} | |
*/ | |
macro public function func(ethis: Expr, block: Expr): Expr { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello you fool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==> Downloading http://sourceforge.net/projects/netpbm/files/super_stable/10.35.82/netpbm-10.35.82.tgz | |
Already downloaded: /Users/fserb/Library/Caches/Homebrew/netpbm-10.35.82.tgz | |
/usr/bin/tar xf /Users/fserb/Library/Caches/Homebrew/netpbm-10.35.82.tgz | |
==> cp Makefile.config.in Makefile.config | |
cp Makefile.config.in Makefile.config | |
==> make | |
make | |
/private/tmp/homebrew-netpbm-10.35.82-4686/netpbm-10.35.82/Makefile.common:551: Makefile.depend: No such file or directory | |
cat /dev/null >Makefile.depend | |
make -C /private/tmp/homebrew-netpbm-10.35.82-4686/netpbm-10.35.82/buildtools/ -f /private/tmp/homebrew-netpbm-10.35.82-4686/netpbm-10.35.82/buildtools/Makefile \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by glib configure 2.32.1, which was | |
generated by GNU Autoconf 2.68. Invocation command line was | |
$ ./configure --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr/local/Cellar/glib/2.32.1 | |
## --------- ## | |
## Platform. ## |
NewerOlder