Last active
November 19, 2023 00:46
-
-
Save ktunprasert/1e3692c75fa9ebd95d99e1ba5fc05d98 to your computer and use it in GitHub Desktop.
Revisions
-
ktunprasert revised this gist
Nov 19, 2023 . No changes.There are no files selected for viewing
-
ktunprasert revised this gist
Nov 19, 2023 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ # Cheat.sh function function cheat --description ="Curl commands from cheat.sh with the format 'cheat.sh/[0]/[1]/...'" # Arguments parsing # from: > cheat go :learn # to: go/:learn set path (echo $argv | sed 's/\s/\//g') echo $path # curl (echo cheat.sh/$path) | bat curl (echo cheat.sh/$path) end -
ktunprasert created this gist
Nov 19, 2023 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ function exdoc elixir -e "require IEx.Helpers; IEx.Helpers.h $argv" end 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ function git_fd set -l commandline (__fzf_parse_commandline) set -l dir $commandline[1] set -l fzf_query $commandline[2] set -l COMMAND "fd -HI -d 3 -t directory --absolute-path -g \.git $HOME $HOME/workspace $W/go/src/github.com/ktunprasert -x echo {//}" begin eval "$COMMAND | "(__fzfcmd)' +m --query "'$fzf_query'"' | read -l result if [ -n "$result" ]; cd $result commandline -t "" end end commandline -f repaint end