Skip to content

Instantly share code, notes, and snippets.

@srdjan
srdjan / 100+ different counter apps...
Last active May 6, 2024 05:13
100+ different js counter apps...
100+ different js counter apps...
@ffoodd
ffoodd / improved-sr-only.markdown
Last active May 16, 2024 23:15
Improved .sr-only

Improved .sr-only

Theorically bulletproof CSS class for visually hide anything and keep it accessible to ATs.

A Pen by ffoodd on CodePen.

License.

@CMCDragonkai
CMCDragonkai / job_control_zsh_bash.md
Last active January 28, 2024 00:45
CLI: Job Control in ZSH and Bash

Job Control in ZSH and Bash

All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.

# run command in the foreground
command
# run commend in the background
@davatron5000
davatron5000 / the-state-of-element-container-queries.md
Last active August 23, 2023 15:43
The State of Element/Container Queries

The State of Container Queries

tl;dr Developers would like the idea to style components based on a parent's width rather than depend solely on the viewport media query. This would allow modular components to style themselves while being agnostic to the viewport.

There is currently a lot of developer interest in getting a feature like Container Queries (née "Element Queryies") shipped in a browser.

2-min Catchup

Here are official'ish documents to outline the developer community's desires.

@jlongster
jlongster / immutable-libraries.md
Last active May 6, 2024 12:37
List of immutable libraries

A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.

There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.

Libraries are sorted by github popularity.

Persistent Data Structures w/structural sharing

@paulirish
paulirish / what-forces-layout.md
Last active May 21, 2024 09:11
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
@MoOx
MoOx / index.md
Last active August 29, 2015 14:17
OS X IRC apps
anonymous
anonymous / index.html
Created December 19, 2014 18:01
French Line // source http://jsbin.com/pigakarota
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>French Line</title>
<style id="jsbin-css">
body {
display: flex;
flex-direction: column;
flex-wrap: wrap;
@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Last active August 29, 2015 14:11
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
/// Constant maps
/// Should not be dynamically updated.
/// @access private
/// @prop {List} TIME - List of `<time>` units
/// @prop {List} FREQUENCY - List of `<frequency>` units
@zpratt
zpratt / .eslintrc
Created December 17, 2014 05:42
jslint-like eslintrc config
{
"env": {
"node": true,
"mocha": true
},
"rules": {
"no-alert": 2,
"no-array-constructor": 2,
"no-caller": 2,