Skip to content

Instantly share code, notes, and snippets.

View Explosion-Scratch's full-sized avatar

--Explosion-- Explosion-Scratch

View GitHub Profile
// ==UserScript==
// @name Replace Alert with No-op on lmsys.org
// @namespace mailto:explosionscratch@gmail.com
// @version 1.0
// @description Replaces the alert function with a no-op on *.lmsys.org
// @match *://*.lmsys.org/*
// @run-at document-start
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Get accent color
// @namespace mailto:explosionscratch@gmail.com
// @version 2024-07-25
// @description try to take over the world!
// @author You
// @match https://open.spotify.com/*
// @require https://cdnjs.cloudflare.com/ajax/libs/vibrant.js/1.0.0/Vibrant.min.js
// @icon https://www.google.com/s2/favicons?sz=64&domain=spotify.com
// @grant none
/**
* Creates a custom HTML element and appends it to a container element.
*
* @param {{tag: string, container: HTMLElement, name: string, style: string, placement: string}} options
* @param {string} options.tag - The tag name of the element to create (default: "div").
* @param {HTMLElement} options.container - The container element where the new element will be appended.
* @param {string} options.name - The name of the custom element.
* @param {string} [options.style=""] - The CSS styles to apply to the custom element.
* @param {string} [options.placement="beforeend"] - The placement of the new element relative to the container (beforebegin, afterbegin, beforeend, afterend).
* @returns {{el: HTMLElement, document: DocumentFragment, stylesheet: CSSStyleSheet}} - An object containing the created element, its shadow root, and the stylesheet.

Rule 1: Good Design is as Little Design as Possible

• Focus on essential features and make them better and more useful for users • Avoid clutter on the screen by using fewer colors, words, and elements • Start with the key functionality or main selling point of the website, such as a heading, input field, and button • Design as little as possible, as this is often all that is needed

Rule 2: Use the Law of Similarity and Proximity to Simplify Design

• Use shape, size, color, and spacing to group elements and create a simple design

// ==UserScript==
// @name YouTube Inline Full Screen
// @namespace mailto:explosionscratch@gmail.com
// @version 1.0
// @description Toggle inline full screen on YouTube with Shift + F
// @match https://www.youtube.com/*
// @grant none
// ==/UserScript==
(function() {
@Explosion-Scratch
Explosion-Scratch / Make local VSCode open for "code" on remote machine.sh
Last active June 25, 2024 16:00
Open local VSCode instance from SSH terminal
#!/usr/bin/env bash
# Put this file in PATH somewhere, e.g. ~/.local/bin/code then use like regular VSCode code cli
# Examples:
# code --wait ~/.zshrc # Will open up VSCode on the local machine and wait until you've finished editing
# code . # Opens current directory
# Requirements:
# - The SSH VSCode extension
# - Two machines that can SSH into each other
@Explosion-Scratch
Explosion-Scratch / data.json
Created May 21, 2024 06:30
College Statistics JSON (from Kaggle - reformated)
This file has been truncated, but you can view the full file.
{
"Alabama A & M University": {
"Applicants total": 6142,
"Admissions total": 5521,
"Enrolled total": 1104,
"Percent of freshmen submitting SAT scores": 15,
"Percent of freshmen submitting ACT scores": 88,
"SAT Critical Reading 25th percentile score": 370,
"SAT Critical Reading 75th percentile score": 450,
@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==