Skip to content

Instantly share code, notes, and snippets.

import { isTauri } from "@tauri-apps/api/core"
import { getCurrentWindow } from "@tauri-apps/api/window"
import { useEffect } from "preact/hooks"
const EDITABLE_SELECTORS = [
'input[type="text"]',
'input[type="password"]',
'input[type="email"]',
'input[type="tel"]',
'input[type="url"]',
@Nyaacinth
Nyaacinth / auto-close-cycle.bash
Created February 4, 2025 14:16
macOS - Automatically close inactive apps with a grace period
#!/bin/bash
# Original: https://github.com/Jeffrey-Fazal/close_apps
while true; do
echo "Starting script to close apps without windows..."
osascript <<'EOF'
use framework "Foundation"
@Nyaacinth
Nyaacinth / index.css
Created January 24, 2024 05:54
A potential index.css of your web app to disable Safari's overscroll bounces effect without affecting other browsers
html {
/** Uncomment below to disable Pull to Refresh */
/* overscroll-behavior: none; */
height: 100vh;
width: 100vw;
}
@supports (height: 100dvh) and (width: 100dvw) {
html {
height: 100dvh;
width: 100dvw;