Skip to content

Instantly share code, notes, and snippets.

Working from home

Vinny Fonseca VinnyFonseca

Working from home
Block or report user

Report or block VinnyFonseca

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
paulirish /
Last active Feb 17, 2020
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.


Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
View .eslintrc
"ecmaFeatures": {
"arrowFunctions": false, // enable arrow functions
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"classes": false, // enable classes
"defaultParams": false, // enable default function parameters
"destructuring": false, // enable destructuring
View bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
NodeList.prototype.__proto__ = Array.prototype;
jakebathman / jsonToCsv.php
Last active Jun 21, 2019 — forked from Kostanos/json-to-csv.php
A function to convert a JSON string (or a PHP array) to a CSV file or CSV string echoed to the browser
View jsonToCsv.php
* Based on (forked from) the work by
* This revision allows the PHP file to be included/required in another PHP file and called as a function, rather than focusing on command line usage.
* Convert JSON file to CSV and output it.
* JSON should be an array of objects, dictionaries with simple data structure
duellsy /
Last active Oct 2, 2019 — forked from kbl/
Import tasks and notes from wunderlist dump to todoist (and mark completed tasks as completed)
# -*- coding: utf8 -*-
import json
import urllib2
import urllib
import sys
import os
from argparse import ArgumentParser
from collections import defaultdict
addyosmani /
Last active Feb 17, 2020 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

pburtchaell / styles.css
Last active Feb 12, 2020
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
View styles.css
* VH and VW units can cause issues on iOS devices:
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
* iOS Resolution Quick Reference:
zxbodya / S3-CORS-config.xml
Last active Dec 14, 2019
Client side uploads to s3, with pre-signed upload form (PHP/JS)
View S3-CORS-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="">
octocat / .gitignore
Created Feb 27, 2014
Some common .gitignore configurations
View .gitignore
# Compiled source #
# Packages #
danielrbradley /
Last active Feb 12, 2020
Regular Expression to Validate UK Number Plates

Regular Expression to Validate UK Number Plates

Regular Expression


For use in JavaScript (with named groups removed):

You can’t perform that action at this time.