Skip to content

Instantly share code, notes, and snippets.

View hamzaerbay's full-sized avatar
🦁
Hakuna Matata!

Hamza Erbay hamzaerbay

🦁
Hakuna Matata!
View GitHub Profile
@hamzaerbay
hamzaerbay / VideoPlayer.jsx
Created April 27, 2020 06:15 — forked from andrewserong/VideoPlayer.jsx
An example Video JS component in React, based on the Video JS docs
import React from 'react';
import videojs from 'video.js';
import 'video.js/dist/video-js.css';
// video.js player from the docs: https://github.com/videojs/video.js/blob/master/docs/guides/react.md
class VideoPlayer extends React.Component {
componentDidMount() {
// instantiate Video.js
this.player = videojs(this.videoNode, this.props, function onPlayerReady() {
@hamzaerbay
hamzaerbay / pronounce.txt
Created May 1, 2019 05:35 — forked from v0lkan/pronounce.txt
pronounciation notes
English Study:
th sound:
think about this thing that thing and those things
@hamzaerbay
hamzaerbay / what-forces-layout.md
Created February 21, 2019 22:05 — forked from paulirish/what-forces-layout.md
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.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()