Skip to content

Instantly share code, notes, and snippets.

View wlepinski's full-sized avatar
🏠
Working from home

William Lepinski wlepinski

🏠
Working from home
View GitHub Profile
@wlepinski
wlepinski / machine.js
Created February 22, 2023 19:41
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@wlepinski
wlepinski / Dockerfile
Created August 21, 2018 11:57
Updated Dockerfile for Laravel with multi-stage builds
#
# PHP Dependencies
#
FROM composer:1.7 as vendor
COPY database/ database/
COPY composer.json composer.json
COPY composer.lock composer.lock

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
var Browser = require('zombie'),
url = require('url'),
fs = require('fs'),
$q = require('Q'),
saveDir = __dirname + '/_snapshots';
var scriptTagRegex = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;
var stripScriptTags = function(html) {