I love warming up with pentatonic box shape patterns. They're familiar, and easy to use when writing quick warm up riffs. Below I've written out the tab for this riff, with some notes about each section.
You start with your first finger on the 10th fret. You'll use your third finger for the 12th fret notes. Repeat the first section (outlined in darker black ink) three times before playing that last "bar". I have 4 audio examples with varying speeds so you can hear what the riff sounds like.
When doing the hammer on and pull off, try and let off on the palm muting, but mute for the rest of the riff until that very last open E note.
The whole purpose of this riff is to play it really slow at first, and make sure it's played cleanly. When I finally get the going under my fingers I'm trying to use notes as target notes, such as the 12th fret E.
Using target notes allows your brain and fingers to work almost on autopilot. You're not thinking about every single note. Once you learn the riff, try and find the best target or "anchor" notes that work for you.