If you look at the HTML source for Laracasts you can see that Jeff uses hightlightjs
<script src="/highlight/highlight.pack.js" type="464cd3972b50c5b807f56e37-text/javascript"></script>
TBH there isn't a best solution as the right answer will depend on what languages you need to support, styles you want, etc but with 185 languages and 89 themes you probably wont go wrong with highlight, at least as a starting point.
I have used Prism.js which worked better for a particular integration but generally HighlightJs and is more popular