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
/** | |
* Script for converting VSCode theme to Kitty terminal theme. | |
* | |
* ```sh | |
* deno code-to-kitty-theme.ts <url or file> | |
* ``` | |
* and the output will be written to `current-theme.conf` file in the working directory. | |
* | |
* Arugment can either be a remote URL to a theme JSON file or a local relative / absolute path. | |
*/ |
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
// ==UserScript== | |
// @name Focus for Etlab | |
// @namespace Utilities for Etlab | |
// @match https://tkmce.etlab.in/user/dashboard* | |
// @include https://tkmce.etlab.in/ | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// @version 0.3 | |
// @run-at document-end | |
// @author Dunkan <https://github.com/dcdunkan> |
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
// ==UserScript== | |
// @name Open Magnet Links in 1337x-to-search.pages.dev | |
// @namespace Violentmonkey Scripts | |
// @match https://1337x-to-search.pages.dev/ | |
// @grant none | |
// @version 0.1 | |
// @author Dunkan <https://github.com/dcdunkan> | |
// @description 8/20/2024, 11:24:01 PM | |
// @run-at document-end | |
// @homepageURL https://gist.github.com/dcdunkan/50e9e7b52384ef38e84fd727d6937082#file-1337x-proxy-open-link-userscript-js |
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
// ==UserScript== | |
// @name etlab auto login | |
// @namespace Violentmonkey Scripts | |
// @match https://*.etlab.in/* | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// @version 0.4 | |
// @author Dunkan <https://github.com/dcdunkan> | |
// @description 3/12/2024, 2:32:52 AM | |
// @run-at document-end |
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
// ==UserScript== | |
// @name GitHub raw links bypasser for Jio connections | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description For some reason its not possible to access GitHub raw links via Jio's connection. So a tiny temp unreliable fix. | |
// @author Dunkan <https://github.com/dcdunkan> | |
// @match http*://github.com/* | |
// @match http*://raw.githubusercontent.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com | |
// @grant none |
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 { extname, join } from "https://deno.land/[email protected]/path/mod.ts"; | |
import { | |
DOMParser, | |
HTMLDocument, | |
} from "https://deno.land/x/[email protected]/deno-dom-wasm.ts"; | |
import MarkdownIt from "https://esm.sh/[email protected]"; | |
import anchorPlugin from "https://esm.sh/[email protected]"; | |
import { slugify } from "https://esm.sh/@mdit-vue/[email protected]"; | |
import { | |
blue as b, |
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 interface GistOptions { | |
token: string; | |
gistId: string; | |
fileName: string; | |
} | |
const API_ROOT = "https://api.github.com"; | |
export class GistKV { | |
constructor(private options: GistOptions) {} |
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 { fromFileUrl, isAbsolute } from "https://deno.land/[email protected]/path/mod.ts"; | |
const isRemoteImport = ["http:", "https:"] | |
.includes(new URL(import.meta.url).protocol); | |
function isUrl(path: string) { | |
try { | |
new URL(path); | |
return true; | |
} catch (_) { |
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 e = ["🔤", "🫐", "🍋", "7️⃣"]; | |
function computePartValue(value: number, partIndex: number) { | |
return ((value - 1) >> (partIndex * 2)) & 0x03; // 0..3 | |
} | |
function resolve(value: number) { | |
if (value <= 0 && value > 64) return; | |
let text = `${value}:`; | |
for (let i = 0; i < 3; i++) text += ` e[computePartValue(value, i)]`; |
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 Base { | |
private rootUrl: string; | |
constructor(private projectKey: string, baseName: string) { | |
const projectId = projectKey.split("_")[0]; | |
this.rootUrl = `https://database.deta.sh/v1/${projectId}/${baseName}`; | |
} | |
async request(query: string, payload?: unknown) { | |
const [method, ...pathname] = query.split(" "); | |
const response = await fetch(`${this.rootUrl}${pathname.join(" ")}`, { |
NewerOlder