Sunday, August 5, 2012

Medibuntu Update

Just update the instructions for installing Medibuntu on 12.04.

http://www.unixmen.com/how-to-add-medibuntu-repository-in-ubuntu-via-terminal-and-gui/

LibreOffice and OpenOffice

When Sun was brought by Oracle, OpenOffice was replaced by LibreOffice.  Although they are supposedly very similar, it seems the LibreOffice is a bit less polished then the OpenOffice, and a bit slower too it seems.

Luckily putting back OpenOffice is not that difficult.   With three easy steps, and you are there:

  1. sudo add-apt-repository ppa:upubuntu-com/office
  2. sudo apt-get update
  3. sudo apt-get install openoffice

Saturday, August 4, 2012

Kubuntu and VirtualBox

I have hold back the upgrade from 11.10 to 12.04 as I have learnt my lessons not to upgrade to the latest as soon as it arrives as it is better to wait a while for all the initial teething problems getting fixed.

And 11.10 is working fine for me, well on my netbook anyway.  I know it is running the same Linux under the hood, but Kubuntu seems to handle power management a lot better.  At least my netbook won't put into sleep whenever I pull the power plug.

Anyway, the urge for me to upgrade to 12.04 is VirtualBox.  11.10 is just painfully slow running on VirtualBox.  Hence, I decided to upgrade to the newer version to see if it helps.  Gladly, it seems to work better.  At least I don't need to wait for a minutes for responses.

Update: The latest version of VirtualBox 4.2 seems to fixed the performance issue.  In fact, the new version has improved the speed across the board.

Sunday, May 20, 2012

Replacing hard drives in a Buffalo Linkstation Duo

I have trouble with the original disks within my Buffalo Linkstation Duo.  The two 500GB original hard drives that came with my drive failed one after another (luckily, not together!).  Be fair to Buffalo, their after sale service is good (well for the first replacement).  Emails were replied promptly - though I have problems with the second replacement, their customer services team is good, but their RMA team is dreadful.  I had waited for over two months for a reply from them.

Anyway, the reason I wrote this post is that I fed up the waiting for the replacement and decided to use two spared 250GB drives I have to safe keep my files.  I need the fail-safe provided by RAID1.

Unfortunately, it is not easy as putting two empty drives into the unit and configure the NAS.  It seems Buffalo stores the OS of the NAS on the hard drive rather than on the drive's ROM.  Hence, if you have replaced both drives, the NAS will not know what to do at the boot time.

If you really need to replace both drives at the same time, you need to use TFTP to transfer essential files to the NAS to make it operative.  Step can be found at: http://forums.buffalotech.com/t5/Storage/FAQ-3-of-5-TFTP-boot-procedure-please-read-this/td-p/68094 .  There is a point you may want to note. You don't need to take the drive off your network. In fact, it is better to keep it in your network as after receiving the necessary files through TFTP for booting, it will try to obtain an IP from your DHCP server.  If the drive is still in your network, it can get an IP from your DHCP server.  All you need to do is to set you PC to the static IP 192.168.11.1 to allow the NAS to locate the files intially.

If everything went well, you should have your Buffalo drive in EM mode, and your PC is at static IP 192.168.11.1 . Now, you can put your PC back to your network, i.e. use your normal IP (from DHCP or a static IP within your subnet).

The next step is to run the firmware updater in debug mode, and the instructions can be found at this video:

http://www.youtube.com/watch?v=Pu4HI6XoSB8

With the debug mode, you can ask the NAS to rebuild the drives partition and put back all necessary files onto the hard drive for normal boot.


Monday, May 14, 2012

SSIS Tips and Tricks

Recently I have got myself involved in developing Sql Server Integrate Services (SSIS) packages.  While I was doing it I had picked up a few tips and tricks that I would like to share here.

First trick is to pass parameters from Job Agent into SSIS.  It is possible to assign values to your package on Agent Job's configuration tool.  Details can be found at:

http://www.buildingmeaning.com/?p=171

For example, if you are a package variable called Subject, then you can set (override) this variable with the steps decribed in the link by adding the property path \Package.Variables[User::Subject].Properties[Value] with the desired value.

Second trick is to connect to your data source setup in your package from Script Task.  For example, if you have a data source called "My Data Source" setup in your SSIS, and you can use it in Script Task by doing:-

SqlConnection conn = Dts.Connections["My Data Source"].AcquireConnection(Dts.Transaction) as SqlConnection;


http://msdn.microsoft.com/en-us/library/ms136018.aspx


Third is actually a tip for preventing SQL injection by using parameterized sql

SqlCommand command = new SqlCommand(commandText, conn);
command.Parameters.Add("@ID", SqlDbType.Int);
command.Parameters["@ID"].Value = customerID;

The above specifics the ID is an integer type, so it can prevent values that is not a valid integer.

Hope you find them useful.


Monday, April 23, 2012

Create Playlist for Android Device

Today, I stumble upon this blog on creating playlist for Android device.  What a life saver it is.  It is great to have large capacity memory card for your musics, however, it is can be a pain to create playlist.

Anyway, this blog (http://foss-boss.blogspot.co.uk/2009/11/create-mega-playlists-from-your-pc.html) just makes things so easy.

However, I would like to add some of my inputs to it.  The command

dir /b > playlist.m3u

works great if you have all your mp3 in a flat file structure, i.e. no directories.  However, if you have sub-directories, you need to do a bit more than running the command, and here are the steps:

1) dir /s /b > playlist.m3u
2) open the playlist.m3u with a text editor
3) use find and replace to remove any trace of parent directory path.  For instance, if you are in c:\media\mp3 and your playlist.m3u is within this directory, then you need to search for all trace of c:\media\mp3, and replace with blank.
4) use find and replace to look for backward slashes (\), and replace them with forward slashes (/)
5) Save the file, and you are good to go!

Friday, February 24, 2012

Moving from Ubuntu 11.10 to Kubuntu 11.10

When KDE moves to 4, I move to Gnome with Ubuntu mainly due to its file manager.  However, lately Gnome and Unity (not just Unity, in fact, it isn't that bad ... try Metro in Windows 8) gives me issues here and there.  These issues are all minor, but enough to annoy me.  Anyway, as you can guess what this post is about.  I move back to Ubuntu after gave KDE another go.  On the same hardware, it just runs better than Gnome.  It fews things are smoother, and things seem to work better.  For instance, simple thing as notifications.  With Compiz on, it gives me issues occasionally.  For instance, the transparency not display properly etc.

So far, my experience with KDE (Kubuntu) is much more pleasant than than Gnome 3 or Unity.

Update:
I had problem problems with DVD/CD writings with Gnome's bundled software.  On the same machine, K3b works perfectly.  I guess I am safely to say it is software issues.