Skip to content

Instantly share code, notes, and snippets.

@DanielLemky
DanielLemky / input.lua
Last active September 27, 2026 20:57
Mac-like trackpad tuning for Omarchy on an Apple Silicon MacBook Pro
-- Add these settings to ~/.config/hypr/input.lua on Omarchy.
hl.config({
input = {
touchpad = {
natural_scroll = true,
tap_to_click = true,
disable_while_typing = true,
tap_and_drag = false,
drag_lock = false,
clickfinger_behavior = true,
import {
clientEntry,
css,
on,
ref,
type Handle,
type SerializableValue,
} from "remix/ui"
import { theme } from "remix/ui/theme"
@Brayden
Brayden / drive.sh
Created January 27, 2026 15:15
Mounted R2 Drive
#!/usr/bin/env bash
set -euo pipefail
bold() { printf "\033[1m%s\033[0m\n" "$*"; }
info() { printf "• %s\n" "$*"; }
warn() { printf "\033[33m! %s\033[0m\n" "$*"; }
err() { printf "\033[31m✗ %s\033[0m\n" "$*" >&2; }
ok() { printf "\033[32m✓ %s\033[0m\n" "$*"; }
require_macos() {
@bjarneo
bjarneo / theme-change-workspace.sh
Created December 1, 2025 16:27
Change your theme on hyprland workspace switch
#!/bin/bash
# Map workspaces to omarchy themes
declare -A workspace_themes=(
[1]="catppuccin"
[2]="catppuccin-latte"
[3]="ethereal"
[4]="everforest"
[5]="flexoki-light"
[6]="gruvbox"
@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active November 11, 2026 15:59
Native Secure Enclaved backed ssh keys on MacOS

Native Secure Enclave backed ssh keys on MacOS

It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive

There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!

@salmin89
salmin89 / background.ts
Last active June 12, 2025 09:37
Chrome Messaging using Native Observables
declare const Observable: any;
// Utility to create an Observable from Chrome's messaging system
function createMessageObservable() {
return new Observable((subscriber: any) => {
// Set up the message listener
const listener = (message: any, sender: chrome.runtime.MessageSender, sendResponse: (response?: any) => void) => {
// Forward the message to the Observable
subscriber.next({ message, sender, sendResponse });
return true;
@stevebauman
stevebauman / example.diff
Last active April 2, 2025 07:43
Sort JS Imports by length using ESLint Rule (asc)
-import axios from 'axios';
-import fs from 'fs';
-import path from 'path';
-import a from 'a';
-import somethingElse from '../somethingElse';
+import a from 'a';
+import fs from 'fs';
+import path from 'path';
+import axios from 'axios';
+import somethingElse from '../somethingElse';
@stenuto
stenuto / timelapse.sh
Created June 18, 2024 20:56
Timelapse script
#!/bin/bash
# Check if interval argument is provided
if [ -z "$1" ]; then
echo "Usage: $0 -int <interval_in_seconds>"
exit 1
fi
# Extract the interval value
interval=$2
@jdevalk
jdevalk / copyrightholder.php
Last active January 6, 2022 04:00
This is how to add the copyrightHolder schema to the Website Schema piece Yoast SEO outputs.
<?php
add_filter( 'wpseo_schema_website', 'example_change_website_schema', 10, 2 );
/**
* Changes the Yoast SEO Website schema.
*
* @param array $data The Schema Website data.
* @param Meta_Tags_Context $context Context value object.
*
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active August 7, 2026 09:17
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',