Last active
August 29, 2015 14:15
-
-
Save compleatang/87603d14f00b2f35c8b8 to your computer and use it in GitHub Desktop.
This file contains 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 characters
# Aliases | |
alias efa='ipfs_add' | |
alias efb='ipfs_view' | |
alias efg='ipfs_get' | |
alias efs='ipfs_get_save' | |
# alias gss='git status -s' | |
# compdef _git gss=git-status | |
# Add a file to IPFS cache | |
function ipfs_add() | |
{ | |
echo "https://ipfs.erisbootstrap.sexy/ipfs/$(curl --ssl-reqd -ksiX POST -d @$1 https://ipfs.erisbootstrap.sexy/ipfs/ | grep Ipfs-Hash | awk '{print $2}')" | |
} | |
function ipfs_view() | |
{ | |
echo "https://ipfs.erisbootstrap.sexy/ipfs/$1" | |
} | |
function ipfs_get() | |
{ | |
curl --ssl-reqd -ks https://ipfs.erisbootstrap.sexy/ipfs/$1 | |
} | |
function ipfs_get_save() | |
{ | |
curl --ssl-reqd -ks https://ipfs.erisbootstrap.sexy/ipfs/$1 > $2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment