Modifying the ulx addon itself is usually a bad idea, because you'll have to copy the changed and added files when you want to update ULX. Instead, you should create a separate addon if you want to modify or extend ULX functionality.
I've attached a zip file that contains an addon named "ulx_luadev". This can be extracted directly into the garrysmod/addons/ folder. It contains the code in the above post, in the correct location as to be loaded by ULX.