<?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>Napolitopia.com</title>
	<atom:link href="http://www.napolitopia.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.napolitopia.com</link>
	<description>Someday Came Suddenly</description>
	<lastBuildDate>Tue, 27 Jul 2010 16:50:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Why Validation Is Important,&#8230; After All</title>
		<link>http://www.napolitopia.com/2010/07/why-validation-is-important-after-all/</link>
		<comments>http://www.napolitopia.com/2010/07/why-validation-is-important-after-all/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 16:35:03 +0000</pubDate>
		<dc:creator>eightamrock</dc:creator>
				<category><![CDATA[Code Bin]]></category>

		<guid isPermaLink="false">http://www.napolitopia.com/?p=57</guid>
		<description><![CDATA[HTML and CSS Validation has been the center of an intense debate for years; some web developers believe that validation is pointless since many of the specs change on various DOCTYPE&#8217;s and DTD&#8217;s, while others believe that your website is not truly valid and accessible unless you are in 100% compliance with whatever DOCTYPE you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.napolitopia.com&amp;charset=%28detect+automatically%29&amp;doctype=Inline&amp;group=0"><img class="alignnone" title="Validation Success" src="http://grab.by/5BVd" alt="Validate it" width="516" /></a></p>
<p>HTML  and CSS Validation has been the center of an intense debate for years;  some web developers believe that validation is pointless since many of  the specs change on various DOCTYPE&#8217;s and DTD&#8217;s, while others believe  that your website is not truly valid and accessible unless you are in  100% compliance with whatever DOCTYPE you use. I will not begin to  pretend that I can fairly and accurately mitigate both sides of this  argument, what I want to do is take a look at it from a different  perspective.</p>
<p><span id="more-57"></span></p>
<p>About 10 years ago while I was attending a small  technical college in New Jersey, I began freelancing web design. At that  time standards were pretty low, and there hadn&#8217;t been too many  companies or individuals doing it as a business. As a result, pricing  was erratic often ending up only at &#8220;well it works and the client likes  it so how much can I milk them for!&#8221;. Without today&#8217;s convenience of  jQuery or Prototype and certainly very few frameworks, almost everything  was from scratch. You never really knew how long it was going to take  you to complete a job.</p>
<p>Shortly after the big internet boom and the collapse  of the job market, the community of web designers and developers was  flooded with what I like to call &#8216;myspace coders&#8217; and overseas  application developers who all considered themselves to be top notch  when it came to markup and the development of websites. Individuals who  could change the CSS on their Myspace page started applying for entry  level jobs at large corporations, setting a new curve of salaries that  we are still fighting today. What made things worse, is that companies  were still trying to figure out the web and had no idea who to hire to  help them do it.</p>
<p>Resume&#8217;s started to read every keyword under the  sun&#8230; IE( EXPERT AT PHP, RUBY, ASP, XML, XHTML, JSP, JAVASCRIPT, HTML,  CSS, PHOTOSHOP, DREAMWEAVER, PYTHON, PERL, C++).. etc. As a hiring  manager for an agency I will tell you that the first thing I do is throw  these resumes away. I know that when this person comes in, you can ask  them to code something in any of these languages and the response will  be &#8216;<em>I can try but I am rusty</em>&#8216; or &#8216;<em>I have modified it, but not from scratch</em>&#8216;.  Alas, most companies don&#8217;t test people and will just hire you based on  what you say you know. So the infiltration was a success.</p>
<p>So what does all this angry rambling mean, at first I  viewed this as what would be the death of the real web developer. Real  developers like myself would get frustrated and give up, while these  half time hero&#8217;s would slowly creep in and take over the industry  producing nothing more than poorly modified templates from some  outsourced vendor. Even &#8216;my neighbors 15 year old son&#8217; was in on the  action building websites for the price of a new skateboard.</p>
<p>As we begin to move into what I like to call the  golden age of the web, we have an opportunity to flush the market and  rid the community of these impostors. With the sudden interest in and  finite definition of web standards, along with the growing community of  industry idols like Eric Meyer, Jeremy Keith, Jeff Way, and Jeffery  Zeldman, we now have the tools to solidify our future and the industry.</p>
<p>This all brings me to my point, Validation!  Validation gives us a baseline for the quality of our medium. Validation  can help us filter out the impostors and quantify our costs to deliver.  A successfully marked up and validated piece of code can not be argued  or refuted. It is industry standard and is something that we should all  be taking advantage of. This can be the first step to reclaiming the  business that should belong to those that have the necessary training  and education to properly build a web presence. I know validation is  heavily debated, but I think it stands to reason that there are many  ways to build the same site, and as long as it validates its safe to say  it was done correctly.</p>
<p class="tweet_align"><a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Why+Validation+Is+Important%2C%E2%80%A6+After+All+http://tinyurl.com/23hjoop" title="Post to Twitter"><img class="nothumb" src="http://www.napolitopia.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Why+Validation+Is+Important%2C%E2%80%A6+After+All+http://tinyurl.com/23hjoop" title="Post to Twitter">Tweet This!</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.napolitopia.com/2010/07/why-validation-is-important-after-all/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting an &#8216;Active&#8217; Class for Dynamic Navigations in WordPress</title>
		<link>http://www.napolitopia.com/2010/05/setting-an-active-class-for-dynamic-navigations-in-wordpress/</link>
		<comments>http://www.napolitopia.com/2010/05/setting-an-active-class-for-dynamic-navigations-in-wordpress/#comments</comments>
		<pubDate>Sun, 09 May 2010 22:01:50 +0000</pubDate>
		<dc:creator>eightamrock</dc:creator>
				<category><![CDATA[Code Bin]]></category>

		<guid isPermaLink="false">http://www.napolitopia.com/?p=55</guid>
		<description><![CDATA[I recently got a project that required a really dynamic navigation.  The client wanted the ability to add and remove pages at will with no interaction from a developer. This is generally a pretty simple request, but the client has a very specific set of style guidelines. Here is a php function that I wrote [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got a project that required a really dynamic navigation.  The client wanted the ability to add and remove pages at will with no interaction from a developer. This is generally a pretty simple request, but the client has a very specific set of style guidelines. Here is a php function that I wrote to do the job.</p>
<p><span id="more-55"></span></p>
<p>This script is intended for people who already know about themes in wordpress, and kn0w how to use the &#8216;functions.php&#8217; file.</p>
<p>Its pretty simple. First you have to globalize the &#8216;posts&#8217; variable within the function or <a href="http://codex.wordpress.org/Function_Reference/get_pages" target="_blank">get_pages()</a> wont work. There are number of params you can pass to get_pages() however I only really need to use 3. The first is what pages to exclude. I pass this in via the template files. I am only doing this because I need to exclude a particular custom page from all the navigations on the site.</p>
<p>Lets take a look at the others..</p>
<pre class="brush:php">$pages = get_pages("exclude=$exclude&amp;parent=0&amp;child_of=0&amp;sort_column=menu_order");
</pre>
<p>In order to only display the top level pages of my site, I am passing in parent=0, this means top level, and child_of = 0, this means no children of the parent page. So now I am free to add a bunch of sub pages and know that they wont automatically blow up our custom nav, but top level pages will be added.</p>
<p>The next item is sort_column=menu_order&#8230; just a side note, these variable are passed like a query string so always remember to use your ampersands :) The sort_column has a few options, I manually manage the page order in the WP CMS, thats what I am using.</p>
<p>Here is the rest of the function.</p>
<pre class="brush:php">	function active_nav($exclude){
 global $post;
 $pages = get_pages("exclude=$exclude&amp;parent=0&amp;child_of=0&amp;sort_column=menu_order");
 foreach ($pages as $row) {
 if(is_page($row-&gt;ID)){
 echo "&lt;li&gt;&lt;a href=\"".get_page_link($row-&gt;ID)."\" class=\"current\"&gt;".$row-&gt;post_title."&lt;/a&gt;&lt;/li&gt;";
 }else{
 echo "&lt;li&gt;&lt;a href=\"".get_page_link($row-&gt;ID)."\"&gt;".$row-&gt;post_title."&lt;/a&gt;&lt;/li&gt;";
 }
 }

 }
</pre>
<p>Its pretty simple, it just checks what the current page is, then applies a class 0f &#8220;current&#8221; to that navigation item, giving us a custom active class.</p>
<p>Now all you do is call the class in the theme files like so:</p>
<pre class="brush:html">&lt;div id="nav"&gt;
 &lt;ul&gt;                                   
 &lt;?php 

 active_nav(your_page_id_int);

 ?&gt;
 &lt;/ul&gt;
 &lt;/div&gt;</pre>
<p><a href="http://github.com/eightamrock/WordPress-Active-Class-Navigation" target="_blank">Here is a link to my github with this script. </a></p>
<p>Cheers</p>
<p class="tweet_align"><a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Setting+an+%E2%80%98Active%E2%80%99+Class+for+Dynamic+Navigations+in+WordPress+http://tinyurl.com/39le9g8" title="Post to Twitter"><img class="nothumb" src="http://www.napolitopia.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Setting+an+%E2%80%98Active%E2%80%99+Class+for+Dynamic+Navigations+in+WordPress+http://tinyurl.com/39le9g8" title="Post to Twitter">Tweet This!</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.napolitopia.com/2010/05/setting-an-active-class-for-dynamic-navigations-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Self Clearing Input Fields With Javascript and Prototype</title>
		<link>http://www.napolitopia.com/2010/04/self-clearing-input-fields-with-javascript-and-prototype/</link>
		<comments>http://www.napolitopia.com/2010/04/self-clearing-input-fields-with-javascript-and-prototype/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 16:59:43 +0000</pubDate>
		<dc:creator>eightamrock</dc:creator>
				<category><![CDATA[Code Bin]]></category>

		<guid isPermaLink="false">http://www.napolitopia.com/?p=53</guid>
		<description><![CDATA[I wrote this little script to just create some self clearing input fields. Its pretty simple but it does the job.]]></description>
			<content:encoded><![CDATA[<p>I wrote this little script to just create some self clearing input fields. Its pretty simple but it does the job.</p>
<p><span id="more-53"></span></p>
<p><strong>Updated: </strong>A new version of this script can be found on my GitHub Account&#8230; its much sleeker and requires nothing to be put on the input fields. <a href="http://github.com/eightamrock/Self-Clearing-Inputs" target="_blank">Heres a link to my new self clearing input script</a></p>
<p>First you have the js</p>
<pre class="brush:js">//This can go in the main js or whatever...
function clearInput(staticValue, id){
	if($(id).value == staticValue){
		$(id).value = '';
		$(id).observe('blur', function(){
			if($(id).value == ''){
				$(id).value = staticValue;
			}
		});
	}
}
</pre>
<p>Just make sure you download and include prototype.</p>
<p>Here is a sample of the html!</p>
<p>Each Input field must have a unique ID for this to work. 	The first argument in the clearInput() function is the static value of the input field.</p>
<pre class="brush:html">
<input id="footest1" name="test" type="text" value="foo bar" />
</pre>
<p class="tweet_align"><a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Self+Clearing+Input+Fields+With+Javascript+and+Prototype+http://tinyurl.com/38moono" title="Post to Twitter"><img class="nothumb" src="http://www.napolitopia.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Self+Clearing+Input+Fields+With+Javascript+and+Prototype+http://tinyurl.com/38moono" title="Post to Twitter">Tweet This!</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.napolitopia.com/2010/04/self-clearing-input-fields-with-javascript-and-prototype/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Last Tweet &#8211; A PHP Twitter Class</title>
		<link>http://www.napolitopia.com/2010/04/last-tweet-a-php-twitter-class/</link>
		<comments>http://www.napolitopia.com/2010/04/last-tweet-a-php-twitter-class/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 17:52:47 +0000</pubDate>
		<dc:creator>eightamrock</dc:creator>
				<category><![CDATA[Code Bin]]></category>

		<guid isPermaLink="false">http://www.napolitopia.com/?p=51</guid>
		<description><![CDATA[Sometimes doing something simple should be just that, simple. Thanks to Twitters excellent restful API, I am easily able to grab my last tweet plus some bonus data about my account and display it on my website. So Here it is, simple and clean.]]></description>
			<content:encoded><![CDATA[<p>Sometimes doing something simple should be just that, simple. Thanks to <a href="http://apiwiki.twitter.com/" target="_blank">Twitters excellent restful API</a>, I am easily able to grab my last tweet plus some bonus data about my account and display it on my website. So Here it is, simple and clean.</p>
<p><span id="more-51"></span></p>
<p>First we have the PHP class file:</p>
<pre class="brush:php">class last_tweet{

// The Base URL to Use
protected $base_url = "http://twitter.com/";

// Grab the URL
protected function get_url($uri)
{
// Start the cURL Connection
$connection = curl_init();

// Set Options
curl_setopt($connection, CURLOPT_HEADER, 1);
curl_setopt($connection, CURLOPT_RETURNTRANSFER,1);

// Set the URL to Grab
$fetch_url = $this-&gt;base_url . $uri;
curl_setopt($connection, CURLOPT_URL, $fetch_url);

// Get the Page
$page = curl_exec($connection);

// Close the Connection
curl_close($connection);

return $page;
}

// Parses the XML
protected function parse_xml($xml_string)
{
$xml_string = strstr($xml_string, 'get_url($api_call);
$xml = $this-&gt;parse_xml($page);

// Return the XML Object
return $xml;
}

public function show_tweet($username, $num)
{
// Grab the tweet
$tweet = $this-&gt;get_tweet($username, $num);

//all your display code can go here if you want, Im just returning the array from the simplexmlelement

return $tweet;
}

}
</pre>
<p>Its pretty simple, nice number of functions to set the cURL transfer, send the request to twitter and return the XML. So the next step is just instantiating the class and doing something with the data from twitter:</p>
<pre class="brush:php">include_once('class.last_tweet.php');

//instantiate
$last_tweet = new last_tweet;

//Your Username
$username = 'Your Username';

// number of tweets returned, can be as many as you like. I think twitter limits at 200
$num = '1';

// Grab the Tweet XML
$tweet = $last_tweet-&gt;get_tweet($username, $num);
</pre>
<p>Here I just spit it out on an empty HTML page. You can decided how you want to disseminate the data.</p>
<pre class="brush:php">print_r($tweet);
</pre>
<p>Thats it, get your last tweet info from twitter. Use it wisely, twitter only allows 100 calls an hour to the restful API.</p>
<p>Here is the source code: <a href="http://github.com/eightamrock/Last-Tweet" target="_blank">Last Tweet PHP Class</a></p>
<p>Cheers!</p>
<p class="tweet_align"><a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Last+Tweet+%E2%80%93+A+PHP+Twitter+Class+http://tinyurl.com/y3rr7wu" title="Post to Twitter"><img class="nothumb" src="http://www.napolitopia.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Last+Tweet+%E2%80%93+A+PHP+Twitter+Class+http://tinyurl.com/y3rr7wu" title="Post to Twitter">Tweet This!</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.napolitopia.com/2010/04/last-tweet-a-php-twitter-class/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LSCOLORS in OSX Snow Leopard, For Dummies</title>
		<link>http://www.napolitopia.com/2010/03/lscolors-in-osx-snow-leopard-for-dummies/</link>
		<comments>http://www.napolitopia.com/2010/03/lscolors-in-osx-snow-leopard-for-dummies/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 19:23:41 +0000</pubDate>
		<dc:creator>eightamrock</dc:creator>
				<category><![CDATA[Code Bin]]></category>
		<category><![CDATA[Unix Pie]]></category>

		<guid isPermaLink="false">http://www.napolitopia.com/?p=49</guid>
		<description><![CDATA[So after cruising the web for a few hours trying to find &#8216;dummy&#8217; style documentation on changing colors in terminal using .bashrc, I finally stumbled across a site that got me half way there. After playing around a bit I found a few little tricks and things that no one really likes to share. So [...]]]></description>
			<content:encoded><![CDATA[<p>So after cruising the web for a few hours trying to find &#8216;dummy&#8217; style documentation on changing colors in terminal using .bashrc, I finally stumbled across a site that got me half way there. After playing around a bit I found a few little tricks and things that no one really likes to share. So here it is.</p>
<p><span id="more-49"></span></p>
<h2>LSCOLORS A bash Command</h2>
<p>The first thing you should know is that this is not as straight forward as most people like to make you believe. I am a total n00b when it comes to bash so I really need to start at the beginning.</p>
<p><strong>Step 1: Make sure .bashrc is being used by terminal</strong></p>
<p>This is the easiest step. In terminal navigate to your home directory. This is usually accomplished by typing &#8216;<em>cd ~</em>&#8216; and executing. Then do a quick directory listing showing all hidden files &#8216;<em>ls -al</em>&#8216;. Once you do this, you should see both a &#8216;<em>.bashrc</em>&#8216; and a &#8216;<em>.bash_profile</em>&#8216;. If you don&#8217;t, no need to panic we can create them easily and Snow Leopard is smart enough to know what to do with them.  So if they don&#8217;t exist, execute these 2 commands in terminal &#8216;<em>touch .bashrc</em>&#8216; &#8216;<em>touch .bash_profile</em>&#8216;. If you re-run your &#8216;<em>ls -al</em>&#8216; again you should now see the files.</p>
<p><strong>Step 2: Link .bashrc to .bash_profile</strong></p>
<p>Using your favorite editor, in my case Textmate, open<em> &#8216;.bash_profile&#8217;</em>. This file needs one line.</p>
<pre class="brush:bash">source ~/.bashrc</pre>
<p><strong>Update</strong>: A good friend of mine at <a href="http://blog.ubrio.us" target="_blank">blog.ubrio.us</a> just gave me the scoop on &#8216;<em>bashrc</em>&#8216; vs &#8216;<em>bash_profile</em>&#8216;. The gist of it is that <em>bashrc</em> is read when you open a new tab in terminal locally and <em>bash_profile</em> is read when you are SSHing into the environment. So choose whichever works for you. I just link them because I want the same view no matter how I am connecting.</p>
<p>Next open the <em>&#8216;.bashrc</em>&#8216; file, this is where we can have some fun.</p>
<p><strong>Step 3: Colors LSColors and more LS_Colors</strong>&#8230;</p>
<p>The first thing we have to do is prepare bash to receive the colors, in order to do that you need to enter these 3 lines.</p>
<pre class="brush:bash">export LS_OPTIONS='--color=auto'
export CLICOLOR='Yes'
export LSCOLORS=''
</pre>
<p>This should be pretty straight forward, we are exporting the LS_OPTIONS and saying to use colors and to automatically choose them for us if I have not chosen them. CLICOLOR=&#8217;YES&#8217; is telling bash to force color output and LS_COLORS is where we will start to define our scheme.</p>
<p>Here are the colors that are available:</p>
<ul>
<li> a = black</li>
<li>b = red</li>
<li>c = green</li>
<li>d = brown</li>
<li>e = blue</li>
<li>f = magenta</li>
<li>g = cyan</li>
<li>h = light gray</li>
<li>x = default</li>
</ul>
<p>It is important to note how the color codes pair up. Basically each entry will be a Foreground | Background pair. so &#8216;<em>ex</em>&#8216; means foreground blue background default. The &#8216;default&#8217; color will be whatever you have set in your command line app&#8217;s preferences. Most default to a white background and black foreground. By simply upper-casing any of the color codes you can bold your text, this really on works on foregrounds. Example: Bx means bold red foreground and default background.</p>
<p>The next thing that I found difficult to find was how these color codes were ordered. So it&#8217;s like this&#8230;.</p>
<ol>
<li>DIR</li>
<li>SYM_LINK</li>
<li>SOCKET</li>
<li>PIPE</li>
<li>EXE</li>
<li>BLOCK_SP</li>
<li>CHAR_SP</li>
<li>EXE_SUID</li>
<li>EXE_GUID</li>
<li>DIR_STICKY</li>
<li>DIR_WO_STICKY</li>
</ol>
<p>Wow that&#8217;s a lot, but that&#8217;s the order..</p>
<p><strong>Step 4: Putting it all together</strong></p>
<p>So now you have the order and you have the colors, lets put it all together. I use a default background of black and a foreground of white, so I use a lot of default color settings.</p>
<pre class="brush:bash">export LSCOLORS='Bxgxfxfxcxdxdxhbadbxbx'
</pre>
<p>Here is the break down:</p>
<ol>
<li>DIR = Bx #Bold red text with default background</li>
<li>SYM_LINK = gx #cyan text with default background</li>
<li>SOCKET = fx #magenta text with default background</li>
<li>PIPE = fx #magenta text with default background</li>
<li>EXE = cx #green text with default background</li>
<li>BLOCK_SP = dx #brown text with default background</li>
<li>CHAR_SP = dx #brown text with default background</li>
<li>EXE_SUID = hb #light grey text with red background</li>
<li>EXE_GUID = ad #black text with brown background</li>
<li>DIR_STICKY = bx #red text with default background</li>
<li>DIR_WO_STICKY = bx #red text with default background</li>
</ol>
<p><strong>Step 5: Wrap UP</strong></p>
<p>So your done, save your bash files and restart terminal. You should now have colors.</p>
<p>Well that&#8217;s it, I hope this helps you figure out your bash color profile: :) cheers!</p>
<p class="tweet_align"><a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+LSCOLORS+in+OSX+Snow+Leopard%2C+For+Dummies+http://tinyurl.com/y8s3m72" title="Post to Twitter"><img class="nothumb" src="http://www.napolitopia.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+LSCOLORS+in+OSX+Snow+Leopard%2C+For+Dummies+http://tinyurl.com/y8s3m72" title="Post to Twitter">Tweet This!</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.napolitopia.com/2010/03/lscolors-in-osx-snow-leopard-for-dummies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unboxing the Apple Magic Mouse</title>
		<link>http://www.napolitopia.com/2010/02/unboxing-the-apple-magic-mouse/</link>
		<comments>http://www.napolitopia.com/2010/02/unboxing-the-apple-magic-mouse/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 04:56:08 +0000</pubDate>
		<dc:creator>eightamrock</dc:creator>
				<category><![CDATA[Tech Stuff]]></category>

		<guid isPermaLink="false">http://www.napolitopia.com/?p=41</guid>
		<description><![CDATA[So a few days ago my mighty mouse decided to crap out. I did my best to take it apart and clean it, but we all know that once you take apart a 'glued together' piece of electronics things are rarely ever the same again. So, seeing as I needed a new mouse and had an extra $70 burning a hole in my pocket, I decided to dive in and get myself a new Magic Mouse.]]></description>
			<content:encoded><![CDATA[<p>So a few days ago my mighty mouse decided to crap out. I did my best to take it apart and clean it, but we all know that once you take apart a &#8216;glued together&#8217; piece of electronics things are rarely ever the same again. So, seeing as I needed a new mouse and had an extra $70 burning a hole in my pocket, I decided to dive in and get myself a new <a href="http://store.apple.com/us/product/MB829LL/A?fnode=MTY1NDA1Mg&amp;mco=MTUxMDc0OTI" target="_blank">Magic Mouse</a>.</p>
<p><a rel="shadowbox" href="http://www.napolitopia.com/wp-content/uploads/2010/02/IMG_0527.jpg"><img class="alignnone size-medium wp-image-42" title="Might Mouse Boxed Up" src="http://www.napolitopia.com/wp-content/uploads/2010/02/IMG_0527-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><span id="more-41"></span></p>
<p>The first thing I really appreciated about this product was how well it was packaged. Not only did it not have any unnecessary flaps or 2 inch thick thermal sealed plastic casing that slices your fingers open trying to open it, but the packaging can be complete reused for travel with the mouse.</p>
<p><a rel="shadowbox" href="http://www.napolitopia.com/wp-content/uploads/2010/02/IMG_0530.jpg"><img class="alignnone size-medium  wp-image-43" title="Mouse unboxed. " src="http://www.napolitopia.com/wp-content/uploads/2010/02/IMG_0530-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>There wasn&#8217;t much in there and that is something I completely appreciate about Apple. They take full advantage of their online updates to get your system ready for their new technologies. This mouse didn&#8217;t need a CD, a floppy or a 200 page booklet. It just came with the bare essentials and immediately worked.</p>
<p>So The first thing that all good tech geeks know to do is check for batteries. I was extremely surprised at what I found. Apple is one of those companies that knows you are going to pay top dollar for their hardware, so they don&#8217;t skimp on the details. Cracking open the battery compartment revealed a set of energizer ultra batteries. Thank you Apple. This is the kind of thing that most people don&#8217;t notice or care about, but for those that do its the main reason we keep coming back.</p>
<p><a rel="shadowbox" href="http://www.napolitopia.com/wp-content/uploads/2010/02/IMG_0532.jpg"><img class="alignnone size-medium wp-image-44" title="Energizers!" src="http://www.napolitopia.com/wp-content/uploads/2010/02/IMG_0532-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Pairing was a cinch and took all of about 30 seconds and I was off and &#8216;mousing&#8217;. As for overall look and feel of this mouse, I really  love it. It&#8217;s really slim, slides right into the small pockets in my backpack. I love that it has very few moving parts. Almost the entire top of the mouse is touch sensitive and really offers up a great scrolling experience. I look forward to software updates that really take advantage of the technology.</p>
<p>Wish list: I wish this mouse had a cover for the optical lens like the mighty mouse did&#8230; I can see this getting really dirty. I also wish this mouse was just a hair thicker, I like the slim profile for its portability, but I have gorilla hands and extended use leaves me a little sore in the wrist. The last thing I really wish it has was the side buttons like the might mouse. I really miss the versatility that those buttons offered. Now I have to go to the keyboard to get my expose&#8230; booooo.</p>
<p>Overall I give this mouse an A. Although a few small details could have brought it up to an A+.</p>
<p class="tweet_align"><a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Unboxing+the+Apple+Magic+Mouse+http://tinyurl.com/yevoqxl" title="Post to Twitter"><img class="nothumb" src="http://www.napolitopia.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Unboxing+the+Apple+Magic+Mouse+http://tinyurl.com/yevoqxl" title="Post to Twitter">Tweet This!</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.napolitopia.com/2010/02/unboxing-the-apple-magic-mouse/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Retubing the Marshall Part &#8211; 2</title>
		<link>http://www.napolitopia.com/2010/02/retubing-the-marshall-part-2/</link>
		<comments>http://www.napolitopia.com/2010/02/retubing-the-marshall-part-2/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 04:31:02 +0000</pubDate>
		<dc:creator>eightamrock</dc:creator>
				<category><![CDATA[Audio Projects]]></category>

		<guid isPermaLink="false">http://www.napolitopia.com/?p=37</guid>
		<description><![CDATA[After a few weeks of playing with the settings, re-biasing, and changing out tubes I finally decided that I just didn't like the power tubes, and that they were likely the source of my problems with tone. So I called up my friends at thetubestore.com  and had them ship me a set of EL34B's.]]></description>
			<content:encoded><![CDATA[<p>The quest for my perfect guitar tone continues&#8230;</p>
<p><a rel="shadowbox" href="http://www.napolitopia.com/wp-content/uploads/2010/02/IMG_0546.jpg"><img class="alignnone size-medium wp-image-38" title="Tung Sol EL34B" src="http://www.napolitopia.com/wp-content/uploads/2010/02/IMG_0546-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>After a few weeks of playing with the settings, re-biasing, and changing out tubes I finally decided that I just didn&#8217;t like the power tubes, and that they were likely the source of my problems with tone. So I called up my friends at <a title="The Tube Store" href="http://thetubestore.com" target="_blank">thetubestore.com</a> and had them ship me a set of <a href="http://thetubestore.com/tungsolel34.html" target="_blank">EL34B&#8217;s</a>.</p>
<p><span id="more-37"></span></p>
<p>So I pulled out the <a href="http://thetubestore.com/teslael34l.html" target="_blank">JJ EL34&#8242;s</a> and slapped these Tung Sols in. Now its important for me to say that I liked the JJ&#8217;s, but they just didn&#8217;t have that rock and roll sound that I was looking for. I wanted something more musical and just a little tougher on the bottom end.</p>
<p><a rel="shadowbox" href="http://www.napolitopia.com/wp-content/uploads/2010/02/IMG_0545.jpg"><img class="alignnone size-medium wp-image-40" title="All amped up" src="http://www.napolitopia.com/wp-content/uploads/2010/02/IMG_0545-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>The TS EL34B&#8217;s went in smooth, needed little bias to get them down to 43.75 mv. This is half of what marshal tells you to bias this amp at since I am running just 2 tubes at 50 watts. I also ordered up and installed a  <a href="http://thetubestore.com/tungsol12ax7g.html" target="_blank">TS ECC803s gold pin</a> for the V4 position preamp tube.</p>
<p><a rel="shadowbox" href="http://www.napolitopia.com/wp-content/uploads/2010/02/IMG_0547.jpg"><img class="alignnone size-medium wp-image-39" title="Ecc803 gold pin" src="http://www.napolitopia.com/wp-content/uploads/2010/02/IMG_0547-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>This is a beautiful tube. It&#8217;s really extremely musical and brought out everything in the preamps that I was looking to achieve. So now I am happy with the sounds&#8230; finally! Now I get to move on to the next phase of this project, micing up the cab!!! LOL any engineer will tell you that good mic position is crucial to capturing all that tone you just worked so hard to achieve. Ill try to write another post chronicling it with sound samples.</p>
<p class="tweet_align"><a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Retubing+the+Marshall+Part+%E2%80%93+2+http://tinyurl.com/ye6vzvg" title="Post to Twitter"><img class="nothumb" src="http://www.napolitopia.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Retubing+the+Marshall+Part+%E2%80%93+2+http://tinyurl.com/ye6vzvg" title="Post to Twitter">Tweet This!</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.napolitopia.com/2010/02/retubing-the-marshall-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Date Squashing with PHP and CodeIgniter</title>
		<link>http://www.napolitopia.com/2010/02/date-squashing-with-php-and-codeigniter/</link>
		<comments>http://www.napolitopia.com/2010/02/date-squashing-with-php-and-codeigniter/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 03:37:56 +0000</pubDate>
		<dc:creator>eightamrock</dc:creator>
				<category><![CDATA[Code Bin]]></category>

		<guid isPermaLink="false">http://www.napolitopia.com/?p=35</guid>
		<description><![CDATA[I was working on a little attendance tracking system today and I used PHP and some native CodeIgniter functions to get it to play nice with my APP. I'm using one of my favorite new scripts CalendarView to pass the dates into this function from a simple form post.]]></description>
			<content:encoded><![CDATA[<p>I was working on a little attendance tracking system today and I used PHP and some native <a href="http://codeigniter.com/user_guide/helpers/date_helper.html" target="_blank">CodeIgniter</a> functions to get it to play nice with my APP. I&#8217;m using one of my favorite new scripts <a href="http://calendarview.org/" target="_blank">CalendarView</a> to pass the dates into this function from a simple form post.</p>
<p><span id="more-35"></span></p>
<pre class="brush: php">
	//Posted values are strings like "2010-01-26"
	//Parse dates as unix
	$start_date = mysql_to_unix($_POST['start_date']);
	$end_date = mysql_to_unix($_POST['end_date']);

	//now get the date details
	$start_date_array = getdate($start_date);
	$end_date_array = getdate($end_date);

	//now lets get all the days and get ready to put it in the DB.
	for ($i=$start_date; $i <= $end_date; $i = round($i + 86400)) {
		$day = getdate($i);
		if($day['weekday'] !== 'Saturday' &#038;&#038; $day['weekday'] !== 'Sunday'){
			$days[$i] = $day;
		}
	}

	print_r($days);
</pre>
<p>So that's it pretty simple and straight forward. It just returns an array of 'day' data for each day between the 2 posted dates. I have a lot of sanity testing going on etc, but took a while to figure out so I felt like I should post it up and share.</p>
<p>Too often I find a little snippet like this on an obscure site that is the answer to a problem I have been trying to figure out all day. So maybe I can be that helping hand for someone else.</p>
<p class="tweet_align"><a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Date+Squashing+with+PHP+and+CodeIgniter+http://tinyurl.com/yeamyr6" title="Post to Twitter"><img class="nothumb" src="http://www.napolitopia.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Date+Squashing+with+PHP+and+CodeIgniter+http://tinyurl.com/yeamyr6" title="Post to Twitter">Tweet This!</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.napolitopia.com/2010/02/date-squashing-with-php-and-codeigniter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to detect and avoid browsers with Javascript</title>
		<link>http://www.napolitopia.com/2010/01/how-to-detect-and-avoid-browsers-with-javascript/</link>
		<comments>http://www.napolitopia.com/2010/01/how-to-detect-and-avoid-browsers-with-javascript/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 18:11:10 +0000</pubDate>
		<dc:creator>eightamrock</dc:creator>
				<category><![CDATA[Code Bin]]></category>

		<guid isPermaLink="false">http://www.napolitopia.com/?p=33</guid>
		<description><![CDATA[This has been beaten death time and time again, so I am not going to list all the reasons why we should drop it, I am just going to tell you how to make sure that users with IE6 are properly handled on your site.]]></description>
			<content:encoded><![CDATA[<p><a rel="shadowbox" href="http://www.napolitopia.com/wp-content/uploads/2010/01/sam9-logo-noIE.jpg"><img class="alignnone size-medium wp-image-34" title="sam9-logo-noIE" src="http://www.napolitopia.com/wp-content/uploads/2010/01/sam9-logo-noIE-300x247.jpg" alt="" width="300" height="247" /></a></p>
<p>I am going to go ahead a regurgitate what everyone has been saying for years now, that IE6 is just well past its prime and its time to retire it. This has been beaten death time and time again, so I am not going to list all the reasons why we should drop it, I am just going to tell you how to make sure that users with IE6 are properly handled on your site.</p>
<p><span id="more-33"></span></p>
<p>Its actually very simple. First you drop in this bit of Javascript.</p>
<pre class="brush:javascript">
//Nothing special here... just telling javascript to kick IE users out
var browser=navigator.appName;
if(browser == "Microsoft Internet Explorer"){
window.location = "no_ie.html";
}else{
//you can remove this, I just like to see what browser we ARE seeing
//alert(browser);
}
</pre>
<p>This should stop IE users, if you are trying to detect some other browser or you are curious what the navigator.appName is returning just un comment the alert above. You can also change the window.location to be any URL you like. In my case I redirect them to <a title="We Hate IE" href="http://napolitopia.com/no_ie.html" target="_blank">a page that thoroughly insults IE6</a>.</p>
<p>Add this to your sites and support<a title="IE Death March" href="http://iedeathmarch.org" target="_blank"> IEDeathMarch.org</a></p>
<p class="tweet_align"><a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+How+to+detect+and+avoid+browsers+with+Javascript+http://tinyurl.com/ya69lp9" title="Post to Twitter"><img class="nothumb" src="http://www.napolitopia.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+How+to+detect+and+avoid+browsers+with+Javascript+http://tinyurl.com/ya69lp9" title="Post to Twitter">Tweet This!</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.napolitopia.com/2010/01/how-to-detect-and-avoid-browsers-with-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Retubing the Marshall (probably belongs on my studio blog)</title>
		<link>http://www.napolitopia.com/2010/01/retubing-the-marshall/</link>
		<comments>http://www.napolitopia.com/2010/01/retubing-the-marshall/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 04:49:56 +0000</pubDate>
		<dc:creator>eightamrock</dc:creator>
				<category><![CDATA[Audio Projects]]></category>
		<category><![CDATA[Picture Posts]]></category>

		<guid isPermaLink="false">http://www.napolitopia.com/?p=29</guid>
		<description><![CDATA[KaPLOW! There goes the power tubes&#8230; so I decided to take some time and really invest in the overall sound of my Marshall JCM2000 DSL100 by retubing and rebiasing the beast.  I had some great friends in the studio recording a few months ago. The guitar player Andy had a hot rodded jcm900 and I [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="shadowbox" href="http://www.napolitopia.com/wp-content/uploads/2010/01/power_tubes.jpg"><img class="alignnone size-medium wp-image-30" title="power_tubes" src="http://www.napolitopia.com/wp-content/uploads/2010/01/power_tubes-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>KaPLOW! There goes the power tubes&#8230; so I decided to take some time and really invest in the overall sound of my Marshall <a title="Marshall Website" href="http://www.marshallamps.com/product.asp?productCode=DSL100" target="_blank">JCM2000 DSL100</a> by retubing and rebiasing the beast.  I had some <a title="The Turnbucklers" href="http://www.myspace.com/theturnbucklers" target="_blank">great friends</a> in the studio recording a few months ago. The guitar player Andy had a hot rodded jcm900 and I was really digging on the sound. I picked his brain and got some great insight into tubes and amp circuits, feeling brave I decided to jump head first into hot rodding my head (that doesn&#8217;t sound right).</p>
<p><span id="more-29"></span></p>
<p>So I decided to first try some new power tubes (<a title="JJ EL34s" href="https://ssl.eurotubes.com/cart/index.php?page=view_products&amp;category_id=3&amp;sub_category_id=19" target="_blank">JJ EL34s</a>). I threw these suckers in and decided that I would go a little lower on the bias then marshall suggests. Personally I think they are a little too conservative with the settings. Marshall suggests a 90MV balanced voltage. This leaves the sound a bit bright and whiny for my taste. Since I wanted something with balls I decided to knock this down to about 87.5 MV. WOW punchy and tight great F**king power tubes.</p>
<p>The problem was that I was still feeling like I really had to blast it to get them to break up nice. After a quick call to my man Andy, he suggested pulling 2 of the power tubes and running the amp at 50w instead of 100w. BAM there it was. I was now replacing all that headroom with a warm crunchy chunk of guitar tone. I was ecstatic.</p>
<p><a rel="shadowbox" href="http://www.napolitopia.com/wp-content/uploads/2010/01/preamp_tubes.jpg"><img class="alignnone size-medium wp-image-31" title="preamp_tubes" src="http://www.napolitopia.com/wp-content/uploads/2010/01/preamp_tubes-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>So now I had to battle the preamps. I ordered some <a title="JJ ECC83s" href="https://ssl.eurotubes.com/cart/index.php?page=view_products&amp;category_id=2&amp;sub_category_id=12" target="_blank">JJ ECC83s (12ax7s)</a> replacements for the original tubes. I threw them in and buttoned it up.. holy shit, that&#8217;s a lot of gain. Listen, if you want the most amazing death metal sound you could ever hope for, these are the tubes for you. Me, not so much.. So I followed up the order with a set of <a title="ECC832" href="https://ssl.eurotubes.com/cart/index.php?page=view_products&amp;category_id=2&amp;sub_category_id=15" target="_blank">JJ ECC832&#8242;s</a> these guys should reduce the gain enough to make me happy&#8230; Not the case :( although I did throw one on the V4 inverted socket which gave me some really great clarity, I was still unhappy with the overall tone of all the gain stages..</p>
<p>So here we are today. After a few more quick texts to my man Andy, I think I am going to get some Tung Sol 12ax7&#8242;s these are supposed to be really warm and chunky. I&#8217;m going to couple them with some ecc803&#8242;s that will round out the mids and hope for the best&#8230; Ill post some sound clips when the new tubes come in.. But I am crossing my fingers that I might just have the right combination&#8230;</p>
<p class="tweet_align"><a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Retubing+the+Marshall+%28probably+belongs+on+my+studio+blog%29+http://tinyurl.com/ybars6e" title="Post to Twitter"><img class="nothumb" src="http://www.napolitopia.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://twitter.com/home/?status=@eightamrock+Retubing+the+Marshall+%28probably+belongs+on+my+studio+blog%29+http://tinyurl.com/ybars6e" title="Post to Twitter">Tweet This!</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.napolitopia.com/2010/01/retubing-the-marshall/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
