some useful nodejs code bits