Skip to content

Commit

Permalink
fix: go path asdf and remove unsued functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsd committed Jul 7, 2024
1 parent 0cadf3e commit ac8583b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 65 deletions.
5 changes: 5 additions & 0 deletions system/.asdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
. "$HOME/.asdf/asdf.sh"
# Load asdf completions
. "$HOME/.asdf/completions/asdf.bash"

# set bin path and GOPATH for the current Go
export GOPATH=$(asdf where golang)/packages
export GOROOT=$(asdf where golang)/go
export PATH="${PATH}:$(go env GOPATH)/bin"
12 changes: 1 addition & 11 deletions system/.function
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
# Switch long/short prompt
# Switch to short prompt

ps0() {
unset PROMPT_COMMAND
PS1='$ '
}

ps1() {
source "$DOTFILES_DIR"/system/.prompt
}

# Get named var (usage: get "VAR_NAME")

get() {
echo "${!1}"
}

# Add to path

prepend-path() {
Expand Down
22 changes: 0 additions & 22 deletions system/.function_network
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,3 @@ srv() {
open "http://localhost:$PORT"
http-server "$DIR" -p "$PORT"
}

# Get IP from hostname

hostname2ip() {
ping -c 1 "$1" | egrep -m1 -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
}

# Upload file to transfer.sh
# https://github.com/dutchcoders/transfer.sh/

transfer() {
tmpfile=$( mktemp -t transferXXX )
curl --progress-bar --upload-file "$1" https://transfer.sh/$(basename $1) >> $tmpfile;
cat $tmpfile;
rm -f $tmpfile;
}

# Find real from shortened url

unshorten() {
curl -sIL $1 | sed -n 's/Location: *//p'
}
7 changes: 0 additions & 7 deletions system/.function_text

This file was deleted.

25 changes: 0 additions & 25 deletions test/function.bats

This file was deleted.

0 comments on commit ac8583b

Please sign in to comment.