📜 ⬆️ ⬇️

Code.Re is a minimalistic service for placing snippets.

Last year, the Codebo, the minimalist analogue of Pastebin, was introduced to habrausers. Over the last month, I completely rewrote the service, added a number of new features to it, and transferred it to a new domain ( code.re ).





')
The basic concept of the service remained unchanged - a minimum of effort to get the result :)
Just enter or insert the code, and the link to it will immediately appear in the address bar.
When editing someone else's code, a copy of it is automatically created at the new address.

So, about the new features.

New design

Now the default service is decorated in dark colors, and for lovers of light themes there is a special switch on the top panel. By the way, in order to better concentrate on the contents of the recording, the top panel can also be hidden with a switch.

Long and short links

A new button on the bottom panel allows you to switch from short to long links:

code.re/5CF
code.re/CG30AJmw

Accounts and APIs

Now you can create an account to see a list of your records, delete them and edit. When you quickly log in via social networks do not need to fill any additional fields.

Those who want to help the service continue to function stably without advertising and restrictions can activate a paid sponsorship account (175 rubles). As a bonus for the support of the service, for sponsor accounts opens the opportunity to use the API.

Working with API is carried out through HTTP POST requests, the answer comes in JSON format.
There are four methods - read , save , delete , get_modes (talking about syntax highlighting modes).

Other improvements and ToDo


For PHP code (when selecting the appropriate backlight mode), the syntax is now automatically checked. If an error is found, its description is displayed in the bottom pane, and the corresponding line is highlighted in red.

A number of minor improvements in the work of the editor (CodeMirror) have been implemented - for example, highlighting the active line and selecting a line by clicking on its number. If you hold the mouse button down, you can select several lines at once.

The service is gradually becoming international: depending on the browser locale, either the Russian-language or the English-language version can be displayed. Only the main interface for working with the code has been translated into English, but the translation process is progressing slowly as my small knowledge of English improves.

In the near future: JS launch button (using dataURI, thanks to RubaXa for the idea!), Automatic programming language detection based on Bayes theorem.

code.re

Source: https://habr.com/ru/post/231431/


All Articles