Skip to content

Instantly share code, notes, and snippets.

@jhass
Last active November 5, 2015 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhass/1e4e21f427dd008c3a77 to your computer and use it in GitHub Desktop.
Save jhass/1e4e21f427dd008c3a77 to your computer and use it in GitHub Desktop.
ix.io helper function
  1. Add to your .${SHELL}rc.
  2. Replace user and password.
  3. Create cat foo | ixio.
  4. Update cat foo | ixio abc.
  5. View your pastes at ix.io/user/your_username.
ixio() {
id=""
if [ -n "$1" ]; then
id="-Fid:1=$1"
fi
url="$(curl --basic -F 'f:1=<-' $id user:password@ix.io)"
echo "$url" | tee >(xclip -selection clipboard)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment