Derived from the phrase 'deus ex machina' which literally means 'God from the machine'. Which oringinated in classical theatre when they couldent think of an ending, so 'god' came down on a winch (machine) and solved everything.
The slang term 'dues ex' means to steal without being noticed.
Often this is done in refernce to beer stealing at a pub.
"I deus ex'd five beers last night"
"Ill go there and distract that guy, while you deus ex his pint"