Skip to content

Instantly share code, notes, and snippets.


Matthew Hudson matthewhudson

View GitHub Profile

Shell fuction that downloads the boilerplate.html template.

html5() {
  curl -O

Alternatively, you can pull the official h5bp like this:

matthewhudson /
Last active Jan 13, 2021
It's ok to...

It's ok to...

  • say "I don't know"
  • ask for more clarity
  • stay at home when you feel ill
  • say you don't understand
  • ask what acronyms stand for
  • ask why, and why not
  • forget things
  • introduce yourself
matthewhudson / index.js
Last active Sep 17, 2019
OMG & @webpipe/server interface idea
View index.js
const WebPipeServer = require('@webpipe/server');
// Automatically exposes service definition
// Automatically exposes `/health` checkpoint
module.exports = new WebPipeServer()
// .enableDevelopmentMode() // This line enables dev mode
// .enableMonitorMode() // This line enables monitor mode
.configureEnvironment(environment => {
// environment.setPort()
matthewhudson / index.html
Created Aug 14, 2019
Planets Nav - CPC Fork This
View index.html
<li><a href="#0">Home</a></li>
<li><a href="#0">About</a></li>
<a href="#0">Clients</a>
<li><a href="#0">Burger King</a></li>
<li><a href="#0">Southwest Airlines</a></li>
<li><a href="#0">Levi Strauss</a></li>
matthewhudson / style.css
Created Jun 19, 2019
CSS Custom Properties
View style.css
Found these unfamiliar `--` prefixes on a page and started researching:
You can prefix a double dash to define custom CSS properties:
Browser support is solid:
:root {
--blue: #000;
--indigo: #6610f2;
--purple: #6f42c1;
--pink: #e83e8c;
matthewhudson /
Created May 25, 2019 — forked from idleberg/
“Open in Atom” in macOS context-menu

Open in Atom

  • Open Automator
  • Create a new Service
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /usr/local/bin/atom -n "$@"
  • Set “Pass input” to as arguments
  • Save as Open in Atom
matthewhudson / streamDecodedVideo.js
Created May 25, 2019 — forked from yoannmoinet/streamDecodedVideo.js
Stream video back in correct format.
View streamDecodedVideo.js
import ffmpeg form 'fluent-ffmpeg';
const filePath = '/Users/yoann/Desktop/video.avi';
const route = (req, res) => {
res.writeHead(200, getHeaders({'Content-Type': 'video/mp4'}));
'-movflags frag_keyframe+faststart'
View gist:8a3718955b4143c1d7be
import uuid
import hashlib
import base64
def generate_unique_id():
return base64.b32encode(
def generate_access_token():
return base64.b32encode(hashlib.sha256(uuid.uuid4().bytes).digest())[:52]
View gist:0ac920dd4cb38c0ac80d
Verifying that +matthewhudson is my openname (Bitcoin username).
matthewhudson / devicejs-refactor.js
Last active Dec 21, 2018
First pass at a device.js refactor from CoffeeScript to JavaScript
View devicejs-refactor.js
/*jslint browser: true, indent: 2 */
'use strict';
// Device.js
// (c) 2014 Matthew Hudson
// Device.js is freely distributable under the MIT license.
// For all details and documentation: