Thursday, March 31, 2011

Egg Solutions Virtual Tour Mime Types

Today we had to setup mime types in IIS for Egg Solution Virtual Tours.

 

We added

File Extension: .class

File Extension: .ear

File Extension: .egg

 

Mime Type: application/java-archive

Friday, March 25, 2011

Installing sun-java6-jre on Ubuntu 10.10

 

Today I was trying to install Sun Java JRE.

 

to install sun-java6-jre on Ubuntu 10.04 LTS, type the commands below in Terminal:

Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
Code:
sudo apt-get update
Code:
sudo apt-get install sun-java6-jre

 

Credit http://www.ubuntugeek.com/how-to-install-java-runtime-environment-jre-in-ubuntu-10-10-maverick-using-ppa.html

 

When I ran the first command above I received the following error:

sudo: add-apt-repository: command not found

 

I ended up having to run this command and everything was made better

sudo apt-get install python-software-properties

Sunday, March 20, 2011

Turbo Charge Eclipse / CFEclipse / Aptana

Today I was going through my google reader and I found an article on how to turbo charge Eclipse by Mike Henke.

I replaced my eclipse.ini file with the options he suggested and the startup time and performance has been better.  I will report back after a few days if I have any issues.

Wednesday, March 16, 2011

Javascript Rounding

I had a javascript calculation that was displaying a ton of decimal points.

 

Here is a way to round to 2 decimal places in Javascript:

 

 

var total = 123.433

total = Math.round(total*100)/100  //returns 123.43

Credit Goes to Javascript ToolKit

 

Break up a large filename for transfer

Today I was trying to transfer a file from 1 server to another.  At first I thought the file was too large, so I set out to break up the file.

 

Credit goes to Techie Corner.

 

To Split the file:

split --bytes=500m /home/photosrandycc.tar.gz /home/bu

 

 

To Restore the file:

cat bu* > photosrandycc.tar.gz

 

Turns out the real issue was virtualmin actually set a 1GB quota.

 

 

Thursday, March 10, 2011

Flush Logs on MySQL Without Restarting the Server

For the longest time I thought you had to stop mysql and rename the log files and then restart when on Windows.

That's definitely not the case.

Simply rename the error log file and then run this command and it will reset the error log file.  Be sure to change out the username to your username.
mysqladmin -urandy -p flush-logs