A gathering of different helper function that I found on the web or elsewhere or wrote myself (attributions are listed on top of each files)