Archive for the ‘how to’ tag
How to add Facebook’s Open Graph social plugins to your site
I just finished my initial integration with Facebook’s Open Graph Social plugins for both this blog based on wordpress and my photo blog which is based on PixelPost.
Facebook’s documentation is definitely in it’s early stages because it’s very sparse in some areas, and lacks good cross-links to make the content easy to dig through. Most of their documentation doesn’t even include a link to their Application center which is required to even get some of the social plugins to work since they require you to have an AppID.
Here’s a quick guide on what I did to get this running for the Like and Comments plugins for my photo blog. For wordpress, it was far easier since there are plugins for it. I ended up using the FBLike plugin.
Applying ReplayGain more easily with Foobar2000 and MP3Tag
I previously wrote about applying ReplayGain to MP3 files with a combination of Foobar2000 and MP3Tag. I’ve come up with a slightly easier way to reduce some of the manual steps.
I found out that both Foobar2000 and MP3Tag both supports some limited command line operations, and with a tiny bit of legwork, you can add a right-click (context menu) way of making this process easier.
With this approach, you can now right-click songs, select a context menu option and Foobar2000 will automatically apply ReplayGain at the track-level then MP3Tag will automatically open up and add the songs ready for you to apply the custom Action we previously created.
First, make sure you have Foobar2000 and MP3Tag installed.
Second, copy the following script and put it in a batch file and save it somewhere you can remember. I put mine in E:\Documents\ReplayGainScripts\ReplayGain.bat. I’m on an x64 system, so notice the environment variables highlighted in red which will need to be changed to %PROGRAMFILES% if you are on x86 (32-bit).
Deleting song in iTunes Library from within a Playlist
I’m always playing songs in iTunes through a playlist (vs. navigating through the Library), so when I come across a song that I want to delete, I have always used a 2 step process since through the iTunes UI you can’t delete it from the playlist and the library at the same time. I resorted to:
- Look at the song title
- Type the song title into search box
- In the search results, right click and delete the song
This was such a pain in the butt that I always wished there was an easier way to do this straight from the playlist. Turns out there is!
I found this list of Windows shortcuts on Apple’s site which shows that Shift+Delete is the answer I’ve been looking for:
Shift-Delete
Delete the selected song from your library and all playlists
So when you’re in an iTunes playlist and want to remove the song from the playlist only, use Delete. If you want to remove it from both the playlist AND your iTunes Library, use Shift+Delete !
(There is also another undocumented shortcut – CTRL + SHIFT + Delete which will do the same thing as Shift+Delete except it will add an extra confirmation for sending the file to the recycle bin. Since you already get one prompt using Shift+Delete, there’s no reason for this extra step)
Easy macro photography
For those that want to try out macro photography but don’t have a dedicated lens, here’s a great tip to enable you to try it out with lens you probably already own:
Having tack sharp photos is even more important in macro photography because it’s much more obvious when something is in focus. This means that both the subject and the camera have to remain completely still. So if the trick shown in the video is something you want to pursue more seriously, but still want to save coin on buying a dedicated macro lens, you should really invest in the “reverse adapter” that is mentioned in the video.
Here’s a link to B&H Photo where you can find the perfect reverse adapter for your needs:
Strange characters after WordPress upgrade
After I upgraded my last wordpress installation on my blog and on Green Is Sexy, strange characters were appearing in our content throughout the site. There seemed to have been encoding problems with apostrophes (‘), quotation marks (“) and hyphens (-). They’d be displayed as question marks or ’.
Turns out that the fix is really simple. By default, the WordPress config files now set your character encoding to UTF-8. The solution is to open up wp-config.php file and located these lines:
define(’DB_CHARSET’, ‘utf8′);
define(’DB_COLLATE’, ”);
and either remove the “utf8″ string so the first line becomes:
define(’DB_CHARSET’,'');
define(’DB_COLLATE’, ”);
or you can just comment the lines out completely by prefixing each line with “//”:
//define(’DB_CHARSET’, ‘utf8′);
//define(’DB_COLLATE’, ”);
Problem solved!


