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
/* | |
* Created by Trevor Sears <trevor@trevorsears.com> (https://trevorsears.com/). | |
* 9:05 AM -- December 21st, 2021 | |
*/ | |
/** | |
* Returns an array representing the intersection between all of the provided input sets. | |
* | |
* @param {Iterable<T>} sets The sets for which an intersection subset should be generated. | |
* @returns {T[]} An array representing the intersection between all of the provided input sets. |
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
/** | |
* A regular expression that matches HTML entities. | |
* - 1st Capture Group: The entire matched HTML entity. | |
* - 2nd Capture Group: The inner text of the entity (everything inside the '&' and ';' characters). | |
* - 3rd Capture Group: The integer value of the entity, if one is found (i.e. 'Ӓ' --> '1234'). | |
*/ | |
const HTML_ENTITY_REGEX: RegExp = /&(#([0-9]+)|[a-zA-Z0-9]+);/; | |
/** | |
* Returns the input string after having converted all recognized HTML entities to their respective unicode characters. |
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
/* | |
* Created by Trevor Sears <trevor@trevorsears.com> (https://trevorsears.com/). | |
* 12:43 PM -- September 14th, 2021 | |
*/ | |
/** | |
* Returns all of the unique properties found in any of the objects within the given array. | |
* | |
* @param {T[]} jsonArray The array of objects over which to build a list of unique properties. | |
* @returns {Array<keyof T>} An array containing all of the unique properties found in any of the objects within the |
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
^\s*(?:(?<export>export)\s+)?(?<typeType>class|abstract\s+class|interface)\s+(?:(?<typeName>[a-zA-Z][a-zA-Z0-9]*)(?<typeGenerics><.*?>)?)\s+(?:extends\s+(?<extends>[a-zA-Z][a-zA-Z0-9]*(?:<.*?>)?)\s+)?(?:implements\s+(?<implements>[a-zA-Z][a-zA-Z0-9]*(?:<.*?>)?(?:,\s+[a-zA-Z][a-zA-Z0-9]*(?:<.*?>)?)*)\s+)?{ |
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
# Check the following link for more info: | |
# https://www.freedesktop.org/software/systemd/man/systemd.service.html | |
[Unit] | |
# The descriptive text used to describe this service. | |
Description=description for this service | |
# The directory inside which this service should run. | |
WorkingDirectory=/home/web/web_trevorsears/@ |
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
// Matches broken 'quot' escaped strings (i.e. '"' characters). | |
((^|[^&a-zA-Z])quot($|[^;a-zA-Z])|(^|[^&a-zA-Z])quot;|"($|[^;a-zA-Z])) | |
// Matches: | |
// - quot | |
// - quot; | |
// - " | |
// Does not match: | |
// - quote |
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
/(?(DEFINE) | |
(?<defunreserved>[A-Za-z0-9-._~]) | |
(?<defpctencoded>\%[0-9A-Fa-f]{2}) | |
(?<defsubdelims>[!$&'()*+,;=]) | |
(?<defpchar>((?P>defunreserved)|(?P>defpctencoded)|(?P>defsubdelims)|:|@)) | |
(?<defscheme>[A-Za-z][A-Za-z0-9+-.]*) | |
(?<defhierpart>.*?) | |
(?<defquery>((?P>defpchar)|\/|\?)*) | |
(?<deffragment>((?P>defpchar)|\/|\?)*) | |
) |
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
Show hidden characters
{ | |
"extends": "tslint:recommended", | |
"rules": { | |
"adjacent-overload-signatures": false, | |
"align": [true, | |
"elements", |
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
<div class="lazy-image" style="background: url('...')"> | |
<canvas width="1600" height="800"></canvas> | |
</div> |
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
type InternalMergedOverwriteType<T0 extends {} = {}, T1 extends {} = {}> = { | |
[K in keyof (T0 & T1)]: K extends keyof T0 ? | |
(K extends keyof T1 ? | |
T1[K] : T0[K]) : | |
(K extends keyof T1 ? | |
T1[K] : never); | |
}; |