Pretty Git branch graphs

2108 Update 2: I’ve posted an improved version of this answer to the Visualizing branch topology in Git question, since it’s far more appropriate there. That version includes lg3, which shows both the author and committer info, so you really should check it out. Leaving this answer for historical (& rep, I’ll admit) reasons, though I’m really tempted … Read more

How can I have a newline in a string in sh?

If you’re using Bash, the solution is to use $’string’, for example: If you’re using pretty much any other shell, just insert the newline as-is in the string: Bash is pretty nice. It accepts more than just \n in the $” string. Here is an excerpt from the Bash manual page:

Categories sh Tags

psql: FATAL: database “” does not exist

It appears that your package manager failed to create the database named $user for you. The reason that works for you is that template1 is a database created by postgres itself, and is present on all installations. You are apparently able to log in to template1, so you must have some rights assigned to you … Read more

How to change pip installation path

You can tell pip where to install the package. Use the -t flag , that means the target directory where you want to install the package. Have have look at pip install –help You can change this on permanent basis by changing the pip.ini configuration file. See this for detail: pip install path On Unix and Mac OS X the configuration … Read more