Skip to content

Instantly share code, notes, and snippets.

View Explosion-Scratch's full-sized avatar

--Explosion-- Explosion-Scratch

View GitHub Profile
@font-face {
font-family: 'Product Sans';
src: url('data:application/octet-stream;base64,d09GMgABAAAAADREAA8AAAAApUQAADPjAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGjwb9DYcjxoGYACDWhEQCoGiNP9lC4Q6AAE2AiQDiHAEIAWFdAeIfRuxkDXjmKV4HACcLfHIQG5HpCLE8yMRwsZBxoY9zf7/rwl0jOGpAaJZGYIgVFYmWM60pMNiAJZldgli2bayMuxhyKPbgVyWCkOAxPHqqV78H+5GbcO/zzlj5JYbXe51wVER4z9y3+lvQxW32bUe0WV5xqVLgsYfjjm0OJ0hfo3k+jOwbeRPcvLyPO/Yl/clf2YZQQKA0FRANrrVJPdUAsnKaQ7IzRp00020g2Ah2LEhIKCglIW+KEgRcFUsFUvHGk03rZlmajG1m1yMid4nd5d0k9zlamq98uBkjMGfZpU6kM1iJk7UvSp4ejjZu/trkwSixTBIEvAfAQXw3+AHn1UD4CinOWM4mJGKxHFod0e20jo5X6JcVWJ/pK/0LVB6xQBwiQMC/597d3915TXWPN6JFwaUTYrjPUADziSza+JJ7M8wHpfLlZfIJPISeYlMIpWTyknlpP87Z9sRCzlhlv4AXdQx2iJkLyVE5ZZlgHe7SeffptrxzhDgqwpuJvvl3QvwsBVo6rIAv/3r/5NP/77PIFkRheW86IxnOWAFrVOcd5KjAMoBRilhwwsQT8WxPALB3NcJ9w5btxWHrcM6tH457aUppQzPhPBeGfDtW9+O5bNTC2sF0C+tJft6WuVBJBiH4QBmJR0Gx//a79Xm5rwTpM1MJKAzG+c+0MuG+AaQCgjCtOPr6+qRXWVdjanz9WW9ri9htE4gYrqQjyniunrWr71q8xaV5KpSOY/aMRyHdxCWN6TVL5NSd8Oq1UK7e3fzlqH3iwyliAQJIUgIQbLPMTaLCrfGKfT
// ==UserScript==
// @name Auto Picture-in-Picture
// @namespace mailto:explosionscratch@gmail.com
// @version 0.1
// @description Auto picture in picture for YouTube
// @author Explosion-Scratch
// @match *://youtube.*/*
// @grant none
// ==/UserScript==
@Explosion-Scratch
Explosion-Scratch / Bard Copy Button.user.js
Last active December 18, 2023 16:17
Add a copy button to bard's responses
// ==UserScript==
// @name Bard copy button
// @namespace mailto:explosionscratch@gmail.com
// @version 0.1
// @description Add a copy button to Google Bard's response without clicking more
// @author Explosion-Scratch
// @match https://bard.google.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bard.google.com
// @grant none
// ==/UserScript==
// ==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==
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);
@Explosion-Scratch
Explosion-Scratch / ChatGPT Auto Send.md
Last active February 19, 2024 11:23
Use ChatGPT as a custom search engine in Chrome - ChatGPT Auto Send

ChatGPT Auto Send

chatgpt_search_demo.mp4

Allows using ChatGPT as a search engine or to summarize transcripts (https://chat.openai.com/?query=%s, e.g. https://chat.openai.com/?query=how large is the sun).

You can also use it with Claude, for example https://claude.ai/chats?query=hello.

There's also ?transcript and ?copied. copied uses the prompt from your clipboard (you might have to click "Allow" on the notif asking permission), and transcript hides miscellaneous UI elements and writes an article based on a video transcript instead of using the default prompt.

@Explosion-Scratch
Explosion-Scratch / Set mac accent colors based on wallpaper.ts
Last active August 13, 2023 18:35
Set the mac accent color to the closest matching color that matches your wallpaper
#!/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",
@Explosion-Scratch
Explosion-Scratch / ChatGPT for google userscript.user.js
Last active September 23, 2023 16:22
ChatGPT userscript for google with web access, code copy and more
// ==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
@Explosion-Scratch
Explosion-Scratch / Auto install node modules.js
Last active July 22, 2023 13:47
Auto install node modules from a file
#!/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";
@Explosion-Scratch
Explosion-Scratch / bard.js
Created May 2, 2023 13:46
Bard Client for use in Userscripts/Extensions
class BardBot {
/**
* The conversation context.
* @type {Object}
*/
conversationContext = undefined
/**
* The logging function.
* @type {Function}
*/