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
1. kn0thing | |
2. spez | |
3. third | |
4. fifth | |
5. fourth | |
6. agentorange | |
7. chickenlittle | |
8. erzengel | |
9. fizzypop | |
10. madmax2 |
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 fs from 'fs'; | |
import { exec } from 'child_process'; | |
const compilationConfig = JSON.parse(fs.readFileSync('compilerconfig.json', 'utf8')); | |
compilationConfig | |
.filter(fileConfig => fileConfig.inputFile.endsWith('.less')) | |
.map(({outputFile, inputFile, minify}) => { | |
try { | |
console.log("LESS\tInput:\t" + inputFile); |
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
/** | |
* Recursively navigates into nested collections inside `collection` by | |
* following a sequence of properties `pathArray`, executing any methods | |
* along the way, and returning the first `undefined` encountered. | |
* @param {any} collection - The collection to traverse. | |
* @param {Array<string|number|function()>} pathArray - A sequence of | |
* property names, indexes, or functions to traverse into the `collection`. | |
* @returns {any|undefined} The final value found, | |
* otherwise the first `undefined` encountered. | |
* @example |
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
[General] | |
bGamepadEnable=0 | |
sIntroSequence=0 | |
bSkipSplash=1 | |
bDisableAllGore=0 | |
[Display] | |
uiOrthoShadowFilter=3 | |
bVolumetricLightingEnable=0 | |
iSize H=1080 | |
iSize W=1920 |
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 advise = (fn, preFn = (...args) => args, postFn = (...args) => args) => | |
(...args) => | |
postFn(fn(...preFn(...args))); | |
add = (x, y) => | |
x + y; | |
advisedAdd = advise( | |
add, |
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
using System; | |
using System.ComponentModel; | |
using System.Reflection; | |
using System.Windows.Data; | |
public class EnumBindingSourceExtension : System.Windows.Markup.MarkupExtension | |
{ | |
private Type _enumType; | |
public Type EnumType | |
{ |
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 numbers = document.body.textContent.trim().split('\n').map(Number); | |
const set = new Set(numbers); | |
const goalSum = 2020; | |
const difference = n => goalSum - n; | |
const subtrahend = numbers.find(n => set.has(difference(n))); | |
const minuend = difference(subtrahend); | |
const product = subtrahend * minuend; | |
console.log(product); |
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
// Example 1 or 2-arity function f | |
const f = (...args) => | |
[ | |
(x) => console.log("One param"), | |
(x, y) => console.log("Two params") | |
][args.length-1](...args); | |
f(1) // "One param" | |
f(1, 2) // "Two param" |
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 values = { | |
I: 1, | |
V: 5, | |
X: 10, | |
L: 50, | |
C: 100, | |
D: 500, | |
M: 1000 | |
}; |
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
function add(x, y) { | |
const apiUrl = `https://api.mathjs.org/v4/?expr=${x}%2B${y}`; | |
try { | |
let xhr = new XMLHttpRequest(apiUrl); | |
xhr.open('GET', apiUrl, false); | |
xhr.send(); | |
return Number(xhr.responseText); | |
} catch (ex) { | |
console.log("Ya'll numbers fucky"); | |
return NaN; |
NewerOlder