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
/** | |
* Returns true if the given string is a valid Turkish national identity number. | |
* | |
* @remarks | |
* This implementation uses the algorithm described on the Wikipedia page | |
* "Turkish Identification Number". | |
* @param value - The string to check. | |
* @returns True if the string is a valid Turkish national identity number, false otherwise. | |
*/ | |
const IsNationalIdentity = (value: string): boolean => { |
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 @typescript-eslint/no-unused-vars */ | |
/* eslint-disable @typescript-eslint/ban-types */ | |
import { Document } from 'mongoose'; | |
/** | |
* Forbidden keys from mongoose Document type except _id. | |
*/ | |
type _Forbidden = Exclude<keyof Document, '_id'>; | |
/** |
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 branding = { | |
// The domain url to apply (will replace the domain in the sharing conference link/embed section) | |
"inviteDomain": "example-company.org", | |
// The hex value for the colour used as background | |
"backgroundColor": "#fff", | |
// The url for the image used as background | |
"backgroundImageUrl": "https://example.com/background-img.png", | |
// The anchor url used when clicking the logo image | |
"logoClickUrl": "https://example-company.org", | |
// The url used for the image used as logo |
This plugin implements a Prosody authentication provider that verifies a client connection based on a JWT described in [RFC7519]. It allows use of an external form of authentication with lib-jitsi-meet. Once your user authenticates you need to generate the JWT as described in the RFC and pass it to your client app. Once it connects with a valid token, it is considered authenticated by the jitsi-meet system.
During configuration, you can choose between two JWT validation methods:
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 class InvalidBoardError extends Error {} | |
export default function ticTacToeWinner<T extends number | string>( | |
board: T[][], | |
): T | "Tie" { | |
// Check if the board is a valid game board | |
for (let i = 0; i < board.length; i++) { | |
if (board.length !== board[i].length) { | |
throw new InvalidBoardError(); | |
} |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDTqbtbKy4wMumNni0IYvKT2RN2j1i8dGMZMae0RODE0/9MC4gFlylk7PERMgWIfRXZqIiBoJngw6/WPHjRGJ82jth0J1s0u6crNRONmUb+CLxwEBef6qkBpeMvpCrW85nRs72fQUpiLEbtXUNa4OWQTMsxbTR1G8aPhufXSygJtUZ2T08FgGhCd9MNHww06v19J6LSrZqmQ1/FJtd7bEwRCC+BRVPswkXnmlWKhLJxh7asCImA8cW6iQrhMZBVmB/F2esaQQR5MD246EB41clqJLM64WDKmY5ynnJDGkwj4zTcWeC1XclMMyXPT98tZKWun34iNtHJF2fLE05eVRntdN/MMAPvDKoYtcfe2380oTWGbKeBJQqwuKArRCIOMb6TroX0lLJEyfhiLGpFbfODJPGe6RlDgcp0qKTWSkWMyJnfYqU288tHDRzvnSiDRD/WRpZGuWxwyKg8bskKAHyz/OQNX6HXgszfSVhNMsUxgDOuf4BJADfehM/xalse0Yc= pensive@DESKTOP-NT67T2B |
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
setTimeout(() => { | |
const domain = 'https://www.brawlhalla.com/rankings'; | |
if (!window.location.href.startsWith(domain)) { | |
return; | |
} | |
const input = document.querySelector("input[name=p]"); | |
if (input) { |
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 pattern = new RegExp("https://store.steampowered.com/account/history"); | |
if (!pattern.test(window.location.href)) { | |
return; | |
} | |
let last; | |
const content = (item) => | |
(item.querySelector("div") ?? item).innerText.replace(/\s+/g, " ").trim(); |
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 api = async (endpoint) => { | |
const url = new URL( | |
endpoint, | |
'https://jsonplaceholder.typicode.com', | |
).toString(); | |
const response = await fetch(url); | |
if (response.status === 200) { | |
return response.json(); | |
} |
NewerOlder