Skip to content

Instantly share code, notes, and snippets.

@v0lkan
v0lkan / engineer.md
Last active June 7, 2021 07:18
The Evolution of a Software Engineer

This gist outlines the change in the depth and breadth of the tasks and responsibilities of a software engineer as she continuously improves herself.

I created this to supplement a discussion in an internal slack group; then I though the rest of the world might benefit from this too.

Contributions are always welcome.

Junior Engineer

  • Knowledge
@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
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
@patik
patik / how-to-squash-commits-in-git.md
Last active October 17, 2023 02:19
How to squash commits in git

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

@jrburke
jrburke / gist:7455354
Last active February 11, 2024 23:18
Use of IDs instead of URLs for HTML resources

Design forces:

  • ECMAScript (ES) Module Loader API is coming. The ES module ID syntax are strings that are just treated as string IDs and not paths.
  • Existing JS module experience in CommonJS/Node/AMD worlds of using module IDs that are resolved to a URL/path for fetching.
  • Better package managers are coming for front end web apps. These package managers install assets by IDs not by paths.
  • For front end code, baseURL + moduleID + '.js' is likely the default ID-to-URL resolution, but other declarative config could be possible for browser-based ES Module Loaders. Examples of useful declarative config in this area are the problems solved via common AMD loader config

So it will be common in JS code to use string IDs, and not URLs to refer to dependency resources.

With the coming of web components and custom elements, it will be possible for a custom element to depend on other custom e

@dannygarcia
dannygarcia / SublimeLinter.sublime-settings
Created April 21, 2012 00:02
Sublime Linter User Settings
{
"jshint_options" :
{
"adsafe": false,
"bitwise": false,
"newcap": true,
"eqeqeq": true,
"immed": true,
"nomen": false,
"onevar": true,