This file contains hidden or 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
| #Add the following to your bashrc or similar to quickly create secrets without leaving your terminal! | |
| #This also prints the secret link back to you, so you can copy and paste elsewhere | |
| #eg | |
| #george@george-LT:~$ onetimesecret Thisissupersecret | |
| #https://onetimesecret.com/secret/kvq9927e3ylltd83u679vlyfr942vjg | |
| onetimesecret() { | |
| if [ $# -eq 0 ]; then echo "No secret specified";return 1; fi | |
| secret=$(curl -s -F "secret=$1" https://onetimesecret.com/api/v1/share | cut -d '"' -f12) | |
| echo https://onetimesecret.com/secret/$secret | |
| } |