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
// same in a function | |
function openAllLinksInNewTab() { | |
document.querySelectorAll(selector).forEach(function(a) { | |
a.target = '_blank'; | |
// click it | |
a.click(); | |
}); | |
} |
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 { PipeTransform, Injectable, ArgumentMetadata } from "@nestjs/common"; | |
type TrueArgumentMetadata = ArgumentMetadata & { | |
metatype: { _OPENAPI_METADATA_FACTORY: () => Record<string, any> }; | |
}; | |
@Injectable() | |
export class TransformBooleanPipe implements PipeTransform<any> { | |
transform(value: any, { metatype }: TrueArgumentMetadata) { | |
if (!metatype || !this.toValidate(metatype)) { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 notesInfo = (results: any[]) => ({ | |
action: "notesInfo", | |
version: 6, | |
params: { | |
notes: results, | |
}, | |
}); | |
const deckname = Deno.args[0] ?? "*"; |
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 * as React from 'react' | |
import styled from 'styled-components' | |
import schemaJson from './form.json' | |
// import Form from '@rjsf/material-ui' | |
import Form from '@rjsf/core' | |
// console.log('schema: ', schema) | |
export interface OptionSettings { | |
whitelist: string[] |
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 if a dom element is the descendant from another element with matching id */ | |
export const isDescendant = (element: HTMLElement, parentId: string, depth: number) => { | |
let isChild = false | |
if (element.id === parentId) { | |
//is this the element itself? | |
isChild = true | |
} | |
let iterations = 0 |
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 timeout that can be awaited | |
* @param {} ms | |
*/ | |
export function timeout(ms: number) { | |
return new Promise((resolve) => setTimeout(resolve, ms)) | |
} |
!include https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/release/1-0/C4_Container.puml
@startuml
Person(personAlias, "Label", "Optional Description")
Container(containerAlias, "Label", "Technology", "Optional Description")
System(systemAlias, "Label", "Optional Description")
System(holla, "Holla", "Optional Description")
NewerOlder