Tuesday, September 18, 2012

How to color grep result output

On one meet up I noticed that some representative have colored grep result that is convenient:

So it is not a rocket science - link.

Briefly do:
export GREP_OPTIONS='--color=auto'

Sql Developer installation tuning and tips


Install SQLDeveloper
1 Unzip sqldeveloper-3.X.X.XX.XX-no-jre.zip to folder ~/java/

2 Provide path to JRE

mkdir ~/.sqldeveloper/
echo "/usr/lib/jvm/java-6-sun/" > ~/.sqldeveloper/jdk
run SQLDeveloper from the shell

cd ~/java/sqldeveloper && chmod ogu+x sqldeveloper.sh && ./sqldeveloper.sh
3 Import connections to DBs.

Right click over "Connections" root node in Connections view - "Import Connections". 2 RI: Please add latest connections config here

 Connections file is here: https://wiki.reveredata.com/confluence/download/attachments/12484647/SqlDeveloper_Det2Connections.xml


Configuration of SQLDeveloper:

0) If you have problems with rendering please change Theme to "Classic 10.1.3" in  Tools/Preferences ... Environment.

1) Change auto formatting in SQL Developer - menu tools/preferences in tree "code editor/Completion Insight"
unselect "Change case as you type"

2) Tools/Preferences ...in tree Databases/NLS  property "Date Format" make as "YYYY-MM-DD" and update other date-time formats too by this.


3). install third-party Driver, for example MySQL goodlink, MSSQL goodlink2,
Download driver MySQL site.
Download MSSQL driver:  JTDS site
All drivers: list.
 Tools:Preferences menu, Database -> Third Party JDBC Driver .

TIPS:
Viewing Multiple Tables

You can have tabs open for more than one table. Just click the Freeze View button (it looks like a push pin) when you are viewing a table; and when you click to display another table, the tab for the first table will remain open.


Tuesday, September 11, 2012

eCoberture is dead, Eclemma is a king


There are two major projects for coverage testing in Eclipse: eCobertura, EclEmma.

EclEmma is active and good for Eclipse.

eCoberture is outdated and have painful bug with clean up coverage, but cobertura it is used in Sonar project.

Krusader Editor does not save settings in Ubuntu 12.04

Krusader in Ubuntu 12.04 does not save settings of its editor(KrViewer).
this cause creation of backup file (with '~' at the end) on each edit(F4) -> save operation for file.

https://bugs.kde.org/show_bug.cgi?id=303463

File: ~/.kde/share/config/krusaderrc is not related for this.
No complains in group: http://groups.google.com/group/krusader-users/subscribe?hl=en

workaround is here.

To alternatively ease problem - change internal editor to smth else:
Settings / Configure Krusader ... tab General , tab View/Editor , Editor: /usr/bin/gedit
or /usr/bin/geany

Saturday, September 8, 2012

Eclipse complains about com.sun.tools 1.5.0 is missing

During compilation of some opensource project you could come up to error "artifact  com.sun.tools 1.5.0 is missing" in Eclipse, but compilation works fine from terminal.

Problem is in what JDK Eclipse use and provide it the same path.
check correctness of $JAVA_HOME
You need to check $PATH variable to be sure that required JDK is in Path.
Even you have JAVA_HOME/bin in path, java could be taken from other location due to the fact that it could be found in path early than your, to check it:
which java
ls -la /usr/bin/java
ls -la /etc/alternatives/java
Make sure that /etc/alternatives/java points to your JDK. In my case it was to OpenJDK but my JAVA_HOME was pointed JDK 1.6. So I removed all openjdk packages from Synaptic in Ubuntu and  after that all worked fine.

Similar problem is described here.


Thursday, August 30, 2012

Linux command 'Less' short list of commands

Linux command 'Less' short commands:
source, source2.

h - show help

f - scroll page forward
b - scroll page backward
g or "<" - go to begin of the file
G or ">" - go to end of the file

/PATERN - search
n - search for next appearance
N - search for previous appearance


tail mode:

Press Shift-F. This will take you to the end of the file, and continuously display new contents. In other words, it behaves just like tail -f.
To start less in the tail mode, execute:
$ less +F /var/log/messages
To scroll backwards, you must first exit the follow mode by pressing Control-c.

reload latest lines from file, one time 'tail mode':
Shift+G - got to the end of file
Shift + ">" - load till the end of file, press few times if you expect changes to file.

Friday, August 3, 2012

Quick Notes application for Ubuntu 12.04 with Unity support


I used gnote for a while - it is good but it lacks a Unity support in Ubuntu 12.04 that is inconvenience.
Googling over internet  .... point to interesting application ZIM (http://zim-wiki.org/)

Just install "sudo apt-get install zim",
launch it and Menu Edit -> Preferences ... tab "Plugin" , enable  plugin "Tray Icon".

video tutorial

Beware of bug that make it slow to open: https://bugs.launchpad.net/zim/+bug/995919
You need to install latest version from ppa:
sudo add-apt-repository ppa:jaap.karssenberg/zim
sudo apt-get update
sudo apt-get install zim

To launch Zim notes on Ubuntu start-up, in tray, create shell script zim-in-tray.
echo -e '#!/usr/bin/bash\nzim --plugin trayicon' > zim-in-tray
chmod ugo+rx zim-in-tray

Open "Startup Applications" from Dash, create new launch configuration and point to zim-in-tray.