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 / android-volume-steps.md
Last active April 14, 2024 00:04
Android Volume Steps

Android Volume Steps

Warning

This is a rather old guide and may or may not work with modern versions of Android.

Connect through ADB

  1. Boot into TWRP
  2. Connect device to computer
  3. Terminal: List devices with adb devices
@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 / fluid-type.scss
Last active July 3, 2023 00:31
Fluid typography Sass mixin
// Modern browsers have support for the CSS clamp function:
// https://developer.mozilla.org/en-US/docs/Web/CSS/clamp()
// Source: https://css-tricks.com/snippets/css/fluid-typography/
@mixin fluid-type($min-font-size, $max-font-size, $min-vw: $breakpoint-min, $max-vw: $breakpoint-max) {
$u1: unit($min-vw);
$u2: unit($max-vw);
$u3: unit($min-font-size);
$u4: unit($max-font-size);
@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,