Skip to content

Instantly share code, notes, and snippets.

View edenwaith's full-sized avatar

Chad Armstrong edenwaith

View GitHub Profile
@jaames
jaames / playdate-curve.lua
Last active September 23, 2025 02:46
Simple bezier curve drawing functions for the Playdate Lua SDK
-- bezier curve drawing functions for playdate lua
-- these are based on de Casteljau's algorithm
-- this site has a nice interactive demo to compare both types of curve: https://pomax.github.io/bezierinfo/#flattening
-- draws a curve starting at x1,y1, ending at x3,y3, with x2,y2 being a control point that "pulls" the curve towards it
-- steps is the number of line segments to use, lower is better for performance, higher makes your curve look smoother
-- the playdate is kinda slow, so it's recommended to find a relatively low step number that looks passable enough!
function drawQuadraticBezier(x1, y1, x2, y2, x3, y3, steps)
steps = steps or 8
local d = 1 / steps
@Angles
Angles / AppleScript.plist
Created June 18, 2012 04:24
AppleScript for TextWrangler v2.0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- (ORIGINAL AUTHOR, ORIGINAL HEADER)
BBEdit Applescript Codeless Language Module.
Bill Hernandez <http://www.mac-specialist.com/>
Version 1.0.1
Updated - Monday, November 20, 2006 ( 6:41 PM )
Updated - Tuesday, November 21, 2006 ( 10:05 PM )