Skip to content

Instantly share code, notes, and snippets.

View universemaster's full-sized avatar
💭
Taking a breather

universemaster

💭
Taking a breather
View GitHub Profile
@rolisz
rolisz / mic_check.py
Created February 2, 2023 15:41
Script to alert on microphone loudness
import time
from collections import deque
import numpy as np
import sounddevice as sd
from beepy import beep
from infi.systray import SysTrayIcon
last_alert = time.time() - 10
q = deque(maxlen=200)
@RobertAKARobin
RobertAKARobin / safari.md
Last active December 27, 2025 05:35
Safari's date-picker is the cause of 1/3 of our customer support issues

Safari's date-picker is the cause of 1/3 of our customer support issues

...and obviously we're building a workaround. But I'm absolutely flabbergasted that a standard <input type="date"> HTML field, in a standard browser, from a company that bases its reputation good design, could be so dreadful.

The context

I'm the developer for a startup that sells a genetic test to recommend medications for high blood pressure. For medical reasons we need to know our customers' birth date. Most of our customers are in their 60s or older. We've found that many of them use iPads or iPhones. And they're the ones who complain to our customer support that our site is unusable.

The problem

// ==UserScript==
// @name Remove_news
// @version 1
// @grant none
// @include https://www.watson.ch/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// ==/UserScript==
//https://gist.github.com/BrockA/2625891
function recurseEl(father,element) {
@cemulate
cemulate / #LatexToUnicode.md
Last active August 28, 2025 05:09
Global shortcuts for LaTeX to unicode text substitution with `unicodeitplus`

This is a solution to achieve global LaTeX to (approximate) unicode subsitution in any text input on a simple keybind.

This strategy uses unicodeitplus, a tool that replaces LaTeX commands in text with their corresponding unicode characters when supported, replacing text like \alpha + \beta^2 \in R_0 \cup R_1 with α + β² ∈ R₀ ∪ R₁ (and in a more robust manner than unicodeit).

It can be installed with

pipx install unicodeitplus

Or, for my fork with more options

@rishg2
rishg2 / stopwords.txt
Created July 15, 2021 14:48
A List of English Stopwords
0o
0s
3a
3b
3d
6b
6o
a
a1
a2
@broofa
broofa / checkForUndefinedCSSClasses.js
Last active June 22, 2025 08:19
ES module for detecting undefined CSS classes (uses mutation observer to monitor DOM changes). `console.warn()`s undefined classes.
/**
* Sets up a DOM MutationObserver that watches for elements using undefined CSS
* class names. Performance should be pretty good, but it's probably best to
* avoid using this in production.
*
* Usage:
*
* import cssCheck from './checkForUndefinedCSSClasses.js'
*
* // Call before DOM renders (e.g. in <HEAD> or prior to React.render())
const loadScript = async (url) => {
const response = await fetch(url)
const script = await response.text()
eval(script)
}
const scriptUrl = "script.js"
loadScript(scriptUrl)
fetch("script.js")
.then((response) => response.text())
.then((text) => eval(text))
.then(() => {
/* Now you can use the script */
})
@IanColdwater
IanColdwater / twittermute.txt
Last active March 8, 2026 00:11
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@silas
silas / README.md
Created June 20, 2019 15:15
Anki JavaScript Cards

Anki JavaScript Cards

This demonstrates one method for creating JavaScript based Anki cards.

Tested on

  • [Anki for desktop computers][anki-desktop] version 2.1.13
  • [AnkiMobile][anki-mobile] (iOS) version 2.0.48

Instructions