Skip to content

Instantly share code, notes, and snippets.

Marcus Stade mstade

Block or report user

Report or block mstade

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
@mstade
mstade / ticket.txt
Created Jul 5, 2018
Ticket example
View ticket.txt
data:text/html;charset=utf-8;base64,PGh0bWw+CjxoZWFkPgogIDxtZXRhIGNoYXJzZXQ9InV0Zi04Ij4KICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRoIj4KICA8YmFzZSB0YXJnZXQ9Il90b3AiPgogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CiAgICBib2R5IHsKICAgICAgbWFyZ2luOjAgYXV0bzsKICAgICAgcGFkZGluZzoxMnZtaW4gMTB2bWluOwogICAgICBtYXgtd2lkdGg6MzVlbTsKICAgICAgbGluZS1oZWlnaHQ6MS41ZW07CiAgICAgIGZvbnQtZmFtaWx5OiAtYXBwbGUtc3lzdGVtLEJsaW5rTWFjU3lzdGVtRm9udCxzYW5zLXNlcmlmOwogICAgICB3b3JkLXdyYXA6IGJyZWFrLXdvcmQ7CiAgICB9CiAgPC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4KICA8aDE+SGVsbG8sIGhlcmUncyB5b3VyIHRpY2tldCE8L2gxPgogIDxpbWcgc3JjPSJkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LFBEOTRiV3dnZG1WeWMybHZiajBpTVM0d0lpQmxibU52WkdsdVp6MGlkWFJtTFRnaVB6NDhjM1puSUhabGNuTnBiMjQ5SWpFdU1TSWdZbUZ6WlZCeWIyWnBiR1U5SW1aMWJHd2lJQ0IzYVdSMGFEMGlNalkwSWlCb1pXbG5hSFE5SWpJMk5DSWdkbWxsZDBKdmVEMGlNQ0F3SURJMk5DQXlOalFpSUhodGJHNXpQU0pvZEhSd09pOHZkM2QzTG5jekxtOXlaeTh5TURBd0wzTjJaeUlnZUcxc2JuTTZlR3hwYm1zOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6RTVPVGt2ZUd4cGJtc2lJSGh0Ykc1ek9tVjJQU0pvZEhSd09p
View keybase.md

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 Oct 12, 2016
Updating rows
View .block
license: mit
@mstade
mstade / unblock-us.bash
Last active Dec 20, 2015
unblock-us toggle
View unblock-us.bash
# 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
View gist:249b017fa04c53e80d50
(automaton init
(init : (c → more))
(more : (a → more)
(d → more)
(r → end))
(end : ))
@mstade
mstade / index.js
Created Nov 26, 2014
emails index
View index.js
// Documents look like:
{ profile:
{ emails:
[ { type: "account", "foo@bar.com" }
, { type: "work", "bar@foo.com" }
]
}
}
@mstade
mstade / user.json
Last active Aug 29, 2015
user document
View user.json
{ "id": "foo@bar.com"
, "idp":
[ { "name": "google" , "id": "foo@google.com" }
, { "name": "twitter" , "id": "@foo-bar" }
, { "name": "facebook" , "id": "foo.bar" }
]
}
View code.js
r.connect({ host: 'localhost', port: 28015, db: 'app' }, function(err, conn) {
debug('conn: %s:%s/%s', conn.host, conn.port, conn.db)
if (err) return callback(err)
debug('conn open? %s', conn.open? 'yes' : 'no')
debug('run: %s', query)
query.run(conn, function(err, result) {
if (err) {
debug('run: Failed to run query; error was: ', err.message)
@mstade
mstade / auto-rewind-it.js
Last active Aug 29, 2015
ES6 auto-rewinding iterators
View auto-rewind-it.js
function range(n) {
var i = 0
return { next: step }
function step() {
if (i++ < n) return { value: i }
return i = 0, { done: '110%' }
}
@mstade
mstade / rewindable-it.js
Last active Aug 29, 2015
ES6 rewindable iterators
View rewindable-it.js
function range(n) {
var i = 0
return { next: step, rewind: rewind }
function step() {
return i++ < n? { value: i } : { done: '110%' }
}
function rewind() { i = 0 }
You can’t perform that action at this time.