Skip to content

Instantly share code, notes, and snippets.

Mikael Karon mikaelkaron

Block or report user

Report or block mikaelkaron

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
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@mikaelkaron
mikaelkaron / machine.ts
Created Jun 7, 2019
App XState machine with routing
View machine.ts
// Available variables:
// Machine (machine factory function)
// assign (action)
// XState (all XState exports)
const send = XState.send;
const fetchMachine = Machine({
id: 'app',
View gist:d5273ec6bb248b6014716269ea575d0a
Verifying that "mikaelkaron.id" is my Blockstack ID. https://explorer.blockstack.org/name/mikaelkaron.id
View gist:77de7cf779ea4526141f0e3654d23b57
Verifying my Blockstack ID is secured with the address 18q7afzib633kN75SDPPZc4NfRsspY9Agj https://explorer.blockstack.org/address/18q7afzib633kN75SDPPZc4NfRsspY9Agj
View keybase.md

Keybase proof

I hereby claim:

  • I am mikaelkaron on github.
  • I am mikaelkaron (https://keybase.io/mikaelkaron) on keybase.
  • I have a public key whose fingerprint is 71F7 16DD 5417 25B1 D94E 7EC6 CBC1 8BD4 3204 8D28

To claim this, I am signing this object:

@mikaelkaron
mikaelkaron / build.js
Last active Apr 26, 2017
SystemJS package an existing bundle
View build.js
var Builder = require("systemjs-builder");
var builder = new Builder({
baseURL: "node_modules",
map: {
"jquery": "jquery/dist/jquery.js",
"text": "systemjs-plugin-text/text.js",
"css": "systemjs-plugin-css/css.js",
"clerk": "."
},
@mikaelkaron
mikaelkaron / module.js
Last active Aug 29, 2015
Async jquery multi ajax
View module.js
define([ "when/parallel", "jquery" ], function (parallel, $) {
var tasks = [ "url1", "url2", "url3" ].map(function (url) {
return function () {
return $.get(url);
};
});
parallel(tasks)
.then(function (results) {
View gist:215a54f962cb57243f09
(function (sources, delay, success, fail) {
function onload() {
this.stop = new Date().getTime();
window.setTimeout(next, success.apply(this, arguments) || delay);
}
function onerror() {
this.stop = new Date().getTime();
window.setTimeout(next, fail.apply(this, arguments) || delay);
}
@mikaelkaron
mikaelkaron / simple.js
Last active Aug 29, 2015
Parsing a semver string and translating values
View simple.js
"1.2.3-pre+build".match(/(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:-([^+]+))?(?:\+(.+))?/).map(function (value, index) { return index > 0 && index < 4 ? parseInt(value || 0) : value; });
You can’t perform that action at this time.