Skip to content

Instantly share code, notes, and snippets.

View eslam-mahmoud's full-sized avatar

Islam Mahmoud eslam-mahmoud

  • US
View GitHub Profile
rsync --rsh='ssh' -av --progress --partial {user}@{domain or IP}:/home/dump.tar.gz ./
find . -name '*.sql' | awk '{ print "source",$0 }' | mysql -v -u{user} -p{pass} -f {DB Name} --batch
mongoexport -d {db name} -c {collection name} -q '{"_id":1}' --out ./records.json
mongoimport -u {user name} -p {password} --authenticationDatabase {db name} --db {db name} --collection {collection name} --file ./records.json --jsonArray
@eslam-mahmoud
eslam-mahmoud / command line
Created August 3, 2016 10:36
git: How to ignore all present untracked files?
//If you instead want to permanently ignore currently untracked files you can, from the root of your project, launch:
$ git status --porcelain | grep '^??' | cut -c4- >> .gitignore