Are Vaping And Smoking Same?

In recent years, the cannabis industry has witnessed a significant rise. Not only is it because of their innate nature but also due to its minimal or no side effects. People nowadays consume natural substances for recreational, as well as medical purposes. However, there are several types and forms of ways available on the market … Read more

How To Shorten Longs URL’s

There are many good url shortening tools on the market today as seen in this video. Personally I have been using Link.ws which also gives me a few more bells and whistels such as Pixel tracking which is great for my Facebook campaigns. Check out Link.ws link shortener here.

Dudes Guide To Cutting Your Own Hair

Thanks to COVID-19, many barbershops and hair salons are closed. But your hair is still growing so what to do about it? Here is a good tutorial I found that shows dudes how to cut their own hair. I do this myself and found this useful.

How To Make Your Own Slime At Home

If you have kids at home, they have most likely at one time asked if they can make their own slime. Am I right? Not sure why kids are into slime ūüėČ But here is a good tutorial on how to make your own slime at home using ingredients you probably already have laying around.

PHP File Download Script

In this article am going to explain you how to create PHP file downloader to download any files from webserver to local machine. This application works mainly on the header of the PHP. This type of file download script I have used in most of my web application. When you want to download any file … Read more

How to get system Mac Address in PHP

You can view demo and download how get system Mac Address using PHP: // Turn on output buffering ob_start(); //Get the ipconfig details using system commond system(‘ipconfig /all’); // Capture the output into a variable $mycom=ob_get_contents(); // Clean (erase) the output buffer ob_clean(); $findme = “Physical”; //Search the “Physical” | Find the position of Physical … Read more

Most Useful Linux Putty Commands

In this post am going to share few most useful linux putty commands.

Unable to start MongoDB. ERROR: address already in use.

killall mongod
should kill the other process, if you have another kind of process bound to that port you could find it with netstat | grep 27017

MongoDB Config file Location:

/etc/mongod.conf

Redis Config file Location:

/etc/mredis.conf

Remove directory:

rm -rf foldername/

Change folder permission:

chmod -R 777 /var/www/bin

Move files from server to server

scp -r user@server1:/var/www/html/ user@server2:/var/www/html/

MYSQL Backup

mysqldump -u root -p mydb --routines mydb.sql

mysqldump -u root -p mydb | gzip > /var/www/html/mydb552015.sql.gz mysqldump -u root -p mydb --ignore-table=mydb.tableName | gzip > /var/www/html/mydbbackup.sql.gz

Permanently enable the global event scheduler:

add this line: event_scheduler=on to my.cnf inside /etc folder

Install mcrypt:

sudo yum install php-mcrypt* Restart Apache: sudo service httpd restart

View all background thread

ps -ef

Force Kill

kill -9 PID

MYSQL Create User and Grant permissions

grant all privileges on dsdocs.* to 'demanddocs'@'localhost' identified by "F$ww2371";

Run redis-server in background

Since Redis 2.6 it is possible to pass Redis configuration parameters using the command line directly. This is very useful for testing purposes.
redis-server --daemonize yes

Check if the process started or not:
ps aux | grep redis-server

PM2 Start an App:

/app/file/path/ pm2 start app.js --name="myApp" -i 4  

PM2 Start Command:

pm2 start app.js --name="mydb" -i 4

Export MongoDB:

sudo mongoexport --host=127.0.0.1 --port=27127 --db mydb -c activities --out mydb.json
Exported data will store in /root folder.
Please change your IP and Port

Search file by name in current directory including sub directory:

find . -name mydb.json