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
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();
@NealEhardt
NealEhardt / TLC5971 Arduino Sine.jpg
Last active Mar 5, 2017
Paints a sine wave pattern to a variable number of TLC5971 chips.
@NealEhardt
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
NealEhardt / cheat-sheet.txt
Last active Feb 3, 2020
NHHIP survey guide
View cheat-sheet.txt
I recommend these responses to the I-45 Virtual Community Workshop survey.
Take the survey at https://www.surveymonkey.com/r/MTHBX5S
01.3 - no footprint expansion, more shared vehicles
02.2 - make carpool lanes available for short trips, minimize concrete build
03.1 - minimize single-occupant vehicles on freeway
04.3 - mass transit works best on local roads
05.1 - the mall is a great place for a transit center
06.2 - grade-separated transit will flow smoothly
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.