Skip to content

Instantly share code, notes, and snippets.

View hazycora's full-sized avatar
💜
h

hazel cora hazycora

💜
h
View GitHub Profile
// A solution to the following problem:
// "I have two children, (at least) one of whom is a boy born on a Tuesday-
// what is the probability that both children are boys?"
// Problem proposed here: https://x.com/pli_cachete/status/1873822656879091908
const sexes = ['male', 'female']
const days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
const possibleChildren = sexes.map(sex => days.map(day => [sex, day])).flat()
@hazycora
hazycora / TEST.md
Last active October 10, 2023 02:59
@hazycora
hazycora / cinny-theme.css
Last active October 22, 2023 21:24
A theme for the Matrix client Cinny
:root {
--navigation-sidebar-width: calc(64px + var(--border-width));
--navigation-drawer-width: calc(250px + var(--border-width));
--navigation-width: calc(var(--navigation-sidebar-width) + var(--navigation-drawer-width));
}
.system-theme, .dark-theme, ._15q3ngn1 {
--bg-surface: #1F1933;
--bg-surface-transparent: hsla(208, 8%, 20%, 0);
--bg-surface-low: #1A152B;

Keybase proof

I hereby claim:

  • I am hazycora on github.
  • I am hazycora (https://keybase.io/hazycora) on keybase.
  • I have a public key whose fingerprint is 2206 4842 9D8A 3820 E404 3EB6 215A F1F8 1F86 940E

To claim this, I am signing this object:

@hazycora
hazycora / mastodon-tweaks.css
Last active July 31, 2023 04:15
Small UI tweaks for Mastodon!
/* created by hazycora @[email protected] */
/* mastodon hazy tweaks v1.2.3 */
/* use with credit pls */
/* https://gist.github.com/hazycora/cfb4e726083e9c737ae1c8fd44b1c970 */
:root {
--accent-clr: #8c8dff;
--accent-deep-clr: #5455ff;
--bg-primary: #15171c;
--bg-secondary: #14161b;
// ==UserScript==
// @name Faster Ambient Mode
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Makes YouTube's ambient mode feature change more rapidly.
// @author hazycora
// @match https://www.youtube.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
@hazycora
hazycora / discord-message-bubbles.css
Last active May 18, 2024 01:39
Fancy message bubbles for Discord in pure CSS
/* this stylesheet requires CSS :has() selector full support */
:root {
--bubble-color: rgb(0 0 0 / 0.4);
/* bubble-tight-radius is for the left-side corners
between messages by the same user */
--bubble-tight-radius: 0rem;
/* bubble-radius is for all right-side corners
and the top corners in the first message by a user
@hazycora
hazycora / discord-theme.css
Last active April 7, 2024 00:13
discord theme
@import url("https://gist.githubusercontent.com/hazycora/01586ece7792ba520c9495bb559bc4d5/raw");
.appMount_fae9dd, body {
background: none !important;
}
::selection {
background-color: rgba(127, 114, 172, 0.4);
}
@hazycora
hazycora / discord-transparent-embed-bg.css
Created March 23, 2023 15:32
make embed backgrounds transparent
.embedFull-1HGV2S {
background: hsl(var(--primary-630-hsl) / 0.3);
}
@hazycora
hazycora / youtube-playlist-duration.js
Created November 2, 2022 20:06
get the duration of a youtube playlist
// scroll down so the entire playlists videos have been fetched, and run this
(() => {
const sumArray = (arr) => {
let sum = 0
for (let seconds of arr) {
sum+=seconds
}
return sum
}
const timestampElems = [...document.querySelectorAll('ytd-playlist-video-list-renderer ytd-thumbnail-overlay-time-status-renderer span.style-scope.ytd-thumbnail-overlay-time-status-renderer')]