Skip to content

Instantly share code, notes, and snippets.

@easrng
easrng / crash.html
Created October 23, 2020 13:29
Browser Crash
<!DOCTYPE html><meta charset="utf-8"><meta name="viewport" content="width=device-width"><style>div{background:black;filter: drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop-shadow(0px 0px 10px black) drop
@easrng
easrng / gmail-force-retina-icons.user.js
Created October 29, 2020 22:33
Makes Gmail use retina icons.
// ==UserScript==
// @name Force Retina Icons
// @namespace https://easrng.github.io
// @match https://mail.google.com/*
// @grant none
// @version 1.0
// @author https://easrng.github.io
// @description Makes Gmail use retina icons.
// @run-at document-end
// ==/UserScript==
@easrng
easrng / emoji.regex
Created February 2, 2021 23:13
Match any emoji, circa 2021
/(#️⃣|\*️⃣|0️⃣|1️⃣|2️⃣|3️⃣|4️⃣|5️⃣|6️⃣|7️⃣|8️⃣|9️⃣|©️|®️|🀄|🃏|🅰️|🅱️|🅾️|🅿️|🆎|🆑|🆒|🆓|🆔|🆕|🆖|🆗|🆘|🆙|🆚|🇦🇨|🇦🇩|🇦🇪|🇦🇫|🇦🇬|🇦🇮|🇦🇱|🇦🇲|🇦🇴|🇦🇶|🇦🇷|🇦🇸|🇦🇹|🇦🇺|🇦🇼|🇦🇽|🇦🇿|🇧🇦|🇧🇧|🇧🇩|🇧🇪|🇧🇫|🇧🇬|🇧🇭|🇧🇮|🇧🇯|🇧🇱|🇧🇲|🇧🇳|🇧🇴|🇧🇶|🇧🇷|🇧🇸|🇧🇹|🇧🇻|🇧🇼|🇧🇾|🇧🇿|🇨🇦|🇨🇨|🇨🇩|🇨🇫|🇨🇬|🇨🇭|🇨🇮|🇨🇰|🇨🇱|🇨🇲|🇨🇳|🇨🇴|🇨🇵|🇨🇷|🇨🇺|🇨🇻|🇨🇼|🇨🇽|🇨🇾|🇨🇿|🇩🇪|🇩🇬|🇩🇯|🇩🇰|🇩🇲|🇩🇴|🇩🇿|🇪🇦|🇪🇨|🇪🇪|🇪🇬|🇪🇭|🇪🇷|🇪🇸|🇪🇹|🇪🇺|🇫🇮|🇫🇯|🇫🇰|🇫🇲|🇫🇴|🇫🇷|🇬🇦|🇬🇧|🇬🇩|🇬🇪|🇬🇫|🇬🇬|🇬🇭|🇬🇮|🇬🇱|🇬🇲|🇬🇳|🇬🇵|🇬🇶|🇬🇷|🇬🇸|🇬🇹|🇬🇺|🇬🇼|🇬🇾|🇭🇰|🇭🇲|🇭🇳|🇭🇷|🇭🇹|🇭🇺|🇮🇨|🇮🇩|🇮🇪|🇮🇱|🇮🇲|🇮🇳|🇮🇴|🇮🇶|🇮🇷|🇮🇸|🇮🇹|🇯🇪|🇯🇲|🇯🇴|🇯🇵|🇰🇪|🇰🇬|🇰🇭|🇰🇮|🇰🇲|🇰🇳|🇰🇵|🇰🇷|🇰🇼|🇰🇾|🇰🇿|🇱🇦|🇱🇧|🇱🇨|🇱🇮|🇱🇰|🇱🇷|🇱🇸|🇱🇹|🇱🇺|🇱🇻|🇱🇾|🇲🇦|🇲🇨|🇲🇩|🇲🇪|🇲🇫|🇲🇬|🇲🇭|🇲🇰|🇲🇱|🇲🇲|🇲🇳|🇲🇴|🇲🇵|🇲🇶|🇲🇷|🇲🇸|🇲🇹|🇲🇺|🇲🇻|🇲🇼|🇲🇽|🇲🇾|🇲🇿|🇳🇦|🇳🇨|🇳🇪|🇳🇫|🇳🇬|🇳🇮|🇳🇱|🇳🇴|🇳🇵|🇳🇷|🇳🇺|🇳🇿|🇴🇲|🇵🇦|🇵🇪|🇵🇫|🇵🇬|🇵🇭|🇵🇰|🇵🇱|🇵🇲|🇵🇳|🇵🇷|🇵🇸|🇵🇹|🇵🇼|🇵🇾|🇶🇦|🇷🇪|🇷🇴|🇷🇸|🇷🇺|🇷🇼|🇸🇦|🇸🇧|🇸🇨|🇸🇩|🇸🇪|🇸🇬|🇸🇭|🇸🇮|🇸🇯|🇸🇰|🇸🇱|🇸🇲|🇸🇳|🇸🇴|🇸🇷|🇸🇸|🇸🇹|🇸🇻|🇸🇽|🇸🇾|🇸🇿|🇹🇦|🇹🇨|🇹🇩|🇹🇫|🇹🇬|🇹🇭|🇹🇯|🇹🇰|🇹🇱|🇹🇲|🇹🇳|🇹🇴|🇹🇷|🇹🇹|🇹🇻|🇹🇼|🇹🇿|🇺🇦|🇺🇬|🇺🇲|🇺🇳|🇺🇸|🇺🇾|🇺🇿|🇻🇦|🇻🇨|🇻🇪|🇻🇬|🇻🇮|🇻🇳|🇻🇺|🇼🇫|🇼🇸|🇽🇰|🇾🇪|🇾🇹|🇿🇦|🇿🇲|🇿🇼|🈁|🈂️|🈚|🈯|🈲|🈳|🈴|🈵|🈶|🈷️|🈸|🈹|🈺|🉐|🉑|🌀|🌁|🌂|🌃|🌄|🌅|🌆|🌇|🌈|🌉|🌊|🌋|🌌|🌍|🌎|🌏|🌐|🌑|🌒|🌓|🌔|🌕|🌖|🌗|🌘|🌙|🌚|🌛|🌜|🌝|🌞|🌟|🌠|🌡️|🌤️|🌥️|🌦️|🌧️|🌨️|🌩️|🌪️|🌫️|🌬️|🌭|🌮|🌯|🌰|🌱|🌲|🌳|🌴|🌵|🌶️|🌷|🌸|🌹|
/*
QuickMenu.js: Make a chromium-style menu. Made for use in bookmarklets
Copyright (C) 2021 easrng
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
.brand svg {
display: none !important;
}
.brand::after {content: "Mastodon";background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 575.3666 100.3612"><path d="M405.8645 0v33.0236c-4.5378-5.1171-11.0562-7.6725-19.5525-7.6725-9.2686 0-16.4684 3.219-21.5855 9.6878-5.117 6.4688-7.6725 15.6052-7.6725 27.3841 0 12.0686 2.6629 21.4294 7.973 28.0912 5.4068 6.5654 13.0281 9.847 22.876 9.847 7.724 0 14.2424-2.6628 19.5526-7.973v6.6648H421.51V0zM0 9.405v89.648h16.229V43.7368l23.6008 52.417h9.9884l23.6009-52.417V99.053h16.229V9.405H73.1361L44.9036 69.2293 16.5118 9.405zm237.4762 2.1745V69.512c0 20.0821 9.7375 30.1243 29.2403 30.1243h8.3973V85.0162h-6.8062c-5.117 0-8.883-1.3001-11.2966-3.907-2.4137-2.6068-3.6064-6.7221-3.6064-12.3219V40.5546h17.5194l6.0815-13.913h-23.601V11.5795zM131.4402 25.351c-9.7515 0-18.2514 2.0263-25.4926 6.0814l4.9324 11.8623c6.4687-2.5103 12.6376-3.7655 18.5271-3.7655 5.7929 0 9.998 1.3627 12.6048 4.066 2.606 2.6069 4.0137 6.9915 4.2075 13.1706-4.5378-2.4137-
async function chromiumVendor(){
let chromium=navigator.userAgent.includes("Chrom")
if(!chromium) return null
if(navigator.userAgent.includes("Edg")) return "microsoft"
if(navigator.brave) return "brave"
let google=await new Promise(cb=>{
let ae=false;
function ov(){
cb(speechSynthesis.getVoices().filter(e=>e.name.includes("Google")).length!=0)
if(ae) speechSynthesis.removeEventListener("voiceschanged", ov)
@easrng
easrng / setTheme.js
Created September 14, 2021 18:18
Override CSS prefers-color-scheme
function setTheme(theme) {
Array.from(document.styleSheets).map(e => {
try {
return Array.from(e.cssRules)
} catch (e) {
return []
}
}).flat().map(e => {
if (e.constructor != CSSMediaRule) return;
if (e.originalConditionText) e.conditionText = e.originalConditionText;
@easrng
easrng / discordColorByID.user.js
Created September 27, 2021 12:32
Makes username colors unique and based on user ID
// ==UserScript==
// @name User Colors
// @namespace https://easrng.us.to/
// @match https://discord.com/*
// @grant none
// @version 1.0
// @author easrng
// @description Makes Discord usernames be colored based on userid, not role.
// @run-at document-end
// @inject-into content
// ==UserScript==
// @name fluffyscratch oneclick test
// @namespace helo
// @match https://fluffyscratch.hampton.pw/auth/getKeys/v2
// @grant none
// @version 1.0
// @author -
// @description it does the thing
// ==/UserScript==
@easrng
easrng / tweetnacl.eir
Created December 28, 2021 22:56
tweetnacl as elvm ir (manually assembled cus the compiler segfaults)
.text
randombytes:
mov D, SP
add D, -1
store BP, D
mov SP, D
mov BP, SP
mov SP, BP
load A, SP
add SP, 1