Skip to content

Instantly share code, notes, and snippets.

@arturparkhisenko
arturparkhisenko / README.md
Created March 30, 2026 03:56 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@arturparkhisenko
arturparkhisenko / ffmpeg.md
Created March 30, 2026 03:50 — forked from protrolium/ffmpeg.md
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@arturparkhisenko
arturparkhisenko / supportsNativeHls.js
Created March 29, 2023 15:02
Whether the browser has built-in HLS support.
// From https://github.com/videojs/http-streaming/blob/d258fae646a3a4a6dc2ba26c729710dd8f39876a/src/videojs-http-streaming.js#L430-L464
/**
* Whether the browser has built-in HLS support.
*/
window._supportsNativeHls = (function() {
if (!document || !document.createElement) {
return false;
}
const video = document.createElement('video');
@arturparkhisenko
arturparkhisenko / detect-chromecast.js
Created February 28, 2022 14:51 — forked from lfalke/detect-chromecast.js
Detect Chromecast Model / Generation in Javascript
/**
* We use this workaround to detect the Chromecast device generation.
* Unfortunately the Cast Application Framework (CAF) does not have an API for that.
*
* cc-1: Chromecast 1st Gen.
* cc-2: Chromecast 2nd Gen.
* cc-3: Chromecast 3rd Gen.
* cc-ultra: Chromecast Ultra
* cc-builtin: Android TV with Chromecast built-in
*/
@arturparkhisenko
arturparkhisenko / esm-package.md
Created October 26, 2021 11:06 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package linked to from here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@arturparkhisenko
arturparkhisenko / fe-vs-be.md
Created October 28, 2020 16:17 — forked from WebReflection/fe-vs-be.md
Front End vs Back End in a nutshell.

FE vs BE

TL;DR enough of this kind of nonsense


I've been in the field for ~20 years and started as BE developer, and this is a reference for people thinking that because they are on the BE side, they're somehow entitled to:

  • earn more money
  • feel superior about FE developers
  • joke about JavaScript or minimize the FE effort in any way
@arturparkhisenko
arturparkhisenko / ds.csv
Created May 26, 2020 23:14 — forked from masrab/ds.csv
Visual data structure selector
Name Indexing (Average) Search (Average) Insertion (Average) Deletion (Worst) Indexing (Worst) Search (Worst) Insertion (Worst) Deletion (Worst) Space
Basic Array O(1) O(n) Undefined Undefined O(1) O(n) Undefined Undefined O(n)
Dynamic Array O(1) O(n) O(n) O(n) O(1) O(n) O(n) O(n) O(n)
Singly-Linked List O(n) O(n) O(1) O(1) O(n) O(n) O(1) O(1) O(n)
Doubly-Linked List O(n) O(n) O(1) O(1) O(n) O(n) O(1) O(1) O(n)
Skip List O(log(n)) O(log(n)) O(log(n)) O(log(n)) O(n) O(n) O(n) O(n) O(n log(n))
Hash Table Undefined O(1) O(1) O(1) Undefined O(n) O(n) O(n) O(n)
Binary Search Tree O(log(n)) O(log(n)) O(log(n)) O(log(n)) O(n) O(n) O(n) O(n) O(n)
Cartresian Tree Undefined O(log(n)) O(log(n)) O(log(n)) Undefined O(n) O(n) O(n) O(n)
B-Tree O(log(n)) O(log(n)) O(log(n)) O(log(n)) O(log(n)) O(log(n)) O(log(n)) O(log(n)) O(n)
@arturparkhisenko
arturparkhisenko / fonts-multi-language-support-test-string.js
Created March 18, 2019 18:47
fonts multi-language support test string
// https://pages.ucsd.edu/~dkjordan/chin/unitestuni.html
// https://fonts.google.com/specimen/Noto+Sans
const multiLanguageText = "00:00, : ,Ā Á Ă À ā á ă à Ǖ Ǘ Ǚ Ǜ ǖ ǘ ǚ ǜĈ ĉ Ĝ ĝ Ĥ ĥĴ ĵ Ŝ ŝ Ŭ ŭ Я не говорю по-русски. Я також не розмовляю Українською. Μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος. אני לא לומד עברית 𓂝𓃀𓅡𓄿𓌂 𓋴𓅓𓏏𓇏𓇌𓀀 我们刚才从 图书馆来了。 我們剛才從 圖書館來了。 𦮙, ABCČĆDĐEFGHIJKLMNOPQRSŠTUVWXYZŽ abcčćdđefghijklmnopqrsštuvwxyzž АБВГҐДЂЕЁЄЖЗЅИІЇЙЈКЛЉМНЊОПРСТЋУЎФХЦЧЏШЩЪЫЬЭЮЯ абвгґдђеёєжзѕиіїйјклљмнњопрстћуўфхцчџшщъыьэюя ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ αβγδεζηθικλμνξοπρστυφχψωά ΆέΈέΉίϊΐΊόΌύΰϋΎΫὰάὲέὴήὶίὸόὺύὼώ ΏĂÂÊÔƠƯăâêôơư आईऊऋॠऌॡऐऔऎअं अँकखगघङचछजझञटठडढणतथदधनपफबभयरवळशषसह 1234567890 ०१२३४५६७८९‘?’“!”(%) [#]{@}&<-+÷×=> ®©$€£¥¢:;,.*₹"
@arturparkhisenko
arturparkhisenko / windows-to-usb-on-macos.sh
Last active February 22, 2019 04:12
windows-to-usb-on-macos.sh
# download image here https://www.microsoft.com/en-us/software-download/windows10ISO
# mount it
diskutil list
# check identifier, it's could be like disk2
# format disk using identifier in the end
diskutil eraseDisk ExFat "WINDOWS10" MBR disk2
# copy all files from the image mounted
cp -rp /Volumes/CCCOMA_X64FRE_EN-US_DV9/* /Volumes/WINDOWS10/
# WAY 2, (for image path - just grab iso and drag it into console)