Setup a New BitBucket User on Windows

1. Create a new SSH key. Here we call it id_rsa, which is the default, but you can give it any name you want.

ssh-keygen %HOMEPATH%/.ssh/id_rsa 

2. Use PuTTYgen to create a private PuTTY key id_rsa.ppk, from id_rsa.


3. Create a new BitBucket account.

4. Click on the Manage Account button on the top right.

Bitbucket Manage Account








5. Click on SSH keys on the left, then on the Add key button.

Bitbucket SSH Keys








6. Copy the contents of id_rsa.ppk and paste it into the Add SSH key dialog.

7. Clone the Git repo with TortoiseGit using the PuTTY key id_rsa.ppk.

Common Docker Commands

Here are some common Docker commands.

1. Search the Docker repository (like Docker Hub) for Docker images.

docker search IMAGE

2. Pull an image from the Docker repository.

docker pull IMAGE

3. Print the image change history.

docker history IMAGE

4. List all images on the host system.

docker images

5. Create and run a container. A container is an instance of an image.

docker run --name CONTAINER IMAGE

6. Create and run an interactive container.

docker run -it --name CONTAINER IMAGE

7. Create and run a container, and remove container on exit.

docker run --rm --name CONTAINER IMAGE

8. Create and run a container with a mounted volume from the host.


9. Create and run a container as a daemon.

docker run -d --name CONTAINER IMAGE

10. Attach to a running container.

docker attach CONTAINER

11. Tail the container console.

docker logs -f CONTAINER

12. Stop, start or restart a container.

docker stop CONTAINER

docker start CONTAINER
docker restart CONTAINER

13. List running containers.

docker ps

14. List all containers.

docker ps -a

15. List container ports.

docker port CONTAINER

16. Print low-level information on a container or image.

docker inspect CONTAINER|IMAGE

17. Delete a container, stop it first if running.

docker rm -f CONTAINER

18. Delete an image.

docker rmi IMAGE

19. Create a new image based on a Dockerfile.

docker build -t IMAGE

20. Commit container changes made using an interactive shell into a new image.


21. Push an image to the Docker repository.

docker push IMAGE:TAG

22. Display Docker system information.

docker info

23. Display running processes inside the container.

docker top CONTAINER

24. Display the container’s resource usage.

docker stats CONTAINER

25. Link two containers, a web application connecting to a database, using a secure tunnel.

docker run -d --name DB_CONTAINER DB_IMAGE

26. Create a new Bash session inside the container.

docker exec -it CONTAINER bash

27. Update to the latest Docker image. This will remove the old Docker container.

docker pull IMAGE
docker stop CONTAINER
docker rm CONTAINER
docker run -d --name CONTAINER IMAGE

Bonus: Install Docker on Red Hat or CentOS.

yum install docker-io; service docker start; chkconfig docker on

Oracle Cheat Sheet

1. Ping Oracle.

tnsping SID

2. Get the SID.

SHOW PARAMETER instance_name;

3. JDBC driver.


4. JDBC driver URL pattern.


5. Date greater than clause.

date_col > TO_DATE('2015-01-01','yyyy-MM-dd')
date_col > '01-Jan-2015'