Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #############################################################
- # SET MODULE ENVIRONMENT #
- #############################################################
- module load anaconda/4.6.11-py37
- #############################################################
- # SET CONDA ENVIRONMENT #
- #############################################################
- conda activate base
- #############################################################
- # SET BASH HISTORY #
- #############################################################
- HISTSIZE=20000
- HISTFILESIZE=20000
- #############################################################
- # SET UMASK ENVIRONMENT #
- #############################################################
- umask 007
- #############################################################
- # ADD PASTEBIN FUNCTIONALITY #
- #############################################################
- pastebin()
- {
- local url='https://paste.c-net.org/'
- if (( $# )); then
- local file
- for file; do
- curl -s \
- --data-binary @"$file" \
- --header "X-FileName: ${file##*/}" \
- "$url"
- done
- else
- curl -s --data-binary @- "$url"
- fi
- }
- pasteget()
- {
- local url='https://paste.c-net.org/'
- if (( $# )); then
- local arg
- for arg; do
- curl -s "${url}${arg##*/}"
- done
- else
- local arg
- while read -r arg; do
- curl -s "${url}${arg##*/}"
- done
- fi
- }
Advertisement
Add Comment
Please, Sign In to add comment