<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>a.muse: Tag proxy</title>
    <link>http://www.jessirae.com/blog/articles/tag/proxy</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Browser Bar for mouseHole</title>
      <description>Add the following line to any of your user scripts in your &lt;code&gt;.mouseHole&lt;/code&gt; folder to add a browser bar at the top of every page your view with &lt;a href="http://code.whytheluckystiff.net/mouseHole/"&gt;mouseHole;&lt;/a&gt; like this&amp;#8230;
&lt;pre&gt;&lt;code&gt;def rewrite(page)
  document.search('//a[@href]') do |link|
    href = URI(link.attributes['href']) rescue nil
    next unless href &amp;#38;&amp;#38; href.host &amp;#38;&amp;#38; href.host != page.location.host
    link.after '&amp;lt;span style="font-size:8px"&amp;gt;[' + href.host + ']&amp;lt;/span&amp;gt;'
  end

#add the following line 
  document.search("body").prepend("&amp;lt;a href=\"http://del.icio.us/jowensbysandifer\"&amp;gt;" 
  +"&amp;lt;img src=\"http://127.0.0.1:3704/doorway/static/images/delicious.gif\" /&amp;gt;" 
  +"&amp;lt;/a&amp;gt;")
#just include your links to your favorite sites and you can check them... 
#   no matter where you are

end&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Oh and don&amp;#8217;t forget to place any icons in the static/images folder in your mouseHole application.&lt;/p&gt;


	&lt;p&gt;&lt;del&gt;-Teehe!  And if I knew how to get the url to the script, I could submit sites to del.icio.us (or whatever site I wanted) via javascript&amp;#8230; but that might be dangerous!&lt;/del&gt;-&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;:&lt;/p&gt;


	&lt;p&gt;Here&amp;#8217;s how to submit a site to del.icio.us via the browser bar by getting the page url.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Step 1&lt;/em&gt;: save the request in proxyhandler.rb as &lt;code&gt;$request&lt;/code&gt;.  A global&amp;#8230; bad I know :-(
I&amp;#8217;m still figuring out how mouseHole works.  Maybe the best thing to do would be to write the value out to the database?&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Step 2&lt;/em&gt;: add submit html to a user script or create a new one (I call mine &lt;code&gt;browserbar.rb&lt;/code&gt;), like this&amp;#8230;&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
document.search("body").prepend("&amp;lt;a href=\"http://del.icio.us/jowensbysandifer?url=" 
+ $request.to_s + "&amp;#38;submit=save&amp;#38;jump=no\"&amp;gt;" 
+" &amp;lt;img src=\"http://127.0.0.1:3704/doorway/static/images/delicious.gif\" /&amp;gt;&amp;lt;/a&amp;gt;")
&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;&lt;em&gt;Step 3&lt;/em&gt;: Restart mouseHole.&lt;/p&gt;</description>
      <pubDate>Tue, 24 Apr 2007 18:06:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:af7cf2a8-404d-41f1-8737-b6b0f2f53417</guid>
      <author>Jessica</author>
      <link>http://www.jessirae.com/blog/articles/2007/04/24/browser-bar-for-mousehole</link>
      <category>technology</category>
      <category>ruby &amp; rails</category>
      <category>script</category>
      <category>proxy</category>
      <category>browser</category>
      <category>ruby</category>
      <category>mouseHole</category>
      <trackback:ping>http://www.jessirae.com/blog/articles/trackback/12697</trackback:ping>
    </item>
    <item>
      <title>Install mouseHole on Ubuntu</title>
      <description>&lt;a href="http://code.whytheluckystiff.net/mouseHole/wiki"&gt;mouseHole&lt;/a&gt; is a personal proxy server written in ruby, allowing you to&amp;#8230;
	&lt;blockquote&gt;
		&lt;p&gt;rewrite the web as you view it, altering content and behavior as you browse. Basically, it&amp;#8217;s an alternative to Greasemonkey, which does similar things from inside the Firefox web browser.&lt;/p&gt;
	&lt;/blockquote&gt;


&lt;center&gt;&lt;img src="http://www.jessirae.com/blog/files/doorway2.png" alt="" /&gt;&lt;/center&gt;

	&lt;p&gt;To get mouseHole up and running, first install the required gems (json and sqlite3) if you don&amp;#8217;t already have them installed.  I encountered the following issues while installing those gems&amp;#8230;&lt;/p&gt;


&lt;ul&gt;&lt;strong&gt;Installing json&lt;/strong&gt;

	&lt;p&gt;&lt;a href="http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/8382"&gt;lib/json/editor.rb:977:50: &amp;#8217;:&amp;#8217; not followed by identified or operator&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;The solution is to remove the colon from line 977.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Installing sqlite3&lt;/strong&gt;&lt;/p&gt;


The command for installing the sqlite3 gem is &lt;em&gt;gem install sqlite3-ruby&lt;/em&gt; and not gem install sqlite3.
&lt;/ul&gt;

	&lt;p&gt;Lastly, if you are running Debian or Ubuntu, visit &lt;em&gt;http://localhost:3704&lt;/em&gt; instead of &lt;em&gt;http://127.0.0.1:3704&lt;/em&gt; after starting mouseHole.&lt;/p&gt;
</description>
      <pubDate>Mon, 15 Jan 2007 00:23:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:45c3ef13-699f-4745-8c67-39fea4bf27cf</guid>
      <author>Jessica</author>
      <link>http://www.jessirae.com/blog/articles/2007/01/15/install-mousehole</link>
      <category>technology</category>
      <category>ruby &amp; rails</category>
      <category>ubuntu</category>
      <category>_why</category>
      <category>install</category>
      <category>ruby</category>
      <category>proxy</category>
      <category>mouseHole</category>
      <trackback:ping>http://www.jessirae.com/blog/articles/trackback/7750</trackback:ping>
    </item>
  </channel>
</rss>
