I hereby claim:
- I am runeh on github.
- I am runefh (https://keybase.io/runefh) on keybase.
- I have a public key whose fingerprint is 0364 1B02 B674 503C 1FBE C8E7 A979 D86F 0E49 13DB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import * as rt from 'runtypes'; | |
export type JSONPrimitive = string | number | boolean | null; | |
export type JSONValue = JSONPrimitive | JSONObject | JSONArray; | |
export type JSONObject = { [member: string]: JSONValue }; | |
export type JSONArray = Array<JSONValue>; | |
type JSONRoot = JSONArray | JSONObject; | |
const JSONPrimitiveRt = rt.Intersect(rt.String, rt.Number, rt.Boolean, rt.Null); | |
const JSONValueRt: rt.Runtype<JSONValue> = rt.Lazy(() => |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
const stiftemaskinenMachine = Machine({ | |
id: 'stiftemaskinen', | |
initial: 'pristine', | |
states: { | |
pristine: { | |
on: { | |
TOUCH_FORM: { | |
target: 'open', |
const client = sanityClient({ | |
projectId: 'p354jyup', | |
dataset: 'main', | |
useCdn: true, | |
}); | |
// needs polyfill | |
const origin = window.location.origin | |
client.clientConfig.cdnUrl = `${origin}/sanity`; |
$ var personPromise = new Promise((resolve, reject) => { | |
setTimeout(function() { | |
reject('oh no'); | |
}, 1000); | |
}); | |
<await(person from personPromise)> | |
<div>Works</div> | |
<await-error>something went wrong</await-error> | |
</await> |
function getElementsByAttribute(attrName, root) { | |
root = root || document; | |
if (root.querySelectorAll) { | |
return root.querySelectorAll("[" + attrName + "]"); | |
} | |
else { | |
var ret = []; | |
var elems = root.getElementsByTagName("*"); | |
for (var n = 0, ele; ele = elems[n++];) { | |
if (ele.hasAttribute(attrName)) { |
test |
app.controller( 'AppCtrl', function ($scope, socket) { | |
socket.onopen( | |
function(){ | |
console.log('Socket is connected :D') | |
} | |
) | |
socket.onclose( | |
function(){ | |
console.log('Socket is disconnected :(') | |
} |
#!/bin/bash | |
while : | |
do | |
clear | |
lines=`tput lines` | |
lines=`expr $lines - 2` | |
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all --color $* | head -n $lines | |
sleep 1 | |
done |