Giter Club home page Giter Club logo

microbin's Introduction

Hi there 👋

Hello, my name is Dániel Szabó, I am a software developer and creator originally from Hungary, currently based in Oulu, Finland, busy working towards my Master's degree in Computing.

My open source projects mostly get maintenance during summer breaks, I apologise if I am slow to response to requests.

For business enquiries send me a digital letter. You can also reach me on LinkedIn.

Cheers, Dani

microbin's People

Contributors

7a6163 avatar albocc avatar alex3305 avatar amnesiacsardine avatar arghyadipchak avatar arizard avatar dependabot[bot] avatar dhruvasambrani avatar dvdsk avatar egor-tensin avatar figsoda avatar foxidokun avatar frap129 avatar frdmn avatar hay-kot avatar heapunderfl0w avatar henry40408 avatar jchia avatar kwiniarski97 avatar mooons avatar rissson avatar stavros-k avatar szabodanika avatar techiall avatar tyfui90 avatar uniquenullptr2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microbin's Issues

Orphaned pastas

When the URL/identifier for a private, non-expiring, pasta is forgotten, the pasta may remain forever with nobody who can delete it except for some administrator or imaginary GC mechanism within microbin that has access to the underlying data files. This can result in endless garbage accumulation.

For this problem, perhaps there can be an administrative tool (e.g. program) to list the URLs/identifiers for pastas that meet certain criteria, optionally deleting them. For example, someone could be interested in private pastas that have not been accessed in the past n days. Potentially problematic concurrent access to the underlying data files by microbin and this tool needs to be considered.

Alternatively, there could be a switch to disallow non-expiring, private, pastas.

URL Shortening does not work

If i short an URL by just simply pasting only the URL in my Pasta and opening it on a other device i just get the normal text and dont get redirected to the URL.

Failed to delete file no-file

Ran microbin in my Documents folder (not as sudo).
Program crashed when I attempted to create new text pasta, at which point I killed the process.


2022-06-04T13:40:39 [INFO] - MicroBin starting on http://127.0.0.1:8080
2022-06-04T13:40:39 [INFO] - Starting 1 workers
2022-06-04T13:40:39 [INFO] - Actix runtime found; starting in Actix runtime
2022-06-04T13:40:48 [INFO] - 127.0.0.1 "GET / HTTP/1.1" 302 2615 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0" 0.000127
2022-06-04T13:40:48 [INFO] - 127.0.0.1 "GET /static/water.css HTTP/1.1" 302 22668 "http://localhost:8080/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0" 0.000121
2022-06-04T13:40:48 [INFO] - 127.0.0.1 "GET /favicon.ico HTTP/1.1" 302 1138 "http://localhost:8080/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0" 0.000093
2022-06-04T13:40:52 [INFO] - 127.0.0.1 "POST /upload HTTP/1.1" 302 0 "http://localhost:8080/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0" 0.000682
56942
thread 'actix-rt|system:0|arbiter:0' panicked at 'Failed to delete file no-file!: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/util/misc.rs:26:18
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41
thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41
thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41
thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41
thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41
thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41
thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41
thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41
thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41
^C2022-06-04T13:41:06 [INFO] - SIGINT received; starting forced shutdown


Received this error twice (not back to back).
I am unable to recreate this error no matter what I try.

(not sure if this info is needed, but here it is anyway)
Mac M1
macOS Monterey v12.3.1
Firefox 101.0 (64-Bit)

Microbin was installed via "cargo install --git https://github.com/szabodanika/microbin"

Add custom Pasta name

I am using this to store links to some websites. It will be nice if I can give a custom bookmark name instead of auto generated pasta name.

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Pasta list with authentication

Currently the status of pasta list is either open (for everyone that has access to see and remove pastas if private pasta is not enabled) or closed (nobody can see anything at all).

I'm hoping for a mode that only the pasta list requires authentication. Or, if private pasta is enabled, one can see all the private pastas after authentication. Basically this sets an "administrator" role who can manage all the pastas.

I understand that microbin is not meant for public usage. But I think it will be useful if someone wants to manage all the pastas without turning on/off list and private and restarting the instance.

[Feature request] Add Sentry logging

Hi there!

Thanks for publishing and maintaining this cool crate! I'm still testing it out but so far, it looks fantastic.

I was wondering if there was any interest in adding sentry logging with the sentry-actix crate? I would probably use it so I'd be happy to write a PR for that. But if that isn't of much interest, I can just keep it on my fork.

Thanks

Potential security issue

Hello 👋

I run a security community that finds and fixes vulnerabilities in OSS. A researcher (@ablGH) has found a potential issue, which I would be eager to share with you.

Could you add a SECURITY.md file with an e-mail address for me to send further details to? GitHub recommends a security policy to ensure issues are responsibly disclosed, and it would help direct researchers in the future.

Looking forward to hearing from you 👍

(cc @huntr-helper)

Select filetypes for upload

An option to allow or disallow different filetypes. I don't want to allow upload of binaries or similar. I would only allow textbased.
If not possible the issue to completly disable file upload as in #67

Force delete does not delete the file from the host dir

A pasta set to expire after say, 24 hours does get deleted from the UI as well as the underlying directory.
However if we force "Remove" from pasta list, then the file remains in the host directory. I am currently running a small script to clear them every 24 hours or so, but its not ideal.

When we select "Remove" from UI, it is being cleared from the database.json file. but it should also clear data from directory.

Docker volume not correct?

I just created a Docker container on my Synoloy NAS and used:

    volumes:
     - ./microbin-data:/usr/local/bin/pasta_data

But after examining the container itself I noticed the folder should be:
/app/pasta_data

Or at least /usr/local/bin/pasta_data is empty for me and /app/pasta_data has the database.json file etc.

Manual Page

The software should come with built-in user manual, either with the installation or as a static page.

Package water.css in executable

Currently water.css is accessed from a static folder next to the executable. This makes setup a bit annoying, it would be so much better if the executable could be used on its own and a single file. Either an advanced method should be used to include this static folder in the binary or using Askama a template could be dedicated to it.

Add arg and/or environment variable to support changing the config and paste directory

Hi 👋🏼

I am building a rootless Docker container for microbin and there doesn't seem to be a arg to set where the pastes or configuration is stored and appears to just be stored in the same dir as microbin binary.

microbin/src/main.rs

Lines 66 to 72 in f55a5eb

match fs::create_dir_all("./pasta_data/public") {
Ok(dir) => dir,
Err(error) => {
log::error!("Couldn't create data directory ./pasta_data/public/: {:?}", error);
panic!("Couldn't create data directory ./pasta_data/public/: {:?}", error);
}
};

Logs in the Docker image I am building:

Couldn't create data directory ./pasta_data/public/: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }

I would be great if you could add a arg called --config-dir and --paste-dir which would point to there the respected paths

e.g.

microbin --config-dir /config --paste-dir /data

  • /config would contain the database.json and microbin.conf
  • /data would contain the pastes

copy button in pasta field

Hi, it would be nice if there would be a copy button in the upper right corner for simple copy the pasta.

curl example doesn't work because /create path returns 404

Hi,

thanks for your great piece of software! I just faced a small bug. I wanted to write a small script to create pastas from stdin in the terminal and for that I wanted to use curl. More specifically, I wanted to follow this example from microbin's help page:

Simple text Pasta: curl -d "expiration=10min&content=This is a test pasta" -X POST https://microbin.myserver.com/create

However, it seems that the /create endpoint is not existing. I just get HTTP 404 as response. Am I doing something wrong or is this maybe a bug?

Cheers

How to use --footer_text or --title?

I cannot seem to figure out how to pass a string to these arguments.

For context, I am trying to pass these arguments in the docker compose like so:
command: ["microbin", "--highlightsyntax", "--editable", "--hide-footer", "--title 'newtitle'"]

Tried different combinations such as
title:'new'
title new
title 'new'

nothing seem to be working. I have a feeling I am doing something dumb. Appreciate your help.

Add image on dockerhub

Please add a image on dockerhub or github registry. For a kubernetes Setup it is really not that easy to deploy it without creating a ci pipeline.

Disable file attachments

I would like to be able to disable the file upload option in my instance, it would be great if there was a flag to disable it. Someting like --no-fileupload

QR Codes

Add option to encode URL (final URL made by microbin, not the original) as QR Code using https://docs.rs/qrcode/latest/qrcode/. It could be simply displayed and it would be extremely useful for sending data from CLI or desktop to mobile for example, if the phone does not support good OCR for reading the URL itself

File Upload Feature

Add ability to upload a file as a pasta, on its own or accompanied with a text message.
Maybe create a brand new pasta page that shows a download button for the file + the message, while the raw path would just download the file.

[Feature Request] Add MicroBin to the Unraid Community Apps.

My feature request is a very easy to install version of MicroBin on the Unraid Community Apps.

I tried to do it myself but I have very little knowledge with Docker, Docker Hub or how to officially add an app to the Unraid CA:

2022-08-15_11-50

I clicked on ADD CONTAINER in the Unraid docker GUI and added the following:
Name: microbin
Repository: solarft/microbin

I added a new port:
WebUI:
Container Port: 8080
Host Port: e.g. 7123

I added a new path:
Data Path:
Container Path: /usr/local/bin/pasta_data
Host Path: /mnt/user/appdata/microbin/data/

As you can tell from the screenshot, basic functionality works and I can access, create and save new pasta in my local network.


I don't know if solarft/microbin is the official MicroBin docker hub repository, there were about 4 different ones and I tried them until one worked.

Also I have no idea how to pass command line arguments like --highlightsyntax. I tried many things but none of them worked.


I've done what I can and failed, maybe someone else is able to fulfill this feature request.

Thank you!

Docker environment variables

Heya,

Great project you have!

I understand that you're not so hot on Docker stuff currently, and there's quite a few variables that aren't available.

Would something like this be suitable for starters (I'm sure others could improve on it)?

#!/bin/bash

set -e

# Website
# https://github.com/szabodanika/microbin

# Version variables
MICROBINVER=$(microbin --version)

# Software versions
echo $MICROBINVER

# Declare Variables
PORT="${PORT:-"8080"}"
THREADS="${THREADS:-"1"}"

# Declare the string array
arrVar=()

# Add to string array if variable is true
if [ "$EDITABLE" == "true" ]
  then
    arrVar+=("--editable")
fi

if [ "$HIDE_FOOTER" == "true" ]
  then
    arrVar+=("--hide-footer")
fi

if [ "$HIGHLIGHTSYNTAX" == "true" ]
  then
    arrVar+=("--highlightsyntax")
fi

if [ "$PRIVATE" == "true" ]
  then
    arrVar+=("--private")
fi

if [ "$HIDE_FOOTER" == "true" ]
  then
    arrVar+=("--hide-footer")
fi

if [ "$HIDE_HEADER" == "true" ]
  then
    arrVar+=("--hide-header")
fi

if [ "$HIDE_LOGO" == "true" ]
  then
    arrVar+=("--hide-logo")
fi

if [ "$NO_LISTING" == "true" ]
  then
    arrVar+=("--no-listing")
fi

if [ "$PURE_HTML" == "true" ]
  then
    arrVar+=("--pure-html")
fi

if [ "$READ_ONLY" == "true" ]
  then
    arrVar+=("--readonly")
fi

if [ "$WIDE" == "true" ]
  then
    arrVar+=("--wide")
fi

#########################
#User Editable Variables#
#########################

if [ -v AUTH_USERNAME ]
  then
    arrVar+=("--auth-username $AUTH_USERNAME")
fi

if [ -v AUTH_PASSWORD ]
  then
    arrVar+=("--auth-password $AUTH_PASSWORD")
fi

if [ -v FOOTER_TEXT ]
  then
    arrVar+=("--footer_text $FOOTER_TEXT")
fi

if [ -v BIND_ADDR ]
  then
    arrVar+=("--bind $BIND_ADDR")
fi

# Save and define variables
printf -v str ' %s' "${arrVar[@]}"  # save to variable str without printing
MICROBIN_VARS="${str:1}"  # to remove the leading space 

# Show defined variables
echo "Microbin starting with following variables: microbin --port $PORT --threads $THREADS $MICROBIN_VARS"

# Start Microbin
microbin --port $PORT --threads $THREADS $MICROBIN_VARS

This would give you the following variables:

Variable Value
EDITABLE true false
EDITABLE true false
EDITABLE true false
EDITABLE true false
EDITABLE true false
EDITABLE true false
EDITABLE true false
EDITABLE true false
EDITABLE true false
EDITABLE true false
EDITABLE true false

EDITABLE="${EDITABLE:-}"

HIDE_FOOTER="${HIDE_FOOTER:-}"

HIGHLIGHTSYNTAX="${HIGHLIGHTSYNTAX:-}"

PRIVATE="${PRIVATE:-}"

HIDE_FOOTER="${HIDE_FOOTER:-}"

HIDE_HEADER="${HIDE_HEADER:-}"

HIDE_LOGO="${HIDE_LOGO:-}"

NO_LISTING="${NO_LISTING:-}"

PURE_HTML="${PURE_HTML:-}"

READ_ONLY="${READ_ONLY:-}"

WIDE="${WIDE:-}"

AUTH_USERNAME="${AUTH_USERNAME-}"

AUTH_PASSWORD="${AUTH_PASSWORD-""}"

FOOTER_TEXT="${FOOTER_TEXT-}"

BIND_ADDR="${BIND_ADDR-""}"

PORT="${PORT:-"8080"}"
THREADS="${THREADS:-"1"}"

Add markdown support

It would be great to have markdown support added. In fact we can even have syntax highlighting within a markdown text by specifying what syntax the code belongs to. I am not sure if that is the default implementation of markdown, but I know obsidian does it that way.

e.g.

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

[Feature request] Light/Dark mode changable

Would be nice to have 3 options:

  • Light mode
  • Dark mode
  • Automatic

So you can manually change to dark or light mode if you want.
I believe automatic is default now and gives you a dark theme if you're using a dark mode on your machine/phone.

Tags

I'm not sure if this is so useful as I think it would be, however adding tags would make it easier to organize and find pastas more easily once we have a bunch of them. Let me know what you think!

[Bug] Never expiring pastas deleted immediately

This code get called immediately when the page redirect to the newly created pasta
and the check at line 394 will always be true for pasta with expiration of "never"

microbin/src/main.rs

Lines 392 to 402 in 9e4940e

pastas.retain(|p| {
// delete the files too
if p.expiration < timenow {
// remove the file itself
fs::remove_file(format!("./pasta_data/{}/{}", p.id_as_animals(), p.file));
// and remove the containing directory
fs::remove_dir(format!("./pasta_data/{}/", p.id_as_animals()));
};
p.expiration == 0 || p.expiration > timenow
});

this should fix it and do one less comparison

    pastas.retain(|p| {
        // expiration is `never` or not reached
        if p.expiration == 0 || p.expiration > timenow {
            // keep
            true
        } else {
            // remove the file itself
            fs::remove_file(format!("./pasta_data/{}/{}", p.id_as_animals(), p.file));
            // and remove the containing directory
            fs::remove_dir(format!("./pasta_data/{}/", p.id_as_animals()));
            // remove
            false
        }
    });

Docker environment variables

Heya @szabodanika,

Great project you have!

I understand that you're not so hot on Docker stuff currently, and there's quite a few variables that aren't available.

Would something like this be suitable for starters (I'm sure others could improve on it)?

#!/bin/bash

set -e

# Website
# https://github.com/szabodanika/microbin

# Version variables
MICROBINVER=$(microbin --version)

# Software versions
echo $MICROBINVER

# Declare Variables
PORT="${PORT:-"8080"}"
THREADS="${THREADS:-"1"}"

# Declare the string array
arrVar=()

# Add to string array if variable is true
if [ "$EDITABLE" == "true" ]
  then
    arrVar+=("--editable")
fi

if [ "$HIDE_FOOTER" == "true" ]
  then
    arrVar+=("--hide-footer")
fi

if [ "$HIGHLIGHTSYNTAX" == "true" ]
  then
    arrVar+=("--highlightsyntax")
fi

if [ "$PRIVATE" == "true" ]
  then
    arrVar+=("--private")
fi

if [ "$HIDE_FOOTER" == "true" ]
  then
    arrVar+=("--hide-footer")
fi

if [ "$HIDE_HEADER" == "true" ]
  then
    arrVar+=("--hide-header")
fi

if [ "$HIDE_LOGO" == "true" ]
  then
    arrVar+=("--hide-logo")
fi

if [ "$NO_LISTING" == "true" ]
  then
    arrVar+=("--no-listing")
fi

if [ "$PURE_HTML" == "true" ]
  then
    arrVar+=("--pure-html")
fi

if [ "$READ_ONLY" == "true" ]
  then
    arrVar+=("--readonly")
fi

if [ "$WIDE" == "true" ]
  then
    arrVar+=("--wide")
fi

#########################
#User Editable Variables#
#########################

if [ -v AUTH_USERNAME ]
  then
    arrVar+=("--auth-username $AUTH_USERNAME")
fi

if [ -v AUTH_PASSWORD ]
  then
    arrVar+=("--auth-password $AUTH_PASSWORD")
fi

if [ -v FOOTER_TEXT ]
  then
    arrVar+=("--footer_text $FOOTER_TEXT")
fi

if [ -v BIND_ADDR ]
  then
    arrVar+=("--bind $BIND_ADDR")
fi

# Save and define variables
printf -v str ' %s' "${arrVar[@]}"  # save to variable str without printing
MICROBIN_VARS="${str:1}"  # to remove the leading space 

# Show defined variables
echo "Microbin starting with following variables: microbin --port $PORT --threads $THREADS $MICROBIN_VARS"

# Start Microbin
microbin --port $PORT --threads $THREADS $MICROBIN_VARS

This would give you the following variables:

Variable Value Result of true
EDITABLE true false --editable
HIDE_FOOTER true false --hide-footer
HIGHLIGHTSYNTAX true false --highlightsyntax
PRIVATE true false --private
HIDE_FOOTER true false --hide-footer
HIDE_HEADER true false --hide-header
HIDE_LOGO true false --hide-logo
NO_LISTING true false --no-listing
PURE_HTML true false --pure-html
READ_ONLY true false --readonly
WIDE true false --wide
AUTH_USERNAME user value --auth-username uservalue
AUTH_PASSWORD user value --auth-password uservalue
FOOTER_TEXT user value --footer_text uservalue
BIND_ADDR user value --bind uservalue
Variable Value Default Value
PORT user value 8080
THREADS user value 1

This way, no more needing to do commands or anything "non-standard" in Docker, and can easily be changed/added as new features come along without changing how you do things on the backend.

The best option of course, is in the backend, to import OS Variables and use them as required, but this should be a suitable workaround for now.

I can also tweak the dockerfile to be more in-line with buildkit, with better layer caching.

I'd be happy to raise a PR if you'd like?

Docker image references "static" dir, doesnt exist?

Hello!

Project looks great! I'm building a Kubernetes one-click installer for microbin for https://pibox.io - but ran into an issue. When building the image for ARM64 (or any arch), I fail to copy /usr/src/microbin/static https://github.com/szabodanika/microbin/blob/master/Dockerfile#L23

It looks like that directory has been renamed "templates" in 4cc7377

Is the fix as easy as changing the line to:

COPY --from=builder /usr/src/microbin/templates /usr/local/bin/templates 

I'll test this now, but figured you might want to know about it! ❤️

Fix code scanning alert - this comparison involving the minimum or maximum element for this type contains a case that is al...

Tracking issue for:

This function can probably be cleaned up a bit.

Something to look at later, sent by a Reddit user:

Hard disagree with the other post about the range being more readable, particularly given that those bounds were wrong anyway. :)
This will upset previous conversions, but rather than thinking about it like left-to-right decimals, you'd find the logic much simpler going right-to-left:

const BASE: usize = ANIMAL_NAMES.len();

pub fn to_animal_names(n: u64) -> String {
    let mut s = String::new();
    let mut n = n as usize;

    while n >= BASE {
        s.push_str(ANIMAL_NAMES[n % BASE]);
        s.push('-');
        n /= BASE;
    }
    s.push_str(ANIMAL_NAMES[n]);

    s
}

Show attached file size

Currently the pasta page shows the name of the attached file (if there is one) but I think it would be nice if it showed the size of the file as well

[Feature Request] Link to URL Redirect URL on Redirect Pastas

Right now, if you create a URL redirection pasta, and you don't copy the link from the pastalist, there's no obvious way to use the redirect feature.

I propose adding a read-only text box with the /url/ endpoint in a copyable format, perhaps to the right of the Remove button or between the Raw/Remove buttons and the content. Then when redirected to the /pasta/ endpoint when creating it, you will be able to copy the /url/ endpoint to send off. :)

Enhancement request: custom theming options

Since the service uses only 2 or 3 colors, an option to choose custom colors would be fantastic. Purely nice to have.

To begin with, it could just be a matter of supplying the color hex codes as environment variables. A color picker in the ui is always a nice to have.

Container go down after some curl request

After send request with curl every 15 second, I get this error and server get down after that

thread 'actix-rt|system:0|arbiter:0' panicked at 'called `Result::unwrap()` on an `Err` value: Utf8Error { valid_up_to: 2697, error_len: None }', src/endpoints/create.rs:93:69
note: run with `RUST_BACKTRACE=1` environment variable to display a backtracethread 'actix-rt|system:0|arbiter:0' panicked at 'called `Result::unwrap()` on an `Err` value: Utf8Error { valid_up_to: 2697, error_len: None }', src/endpoints/create.rs:93:69
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I should restart container, any idea to solve the problem?

Long pastas are inconsistently saved

any pastas longer than a few K characters are inconsistently saved, sometimes they'll be cut off to a much shorter length, sometimes it'll save correctly, nothing appears wrong in microbins logs and there are no other issues (apart from the copy button also failing on long pastas nevermind, that just seems to be broken)

Persistency improvements

Currently all pastas are stored in the memory. Can we save them on the disk in either a tiny database or simply in files? Storing everything in the memory could be bad if the service is running on a tiny VM for example with limited RAM, or if the pastas are important and the user wants to retain them even if the service is restarted.

Add automatic code detection

It would be nice to add automatic code detection so you don´t have to choose from the dropdown menu what language it is.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.