Code.Re - minimalistic service for placing snippets

    Last year, Codeo, the minimalistic counterpart to Pastebin, was introduced to habrayuzers. Over the past month, I completely rewrote the service, added a number of new features to it, and transferred it to a new domain ( ). The basic concept of the service has remained unchanged - a minimum of efforts to get the result :) It is enough to enter or paste the code, and the link to it will immediately appear in the address bar. When editing someone else’s code, a copy 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 record, 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 links to long:

    Accounts and APIs

    Now you can create an account to see a list of your entries, delete them and edit them. With a quick login through social networks, no additional fields are required.

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

    Work with the API is done through HTTP POST requests, the response comes in JSON format.
    Four methods are provided - read , save , delete , get_modes (we are talking about syntax highlighting modes).

    Other improvements and ToDo

    For PHP code (when choosing the appropriate highlighting mode), the syntax is now automatically checked. If an error is found, its description is displayed in the lower panel, and the corresponding line is highlighted in red.

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

    The service is gradually becoming international: depending on the locale of the browser, either the Russian or English version may be displayed. So far, only the main interface for working with code has been translated into English, but the translation process slowly proceeds as my little knowledge of English improves.

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

    Also popular now: