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
@v0lkan
v0lkan / pronounce.txt
Last active August 9, 2019 12:35
pronounciation notes
English Study:
th sound:
think about this thing that thing and those things
@cfarm
cfarm / JAWS vs VoiceOver screen readers.md
Last active May 4, 2023 12:51
JAWS vs VoiceOver: What JAWS, VoiceOver and other screen readers have in common and where they differ, plus how this should be considered in the design and development process
@faressoft
faressoft / dom_performance_reflow_repaint.md
Last active November 9, 2024 17:37
DOM Performance (Reflow & Repaint) (Summary)

DOM Performance

Rendering

  • How the browser renders the document
    • Receives the data (bytes) from the server.
    • Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
    • Turns tokens into nodes.
    • Turns nodes into the DOM tree.
  • Builds CSSOM tree from the css rules.
@wesbos
wesbos / async-await.js
Created February 22, 2017 14:02
Simple Async/Await Example
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}
@v0lkan
v0lkan / how-to-write.md
Last active December 24, 2020 15:15
How to Write

This is a copy of this presentation by Michael Covington

Why?

  • People who write are powerful.
  • In science, technology, or management, you influence people by writing things for them to read.
  • Clear writing leads to clear thinking.
  • You don’t know what you know until you try to express it.
  • If your writing is nonsense, maybe your thoughts are nonsense too!
@paulirish
paulirish / what-forces-layout.md
Last active November 19, 2024 01:01
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
@bobbygrace
bobbygrace / trello-css-guide.md
Last active November 3, 2024 14:56
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@mindevolution
mindevolution / drop_db_multiple
Last active March 16, 2021 02:33
Mysql drop multiple database
#!/bin/bash
MUSER='root' # db username
MPASS='root' # db password
# db array to be deleted
declare -a DROP_DBS=(knowpath mydb xhprof )
# loop dbs and delete db
DBS=`(mysql -u$MUSER -p$MPASS -Bse 'SHOW DATABASES')`
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active October 12, 2024 16:34
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");