Showing 20 Result(s)

Importing and Exporting of MYSQL Database with Command Line SSH

Importing MYSQL Database Syntax $ mysql -u username -p database_name < path_to_mysql_file_here Importing existing MYSQL database with filename "wordpress.sql" stored at directory "/home/nishant/", Username is "root", terminal will prompt for asking password. $ mysql -u root -p wordpress < /home/nishant/wordpress.sql Exporting MYSQL Database Syntax $ mysqldump -p -u username database_name > path_to_mysql_file_here Exporting MYSQL database …

Create file with TimeStamp in Shell Script

I love using Ubuntu OS for development. I need to create a shell script that saves new file with a timestamp. Following are steps that I’ve followed: Understanding date command. nishant@nishantvaity:~$ date Wed Sep 18 13:53:49 IST 2019 Use any of following command to know options for date command. nishant@nishantvaity:~$ date –h OR nishant@nishantvaity:~$ man …

Git and Virtualmin

Introduction to Git Git is a source-code control system that allows multiple developers to work on the same project. Each developer has a copy of the repository on his workstation, and can check in changes to that repository and synchronize it with a central server. Other developers can then fetch those changes by synchronizing their …

Automated conversion of Excel to PDF using LibreOffice

While converting an excel to pdf following operations are done Read existing excel file. Modify cell values of existing excel file. Convert output of worksheet to PDF Here Node.js, LibreOffice, unoconv are used for automated conversion with Ubuntu operating system. Following are instructions to install Node.js Run curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - Run sudo apt-get install gcc g++ make Run sudo apt-get install -y nodejs Run node --version Run npm --version Following are instructions to …

Generate random password string with Javascript

Generate a random password for a website or javascript application. Include following script to your application and call function randomPassword() There are various ways to call randomPassword() function within this script. you can test output for this function by calling function with console log. Default random password with default configuration console.log(‘Default : ‘, randomPassword()); Password …

Detecting request type in PHP

For detecting request type in PHP we can use variable $_SERVER by using $_SERVER[‘REQUEST_METHOD’]. $_SERVER is an array containing information such as headers, paths, and script locations. The entries in this array are created by the web server. Following methods can be detected with key ‘REQUEST_METHOD’: GET POST PUT DELETE Example: