Been asked this a few times in other threads so thought would post in my thread.
For power to PJ and Sub recepticles I wanted to run them via a Power Conditioner / UPS to prolong lifetime of the PJ bulb. Some of the options suggested were expensive so I've did the following:
APC J10--> 20A cord --> junction box with twist connections --> 20A Romex --> Recepticle --> PJ (or Sub)
In the Junction box I used double gang blank plate and drilled two holes. I found some cable glands (
similar to this) at Home Depot that attached to the plate. I got a couple heavy duty power cords and cut the socket end of and passed thru the cable glands, secured and then used wire nuts to attach to the romex.
Here is a pic

Only time will tell if passes code but don't see why it would not.
[EDIT] Yes it passed code
Cheers,
Mark