Skip to content

Instantly share code, notes, and snippets.

View langolf's full-sized avatar

Aleksandr Langolf langolf

View GitHub Profile
@langolf
langolf / App.jsx
Last active March 21, 2024 10:14
reac
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');
});
@langolf
langolf / index.md
Last active March 6, 2024 22:16
Interview

JavaScript

Questions

  1. Explain event delegation
  2. Explain how this works in JavaScript

Answers

  1. Explain event delegation
@langolf
langolf / codeswing.json
Last active March 22, 2024 13:12
gjgjg
{
"scripts": [],
"styles": []
}
{
"scripts": [],
"styles": [],
"scriptType": "module",
"template": "true"
}
@langolf
langolf / foo.md
Created June 17, 2022 21:06
sksk

sdf

@langolf
langolf / karabiner.json
Last active April 24, 2022 20:22
config
{
"rules": [
{
"description": "left_command alone -> ⌘ + tab to last app",
"manipulators": [
{
"from": {
"key_code": "left_command"
},
"to": [
@langolf
langolf / codeswing.json
Last active March 22, 2021 11:51
pts-template
{
"scripts": [],
"scriptType": "module",
"styles": [],
"template": "true"
}
@langolf
langolf / WebGL-WebGPU-frameworks-libraries.md
Created March 18, 2021 11:24 — forked from dmnsgn/WebGL-WebGPU-frameworks-libraries.md
A collection of WebGL and WebGPU frameworks and libraries

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.

Engines and libraries

  • three.js: JavaScript 3D library
  • stack.gl: an open software ecosystem for WebGL, built on top of browserify and npm.
  • PixiJS: Super fast HTML 5 2D rendering engine that uses webGL with canvas fallback
  • Pex: Pex is a javascript 3d library / engine allowing for seamless development between Plask and WebGL in the browser.
  • Babylon.js: a complete JavaScript framework for building 3D games with HTML 5 and WebGL
  • Filament: Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS and WASM/WebGL
  • ClayGL: A WebGL graphic library
@langolf
langolf / index.md
Last active February 18, 2021 16:52
Disable letter keybinding with option

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).

@langolf
langolf / git.sh
Last active June 14, 2020 09:56
Git maintenance
git fsck --full --unreachable
git repack -A -d
git gc --aggressive --prune=now