Skip to main content

Posts

cvs server on ubuntu gutsy

Note for my first time setting up cvs server on ubuntu gutsy. CVS, a version control system, allow you to work on sourcecode with your team. To install it on ubuntu, we need two packages from repos, cvs and the wrapper. pnix@pnix-a7n:~$ sudo aptitude install cvs cvsd [sudo] password for pnix: Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Building tag database... Done The following NEW packages will be installed: cvs cvsd 0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 1756kB of archives. After unpacking 3973kB will be used. Writing extended state information... Done Get:1 http://th.archive.ubuntu.com gutsy/main cvs 1:1.12.13-8 [1669kB] Get:2 http://th.archive.ubuntu.com gutsy/universe cvsd 1.0.13 [87.4kB] ... Building tag database... Done pnix@pnix-a7n:~$ ...

include external jar into your own exported jar

One problem that almost java guys have is create jar with external jar include. In eclipse it has export function to export project but there's no way to add external jar with this method. Today I found one solution, the project Fat Jar Eclipse Plug-In can take care this problem. Installation is just unzip it to eclipse folder then restart eclipse in shell or command line with this command "eclipse -clean". Now your eclipse already have fatjar plugin. To use it export the project, from your package explorer, right click on your project and select "Export...". You will get "Export Dialog"[see pic], choose Other->Fat Jar Exporter. From here you will know what to do next.:)

gusty firefox + google toolbar = hang

I love google toolbar and it's my number one online bookmark for a long time. After upgrade to gusty I feel that my firefox is not stable as it use to be. My firefox is freeze on some site that try to open second window. I'm not sure what's wrong firefox or toolbar but I know that after uninstall toolbar the problem gone. [to uninstall go to "Settings" > "Help" > "Uninstall" option on toolbar] Now I need something to replace google toobar jobs. Not too hard to find this. "Firefox Google Bookmark" for bookmarks. After install this extensions your firefox will has new menu "GBookmarks". below is screenshot Another thing i need is gmail notifyer, there are many firefox extension and linux apps can do this job. For me i choose checkgmail. pnix@pnix-a7n:~$ sudo aptitude install checkgmail Reading package lists... Done Building dependency tree ... Building tag database... Done pnix@pnix-a7n:~$ note: for now look...

using cron to execute sqlscript in oracle

Using cron to run sql script is a good idea to apply with a periodic database job. When running any scripts, cron doesn't know any environment variable. So, in the script, we always -use full path with execute command. -define all environment variable. ex. to see data in customer table in oracle database and log in customer_rpt.log, I create sql script[testsc1.sql] like this [oracle@oracle1 ~]$ cat testsc1.sql spool /home/oracle/customer_rpt.log select * from customer; quit; [oracle@oracle1 ~]$ next create shell script file to run sql script file. [oracle@oracle1 ~]$ cat mydbshell.cron #!/bin/bash ORACLE_HOME=/u01/app/oracle/product/10.1.0/db_1; export ORACLE_HOME; ORACLE_SID= my_sid ; export ORACLE_SID; /u01/app/oracle/product/10.1.0/db_1/bin/sqlplus user/password @/home/oracle/testsc1.sql [oracle@oracle1 ~]$ note that oracle_home, oracle_sid variable must be defined and sqlplus command called with full path. Now, we define new cron job by 'crontab -e' in console and make...

sopcast on gutsy

To celebrate liverpool winning today[not yet but I'm so sure :D],this post will show you how to watch tv on gutsy. First goto sopcast download page and get these two rpm files, qsopcast-0.3.5-2mgc.i686.rpm and sp-sc-1.0.2-1mgc.i686.rpm. Then to convert rpm packages to deb we need alien pnix@pnix-a7n:sopcast$ sudo aptitude install alien [sudo] password for pnix: Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Building tag database... Done The following NEW packages will be automatically installed: libbeecrypt6 libneon25 librpm4 rpm The following NEW packages will be installed: alien libbeecrypt6 libneon25 librpm4 rpm 0 packages upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 1911kB of archives. After unpacking 6488kB will be used. Do you want to continue? [Y/n/?] y ... Building tag database... Done pnix@pnix-a7n:sop...

color your nano

nano editor is no syntax highlight for any language by default. It is only black and white as in the picture below. To enable syntax highlight, you can uncomment the line [# include "/usr/share/nano/ruby.nanorc"]in /etc/nanorc[for global effect]. Or if you just want this effect to your user only. create ~/.nanorc and include default[sample] language specific config file from /usr/share/nano. Here is my java syntax highlight .nanorc file include "/usr/share/nano/java.nanorc"

export db in hibernate3 ant

I try the example in "Hibernate Quickly" ebook and found that using SchemaExportTask to export database in build.xml file is not work in hibernate3. In hibernate3, export database done by use annotations like this <target name="schema-export" > <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="schema.classpath" /> <hibernatetool destdir="${sql.dir}"> <annotationconfiguration configurationfile="${src.java.dir}/hibernate.cfg.xml" /> <hbm2ddldir}/hibernate.cfg.xml" drop="true" create="true" export="true" outputfilename="helloworld-ddl.sql" delimiter=";" format="true"/> </hibernatetool> </target> thanks, Jon Rose for ho...