This file contains hidden or 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
// What the fuck is V8 doing???? | |
import { summary, run, bench } from 'mitata'; | |
function printCurrentStatus(fn) { | |
let opt = %GetOptimizationStatus(fn) | |
console.log(`${opt.toString(2).padStart(17, '0').split('').join(' ')} (${opt}) ${fn.name}`) | |
} | |
function printStatusHelperText() { |
This file contains hidden or 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
<table id="openingtable" class="mytable" cellspacing="0" cellpadding="0"> | |
<tr> | |
<td>9.des</td> | |
<td>Mánudagur</td> | |
<td>kl.10.00 – 18.00</td> | |
</tr> | |
<tr> | |
<td>10.des</td> | |
<td>Þriðjudagur</td> | |
<td>kl.10.00 – 18.00</td> |
This file contains hidden or 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
var myItems = [1,2,3,4,5,6] | |
myTest(myItems, 0) | |
function myTest(items, i) { | |
if (!items[i]) return; | |
// Print immediately | |
console.log('outside setTimeout: ' + items[i]) | |
// Wait 5 seconds | |
setTimeout(function() { |
This file contains hidden or 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
var myItems = [1,2,3,4,5,6] | |
for (var i = 0; i < myItems.length; i++) { | |
myTest(myItems, i) | |
} | |
function myTest(items, i) { | |
console.log('outside setTimeout: ' + items[i]) | |
setTimeout(function() { console.log('inside setTimeout: ' + items[i]) }, 5000) | |
} |
This file contains hidden or 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 socket = require('../socket') | |
const m = require('mithril') | |
const Status = { | |
oninit: function() { | |
this.current = [] | |
this.connected = socket.connected | |
this.status = { | |
connected: false, | |
playing: false, |
This file contains hidden or 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
/* eslint-disable */ | |
var knex = require('knex') | |
var config = { | |
connection: { | |
host: '127.0.0.1', | |
}, | |
pool: { | |
min: 1, | |
max: 1, |
This file contains hidden or 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
function versioning(paths) { | |
let versions = Object.keys(paths); | |
let defaultPath = versions[0]; | |
return function(request, reply) { | |
if (versions.contains(request.headers['accept-header'])) { | |
return paths[request.headers['accept-header']](request, reply); | |
} | |
return paths[defaultPath](request, reply); | |
} |
This file contains hidden or 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
var focusElement = function(element) { | |
element.focus(); | |
} | |
var inputFinished = function(month, event) { | |
if (event && event.keyCode === 13) { | |
month.setName(editingMonthName()); | |
} | |
editingMonthName = null; | |
} |
This file contains hidden or 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
var _ = require('lodash'), | |
config = require('../config'); | |
module.exports = list = { | |
active: m.prop(''), | |
list: m.prop([]), | |
init: function(items, active) { | |
list(items); | |
active(active); |
This file contains hidden or 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
campaigns.aip_reduce = function(list) { | |
var stats = { "active" : 0, "pending" : 0, "inactive" : 0 }; | |
list.forEach(function(curr) { | |
switch (curr.status) { | |
case "active": | |
stats.active += 1; | |
break; | |
case "pending": | |
stats.pending += 1; | |
break; |
NewerOlder