{S.A.Z.W.Q.A}

Installing Ubuntu 8.04 server on VirtualBox

June 11, 2008 · 4 Comments

 

If you are getting the following error on installing Ubuntu 8.04 server on VirtualBox:

The kernel requires the following features not present on the CPU 0:6

Unable to boot - please use a kernel appropriate for your CPU

Then, you need to enable the PAE support for the virtual machine.

Follow the screens:

1. Open the settings for the machine (Ctrl + S).

2. Check the Enable PAE/NX bit.

 

→ 4 CommentsCategories: appz · linux · ubuntu · virtualization

The computer did not resync because the required time change was too big

May 24, 2008 · No Comments

Microsoft Windows Vista has a built-in feature to synchronize your machine’s time automatically with global time servers around the world. The service can be scheduled to run automatically and works like charm keeping your system time up-to date, but there’s a tiny catch in here.

If your computer’s clock is async for more than 15 hours, this service will not work for you saying “An error occurred”.

Copy the following code and save it as .reg file, apply it and re-run the synchronization. It will work !

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config] “MaxNegPhaseCorrection”=dword:ffffffff “MaxPosPhaseCorrection”=dword:ffffffff

The above code is also available in pastie @ http://pastie.caboo.se/179732.

→ No CommentsCategories: appz · microsoft · windows

Winamp: Enqueue as default action

May 24, 2008 · 1 Comment

If you have winamp installed and you have allowed winamp to manage your media file associations then it’s possible to change the default behaviour from ‘play’ to ‘enqueue’, i.e when you double click the file it should enqueue the media file as last item on current playlist rather than playing it.

This feature comes in handy when you have a really large mp3 collection (like I posses ! :)) and you find-and-listen songs on runtime. At those peak moments (when your ears are craving for some quality music) right clicking on each file and selecting ‘Enqueue in Winamp’ can be a bit annoying.

How to enable this option:

1. Open Winamp.

2. Press Ctrl + P (to show preferences.)

3. Browse inside General Preferences > File Types

4. Select the option on right that says: “Enqueue files on double click in Windows Explorer (default is unchecked)”

5. Restart Winamp.

6. Try opening some media files and it should enqueue them by defualt.

7. Hoorrray !!!

7.1 An instant update:

I followed my own foot-steps and alas ! I failed to get this working. :(

Well don’t know the exact reason for this (my be because of vista or may be a bug in winamp 5.3) but I found a way out to get it working. Here it is:

7.2 (Yes, we are still on the same line ;)) Open Registry Editor.

7.3 Browse to HKCR > Winamp.File > shell

7.4 Change the default value in key from ‘Play’ to ‘Enqueue’

7.5 Hooray finally !

 

Extra’s: If you want to do the same for playlists, do the same for Winamp.Playlist key.

→ 1 CommentCategories: appz · winamp

Finding CentOS version

April 9, 2008 · 1 Comment

To find which CentOS version is running, type the following on console:

cat /etc/issue

→ 1 CommentCategories: centos · linux

Winamp: Auto tag feature

March 9, 2008 · 6 Comments

I wanted to blog about this feature from so long (as it got released with Winamp 5.5 a long way back), but I couldn’t find enough time to do this.This weekend however, I had decided to use this feature heavily to tag almost all of my mp3s and hence I decided to blog about it too.

So what I’m talking about ? Auto-tagging in Winamp 5.5

It’s a new feature introduced in Winamp 5.5 that tags your mp3 files using the Gracenote’s CDDB server. It doesn’t relies on any kind of meta-data present in file, neither it does uses the file name for this purpose. I suspect it sends some kind og hash (that I’ll have to hack around …).But what stands out is that Winamp was even able to tag a file name “dsfdsferfermvmev.mp3″ correctly.

Using this feature you can tag and categorize unused songs in your mp3 archieve.

How to find this feature in Winamp:

There are two ways to use this feature:

1. Double click on the scrolling title(or press Alt-3) to open file info dialog, in bottom right you’ll see Auto-tag button (for tagging a single file).

capture_1

2. Create a playlist and select files and then right click on them, select send-to and select Auto-tag (for tagging multiple files in one go).

capture_2

A word of caution:

Nothing is perfect ! so is this. Please keep an eye on the results of the auto-tagging, if you suspect anything wrong don’t apply the tag at all.

Renaming files based on their tags

Now what to do when your files have been tagged, but still their names are like r3rff34f.mp3, well you can use any software available in the market that can rename files based on their tag information or you can use the following ruby-script to rename them.

Click here

→ 6 CommentsCategories: appz · ruby · tagging · winamp

Defining customized Date / Time format in Rails

February 18, 2008 · No Comments

Generally to display customized Date / Time in rails we use helper method like:

# formats the date
def show_date(date)
  date.strftime("%B %d, %Y")
end

But there is another better way to do this, injecting customized rules in respective DATE_FORMATS hash of ActiveSupport::CoreExtensions module.

# define this in your environment.rb  # Default date/time format
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(:standard => "%B %d, %Y")
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(:standard => "%B %d, %Y")

Using it is simple:

Date.today.to_s(:standard) Time.now.to_s(:standard)

→ No CommentsCategories: ActiveSupport · Rails
Tagged:

Maths: New language of love

January 11, 2008 · 1 Comment

When it comes to love people find numerous ways to express it, but can maths helps ?  surely it can !

Check out Suss !

What’s suss ? it’s an alzebric surface represented by equation: (x2+9/4y2+z2-1)3 - x2z3-9/80y2z3=0

and what it represents ? Heart !

Don’t believe me, check out this page: http://www1-c703.uibk.ac.at/mathematik/project/bildergalerie/gallery.html

simply amazing !

→ 1 CommentCategories: love · maths
Tagged: ,

mongrel, RMagick breaks with rubygems 0.9.5 on windows

December 21, 2007 · No Comments

To upgrade to rails 2.0.2 one must upgrade to rubygems 0.95 but instead of fixing something up it breaks a lot of existing stuff like mongrel and RMagick etc.

To fix your broken gems:

  1. Download rubygems 0.94
  2. Extract them to C:\ruby\lib\ruby\gems\1.8\gems
  3. Run setup.rb

This will fix your broken gems.

→ No CommentsCategories: Rails · rubygems

Nautilus Scripts

November 11, 2007 · No Comments

Nautilus is the default file manager for ubuntu yet it lacks some basic features like getting a terminal at the current directory, getting root at the current directory, etc…

Nautilus Scripts to the rescue, just install the scripts and you get a bunch of utilities on your right click on your favourite file manager.

Get it here

Installing  Nautilus Scripts

1. Download the package.

2. Extract the files to /home/<user>/.gnome2/nautilus-scripts

(Do note that .gnome2 is a hidden folder, to view it you have to press Ctrl+H)

3. Close all running instances of Nautilus and open it again.

4. Right click anywhere in Nautilus and you will see a new option ‘Script’.

→ No CommentsCategories: linux · ubuntu
Tagged: , , ,

Caret browsing in Firefox

September 16, 2007 · 2 Comments

Well I really don’t know If this is really a good topic for a post, but I feel it’s really worth so here it is.

How many times we have wanted that we could use our keyboard to select some text from a webpage instead of mouse. Wouldn’t it be better if you could select some text using up-down and shift and could copy the selected part using just Ctrl+C and paste it using Ctrl+V ?

Well I really needed something like this but since it wasn’t too important to talk about so kept it like a lurking desire.

Enter the Caret Browsing feature (particularly in FF, since I am not using IE now), just press F7 and it prompt you that F7 toggles Caret Browsing, click Yes and here you go.

Just click your mouse pointer once inside your webpage and you could do whatever we discussed above.

Try it !

→ 2 CommentsCategories: appz · firefox