Friday, 7 October 2011

Playing mp3 File on linux sever (And convert MDB file to txt)

I'm back,

Work has been quite busy recently that I haven't had time to post any new discoveries.

So I will start slow with some personal needed tricks I picked up recently and then I'll add a work related process.

First up.

I wanted to be able to start a mp3 file on my home computer from work.
Problem : I only have access via ssh protocol.
I found a few ways to stream the file to my work computer using vlc, but that was not what was needed and will eat my bandwidth, not what I want.

Solution : Use mpg123
So you just ssh into the server and command is :
mpg123 song.mp3

Gave my girlfriend a fright when music started blaring out of my home computer, ha ha.


Next a simple work related process.

I received a .MDB file from a client. (Access database file)
So as I run Linux I did not have and do not want to have Access installed on my PC.
Therefore I needed to convert file into a better usable format.

Solution : Use mdbtools

Steps to follow are install mdbtools with :

sudo apt-get install mdbtools

Then once completed you need to run this to see what tables are within the file with :

mdb-tables file_1.MDB

Then using the result of the above command execute this to export the file to text :

mdb-export file_1.MDB Table_Name

Done.

Have a good weekend and I hope this is usefull to someone else one day.

Friday, 6 May 2011

Back from Holiday and unzipping zip file bigger than 4 GB on linux

I have neglected my blog a bit since being on holiday.
You don't get good internet speed down on the farm in the TsitsiKama forest so I left the PC alone for a while.
I did fiddle with my HTC Touch Pro a bit I must admit, but that was because I had just updated it with a new ROM and was figuring out what it had and customizing it.
I do love the new ROM!!
The HTC has hogged my attention over my Samsung Omnia i8910 for the past month now.
I haven't flashed the Samsung yet so maybe after doing that I can really compare.
With the default ROM's Samsung wins, but now I'm leaning towards the HTC after some research and tweaking.

Anyway back to work and had to now unzip a 5 GB .zip archive.
Now I knew that there was some king of limit to zipping files bigger that 4 GB (something about 32 bit zip) so thought I might have an issue.
Just so you know this was working on a Linux OS.

Ok so unzipping it with normal unzip file.zip gave hiccups, but eventually completed with an extracted file and errors in the log about extra data somewhere in the file.(weird)

Then a tried 7zip and it did not like the file and said "Unsupported Method"

Once again a had to do some research and found that I should install 64 bit zip and try that. I didn't know off hand how to do that so I hoped another solution was out there or I would have to research installing 64 bit zip.

Woohoo I found another way!!!

So my solution was to use gzip.

The command I used was gzip -dc file.zip > new_file.txt

I don't know if it works on zip files with more than one file in them.

Ok bye.


Edit : New error today while unzipping.

need PK compat. v4.5 (can do v2.1)
This time 7 zip worked.

Installed 7zip (sudo apt-get install p7zip-full for linux)
7za e filename.zip

Note : the gzip method did work but gave an error at the end. The file looked like it extracted correctly.

SUCCESS.




Thursday, 31 March 2011

Adding Sybase IQ driver to Jasper iReport

How to Add Sybase IQ to ireport 4 Linux.

Get jconnect60.jar (Sybase IQ Driver)
Put Driver into  /iReport-4.0.1/ireport/modules/ext/
In iReport go to Tools/Options
Go to iReport option
Go to Classpath tab
Click add JAR
Browse to find Driver in /iReport-4.0.1/ireport/modules/ext/
and select jconnect60.jar
Select ok.
Driver added.




Now when you add data source

Use com.sybase.jdbc3.jdbc.SybDataSource as your jdbs Driver
and jdbc:sybase:Tds:localhost:2638/MYDATABASE as your URL







Thursday, 17 March 2011

Jasper iReport 4.0.1 fonts for linux

Okie dokie,

Well first tiny little blog showing how to add some java machine fonts for ubuntu linux (ubuntu 10 and above).

I had updated my machine to linux Mint 10 kde as well as updated iReport to 4.0.1.
When I opened a report I had created previously, I could not run the report as I was getting java errors in iReport :
net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Arial' is not available to the JVM. See the Javadoc for more details.

A little research began and a solution was found.
It was quite basic to install.

You need to run this command : $sudo apt-get install msttcorefonts
Obviously you need to accept the questions during install
and then restart your Jasper iReport.

Now back to work...

Tuesday, 1 March 2011

THE START!!



Well here I go my first BLOG.
I will be using this site as a storage place for information or projects I collect or complete or want to complete while learning the craft of IT.
So if you have advice on a project please don't hesitate to pipe up and spread your wisdom in a comment.

I will attempt to write one piece a week and maybe more if I feel like the TV is boring me and there is no rugby on.
Hopefully I can help you or others in finding information that normally took me a search or more to discover.

Please comment on the articles and if you have questions I will attempt to answer the best way I know how.