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 zsh | |
| # shellm - ZSH plugin that intercepts @llm prompts and sends them to Claude | |
| # Usage: put @llm anywhere in your command line, e.g.: | |
| # @llm list files by size | |
| # find . @llm only python files modified today | |
| # The response (a shell command) replaces the entire line for you to review/execute. | |
| SHELLM_MODEL="${SHELLM_MODEL:-haiku}" |
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
| import random | |
| import sysconfig | |
| import time | |
| from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor | |
| class Stopwatch: | |
| def __init__(self): | |
| self.start = time.perf_counter() |
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
| target1: ## does some stuff | |
| echo target1 | |
| target2: target1 ## this wil l only print target2 not target1 | |
| echo target2 | |
| help: ## prints help for target1 and target2 | |
| @grep '##' $(MAKEFILE_LIST) \ | |
| | grep -Ev 'grep|###' \ | |
| | sed -e 's/^\([^:]*\):[^#]*##\([^#]*\)$$/\1:\2/' \ |
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
| reverse_search() { | |
| sel="$( \ | |
| cat ${HOME}/.zsh_history \ | |
| | grep -i "$BUFFER" \ | |
| | cut -d';' -f2 \ | |
| | sort \ | |
| | uniq -ui \ | |
| | fzf)" | |
| [ -z "$sel" ] && return | |
| BUFFER="$sel" |
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
| echo password | EDITOR=cat ansible-vault edit --vault-password-file /bin/cat test.vault |
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 zsh | |
| REGISTRY="<YOU_REGISTRY_URL_HERE>" | |
| sel() { | |
| echo "$1" | rofi -dmenu -multi-select -config "~/.config/rofi/config-multi-select.rasi" | |
| } | |
| PARSE=" | |
| import sys |
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 zsh | |
| DISTANCE_COMMAND_DESCRIPTION=15 | |
| cmd_parse_lets=" | |
| import yaml | |
| with open('lets.yaml', 'r') as f: | |
| commands = yaml.safe_load(f) | |
| commands = commands['commands'].items() | |
| lmax = max(len(k) for k, _ in commands) |
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
| FROM python:3.9-alpine | |
| ################################################################################ | |
| # PYTHON INIT | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| LANG=C.UTF-8 \ | |
| PIP_NO_CACHE_DIR=off \ | |
| PIP_DISABLE_PIP_VERSION_CHECK=on \ | |
| PIP_DEFAULT_TIMEOUT=100 |
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 sh | |
| main() { | |
| # path to store tmp stuff | |
| dir=/tmp | |
| # tmp path of the img to process by tesseract | |
| out_img=$dir/tesseract_img.png | |
| # output text read from the img | |
| out_txt=$dir/tesseract_text |
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 sh | |
| parse() { | |
| code='\ | |
| import re | |
| import sys | |
| files = sys.argv[1:] | |
| tests = [] |
NewerOlder