A better feature branch naming in Intellij IDEA

Intellij Idea has a very nice feature: you can customize feature branch name. When create a new task, the Intellij IDEA will help you create a new (git) branch. The default name of the branch is the task number, e.g. FOO-1 for Jira, or #1 for gitlab. However, we can make the branch name better by adding the task summary to it. It will be like FOO-1-add-a-new-feature. To configure it, goes to Preferences->Tools->Task and change the Feature branch name format to {id}-{summary}

j j j

Docker: how delete everything

Just want fresh restart and delete all containers? Here is the code:

1
2
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

If you want to delete all images too:

1
2
docker stop $(docker ps -a -q)
docker rmi $(docker images -a -q)
j j j

SSH Reverse Tunnel

The SSH has many advance usages. The reverse tunnel is a good example and a very useful one. It answers the question: if a user can ssh from a server A to a server B, can the user ssh back from B to A, even A is behind a router? In my case, it is very helpful. I have a desktop in the office, but the office VPN has not been set up yet. How can I ssh to my office desktop from home? The answer is SSH reverse tunnel, using a server with a public IP as a jumper. Followings show how did I do it.

Read More

j j j