Firefox/Thunderbird/Songbird: Update extension so it supports the latest version of the program

Old extensions are abandoned by the author and tend to break on newer versions of the application. Other times, the extension is simple enough to work no matter what version you're running.

To manually modify the extension to work with the latest version, simply:

  • Rename the extension file to a zip file.
  • Extract the "install.rdf" file.
  • Edit the "maxVersion" tag to match what you have (or more).
  • Replace the old "install.rdf" file in the zip with your edited version.
  • Rename it back to an xpi file.
  • Install !

Either that or remove the version check. You may also want to remove the extension install delay.

Songbird: Completed syncing device with error(s)

This error message was stupid to say least. There was nothing to search for online to help me with my problem, no error log to click on (aside from the Songbird error console which contains piles of cryptic trash) and no bloody idea which files failed!

image
Arrrr! Wut riddles are ye boggling me mind with sea wench!

At first I never really noticed the problem. I was just wondering why my MP3 player never chose certain songs that I knew for certain was on the Songbird playlist.

After taking a quick look at the number of songs on the MP3 player, I noticed it didn't match up with the number of songs on the local playlist. There were 17 songs that refused to sync.

Finding the missing songs

If you have a handful of songs, it'd be easy enough to compare manually. Otherwise, you'll need to install "Playlist Export Tool". (Why this feature isn't built into Songbird I do not know)

If your version of Songbird is more than 1.5.0a, then you'll also need to modify the extension so it installs on your version of Songbird.

Now to export the playlists somewhere. Go to "File" > "Export playlists". You'll now see this dialog. Click on "Preferences" and change the format to M3U (for easier comparison).

image

If you're auto-syncing a playlist, then you'll have to do them seperately as Songbird will write them to the same filename. Not too smart on the extension's behalf as it seems to ignore the output filename you set.

  • First export the local playlist somewhere.
  • Rename it.
  • Then export the media player playlist.
  • Rename it.

Now you're ready to view the differences using a file diff viewer. Personally I like to use WinMerge.

image
The dark areas make it easy to spot the missing songs.

The cause and effect

I'm not quite sure what caused this, but it may be due to the big jump from v1.4 to v1.7.1.

I took a look at all of the missing songs and there was one thing in common that I noticed. Each song had bits missing from the ID3 tags.

My theory: As Songbird doesn't actually modify the tag within the file, there must be some stuff missing from its own meta information database, causing the sync to fail.

Fixing the Problem

So, using the quick search in the top right corner, find the file in your local playlist.

image

  • Right click the song to fix.
  • Click "View metadata".
  • I usually take this chance to fix the casing on some of the tags.
  • You actually have to change something.
  • Click OK to save.

If you have nothing to change:

  • Delete something in the tag information.
  • Click "OK".
  • Right click and "View Metadata" again.
  • Then fix the information that you removed.
  • Click "OK" to save.

image 
Places to click are shown in red.

Now go back to your media player (top left) and try to sync it again by clicking "Sync".

image

Once it's finishing doing its thing, you should now be greeted with a different message.

image
Success!

Now with this victory in hand... we shall simply walk into Mordor!

Mordor

Javascript: Get function arguments dynamically

Sometimes its handy (during debugging) to see what arguments are being passed to the function.

Within the local scope of the function, the special variable "arguments" will contain the information you need.

Use "arguments.length" to determine how many there are.

[ Source ]

Windows: Remove "Scan with Microsoft Security Essentials..." from right click menus

Normally, Microsoft programs are... ok. Most programs that add an annoying little menu also provide an option to remove it.
Unfortunately, I've found no option to remove the stupid "Scan with Microsoft Security Essentials" menu item. So, onwards with cutting it out manually!
image
The GUID responsible for this is "{0365FE2C-F183-4091-AC82-BFC39FB75C49}". Remove all instances of it.
Luckily, I've created an easy command you can use.
Open up a command prompt with administrator access and paste:
cmd /c reg DELETE HKCR\Directory\shellex\ContextMenuHandlers\MSSE /f && reg DELETE HKCR\*\shellex\ContextMenuHandlers\MSSE /f && reg DELETE HKCR\Drive\shellex\ContextMenuHandlers\MSSE /f
Viola! It should apply immediately without having to restart.
*update 08/02/2011*
It seems that Microsoft has changed the way that its saved in the registry.
image
As of the v2.0.657.0 update, the previous command will no longer work.
The new GUID is:
{09A47860-11B0-4DA5-AFA5-26D86198A780}
And the new command to remove them are:
cmd /c reg DELETE HKCR\*\shellex\ContextMenuHandlers\EPP /f && reg DELETE HKCR\Directory\shellex\ContextMenuHandlers\EPP /f && reg DELETE HKCR\Drive\shellex\ContextMenuHandlers\EPP /f
Just as before, there is no need to reboot after running it.

Nokia S40: Slow camera loading times

I haven't had a chance to clear out the memory card on my Nokia 6300 for about a year now. Mainly due to the fact I take so many random pictures that its really clogged up with over 485 photos.

Because of that, the camera would take about 15 seconds to load. Each time I start the camera, after the camera has taken a picture and after every time I change a setting on the camera. It starts to get really annoying!

The reason for this is because the camera software is stupid. Instead of saving the ID of the last photo and incrementing it when it needs to save, the S40 software decides to scan every frikken picture in your memory card until it finds an empty slot... every time the camera is activated.

One way to get around this is to use a faster memory card, but even that has its limitations.

My method is simple. By default, your pictures are stored in "MemoryCard\Images". Using the phone gallery (or your PC):

  • Rename the "Images" folder to something else (like "Images1")
  • Create a new folder called "Images"

Thats all you have to do! Your camera should load a heap quicker now! No need for a new memory card, deleting of any stuff or a defrag of any sort.

no_tolls
By the end of this, your phone should be this fast!

git: How to remove a submodule

You'll need to do 3 things in order to remove the submodule.

In your current working path:

  • Remove any entries for your submodule in ".gitmodules"
  • Remove any entries for your submodule in ".git/config"

Thats the easy bit. Lastly, you'll need to type:

git rm --cached submodule_name

Wish there was an easier way...

[ Source ]

phpMyAdmin: Change cookie expiration time

I find that the phpMyAdmin cookie expires a bit too quickly for my liking.

To change it, edit your "config.inc.php" file and add this at the end.

$cfg['LoginCookieValidity'] = 7200;

The default is 1800 (30mins), so this will set it to 2hrs.

Lotus Notes: Open inbox on startup

I'm a bit confused as what Lotus Notes is supposed to be.

At first I thought it was an email client. Then it was supposed to  be a scheduling/calendar system with mail functionality built into it.

To set your inbox to show up at startup, you'll have to create a "bookmark" for it and then set it as "home page".

So now its starting to sound like a browser (and yes, it comes with its own browsing capabilities that nobody gives a rats ass about).

So how do you set it up?

  • Click on the "Open" menu.
    image
  • Right-click on "Mail"
  • Select "Set Bookmark as Home Page"
  • Click "Yes" to confirm.

Proceed to beat your slack IT manager until he gets off his fat hairy arse and sets up a proper email client for your company.

image 
Nobody likes using Lotus Notes, not even monkeys!

Oh by the way this was for Lotus Notes 8.5.

Related posts

Windows: Remove ATI Catalyst Control Center from Desktop Right Click Menu

I hate having excessive stuff on my computer. Worst yet, I hate it even more if there is no option to remove it.
ATI's Catalyst(TM) Control Center drivers come with an annoying little menu item that hooks itself into your desktop context menu.
image
To get rid of that shit, open up the Command Prompt as Administrator then paste in the following command:
reg DELETE HKCR\Directory\Background\shellex\ContextMenuHandlers\ACE /f Voila! It'll work straight away with no need for rebooting.
dog-bites-cat
Victory never tasted so good.
[ Source ]

WordPress: Prevent access to /wp-admin/

This little handler will also prevent access to profile and dashboard unless you are an admin.

It is handy if you're not using WordPress to handle your users.

function prevent_admin_access() {
if (strpos(strtolower($_SERVER['REQUEST_URI']), '/wp-admin') !== false && !current_user_can('administrator')) {
wp_redirect(get_option('siteurl'));
}
}

add_action('init', 'prevent_admin_access', 0);

Great little snippet. Just paste it into your themes functions.php file and away you go!

[ Source ]

Django: Enforce multiple field uniqueness on models

Django just keeps getting better and better.

I thought there would be hell to pay with admin form save overriding but it was surprisingly easy.

In the model you wish to enforce uniqueness, simply add a Meta class declaration and give it the property "unique_together".

class SomeModel(models.Model):
class Meta:
unique_together = (("fieldA", "fieldB"),)

fieldA = models.ForeignKey(BlahA)
fieldB = models.ForeignKey(BlahB)

description = models.TextField()

Whalla! Now it will not let you add any rows which would break the "fieldA AND fieldB" uniqueness constraint.

The change is made at a database level so if data already exists you'll have to migrate the changes somehow.

[ Source ]

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog