Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mvsde's full-sized avatar
🏳️‍⚧️
Protect trans kids!

Fynn Becker mvsde

🏳️‍⚧️
Protect trans kids!
View GitHub Profile
@mvsde
mvsde / disable-css.js
Last active August 10, 2023 08:30
Accessibility testing bookmarklets
javascript:(function(){
document.querySelectorAll(`link[rel="stylesheet"], style`).forEach((element) => element.remove());
document.querySelectorAll(`*`).forEach((element) => element.removeAttribute(`style`));
})();
@mvsde
mvsde / bind-attrs.js
Last active February 22, 2023 12:30
Split Vue 3 attrs into root and bind attrs for transparent components
import { computed, useAttrs } from "vue";
export function useBindAttrs() {
const attrs = useAttrs();
const rootAttrs = computed(() => ({
class: attrs.class,
style: attrs.style,
}));
@mvsde
mvsde / docker-reset.md
Created February 6, 2023 13:19
Unbreak Docker when everything is borked
@mvsde
mvsde / number-empty-string.md
Last active February 5, 2023 20:19
Why is `Number("") === 0`?

The case

This video by ThePrimeagen sent me on a fun archaeology trip.

The case to solve: Why is the following statement true? why is an empty string parsed as a number in JS?

Number("") === 0
@mvsde
mvsde / _device.md
Last active January 29, 2022 10:03
Image performance on a slow machine
@mvsde
mvsde / _device.md
Last active January 29, 2022 09:58
Image performance on a fast machine
@mvsde
mvsde / disable-twitter-interests.js
Created July 22, 2021 12:03
Disable all “interests” Twitter thinks you are interested in.
/**
* Copy into dev tools console and hit enter.
* It may take a while and the page will be blocked while the script is running.
*
* Source:
* https://twitter.com/ChrisFerdinandi/status/1417947102731190277
* https://twitter.com/ChrisFerdinandi/status/1417947104111104002
*/
let checked = document.querySelectorAll('input:checked')
@mvsde
mvsde / fonts.scss
Created June 30, 2021 08:35
Self-hosted fonts with Fontsource
/**
* Fontsource makes open source fonts available on npm.
* https://github.com/fontsource/fontsource
*/
@use "@fontsource/font-name/scss/mixins" as font-name;
@include font-name.fontFace(
$weight: 400,
$style: normal,
@mvsde
mvsde / execute.sh
Last active May 4, 2021 10:43
Under-engineered multi-package management script. Uses only basic shell commands for compatibility with Docker alpine images.
#!/bin/sh
# Usage:
# -e: Exclude folders
# -p: Prioritize folders
# -c: Run this command
# execute.sh -e "folder1 folder2" -p "folder3 folder4" -c "command"
while getopts "e:p:c:" OPTION; do
case "$OPTION" in
@mvsde
mvsde / disable-smart-dimming.md
Last active November 2, 2020 13:31
Disable Samsung Smart TV dimming

Disable Samsung Smart TV dimming

Enter service menu

Press the following keys on the remote:

  1. Info
  2. Settings
  3. Mute
  4. Power