Skip to content

Instantly share code, notes, and snippets.

View humphd's full-sized avatar
💭
Helping others get started

David Humphrey humphd

💭
Helping others get started
View GitHub Profile
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 March 8, 2018 18:22
This is my gist to show how they work
// 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
@humphd
humphd / Lab 11
Created December 14, 2017 14:51
test.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>OSD600-Lab 11 </title>
</head>
<body>
<script>
var url = 'https://i2.wp.com/www.marcobeltempo.com/wp-content/uploads/2016/05/mb_logo_38x38.png?fit=38%2C38&ssl=1';
var img = new Image();
@humphd
humphd / results.md
Created May 24, 2017 16:28
Filer Test Test Suite
Browser Passes Tests Time (ms)
Chrome 48.68
Chrome Incognito 15.16
Chrome (ChromeOS) 18.30
Firefox 47.91
Firefox Private Window N/A
Safari 92.41
Safari Private Window N/A
Safari Beta Preview 87.13
@humphd
humphd / test.html
Last active August 29, 2015 14:23
Trying to debug IE loading of Bramble API
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bramble Loading in IE</title>
<script src="https://mozillathimblelivepreview.net/bramble/dist/bramble.js"></script>
</head>
<body>
<script>
document.write(window.Bramble ? "It worked" : "It failed");
@humphd
humphd / gist:d4021a069f803c0dde78
Created April 24, 2015 16:37
WebSocket thing
function send(mp3Url, duration) {
var url = "ws://your websocket server url here";
var msg = {
"play": mp3Url,
"duration": duration
};
var ws = new WebSocket(url);
ws.onopen = function() {
if(ws.readyState !== ws.OPEN) {
@humphd
humphd / Gruntfile.js
Created October 6, 2014 16:57
Testing new feature for grunt
module.exports = function( grunt ) {
grunt.initConfig({
pkg: grunt.file.readJSON( "package.json" ),
jshint: {
options: {
"-W069": true // ignore "['...'] is better written in dot notation." warnings
},
files: [
"Gruntfile.js",
"install-webmaker.js",
@humphd
humphd / index.js
Last active August 29, 2015 14:05
MakeDrive Client API Example
// MakeDrive API - https://github.com/mozilla/makedrive
var MakeDrive = require('./path/to/makedrive.js');
// fs API - https://github.com/js-platform/filer#filer
var fs = MakeDrive.fs();
// Use fs right away, with or without network
fs.mkdir('/project', function(err) {
if(err) throw err;
@humphd
humphd / readme.md
Created April 23, 2014 15:59
Github Discusion

==Git and Github==

@humphd
humphd / gist:6584999
Created September 16, 2013 19:02
safeLookup of a JSON inflated object along a path
function safeLookup(obj, propPath, fallback) {
fallback = fallback || '';
var props = propPath.split('.');
// Descend obj along the path specified in propPath, but
// don't trust that that path is good, and may contain
// undefined routes.
try {
props.forEach(function(prop) {