- Explain event delegation
- Explain how this works in JavaScript
- Explain event delegation
import { CanvasSpace, Pt } from 'pts'; | |
const space = new CanvasSpace('#app'); | |
const form = new space.getForm(); | |
space.add((time, ftime) => { | |
let pt = new Pt(space.center); | |
form.fill('red').point(pt, 10, 'circle'); | |
}); |
{ | |
"scripts": [], | |
"styles": [] | |
} |
{ | |
"scripts": [], | |
"styles": [], | |
"scriptType": "module", | |
"template": "true" | |
} |
sdf
{ | |
"rules": [ | |
{ | |
"description": "left_command alone -> ⌘ + tab to last app", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "left_command" | |
}, | |
"to": [ |
{ | |
"scripts": [], | |
"scriptType": "module", | |
"styles": [], | |
"template": "true" | |
} |
A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.
Save the following to ~/Library/KeyBindings/DefaultKeyBinding.dict (create if necessary).
{ "~a" = (); "~b" = (); "~c" = (); "~d" = (); "~e" = (); "~f" = (); "~g" = (); "~h" = (); "~i" = (); "~j" = (); "~k" = (); "~l" = (); "~m" = (); "~n" = (); "~o" = (); "~p" = (); "~q" = (); "~r" = (); "~s" = (); "~t" = (); "~u" = (); "~v" = (); "~w" = (); "~x" = (); "~y" = (); "~z" = (); }
This disables all the ⌥ combinations. Restart apps to take effect.
The DefaultKeyBinding.dict above is an old-style property list1, defining key-value pairs using the syntax { key = value }. In this case, the keys are the key combinations to activate the method in the value.
Standard dictionary key symbols are used: ~ alt, ^ control, $ shift, @ command. Therefore ~a means ⌥A (alt-A) and ^$1 would be ⌃⇧1 (control-shift-1).
git fsck --full --unreachable | |
git repack -A -d | |
git gc --aggressive --prune=now |