Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hastebin/ #203

Open
utterances-bot opened this issue May 8, 2024 · 4 comments
Open

hastebin/ #203

utterances-bot opened this issue May 8, 2024 · 4 comments

Comments

@utterances-bot
Copy link

Hastebin

Having Fun with Technology

https://christitus.com/hastebin/

Copy link

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.

Copy link

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

Copy link

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

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants