Skip to content

Instantly share code, notes, and snippets.

View Antman261's full-sized avatar

Anthony Manning-Franklin Antman261

View GitHub Profile
import json
from typing import Callable, TypedDict
from pathlib import Path
from tempfile import gettempdir
from talon import cron
Channel = TypedDict('Channel', {
'dispatch': Callable[[dict], None],
'handle_event': Callable[[dict], None],
'app_events': Path,
tag: user.code_mode
code.language: typescript
-
# Keywords
export from file: user.insert_between("export * from './", "';")
import from package <user.text>$:
target = user.formatted_text(text or "", 'DASH_SEPARATED')
user.insert_between("import {{ ", " }} from '{target}';")
[import] from package$: user.insert_between("import {{ }} from '", "';")
(funk | function) [<user.text>]$:
@Antman261
Antman261 / brew-gh-install.bash
Created January 27, 2025 01:56
Install brew and GitHubCLI
(hash brew 2>/dev/null || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)") && (hash gh 2>/dev/null || brew install gh) && ([[ "$(gh auth status)" == *"Logged in"* ]] || gh auth login)
from talon import Module, Context
mod = Module()
mod.tag(
"commander_active",
desc="Sets an extremely long speech timeout, reset with popping noise or spacebar",
)
ctx = Context()
@mod.action_class
class Actions:
def set_silly_timeout():