Skip to content

Instantly share code, notes, and snippets.

💭
Helping others get started

David Humphrey humphd

💭
Helping others get started
Block or report user

Report or block humphd

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
@humphd
humphd / backgroundfile-51599.txt
Last active Oct 11, 2019
WEB222 - HTML Practice
View backgroundfile-51599.txt
Response To Council Request For Information On Red Light Camera Infractions
STAFF REPORT ACTION REQUIRED with Confidential Attachment
Response To Council Request For Information On Red Light Camera Infractions
Date: October 30, 2012
To: Government Management Committee
From: Director of Court Services and City Solicitor
Wards: All
View Code-From-Class-Updated.js
// NOTE: updated to fix some bugs on Mon Sept 30, 2019
/**
* Constructor function for an Email object.
*
* @param {String} rawEmail - text of a raw email, with headers and body
*/
function Email(rawEmail) {
// Step 1: split the raw email text into its two main parts: header and body.
// The split occurs at the first empty line (i.e., \n\n)
@humphd
humphd / count.ts
Created Jun 17, 2019
WEB422 Summer 2019 Week 7 Code Example: TypeScript
View count.ts
/**
* TypeScript rewrite of https://gist.github.com/humphd/c37e233f57c4b942ac3e8c30fae855f2
*
* Example module to get info about a multi-line string,
* written as an ES module.
*
* Takes a multiline string, and returns an Object:
*
* "here is a line of text"
*
@humphd
humphd / index.html
Created May 16, 2019
WEB422 Summer 2019 Week 2 Code Example: jQuery, Lodash, Moment
View index.html
<div id="employee-tables"></div>
<script src="index.js"></script>
@humphd
humphd / count.js
Last active May 21, 2019
WEB422 Summer 2019 Week 2 Code Example: Modules
View count.js
/**
* Example module to get info about a multi-line string,
* written as a node.js module.
*
* Takes a multiline string, and returns an Object:
*
* "here is a line of text"
*
* {
* lines: [
@humphd
humphd / index.html
Created Apr 4, 2019
WEB222 XHR Dog API Example from Class
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dogs!</title>
</head>
<body>
<form>
<label for="dog-list">Dog Breeds</label>
<select id="dog-list">
@humphd
humphd / LICENSE.md
Last active Apr 2, 2019
Archive of Twitter discusion on MIT License birthdate
View LICENSE.md

Introduciton

The following is an archive of a number of parallel discussions that happened on Twitter on 1 April, 2019.

The original quesion was posed by me, and signal boosted by @stshank:

When was the MIT License created? I can't find any source that gives a year.

Replies

@humphd
humphd / timing.txt
Created Mar 14, 2019
Navigation Timing API testing with different content-type
View timing.txt
// text/plain // application/octet-stream
connectEnd: 1552579830126 connectEnd: 0
connectStart: 1552579830126 connectStart: 0
domComplete: 1552579830151 domComplete: 1552579755465
domContentLoadedEventEnd: 1552579830150 domContentLoadedEventEnd: 1552579755465
domContentLoadedEventStart: 1552579830150 domContentLoadedEventStart: 1552579755465
domInteractive: 1552579830150 domInteractive: 1552579755465
domLoading: 1552579830137 domLoading: 1552579755462
domainLookupEnd: 1552579830126 domainLookupEnd: 0
domainLookupStart: 1552579830126 domainLookupStart: 0
View gist:2a3a2453f4d9d193ee23a13d2074d40d
make nled
rm -Rf /root/buildroot-2018.02/output/build/nled-2.52
nled_2_52_src.tgz: OK (sha256: cf0f95edc8d399e883e38baf51f6a0cea9516761be36e75e8f14943667f7af29)
>>> nled 2.52 Extracting
gzip -d -c /root/buildroot-2018.02/dl/nled_2_52_src.tgz | tar --strip-components=1 -C /root/buildroot-2018.02/output/build/nled-2.52 -xf -
>>> nled 2.52 Patching
>>> nled 2.52 Configuring
>>> nled 2.52 Building
/bin/sed -i -e 's/cc $(CCOPTIONS)/$(CC) -static $(CPPFLAGS) $(CFLAGS) -c/g' /root/buildroot-2018.02/output/build/nled-2.52/Makefile
/bin/sed -i -e 's/cc -o/$(CC) $(LDFLAGS) -o/g' /root/buildroot-2018.02/output/build/nled-2.52/Makefile
@humphd
humphd / filename.js
Created Mar 8, 2018
This is my gist to show how they work
View filename.js
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
The elements of the array are rearranged so as to reverse their order.
The object is returned as the result of the call
esid: sec-array.prototype.reverse
es5id: 15.4.4.8_A1_T1
description: Checking case when reverse is given no arguments or one argument
You can’t perform that action at this time.