Script for basic git configuration

While setting up my new developer VM I came to the point where I had to configure git again. As I keep on configuring git on several VMs and systems required for and provided by my clients, I thought it might be a good idea to create a small shell script which sets up my standard configuration.

Options I normally use are:

# Set username
git config user.name

# Set user email
git config user.email

# Set standard editor
git config core.editor

# Activate colors in output
git config color.ui true

# Some helpful aliases
git config alias.s status
git config alias.au '!git add -u && git status'
git config alias.spull 'svn rebase'
git config alias.spush 'svn dcommit'

Based on this collection I developed a small shell script which you can find here (released under GNU GPLv3): git-init-config

It asks for user name, email and your favourite editor. You can either apply the configuration per git repository or globally (see option –global).

Nautilus killed by signal 11 (SIGSEGV) when starting Gnome session after updates (OEL 6.5)

Just experienced some weird behaviour on my fresh Oracle Enterprise Linux 6.5 installation. After installing a fresh VM I updated the system using system tools. Everything seemed fine until I rebooted the VM and started a new Gnome session. Unfortunately desktop icons were missing. The icons are normally provided by a nautilus process which starts on login. However, since the update nautilus kept being killed by signal 11 (SIGSEGV). Nevertheless, Gnome kept trying to open a new nautilus process which in ended up in a nautilus starting and killing spree 😉

In order to solve the problem I had a look at dmesg:

$ dmesg | tail

Within the output I found that not nautilus was the core problem but the librsvg library used by it. So I checked the software center application and found two versions:

librsvg Packages
librsvg Packages

After the first update process version 2.26.0-6.el6_5.2 was installed, so I tried 2.26.0-6.el6_5.3. Afterwards nautilus could start properly and the problem seems to be solved for the moment.

Running JD-GUI on Oracle Linux 6.5 (64 Bit)

I just installed a fresh Oracle Linux 6.5. (64 Bit) development virtual machine for myself. One tool I learned to appreciate a lot is JD-GUI. Unfortunately, the binary provided does not run on a 64 Bit Linux (virtual) box as it was compiled for i686 architecture. However, in order to run it without any errors just install the following packages:

yum install glibc.i686
yum install libgtk-x11-2.0.so.0
yum install libXxf86vm.so.1
yum install libSM.so.6
yum install libpk-gtk-module.so
yum install libcanberra-gtk-module.so
yum install gtk2-engines.i686

Working with XMind and iThoughts using Google Drive as file share

In my daily work I like to create mind maps for many tasks, such as meeting minutes or brainstorming before starting a new task. For my mind maps I use XMind on my Mac and iThoughts on my iPad. Of course there is the requirement to share mind maps between my devices. Therefore, I had a look into both products in order to find a way to work with my mind maps on both devices.

In general, I use Google Drive as my cloud provider and did not want to install additional software on my Mac. Unfortunately, iThoughts does not support Google Drive syncing at the moment. However, you can send your mind maps to other apps and the Google Drive App is one of those you can choose. After trying around a little bit I developed a small workflow that seems to work and I am going to describe it in this blog post.

The following steps will be executed in the workflow description:

  1. Create a mind map in iThoughts on the iPad
  2. Upload mind map to Google Drive
  3. Open mind map from Google Drive Folder using XMind
  4. Edit mind map in XMind
  5. Save mind map to Google Drive
  6. Open edited mind map in iThoughts

Workflow by example

First of all create a new mind map in iThoughts:

Edit mind map
Edit mind map

Afterwards it has to be sent to Google Drive App in order to upload it to the shared drive:

Send to App
Send to App

The native format for XMind is .xmind, so this file type and Open in Google Drive have to be selected:

Send to Google Drive
Send to Google Drive

Afterwards Google Drive App should open and ask for permission to upload the file. As soon as permissions are provided the upload should start:

Uploading file
Uploading file

After the upload is finished the mind map should be stored in Google Drive folder and it can be opened using XMind:

Mind map opened in XMind
Mind map opened in XMind

Now it is time to make some more changes in XMind:

Edited mind Map
Edited mind map

Afterwards the mind map has to be saved to Google Drive again. If Google Drive Mac App and its Google Drive Folder are used the mind map just has to be saved in XMind and it gets uploaded. Another possibility would be to upload the new version using the Google Drive website.

Next step is to open the mind map in iThoughts, therefore the iPad Google Drive App has to be opened, the file selected and send to iThoughts:

Open file in iThoughts
Open file in iThoughts

Here a problem within the workflow was encountered. If the mind map is sent to iThoughts and its name includes spaces they get removed. In the case described the mind map was called “Google Drive Test Map.xmind” but it ended up in iThoughts as “GoogleDriveTestMap”. Therefore, it is a good idea to choose names without spaces.

Finally, the edited mind map can be opened in iThoughts again and it displays the changes made in XMind:

Edited mind map in iThoughts
Edited mind map in iThoughts

Google Drive application and symbolic links

The Google Drive application can be used to sync files stored on your Google Drive with your local file system. When installing the Mac application a folder named “Google Drive” is created and automatically synchronised with your Google Drive in the cloud.

Most likely you do not want to store all data you want to synchronise with your Google Drive within that exact folder in your local file system. Furthermore, you do not want to start storing different file versions in two different locations on your local file system, one in your Google Drive folder and one at the “proper” location according to your file system layout. The first idea when using Unix/Linux file systems would be to store your data where you actually want it to be and create a symbolic link within the Google Drive folder. That way you can work in your file system structure and still have the same version synchronised with your Google Drive. For this you would use the following command:

~> ln -s ~/foo/bar/file ~/Google\ Drive/foo/bar/file

Unfortunately, the Google Drive application is implemented such that it ignores symbolic links. So your data will never be synchronised with your Google Drive using this approach.

Nevertheless, it works the other way around. So if you want to store a file on your Google Drive you should just change your point of view a little bit. In general this means you do not want to store a local file into your Google Drive, you want to store and use a file on your Google Drive locally.

First of all, create the file or folder you want to store on your Google Drive within your Google Drive folder. On my Mac it is located at ~/Google\ Drive. Secondly, just create a symbolic link in you local file system at the appropriate location which references the file/folder within the Google Drive folder:

~> ln -s ~/Google\ Drive/foo/bar/file ~/foo/bar/file

Now changes can be made to the file ~/foo/bar/file and they are directly synchronised with the file stored on your Google Drive.

Problems with DataControls.cpx after package structure refactoring

When building modern IT systems one has to consider many areas prior to project start. A common area within Java projects is the definition of a proper project package structure in order to prevent package/naming conflicts. However, from time to time you still run into some conflicts due to changes in project structure, design or the usage of third party libraries.

Recently, I encountered some DataControl conflicts in a small ADF project of mine. In order to solve it I used JDeveloper’s package structure refactoring capabilities in order to move the affected classes and DC definitions. I was pleased to see that all references seemed to be amended appropriately. Nevertheless I ran into some problems regarding the DataControls.dcx file when trying to run the application the next time:

oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object "/com/foo/bar/DataControls.dcx"

I recognised that the error message still presented the old DataControls.dcx path to me. So I used JDevelopers search in files tool which can be found under “Search -> Find in Files…”.

JDeveloper - Search in Files
JDeveloper – Search in Files

 

However, I could not find any file which contained the path displayed. As the problems occurred after a package structure refactoring I changed my search string to package notation and finally found something within the DataBindings.cpx file.

<dataControlUsages>
  SomeBean" path="com.foo.bar.SomeBean" />
</dataControlUsages>

Within the path attribute the package structure still pointed to an old location. After amending the structure properly the application could be deployed again.

Change SQL Developer language setting

As a standard SQL Developer uses the system OS language in order to determine it’s own language setting. In my case this is normally German. Unfortunately the German translations rather confuse than help me to understand the UI. Therefore, I tend to switch the UI language to English each time.

This can be done quite easily by adding a new line to the $SQLDEVELOPER_INSTALL_DIR\ide\bin\ide.conf file:

AddVMOption -Duser.language=en