Skip to content

Instantly share code, notes, and snippets.

View cyyynthia's full-sized avatar
drinking coffee

Cynthia Rey cyyynthia

drinking coffee
View GitHub Profile
@cyyynthia
cyyynthia / force_resident_credentials.js
Created October 12, 2025 17:53
Force Discord (and other websites with the same issue) to use Resident Credentials (aka Passkeys) instead of U2F credentials
const createCreds = navigator.credentials.create;
navigator.credentials.create = (creds) => {
creds.publicKey.authenticatorSelection.residentKey = 'preferred';
return createCreds.call(navigator.credentials, creds);
};
@cyyynthia
cyyynthia / vitest.config.ts
Created April 7, 2025 11:54
Isolate Vitest snapshots per-browser in browser tests
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
browser: {
enabled: true,
provider: 'playwright',
instances: [
{ browser: 'chromium', context: { locale: 'en-US', timezoneId: 'Europe/Paris' } },
{ browser: 'firefox', context: { locale: 'en-US', timezoneId: 'Europe/Paris' } },
@cyyynthia
cyyynthia / filters.txt
Last active April 16, 2025 18:26
uBO custom rules I use to make my browsing experience more bearable on websites I commonly use.
[uBlock Origin]
! Written by Cynthia :: https://cynthia.dev
! SPDX-License-Identifier: 0BSD
! I'm trying to keep the list not too opinionated such that it is viable to subscribe to the gist...
! Some *very* opinionated rules I personally use are included, but commented out.
! Copy the rules in your own custom filters if you want to use them.
! To find those rules, search for "[Opinionated]" in the file.
! >> I post about updates on Bluesky: @cynthia.dev
@cyyynthia
cyyynthia / konami.ts
Created October 15, 2024 19:55
Very small (376B minified) implementation of Konami code in TypeScript (0BSD licensed)
/*!
* BSD Zero Clause License
* Copyright (c) Cynthia Rey
* SPDX-License-Identifier: 0BSD
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
@cyyynthia
cyyynthia / random-toml-generator.js
Created May 6, 2023 21:59
An utility to generate a large random TOML file. Used to benchmark https://github.com/squirrelchat/smol-toml
/*!
* BSD Zero Clause License
* Copyright (c) Cynthia Rey
* SPDX-License-Identifier: 0BSD
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
@cyyynthia
cyyynthia / llama_measure_perf.mjs
Last active March 31, 2023 14:19
Quick and dirty script to measure the evolution of performance of LLaMA.cpp
/*!
* BSD Zero Clause License
* Copyright (c) Cynthia Rey
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
@cyyynthia
cyyynthia / discord-pitch-black.scss
Last active March 22, 2020 03:07
Ultra simple, no bullshit pitch-black theme. Compatible with all client mods.
.theme-dark {
&:root {
--background-primary: #000;
--background-secondary: #000;
--background-tertiary: #000;
--deprecated-panel-background: #000;
--channeltextarea-background: #101010;
}
.topSectionNormal-2-vo2m, .body-3ND3kc, .container-3ayLPN, .modal-yWgWj-, .autocomplete-1vrmpx, .emojiPicker-3m1S-j {
@cyyynthia
cyyynthia / trulse.txt
Created July 10, 2019 11:20
An interesting proposal for JS
trulse => true
!trulse => true
!!trulse => false
!!!trulse => false
trulse == true => true
trulse == false => true
trulse === true => false
trulse === false => false
trulse == trulse => true
trulse === trulse => false