Skip to content

Instantly share code, notes, and snippets.

View mstade's full-sized avatar

Marcus Stade mstade

View GitHub Profile
@mstade
mstade / ticket.txt
Created July 5, 2018 17:32
Ticket example
data:text/html;charset=utf-8;base64,PGh0bWw+CjxoZWFkPgogIDxtZXRhIGNoYXJzZXQ9InV0Zi04Ij4KICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRoIj4KICA8YmFzZSB0YXJnZXQ9Il90b3AiPgogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CiAgICBib2R5IHsKICAgICAgbWFyZ2luOjAgYXV0bzsKICAgICAgcGFkZGluZzoxMnZtaW4gMTB2bWluOwogICAgICBtYXgtd2lkdGg6MzVlbTsKICAgICAgbGluZS1oZWlnaHQ6MS41ZW07CiAgICAgIGZvbnQtZmFtaWx5OiAtYXBwbGUtc3lzdGVtLEJsaW5rTWFjU3lzdGVtRm9udCxzYW5zLXNlcmlmOwogICAgICB3b3JkLXdyYXA6IGJyZWFrLXdvcmQ7CiAgICB9CiAgPC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4KICA8aDE+SGVsbG8sIGhlcmUncyB5b3VyIHRpY2tldCE8L2gxPgogIDxpbWcgc3JjPSJkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LFBEOTRiV3dnZG1WeWMybHZiajBpTVM0d0lpQmxibU52WkdsdVp6MGlkWFJtTFRnaVB6NDhjM1puSUhabGNuTnBiMjQ5SWpFdU1TSWdZbUZ6WlZCeWIyWnBiR1U5SW1aMWJHd2lJQ0IzYVdSMGFEMGlNalkwSWlCb1pXbG5hSFE5SWpJMk5DSWdkbWxsZDBKdmVEMGlNQ0F3SURJMk5DQXlOalFpSUhodGJHNXpQU0pvZEhSd09pOHZkM2QzTG5jekxtOXlaeTh5TURBd0wzTjJaeUlnZUcxc2JuTTZlR3hwYm1zOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6RTVPVGt2ZUd4cGJtc2lJSGh0Ykc1ek9tVjJQU0pvZEhSd09p

Keybase proof

I hereby claim:

  • I am mstade on github.
  • I am mstade (https://keybase.io/mstade) on keybase.
  • I have a public key whose fingerprint is 0D08 9BE1 38F7 B4F2 B34C 7BD3 505D 336E C17A 2E6D

To claim this, I am signing this object:

@mstade
mstade / .block
Last active October 12, 2016 13:27
Updating rows
license: mit
@mstade
mstade / view.md
Last active January 4, 2016 23:12
Some thoughts on application/view

Application views using HTTP trickery

If the client makes a request, let's say this is an initial request to a resource that the client knows nothing about. It goes along and does a little something like this:

GET /foo HTTP/1.1
Accept: text/html
@mstade
mstade / test.md
Last active January 3, 2016 22:39
Testing GFM syntax

Syntax:

Works
  = Swimmingly
  / Beautiful

List with headings:

  • Well this is fun
@mstade
mstade / bridging-the-gap.md
Last active December 30, 2015 17:59
Programmable Hypermedia Client Blues

Programmable Hypermedia Client Blues (Part I)

In Restful Web APIs it is argued that one of the major problems with APIs (arguably regardless of whether they are RESTful) is that they don't convey enough semantics so a client unfamiliar with implementation details (media type, URL structures, HTTP methods etc.) could still make use of it. On the "human web" this isn't really a problem, as the book rightly points out, because humans are much better at making decisions despite considerable semantic gaps. For example, if a site contains a link with the text:

Click here to buy our most popular product!

It's easy for us to understand that we can click on it to purchase an item; a computer however would just see some additional markup and realize it's a link, but not where it points to, why or what it is:

body {
background: rgb(239, 239, 244);
}
.toggle {
position: relative;
display: inline-block;
font-family: "Helvetica Neue";
font-size: 10pt;
border: 1px solid lightgrey;
@mstade
mstade / unblock-us.bash
Last active December 20, 2015 19:00
unblock-us toggle
# Unblock-US toggler
function unblock-us() {
local status="${1}"
local default="Wi-Fi"
local service="${2:-${default}}"
if [[ "${status}" == "on" ]]; then
local dns=(208.122.23.23 208.122.23.22)
elif [[ "${status}" == "off" ]]; then
(automaton init
(init : (c → more))
(more : (a → more)
(d → more)
(r → end))
(end : ))
@mstade
mstade / index.js
Created November 26, 2014 17:54
emails index
// Documents look like:
{ profile:
{ emails:
[ { type: "account", "foo@bar.com" }
, { type: "work", "bar@foo.com" }
]
}
}