Add hook code sample
Merge branches 'feature/nios2-sim' and 'master'