Skip to content

Instantly share code, notes, and snippets.

View abhitechno01's full-sized avatar
🎯
Focusing

Abhishek Thakur abhitechno01

🎯
Focusing
View GitHub Profile
@abhitechno01
abhitechno01 / ubunutu
Created October 29, 2021 08:04
ubuntu commands
############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' '{}' \;
@abhitechno01
abhitechno01 / startup application (Ubuntu)
Last active October 18, 2019 03:44
startup application in ubuntu
search for startup application after pressing windows key
Then click on add
1. Google chrome
Command: google-chrome
2. File explorer
Command: nautilus
@abhitechno01
abhitechno01 / ubuntu reset user password
Created August 19, 2019 10:46
ubuntu reset user password
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.
@abhitechno01
abhitechno01 / node tuts
Created July 8, 2019 17:58
npm update, node update
###################################
updating node to stable version
###################################
npm cache clean -f
npm install -g n
n stable
@abhitechno01
abhitechno01 / Google sheet tips
Created May 23, 2019 08:49
Google sheet tips
######################################
Conditional Formatting
Generic status used by developer
######################################
Open,Completed,Resolved,WIP,Issue,UIPending,Need Discussion,Won't Fix,Duplicate,Invalid
#########################################
@abhitechno01
abhitechno01 / mysql commands
Last active April 29, 2021 08:26
MySQL commands
###########################################
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
@abhitechno01
abhitechno01 / Fresh ubuntu - Packages needed
Last active November 19, 2019 02:30
sublime, vs code, telegram, vlc, google chrome, postman, sublime merge, slack
##########################
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
@abhitechno01
abhitechno01 / installing composer
Last active November 19, 2019 03:06
composer installation for php dependencies
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
@abhitechno01
abhitechno01 / ssh, scp
Created January 29, 2019 02:12
secure shell, secure copy protocol commands
****************************************************
SCP Commands
****************************************************
From local host to remote host
scp -i <key_path> -r <dir_path> <user>@<remote_host>:<remote_dir>
@abhitechno01
abhitechno01 / all issues
Last active December 29, 2018 04:46
Commands to fix development issues when working with laravel, angular and their dependencies
##############################################
For gulp issue run - enospc --> Error no space
##############################################
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
#########################