This is not completely code-book legal but there's nothing hazardous about it.
You'll need some 10/3 cord, a L14-30 plug and a 10-50 receptacle and some way to mount it. I'd use a single gang deep Bell box. In fact, I HAVE used single gang deep Bell boxes......
The L14-30 plug will have 4 prongs, 2 will be hot, 1 neutral and 1 ground. Connect the green wire of the cord to the ground prong (it'll have a green screw or state 'GR' or ground). Connect the black to one of the hots (brass screw) Connect the white to the other hot. It doesn't matter which hot the black and white connect to, do whatever is easiest. The neutral (silver screw) is not connected.
At the other end, screw some sort of connector (a cord-grip is best) into one of the hubs in the Bell box. Get a box with 3/4" or 1" hubs, 10/3 won't fit into a 1/2" hub. Get a basic 10-50 receptacle, it'll fit the box with little room to spare. Connect the green wire to the straight prong, and to the box ground screw. The 2 hots go to the angled prongs. It doest matter which one goes where. Get a single-gang metal cover plate that fits the receptacle. It'll fit the Bell box nicely.
Instead of a Bell box, you can use a 4 square deep (2 1/8") box with an industrial cover that fits the receptacle. Your choice.
Rob