Basic command :
db show collections db.users.find() db.users.count() db.users.find().pretty() db.users.drop()
Basic command :
db show collections db.users.find() db.users.count() db.users.find().pretty() db.users.drop()
Edit your bash profile file
vi ~/.bash_profile
Add this to the end of the file :
goAndListAll() {
clear
cd $1
ls -la
}
goAndList() {
clear
cd $1
ls -l
}
alias l=’clear && ls -l’
alias la=’clear && ls -la’
alias cl=goAndList
alias cla=goAndListAll
gitCommit() {
git commit -m “$1”
}
gitAddCommitPush() {
git add .
git commit -m “$1”
git push
}
alias ga=’git add .’
alias gc=gitCommit
alias gp=’git push’
alias gcp=gitAddCommitPush
alias gs=’git status’
Svn basic commands
Here, you will find how to config projects with git :
First of all you have to set your default ssh key, go to the ssh directory :
$ sudo -s $ cd ~/.ssh $ chown -R yourusername: ~/.ssh (be sure that your user own the rights) $ vi known_hosts (create this file if it's not exists) $ sh-keygen -t rsa -b 4096 -C "your_email@example.com" $ ssh-keygen -lf ~/.ssh/id_rsa.pub (show the fingerprint) $ eval "$(ssh-agent -s)" (ensure ssh-agent is running) $ ssh-add -l (list the ssh-key in ssh-agent) $ ssh-add ~/.ssh/id_rsa (add your ssh-key in ssh-agent) $ ssh -vT git@github.com (test the connection on github) $ pbcopy <~/.ssh/yourproject_id_rsa.pub (copy the ssh-key in clipboard)
$ cd ~/.ssh $ vi config Host github.com HostName github.com PreferredAuthentications publickey IdentityFile ~/.ssh/projectname $ ssh-keygen -f ~/.ssh/projectname -C "projectname" $ pbcopy <~/.ssh/projectname.pub
Go inside your project and set your current project git email developer :
$ git config user.email youremail@gmail.com $ git config --global user.email youremail@gmail.com (global settings example)
How to set the color visible in terminal :
$ git config --global color.ui true