This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############Find a string in a file pattern and replace it################### | |
find . -name ".env" -exec sed -i 's/oldstring/newstring/gI' {} \; | |
find . -name ".env" -exec grep -l 'your ip adddress' '{}' \; | |
find . -name ".env" -exec cp {} bkup_env \; | |
find . -name ".env" -exec grep -l 'email-smtp.us-east-1.amazonaws.com' '{}' \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
search for startup application after pressing windows key | |
Then click on add | |
1. Google chrome | |
Command: google-chrome | |
2. File explorer | |
Command: nautilus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server. | |
As soon as the boot process starts, press ESC to bring up the GRUB boot prompt. You may need to turn the system off from the control panel and then back on to reach the GRUB boot prompt. | |
You will see a GRUB boot prompt - press E to edit the first boot option. (If you do not see the GRUB prompt, you may need to press any key to bring it up before the machine boots) | |
Find the kernel line (it starts with linux /boot/) and add init=/bin/bash at the end of the line. | |
Press CTRL+X or F10 to boot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################### | |
updating node to stable version | |
################################### | |
npm cache clean -f | |
npm install -g n | |
n stable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################################### | |
Conditional Formatting | |
Generic status used by developer | |
###################################### | |
Open,Completed,Resolved,WIP,Issue,UIPending,Need Discussion,Won't Fix,Duplicate,Invalid | |
######################################### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################### | |
copying database from ec2 instance to rds | |
########################################### | |
Log into ec2 server using SSH | |
Dump the database by using below command | |
mysqldump -u username -p --databases db_name --master-data=2 --single-transaction --order-by-primary --force --column-statistics=0 > directory/db.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################## | |
Sublime text | |
########################## | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
apt update | |
apt install sublime-text | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt install -y curl | |
apt install -y php<version>-curl | |
apt install -y php<version>-cli | |
apt install -y git | |
apt install -y unzip | |
cd ~ | |
curl -sS https://getcomposer.org/installer -o composer-setup.php | |
copy the hash from the below link | |
https://composer.github.io/pubkeys.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**************************************************** | |
SCP Commands | |
**************************************************** | |
From local host to remote host | |
scp -i <key_path> -r <dir_path> <user>@<remote_host>:<remote_dir> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################## | |
For gulp issue run - enospc --> Error no space | |
############################################## | |
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | |
######################### |
NewerOlder