Friday, December 14, 2012

Unlock system user in Oracle 11 XE (CentOS)

1) sudo -iu oracle

2) make sure you have in .bashrc ". /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh"

3) launch sqlplus
[oracle@azer ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Fri Dec 14 20:03:58 2012
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
SQL> ALTER USER system ACCOUNT UNLOCK;
User altered.
SQL>

Change password just in case.


[oracle@azer ~]$ sqlplus / as sysdba
SQL> alter user system identified by my-new-password;
User altered.
SQL> commit;

How to install Oracle 11g Express Edition (XE) on CentOS

Tuesday, December 11, 2012

How to create new repo at gitolite



1. get access to gitolite-admin repository

2. clone it and do changes to git/gitolite-admin/conf/gitolite.conf

3. do push

4. update Cgit website configuration at git.yourcomapny.com file /etc/cgitrc

5. provide mail notifications: copy 'config' from existing repo to new repo at server.


"<repo>/config" content:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = true
[hooks]
        mailinglist = git-commit@company.com
        emailprefix="[GIT] "
    showrev = "echo "All Branches: "; git branch; echo; echo "Summary of changes:"; git log $oldrev..$newrev; echo; echo; git diff-tree -p --stat --summary --find-copies-harder $oldrev..$newrev;"




To automate all this steps please read this.

Attention: command for 'showrev' is not ideal and send empty mail in case of branch merges, and branch removal.

Monday, December 3, 2012

Gitolite - Change default config template file for repositories

We use gitolite for git server, and we use mail notifications after any push to repositories to manage and be notified about changes that are done by other developer.

After push in gitolite-admin repository, I need to login to git server and manually copy hook file and config for hook:
/home/git/repositories/REPO-NAME.git/config
/home/git/repositories/REPO-NAME.git/hooks/post-receive

My thread in google group to make automatically.


Books to read about Java and best practices

Good todo list for reading to improve your skills of java developer: http://habrahabr.ru/post/153373/
one day I will have to time, to do it :) .

How to remove Switch Workspace icon on Launcher panel in ubuntu 12.04

I have never understand why it is impossible to remove from Launcher panel(vertical panel) Trash icon and Switch Workspace icon, most people do not use them and for some people it is even dangerous.

Here is a way to remove Switch Workspace icon:
1) Apply updated for 12.04 at least for December 1, on clean 12.04 this approach did not work for me.
2) Aplly following commands, copy-paste from here.

sudo add-apt-repository ppa:ikarosdev/unity-revamped 
sudo apt-get update && apt-get dist-upgrade
3) Restart the system and open
ccsm
, go to
Ubuntu Unity Plugin
switch to the
Experimental
tab and turn off
Show "Expo Icon" in the launcher
.

Trash icon still at panel :(, If you know how to remove it, please let me know.


Update: for 13.04 - there will be standard way to do this, link.

Saturday, December 1, 2012

Hotkey Maximize and Minimize window in Ubuntu 12.04 (Unity)

In older Ubuntu there was hotkey(shortcut) to Maximize and Minimize window.
In Unity(12.04) these was changed:
Maximize - Ctrl+Super+UpArrow
Minimize - Ctrl+Super+DownArrow