Skip to content

Instantly share code, notes, and snippets.

View librz's full-sized avatar
💭
Chilling

Patrick Ren librz

💭
Chilling
View GitHub Profile
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active March 11, 2025 04:09
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@JeremyRH
JeremyRH / event-delegation-performance.md
Last active February 13, 2025 07:44
Does event delegation actually improve performance?

Does event delegation actually improve performance?

Event delegation works by attaching a single event listener to a parent element to catch events bubbling up from the children. Many people believe this is more performant than attaching event listeners to each child. I am not convinced this is always true.

Let's start with a common example of event delegation. Here we have a list of elements:

<ul id="item-list">
  <li data-cost="12">Item 1</li>
  <li data-cost="18">Item 2</li>
  <li data-cost="6">Item 3</li>
 ...