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 { match } from "assert"; | |
| import { test, expect } from "vitest"; | |
| const STATUS_REJECTED = 429; | |
| const STATUS_ACCEPTED = 200; | |
| type HttpRequest = { id: string; path: string; user_id: string }; | |
| type HttpResponse = { request_id: string; status: number }; | |
| interface RequestHandler { |
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
| <%* | |
| if ((new RegExp(/^\d{4}$/)).test(tp.file.title)) { | |
| await tp.file.move(tp.date.now("[LifeOS]/YYYY/YYYY", 0, tp.file.title, "YYYY")); | |
| tR += await tp.file.include("[[Year Note Template]]"); | |
| } | |
| if ((new RegExp(/^\d{4}-Q\d$/)).test(tp.file.title)) { | |
| await tp.file.move(tp.date.now("[LifeOS]/YYYY/YYYY-[Q]Q", 0, tp.file.title, "YYYY-[Q]Q")); | |
| tR += await tp.file.include("[[Quarter Note Template]]"); | |
| } | |
| if ((new RegExp(/^\d{4}-W\d{2}$/)).test(tp.file.title)) { |
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
| module.exports = { | |
| makeRelationshipSet: () => ({ | |
| required: {}, | |
| conflicting: {} | |
| }), | |
| dependsOn: (package, requiredDependency, ruleSet) => { | |
| initPackage(package, ruleSet); | |
| initPackage(requiredDependency, ruleSet); | |
| ruleSet.required[package].push(requiredDependency); |
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
| module.exports = { | |
| makeRelationshipSet: () => ({ | |
| required: {}, | |
| conflicting: {} | |
| }), | |
| dependsOn: (package, requiredDependency, ruleSet) => { | |
| initPackage(package, ruleSet); | |
| initPackage(requiredDependency, ruleSet); | |
| ruleSet.required[package].push(requiredDependency); |
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
| 'use strict' | |
| /** | |
| * I'm using node 5.10.1 --harmony_default_parameters reporting v8 '4.6.85.31' | |
| * | |
| * [Bug] Default Parameters referring to class names do not work with Fat Arrow functions | |
| * So I figured, maybe it's just a difference between Fat Arrow Functions and Full Functions, | |
| * but then I realised that by declaring a Full Function referencing the class, | |
| * it caused the Fat Arrow Function to execute fine. This tells me it's a bonafide bug. | |
| */ |
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
| <?php | |
| // Don't touch these | |
| $elementLevel = array( | |
| 0 => 'zero', | |
| 1 => 'one', | |
| 2 => 'two', | |
| 3 => 'three', | |
| 4 => 'four', | |
| 5 => 'five', | |
| 6 => 'six', |
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
| _.map([1, 2, 3], function(n){ return n * 2; }); | |
| _([1, 2, 3]).map(function(n){ return n * 2; }); |