Skip to content

Instantly share code, notes, and snippets.

Kevin Weber kevinweber

Block or report user

Report or block kevinweber

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
paulirish / rAF.js
Last active Mar 6, 2020
requestAnimationFrame polyfill
View rAF.js
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@joelambert
joelambert / README
Created Jun 1, 2011
Drop in replacements for setTimeout()/setInterval() that makes use of requestAnimationFrame() where possible for better performance
View README
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
http://www.joelambert.co.uk
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php
@paucoma
paucoma / gglCalEventsOnSpreadSheet.gs
Last active Feb 25, 2020
Script to read Google Calendar Events and Count total Hours
View gglCalEventsOnSpreadSheet.gs
var gblFromYear = 2015;
var gblToYear = 2015;
var gblFromMonth = 01;
var gblToMonth = 04;
var gblFromDay = 01;
var gblToDay = 01;
var gblCalendarName = "Work";
var gblEventQuery = "TT";
@debloper
debloper / bandwidth.js
Last active Feb 21, 2020
Determine client's connection speed with JavaScript
View bandwidth.js
// Let's initialize the primitives
var startTime, endTime, fileSize;
// Set up the AJAX to perform
var xhr = new XMLHttpRequest();
// Rig the call-back... THE important part
xhr.onreadystatechange = function () {
// we only need to know when the request has completed
@jkrems
jkrems / es-module-history.md
Last active Jan 25, 2020
History of ES modules
View how to screencapture and make animated gifs or whathaveyou.md

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

@sivel
sivel / test-head-footer.php
Created Apr 25, 2010
WordPress Plugin to test for the existence and functionality of wp_head and wp_footer in the active theme
View test-head-footer.php
@bueltge
bueltge / commentmeta-multi.php
Created May 3, 2011
WordPress Example Plugin: Comment meta data test
View commentmeta-multi.php
<?php
/*
Plugin Name: Comment meta data test
Version: 1.0
Plugin URI: http://wpengineer.com
Description: Comment meta data test
Author: Latz
Author URI: http://wpengineer.com
*/
@nateyolles
nateyolles / aemTouchUIValidation.js
Last active Jul 25, 2018
AEM Touch UI validation
View aemTouchUIValidation.js
var $input = $('.my-input-field'),
errorMessege = 'This field is required';
if ($input.willValidate()) {
$input.checkValidity(); // true
$input.validationMessage(); // ''
/* Set input field as invalid */
$input.setCustomValidity(errorMessage);
$input.checkValidity(); // false
@nateyolles
nateyolles / aemMultifieldAdapter.js
Last active Apr 14, 2018
AEM Touch UI, Granite UI Multifield adapter
View aemMultifieldAdapter.js
/**
* Granite UI Multifield adapter
*
* Has improved setDisabled method which disables all form input fields, the
* delete buttons, the reorder buttons and the add button within the Multifield.
* The adapter also contains a new method to enable and disable just the add
* button which can be used to limit the size of the multifield.
*
* Usage:
* var field = $('.coral-Multifield').adaptTo('nateyolles-field');
You can’t perform that action at this time.