ChrisTitusTech / website

My HUGO Website that I use for Videos, Blogs, and Redirects
89 stars 45 forks source link

hastebin/ #203

Open utterances-bot opened 6 months ago

utterances-bot commented 6 months ago

Hastebin

Having Fun with Technology

https://christitus.com/hastebin/

gcarbonneau commented 6 months ago

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.

linhtutkyawdev commented 1 month ago

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 commented 1 month ago

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
breakTBB commented 1 month ago

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