Below are some snippet I created:
Generate random corporate bullshit: https://bash.rocks/w3nEB9
Compress png to webp: https://bash.rocks/YBbaJG
Generate gif with curl, jq and ImageMagick: https://bash.rocks/NBXQ3w
Any suggestions / feedback welcome! :)
---
A more interesting feature I haven't fully finished is to turn your random bash snippet into an HTTP web service, like https://bash.rocks/Gxlg31/3/api?url=i.imgur.com/1uYroRF.gif
which makes an obvious premium feature in future :p
I'm on Firefox 49 on Debian, by the way.
What does the backend look like?
Thanks to a fully managed container environment, I don't have to worry too much about security stuff.
Congrats to @wsxiaoys for launching a new project. Anyone who takes the time to launch projects are doing a labor of love and commitment, so that deserves credit and recognition!
Some observations that you may want to think about: a) The time to execute a simple bash command "echo 'hi'" was a few seconds. This tells me that you are probably spinning up a new Docker container on-demand after the user says "run". This will not really make the product usable over time. You'll eventually find that people will expect their environment to be loaded and running the moment their end user session has started. This way you can use Docker exec or other mechanisms (in Che we replaced Docker exec with a custom agent that runs inside the container that gives us fine-grained control over how processes are executed within the container). When a user says "run" you can then guarantee instant execution and then control how results are streamed.
b) I wrote most of the CLI for Eclipse Che and Codenvy (in bash!!). So learned that a few project / framework concepts are essential. In particular a project structure that allows you to source different files / or libraries will become important. Also, BATS for unit testing is essential to anyone maintaining bash scripts. Few people use BATS, but it's a life saver, so having automatic structuring of BATS tests as users creates bash files would be awesome.
c) Have you seen the language server protocol? No one has built a language server yet for Bash. It would be awesome to have symbol lookup, referencing, and auto-complete services within your editor. You could use a Monaco editor with a bash language server to give contextualized intelligence to your bash program for the developer. You could even go so far as to offer line by line debugging with it :)
Thanks for your contributions to the community!
(it's just a snippet from /dev/urandom, but it looks like it could be any arbitrary file that's within the size limits)
For example, https://bash.rocks/jJg193 shows that it is possible to download any arbitrary data with no prompt (here it's the eicar test file)
EDIT: where can I contact the author? I found a very bad security bug; I can see what commands other users are running
I'll try fix this in next iteration. (and i just fixed the /tmp :)
[1]: https://github.com/dthree/cash
(Yes, I’ve seen jslinux.)
With this and maybe a crontab enhance, this could be somehow useful for daily automation.
So, for whoever made this, the risk would be mostly about running up their bill I suppose? Some risk to Google if it's possible to escape their container, though I suppose they've done a bit of work in that space.