MySQL prompt

I’ve been using MySQL for quite a few years by now, but only today I learned that it is possible to define MySQL prompt.  As per this blog post, all it takes is a couple of lines in .my.cnf file with something like:

[mysql]
prompt="\u@\h (\d)> "

That alone will help to prevent a gadzillion of destructive mistakes when you think that you are working with one database, when, in fact, you are working with a totally other.  On top of that, the blog post suggests using rlwrap tool, with which one could add some colors to the prompts as well.

Disable automatic restart in MS Windows

At my current work, MS Windows is a corporate standard, so I have to spend my days in a VMware virtual machine.  With two large monitors, that’s not a big issue at all.  However there is one really annoying bit about my Windows machine.  If I leave it on overnight, it sometimes reboots by itself.  Yes, it tries to save the state of most applications and even my virtual machine state is restored more often than not, but it is still annoying and unnecessary.   Gladly, there is a solution:

Alright, first off let’s click the Start button. Once the menu pulls up we can click on “Run”. Now you should have a field to type in, let’s type “gpedit.msc” and hit enter. Once the screen comes up click the + next to “Local Group Policy” than “Computer Configuration” than “Administrative Template” than click on the “Windows Updates” folder. In here you will find a bunch of different variables. If you click on them in the right pane there should be some definitions of what each one does. I will not go in-depth on all of them because you can obviously read. The key we are looking for is “No auto-restart for scheduled Automatic Updates Installations”. Right click on that value and hit properties. Now click on Enabled, than hit “Apply” and “Ok”. Now close the Console1 window. It will prompt you to save, choose “Yes” and than “Save”. Now that you have saved the settings a reboot is necessary for the policy to take effect.

 

CakePHP GraphViz Models

I have completely and totally rewritten my old script that generates a graph of CakePHP models and their relationships.  Instead of pasting the code in here, I pushed all of its development to GitHub where it now enjoys a new repository.  Please have a look, try it out, and let me know if it does or doesn’t work for you.

The major changes in this version are:

  • Rewritten as CakePHP Shell instead of being a standalone madness script.
  • Got rid of all dot markup. Utilized Image_GraphViz PEAR package instead.
  • Added support for old and new CakePHP versions (1.2, 1.3, and 2.0).
  • Added option for using only real models (via className property of the relationship) or sticking with the old behavior.
  • Added a bunch of options for tweaking GraphViz output.  And now it’s obvious where to edit them, in case you need more.
  • Improved the styling of the graph a bit – fonts and colors.
  • Improved documentation.

As a side effect improvement, now that it is a native CakePHP Shell, it’s trivial to add to your project build process.

Branches graph at GitHub

One of my favorite features of GitHub (and, probably, pretty much any other git client) is the graphical representation of branches.  It usually gives a crystal clear picture of how the source tree came about to be.  But I think today I actually managed to confuse the heck out of it.  Have a look at the screenshot below.

A couple of commits ago it was a master branch (black) and a stable branch (magenta).  Then I (if I remember correctly) created a test branch from the latest stable, pushed it, switched to stable branch, reverted one commit, and pushed it as well, then added a couple of commits to master and merged it into test.  Pushed and got the thing above.  Weird looking source tree mutant.

Anyway, I’m sure it will sort itself out some time later.

P.S.: Indeed, as expected, after just a few more merges, commits, and pushes the tree sorted itself out.  Lovely GitHub, very lovely!

Request Tracker 4 released!

Here are some major technology news – Request Tracker 4 is released!  For those of you not in the know, Request Tracker is an open source ticketing system developed by the company called Best Practical Solutions LLC.  Request Tracker, or RT for short, is one of the most flexible pieces of software I’ve seen in my life.  It’s also an excellent example of software design and architecture for those who are into that.  I’ve used Request Tracker 3, the previous version, for anything from personal task and document management through to a large installation with a 100+ concurrent users and a 1,000,000+ tickets database.

New features in version 4, according the website, include the following:

  • Lifecycles
  • Mobile device interface
  • Branding and theme editor
  • Quote-folding in replies and comments
  • Articles integration based on RTFM
  • Easy full text search
  • Autocomplete of owners and requestors
  • Better HTML mail display
  • Easier and more efficient navigation menus
  • Refreshed ticket create and update pages
  • IP and Date/DateTime custom fields
  • Dropdown and radio list custom field display types
  • Finer-grain ticket-level control of notifications
  • Much improved rights management UI
  • Loads of performance improvements and bug fixes

Continue reading for the full text of the email sent to rt-announce mailing list.

Continue reading Request Tracker 4 released!