Thursday, November 17, 2011

java default sizes

to see the default stack, heap sizes in IBM JRE/JDK, run this command:
java -verbose:sizes -version

Tuesday, November 8, 2011

Ubuntu chkconfig equivalent

what's the command line service config tool in ubuntu for different runlevel?

apt-get install sysv-rc-conf

Wednesday, July 27, 2011

Empathy logs in Ubuntu

Empathy logs your conversation by default and it seems to store its log in different locations between different releases? on ubuntuforum thread people found it under:
~/.gnome2/Empathy/logs
~/.local/share/Empathy/logs
~/.local/share/empathy


On my Ubuntu 10.10 I found them here:

~/.local/share/TpLogger/logs

Friday, July 8, 2011

Ubuntu 10.10 on Acer AspireOne 522

quite a few issues with Ubuntu 10.10 on AOD522


Problem #1 - it keeps hanging after login:
disable the atl1c driver and update the initramfs image:
add in /etc/modprobe.d/blacklist.conf this line
blacklist atl1c
update-initramfs -u



Problem #2 - getting AMD video driver to work:
sh ati-driver-installer-11-6-x86.x86_64.run --buildpkg Ubuntu/maverick
apt-get install -y debhelper dh-modaliases libqtgui4 execstack
sh ati-driver-installer-11-6-x86.x86_64.run --buildpkg Ubuntu/lucid
aticonfig --initial
aticonfig --resolution=0,1280x720

Problem #3 - speaker doesn't turn off after headset plugged in:
apt-get install pavucontrol
/etc/modprobe.d/options.conf
options snd-hda-intel model=laptop,dell-vostro position_fix=0,1

If you don't like the new interface with mutter, you can get the old netbook-launcher back:
apt-get install netbook-launcher-efl





Tuesday, July 5, 2011

USVN with Active Directory

to make USVN's LDAP working with Active Directory was tricky, use the following in config.ini

alwaysUseDatabaseForLogin = "admin"
authAdapterMethod = "ldap"
ldap.options.host = "domain.com"
ldap.options.port = "389"
ldap.options.username = "CN=username,CN=users,DC=domain,DC=com"
ldap.options.password = "password"
ldap.options.useStartTls = "0"
ldap.options.useSsl = "0"
ldap.options.bindDnFormat = "%s"
ldap.options.bindRequiresDn = "1"
ldap.options.baseDn = "DC=domain,DC=com"
ldap.options.accountCanonicalForm = "0"
ldap.options.allowEmptyPassword = "0"
ldap.options.optReferrals = "0"
ldap.options.accountDomainName = ""
ldap.options.accountDomainNameShort = ""
ldap.options.accountFilterFormat = "(&(objectClass=user)(sAMAccountName=%s))"
ldap.createGroupForUserInDB = "1"
ldap.createUserInDBOnLogin = "1"

Thursday, April 7, 2011

JIRA instance restarter

Just a simple script I use to watch for JIRA process, in case if it dies the script would restart it automatically.  This can be used for whatever process.  Note: it's using ps awwx under Solaris.

#!/bin/sh


jira=$1

pid=`/usr/ucb/ps awwx | grep java | grep "$jira"  | awk {'print $1'}`

if [ "$pid" = "" ]
then
    pid=0
fi
if [ $pid -gt 1 ]

then
    echo $jira" - JIRA is running fine"
else
    echo $jira" - JIRA is not running, trying to restart... "
    echo $jira"bin/restart.sh"
    $jira"bin/restart.sh"
fi


----------------------------------------------------------------
few more JIRA house keeping daily scripts:


## lock-cleanup.sh

#!/bin/sh
JIRA_HOME=/opt/global/jira
if [ -f $JIRA_HOME/index/comments/write.lock ];
then
    rm $JIRA_HOME/index/comments/write.lock
fi
if [ -f $JIRA_HOME/index/issues/write.lock ];
then
    rm $JIRA_HOME/index/issues/write.lock
fi


----------------------------------------------------------------
## backup-cleanup.sh 
#!/bin/sh
JIRA_HOME=/opt/global/jira
DAYS=30
find $JIRA_HOME/backup/ -name "*.zip" -ctime +$DAYS -exec rm {} \;

Friday, April 1, 2011

concrete5 add-ons install in FreeBSD

concrete5.org provides lots cool add-ons that can be installed by GUI in your concrete5 site.  The add-on is a archive zip file where it needs to be unzipped to your concrete5 web directory on the server.  If you try to install it by GUI with one click and your backend is running on FreeBSD, you going to see an install failed message without further details.  The root cause is that concrete5 hardcoded the path of unzip under /usr/bin/unzip

fix:
install unzip from FreeBSD ports, it will be located in /usr/loca/bin/unzip
cd /usr/ports/archivers/unzip
make ; make install ; make clean

make a symbolic link to it:
cd /usr/bin/
ln -s /usr/local/bin/unzip unzip

now you are done, enjoy one click install!