Well I purchased a new home for myself @ sazwqa.com
& the garage belongs to blog now, access here – sazwqa.com/blog
Consider this as the last post from here… See you there
Well I purchased a new home for myself @ sazwqa.com
& the garage belongs to blog now, access here – sazwqa.com/blog
Consider this as the last post from here… See you there
→ Leave a CommentCategories: blog · sazwqa.com
Tagged: blog, sazwqa.com
Simple to find, yet its needed sometimes. Posting just for reference: Open python and do type the following:
import django django.VERSION
→ 5 CommentsCategories: django · python
While working with a multiple-database application I came across the point where I had to juggle between different environment configurations.
I had to pass connection hash to ActiveRecord::Base.establish_connection, something like this:
ActiveRecord::Base.establish_connection ( :adapter=>"mysql", :host=>"localhost", :username=>"myuser", :password=>"mypass", :database => "somedatabase" )
This connection can be easily retrieved from ActiveRecord::Base.configurations, this is currently undocumented.
Using ActiveRecord::Base.configurations, the above can be simply written as:
ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['production'])
→ 1 CommentCategories: Rails · activerecord · multiple-models · rails-environments · rubyonrails
Tagged: activerecord, rails rubyonrails multiple-models rails-environments
I hope this is a trivial problem and googling it around gave me no trivial solution
Faced by many web-developers around the world, this context switching issue is definitely a time-sucker ! You lose the session, the cookies, the password, the settings, the plugins and a lot more than that, the time.
Coming to solution, I use portable firefox personally (if you don’t know what this, check out ProtableApps).
To run parallel firefox versions you just need to make a few changes in the configuration.
1. Goto folder \Other\Source and copy FirefoxPortable.ini to your firefox portable root, where the FireFoxPortable.exe is located.
2. Open the file in editor and change the following line:
AllowMultipleInstances=true
(Basically we are allowing multiple instances of FireFox)
PS1: If you have installed both version of firefox as portable you need to make changes in both the installations. (Simply copy the same FirefoxPortable.ini to other folder.)
→ 3 CommentsCategories: appz · browser · firefox · windows
Tagged: appz, browser, firefox, windows
For a week I was facing problem while associating files to open with
some application. Though I was able to locate the application, yet it
didn’t showed up on the open with dialog, like this:
(Here, I browsed for the application. yet it is not appearing here.)
I stumbled across this solution:
http://windowsxp.mvps.org/openwithadd.htm
This nifty utility allows you to add programs to the default programs list thereby allowing you to associate your files with the application of your choice.
→ Leave a CommentCategories: appz · microsoft · windows
Tagged: appz, microsoft, windows
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.
→ 17 CommentsCategories: appz · linux · ubuntu · virtualization
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.
→ 5 CommentsCategories: appz · microsoft · windows
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
To find which CentOS version is running, type the following on console:
cat /etc/issue
→ 1 CommentCategories: centos · linux
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).
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).
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
→ 20 CommentsCategories: appz · ruby · tagging · winamp