Skip to content

Instantly share code, notes, and snippets.

View darkkain's full-sized avatar
🏠
Working from home

Misha Andreichenko darkkain

🏠
Working from home
View GitHub Profile
@paulirish
paulirish / what-forces-layout.md
Last active October 24, 2025 22: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

System

  1. Set up iCloud Keychain
  2. Remove icons and hide Dock
  3. Default address in iMessage
  4. Install Updates
  5. Add Ru Input Sources
  6. Set up Shortcuts
  7. Add text shortcuts Text
@lahmatiy
lahmatiy / custom-progressbar.js
Last active August 29, 2015 14:26
Done on the knee progressbar
var chalk = require('chalk');
var readline = require('readline');
var BAR_LENGTH = 40;
var lines = 0;
function repeatStr(str, len){
return new Array(parseInt(len) + 1).join(str);
}
function drawBarLine(fill, str){
@imjasonh
imjasonh / markdown.css
Last active September 3, 2025 22:12
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@wilddeer
wilddeer / flexbox-adventures.md
Last active November 29, 2018 05:54
Невероятные приключения флексбокса в фаерфоксе

Невероятные приключения флексбокса в фаерфоксе

  • Блок с прокруткой в вертикальном флексбоксе не работает — ставить max-height: 100% на контейнер
  • word-wrap: break-word не работает внутри флексбокса — спасает min-width: 0 на элементе флексбокса (overflow-x: hidden тоже работает)
  • Флексбокс не работает на кнопке — класть внутрь блок и на нем делать флексбокс
  • Элемент флексбокса с ellipsis расфигачивает все по ширинеmin-width: 0 на флексбокс / max-width: 100% на самого верхнего разъехавшегося родителя
  • Элементы флексбокса не выравниваются по базовой линии, если внутри еще один флексбокс — использовать inline-flex

О других невероятных приключениях вы узнаете в следующей серии

@ericelliott
ericelliott / essential-javascript-links.md
Last active June 14, 2025 18:43
Essential JavaScript Links
@Shoom
Shoom / gist:9622e6e09ca6be63f98f
Last active July 19, 2018 11:52
CSSconf EU 2014
{
"cssconf": {
"location": {
"date": "September 12, 2014",
"country": "Germany",
"city": "Berlin",
"venue": "Radialsystem V",
"lat": 52.51039,
"long": 13.42864
},
@jonathanbell
jonathanbell / Instarss.md
Last active March 18, 2023 00:03
August 28 2014 - InstaRss

Instarss

I was looking around for a way to get a user's public Instagram feed as an RSS feed without using the Instagram API when I came across this question on Stack Overflow.

Probably the best way to do this, would be to use the Instagram API. However, I had no desire to sign up for an Instagram account.

Initially, this answer on Stack Overflow suited my needs quite well. However, as fate would have it, Instagram changed its HTML output and the page's JSON data structure changed. Since the idea is quite simple (we're just screen scrapping here) I decided to write my own script. If this works well for you, consider upvoting my answer on Stack Overflow: http://stackoverflow.com/a/25559442/1171790


anonymous
anonymous / Pure-CSS-multiline-text-with-ellipsis.markdown
Created July 22, 2014 15:18
A Pen by Martin Wolf.