Here's a pretty cool-sounding, fast E major pentatonic-based run that takes you all over the fretboard.
I love runs like this, and I play these types of elongated patterns often. Here, I pick the first note on each string and use hammer-ons, pull-offs and legato slides, at times in combination, to give the notes some variation in attack and create smooth phrasing.
The notes are within the E major pentatonic scale (E F# G# B C#), except for two: the C note at the end of bar 1, which functions as a chromatic passing tone between B and C#, and the A note on beat three of bar 5, which functions as the fourth resolving to the third (G#).
You can also use this run in a minor context by moving all the notes proportionally up or down the neck and/or playing it over a different bass note. For example, if you play the entire run, with the exception of the final chord, over a low C# bass note or C#5 chord, it will sound like it’s in C# minor, the relative minor key of E major.
To use it in an E minor context, move every note up three frets, starting and ending on G (sixth string, third fret), as any G major idea will sound like an E minor idea if played over an E5 chord or E bass note.