enrii.blog

A passionate programmer’s findings in the world of internet.

Archive for the 'Software and tools' Category

Zip a Folder in Linux

Thursday, May 31st, 2007

I keep forgetting the command to zip a folder in Linux (Red Hat Enterprise Linux 4). And I have even got all files in the folder got zipped individually when I typed the command wrongly, which looked funny to me. The correct command, to remind myself:

zip -9 -r <zip file> <folder name>

To zip a single file:

zip -9 <zip file> <filename>

Use "-9" for best compression. The compressed file works fine with Windows XP compression tool.

Right Click to Convert Image Format

Sunday, May 6th, 2007

I'm quite annoyed to see badly converted images on the web. They typically print screen and paste it on Microsoft Paint, then save as JPG. JPG files created that way look awful to me. I'm writing this to create a right-click shortcut to convert any image format to JPG nicely, with the help of ImageMagick command-line tools.

  1. Download ImageMagick, the Q16, DLL version from ImageMagick Download Page.
  2. Install the program.
  3. Start Registry Editor, start > run > regedit.
  4. Go to HKEY_CLASSES_ROOT\*\shell
  5. Right click on shell > New > Key
  6. Type in: Convert to JPG
  7. Right click on "Convert to JPG" > New > Key
  8. Type in: command
  9. Select "command". Double click on "(Default)" on your right to change its value.
  10. Type in with the double quotes: "C:\Program Files\ImageMagick-6.3.4-Q16\mogrify.exe" -format jpg -quality 100 "%1"
    Take note of the ImageMagick installation path. You may need to modify that.

Your regedit would look something like this:

Regedit print screen for image convertion

Your right click menu will have an additional item, Convert to JPG. Once you click on it, a new JPG file will be generated.

I'm certain that there are better ways to do it, but with ImageMagick installed you can do much more stuffs like this. (See: the power of ImageMagick)

All Audio and Video Codecs in One Package

Wednesday, April 25th, 2007

I remember I recommended Real Alternative codec last time. I found something more interesting this time. It's a single codec package that includes all audio and video codecs. The XP Codec Pack from Free-Codecs is the most complete codec pack that you will ever need.

The 2.0.7.1 version includes:

  • AC3Filter 1.30b
  • AVI Splitter 1.0.0.7
  • CDXA Reader 1.0.0.1
  • CoreAAC (AAC DirectShow Decoder) 1.2.0
  • CoreFlac Decoder 0.4
  • FFDShow MPEG-4 Video Decoder 2004.10.12
  • GPL MPEG-1/2 Decoder 0.1.2.0
  • Matroska Splitter 1.0.2.9
  • Media Player Classic 6.4.9.0 rev. 609
  • OggSplitter/CoreVorbis 1.1.0.79
  • RealMedia Splitter 1.0.1.1
  • RadLight MPC Filter 1.0.0.4
  • RadLight APE Filter 1.0.0.4
  • RadLight OFR Filter 1.0.0.4
  • RadLight TTA Filter 1.0.0.2
  • The Codec Detective 2.0
  • VSFilter (DirectVobSub) 2.37

Enjoy!

Skype Video (Webcam) Not Working

Sunday, April 22nd, 2007

Not long ago, a friend asked me to assist on installing webcam on his new laptop and make it work with Skype.

In a few minutes, I had the hardware and driver installed properly, made the webcam working in software that came with the webcam, but failed to see the webcam listed in Skype options > Video > Select webcam. I thought getting the latest version would help. It didn't.

Finally, the solution was to install DirectX. Get DirectX from Microsoft DirectX website (or alternative DirectX download site). Install it and you will see the webcam listed in Skype.

I found quite a number of people having the same problem when I was searching for solution. Hope this post would work for the people out there.

Lock Firefox Preferences

Tuesday, November 7th, 2006

It is interesting to know that Mozilla provides a mechanism for us to lock any preferences in the option menu. If you would like to play with it, follow these instructions:

  1. Go to Tools > Options...
  2. Change the setting of the preference you want to lock.
    e.g. lock General > Home Page Location to "about:blank".
  3. Open "about:config" to find the key of the preference. Use the filter field to save your time from scrolling up and down.
    e.g. Type in "homepage" and you can find "browser.startup.homepage".
  4. Open a notepad and write in the following lines:
    //
    lockPref("browser.startup.homepage", "about:blank");
  5. Save it as Mozilla.txt and do byte shift with an offset of 13. Use this byte shift service. You will receive a file "mozilla.cfg", which you must save it at the location of firefox.exe.
  6. Add the following line to "C:\Program Files\Mozilla Firefox\greprefs\all.js" file:
    pref("general.config.filename", "mozilla.cfg");

You will find your homepage field in options uneditable after that.

Reference:
Locking Mozilla Firefox Settings