Skip to content

Instantly share code, notes, and snippets.

Rick Waldron rwaldron

Block or report user

Report or block rwaldron

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
View hoisting-vs-tdz.md

In JavaScript, all binding declarations are instantiated when control flow enters the scope in which they appear. Legacy var and function declarations allow access to those bindings before the actual declaration, with a "value" of undefined. That legacy behavior is known as "hoisting". let and const binding declarations are also instantiated when control flow enters the scope in which they appear, with access prevented until the actual declaration is reached; this is called the Temporal Dead Zone. The TDZ exists to prevent the sort of bugs that legacy hoisting can create.

View jquery.ba-tinypubsub.js
/*!
* jQuery Tiny Pub/Sub - v0.X - 11/18/2010
* http://benalman.com/
*
* Original Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*
* Made awesome by Rick Waldron
*
View jquery.js
/*!
* jQuery JavaScript Library v2.1.1pre
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
@rwaldron
rwaldron / complete-character-set.js
Last active Jun 28, 2019
Character set: 0-9, A-Z, a-z for seven segment displays
View complete-character-set.js
{
"0": 0x7E,
"1": 0x30,
"2": 0x6D,
"3": 0x79,
"4": 0x33,
"5": 0x5B,
"6": 0x5F,
"7": 0x70,
"8": 0x7F,
@rwaldron
rwaldron / branch-count.sh
Created Jun 15, 2011
Count number of branches in a repo
View branch-count.sh
git branch | wc -l
View jQuery.classList.js
/*
Usages:
$(selector).classList() //returns an array of classnames
$(selector).classList('newclass') //replaces the current element's classes
$(selector).classList(['new', 'class', 'names']) //replaces the current element's classes
*/
jQuery.fn.extend({
classList: function( value ) {
if( value ){
@rwaldron
rwaldron / array.build.md
Last active May 29, 2019
Array.build(length, mapFn = undefined)
View array.build.md
@rwaldron
rwaldron / Setting up Google Cloud Storage with CORS for Web Fonts.md Setting up CORS on Google Cloud Storage: An unofficial quick start guide to serving web fonts from Google's cloud. (I'm sure a lot of this info could be improved... Please leave comments if you have tips/improvements.)
View Setting up Google Cloud Storage with CORS for Web Fonts.md

Login:

Google Cloud Storage

You'll want to login using an official Google account (i.e. if this is for your company, use the comapany Gmail account vs. a personal one.)

When logging in, you might be prompted to verify the account; if so, enter your cell number to get a verification e-mail or phone call.

Once verified, you'll have to agree to the terms of service; do that, and click continue.

View jquery.viewport-original.js
/*
* Viewport - jQuery selectors for finding elements in viewport
*
* Copyright (c) 2008-2009 Mika Tuupola
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Project home:
* http://www.appelsiini.net/projects/viewport
@rwaldron
rwaldron / MIT-License
Created Jun 30, 2011
This license applies to all public gists https://gist.github.com/rwldrn
View MIT-License
All public gists https://gist.github.com/rwldrn
Copyright 2011, Rick Waldron
MIT License, http://www.opensource.org/licenses/mit-license.php
You can’t perform that action at this time.