Resolving Memory Issues When Exporting the Members List or Orders to CSV

If you have a large members list or order history and cannot get the full list to export, use the code gist below to increase the memory and execution time.