kommuner-2019-2020.json (Alle kommuner som har blitt endret).
postnummer.json (Alle postnummer med kommunenummer, gruppert på postnummer).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<body> | |
<script src="https://secure.aadcdn.microsoftonline-p.com/lib/1.0.2/js/msal.min.js"></script> | |
<script> | |
const azureAdAppClientId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; | |
const sharePointUrl = 'https://xxxxxx.sharepoint.com'; | |
const config = { | |
auth: {clientId: azureAdAppClientId}, | |
cache: {cacheLocation: 'localStorage'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use async_std::io; | |
use async_std::net::{TcpListener, TcpStream}; | |
use async_std::prelude::*; | |
use async_std::task; | |
use futures::{AsyncReadExt, future}; | |
async fn in_to_out(incoming: TcpStream, outgoing: TcpStream) { | |
let (incoming_reader, incoming_writer) = &mut (&incoming, &incoming); | |
let (outgoing_reader, outgoing_writer) = &mut (&outgoing, &outgoing); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import no.eirikb.gutsu.Gutsu | |
class DataDesk { | |
fun sendMessage(text: String) { | |
println("${hashCode()}: Sending message: $text") | |
} | |
} | |
class PumpView(private val pumpService: PumpService) { | |
init { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gutsu | |
import no.eirikb.gutsu.Gutsu | |
interface PumpService { | |
fun startPump() | |
} | |
class DataDesk { | |
fun sendMessage(text: String) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "core-js/stable"; | |
import "regenerator-runtime/runtime"; | |
import 'whatwg-fetch'; | |
import { UserAgentApplication } from 'msal'; | |
const clientId = '<PUT YOUR CLIENT ID HERE>'; | |
const scopes = ['User.Read']; | |
const msal = new UserAgentApplication({ auth: { clientId } }); | |
const p = document.querySelector('p'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const data = require('./2019-2020-knr-gnr.json'); | |
/** | |
* @typedef {Object} Matrikkel | |
* @property {string} knr - Kommunenummer | |
* @property {number} gnr - Gårdsnummer | |
*/ | |
function sanitizeKnr(knr) { | |
return String(knr || '').padStart(4, '0'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = table => { | |
const res = []; | |
table.querySelectorAll('tbody tr').forEach((row, y) => | |
row.querySelectorAll('td').forEach((cell, x) => { | |
const rowspan = Number(cell.getAttribute('rowspan') || 1); | |
const colspan = Number(cell.getAttribute('colspan') || 1); | |
while (res[y] && res[y][x]) x++; | |
for (let yy = y; yy < y + rowspan; yy++) { | |
const resRow = res[yy] = res[yy] || []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const head = () => { | |
Object.assign(process.env, require('../local.settings').Values); | |
const orchestrators = {}; | |
console.log.error = console.error; | |
const context = { log: console.log }; | |
const setInput = input => context.bindings = { input: { input } }; | |
const df = { | |
orchestrator(cb) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isOutlookNative = Office.context.mailbox && Office.context.mailbox.diagnostics.hostName === 'Outlook'; | |
if (isOutlookNative) { | |
msal.openPopup = () => { | |
const dummy = { | |
close() { | |
}, | |
location: { | |
assign(url) { | |
Office.context.ui.displayDialogAsync(url, { width: 25 }, res => { |