<?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>Stanley Shilov - Web Development, SEO and SEM</title>
	<atom:link href="http://www.stanleyshilov.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stanleyshilov.com</link>
	<description>Web Development with a twist of Affiliate Marketing</description>
	<lastBuildDate>Sun, 14 Mar 2010 00:54:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to build Firefox 3.5+ with JSSH on Ubuntu 9.10 64bit</title>
		<link>http://www.stanleyshilov.com/blog/compile-firefox-jssh-ubuntu-9-10-64bit-ruby-watir/</link>
		<comments>http://www.stanleyshilov.com/blog/compile-firefox-jssh-ubuntu-9-10-64bit-ruby-watir/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 00:11:15 +0000</pubDate>
		<dc:creator>Stanley</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.stanleyshilov.com/?p=318</guid>
		<description><![CDATA[A brief guide on how to compile Firefox 3.5 and later with JSSH support on Ubuntu ]]></description>
			<content:encoded><![CDATA[<p>I needed to run Firefox with JSSH support on <a href="http://www.ubuntu.com/getubuntu/download">Ubuntu 9.10 x64</a> in order to use it with <a href="http://watir.com/">Ruby&#8217;s Watir</a> library. Unfortunately the <abbr title="Firefox Extension">xpi</abbr> file available on the watir site does not support 64bit Ubuntu, which meant I had to compile Firefox from scratch with builtin support for JSSH.</p>
<p>The configuration file (.mozconfig) has changed slightly with the newer versions of Firefox, so the older <a href="http://www.google.com/search?q=firefox+jssh">guides</a> out there no longer work. Below is an updated step by step process which works up to Firefox 3.7a1pre (the newest version available at the time of this writing). Needless to say, this should also work with Firefox 3.5 and 3.6.</p>
<p><span id="more-318"></span>Build all the necessary packages to compile Firefox:</p>
<pre class="brush: bash;">
sudo apt-get build-dep firefox
</pre>
<p>Mozilla has switched from CVS to mercurial for source code management. Install mercurial and fetch the source:</p>
<pre class="brush: bash;">
sudo apt-get install mercurial
hg clone http://hg.mozilla.org/mozilla-central/ mozilla
</pre>
<p>The above will retrieve the latest version of Minefield. If you want use 3.6 or 3.5, check out this <a href="https://developer.mozilla.org/En/Mozilla_Source_Code_%28Mercurial%29">Mozilla wiki</a>.</p>
<p>Once the source is done downloading, <em>cd</em> into <em>mozilla</em> and create the <em>.mozconfig</em> file:</p>
<pre class="brush: bash;">
cd mozilla
vim .mozconfig
</pre>
<pre class="brush: bash;">
# .mozconfig:
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-jssh
ac_add_options --enable-extensions=default,jssh
ac_add_options --enable-application=browser
ac_add_options --enable-webservices
ac_add_options --disable-libnotify
ac_add_options --disable-necko-wifi
</pre>
<p>The last two lines are optional. It might be because I&#8217;m using <a href="http://awesome.naquadah.org/">awesome</a>, but the source wouldn&#8217;t compile for me without those last two lines.</p>
<p>Save the file and run make:</p>
<pre class="brush: bash;">
make -f client.mk build
</pre>
<p>It&#8217;ll take a few minutes but once it&#8217;s done you can launch Firefox by running:</p>
<pre class="brush: bash;">
./firefox-jssh/dist/bin/firefox -jssh
</pre>
<p>Keep in mind, this is separate from any existing Firefox installation you might have already had.<br />
I would recommend creating a <a href="http://www.stanleyshilov.com/blog/how-to-run-multiple-firefox-instances/">separate Firefox profile</a> to use for this installation.</p>
<p>If you&#8217;re doing this to get Watir running, you can test it out with this simple script:</p>
<pre class="brush: ruby;">
require 'rubygems'
require 'firewatir'

fx = FireWatir::Firefox.new
fx.goto(&quot;http://www.whatismyreferrer.com&quot;);
</pre>
<p>It should open a new window and change the URL to <a href="http://www.whatismyreferrer.com">http://www.whatismyreferrer.com</a></p>
<p>That&#8217;s about it. Hope this helps a few of you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stanleyshilov.com/blog/compile-firefox-jssh-ubuntu-9-10-64bit-ruby-watir/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How I Keep Track of Projects &amp; Progress</title>
		<link>http://www.stanleyshilov.com/blog/how-keep-track-projects-progress/</link>
		<comments>http://www.stanleyshilov.com/blog/how-keep-track-projects-progress/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 09:24:30 +0000</pubDate>
		<dc:creator>Stanley</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.stanleyshilov.com/?p=296</guid>
		<description><![CDATA[Being able to keep projects organized is essential to growing my business, because it allows me to concentrate on multiple ventures without skipping a beat. This post lists out several solutions that allow me to keep track of workflow and progress.
Pivotal Tracker &#8211; PT is a free web-based project management tool. Its simplicity makes it [...]]]></description>
			<content:encoded><![CDATA[<p>Being able to keep projects organized is essential to growing my business, because it allows me to concentrate on multiple ventures without skipping a beat. This post lists out several solutions that allow me to keep track of workflow and progress.</p>
<p><span id="more-296"></span><strong><a href="http://www.pivotaltracker.com/">Pivotal Tracker</a></strong> &#8211; PT is a free web-based project management tool. Its simplicity makes it ideal for keeping track of small and personal projects. It&#8217;s especially useful for projects consisting of small teams, where ideas need to be prioritized in an ever-changing environment.</p>
<p><a href="http://www.mediawiki.org/wiki/MediaWiki"><strong>MediaWiki</strong></a> &#8211; If it&#8217;s important but not of immediate use, I dump it into my wiki. Retaining everything you come across isn&#8217;t practical or feasible. Text files are great, but messy in the long run. A wiki provides one with the flexibility of a notepad, and the reference power of an encyclopedia.</p>
<p>In the past, I relied heavily on Evernote to organize all of my notes. Despite it&#8217;s many benefits, it is proprietary software. Due to its closed-source nature, it provides no plugins, limited markup and UI has flaws that made it difficult for me to navigate my notes. Switching to MediaWiki was well worth it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stanleyshilov.com/blog/how-keep-track-projects-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Mad Libs function</title>
		<link>http://www.stanleyshilov.com/blog/java-mad-libs-function/</link>
		<comments>http://www.stanleyshilov.com/blog/java-mad-libs-function/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 17:21:48 +0000</pubDate>
		<dc:creator>Stanley</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[content generation]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[madlib]]></category>

		<guid isPermaLink="false">http://www.stanleyshilov.com/?p=284</guid>
		<description><![CDATA[This madlibs Java function finds keyword combinations contained in {curly brackets} and randomly selects one of the keywords.
Ex: This {string&#124;sentence&#124;bit of text} will be different every time you {run&#124;execute} the {function&#124;method&#124;Mad Lib function&#124;madlib method}

// Madlib function:
public static String madlib(String content){
	Pattern regex = Pattern.compile(&#34;\\{(.*?)\\}&#34;);
	Matcher matches = regex.matcher(content);

	String[] madlibArray = null;

	while(matches.find()){
		madlibArray = matches.group(1).split(&#34;\\&#124;&#34;);
		content = content.replace(&#34;{&#34; + matches.group(1) [...]]]></description>
			<content:encoded><![CDATA[<p>This <a href="http://www.stanleyshilov.com/blog/code-java-mad-libs-function/">madlibs Java function</a> finds keyword combinations contained in {curly brackets} and randomly selects one of the keywords.</p>
<p><strong>Ex:</strong> This {string|sentence|bit of text} will be different every time you {run|execute} the {function|method|Mad Lib function|madlib method}</p>
<pre class="brush: java;">
// Madlib function:
public static String madlib(String content){
	Pattern regex = Pattern.compile(&quot;\\{(.*?)\\}&quot;);
	Matcher matches = regex.matcher(content);

	String[] madlibArray = null;

	while(matches.find()){
		madlibArray = matches.group(1).split(&quot;\\|&quot;);
		content = content.replace(&quot;{&quot; + matches.group(1) + &quot;}&quot;, madlibArray[(int) (Math.random() * madlibArray.length)]);
	}
	return content;
}
</pre>
<p>If you have any suggestions on how to improve this method, leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stanleyshilov.com/blog/java-mad-libs-function/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubiquity Rapidshare Extension</title>
		<link>http://www.stanleyshilov.com/blog/ubiquity-rapidshare-extension/</link>
		<comments>http://www.stanleyshilov.com/blog/ubiquity-rapidshare-extension/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 19:44:20 +0000</pubDate>
		<dc:creator>Stanley</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[rapidshare]]></category>
		<category><![CDATA[ubiquity]]></category>

		<guid isPermaLink="false">http://www.stanleyshilov.com/?p=233</guid>
		<description><![CDATA[If you use Ubiquity, this simple extension makes it easy to grab and open any number of Rapidshare links:

CmdUtils.CreateCommand({
name: &#34;rapidshare&#34;,
  preview: function(pblock){
    var selection=context.focusedWindow.getSelection();
    selection=selection.toString();
    selection=selection.match(/http:\/\/rapidshare[^\s]*/gi);
    var links='';
    for(var i=0; i&#60;selection.length; i++){
      links=links+selection[i]+&#34;&#60;br /&#62;&#34;;
 [...]]]></description>
			<content:encoded><![CDATA[<p>If you use <a href="http://labs.mozilla.com/projects/ubiquity/">Ubiquity</a>, this simple extension makes it easy to grab and open any number of Rapidshare links:</p>
<pre class="brush: jscript;">
CmdUtils.CreateCommand({
name: &quot;rapidshare&quot;,
  preview: function(pblock){
    var selection=context.focusedWindow.getSelection();
    selection=selection.toString();
    selection=selection.match(/http:\/\/rapidshare[^\s]*/gi);
    var links='';
    for(var i=0; i&lt;selection.length; i++){
      links=links+selection[i]+&quot;&lt;br /&gt;&quot;;
    }
    pblock.innerHTML=links;
  },
  execute: function(){
    var selection=context.focusedWindow.getSelection();
    selection=selection.toString();
    selection=selection.match(/http:\/\/rapidshare[^\s]*/gi);
    if(selection!=null){
      var links=selection.length;
      for(var i=0; i&lt;links; i++) Utils.openUrlInBrowser(selection[i]);
    }
  }
})
</pre>
<p>The code examines the selected block of text, extracts URLs which resemble Rapidshare links and opens each link in a new tab.</p>
<p><strong>To use:</strong> select the block of text, ctrl + alt to open ubiquity, then start typing &#8220;rapidshare&#8221;</p>
<p>PS: The code can be easily modified to work with other sites, simply replace any mention of &#8220;rapidshare&#8221; with the applicable site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stanleyshilov.com/blog/ubiquity-rapidshare-extension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sentence Capitalization with Java</title>
		<link>http://www.stanleyshilov.com/blog/proper-sentence-capitalization-java/</link>
		<comments>http://www.stanleyshilov.com/blog/proper-sentence-capitalization-java/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 03:19:02 +0000</pubDate>
		<dc:creator>Stanley</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://www.stanleyshilov.com/?p=250</guid>
		<description><![CDATA[Simple Java function to capitalize the first word of every sentence:

public static String capitalize(String content){
	Pattern capitalize = Pattern.compile(&#34;([\\?!\\.] )([a-z])&#34;);
	Matcher m = capitalize.matcher(content);
	while (m.find()) {
		content = m.replaceFirst(m.group(1) + m.group(2).toUpperCase());
		m = capitalize.matcher(content);
	}
	return content;
}

If you have any suggestions on how to improve this method, leave a comment.
]]></description>
			<content:encoded><![CDATA[<p>Simple Java function to capitalize the first word of every sentence:</p>
<pre class="brush: java;">
public static String capitalize(String content){
	Pattern capitalize = Pattern.compile(&quot;([\\?!\\.] )([a-z])&quot;);
	Matcher m = capitalize.matcher(content);
	while (m.find()) {
		content = m.replaceFirst(m.group(1) + m.group(2).toUpperCase());
		m = capitalize.matcher(content);
	}
	return content;
}
</pre>
<p>If you have any suggestions on how to improve this method, leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stanleyshilov.com/blog/proper-sentence-capitalization-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to: Running Multiple Firefox Instances</title>
		<link>http://www.stanleyshilov.com/blog/how-to-run-multiple-firefox-instances/</link>
		<comments>http://www.stanleyshilov.com/blog/how-to-run-multiple-firefox-instances/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 22:30:16 +0000</pubDate>
		<dc:creator>Stanley</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.stanleyshilov.com/?p=192</guid>
		<description><![CDATA[Setting up multiple instances of Firefox is a 5 minute task which is made possible by the creation of separate profiles, whereby each instance of Firefox will use its own profile. A few key points about profiles:

Every profile has its own set of bookmarks, extensions, themes and browsing history.
If one instance of Firefox crashes, it [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up multiple instances of Firefox is a 5 minute task which is made possible by the creation of separate profiles, whereby each instance of Firefox will use its own profile. A few key points about profiles:</p>
<ul>
<li>Every profile has its own set of bookmarks, extensions, themes and browsing history.</li>
<li>If one instance of Firefox crashes, it will not bring down other instances of Firefox running under different profiles.</li>
<li>The only thing shared between profiles are the plugins (Java, Flash, etc).</li>
<li>Separate profiles can be used to run different versions of Firefox at the same time.</li>
</ul>
<p><span id="more-192"></span></p>
<p>Here&#8217;s how it&#8217;s done:</p>
<ol>
<li>Launch the profile manager to create a new profile:<br />
&#8220;C:\Program Files\Mozilla Firefox\firefox.exe&#8221; <strong>-profilemanager</strong></p>
<p><img class="alignnone size-full wp-image-195" title="Firefox Profile Manager" src="http://www.stanleyshilov.com/wp-content/uploads/2008/10/profile-manager.gif" alt="Firefox Profile Manager" /></p>
<p>Make sure you close all current instances of Firefox otherwise it will simply open a new window instead of the manager.</li>
<li>Create a new profile. I would recommend using a single lowercase word.</li>
<li>Modify your Firefox shortcut to look like this:<br />
&#8220;C:\Program Files\Mozilla Firefox\firefox.exe&#8221; <strong>-P</strong> &#8220;profile-name&#8221;</p>
<p><img class="alignnone size-full wp-image-198" src="http://www.stanleyshilov.com/wp-content/uploads/2008/10/firefox-shortcut.gif" alt="Firefox Shortcut Profile -no-remote" /></li>
<li>Now that you&#8217;ve setup separate profiles, you still need to tell Firefox to run them independently of one another, by adding the &#8220;-no-remote&#8221; option to one or both of your shortcuts:<br />
&#8220;C:\Program Files\Mozilla Firefox\firefox.exe&#8221; <strong>-P</strong> &#8220;profile-name&#8221; <strong>-no-remote</strong></li>
</ol>
<p><strong>-no-remote</strong> allows you to run multiple profiles simultaneously, otherwise any new request to open a Firefox window will simply attach the window to the profile that&#8217;s already running.<strong><br />
-no-remote</strong> effectively tells Firefox to open an independent instance of the indicated profile.</p>
<p>The disadvantage of the <strong>-no-remote</strong> option is that it limits you to one instance of a profile at any given time, so clicking twice on a Firefox shortcut that has the<strong> -no-remote</strong> parameter will give you the following error.</p>
<p><img class="size-full wp-image-193" src="http://www.stanleyshilov.com/wp-content/uploads/2008/10/close-firefox.gif" alt="Firefox Instance already running" /></p>
<p>Getting around this is fairly simple: only add <strong>-no-remote</strong> to the profile that you expect to use less often.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stanleyshilov.com/blog/how-to-run-multiple-firefox-instances/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
