doc: move hello world snippet into separate file