Add pastebin script

This commit is contained in:
Daniel Flanagan 2019-08-30 14:55:44 -05:00
parent 9f9dbac238
commit 41c84e376d
2 changed files with 17 additions and 1 deletions

View File

@ -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
View 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."