Skip to main content

Posts

Showing posts from April, 2016

Double rainbow

#Git starter cheat sheet

Initialize a local repo Run the following command in the folder where you would like to initialize a git repo.
git init
Get status It is a good practice to frequently run check on status during development. The following command points out the changes between the previous commit and current state of the folder.
git status
Add content To add an untracked file named ‘text.txt’ to the staging area, execute the following command.
git add text.txt
Syntax: git add <filename>
Commit changes To commit changes made to the folder, execute the following command. The message will be used as a commit message to associate this check-in with the message.
git commit –m “Add text.txt to the code base.”
Syntax: git commit –m “<Commit message>”
Add using wild card To add multiple files using a wild card character, execute the following command.
git add ‘*.txt’
Syntax: git add ‘<wildcard_character+string>’
Check history Review commit history using the following command.
git log
Add Remote re…

@Docker cheat sheet

Installing Docker Installing Docker on Ubuntu sudo apt-get update sudo apt-get install –y docker.io sudo service docker status docker -v docker version sudo service docker start sudo docker info
Installing Docker on CentOs yum install -y docker systemctl status docker.service systemctl start docker.service
Updating Docker Add docker repo key to the local apt keychain wget =q0- https://get.docker.com/gpg | apt-key add -
Add docker repo to apt sources echo deb http://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list apt-get update apt-get install lxc-docker
Basic docker configuration Viewing Docker socket ls -l /run
Add user to docker group sudo gpasswd -a vagrant docker cat /etc/group
Configure docker deamon on a Ubuntu host to listen on a network port netstat -tlp service docker stop docker -H 192.168.56.50:2375 -d & netstat -tlp
Connect to docker Ubuntu host from centOs machine Set env variable export DOCKER_HOST=”tcp://192.168.56.50:2375”
Configure …

Maven Fundamentals

1.0 High Level Overview·Open Source product ·Managed by the Apache Software Foundation ·Build tool oAlways produces one artifact or component oHelps manage dependencies ·Project management tool oHandles versioning and releases of your code oMeta info: Describes what the project is doing or what it produces oEasily produce JavaDocs oProduce other site information ·Maven sites are built with Maven. All the Layout is made with Maven’s site generation features. 2.0 Why use Maven·Repeatable builds ·Recreate a build for any environment ·Transitive dependencies oDownloading dependencies also pulls other items needed ·Contains everything you need build your code ·Works with a local repo oLocal repo keeps the dependencies in a local repo oIf local repo already contains the dependency required for a particular project, Maven just references the dependency binary stored in the repo. oIf local repo does not contain the dependency required for a project, Maven downloads the dependency from public or privately host…