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 { | |
type FunctionDeclaration, | |
SchemaType, | |
} from "npm:@google/[email protected]"; | |
export type FunctionDefinition = { | |
readonly declaration: FunctionDeclaration; | |
readonly implementation: (args: object) => unknown; | |
}; |
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
/** | |
* @file Vite plugin for Hono server on Google Cloud Run Functions | |
* @author reosablo | |
* @license UNLICENSED | |
*/ | |
import buildPlugin from "@hono/vite-build"; | |
import type { Plugin } from "vite"; | |
export type GoogleCloudRunFunctionsBuildPluginOptions = { |
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
/** | |
* @file Pure Typed EventTarget | |
* @license Unlicense | |
*/ | |
export declare class TypedEventTarget<EventMap extends Record<string, Event>> | |
extends EventTarget { | |
addEventListener<Type extends keyof EventMap>( | |
type: Type, | |
listener: (this: this, evt: EventMap[Type]) => void, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Buildless Angular 17 app with @babel/standalone</title> | |
<script type="importmap"> | |
{ | |
"imports": { | |
"@angular/common": "https://esm.sh/v135/@angular/[email protected]?dev", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Buildless Angular 17 app</title> | |
<script type="importmap"> | |
{ | |
"imports": { | |
"@angular/common": "https://esm.sh/v135/@angular/[email protected]?dev", |
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
// @ts-check | |
/** | |
* @file esbuild plugin for transforming TypeScript code using Typia | |
* | |
* CAUTION: this plugin will break the output source map. | |
* | |
* @example | |
* ```js:build.mjs | |
* import { build } from "esbuild"; |
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
#!/usr/bin/env node | |
// @ts-check | |
/** | |
* @file Decrypts data from stdin using a private key. | |
* | |
* @example | |
* node decrypt-forge.mjs [private-key-path] < encrypted-data.txt | |
* | |
* The default private key path is "private-key.pem". |
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
/** | |
* combine promises into an async generator in order of fast resolved | |
* @param promises promises to output | |
*/ | |
export async function* toAsyncGenerator<T>(promises: Iterable<Promise<T>>) { | |
const unresolvedPromises = new Set(promises); | |
const fulfilledValues: T[] = []; | |
for (const promise of promises) { | |
promise.then( | |
(value) => { |
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
@powershell/c '#'+(gc \"%~f0\"-ra)^|iex&exit/b | |
$ErrorActionPreference = 'Stop' | |
try { | |
$FeatureName = 'VirtualMachinePlatform' | |
$Feature = Get-WindowsOptionalFeature -Online -FeatureName $FeatureName | |
$Enabled = $Feature.State -eq 'Enabled' | |
$Feature |
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 default a=>[...atob(a)].reduceRight((n,b)=>(n<<8n)+BigInt(b.charCodeAt(0)),0n) |
NewerOlder