Skip to content

Instantly share code, notes, and snippets.

rsync -avz ubuntu@beta.xyz.com:/var/www/project_name/public/gst_information.csv .
https://www.liquidweb.com/kb/how-to-install-docker-on-ubuntu-14-04-lts/
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
@nitsx2
nitsx2 / mysql dump import and export
Last active June 10, 2019 06:02
mysql dump import and export
to export dump(means create a .sql file to use) -> mysqldump -u root -p database_name > ~/Desktop/db.sql
to import dump(means use the given dump in database) -> mysql -u root -p database_name < ~/Desktop/db.sql
dump only 10 rows of every table in database - > mysqldump -u root -p --opt --where="1 limit 10" database_name > /home/dell/Desktop/ff.sql
@nitsx2
nitsx2 / gist:3471f04bdf201f804f15c90e1e722478
Created January 11, 2019 10:35
when every thing -modified because of gt pull
Reason- because of giving git permission to -> chmod 777
git config core.autocrlf true
git config core.filemode false
https://github.com/Microsoft/WSL/issues/184
@nitsx2
nitsx2 / untrack file already in gitignore
Last active December 26, 2018 12:30
untrack file already in gitignore
git update-index --assume-unchanged [path]
@nitsx2
nitsx2 / busy box error -ubuntu
Created December 26, 2018 12:29
busy box error -ubuntu
https://askubuntu.com/questions/153852/can-not-boot-initramfs-error
https://askubuntu.com/questions/781315/ubuntu16-04-boots-into-initramfs
@nitsx2
nitsx2 / erb error find command
Created December 26, 2018 12:29
erb error find command
erb -x -T '-' app/views/disease/show.erb | ruby -c
@nitsx2
nitsx2 / gist:0fb3ae632e34a4a40863f67d758a908b
Created October 10, 2018 12:40
Upload file to remote server using SCP
Upload file to remote server using SCP
scp /home/svnlabs.txt root@92.178.0.56:/home/
Want to backup your MySQL database ?
MySQL provides a tool for dumping your database.
Use this command in your Rails Application.
mysqldump -uroot -p DB-NAME > backup.sql
DB-NAME is the name of your database.
This dumps your sql data into backup.sql file.
Run this
"sudo -u postgres psql"
in your terminal to get into postgres
postgres=#
Run "CREATE USER new_username;"
Note: Replace new_username with the user you want to create,