Basically you can add (attach) m-files to any topic or posting.
Interesting suggestion, but I have doubts about the usefulness of such a category. Without proper moderation, it will soon result in a “rubbish bin of dead code”:
- Just imagine how many files will be called “quick_fix.m”, “fast_workaround.m”, “better_output.m” and the author might not be likely to document this code, the purpose, etc. that it can be found by anyone for another useful purpose again.
- Discourse does not display (preview) the content of attachments (except pictures): who will download a file, named like mentioned above, to find out if it contains any useful code for his purpose?
- Discourse also lacks (for good reasons) of an in-attachment search feature you cannot even get a clue which files might be useful for you.
If you really have a great code (snippet) to share, create in the community category a thread explaining the usefulness of your code, maybe displaying all its contend using the fenced
``` code feature and using the Discourse search function it is fully seach&findable
If you need to share a bigger portion of code for temporary purpose, you can use many paste&bin pages or https://gist.github.com/, … If you code turns out to be of greater use, consider creating a package out of it GNU Octave - Packages.