Skip to content

Instantly share code, notes, and snippets.

View AdamGagorik's full-sized avatar

Adam Gagorik AdamGagorik

View GitHub Profile
live_config_reload = true
import = [
"/home/agagorik/.config/alacritty/catppuccin/catppuccin-mocha.toml",
]
# shell = "/usr/bin/zsh"
[env]
TERM = "xterm-256color"
#!/usr/bin/env python3
import webbrowser
import argparse
import os
def default() -> list[str]:
return os.environ.get("GITHUB_PULL_REQUEST_AUTHORS", "").split(":")
#!/usr/bin/env bash
# alias tldr="~/.gists/bin/tldr"
TLDR_COMMAND=/home/linuxbrew/.linuxbrew/bin/tldr
if [ $# -eq 0 ]; then
$TLDR_COMMAND --help
exit 0
fi
#!/usr/bin/env bash
tr ':' '\n' <<< "$PATH" | fzf --no-sort | xclip -i -sel clip
#!/usr/bin/env bash
# Store the STDOUT of fzf in a variable
selection=$(find . -type d | fzf --multi --height=80% --border=sharp \
--preview='tree -C {}' --preview-window='45%,border-sharp' \
--prompt='Dirs > ' \
--bind='del:execute(rm -ri {+})' \
--bind='ctrl-p:toggle-preview' \
--bind='ctrl-d:change-prompt(Dirs > )' \
--bind='ctrl-d:+reload(find . -type d)' \
#!/usr/bin/env bash
old_url=$(git remote get-url origin)
new_url=${old_url//https:\/\//git@}
new_url=${new_url//.com\//.com:}
echo "old url: $old_url"
echo "new url: $new_url"
if [[ "${old_url}" == "${new_url}" ]]
#!/usr/bin/env bash
INP=main.tex
OUT=main.docx
REF=reference.docx
if [[ $# -ge 1 ]]; then
INP="${1%.*}.tex"
OUT="${1%.*}.docx"
fi
@AdamGagorik
AdamGagorik / zcon
Created October 25, 2023 15:02
Helper function for editing zshrc
#!/usr/bin/env bash
function zcon() {
time_0=`date -r ~/.zshrc`
nvim ~/.zshrc
time_1=`date -r ~/.zshrc`
echo $time_0
echo $time_1
@AdamGagorik
AdamGagorik / brew-pyenv.sh
Last active October 18, 2023 15:02
Compile pyenv python using brew OpenSSL
CPPFLAGS="-I$(brew --prefix [email protected])/include" LDFLAGS="-L$(brew --prefix [email protected])/lib" pyenv install -v 3.10.13
@AdamGagorik
AdamGagorik / gist
Last active April 23, 2024 14:56
Interactive gh gist callback
#!/usr/bin/env python3
"""
EXTRAS
path: Get path of local clone
link: Register a gist locally
sync: Sync all registered gists
debug: Debug script configuration
status: Get status of registered gists
select: Select a gist using fuzzy finder
attach: Attach a gist to the local registry