Skip to content

Instantly share code, notes, and snippets.

Matthew Mueller matthewmueller

Block or report user

Report or block matthewmueller

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
matthewmueller /
Last active Sep 18, 2019
Inlets Unit file for Amazon Linux 2
matthewmueller /
Last active Sep 10, 2019
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
# Source:
# Some things taken from here
# Ask for the administrator password upfront
matthewmueller / escape-json.js
Created Aug 25, 2012
Escape JSON strings before trying to run JSON.parse
View escape-json.js
Escape JSON
var escapeJSON = exports.escapeJSON = function(json) {
var escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
var meta = { // table of character substitutions
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
matthewmueller / index.js
Created Mar 12, 2019
async constructors
View index.js
class Car {
constructor() {
return Promise.resolve(
async new() {
await this.sleep(1000)
this._wheels = 4
return this


yarn add express
node index.js

How to Test

I ran this test on Chrome. To see it getting the flash of unstyled content, you'll need to set the 3G setting in Chrome Dev Tools:

matthewmueller / split-by-slash.go
Created Feb 16, 2018
Nice little function to split by slashes while ignoring slashes inside quotes (e.g. /Invoices/"Invoice (9/1)"/invoice.txt)
View split-by-slash.go
func splitBySlash(s string) []string {
lastQuote := rune(0)
slash := rune(filepath.Separator)
f := func(c rune) bool {
switch {
case c == lastQuote:
lastQuote = rune(0)
return false
case lastQuote != rune(0):
matthewmueller / index.html
Last active Jan 11, 2018
HTML Starter Template for rock-solid Web Apps
View index.html
HTML Starter Template for rock-solid Web Apps
Get the latest template here:
View bookmarklet.js
javascript:(function () {var script = document.createElement('script');script.setAttribute('src', '$FILEPATH');document.body.appendChild(script);}());
View layout.css
Flex Layout
.layout.vertical-reverse {
display: -ms-flexbox;
display: -webkit-flex;
View main.go
package main
func main() {
task := model.NewTask()
err := task.Create(model.Task{
Rate: "* * * * *",
Key: "hi world",
You can’t perform that action at this time.