Skip to content

Instantly share code, notes, and snippets.

View cassilup's full-sized avatar
🚀
Let's do this.

Cassi Lup cassilup

🚀
Let's do this.
  • Timișoara, Romania
View GitHub Profile
@paulirish
paulirish / what-forces-layout.md
Last active July 21, 2024 17:54
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
@whitehorse0
whitehorse0 / artillery-config.test.yaml
Last active February 21, 2024 18:59
Artillery configuration example Load testing, and allow writing custom logic JS functions to be called at certain points during the execution of a scenario.
config:
target: "http://localhost:8000"
http:
timeout: 10 # Responses have to be sent within 10 seconds or the request will be aborted
processor: "./processor.js"
phases:
# Create 100 virtual users every second for 60 seconds
- duration: 60 # seconds
arrivalRate: 100 # virtual users
@cassilup
cassilup / README.md
Last active February 24, 2021 09:06
[3Pillar KDB] Plug-n-Play SonarQube for TS Projects
  1. Start SonarQube via Docker
# in the folder with docker-compose.yml
docker-compose up -d

(wait until server successfully started)

  1. Access SonarQube and change default (admin/admin) password