Skip to content

Instantly share code, notes, and snippets.

View librz's full-sized avatar

Patrick Ren librz

View GitHub Profile
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active September 20, 2024 08:23
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 August 8, 2024 14:00
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>
 ...