Skip to content

Instantly share code, notes, and snippets.


Matthew Stokeley matthewstokeley

Block or report user

Report or block matthewstokeley

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
albarin / filter.js
Created Apr 1, 2019
Script to filter OpenAPI spec
View filter.js
const pickBy = require('lodash.pickby')
const validate = require('./schema-validator.js')
key: 'x-visibility',
value: 'EXTERNAL'
key: 'x-status',
paulirish /
Last active Dec 6, 2019
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()
tbrianjones / Inflect.php
Last active Nov 28, 2019
A PHP Class for converting English words between Singular and Plural.
View Inflect.php
// original source:
The MIT License (MIT)
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
bennadel / lazy-loading-images.htm
Created Jul 23, 2013
Lazy Loading Image With AngularJS
View lazy-loading-images.htm
<!doctype html>
<html ng-app="Demo" ng-controller="AppController">
<meta charset="utf-8" />
Lazy Loading Images With AngularJS
<style type="text/css">
View .bowerrc
"directory": "components"
rememberlenny / gist:5164200
Last active Dec 14, 2015
Main.js file from Require.js on Foundation 4 through Yeoman.
View gist:5164200
paths: {
jquery: '../components/jquery/jquery'
shim: {
"foundation/foundation" : { deps: ["jquery"] },
"foundation/foundation.alerts": { deps: ["jquery"] },
"foundation/foundation.clearing": { deps: ["jquery"] },
"foundation/foundation.cookie": { deps: ["jquery"] },
"foundation/foundation.dropdown": { deps: ["jquery"] },
ryankearney / ComcastInject.html
Last active Jul 29, 2019
This is the code Comcast is injecting into its users web traffic.
View ComcastInject.html
<script language="JavaScript" type="text/javascript">
// Comcast Cable Communications, LLC Proprietary. Copyright 2012.
// Intended use is to display browser notifications for critical and time sensitive alerts.
var SYS_URL='/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/';
// var image_url='';
var image_url='';
var headertext1='<strong>Comcast Courtesy Notice</strong>';
var textline1='You have reached 90% of your <b>monthly data usage allowance</b>.';
var textline2='Please sign in for more information and to remove this alert.';
var acknowledgebutton='<a href=\"#\" onClick="document.location.href=\''+SYS_URL+'?dispatch=redirect&redirectName=login&paramName=bmUid\'" title="Sign in to acknowledge" style="color: #FFFFFF;"><img alt="Sign in to acknowledge" src="'+image_url+'/mt_signin.png"/></a>';
radiosilence / gist:4040553
Created Nov 8, 2012
RequireJS with Zurb Foundation
View gist:4040553
shim: {
'foundation/': {
deps: ['jquery'],
'foundation/jquery.cookie': {
deps: ['jquery']
'foundation/jquery.event.move': {
deps: ['jquery']
kyleondata / gist:3440492
Last active Dec 5, 2019
Backbone.js and Handlebars.js example
View gist:3440492
<!DOCTYPE html>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<script src="jquery-1.7.2.min.js" ></script>
<script src="handlebars-1.0.0.beta.6.js" ></script>
<script src="underscore-min.js" ></script>
<script src="backbone-min.js" ></script>
You can’t perform that action at this time.