Instead of uploading your code somewhere.
Use the IDE and export your project as ZIP (File-Export as zip) and upload this zip here. You need to have Registered user account for this i guess.
If you want to post a codesnippet you should use the code-tag in the forumeditor.
Against your question. Your code will only work on ROOTED devices as you want to use "su" in your scripts.
To run shell commands you need to use a library.Search the forum for root, superuser, shell... I dont know the name of the library but i think there is one.