What is Backspace?
Backspace is, to make it short, a snippet store. It allows you to upload small snippets (actually the code can be any size, but it was intended for small stuff) and makes them "more accessible". It features a minimalistic (you'll know what I mean when you saw it) web front-end which allows you to upload the snippets.Where can I get it?
Please Refer to #8 for the CC API.The web front-end is located here.
(As of #7 the code is now open-source.)
How do I use it?
//EDIT: Backspace now became an API. Refer to #8 for the documentation.How do I write a snippet?
You can basically put anything into the code, but if you want it to be loadable with backspace.require(…) you have to follow a simple design change over the "normal" API.
local myAPI = {} --Create a table which will hold all the PUBLIC functions of your API (PRIVATE functions should be normal local functions which are NOT inside the table). If you want you could add a metatable and that stuff too. (read-only tables and that stuff)
function myAPI.doSomething()
print("Hi there. This is myAPI.")
end
return myAPI -- Return the table you created earlier.
OR (if you want the API to be 1. global and 2. have a specific name which makes it like it was os.loadAPI'd)
local myAPI = {}
function myAPI()
print("Hi there. THis is myAPI")
end
_G["myGlobalAPI"] = myAPI
Wait a minute... How secure is that site?
To be honest, I'm not entirely sure how secure it actually is.But it should be invulnerable to SQL-injection and your passwords are hashed using SHA256 (in your browser) and another time with SHA256 on the server, so I guess it is pretty secure.
The only downside is that I can only guarantee that the stuff in the original store is using these algorithms etc. In another store it doesn't have to hash your passwords, or don't even require a login at all. Also someone could easily impersonate you on an other store.
Changelog
- 2015/10/9
- Released to the public.
- 2015/10/10
- Fixed /post route. Now it informs you about the fields you have to fill. (basically every field. Now it just forces you to enter something into all of the fields)
- 2016/02/01
- Added much stuff. Too much to list here.
Hope someone likes it,
~H4X0RZ