I hereby claim:
- I am yyogo on github.
- I am yyogo (https://keybase.io/yyogo) on keybase.
- I have a public key ASBoezTXmapIvgewk-XhFriszvIc-VfNpPd7VJ9AZhiYIgo
To claim this, I am signing this object:
| /** | |
| * 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 |
| // 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('…',''))); |
| #!/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 |
| #!/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) |
| #!/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 |
| #!/bin/bash | |
| set -m | |
| showhelp() { | |
| echo "Usage: $0 [-ohvrc] <command>" | |
| echo "Pipes stderr from command to a new tmux pane." | |
| echo " -h | -v split horizontally or vertically (default vertically)" | |
| echo " -r send stdout to pane instead of stderr" | |
| echo " -o send both stdout and stderr to new panes" | |
| echo " -c close pane automatically after program terminates" |
I hereby claim:
To claim this, I am signing this object:
| enum TakeWhileInclusive<I, P> { | |
| Taking(I, P), | |
| Done, | |
| } | |
| impl<I, P> Iterator for TakeWhileInclusive<I, P> | |
| where | |
| P: FnMut(&I::Item) -> bool, | |
| I: Iterator, |
| #![feature(min_const_generics,maybe_uninit_extra)] | |
| // VERY UNTESTED AND NOT REVIEWED | |
| // THIS CODE USES UNSAFE RUST AND COULD LEAD TO UB | |
| use std::mem::{self, MaybeUninit}; | |
| #[derive(Clone,Debug)] | |
| enum ToArrayError { | |
| TooShort(usize, usize), |
| import inspect | |
| try: | |
| unichr | |
| except NameError: | |
| unichr = chr | |
| def f(s): | |
| # find all {}'s | |
| stack = [] |