https://superuser.com/questions/229773/run-command-on-startup-login-mac-os-x
This file contains 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
if (( $+commands[az] )); then | |
autoload -U +X bashcompinit && bashcompinit | |
source $(brew --prefix)/etc/bash_completion.d/az | |
fi |
This file contains 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
# make sure you execute this *after* asdf or other version managers are loaded | |
if (( $+commands[ov] )); then | |
eval "$(ov --completion zsh)" | |
fi |
This file contains 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
def setup(): | |
""" | |
Config below is subject to change | |
https://stackoverflow.com/questions/76256249/logging-in-the-open-ai-python-library/78214464#78214464 | |
https://github.com/openai/openai-python/blob/de7c0e2d9375d042a42e3db6c17e5af9a5701a99/src/openai/_utils/_logs.py#L16 | |
""" | |
openai_log_path = taxdocs.root / "openai.log" | |
openai_file_handler = logging.FileHandler(openai_log_path) |
This file contains 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
# make sure you execute this *after* asdf or other version managers are loaded | |
# bun completions are strange: running `bun completions` installs ~/.bun/_bun and does not output the completion source code | |
# this is a hack until bun fixes their completion setup https://github.com/oven-sh/bun/issues/1272 | |
if (( $+commands[bun] )); then | |
[ -s ~/.bun/_bun ] || bun completions | |
# cannot source directly, must add fpath to completions | |
fpath+=~/.bun/ |
This file contains 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
# make sure you execute this *after* asdf or other version managers are loaded | |
# the default docker completion is not as advanced as this one, you'll want to remove it: | |
# rm $(brew --prefix)/share/zsh/site-functions/_docker | |
# https://github.com/docker/compose/issues/8550 | |
if (( $+commands[docker] )); then | |
eval "$(docker completion zsh)" | |
fi |
This file contains 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 click | |
import sqlite_utils | |
import json | |
import logging | |
SERVICE = "openai" | |
PREFIX = "" | |
logger = logging.getLogger(__name__) |
This file contains 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
tell application "Safari" | |
activate | |
open location "https://twitter.com/logout" | |
end tell | |
tell application "System Events" | |
tell process "Safari" | |
delay 0.5 | |
click button "Log out" of group 1 of group 1 of group 1 of UI element 1 of scroll area 1 of group 1 of group 1 of tab group 1 of splitter group 1 of window 1 | |
end tell |
This file contains 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
# make sure you execute this *after* asdf or other version managers are loaded | |
if (( $+commands[pack] )); then | |
source "$(pack completion --shell zsh)" | |
fi |
This file contains 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
# make sure you execute this *after* asdf or other version managers are loaded | |
if (( $+commands[op] )); then | |
eval "$(op completion zsh)" | |
compdef _op op | |
# load plugins configuration | |
if [[ -f ~/.config/op/plugins.sh ]]; then | |
source ~/.config/op/plugins.sh | |
fi | |
fi |
NewerOlder