nRnYqfrb5pJuTP5YAohj

Untitled

Feb 3rd, 2021
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. #############################################################
  2. # SET MODULE ENVIRONMENT #
  3. #############################################################
  4.  
  5. module load anaconda/4.6.11-py37
  6.  
  7. #############################################################
  8. # SET CONDA ENVIRONMENT #
  9. #############################################################
  10.  
  11. conda activate base
  12.  
  13. #############################################################
  14. # SET BASH HISTORY #
  15. #############################################################
  16.  
  17. HISTSIZE=20000
  18. HISTFILESIZE=20000
  19.  
  20. #############################################################
  21. # SET UMASK ENVIRONMENT #
  22. #############################################################
  23.  
  24. umask 007
  25.  
  26.  
  27. #############################################################
  28. # ADD PASTEBIN FUNCTIONALITY #
  29. #############################################################
  30.  
  31. pastebin()
  32. {
  33. local url='https://paste.c-net.org/'
  34. if (( $# )); then
  35. local file
  36. for file; do
  37. curl -s \
  38. --data-binary @"$file" \
  39. --header "X-FileName: ${file##*/}" \
  40. "$url"
  41. done
  42. else
  43. curl -s --data-binary @- "$url"
  44. fi
  45. }
  46. pasteget()
  47. {
  48. local url='https://paste.c-net.org/'
  49. if (( $# )); then
  50. local arg
  51. for arg; do
  52. curl -s "${url}${arg##*/}"
  53. done
  54. else
  55. local arg
  56. while read -r arg; do
  57. curl -s "${url}${arg##*/}"
  58. done
  59. fi
  60. }
Advertisement
Add Comment
Please, Sign In to add comment