Setting up WordPress. Super-simple-google-analytics and _setDomainName.

So, I use WordPress CMS to run this blog and super-simple-google-analytics plugin to collect some analytics.

And because the plugin is really super simple, it lacks some settings. In my case I want to use a sub-domain feature of Google analytics ‘_setDomainName’ to point Google Analytics to my main website.

My solution is maybe too straightforward, but it is super simple as well, and it works. So, to add a required feature, open the super-simple-google-analytics plugin settings, find line ‘_gaq.push([\’_setAccount\’, \’UA-%1$s-%2$s\’]); ‘ and the following line after it:

_gaq.push([\'_setDomainName\', \'\']);


Then click Update File and you’re done!

Oh, yes it works only for asynchronous loading of Google Analytics.

Now some pictures to illustrate this:

1. Link to the plugins page. I use multi-sites configured in my wordpress, but in single-site version it should not be very different:


2. In the plugin list find the Super Simple GA plugin and choose to edit it’s code:


3. Make the changes:


Devoxx 2014: ‘Three hours to build a Java EE application’ workshop

OK, I was late for the workshop because of talking to people presenting their projects outside. But it seems that I’ve got the main idea of the workshop:

If you use Windows and something doesn’t work – reboot.

Even more general idea:

If something doesn’t work, then let me guess: you’re using Windows.

git aliases

Basics of git aliases

Use git config alias.* , Luke. Or edit your .gitconfig file.

An example will be a shortcut for git branch – br:

git config branch

Or add the following to your .gitconfig (~/.gitconfig  in Linux):

br = branch

Global/local aliases

Aliases can be applied on a global level (for the whole operating system) or locally – for the current repo.

To create a local alias you may use git config alias.*  command:

git config branch

To do the same on a global level you can modify your global configuration file (usually ~/.gitconfig ) as it was shown above or run git config with –global modifier:

git config --global branch

Some useful aliases

git config status
git config alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)\<%an\>%Creset' --abbrev-commit --date=relative"

Here st will be a shortcut for status and lg will output nicely formatted commit history.