Skip to content

Instantly share code, notes, and snippets.

const audios = document.querySelectorAll('audio');
const tracks = [...audios].map((audio, i) => {
const article = audio.parentNode;
const title = article.querySelector('h2 a');
const img = article.querySelector('img');
return {
pos: i,
audio: audio,
metadata: {
@MeFoDy
MeFoDy / www-application-links.md
Last active October 6, 2023 20:24
Полезные ссылки к докладу WWW-аппликация
@MeFoDy
MeFoDy / web-standards-feed-template.md
Created April 27, 2020 11:07
Заготовка для фида подкаста Веб-стандарты

date: 2020-04-27 title: 'TODO' language: ru hosts:

  • Вадим Макеев
  • Никита Дубко
  • Ольга Алексашенко chapters:
  • time: 00:00:00
@MeFoDy
MeFoDy / images-delivery-links.md
Created May 20, 2018 17:20
Показываем картинки пользователю: подробное руководство
@MeFoDy
MeFoDy / DailyCssImages.md
Last active September 11, 2023 12:48
Daily CSS Images: full list of tasks

Daily CSS Images

Week 1

Day 1. Bear Cub

The challenge begins! Don't overthink it. A cub can be made in only a few shapes.

Day 2. Elephant

@MeFoDy
MeFoDy / css_secrets_trigonometry.md
Last active May 3, 2020 23:50
Trigonometry usage in CSS Secrets by Lea Verou
@MeFoDy
MeFoDy / .eslintrc.json
Last active December 11, 2017 13:06
ESLint strict config
{
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "script",
"ecmaFeatures": {
"impliedStrict": true
}
},
"env": {
"node": true,
@MeFoDy
MeFoDy / functions.scss
Created January 1, 2017 11:41 — forked from sgomes/functions.scss
[Using Sass to automatically pick text colors] #4 - step 2
/**
* Calculate the luminance for a color.
* See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
*/
@function luminance($color) {
$red: nth($linear-channel-values, red($color) + 1);
$green: nth($linear-channel-values, green($color) + 1);
$blue: nth($linear-channel-values, blue($color) + 1);
@return .2126 * $red + .7152 * $green + .0722 * $blue;