<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog - PonticStar.com</title>
	<atom:link href="http://www.ponticstar.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ponticstar.com/blog</link>
	<description>Blog about various aspects of programming and web design</description>
	<lastBuildDate>Wed, 10 Mar 2010 12:03:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Free music for your multimedia project</title>
		<link>http://www.ponticstar.com/blog/2010/02/22/free-music-for-your-project/</link>
		<comments>http://www.ponticstar.com/blog/2010/02/22/free-music-for-your-project/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 20:20:34 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=123</guid>
		<description><![CDATA[On Valentine&#8217;s day David Orr launched the Dev Center that offers free audio samples for developers on a tight budget.

Any project will qualify (even commercial ones!)
You can use any of the music available in the Dev Center.
There is no limit to how many pieces you want to use!
No subscription fee is required &#8211; you just [...]]]></description>
			<content:encoded><![CDATA[<p>On Valentine&#8217;s day <a class="target-blank" href="http://www.davidorr.net/">David Orr</a> launched <a class="target-blank" href="http://www.davidorr.net/Blog/?page_id=563">the Dev Center</a> that offers free audio samples for developers on a tight budget.</p>
<ul>
<li>Any project will qualify (even commercial ones!)</li>
<li>You can use any of the music available in the Dev Center.</li>
<li>There is no limit to how many pieces you want to use!</li>
<li>No subscription fee is required &#8211; you just need to register (for free)</li>
</ul>
<p>The only requirement is that you must insert the Dev Center splash screen at the start of your game.</p>
<p><span id="more-123"></span><br />
Below is my favorite piece of David&#8217;s work:</p>
<p>David wrote music for games like <a class="target-blank" href="http://www.candystand.com/play/copy-cat-a-painters-puzzle">Copy Cat: A Painter&#8217;s Puzzle</a> and <a class="target-blank" href="https://armorgames.com/play/4264/colony">Colony</a>. In these games the music alone can keep you playing for hours. Great work, David!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2010/02/22/free-music-for-your-project/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://www.davidorr.net/Mp3/Nocturne%20Csharp%20Minor.mp3" length="4033016" type="audio/mpeg" />
		</item>
		<item>
		<title>Best place to buy a computer online</title>
		<link>http://www.ponticstar.com/blog/2010/01/11/best-place-to-buy-a-computer-online/</link>
		<comments>http://www.ponticstar.com/blog/2010/01/11/best-place-to-buy-a-computer-online/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 12:00:59 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=116</guid>
		<description><![CDATA[It was a long time since I built my computer so I chose to go with professional PC builder to avoid messing things up. Most importantly I wanted to build a custom desktop computer according to my specification. Other things that matter the most to me were:

<ul>
	<li>Ability to customize every aspect of the configuration</li>
	<li>Professionalism and reliability of the builder that will treat the computer as their own</li>
	<li>Warranty</li>
</ul>

After doing a research online for I found <a href="http://www.avadirect.com/">AVADirect</a> (<a href="http://www.avadirect.com/">www.avadirect.com</a>).]]></description>
			<content:encoded><![CDATA[<p>My laptop screen started showing signs of age several months ago, a replacement would cost me around $200. It did not make sense to invest $200 in 5-year old computer, so I decided to get a new one. </p>
<p>It was a long time since I built my computer so I chose to go with professional PC builder to avoid messing things up. Most importantly I wanted to build a custom desktop computer according to my specification. Other things that matter the most to me were:</p>
<ul>
<li>Ability to customize every aspect of the configuration</li>
<li>Professionalism and reliability of the builder that will treat the computer as their own</li>
<li>Warranty</li>
</ul>
<p>After doing a research online for I found <a href="http://www.avadirect.com/">AVADirect</a> (<a href="http://www.avadirect.com/">www.avadirect.com</a>). This is a quote from their web site:</p>
<blockquote><p>AVADirect Custom Computers is a custom computer manufacturing company located on the outskirts of Cleveland, Ohio. Our company specializes in building all kinds of custom computer systems including: Windows or Linux manageable and highly-reliable servers, high-end workstations and gaming systems, business PCs, and notebooks.</p></blockquote>
<p>Their web site amazed me. First of all, clear navigation that easily gets you through the building and ordering process. Secondly, there is so called &#8220;<a href="http://www.avadirect.com/forum/forum_topics.asp?FID=55" class="target-blank">Featured Systems Gallery</a>&#8221; where they showcase most common configurations that you can review. They have easy to use online tool that offers extensive choice of components. Did I mention 3 Year limited warranty on parts, 3 year warranty on labor and lifetime toll-free technical support?</p>
<h3>Prices</h3>
<p>It would cost you more (10% in my case) to order a computer from AVADirect in comparison to prices for individual components on NewEgg.com. But you will get excellent service and 3 year warranty in return. I think it worth every penny.</p>
<h3>Ordering</h3>
<p>If you are not sure what you want, you would better call them by phone <strong>1-866-766-4629</strong> or <a href="http://www.avadirect.com/contact_online.asp" class="target-blank">send them an e-mail</a> to help you with exact configuration. Otherwise you can proceed to ordering page using navigation menu. For example:</p>
<ul>
<li> Desktop Computers
<ul>
<li>Custom Desktop Computers
<ul>
<li>Socket 1366 Core i7 Desktop PC
<ul>
<li>Core™ i7 2-way CrossFire™ 24GB Performance Series System</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>There you can customize anything (Figure 1) starting from computer case and including operating system, software, games and warranty.<br />
<div id="attachment_117" class="wp-caption aligncenter" style="width: 550px"><a href="http://www.ponticstar.com/blog/wp-content/uploads/2010/01/avadirect_fig1.gif"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2010/01/avadirect_fig1.gif" alt="Figure 1. Customizing your configuration" title="Figure 1. Customizing your configuration" width="540" height="327" class="size-full wp-image-117" /></a><p class="wp-caption-text">Figure 1. Customizing your configuration</p></div></p>
<p>It is so easy to get frustrated with so many choices of components. But if you made a mistake or unsure about certain component, don&#8217;t worry. Each order will be reviewed by a professional to make sure that all components match. </p>
<p>If you are uncertain about some components, I would recommend to get an account, build your computer using their online configurator, add it to cart and then instead of checking out send yourself a quote (Figure 2).</p>
<div id="attachment_119" class="wp-caption aligncenter" style="width: 311px"><a href="http://www.ponticstar.com/blog/wp-content/uploads/2010/01/avadirect_fig2.gif"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2010/01/avadirect_fig2.gif" alt="Figure 2. Getting a quote number" title="Figure 2. Getting a quote number" width="301" height="77" class="size-full wp-image-119" /></a><p class="wp-caption-text">Figure 2. Getting a quote number</p></div>
<p>After you send a quote, you will receive a quote number in the details of your quote. You can reference this number either by phone or via e-mail to avoid explaining your configuration from the scratch. In my case I was recommended to use power supply with higher output and other things that I didn&#8217;t consider as important at first.</p>
<p>Being cautious about using my credit card online I also asked whether they support PayPal. Sure, they do that as well.</p>
<h3>When unexpected happens</h3>
<p>It was a surprise for me when a few days later I got a call from AVADirect. Due to high demand graphics card that I wanted was not available so they offered me to upgrade to the same card of different manufacturer <em>for free</em> even though it was priced $30 higher. Same thing happened with motherboard, it was out of stock so I got another upgrade to more expensive motherboard <em>for free</em> which cost them another $50.</p>
<p>It took AVADirect 10 business days to assemble and test the computer. According to their policy <quote>every assembled computer system needs to be tested under stress loads to make sure that there are no defects in system components and they all can work together in this particular system setup for a long period of time</quote>.</p>
<p>You can track your order status online by logging into your account (Figure 3).<br />
<div id="attachment_120" class="wp-caption aligncenter" style="width: 550px"><a href="http://www.ponticstar.com/blog/wp-content/uploads/2010/01/avadirect_fig3.gif"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2010/01/avadirect_fig3.gif" alt="Figure 3. Order status" title="Figure 3. Order status" width="540" height="99" class="size-full wp-image-120" /></a><p class="wp-caption-text">Figure 3. Order status</p></div></p>
<h3>Unboxing</h3>
<p>Since being placed, my order was delivered in 11 business days. It has arrived in a huge box filled to the top with packing peanuts. Inside there were computer case box and box for motherboard filled with all the supporting documents, drivers, manuals, etc. </p>
<p>The first thing I did is opened the case. The way cables were organized inside shows high level of professionalism and care (Figure 4). </p>
<div id="attachment_121" class="wp-caption aligncenter" style="width: 264px"><a href="http://www.ponticstar.com/blog/wp-content/uploads/2010/01/avadirect_cables.jpg"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2010/01/avadirect_cables-254x300.jpg" alt="Figure 4. Cable management" title="Figure 4. Cable management" width="254" height="300" class="size-medium wp-image-121" /></a><p class="wp-caption-text">Figure 4. Cable management</p></div>
<h3>Conclusion</h3>
<p>Overall I would recommend AVADirect to anyone who wants to buy a computer online. Their professionalism, prices and warranty are hard to beat. Although you are expected to have some knowledge about computers and their components, you can always contact AVADirect with any questions or recommendations. I am pretty sure they will patiently answer all of your questions and help you out building computer of your dream within your budget.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2010/01/11/best-place-to-buy-a-computer-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking the Yahoo! Media Player</title>
		<link>http://www.ponticstar.com/blog/2009/12/12/hacking-yahoo-media-player/</link>
		<comments>http://www.ponticstar.com/blog/2009/12/12/hacking-yahoo-media-player/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 06:00:00 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=109</guid>
		<description><![CDATA[The Yahoo! Media Player enhances your web site or blog by creating an embedded player for each audio link. All the links can be played with one click, turning the page into a playlist. This is done by adding just one line of code to your page. This article explains how to customize Yahoo! Media Player to match your web site design.]]></description>
			<content:encoded><![CDATA[<ul class="toc">
<li><a href="#about">About the player</a></li>
<li><a href="#usage">How to use</a></li>
<li>Appearance
<ul>
<li><a href="#skin">How to change a skin</a></li>
<li><a href="#bgcolor">How to adjust background color</a></li>
<li><a href="#color">How to adjust text color</a></li>
<li><a href="#relevant-info-update">How to update block with relevant information</a></li>
<li><a href="#relevant-info-hide">How to remove block with relevant information</a></li>
<li><a href="#buttons-hide">How to hide various buttons</a></li>
<li><a href="#playlist-color">How to change playlist colors</a></li>
<li><a href="#album-art">How to display album art</a></li>
<li><a href="#album-art-default">How to change default album art image</a></li>
<li><a href="#album-art-hide">How to hide album art</a></li>
</ul>
</li>
<li>Functionality
<ul>
<li><a href="#pop">How to start player in a new window</a></li>
<li><a href="#title-search-disable">How to disable Yahoo! search links</a></li>
<li><a href="#settings">How to change default settings</a></li>
<li><a href="#hide-player">How to hide the player</a></li>
<li><a href="#hide-links">How to hide MP3 links</a></li>
</ul>
<li><a href="#links">Links</a></li>
</ul>
<p><a name="about"></a></p>
<h3>About the player</h3>
<p>The Yahoo! Media Player enhances your web site or blog by creating an embedded player for each audio link. All the links can be played with one click, turning the page into a playlist. This is done by adding just one line of code to your page.</p>
<p><a name="usage"></a></p>
<h3>How to use</h3>
<p>Please visit the Yahoo! Media Player web site (<a class="target-blank" href="http://mediaplayer.yahoo.com/">http://mediaplayer.yahoo.com/</a>) for more information.</p>
<p><a name="skin"></a></p>
<h3>How to change a skin</h3>
<p>If you want to dramatically change appearance of the player you would need to modify its skin. Default skin image can be download from <a class="target-blank" href="http://l.yimg.com/us.yimg.com/i/us/mus/ymwp/mediaplayer-2.0.31.png">Yahoo! server</a> (<a href="http://www.ponticstar.com/projects/hacking-yahoo-media-player/mediaplayer-2.0.31.png">alternative location</a>). </p>
<p>Once you have downloaded the image use your favorite image editing program to customize it. In order to apply the skin you would have to use the code below.</p>
<p>Instructions: Update path to your image file. Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Change default skin */
.ymp-skin {
   background-image:url(/path/to/your/mediaplayer-skin.png) !important;
}
</pre>
<p><a href="/projects/hacking-yahoo-media-player/skin.html">View example</a></p>
<p><a name="bgcolor"></a></p>
<h3>How to adjust background color</h3>
<div id="attachment_110" class="wp-caption aligncenter" style="width: 540px"><a href="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig01.gif"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig01.gif" alt="Figure 1: Background color" title="Yahoo! Media Player" width="530" height="93" class="size-full wp-image-110" /></a><p class="wp-caption-text">Figure 1: Background color</p></div>
<p>Instructions: Update color values. Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Set background color */
#ymp-player .ymp-color-main,
#ymp-tray .ymp-color-tray {
  background-color:#2F437C !important;
}
</pre>
<p><a href="/projects/hacking-yahoo-media-player/bgcolor.html">View example</a></p>
<p><a name="color"></a></p>
<h3>How to adjust text color</h3>
<p>Instructions: Update color values. Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Set text color */
#ymp-player .ymp-color-text-main {
  color:#000000 !important;
}
</pre>
<p><a name="relevant-info-update"></a></p>
<h3>How to update block with relevant information</h3>
<p>You may want to display your own message in the relevant information block instead of the default &#8220;learn more about this player&#8221; link. To do so you will need link to your media like this:</p>
<pre class="brush:html; toolbar:false">
<a href="music.mp3">a song <span class="relevant-info">relevant info for this song</a></a>
</pre>
<p>Instructions: Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: */
/* Modify contents of the block with relevant information */
#ymp-relevant-info {
  display:block;
  position:absolute;
  left:2px;
  top:10px;
  width:116px;
  font-size:12px;
  font-weight:bold;
  line-height:13px;
  text-align:center;
  z-index:2;
} 

#ymp-relevant-info a {
  color:#3D9AD0;
}

.relevant-info {
  display:none;
}
</pre>
<p>Instructions: Insert the code below <i>right after</i> the line that embeds the player into your page.</p>
<pre class="brush:javascript">
&lt;script type="text/javascript"&gt;
   var apiReadyHandler = function (){
      // Once API ready handler is invoked,
      // YAHOO.MediaPlayer class can be accessed safely
      // For example: Add other event listeners
      YAHOO.ympyui.util.Event.onDOMReady(UpdateRelevantInfo);
      YAHOO.MediaPlayer.onTrackStart.subscribe(UpdateRelevantInfo);
   };

   var UpdateRelevantInfo = function() {
      // Default text
      var info = '<a href="http://www.ponticstar.com">Visit ponticstar.com for more information</a>';

      // Retrieve information about the track
      var meta = YAHOO.MediaPlayer.getMetaData();

      // If element with class "relevant-info" is available
      // inside the anchor, use its content instead
      if(meta &#038;&#038; meta.anchor){
         var a = meta.anchor.getElementsByClassName("relevant-info");
         if(a.length > 0){ info = a[0].innerHTML; }
      }

      document.getElementById('ymp-relevance').innerHTML =
         '&lt;div id="ymp-relevant-info"&gt;' + info + '&lt;/div&gt;';
   };

   YAHOO.MediaPlayer.onAPIReady.subscribe(apiReadyHandler);
&lt;/script&gt;
</pre>
<p><a href="/projects/hacking-yahoo-media-player/relevant-info-update.html">View example</a></p>
<p><a name="relevant-info-hide"></a></p>
<h3>How to remove block with relevant information</h3>
<div id="attachment_111" class="wp-caption aligncenter" style="width: 540px"><a href="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig02.gif"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig02.gif" alt="Figure 2: Relevant information block is removed" title="Yahoo! Media Player" width="530" height="93" class="size-full wp-image-111" /></a><p class="wp-caption-text">Figure 2: Relevant information block is removed</p></div>
<p>Player displays &#8220;Learn more about this player&#8221; link along with lyrics or related videos. If you are trying to minimize size of the player, use the code below.</p>
<p>Instructions: Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: */
/* Remove block with relevant information */
#ymp-relevance { display:none !important; }
.ymp-player-max #ymp-body { width:570px !important; }
.ymp-player-max #ymp-body #ymp-body-strip { width:557px !important; }
.ymp-player-max #ymp-body #ymp-body-base  { width:560px !important; }
</pre>
<p><a href="/projects/hacking-yahoo-media-player/relevant-info-hide.html">View example</a></p>
<p><a name="buttons-hide"></a></p>
<h3>How to hide various buttons</h3>
<p>Instructions: Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Hide 'close window' button */
#ymp-btn-close { display:none !important; }

/* Hide 'pop-up window' button */
#ymp-btn-pop { display:none !important; }
</pre>
<p><a href="/projects/hacking-yahoo-media-player/buttons-hide.html">View example</a></p>
<p><a name="playlist-color"></a></p>
<h3>How to change playlist colors</h3>
<div id="attachment_112" class="wp-caption aligncenter" style="width: 540px"><a href="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig03.gif"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig03.gif" alt="Figure 3: Playlist colors" title="Yahoo! Media Player" width="530" height="277" class="size-full wp-image-112" /></a><p class="wp-caption-text">Figure 3: Playlist colors</p></div>
<p>Instructions: Update color values. Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Playlist colors */
/* Default color for playlist entries */
#ymp-tray .ymp-tray-track {
  color:#FFCE0C !important;
}

/* Highlighted track */
#ymp-tray .ymp-tray-track:hover {
  color:#FFFFFF !important;
  background-color:transparent !important;
}

/* Currently playing track */
#ymp-tray .ymp-tray-track.playing,
#ymp-tray .ymp-tray-track.playing:hover {
  color:#FFFFFF !important;
  background-color:#777777 !important;
}
</pre>
<p><a name="album-art"></a></p>
<h3>How to display album art</h3>
<div id="attachment_113" class="wp-caption aligncenter" style="width: 540px"><a href="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig04.gif"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig04.gif" alt="Figure 4: Album art" title="Yahoo! Media Player" width="530" height="93" class="size-full wp-image-113" /></a><p class="wp-caption-text">Figure 4: Album art</p></div>
<p>You can set the image which is displayed in the player during a song. To do this, put an <code>img</code> element within the playable link.</p>
<p>For example:</p>
<pre class="brush:html; toolbar:false">
&lt;a href="example.mp3"&gt;&lt;img src="example.png" alt="" /&gt;my song&lt;/a&gt;
</pre>
<p>The dimensions of the image should be square, not rectangular. If you don&#8217;t want the image to show up directly in the main web page, add <code>style="display:none"</code> to your <code>img</code> tag:</p>
<pre class="brush:html; toolbar:false">
&lt;a href="example.mp3"&gt;&lt;img src="example.png" alt="" style="display:none" /&gt;my song&lt;/a&gt;
</pre>
<p>Source: <a class="target-blank" href="http://yahoomediaplayer.wikia.com/wiki/How_to_link#Album_Art">http://yahoomediaplayer.wikia.com/wiki/How_to_link#Album_Art</a></p>
<p><a href="/projects/hacking-yahoo-media-player/album-art.html">View example</a></p>
<p><a name="album-art-default"></a></p>
<h3>How to change default album art image</h3>
<p>Insert the code below just <i>before the line</i> that embeds the player into your page.</p>
<pre class="brush:javascript">
<!-- Yahoo! Media Player configuration -->
&lt;script type="text/javascript"&gt;
var YMPParams =
{
   defaultalbumart:'http://somedomain.com/path/someimage.gif'
}
&lt;/script&gt;
</pre>
<p>Source: <a class="target-blank" href="http://mediaplayer.yahoo.com/api/#param_defaultalbumart">http://mediaplayer.yahoo.com/api/#param_defaultalbumart</a></p>
<p><a name="album-art-hide"></a></p>
<h3>How to hide album art</h3>
<div id="attachment_114" class="wp-caption aligncenter" style="width: 540px"><a href="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig05.gif"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig05.gif" alt="Figure 5: Hidden album art" title="Yahoo! Media Player" width="530" height="93" class="size-full wp-image-114" /></a><p class="wp-caption-text">Figure 5: Hidden album art</p></div>
<pre class="brush:css">
/* Yahoo! Media Player: Hide album art */
#ymp-meta-image { display:none !important; }
#ymp-body #ymp-meta-top,
#ymp-body #ymp-meta-bottom {
  left:8px !important;
  width:330px !important;
}
</pre>
<p><a href="/projects/hacking-yahoo-media-player/album-art-hide.html">View example</a></p>
<p><a name="pop"></a></p>
<h3>How to start player in a new window</h3>
<p>The code below tries to launch player in a new window automatically which allows user to navigate your site without interrupting the player. However my code for displaying pop-under window doesn&#8217;t work as expected for all browsers which results in pop-up window instead.</p>
<p>Instructions: Insert the code below right <i>after the line</i> that embeds the player into your page.</p>
<pre class="brush:javascript">
&lt;script type="text/javascript"&gt;
    var ymp_pop_num_tries = 0;
    var ymp_pop_max_num_tries = 20;
    function ympPopPlayer(){
       var ymp = YAHOO.mediaplayer;
       if(ymp_pop_num_tries > ymp_pop_max_num_tries){ return; }
       if(ymp.Controller &#038;&#038; ymp.Controller.view){
          // Create a pop-under window
          // works in IE, doesn't work in Firefox 3.5.x
          var ymp_pop = window.open("", "ymediaplayer");
          if(ymp_pop){ ymp_pop.blur(); }
          window.focus();

          ymp.Controller.view.popPlayer({});
       } else {
         ymp_pop_num_tries++;
         setTimeout(ympPopPlayer, 1000);
       }
    }

    var apiReadyHandler = function (){
       ympPopPlayer();
    };

    YAHOO.MediaPlayer.onAPIReady.subscribe(apiReadyHandler);
&lt;/script&gt;
</pre>
<p><a href="/projects/hacking-yahoo-media-player/pop.html">View example</a></p>
<p><a name="title-search-disable"></a></p>
<h3>How to disable Yahoo! search links</h3>
<p>Instructions: Insert the code below right <i>after the line</i> that embeds the player into your page.</p>
<pre class="brush:javascript">
&lt;script type="text/javascript"&gt;
   // Disable Yahoo! search links
   var apiReadyHandler = function (){
      // Once API ready handler is invoked,
      // YAHOO.MediaPlayer class can be accessed safely
      // For example: Add other event listeners
      YAHOO.MediaPlayer.onMediaUpdate.subscribe(DisableYahooLinks);
      YAHOO.MediaPlayer.onTrackStart.subscribe(DisableYahooLinks);
   };

   var DisableYahooLinks = function() {
      DisableLink(document.getElementById('ymp-meta-track-title'));
      DisableLink(document.getElementById('ymp-meta-artist-title'));
      DisableLink(document.getElementById('ymp-meta-image'));
   };

   function DisableLink(el){
      if(el){
         el.href = 'javascript:void(0)';
         el.onclick = function(){ return false; };
      }
   }

   YAHOO.MediaPlayer.onAPIReady.subscribe(apiReadyHandler);
&lt;/script&gt;
</pre>
<p><a href="/projects/hacking-yahoo-media-player/title-search-disable.html">View example</a></p>
<p><a name="settings"></a></p>
<h3>How to change default settings</h3>
<p>See <a class="target-blank" href="http://mediaplayer.yahoo.com/api">http://mediaplayer.yahoo.com/api</a> for more information.</p>
<p><a name="hide-player"></a></p>
<h3>How to hide the player</h3>
<p>Sometimes you may want to display only small play button next to MP3 links. To hide the player use the code below.</p>
<p>Instructions: Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Hide player */
#ymp-player,
#ymp-tray,
#ymp-error-bubble,
#ymp-secret-bubble {
  display:none !important;
}
</pre>
<p>There is another way to do it using parameter <code>displaystate</code> which is described at <a class="target-blank" href="http://mediaplayer.yahoo.com/api/#param_displaystate">http://mediaplayer.yahoo.com/api/#param_displaystate</a></p>
<p><a href="/projects/hacking-yahoo-media-player/hide-player.html">View example</a></p>
<p><a name="hide-links"></a></p>
<h3>How to hide MP3 links</h3>
<p>Instructions: Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Hide MP3 links */
.ymp-btn-page-play,
.ymp-btn-page-pause {
  display:none;
}
</pre>
<p><a name="links"></a></p>
<h3>Links</h3>
<ul>
<li><a class="target-blank" href="http://mediaplayer.yahoo.com/api/">Yahoo! Media Player API</a>
<li><a class="target-blank" href="http://yahoomediaplayer.wikia.com/">Yahoo! Media Player public wiki</a></li>
<li><a class="target-blank" href="http://tech.groups.yahoo.com/group/yhoomediaplayer/">Discussion group at Yahoo! Groups</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/12/12/hacking-yahoo-media-player/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Force SSL using .htaccess and mod_rewrite</title>
		<link>http://www.ponticstar.com/blog/2009/11/21/force-ssl-using-htaccess/</link>
		<comments>http://www.ponticstar.com/blog/2009/11/21/force-ssl-using-htaccess/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 23:42:46 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=107</guid>
		<description><![CDATA[Sometimes you need to force your visitors to use secure connection if they forgot to type https:// in the browser. It can be accomplished by adding the following lines to .htaccess file located in the root folder of your web site. It will force secure connection for all pages on your web site.

.htaccess
RewriteEngine On
RewriteCond %{HTTPS} [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to force your visitors to use secure connection if they forgot to type <code>https://</code> in the browser. It can be accomplished by adding the following lines to <code>.htaccess</code> file located in the root folder of your web site. It will force secure connection for all pages on your web site.</p>
<p><span id="more-107"></span>
<div class="filename">.htaccess</div>
<pre>RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}</pre>
<p>If you want to force secure connection only in certain directory (for example <code>/secure</code>), use this code instead.</p>
<div class="filename">.htaccess</div>
<pre>RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ^secure
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/11/21/force-ssl-using-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL crashes when using pgcrypto functions</title>
		<link>http://www.ponticstar.com/blog/2009/10/22/postgresql-crashes-when-using-pgcrypto/</link>
		<comments>http://www.ponticstar.com/blog/2009/10/22/postgresql-crashes-when-using-pgcrypto/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 02:44:18 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=103</guid>
		<description><![CDATA[After upgrading PostgreSQL from 7.4 to 8.2 it started crashing sporadically with the following entries in the log file:

<pre>LOG:  server process (pid 21460) was terminated by signal 11
LOG:  terminating any other active server processes
LOG:  all server processes terminated; reinitializing shared memory and semaphores</pre>]]></description>
			<content:encoded><![CDATA[<h3>PROBLEM:</h3>
<p>After upgrading PostgreSQL from 7.4 to 8.2 it started crashing sporadically with the following entries in the log file:</p>
<pre>LOG:  server process (pid 21460) was terminated by signal 11
LOG:  terminating any other active server processes
LOG:  all server processes terminated; reinitializing shared memory and semaphores</pre>
<h3>CAUSE:</h3>
<p>There were changes between PostgreSQL releases in functions definition used by pgcrypto module.</p>
<p>According to <a class="target-blank" href="http://marc.info/?l=postgresql-general&#038;m=118794006505296&#038;w=2">[1]</a> and <a class="target-blank" href="http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/pgcrypto/pgcrypto.sql.in">[3]</a> in PostgreSQL 8.0 the pgcrypto functions were non-strict and checked for <code>NULL</code>s, in PostgreSQL 8.1 they were made <code>STRICT</code>, in PostgreSQL 8.2 the <code>NULL</code> checks were removed from code.</p>
<h3>SOLUTION:</h3>
<p>In order to correct the problem these functions are needed to be recreated. Required SQL commands are defined in pgcrypto.sql which is usually located in<br />
<code>/usr/local/pgsql/share/contrib</code> when pgcrypto is installed.</p>
<pre>psql -d DBNAME -f /usr/local/pgsql/share/contrib/pgcrypto.sql</pre>
<p>Also it is a good idea to add functions to <code>template1</code> database if you use pgcrypto often. <code>template1</code> is the default source database name when using <code>CREATE DATABASE</code> command.</p>
<h3>REFERENCES:</h3>
<ol>
<li><a class="target-blank" href="http://marc.info/?l=postgresql-general&#038;m=118794006505296&#038;w=2">http://marc.info/?l=postgresql-general&#038;m=118794006505296&#038;w=2</a></li>
<li><a class="target-blank" href="http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg109917.html">http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg109917.html</a></li>
<li><a class="target-blank" href="http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/pgcrypto/pgcrypto.sql.in">http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/pgcrypto/pgcrypto.sql.in</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/10/22/postgresql-crashes-when-using-pgcrypto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install Microsoft Visual Studio 6.0 on Windows 2000/XP</title>
		<link>http://www.ponticstar.com/blog/2009/07/13/how-to-install-msvs-on-windows/</link>
		<comments>http://www.ponticstar.com/blog/2009/07/13/how-to-install-msvs-on-windows/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 15:20:40 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[Windows Programming]]></category>
		<category><![CDATA[Microsoft Visual Studio]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=93</guid>
		<description><![CDATA[If you ever tried to install Microsoft Visual Studio 6.0 or a standalone Visual Studio product on Windows 2000 or XP, you already know that setup fails. But luckily there is a workaround. At the command prompt, type the following command:
E:\SETUP\acmsetup.exe /T E:\SETUP\PRODUCT.STF /s E:\ /n "NAME" /o "ORGANIZATION" /k 1234567890
where:

E: &#8211; your CD-ROM or [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever tried to install Microsoft Visual Studio 6.0 or a standalone Visual Studio product on Windows 2000 or XP, you already know that setup fails. But luckily there is a workaround. At the command prompt, type the following command:</p>
<pre class="brush:shell;light:true">E:\SETUP\acmsetup.exe /T E:\SETUP\PRODUCT.STF /s E:\ /n "NAME" /o "ORGANIZATION" /k 1234567890</pre>
<p><span id="more-93"></span>where:</p>
<ul>
<li><code>E:</code> &#8211; your CD-ROM or DVD-ROM drive letter. Also you can replace <code>E:\</code> with path to the folder where you have your installation files.</li>
<li><code>PRODUCT</code> &#8211; File name of the product you are installing with <code>.stf</code> extension. The specific <code>.stf</code> file that is required for the manual command line will vary depending on the specific product you are installing. Search the <code>\SETUP</code> folder on the CD-ROM of the product you are installing for the <code>.stf</code> to use. For example, for Visual Basic 6.0 Professional, use <code>vb98pro.stf</code>; for Visual C++ 6.0 Professional, use <code>vc98pro.stf</code>.</li>
<li><code>NAME</code> &#8211; your name</li>
<li><code>ORGANIZATION</code> &#8211; your organization</li>
<li><code>1234567890</code> &#8211; your CD key</li>
</ul>
<p>If you get the message &#8220;You must first run the Installation Wizard before running this setup&#8221;, run the following command and repeat.</p>
<pre class="brush:shell;light:true">regedit /s E:\key.dat</pre>
<p>In the same way you should install service packs.</p>
<p>Service Pack 5:</p>
<pre class="brush:shell;light:true">C:\SP5\acmsetup.exe /T C:\SP5\sp598ent.stf /s C:\SP5 /n "NAME" /o "ORGANIZATION"</pre>
<p>Service Pack 6:</p>
<pre class="brush:shell;light:true">C:\SP6\acmsetup.exe /T C:\SP6\sp698ent.stf /s C:\SP6 /n "NAME" /o "ORGANIZATION"</pre>
<p>where:</p>
<ul>
<li><code>C:\SP5</code> and <code>C:\SP6</code> &#8211; folders where you have extracted service pack files.</li>
</ul>
<p>Microsoft published an article regarding this problem at <a class="target-blank" href="http://support.microsoft.com/kb/250343">http://support.microsoft.com/kb/250343</a>. However they suggest to use <code>/B1</code> (or <code>/B 1</code>) command line argument, which in my case resulted in product options dialog being skipped. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/07/13/how-to-install-msvs-on-windows/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ultramonkey on CentOS 4 with BlueQuartz (part 2)</title>
		<link>http://www.ponticstar.com/blog/2009/07/03/ultramonkey-on-centos4-with-bluequartz-p2/</link>
		<comments>http://www.ponticstar.com/blog/2009/07/03/ultramonkey-on-centos4-with-bluequartz-p2/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 14:06:43 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[BlueQuarz]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[UltraMonkey]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=88</guid>
		<description><![CDATA[I already wrote about additional steps required to install UltraMonkey on CentOS with BlueQuartz. Soon after that I have discovered that there is more to do if you want to get a perfect setup.
One of the steps required to configure load-balanced cluster as described here was to create an IP alias on the loopback interface. [...]]]></description>
			<content:encoded><![CDATA[<p>I already wrote about <a href="http://www.ponticstar.com/blog/2009/06/24/ultramonkey-on-centos4-with-bluequartz/" class="target-blank">additional steps required to install UltraMonkey on CentOS with BlueQuartz</a>. Soon after that I have discovered that there is more to do if you want to get a perfect setup.</p>
<p>One of the steps required to configure load-balanced cluster as described <a href="http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html" class="target-blank">here</a> was to create an IP alias on the loopback interface. It is needed so that real servers or standby director could see traffic for the virtual IP address.</p>
<p>But when creating a virtual site using BlueQuartz GUI it automatically adds an alias on primary network interface (<code>eth0</code> in our case) in addition to the alias we already created manually.</p>
<p><span id="more-88"></span><div id="attachment_89" class="wp-caption aligncenter" style="width: 550px"><a href="http://www.ponticstar.com/blog/wp-content/uploads/2009/07/ultramonkey-on-centos4-with-bluequartz-fig1.png" class="target-blank"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/07/ultramonkey-on-centos4-with-bluequartz-fig1.png" alt="Adding a new site using BlueQuartz" title="Adding a new site using BlueQuartz" width="540" height="259" class="size-full wp-image-89" /></a><p class="wp-caption-text">Adding a new site using BlueQuartz</p></div></p>
<p>Now every server would be configured to respond to packets for virtual IP address <code>192.168.6.240</code>, which could result in unpredictable behavior.</p>
<pre>standby# ip addr sh
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    <b>inet 192.168.6.240/32 brd 255.255.255.255 scope global lo</b>
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:10:e0:05:20:0d brd ff:ff:ff:ff:ff:ff
    <b>inet 192.168.6.2/24 brd 192.168.6.255 scope global eth0</b>
    inet 192.168.6.240/24 brd 192.168.6.255 scope global secondary eth0:0
</pre>
<p>If you have completed all the steps to set-up a cluster you should already have fallback interface alias defined in <code>/etc/sysconfig/network-scripts/ifcfg-lo:0</code>. We no longer need BlueQuartz to manage virtual IP address for us.</p>
<p>In order to prevent BlueQuartz from doing that the following files have to be modified:</p>
<div class="filename">/usr/sausalito/handlers/base/vsite/change_net_info.pl</div>
<pre class="brush:perl; gutter:true; first-line:60; highlight:[65]">...
# handle ip address change
if ($vsite_new->{ipaddr})
{
    # make sure that there is a network interface for the new ip
#    vsite_add_network_interface($cce, $vsite_new->{ipaddr});

    # delete the old interface, this is a no op if another site is using the old ip still
    vsite_del_network_interface($cce, $vsite_old->{ipaddr});
} # end of ip address change specific
...
</pre>
<div class="filename">/usr/sausalito/handlers/base/vsite/vsite_create.pl</div>
<pre class="brush:perl; gutter:true; first-line:91; highlight:[93]">...
# make sure there is a network interface for this ip
#vsite_add_network_interface($cce, $vsite->{ipaddr});
...
 </pre>
<p>This way when you add or modify a virtual site assigned to virtual IP address BlueQuartz won&#8217;t add its address to one of the network interfaces because we already took care of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/07/03/ultramonkey-on-centos4-with-bluequartz-p2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UltraMonkey on CentOS 4 with BlueQuartz</title>
		<link>http://www.ponticstar.com/blog/2009/06/24/ultramonkey-on-centos4-with-bluequartz/</link>
		<comments>http://www.ponticstar.com/blog/2009/06/24/ultramonkey-on-centos4-with-bluequartz/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 13:10:23 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[BlueQuarz]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[UltraMonkey]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=80</guid>
		<description><![CDATA[CONFIGURATION:
Server is configured as director to be a part of high availability and load balancing cluster as described here:
http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html
CentOS 4 with Bluequartz from Nuonce.net is used as operating system. 
PROBLEM:
As a part of configuration an alias for loopback interface had to be created so server can accept packets for the virtual service:
/etc/sysconfig/network-scripts/ifcfg-lo:0
DEVICE=lo:0
IPADDR=192.168.6.240
NETMASK=255.255.255.255
NETWORK=192.168.6.0
BROADCAST=192.168.6.255
ONBOOT=yes
NAME=loopback

When heartbeat starts on [...]]]></description>
			<content:encoded><![CDATA[<h3>CONFIGURATION:</h3>
<p>Server is configured as director to be a part of high availability and load balancing cluster as described here:<br />
<a href="http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html">http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html</a></p>
<p>CentOS 4 with Bluequartz from <a href="http://www.nuonce.net">Nuonce.net</a> is used as operating system. <span id="more-80"></span></p>
<h3>PROBLEM:</h3>
<p>As a part of configuration an alias for loopback interface had to be created so server can accept packets for the virtual service:</p>
<div class="filename">/etc/sysconfig/network-scripts/ifcfg-lo:0</div>
<pre>DEVICE=lo:0
IPADDR=192.168.6.240
NETMASK=255.255.255.255
NETWORK=192.168.6.0
BROADCAST=192.168.6.255
ONBOOT=yes
NAME=loopback
</pre>
<p>When <code>heartbeat</code> starts on director, it removes the alias on loopback interface <code>lo</code> and creates virtual IP address on interface <code>eth0</code>.</p>
<p>Here is how all interfaces look like before problem occurs:</p>
<pre>[root@server ~]# ip addr show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:19:db:df:15:12 brd ff:ff:ff:ff:ff:ff
    inet 192.168.6.1/24 brd 192.168.6.255 scope global eth0
    <b>inet 192.168.6.240/24 brd 192.168.6.255 scope global secondary eth0</b>
</pre>
<p>However after certain amount of time the alias with virtual IP appears on loopback interface again:</p>
<pre>[root@server ~]# ip addr sh
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
    <b>inet 192.168.6.240/32 brd 192.168.6.255 scope global lo:0</b>
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:19:db:df:15:12 brd ff:ff:ff:ff:ff:ff
    inet 192.168.6.1/24 brd 192.168.6.255 scope global eth0
    <b>inet 192.168.6.240/24 brd 192.168.6.255 scope global secondary eth0</b>
</pre>
<h3>NOTE:</h3>
<p>This problem only affects servers acting as load balancers / directors. Real servers running on CentOS / Bluequartz are not affected.</p>
<h3>CAUSE:</h3>
<p>It turns out this problem is caused by <code>swatch</code> which is utilized by BlueQuartz. Every 15 minutes it checks the status of all interfaces that have <code>ONBOOT=yes</code> and brings them up if they are down.</p>
<p>See <code>/usr/sausalito/swatch/bin/am_network.sh</code> for more information.</p>
<h3>SOLUTION:</h3>
<p>In order to prevent <code>swatch</code> from manipulating our virtual IP address, you have to turn off <code>ONBOOT</code> parameter since that what it looks for.</p>
<div class="filename">/etc/sysconfig/network-scripts/ifcfg-lo:0</div>
<pre>...
ONBOOT=no
...</pre>
<p>Then disable <code>heartbeat</code> from starting automatically and make sure it is off.</p>
<pre>[root@server ~]# chkconfig heartbeat off
[root@server ~]# chkconfig --list heartbeat | grep heartbeat
heartbeat       0:off   1:off   2:off   3:off   4:off   5:off   6:off
</pre>
<p>Finally bring the alias and <code>heartbeat</code> up in <code>rc.local</code>. This script file is run once, before all other scripts have run but before the logon prompt appears.</p>
<div class="filename">/etc/rc.local</div>
<pre>...
ifup lo:0
/etc/init.d/heartbeat start
</pre>
<h3>LINKS:</h3>
<ol>
<li><a href="http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html">Streamline High Availability and Load Balancing</a></li>
<li><a href="http://www.jedi.com/obiwan/technology/ultramonkey-rhel4.html">How to install Ultra Monkey LVS in a 2-Node HA/LB Setup on CentOS/RHEL4</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/06/24/ultramonkey-on-centos4-with-bluequartz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColdFusion 8 on CentOS 4 with BlueQuartz</title>
		<link>http://www.ponticstar.com/blog/2009/05/14/coldfusion8-on-centos4/</link>
		<comments>http://www.ponticstar.com/blog/2009/05/14/coldfusion8-on-centos4/#comments</comments>
		<pubDate>Thu, 14 May 2009 15:44:53 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[BlueQuarz]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=62</guid>
		<description><![CDATA[When starting ColdFusion for the first time connector wizard cannot configure web server correctly.
<pre>Starting ColdFusion 8...
The ColdFusion 8 server is starting up and will be available shortly.
======================================================================
Running the ColdFusion 8 connector wizard
======================================================================
Configuring the web server connector (Launched on the first run of the ColdFusion 8 start script)
Running apache connector wizard...
ColdFusion 8 not started, will retry connector 12 more time(s)
ColdFusion 8 not started, will retry connector 11 more time(s)
ColdFusion 8 not started, will retry connector 10 more time(s)
ColdFusion 8 not started, will retry connector 9 more time(s)
ColdFusion 8 not started, will retry connector 8 more time(s)
ColdFusion 8 not started, will retry connector 7 more time(s)
ColdFusion 8 not started, will retry connector 6 more time(s)
ColdFusion 8 not started, will retry connector 5 more time(s)
ColdFusion 8 not started, will retry connector 4 more time(s)
ColdFusion 8 not started, will retry connector 3 more time(s)
ColdFusion 8 not started, will retry connector 2 more time(s)
ColdFusion 8 not started, will retry connector 1 more time(s)
The connector wizard has not been able to contact the local ColdFusion 8, connector installation aborted.
======================================================================
ColdFusion 8 has been started.
ColdFusion 8 will write logs to /opt/coldfusion8/logs/cfserver.log
======================================================================
</pre>
]]></description>
			<content:encoded><![CDATA[<h3>PROBLEM:</h3>
<p>When starting ColdFusion for the first time connector wizard cannot configure web server correctly.</p>
<pre>Starting ColdFusion 8...
The ColdFusion 8 server is starting up and will be available shortly.
======================================================================
Running the ColdFusion 8 connector wizard
======================================================================
Configuring the web server connector (Launched on the first run of the ColdFusion 8 start script)
Running apache connector wizard...
ColdFusion 8 not started, will retry connector 12 more time(s)
ColdFusion 8 not started, will retry connector 11 more time(s)
ColdFusion 8 not started, will retry connector 10 more time(s)
ColdFusion 8 not started, will retry connector 9 more time(s)
ColdFusion 8 not started, will retry connector 8 more time(s)
ColdFusion 8 not started, will retry connector 7 more time(s)
ColdFusion 8 not started, will retry connector 6 more time(s)
ColdFusion 8 not started, will retry connector 5 more time(s)
ColdFusion 8 not started, will retry connector 4 more time(s)
ColdFusion 8 not started, will retry connector 3 more time(s)
ColdFusion 8 not started, will retry connector 2 more time(s)
ColdFusion 8 not started, will retry connector 1 more time(s)
The connector wizard has not been able to contact the local ColdFusion 8, connector installation aborted.
======================================================================
ColdFusion 8 has been started.
ColdFusion 8 will write logs to /opt/coldfusion8/logs/cfserver.log
======================================================================
</pre>
<div class="filename">/opt/coldfusion8/logs/cfserver.log:</div>
<pre>java.net.UnknownHostException: foo.mydomain.com: foo.mydomain.com</pre>
<div class="filename">/opt/coldfusion8/runtime/lib/wsconfig/wsconfig.log:</div>
<pre>05/06 07:59:07 info Macromedia JRun 4.0 (Build 108487)
05/06 07:59:08 error Could not connect to any JRun/ColdFusion servers on host localhost.
Possible causes:
o Server not running
  -Start Macromedia JRun4 or ColdFusion 8 server
o Server running
  -JNDI listen port in jndi.properties blocked by TCP/IP filtering or firewall
   on server
  -host restriction in security.properties blocking communication with server</pre>
<h3>CAUSE:</h3>
<p>This behavior could be caused by using non-resolvable host name (<code>foo.mydomain.com</code> in our example) along with <code>/etc/hosts</code> file having incorrect permissions.</p>
<pre>[root@foo ~]# ls -la /etc/hosts
-rw-r-----  1 root root 1514 May  4 18:04 /etc/hosts</pre>
<h3>SOLUTION:</h3>
<p>To resolve this issue <code>/etc/hosts</code> has to have <code>0644</code> access permission:</p>
<pre>
[root@foo ~]# chmod 0644 /etc/hosts
[root@foo ~]# ls -la /etc/hosts
-rw-r--r--  1 root root 1514 May  4 18:04 /etc/hosts
</pre>
<p>On distributions with BlueQuartz (<a href="http://www.osoffice.co.uk">Strongbolt</a>, <a href="http://www.blueonyx.it">BlueOnyx</a>, etc) it could be caused by <code>/usr/sausalito/handlers/nuonce/fixhosts/fixhosts</code> script (see <a class="target-blank" href="http://www.nuonce.net/support/viewthread.php?fid=44&amp;tid=1087">this post</a>). To prevent this script from resetting permissions again, add the following line at the end of the script:</p>
<pre>/bin/chmod 0644 /etc/hosts</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/05/14/coldfusion8-on-centos4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to compile Strongbolt kernel on Cobalt RaQ4</title>
		<link>http://www.ponticstar.com/blog/2009/04/27/how-to-compile-strongbolt-kernel-on-cobalt-raq4/</link>
		<comments>http://www.ponticstar.com/blog/2009/04/27/how-to-compile-strongbolt-kernel-on-cobalt-raq4/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 03:08:30 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Cobalt RaQ4]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=52</guid>
		<description><![CDATA[Cobalt RaQ4 was laying around collecting dust so I decided to give it a second chance. Guys from OS Office (http://www.osoffice.co.uk) put together Strongbolt &#8211; excellent Linux distribution based on CentOS with Cobalt RaQ support. 
I wanted to use Cobalt RaQ4 to test highly available and load balanced cluster configuration. However current Strongbolt kernel 2.6.16i586 [...]]]></description>
			<content:encoded><![CDATA[<p>Cobalt RaQ4 was laying around collecting dust so I decided to give it a second chance. Guys from OS Office (<a href="http://www.osoffice.co.uk">http://www.osoffice.co.uk</a>) put together Strongbolt &#8211; excellent Linux distribution based on CentOS with Cobalt RaQ support. </p>
<p>I wanted to use Cobalt RaQ4 to test highly available and load balanced cluster configuration. However current Strongbolt kernel 2.6.16i586 doesn’t have IP virtual server support and had to be recompiled. <span id="more-52"></span>I’ve used the following page as a reference while building a kernel &#8211; <a href="http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html">http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html</a>.</p>
<p>Below is a list of steps required to compile a kernel with virtual server support. If you don&#8217;t need this functionality please ignore steps 6 and 13.</p>
<ol>
<li>Logged in as root, downloaded and extracted kernel source code.
<pre>wget http://www.osoffice.co.uk/linux/raq4-sb-kernel-source/2.6/linux-2.6.16-raq4-source.tar.gz
tar -xzf linux-2.6.16-raq4-source.tar.gz -C /usr/src
cd /usr/src/linux-2.6.16-raq4-standard/</pre>
</li>
<li>Installed compiler and required libraries.
<pre>yum install gcc ncurses-devel</pre>
</li>
<li>To prevent overwriting any existing kernel modules on the system modified kernel version to something unique in <code>/usr/src/linux-2.6.16-raq4-standard/Makefile</code>.
<pre>VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 16
EXTRAVERSION = -ipvs</pre>
</li>
<li>Current kernel configuration settings are stored in <code>/proc/config.gz</code>. Since I only need to make minor changes to the configuration it would be wise to re-use the configuration file.
<pre>zcat /proc/config.gz > /usr/src/linux-2.6.16-raq4-standard/.config</pre>
</li>
<li>Run the configuration utility. Configuration file <code>.config</code> created in previous step will be loaded automatically.
<pre>make menuconfig</pre>
</li>
<li>In the menu, selected <code>Networking -> Networking options -> IP: Virtual Server Configuration</code> and then made the following choices:
<pre>   <M> IP virtual server support (EXPERIMENTAL)
   [ ]   IP virtual server debugging (NEW)
   (12)  IPVS connection table size (the Nth power of 2) (NEW)
   ---   IPVS transport protocol load balancing support
   [*]   TCP load balancing support
   [*]   UDP load balancing support
   [ ]   ESP load balancing support (NEW)
   [ ]   AH load balancing support (NEW)
   ---   IPVS scheduler
   <M>   round-robin scheduling
   <M>   weighted round-robin scheduling
   <M>   least-connection scheduling
   <M>   weighted least-connection scheduling
   <M>   locality-based least-connection scheduling
   <M>   locality-based least-connection with replication scheduling
   <M>   destination hashing scheduling
   <M>   source hashing scheduling
   <M>   shortest expected delay scheduling
   <M>   never queue scheduling
   ---   IPVS application helper
   <M>   FTP protocol helper (NEW)</pre>
</li>
<li>Removed compiled kernel that came with the source files.
<pre>rm vmlinux.bz2</pre>
</li>
<li>Compiled the kernel.
<pre>make vmlinux</pre>
</li>
<li>Compiled and installed all the loadable modules.
<pre>make modules
make modules_install</pre>
</li>
<li>Made a backup of the current kernel.
<pre>cp /boot/vmlinux.bz2 /boot/vmlinux-`uname -r`.bz2
chmod 0644 /boot/vmlinux-`uname -r`.bz2</pre>
</li>
<li>Compressed and installed the kernel. Since one of the Strongbolt forum users experienced a problem booting kernel compressed with default settings (see <a href="http://www.osoffice.co.uk/forum/viewtopic.php?f=7&#038;t=391">http://www.osoffice.co.uk/forum/viewtopic.php?f=7&#038;t=391</a>), compression method #4 was used.
<pre>bzip2 -4 vmlinux
cp vmlinux.bz2 /boot</pre>
</li>
<li>Rebooted the server.</li>
<li>Loaded virtual server kernel modules.
<pre>modprobe ip_vs ip_vs_rr</pre>
</li>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/04/27/how-to-compile-strongbolt-kernel-on-cobalt-raq4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
