Skip to content

Instantly share code, notes, and snippets.

@vespaiach
vespaiach / tmux-cheatsheet.markdown
Created April 30, 2021 01:57 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@vespaiach
vespaiach / gist:99aa8b905ddc4f4f5cb909a14d696cce
Created January 13, 2021 15:32 — forked from jessebeach/gist:c0e24b409418f2ffdec6d60c36553f6e
Interactive, non-interactive and indeterminate elements regarding ARIA roles
non-interactive elements
✓ should identify `a` as a non-interactive element (1ms)
✓ should identify `area` as a non-interactive element
✓ should identify `article` as a non-interactive element (1ms)
✓ should identify `dd` as a non-interactive element
✓ should identify `dfn` as a non-interactive element
✓ should identify `dt` as a non-interactive element
✓ should identify `fieldset` as a non-interactive element
✓ should identify `figure` as a non-interactive element
✓ should identify `frame` as a non-interactive element
@vespaiach
vespaiach / what-forces-layout.md
Created December 13, 2020 22:31 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@vespaiach
vespaiach / simple-usart-commands.c
Created March 15, 2020 15:03 — forked from adnbr/simple-usart-commands.c
Parsing simple USART commands on an AVR
/* Parsing simple USART commands
* -----------------------------
* For more information see
* http://www.adnbr.co.uk/articles/parsing-simple-usart-commands
*
* 996 bytes - ATmega168 - 16MHz
*/
#define F_CPU 16000000UL
#define BAUD 19200
@vespaiach
vespaiach / max7219-basic.c
Created March 15, 2020 15:02 — forked from adnbr/max7219-basic.c
Simple AVR code for using a MAX7219 7-segment display driver
/* MAX7219 Interaction Code
* ---------------------------
* For more information see
* http://www.adnbr.co.uk/articles/max7219-and-7-segment-displays
*
* 668 bytes - ATmega168 - 16MHz
*/
// 16MHz clock
#define F_CPU 16000000UL
@vespaiach
vespaiach / postgres-cheatsheet.md
Created June 3, 2018 03:35 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)