Facile preparation of porous carbon nanomaterials for robust supercapacitors