- Explain event delegation
- Explain how this works in JavaScript
- Explain event delegation
const mergeSort = (arr: number[]): number[] => { | |
if (arr.length < 2) { | |
return arr; | |
} | |
const middle = Math.floor(arr.length / 2); | |
const left = arr.slice(0, middle); | |
const right = arr.slice(middle); | |
const sortedLeft = mergeSort(left); |
{ | |
"scripts": [], | |
"styles": [] | |
} |
sdf
{ | |
"rules": [ | |
{ | |
"description": "left_command alone -> ⌘ + tab to last app", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "left_command" | |
}, | |
"to": [ |
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 |
const colors = ["#00000000" "#000000aa" "#00bcf233" "#00bcf299" "#2d2a2e" "#4d4a4e" "#5b595c" "#5B595C" "#7abd7a4d" "#7c7c7c4d" "#8db9e2" "#78dce8" "#78DCE8" "#78DCE859" "#81b88b" "#221f22" "#221f22bf" "#264f78" "#403e41" "#4169e1" "#6796E6" "#19181a" "#355000" "#525252" "#585858" "#727072" "#939293" "#80808059" "#99999959" "#a0a0a0" "#a9dc76" "#A9DC76" "#a9dc7619" "#a9dc7626" "#A9DC7659" "#ab9df2" "#AB9DF2" "#AB9DF259" "#B267E6" "#bbbbbb" "#bebebe" "#c1c0c0" "#C1C0C0" "#c1c0c026" "#c5c5c5" "#c6c6c6" "#CD9731" "#d18616" "#F44747" "#fc9867" "#FC9867" "#FC986759" "#fcfcfa" "#FCFCFA" "#fcfcfa0c" "#fcfcfa09" "#fcfcfa12" "#fcfcfa19" "#fcfcfa26" "#ff6188" "#FF6188" "#ff618819" "#ff618826" "#FF618859" "#ffd866" "#FFD866" "#FFD86659" "#ffff0033" "#ffffff" "#FFFFFF" "#ffffff1a" "#ffffff13"] |
My Awesome Sketch | |
First State | |
some event -> Second State | |
Second State |