Skip to content

Instantly share code, notes, and snippets.

Neal Ehardt NealEhardt

Block or report user

Report or block NealEhardt

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
NealEhardt / basics.js
Last active Jan 25, 2019
JavaScript language basics
View basics.js
* Basic operations with JavaScript arrays, functions, objects, and strings.
* JavaScript is a small language. With ECMAScript 6 (ES6), it has some
* powerful functional programming tools. I focus on the idioms I've used often.
* If you learn these operations, you won't reach for third-party libraries as often.
* To run examples and verify the outputs, paste this file in your browser's console.
array: {
NealEhardt / TLC5971 Arduino Sine.jpg
Last active Mar 5, 2017
Paints a sine wave pattern to a variable number of TLC5971 chips.
NealEhardt / testTimeout.js
Last active Dec 2, 2016
Instrumentation for the event loop
View testTimeout.js
Paste this in the console of a live site. Or in your source somewhere that will run exactly once.
Logs warnings to the console like this:
Lagged for 254 ms over 2 loop(s). Should have taken 100 ms (39% of actual).
(function (timeoutDurationMs) {
var lastQuickDate = null, lastDate = null, loopsSinceLastQuickDate = 0;
function testTimeout() {
var d = new Date();
You can’t perform that action at this time.