Add pastebin script
This commit is contained in:
parent
9f9dbac238
commit
41c84e376d
|
@ -109,5 +109,6 @@ Plug 'leafo/moonscript-vim', {'for': ['moon', 'moonscript']} " moonscript lan
|
|||
Plug 'OmniSharp/omnisharp-vim', {'for': ['cs']} " C# language
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'} " language server completion
|
||||
Plug 'JakeBecker/elixir-ls', {'for': ['elixir'], 'do': { -> g:elixirls.compile() }}
|
||||
" Plug 'lytedev/elm-vim' " elm lang
|
||||
Plug 'tpope/vim-dadbod' " databasing in vim
|
||||
" Plug 'lytedev/elm-vim' " elm lang
|
||||
Plug 'ssh://git@git.lyte.dev:2222/lytedev/vim-lytlang.git'
|
||||
|
|
15
scripts/bin/pbin
Executable file
15
scripts/bin/pbin
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
HOST="ld"
|
||||
INTERNAL_PUBLIC_DIR="~/../services/data/files/pastes"
|
||||
|
||||
f="${1}"
|
||||
uuid="$(uuid v1)"
|
||||
|
||||
[ "${f}" == "" ] && echo "No file provided. Exiting." >&2 && exit 2
|
||||
[ ! -f "${f}" ] && echo "File '$f' does not exist. Exiting." >&2 && exit 1
|
||||
|
||||
scp "${f}" "${HOST}:${INTERNAL_PUBLIC_DIR}/${uuid}.txt"
|
||||
|
||||
echo "${f} uploaded to https://lyte.dev/pastes/${uuid}.txt"
|
||||
echo "I recommend checking the file for secrets before sharing."
|
Reference in a new issue