I hereby claim:
- I am michieldemey on github.
- I am michieldemey (https://keybase.io/michieldemey) on keybase.
- I have a public key ASAMVzuGgsiMNwwR7VsjFMrfzylMnJB4xyLk0Lgl0TfhrAo
To claim this, I am signing this object:
const mockPoll = () => { | |
return new Promise((resolve, reject) => { | |
console.log('Polling...') | |
setTimeout(() => { | |
console.log('Done polling') | |
return resolve([{ | |
id: 'foo', | |
name: 'Foo' | |
}, { | |
id: 'bar', |
const mockPoll = () => { | |
return new Promise((resolve, reject) => { | |
console.log('Polling...') | |
setTimeout(() => { | |
console.log('Done polling') | |
return resolve([{ | |
id: 'foo', | |
name: 'Foo' | |
}, { | |
id: 'bar', |
const dialTimeout = 7000; | |
const answerTimeout = 7000; | |
const externalActions = { | |
notify: () => { | |
window.alert('Notified care circle'); | |
} | |
} | |
const dialActor = (timeout = 5000) => { |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
const guards = { | |
maxAttemptsReached: (ctx, event, { cond }) => { | |
return ctx[cond.actor].attempts >= cond.numAttempts && !ctx[cond.actor].success | |
}, | |
maxAttempsCurrentCarerReached: (ctx, event, { cond }) => { | |
return ctx.carers[ctx.currentCarerIndex].attempts >= cond.numAttempts && !ctx.carers[ctx.currentCarerIndex].success | |
}, | |
additionalAttemptsMainCarerReached: (ctx, event, { cond }) => { | |
return ctx.mainCarer.additionalAttempts >= cond.numAttempts | |
}, |
const fs = require('fs') | |
const transfuse = require('transfuse') | |
const stationsStream = fs.createReadStream('./stations.json') | |
const geoJSONStream = fs.createWriteStream('./stations.geojson', { autoClose: false }) | |
const stationTransformer = transfuse((doc, map) => { | |
if (doc.lng > 180.0 || doc.lng < -180.0 || | |
doc.lat > 90.0 || doc.lat < -90.0) { | |
console.log('malformed location', doc.naam) |
I hereby claim:
To claim this, I am signing this object:
# before_filter :authenticate_admin_user! | |
before_filter :cors_preflight_check | |
after_filter :cors_set_access_control_headers | |
# For all responses in this controller, return the CORS access control headers. | |
def cors_set_access_control_headers | |
headers['Access-Control-Allow-Origin'] = '*' | |
headers['Access-Control-Allow-Methods'] = 'POST, GET, OPTIONS' |