Skip to content

Web development related notes, instructions, commands etc.

License

Notifications You must be signed in to change notification settings

shibbir/notebook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Notebook

Programming notes, instructions, commands, snippets etc.

Table of Contents

  1. MongoDB
  2. Git

Install MongoDB As A Service In Windows

  1. Download MongoDB from https://www.mongodb.org/

  2. Extract the contents of the zip file into C:\mongodb

  3. Add MongoDB in windows path. Edit your environment variable. Append this: C:\mongodb\bin;

  4. Create a configuration file C:\mongodb\mongod.conf and add these lines:

dbpath=C:\mongodb\data\db
logpath=C:\mongodb\log\mongo.log
verbose=vvvvv

Note: you have to manually create both c:\mongodb\data\db and c:\mongodb\log directory.

  1. Open commad prompt as administrator and run the following commands:
mongod -f c:\mongodb\mongod.conf
mongod -f c:\mongodb\mongod.conf --install
  1. Start MongoDB
net start mongodb

From now on mongodb service will run automatically every time the PC is restarted.

Environment Configurations

$ git config --global user.name "<your_name>"
$ git config --global user.email "<your_email>"
$ git config --global core.editor "<e.g vim>"
$ git config --global core.ignorecase false

Generate SSH Key

$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

# Copy SSH key into the clipboard
# For Windows: $ clip < ~/.ssh/id_rsa.pub
# For Linux: $ xclip -sel clip < ~/.ssh/id_rsa.pub
# For OSX: $ pbcopy < ~/.ssh/id_rsa.pub

Repository

# Adding a remote
git remote add origin <remote_url>

#Updating a remote
git remote set-url origin <remote_url>

# Determine the url that a local git repo cloned from
git remote show origin

Branch

# Create new branch and checkout
git checkout -b <branch_name>

#Delete a branch from local
git branch -d <branch_name>

#Delete a branch from remote origin
git push origin --delete <branch_name>

#Throw away local commits in Git
git reset --hard origin/<branch_name>

Tag

# Adding & pushing a tag
git tag -a <tag_name> -m "<message>"
git push origin <tag_name>

# Deleting a tag
git tag -d <tag_name>
git push origin :refs/tags/<tag_name>

Log

# History of a moved file
git log --follow <file_name>

# Show Log Graph
git log --oneline --graph
git reflog

License

The MIT License Copyright © 2016 Shibbir Ahmed

About

Web development related notes, instructions, commands etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published