}
+#### begin bitcoin related things
btc() {
local f=/etc/bitcoin/bitcoin.conf
# importprivkey will timeout if using the default of 15 mins.
# upped it to 1 hour.
bitcoin-cli -rpcclienttimeout=60000 -$(s grep rpcuser= $f) -$(s grep rpcpassword= $f) "$@"
}
-
btcusd() { # $1 btc in usd
local price
price="$(curl -s https://api.coinbase.com/v2/prices/BTC-USD/spot | jq -r .data.amount)"
printf "$%.2f\n" "$(echo "scale=10; $price * $1"| bc -l)"
fi
}
+#### end bitcoin related things
sudo apt-get update
}
-
+dup() {
+ local ran_d
+ ran_d=false
+ case $PS1 in
+ *DISTRO-BEGIN*)
+ /b/ds/distro-begin
+ ran_d=true
+ ;;&
+ *DISTRO-END*)
+ /b/ds/distro-end
+ ran_d=true
+ ;;&
+ *CONFLINK*)
+ if ! $ran_d; then
+ conflink
+ fi
+ ;;
+ esac
+}
envload() { # load environment from a previous: export > file
local file=${1:-$HOME/.${USER}_env}