https://keyoxide.org/hkp/3bc6e5776bf379d36f6714802b0c9cf251e69a39
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
export const restoreTheme = () => { | |
// `try/catch` in case I messed something up here bigly... (will default to light theme) | |
try { | |
// help minifier minify | |
const htmlRoot = document.documentElement; | |
// the list of <html>'s current class(es)... | |
// eslint-disable-next-line prefer-destructuring | |
const classList = htmlRoot.classList; | |
// map of themes -> classnames ([0]=light, [1]=dark) | |
const classNames = ["__CLASS_NAMES__"]; |
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
// Create a new file at /etc/apt/apt.conf.d/99phased-updates with two lines | |
// https://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it/1427930#1427930 | |
// Only for Ubuntu Desktop GUI: | |
// Update-Manager::Always-Include-Phased-Updates "true"; | |
APT::Get::Always-Include-Phased-Updates "true"; |
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() { | |
/* Mastodon switcher https://homepages.inf.ed.ac.uk/imurray2/code/mastodon.html */ | |
myInstance = 'mastodon.social'; /* usernames are @ this string */ | |
myInstanceURL = myInstance; /* Mastodon instance website with no https:// or trailing slash */ | |
ver3 = false; /* set to true if your instance runs Mastodon v3 */ | |
function getJsonObject(URL){ | |
var req = new XMLHttpRequest(); | |
req.open('GET', URL, false); | |
req.send(null); |
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
/* override weird Mastodon font with default system stack */ | |
body { | |
font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, "mastodon-font-sans-serif", sans-serif !important; | |
} | |
/* hide create account buttons (just for aesthetics, NOT security!) */ | |
.columns-area__panels .navigation-panel .navigation-panel__sign-in-banner .sign-in-banner button:last-of-type, | |
.ui__header .ui__header__links a.button[href^="https://joinmastodon.org"] { | |
display: none !important; | |
} |
TypeScript declarations for @novnc/novnc
Pulled from @ovcharik's gist. ❤️
MIT
I hereby claim:
- I am jakejarvis on github.
- I am jakejarvis (https://keybase.io/jakejarvis) on keybase.
- I have a public key whose fingerprint is 3BC6 E577 6BF3 79D3 6F67 1480 2B0C 9CF2 51E6 9A39
To claim this, I am signing this object:
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
// Returns a list of strings from a given string separated by a given | |
// separator (defaults to comma). | |
// https://stackoverflow.com/a/65853667/1438024 | |
@function str-split($str, $delimiter: ",") { | |
// return immediately if this function isn't necessary (aka separator not found) | |
@if (string.index("#{$str}", "#{$delimiter}") == null) { | |
@return $str; | |
} |
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 { VercelRequest, VercelResponse } from "@vercel/node"; | |
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types | |
export default (req: VercelRequest, res: VercelResponse) => { | |
try { | |
// some rudimentary error handling | |
if (req.method !== "GET") { | |
throw new Error(`Method ${req.method} not allowed.`); | |
} |
NewerOlder