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
.title-actions > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item > .action-label.icon.explorer-action { | |
display: none !important; | |
} | |
.editor-actions > .monaco-toolbar > .monaco-action-bar { | |
display: none !important; | |
} |
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 createNode(text) { | |
const node = document.createElement('pre'); | |
node.style.width = '1px'; | |
node.style.height = '1px'; | |
node.style.position = 'fixed'; | |
node.style.top = '5px'; | |
node.textContent = text; | |
return node; | |
} |
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
export default function humanReadableTimeDiff(date) { | |
var dateDiff = Date.now() - date; | |
if (dateDiff <= 0 || Math.floor(dateDiff / 1000) == 0) { | |
return 'now'; | |
} | |
if (dateDiff < 1000 * 60) { | |
return Math.floor(dateDiff / 1000) + 's'; | |
} | |
if (dateDiff < 1000 * 60 * 60) { | |
return Math.floor(dateDiff / (1000 * 60)) + 'm'; |
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
{ | |
"Ansi 6 Color" : { | |
"Red Component" : 0.48627450979999998, | |
"Color Space" : "sRGB", | |
"Blue Component" : 0.94509803920000002, | |
"Alpha Component" : 1, | |
"Green Component" : 0.83529411760000005 | |
}, | |
"Tags" : [ |
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 {true: a} = { | |
[x > 0]: 1, | |
[x < 0]: -1, | |
[x === 0]: 'wow' | |
}; |
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
/* | |
typeOf({}); // 'object' | |
typeOf([]); // 'array' | |
typeOf(function() {}); // 'function' | |
typeOf(/a/); // 'regexp' | |
typeOf(new Date()); // 'date' | |
typeOf(null); // 'null' | |
typeOf(undefined); // 'undefined' | |
typeOf('a'); // 'string' | |
typeOf(1); // 'number' |
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 lazyCompose(...fns) { | |
return fns.reverse().reduce(function reducer(fn1, fn2) { | |
return function composed(...args) { | |
return fn2(fn1(...args); | |
} | |
}); | |
} |
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
import { | |
curryN, | |
partialRight, | |
invoker | |
} from 'ramda'; | |
const invoke = curryN(3, function invoke(arity, method, receiver) { | |
return partialRight(invoker(arity, method), [receiver]); | |
}); |
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 getProductionUnitByKey (currentProductionUnitKey, bids) { | |
let result; | |
for (const key in bids) { | |
if (key === currentProductionUnitKey) { | |
return bids[key]; | |
} | |
result = getProductionUnitByKey(currentProductionUnitKey, bids[key].children); | |
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 withDefault (value, defaultValue) { | |
if (value === undefined || value === null) { | |
return defaultValue; | |
} | |
return value; | |
} | |
// const velocity = withDefault(config.velocity, 0); |