Useful spray code, directives and examples