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 { IPlugin } from "react-pluggable"; | |
export default class ClockPlugin implements IPlugin { | |
init(pluginStore) { | |
this.pluginStore = pluginStore; | |
} | |
getPluginName() { | |
return `ClockPlugin@0.0.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
export function init(extensionPoints) { | |
console.log("[Extension] HELLO EXTENSION", extensionPoints); | |
extensionPoints.register( 'someplug:register', 'someplug', (...args) => { | |
console.log("[REGISTER] someplug", ...args); | |
}) | |
extensionPoints.register( 'router:register', 'someplug', (...args) => { | |
console.log("[REGISTER] someplug -> router:register", ...args); | |
}) |
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 { argon2id, argon2Verify } from "https://cdn.skypack.dev/hash-wasm@v4.9.0"; | |
/** | |
* deno 1.13.1 (release, x86_64-unknown-linux-gnu) | |
* v8 9.3.345.11 | |
* typescript 4.3.5 | |
*/ | |
export type HashOptions = { | |
salt?: String | Uint8Array; |
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
// ==UserScript== | |
// @name Search Image from clipboard | |
// @namespace https://github.com/tnifey | |
// @version 0.1 | |
// @description Google Images - Search By Paste Image from clipboard | |
// @author Tnifey | |
// @match https://images.google.com/* | |
// @match https://google.com/imghp | |
// @match https://google.com/imghp* | |
// @grant none |
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 { Ctor } from "./types"; | |
import { isConstructor } from "./utils"; | |
export function chain<T>( | |
ctor: Ctor<T>, | |
prototypes: Set<any> = new Set(), | |
): Ctor<any>[] | Set<Ctor<any>> { | |
if (isConstructor(ctor)) { | |
const target = Object.getPrototypeOf(ctor); | |
if (!target.name || prototypes.has(target)) return prototypes; |
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
{ | |
"files": ["test.ts"], | |
"quiet": false, | |
"debug": true, | |
"fullscreen": false, | |
"extensions": [".js", ".ts", ".py", ".json"], | |
"interval": 500, | |
"watch": ["test.ts"], | |
"deno_args": [ | |
"--allow-all", |
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
function dateExists(year: number, month: number, day: number): boolean { | |
if (typeof year !== "number") year = Number.parseInt(`${year}`, 10); | |
if (typeof month !== "number") month = Number.parseInt(`${month}`, 10); | |
if (typeof day !== "number") day = Number.parseInt(`${day}`, 10); | |
if (year && month && day) { | |
if (day >= 1 && day <= 31 && month >= 1 && month <= 12) { | |
const d = `${day}`.padStart(2, "0"); | |
const m = `${month}`.padStart(2, "0"); | |
const y = `${year}`.padStart(4, "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
.loading | |
display: block | |
position: fixed | |
top: 50% | |
left: 50% | |
transform: translate(-50%, -50%) | |
display: flex | |
align-items: center | |
justify-content: center | |
width: 100% |
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
.row | |
box-sizing: border-box | |
display: flex | |
flex: 0 1 auto | |
flex-direction: row | |
flex-wrap: wrap | |
padding-left: 1rem | |
padding-right: 1rem | |
&.no-padding | |
padding-left: 0 |