This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# this script starts two ST instances, connects them, adds a shared folder, | |
# syncs a file, chmods it, and checks that the new permissions are synced | |
# within a reasonable time frame. | |
# Set to your local ST build | |
SYNCTHING=../bin/syncthing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.7 | |
# Put this script in ~/.config/iterm/Scripts or whatever, then enable in the Scripts menu | |
# Map switch keys to "Invoke Script Function...": `unzoom_and_switch(direction: "above/below/left/right")` | |
import iterm2 | |
async def async_turn_off_menu_option(conn: iterm2.Connection, option: str): | |
state = await iterm2.MainMenu.async_get_menu_item_state(conn, option) | |
if state.checked: | |
await iterm2.MainMenu.async_select_menu_item(conn, option) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
style() { | |
if [ $# -eq 0 ]; then | |
echo 'usage: style [[<color name>|[color] <index>|rgb R G B|#<rgb hex>] [fg|bg]]' | |
echo ' | bold | dim | italic' | |
echo ' | blink [fast|slow]' | |
echo ' | underline | invert | hide | strike | reset]]...' | |
return 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Replace annoying tracking `http://t.co/...` links on Twitter ("X") with the actual target. | |
// Install as userscript or JSlet (prefix with `javascript:` and save as bookmark) or just run in console | |
document.querySelectorAll('a[href*="https://t.co"]').forEach(a => a.setAttribute('href', a.innerText.replace('…',''))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Obsidian Snapshot Exporter | |
* -------------------------- | |
* | |
* This script helps you export snapshots (version history) from Obsidian's IndexedDB storage. | |
* It creates a ZIP file containing all your snapshots with proper file naming and organization. | |
* | |
* === HOW TO USE === | |
* | |
* Step 1: Open Obsidian's Developer Tools |
OlderNewer