Tips &Tricks

0

use XPath in browsers devtools

You can execute the XPath selectors in the browser dev tools using the $x() For example, following selector will give you all the anchor tags on the webpage. $x(‘//a’); Further Reading : Command Line...

0

Bash scripting missing ‘]’

If you have the simple script like the following : #!/bin/bash if [ $foo = ‘bar’]; then echo ‘Foo is equal to bar’ fi And when you run the script, if you get the...

npm list available versions of a package 1

npm list available versions of a package

As an example, to check which versions of expressjs are available on npm, you do the following npm info express versions Of course, you can always grep for the version you are looking for...

0

grep for a word in all files in linux

The following command will search for the string “hello” in the content of all the files within all subfolders of the specified path grep -r “hello” /path/to/search/

0

Error: listen EADDRINUSE

EADDRINUSE – stands for error: address already in use. It means you have a server listening on the same port. To solve this problem you have to kill the process running on that port....

0

How to create scripts in terminal

Follow three simple steps to automate your terminal. Create a script Set the permissions Execute the script Create a script test.sh $vi test.sh ls -la echo ‘Hello Bash!’ Set the permissions $sudo chmod 777...