Skip to content

Instantly share code, notes, and snippets.

View rohozhnikoff's full-sized avatar

Murad R. rohozhnikoff

  • Kyiv, Ukraine
View GitHub Profile
@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
@remoharsono
remoharsono / Excel VBA - Send GET Request
Created August 28, 2014 05:51
Using Excel VBA to Send HTTP GET Request to Web Server
Private Sub cmdKirimGET_Click()
Dim strResult As String
Dim objHTTP As Object
Dim URL As String
Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
URL = "http://localhost/search.php"
objHTTP.Open "GET", URL, False
objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
objHTTP.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHTTP.send ("keyword=php")
@davidmz
davidmz / yandex-colors.json
Created December 6, 2012 15:21
Названия цветов из Яндекса
[
["Кармин","960018"],
["Кардинал","c41e3a"],
["Тициановый","d53e07"],
["Красный","ff0000"],
["Алый","ff2400"],
["Карминово-красный","ff0033"],
["Киноварь","ff4d00"],
["Международный оранжевый","ff4f00"],
["Ализариновый","e32636"],
@paulmillr
paulmillr / less.less
Created March 9, 2012 08:26
Sass vs Stylus vs LESS
.border-radius (@radius) {
-webkit-border-radius: @radius;
-o-border-radius: @radius;
-moz-border-radius: @radius;
-ms-border-radius: @radius;
border-radius: @radius;
}
.user-list {
// need to use special `.` syntax