Skip to content

Instantly share code, notes, and snippets.

@LoserAntbear
LoserAntbear / reverseMapKeys.ts
Created April 18, 2023 10:28
Reverse Map Object Keys
function reverseMapKeys<
InputSchema extends object = any,
InputKeys extends keyof InputSchema = keyof InputSchema,
Mapping extends Record<InputKeys, any> = Record<InputKeys, any>,
Result extends {
[key in Mapping[InputKeys]]: InputSchema[Mapping[key]];
} = {
[key in Mapping[InputKeys]]: InputSchema[Mapping[key]];
}
>(
@LoserAntbear
LoserAntbear / show_hidden_comment_dtf.js
Last active November 16, 2022 21:46
DTF Show hidden comment userscript
// ==UserScript==
// @name DTF Show hidden comment
// @description It tries to fetch and show to you hidden comments
// @namespace http://tampermonkey.net/
// @version 0.1
// @author LoserAntbear
// @match https://dtf.ru/*
// @supportURL https://gist.github.com/LoserAntbear
// @updateURL https://gist.github.com/LoserAntbear/beb2d9e2ab87db7f218f9936c4000805
// @downloadURL https://gist.github.com/LoserAntbear/beb2d9e2ab87db7f218f9936c4000805