Skip to content

Instantly share code, notes, and snippets.

View coko7's full-sized avatar
🌸
fzf never stops amazing me

Coko coko7

🌸
fzf never stops amazing me
View GitHub Profile
@coko7
coko7 / fzf-ffsend-quick-delete.sh
Created February 24, 2026 15:38
A handy one-liner to fuzzy find ffsend uploads and delete them
# Bash
ffsend h | tail -n +2 | fzf -m --accept-nth=2 | xargs -I {} ffsend delete {}
# Powershell
# ffsend history `
# | Select-Object -Skip 1 `
# | fzf --multi --accept-nth=2 `
# | ForEach-Object { ffsend delete $_ }
@coko7
coko7 / fzf-nvim-quick-edit.sh
Created December 17, 2025 11:44
A handy one-liner to fuzzy find bash my custom scripts and edit the one I am looking for in NeoVim
# short version
fd -L -e sh . ~/.config/local/bin | fzf --preview 'bat -f {}' --bind 'enter:become(nvim {})'
# with verbose args version
fd --follow --extension sh . ~/.config/local/bin | fzf --preview 'bat --color=always {}' --bind 'enter:become(nvim {})'
@coko7
coko7 / file-watcher.sh
Created November 25, 2025 08:49
Watch file
#!/usr/bin/env bash
while true; do
glow file.md # or any other command
inotifywait -e modify file.md # replace 'file.md' with whatever file you are editing
clear
done
@coko7
coko7 / csv2json.sh
Created October 28, 2025 15:18
Convert any CSV file to JSON
#!/usr/bin/env bash
jq --raw-input --slurp '
split("\n") |
map(select(length > 0)) |
(.[0] | split(",")) as $keys |
.[1:] |
map(split(",") | [ $keys, . ] | transpose | map({(.[0]): .[1]}) | add)
' ./input.csv