Linx Trix

November 19, 2007

Mov to Avi or mov2avi for your mp4 player

Filed under: Uncategorized, easy — admin @ 6:59 pm

So you got yourself one of these chinese wholesale mp4 players? And they accept only avi files where you may have a mov file which needs to be converted to avi? And you happen to be on Linux? Just hit this and it should solve your problem:

mencoder -oac mp3lame -ovc lavc -vf scale=0:0:0:0:0:0:qpal somemovfile.mov -o outavifile.avi

For this mov2avi trick of course you have to have mencoder installed which will do the conversion for your sweet new mp4 player. BTW, the scale command is to get 352×288, but you can omit it.
This is not something much on topic, but a simple google search on the mov 2 avi won’t help you much so I thought to be nice and put this information out for any of you guys looking for it.

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

November 9, 2007

Importing large data files in MySQL

Filed under: easy, mysql — admin @ 2:04 pm

You tried phpmyadmin, you tried cat some_large_file | mysql -uuser -p -Ddatabase but it complains too? Then simply do SOURCE <large file name> while in the mysql console and it will work.

The only problem could be if you still get the error on some lines is to increase the max_allowed_packet if there are large blob’s in your dump.

There are some alternatives like BigDump, but that’s installing additional tools for the job which is not always necessary.

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

September 7, 2007

Plesk: Unable to set the private key

Filed under: easy, hosting — admin @ 4:35 pm

There is one thing to watch out when setting up a SSL certificate with Plesk, it may say “Unable to set the private key: Probably, the private key format is invalid.”

That is most probably if you used something like:

openssl genrsa -des3 -out server.key 1024

to generate your SSL key.

To fix the “problem”, all you have to do is:

openssl rsa -in server.key -out apache.key

And retry the job. The only drawback is, from now on your server key is not password protected.

p.s. Here are some nice manuals on setting up a Thawte SSL certificates(should work for others too), other then missing the clue about the password protected certificate the manual is great.

p.p.s. I hate “nice” web hosting management apps :) I like to do it in text files, it is slower, but its inevitable that one day you will have to setup something custom and there won’t be any option in the nice app to help you out. This is for big hosts and stuff, if it’s for small sites I’m all for Plesk & co. since it allows “normal” people to run a host.

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

September 3, 2007

GoDaddy and mod_rewrite not working

Filed under: .htaccess, easy — admin @ 6:01 pm

Someone asked me to help him set-up a simple mod_rewrite rule in a .htaccess file. All looked so simple but unfortunately it did not work. Tried the code on a few other hosting services and it worked just as it should. A bit of digging and I found the following which cured the problem.

RewriteBase /

Just put that before your mod_rewrite rules in .htaccess and it works just fine.

p.s. This was on the cheapest GoDaddy Linux service (I say this because some people on the ‘net  claimed that it does not work on the GoDaddy budget hosting account), other then that I must say the speed is not bad for a cheapo service :)

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

August 24, 2007

Launch Safari from a OSX widget

Filed under: easy, osx, widget — admin @ 7:18 pm

This is not exactly for the hard category since I have found this solution pretty quick, but still I had to do some digging so it’s worth sharing.

In the javascript code:

  1. if (window.widget) {
  2.         widget.openURL(‘http://www.linxtrix.com’);
  3. }

Good thing is there is no referrer even if you load a page in your widget and pop open the link from there…

p.s. I just installed a syntax highlighting plugin from here. Hope it works nice :)

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

Powered by WordPress