Here, there are major triads from the b5 and #5 of the underlying dominant chord. To start the pattern, play an ascending two-octave g7 arpeggio, then run down the scale from there. As well, the d7 chord that is superimposed over the second half of that bar helps to bring a lydian dominant scale sound, 7#11, to the line. The first is the d-c-a-a#-b line in the bar 1.
Jim hall licks
Free jazz lick. You can see an example of this approach here, where the em triad is played under the moving melody line. But, a well-constructed melodic line will often connect more with an audience than a hip, outside line. Again, this would allow you to derive a guideline for applying this lick to other situations. The first bar uses diatonic triads, eb and f, over f7. From there, you play the same lick, but in the tonic key, and then resolve down to the imaj7 chord from there. This tension creates a bebop sound over the v7 chord, before being resolved into the bbmaj7 a bar later.
Boogaloo joe jones licks
This type of comping between phrases makes one guitar sound like two, and was a big reason that lenny turned so many heads when he first hit the scene. When doing so, you can pick every note in a typical pat martino double-time style. In this typical johnny smith lick, you use triplets to solo over a bm7 chord.