Skip to content

Instantly share code, notes, and snippets.

Mark Wunsch mwunsch

Block or report user

Report or block mwunsch

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
mwunsch / broadcast.rkt
Last active May 13, 2018
!!con 2018 Presentation - Overscan
View broadcast.rkt
#lang overscan
(require overscan/macos
(only-in racket/file make-temporary-file)
(only-in racket/math pi)
(define cam+screen
mwunsch / Main.elm
Last active Mar 22, 2017
Elm Boilerplate
View Main.elm
module Main exposing (..)
-- Stick this Elm file in a directory. Run `elm make` in the
-- directory. Run `elm reactor`. Now you have an Elm program.
import Html exposing (..)
main : Program Never Model Msg
main =
mwunsch / index.js
Last active Jul 20, 2016
CFN Custom Resource - GitHub CodeDeploy webhook
View index.js
const response = require('cfn-response');
const http = require('https');
const url = require('url');
exports.handler = function(event, context) {
var props = event.ResourceProperties;
var options = {
hostname: '',
headers: {
'Accept': 'application/vnd.github.v3+json',
'Authorization': `token ${props.GitHubToken}`,
View REM_10PRINT_Variation_1.pde
void setup() {
size(1080, 1080);
background(0, 0, 255);
int rows = int(pow(2, int(random(1,6))));
int u = height / (rows + 4);
int thickness = int(pow(2, int(random(1, 4))));
int uth1 = u / thickness;
int uth2 = u + uth1;
int startX = int(-u * 0.75);
mwunsch / dom-zipper.js
Last active Aug 29, 2015
A blah implementation of a Zipper for the DOM
View dom-zipper.js
/* I'm not thrilled with this, but it should be enough to demonstrate ... something ... */
function Breadcrumb(el) {
this.path = el.parentElement ? new Breadcrumb(el.parentElement) : null;
this.left = el.previousElementSibling;
this.right = el.nextElementSibling;
function Zipper(tree, path) {
this.tree = tree;
this.crumb = new Breadcrumb(tree);
mwunsch / dress.html
Created Apr 23, 2015
createTreeWalker + createDocumentFragment = diff
View dress.html
<!DOCTYPE html>
<div class="grid-thumb" id="grid-thumb-viv9" data-style-name="VIV9">
<a class="item-link" href="/shop/designers/vivienne_westwood_anglomania/julia_dress">
<div class="grid-thumb-images">
<img class="current" alt="Vivienne%20Westwood%20Anglomania - Julia%20Dress" width="270" height="405" src="">
<img alt="Vivienne%20Westwood%20Anglomania - Julia%20Dress" width="270" height="405" src="" class="">
<img alt="Vivienne%20Westwood%20Anglomania - Julia%20Dress" width="270" height="405" src="">
mwunsch / viz.js
Created Apr 23, 2015
DOM -> Graphviz
View viz.js
This is an incredibly rudimentary PhantomJS script to walk a DOM and emit a graphviz `dot` document.
It is neither clever nor good.
Proceed with caution.
Usage: phantomjs viz.js | tee >(dot -Tpng > test.png)
var page = require('webpage').create();
var args = require('system').args;
puthtml ()
curl -F "file=@${1:--};filename=${1:-`uuidgen`.html}" \
-F "api_key=${2:-$PUTHTML_API_KEY}" \;
View scrape.rb
require 'rumoji'
codepoints =
codepoints.each do |c|
puts "{c}.png"

Keybase proof

I hereby claim:

  • I am mwunsch on github.
  • I am wunsch ( on keybase.
  • I have a public key whose fingerprint is CE28 EDB9 BAD2 F531 7941 B65A 9E26 C63A DC75 6EEF

To claim this, I am signing this object:

You can’t perform that action at this time.