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 Bard | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://*.youtube.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=textarea.online | |
// @grant GM_xmlhttpRequest | |
// @grant unsafeWindow | |
// ==/UserScript== |
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 fs from 'fs'; | |
import { exec, execSync } from 'child_process'; | |
import { join } from 'path'; | |
import path from 'path'; | |
const args = process.argv.slice(2); | |
if (!process.env.SUDO_UID) { | |
console.log('Re-run as sudo'); | |
process.exit(1); |
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 ChatGPT google | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.google.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com | |
// @grant GM_xmlhttpRequest | |
// @grant GM_getValue |
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
#!/usr/bin/env deno | |
import Vibrant from "npm:node-vibrant" | |
import cd from "npm:color-difference" | |
const COLORS: { [number | string]: string } = { | |
4: "#336ED1", | |
5: "#7F2689", | |
6: "#B95081", | |
0: "#AC312D", |
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
#!/usr/bin/env node | |
// Usage: | |
// autoinstall file.js --manager pnpm | |
// autoinstall file1.js file2.js | |
// Build to binary: esbuild index.js --bundle --outfile=build.cjs --format=cjs --platform=node && pkg -t node16-linux,node16-win,node16-macos-x64,node16-macos-arm64 build.cjs -C GZip -o autoinstall && rm -rf build.cjs | |
import fs from "fs/promises"; | |
import path from "path"; |
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
((window) => { | |
var _fetch = window.fetch; //Get the original fetch functionm | |
window.fetch = (url, opts = {}) => { | |
if (!window.FETCH_CACHE) { | |
window.FETCH_CACHE = {}; | |
} | |
return new Promise((resolve) => { | |
/* | |
Generate a sort of unique key about this fetch request. |
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.prototype.log = function () { | |
function annotate(func) { | |
return (func + "") | |
.replace(/[/][/].*$/gm, "") | |
.replace(/\s+/g, "") | |
.replace(/[/][*][^/*]*[*][/]/g, "") | |
.split("){", 1)[0] | |
.replace(/^[^(]*[(]/, "") | |
.replace(/=[^,]+/g, "") | |
.split(",") |
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 url(u) { | |
const GITHUB_API_URL = "https://api.github.com"; | |
const TEMPLATES = [ | |
[ | |
/^(https?):\/\/gitlab\.com\/([^\/]+.*\/[^\/]+)\/(?:raw|blob)\/(.+?)(?:\?.*)?$/i, | |
"$1://gl.githack.com/$2/raw/$3", | |
], | |
[ | |
/^(https?):\/\/bitbucket\.org\/([^\/]+\/[^\/]+)\/(?:raw|src)\/(.+?)(?:\?.*)?$/i, |
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
javascript: { | |
var container = | |
document.querySelector("article") || | |
document.querySelector("#readme .Box-body article") || | |
document.querySelector("#readme") || | |
document.querySelector(".page"); | |
if (document.querySelector(".final-path")) { | |
var header = document.createElement("h1"); | |
header.innerText = document.querySelector(".final-path").innerText; |
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 {translated} = await translate("bonjour"); | |
// --> "Hello" | |
async function translate(text, target, source) { | |
var opts = { | |
text: text || "", | |
source: source || 'auto', | |
target: target || "en", | |
} | |
var result = await fetch(`https://translate.googleapis.com/translate_a/single?client=gtx&sl=${opts.source}&tl=${opts.target}&dt=t&q=${encodeURI(opts.text)}`).then(res => res.json()); | |
return { |