Tips &Tricks


$? variable in linux

$? Status of the previous process / command which ran on the shell $ pwd $ echo $? // returns 0 which means the previous command ran sucessfully $ blahCommand $echo $? // returns...


path.join vs path.resolve in node.js

path.join([…paths]) joins all the path segments using platform specific delimiter. path.join(‘/foo’, ‘bar’, ‘baz/zxcv’, ‘abcd’, ‘..’) // ‘/foo/bar/baz/zxcv/abcd/…’ path.resolve([…paths]) Resolves all the path segments into an absolute path. It processes from right to left, until...


Delete unused docker images

You usually have to clear unused docker images otherwise it will eat up all your disk space. I realized this when i got an error ERROR: Failed to create usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore: No space left on...