Skip to content

Commit

Permalink
chore(meta): cleanup all dotbot installation files
Browse files Browse the repository at this point in the history
  • Loading branch information
aikow committed Dec 12, 2024
1 parent f4c27fc commit ec01dcf
Show file tree
Hide file tree
Showing 133 changed files with 468 additions and 1,389 deletions.
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

99 changes: 0 additions & 99 deletions bin/all/24-bit-color

This file was deleted.

16 changes: 0 additions & 16 deletions bin/all/os-open

This file was deleted.

9 changes: 9 additions & 0 deletions bin/cleanlinks
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

for path in "$@"; do
for entry in "$path"/* "$path"/.*; do
if [[ -L $entry && ! -e "$(readlink $entry)" ]]; then
unlink $entry
fi
done
done
5 changes: 5 additions & 0 deletions bin/docker_is_valid
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

if ! command -v docker &>/dev/null; then
exit 1
fi
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions bin/fzf_git_branch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

git_is_repo || return

git branch -a --color=always \
| grep -v '/HEAD\s' \
| sort \
| fzf \
--ansi \
--multi \
--tac \
--preview-window right:70% \
--preview 'git log --oneline --graph --date=short --color=always --pretty="format:%C(auto)%cd %h%d %s" $(sed s/^..// <<< {} | cut -d" " -f1)' \
| sed 's/^..//' \
| cut -d' ' -f1 \
| sed 's#^remotes/##'
18 changes: 18 additions & 0 deletions bin/fzf_git_log
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

git_is_repo || return

git log \
--date=short \
--graph \
--color=always \
--format="%C(green)%C(bold)%cd %C(auto)%h%d %s (%an)" \
| fzf \
--ansi \
--no-sort \
--reverse \
--multi \
--bind 'ctrl-s:toggle-sort' \
--header 'Press CTRL-S to toggle sort' \
--preview 'grep -o "[a-f0-9]\{7,\}" <<< {} | xargs git show --color=always' \
| grep -o "[a-f0-9]\{7,\}"
10 changes: 10 additions & 0 deletions bin/fzf_git_remote
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

git_is_repo || return

git remote -v \
| awk '{print $1 "\t" $2}' \
| uniq \
| fzf --tac \
--preview 'git log --oneline --graph --date=short --pretty="format:%C(auto)%cd %h%d %s" {1}' \
| cut -d"\t" -f1
8 changes: 8 additions & 0 deletions bin/fzf_git_stash
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

git_is_repo || return

git stash list \
| fzf --reverse -d: \
--preview 'git show --color=always {1}' \
| cut -d: -f1
9 changes: 9 additions & 0 deletions bin/fzf_git_status
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

git_is_repo || return

git -c color.status=always status --short \
| fzf -m --ansi --nth 2..,.. \
--preview '(git diff --color=always -- {-1} | sed 1,4d; cat {-1})' \
| cut -c4- \
| sed 's/.* -> //'
7 changes: 7 additions & 0 deletions bin/fzf_git_tag
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

git_is_repo || return

git tag --sort -version:refname \
| fzf --multi --preview-window right:70% \
--preview 'git show --color=always {}'
10 changes: 10 additions & 0 deletions bin/fzf_k8s_jobs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

k8s_is_valid || return

kubectl get jobs,pytorchjobs -o wide \
| fzf --header-lines=1 \
--preview-window='hidden' \
--preview='kubectl logs "$(cut -d" " -f1 <<<{} | sed -E "s:.*/::g")"' \
| cut -d' ' -f1 \
| sed -E 's:.*/::g'
10 changes: 10 additions & 0 deletions bin/fzf_k8s_pods
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

k8s_is_valid || return

kubectl get pods -o wide \
| fzf --header-lines=1 \
--preview-window='hidden' \
--preview='kubectl logs "$(cut -d" " -f1 <<<{} | sed -E "s:.*/::g")"' \
| cut -d' ' -f1 \
| sed -E 's:.*/::g'
7 changes: 7 additions & 0 deletions bin/fzf_projects
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

projects \
| fzf \
--multi \
--preview='eza {}' \
--preview-window='nowrap'
9 changes: 9 additions & 0 deletions bin/git_is_repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

if ! command git &>/dev/null; then
exit 1
fi

if ! git rev-parse HEAD &>/dev/null; then
exit 1
fi
9 changes: 9 additions & 0 deletions bin/k8s_is_valid
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

if ! command -v kubectl &>/dev/null; then
exit 1
fi

if [[ ! -f ~/.kube/config ]]; then
exit 1
fi
3 changes: 3 additions & 0 deletions bin/lsgit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

fd -HI --type d '^\.git$' "${1:-.}" -x echo '{//}'
1 change: 0 additions & 1 deletion bin/os/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions bin/os/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions bin/os/linux/log-gpu

This file was deleted.

10 changes: 0 additions & 10 deletions bin/os/linux/remap-escape

This file was deleted.

58 changes: 0 additions & 58 deletions bin/os/macos/remap-keys

This file was deleted.

24 changes: 0 additions & 24 deletions bin/os/set-os

This file was deleted.

Empty file removed bin/os/set-os.sh
Empty file.
3 changes: 3 additions & 0 deletions bin/projects
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

lsgit ~/workspace
Loading

0 comments on commit ec01dcf

Please sign in to comment.