website icon indicating copy to clipboard operation
website copied to clipboard

hastebin/

Open utterances-bot opened this issue 1 year ago • 4 comments

Hastebin

Having Fun with Technology

https://christitus.com/hastebin/

utterances-bot avatar May 08 '24 15:05 utterances-bot

Thanks Chris! I've been looking for a tool that does exactly that! I've been using Nextcloud as a crutch, but this is exactly what I didn't know I needed :)

I'm off to setup my own server. Thanks again for the fantastic info you put out there sir.

gcarbonneau avatar May 08 '24 15:05 gcarbonneau

Pretty cool. And thanks Chris. Since I love fish shell. This is the translation.

hastebin

function hb if test (count $argv) = 0 echo "No file path specified." return else if ! test -f $argv echo "File path does not exist." return end

set uri "http://bin.christitus.com/documents"
set response $(curl -s -X POST -d "$(cat $argv)" "$uri")
if test $status = 0
    set hasteKey $(echo $response | jq -r '.key')
    echo "http://bin.christitus.com/$hasteKey"
else
    echo "Failed to upload the document."
end

end

linhtutkyawdev avatar Sep 30 '24 21:09 linhtutkyawdev

Pretty cool. And thanks Chris. Since I love fish shell. This is the translation.

# hastebin
function hb 
    if test (count $argv) = 0
        echo "No file path specified."
        return
    else if  ! test -f $argv
        echo "File path does not exist."
        return
    end

    set uri "http://bin.christitus.com/documents"
    set response $(curl -s -X POST -d "$(cat $argv)" "$uri")
    if test $status = 0
        set hasteKey $(echo $response | jq -r '.key')
        echo "http://bin.christitus.com/$hasteKey"
    else
        echo "Failed to upload the document."
    end
end

linhtutkyawdev avatar Sep 30 '24 21:09 linhtutkyawdev

It would be nice if it could support modifying the size of the font.

breakTBB avatar Oct 16 '24 09:10 breakTBB