I hereby claim:
- I am joona on github.
- I am jmkulmala (https://keybase.io/jmkulmala) on keybase.
- I have a public key ASAr8DdIz3f8GH-cqgLUWaQ3nNfAsD4WDSSCSzXnxf7tCwo
To claim this, I am signing this object:
-- Thank @sbengo to figure out foreign_keys constraints is defaults to false in sqlite | |
-- Enable to delete logs by cascading delete | |
PRAGMA foreign_keys = ON; | |
WITH n_build_ids_per_repo as ( | |
SELECT build_id | |
FROM ( | |
SELECT | |
build_id, | |
build_repo_id, |
"use strict"; | |
const config = global.dasBootConfig; | |
const path = require('path'); | |
const fs = require('fs'); | |
const jsonjs = require('jsonjs'); | |
const handlebars = require('handlebars'); | |
const bucket = config.basePath; | |
const BASE_PATH = config.basePath; |
export function dispatch(el, eventName, payload, options) { | |
options || (options = {}); | |
el || (el = document); | |
el = el.el || el; | |
const event = document.createEvent('Event'); | |
event.initEvent(eventName, options.bubbles !== false, true); | |
event.detail = payload || {}; | |
el.dispatchEvent(event); | |
} |
/* | |
* StoreFactory - Creates plain object to be used as store with listen and dispatch helpers | |
*/ | |
export default function storeFactory(obj) { | |
const store = {}; | |
// Create DOM element to be used as store specific event channel | |
const eventChannel = store._eventChannel = document.createElement('div'); | |
eventChannel.setAttribute('data-store', true); |
const { send } = require('micro'); | |
module.exports = (req, res) => { | |
send(res, 200, { message: 'Hello world!' }); | |
} |
<html><head><style></style></head><body><header><nav>NO:DOM</nav></header><div class="container"><h1>Hello world!!!</h1></div></body></html> | |
<html><head><style></style></head><body><header><nav>NO:DOM</nav></header><div class="container"><h1>Hello world!!!</h1></div></body></html> | |
<html><head><style></style><style></style></head><body><header><nav>NO:DOMNO:DOM</nav><nav>NO:DOMNO:DOM</nav></header><div class="container"><h1>Hello world!!!Hello world!!!</h1><h1>Hello world!!!Hello world!!!</h1></div><header><nav>NO:DOMNO:DOM</nav><nav>NO:DOMNO:DOM</nav></header><div class="container"><h1>Hello world!!!Hello world!!!</h1><h1>Hello world!!!Hello world!!!</h1></div></body></html> | |
<html><head><style></style><style></style></head><body><header><nav>NO:DOMNO:DOM</nav><nav>NO:DOMNO:DOM</nav></header><div class="container"><h1>Hello world!!!Hello world!!!</h1><h1>Hello world!!!Hello world!!!</h1></div><header><nav>NO:DOMNO:DOM</nav><nav>NO:DOMNO:DOM</nav></header><div class="container"><h1>Hello world!!!Hello world!!!< |
I hereby claim:
To claim this, I am signing this object:
export function dispatch(el, eventName, payload, options) { | |
options || (options = {}); | |
el || (el = document); | |
el = el.el || el; | |
var event = new CustomEvent(eventName, { | |
detail: payload || {}, | |
bubbles: options.bubbles !== false | |
}); | |
el.dispatchEvent(event); | |
} |
function distance(lat1, lon1, lat2, lon2) { | |
var radlat1 = Math.PI * lat1/180 | |
var radlat2 = Math.PI * lat2/180 | |
var theta = lon1-lon2 | |
var radtheta = Math.PI * theta/180 | |
var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta); | |
dist = Math.acos(dist) | |
dist = dist * 180/Math.PI | |
dist = dist * 60 * 1.1515 | |
dist = dist * 1.609344 |