Skip to content

Instantly share code, notes, and snippets.

@sandikata
Created May 28, 2019 17:43
Show Gist options
  • Save sandikata/d6d52e469ab9e839b4dcb775faf42574 to your computer and use it in GitHub Desktop.
Save sandikata/d6d52e469ab9e839b4dcb775faf42574 to your computer and use it in GitHub Desktop.
#!/bin/bash
#Author: Rosen Aleksandrov
#E-Mail: [email protected]
#IRC: irc.freenode.net/#calculate irc.politeia.net/#bulgaria
# Pastebin for large files
file=`zenity --file-selection --filename=$HOME/ --file-filter='Text files (txt,conf,log) | *.txt *.conf *.log' --file-filter='All files | *' --title="Select a text file"`
value=$?
case $value in
0) cat $file | curl -s -F 'sprunge=<-' http://sprunge.us 2>&1 | zenity --width=10 --height=0 --text-info --title "Sprunge link"
;;
1) exit 0
;;
255) exit 0
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment