Is it possible to increase the temperature of an ideal gas in an adiabatic sealed container with a frictionless piston for a lid? As far as I understand it, if I pumped the piston repeatedly, compressing the gas, the temperature would go up for a second, but the minute I released the piston the higher pressure inside the container would cause the piston to move back up. The amount of kinetic energy I put into the system by pushing the piston a distance x from equilibrium would be the same as the amount released when the system pushed the piston back towards equilibrium a distance x. 
But what if I somehow "pulled" the piston faster than the air could push it back to equilibrium, creating some kind of temporary vacuum? If I did it faster than the average speed of the gas molecules, much less work would be done by the gas and it would keep some of the energy it gained from adiabatic compression--is that correct, or am I missing something?
 A: That's correct.   At fixed volume, the temperature of the ideal gas will increase with its entropy.  So if you reversibly compress the gas, its entropy will stay the same, and if you irreversibly expand it (by pulling back really fast on the piston and letting the gas free expand), it will return to its original volume with higher entropy, and higher temperature.  You can also see this from the work done-- the gas won't do work on a piston that moves too fast for it to stay in contact with, just as you say.
A: It depends on how fast you can move the piston. If you can move the piston faster than the gas molecules can move, you can take the system far enough from equilibrium to produce irreversible processes. The speed that sets the scale of how reversible the expansion or contraction is is the speed of sound in the gas. Compress or expand at a speed faster than the speed of sound, or even just comparable to it, and the process becomes irreversible and will increase the entropy of the system. Consider the following process: expand the piston much faster than the speed of sound of the gas, and the gas will do, essentially, no work on the piston. Thus, the temperature of the gas after the expansion will be nearly the same, and certainly higher than a reversible adiabatic expansion. Then compress the gas back to its original volume reversibly and the temperature will be higher than it started at.
A: If you move the piston very fast in each direction, some of the mechanical energy will be lost as a result of viscous dissipation (viscous damping) within the gas. This manifests itself as an increase in internal energy (temperature). So, when you expand, the temperature will drop less than if the expansion were carried out reversibly, and when you compress, the temperature will rise more than if the compression were carried out reversibly.  The rate of viscous dissipation (and associated entropy increase) is proportional to the square of the local velocity gradient within the gas.
