<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>RWVHP - Home</title>
  <id>tag:www.rwvhp.com,2009:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.7.3">Mephisto Noh-Varr</generator>
  <link href="http://www.rwvhp.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://www.rwvhp.com/" rel="alternate" type="text/html"/>
  <updated>2008-03-16T10:09:40Z</updated>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2008-03-09:41</id>
    <published>2008-03-09T23:09:00Z</published>
    <updated>2008-03-16T10:09:40Z</updated>
    <category term="Ruby"/>
    <category term="plugins"/>
    <category term="rails"/>
    <category term="ruby"/>
    <link href="http://www.rwvhp.com/2008/3/9/accessibleformbuilder-usage-and-example" rel="alternate" type="text/html"/>
    <title>AccessibleFormBuilder Usage and Example</title>
<content type="html">
            &lt;p&gt;&lt;a href=&quot;http://github.com/shift/accessible_form_builder/tree/master&quot;&gt;AccessibleFormBuilder&lt;/a&gt; has just been pushed out the door.&lt;/p&gt;


&lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;UPDATE&lt;/span&gt;&lt;/strong&gt; This is the example ;)
&lt;pre&gt;
  &amp;lt;% a_form_for :user, :url =&amp;gt; users_path, :legend =&amp;gt; &quot;Login Details&quot; do |f| %&amp;gt;
    &amp;lt;%= f.text_field :login, :label =&amp;gt; &quot;Username&quot;, :note =&amp;gt; &quot;This is visible to other users&quot;, :required =&amp;gt; true %&amp;gt;
    &amp;lt;%= f.password_field :password, :label =&amp;gt; &quot;Password&quot;, :required =&amp;gt; true %&amp;gt;
    &amp;lt;%= f.password_field :password_confirmation, :label =&amp;gt; &quot;Confirm Password&quot;, :required =&amp;gt; true %&amp;gt;
    &amp;lt;%= f.separator &quot;Personal Details&quot; %&amp;gt;
    &amp;lt;%= f.text_field :firstname, :label =&amp;gt; &quot;First name&quot;, :required =&amp;gt; true %&amp;gt;
    &amp;lt;%= f.text_field :lastname, :label =&amp;gt; &quot;Last name&quot;, :required =&amp;gt; true %&amp;gt;
    &amp;lt;%= f.text_field :email, :label =&amp;gt; &quot;E-Mail&quot;, :required =&amp;gt; true %&amp;gt;
    &amp;lt;%= f.separator &quot;Location Details&quot; %&amp;gt;
    &amp;lt;%= f.text_field :address, :label =&amp;gt; &quot;Location&quot;, :note =&amp;gt; &quot;(eg. New York, 90210, SE1 3SR)&quot;, :required =&amp;gt; true %&amp;gt;
    &amp;lt;%= f.submit &quot;Sign up&quot; %&amp;gt;
  &amp;lt;% end %&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;&lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;UPDATE&lt;/span&gt;&lt;/strong&gt; Added &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; output&lt;/p&gt;


&lt;pre&gt;
&amp;lt;form action=&quot;/users&quot; class=&quot;aFrm&quot; method=&quot;post&quot;&amp;gt;&amp;lt;div style=&quot;margin:0;padding:0&quot;&amp;gt;&amp;lt;input name=&quot;authenticity_token&quot; type=&quot;hidden&quot; value=&quot;e39d055ff60d1b5388fcf9864ffd1fa568160b9a&quot; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;fieldset&amp;gt;&amp;lt;legend&amp;gt;Login Details&amp;lt;/legend&amp;gt;&amp;lt;ol&amp;gt;
  &amp;lt;li&amp;gt;&amp;lt;label for=&quot;user_login&quot;&amp;gt;Username:&amp;lt;/label&amp;gt;&amp;lt;input id=&quot;user_login&quot; name=&quot;user[login]&quot; size=&quot;30&quot; type=&quot;text&quot; /&amp;gt;&amp;lt;span class=&quot;requiredField&quot;&amp;gt;*&amp;lt;/span&amp;gt;&amp;lt;em&amp;gt; This is visible to other users&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;&amp;lt;label for=&quot;user_password&quot;&amp;gt;Password:&amp;lt;/label&amp;gt;&amp;lt;input id=&quot;user_password&quot; name=&quot;user[password]&quot; size=&quot;30&quot; type=&quot;password&quot; /&amp;gt;&amp;lt;span class=&quot;requiredField&quot;&amp;gt;*&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;

  &amp;lt;li&amp;gt;&amp;lt;label for=&quot;user_password_confirmation&quot;&amp;gt;Confirm Password:&amp;lt;/label&amp;gt;&amp;lt;input id=&quot;user_password_confirmation&quot; name=&quot;user[password_confirmation]&quot; size=&quot;30&quot; type=&quot;password&quot; /&amp;gt;&amp;lt;span class=&quot;requiredField&quot;&amp;gt;*&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;
      &amp;lt;/ol&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;fieldset&amp;gt;&amp;lt;legend&amp;gt;Personal Details&amp;lt;/legend&amp;gt;
    &amp;lt;ol&amp;gt;

  &amp;lt;li&amp;gt;&amp;lt;label for=&quot;user_firstname&quot;&amp;gt;First name:&amp;lt;/label&amp;gt;&amp;lt;input id=&quot;user_firstname&quot; name=&quot;user[firstname]&quot; size=&quot;30&quot; type=&quot;text&quot; /&amp;gt;&amp;lt;span class=&quot;requiredField&quot;&amp;gt;*&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;

  &amp;lt;li&amp;gt;&amp;lt;label for=&quot;user_lastname&quot;&amp;gt;Last name:&amp;lt;/label&amp;gt;&amp;lt;input id=&quot;user_lastname&quot; name=&quot;user[lastname]&quot; size=&quot;30&quot; type=&quot;text&quot; /&amp;gt;&amp;lt;span class=&quot;requiredField&quot;&amp;gt;*&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;&amp;lt;label for=&quot;user_email&quot;&amp;gt;E-Mail:&amp;lt;/label&amp;gt;&amp;lt;input id=&quot;user_email&quot; name=&quot;user[email]&quot; size=&quot;30&quot; type=&quot;text&quot; /&amp;gt;&amp;lt;span class=&quot;requiredField&quot;&amp;gt;*&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;
      &amp;lt;/ol&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;fieldset&amp;gt;&amp;lt;legend&amp;gt;Location Details&amp;lt;/legend&amp;gt;
    &amp;lt;ol&amp;gt;

  &amp;lt;li&amp;gt;&amp;lt;label for=&quot;user_address&quot;&amp;gt;Location:&amp;lt;/label&amp;gt;&amp;lt;input id=&quot;user_address&quot; name=&quot;user[address]&quot; size=&quot;30&quot; type=&quot;text&quot; /&amp;gt;&amp;lt;span class=&quot;requiredField&quot;&amp;gt;*&amp;lt;/span&amp;gt;&amp;lt;em&amp;gt; (eg. New York, 90210, SE1 3SR)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;&amp;lt;input name=&quot;commit&quot; type=&quot;submit&quot; value=&quot;Sign up&quot; /&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;/ol&amp;gt;&amp;lt;/fieldset&amp;gt;&amp;lt;/form&amp;gt;
&lt;/pre&gt;
Install with

&lt;pre&gt;
git clone git://github.com/shift/accessible_form_builder.git vendor/plugins/accessible_form_builder
&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2008-02-25:36</id>
    <published>2008-02-25T08:31:00Z</published>
    <updated>2008-02-25T08:32:42Z</updated>
    <category term="General Web"/>
    <category term="Home Automation"/>
    <category term="1-wire"/>
    <category term="dmx"/>
    <category term="embedded"/>
    <category term="home-automation"/>
    <category term="serial"/>
    <link href="http://www.rwvhp.com/2008/2/25/serial-is-dead-long-live-serial" rel="alternate" type="text/html"/>
    <title>Serial is Dead, Long Live Serial</title>
<content type="html">
            &lt;p&gt;While looking for the holy grail in home automation protocols, I made a little discovery, a bit of kit called a &lt;a href=&quot;http://www.digi.com/products/embeddedsolutions/digiconnectme.jsp&quot;&gt;Connect ME&lt;/a&gt; made by &lt;a href=&quot;http://www.digi.com&quot;&gt;Digi&lt;/a&gt;. What this bit of hardware does is give you an over-sized &lt;a href=&quot;http://en.wikipedia.org/wiki/RJ45&quot;&gt;&lt;span class=&quot;caps&quot;&gt;RJ45&lt;/span&gt;&lt;/a&gt; plug (or &lt;a href=&quot;http://www.digi.com/products/embeddedsolutions/digiconnectwime.jsp&quot;&gt;wireless antenna&lt;/a&gt;) and built into it is an embedded OS with development kit, now your probably asking &#8220;And?&#8221;, well here&#8217;s the thing in home automation, most of it can be interfaced via serial/&lt;a href=&quot;http://en.wikipedia.org/wiki/RS-232&quot;&gt;RS-232&lt;/a&gt;, which is one of the things the Connect ME has connectivity for (as well as &lt;a href=&quot;http://en.wikipedia.org/wiki/General_purpose_output&quot;&gt;GPOs&lt;/a&gt;), so that &#8220;Service Port&#8221; on the back of your TV/AV Amp may just have another use, &lt;a href=&quot;http://en.wikipedia.org/wiki/X10_%28industry_standard%29&quot;&gt;&lt;span class=&quot;caps&quot;&gt;X10&lt;/span&gt;&lt;/a&gt; / &lt;a href=&quot;http://en.wikipedia.org/wiki/DMX512-A&quot;&gt;&lt;span class=&quot;caps&quot;&gt;DMX&lt;/span&gt;&lt;/a&gt; / &lt;a href=&quot;http://en.wikipedia.org/wiki/1-Wire&quot;&gt;1-Wire&lt;/a&gt; are some of other protocols made accessible.&lt;/p&gt;


	&lt;p&gt;So what do you do once you&#8217;ve hacked up all of the hardware needed to control everything? Start writing the software to interface with it should be a good start, now you don&#8217;t really wanna mess this up as your going to be doing it for lots of different devices, but all with the same hardware constraints, so no nice flashy web interface for this little device, course there is, make the web front-end a back-end, make it a web service and provide an interface that uses it, across all of your home automation devices. Hook the devices up with &lt;a href=&quot;http://rwvhp.com/tags/zeroconf&quot;&gt;Zeroconf&lt;/a&gt; and they can be auto-detected by your interface, plug and play automation, once you build it and code it.&lt;/p&gt;


	&lt;p&gt;Now I know you could setup something like this using &lt;a href=&quot;http://en.wikipedia.org/wiki/SNMP&quot;&gt;&lt;span class=&quot;caps&quot;&gt;SNMP&lt;/span&gt;&lt;/a&gt; but come on where&#8217;s the fun in that?&lt;/p&gt;


	&lt;p&gt;So I guess the title of this should have been &#8220;Serial has gone 2.0&#8221;?&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2008-02-11:29</id>
    <published>2008-02-11T14:25:00Z</published>
    <updated>2008-02-12T10:56:37Z</updated>
    <category term="Quick Guides"/>
    <category term="quick guide"/>
    <category term="search"/>
    <category term="sphinx"/>
    <link href="http://www.rwvhp.com/2008/2/11/installing-sphinx-on-joyent" rel="alternate" type="text/html"/>
    <title>Installing Sphinx On Joyent</title>
<content type="html">
            &lt;p&gt;Installing Sphinx on Joyent is relatively straight forward, I use PostgreSQL over MySQL so some bits may not be relevant.&lt;/p&gt;


&lt;pre&gt;
$ wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8-svn-r1112.tar.gz
$ tar xfvz sphinx-0.9.8-svn-r1112.tar.gz
$ cd sphinx-0.9.8-svn-r1112
$ export PATH=$PATH:/usr/xpg4/bin
$ ./configure --prefix=/opt/csw --without-mysql --with-pgsql &#38;&#38; make &#38;&#38; sudo make install
&lt;/pre&gt;

	&lt;p&gt;One on of our older machines accelerators we needed to adjust the ld paths a little for the PostgreSQL support, meaning the following&lt;/p&gt;


&lt;pre&gt;
$ sudo crle  -l /lib:/usr/lib:/opt/csw/lib:/opt/csw/postgresql/lib
&lt;/pre&gt;

Before
&lt;pre&gt;
$ crle
Configuration file [version 4]: /var/ld/ld.config  
  Platform:     32-bit LSB 80386
  Default Library Path (ELF):   /lib:/usr/lib:/opt/csw/lib:/opt/csw/postgresql/lib
  Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)
&lt;/pre&gt;

After
&lt;pre&gt;
$ crle
Configuration file [version 4]: /var/ld/ld.config  
  Platform:     32-bit LSB 80386
  Default Library Path (ELF):   /lib:/usr/lib:/opt/csw/lib
  Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)
&lt;/pre&gt;

	&lt;p&gt;And you&#8217;ll now find sphinx installed in /opt/csw/bin&lt;/p&gt;


	&lt;p&gt;Comments welcome, Enjoy.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2008-02-09:27</id>
    <published>2008-02-09T11:10:00Z</published>
    <updated>2008-02-09T11:23:43Z</updated>
    <category term="Home Automation"/>
    <category term="diy"/>
    <category term="geeky"/>
    <link href="http://www.rwvhp.com/2008/2/9/wall-mounted-my-tv-what-a-pain" rel="alternate" type="text/html"/>
    <title>Wall mounted my TV what a pain</title>
<content type="html">
            &lt;p&gt;Last night a friend and I wall mounted my &lt;a href=&quot;http://www.samsung.com/uk/consumer/detail/detail.do?group=television&amp;amp;#38;type=television&amp;amp;#38;subtype=tftlcd&amp;amp;#38;model_cd=LE52F96BDX/XEU&quot;&gt;TV&lt;/a&gt; it was simple, put bracket onto wall, put other half of bracket onto TV, lift it up to the wall and put the two bits back together, oh and take the normal stand off&#8230; that was the pain right there, 4 screws, four evil little screws that wouldn&#8217;t budge even tho unscrewed, as if held in with magic, we tried magnetic screwdrivers and even turning the TV horizontal and shaking it, not an easy job with a TV that weighs more then a large dog and is over a meter wide.&lt;/p&gt;


	&lt;p&gt;Got there in the end tho (took about one and half hours).&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/rwvhp/2252472396/&quot; title=&quot;09/02/2008 by shiftnetwork, on Flickr&quot;&gt;&lt;img src=&quot;http://farm3.static.flickr.com/2223/2252472396_72314f6165_m.jpg&quot; height=&quot;180&quot; alt=&quot;09/02/2008&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;I&#8217;m enjoying the &lt;a href=&quot;http://www.buffalo-technology.com/products/network-storage/linkstation/linkstation-live/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;NAS&lt;/span&gt;&lt;/a&gt; + &lt;a href=&quot;http://www.xbox.com/en-US/hardware/x/xbox360elitesystem/default.htm&quot;&gt;&lt;span class=&quot;caps&quot;&gt;XBOX360&lt;/span&gt;&lt;/a&gt; with HD-DVD drive + TV setup, now if only the &lt;span class=&quot;caps&quot;&gt;NAS&lt;/span&gt; + &lt;span class=&quot;caps&quot;&gt;XBOX&lt;/span&gt; supported controllers then I could use my phone to change video.&lt;/p&gt;


	&lt;p&gt;Now what to do for the cables running down the wall.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2008-02-04:22</id>
    <published>2008-02-04T07:41:00Z</published>
    <updated>2008-02-06T08:53:19Z</updated>
    <category term="Ruby"/>
    <category term="mephisto"/>
    <category term="ruby"/>
    <link href="http://www.rwvhp.com/2008/2/4/mephisto-0-8-is-out-with-some-helpfull-additions" rel="alternate" type="text/html"/>
    <title>Mephisto 0.8 is out with some helpful additions</title>
<content type="html">
            &lt;p&gt;The Mephisto team has recently released 0.8 on the way to one point-oh adding&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Switched to will_paginate.&lt;/li&gt;
		&lt;li&gt;Switched from acts_as_attachment to attachment_fu&lt;/li&gt;
		&lt;li&gt;Custom routes&lt;/li&gt;
		&lt;li&gt;Typo and Wordpress converters updates.&lt;/li&gt;
		&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;XML&lt;/span&gt;-RPC interface moved out into a plugin.&lt;/li&gt;
		&lt;li&gt;Multi-site admin interface (shameless plug as I wrote the initial patch).&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Along with more, checkout the change log from git&lt;/p&gt;


&lt;pre&gt;
git clone git://activereload.net/mephisto.git mephisto
cd mephisto; less CHANGELOG
&lt;/pre&gt;

	&lt;p&gt;Happy Blogging.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2008-01-29:19</id>
    <published>2008-01-29T15:12:00Z</published>
    <updated>2008-01-30T09:53:06Z</updated>
    <category term="General Web"/>
    <category term="beta"/>
    <category term="gps"/>
    <category term="location based"/>
    <link href="http://www.rwvhp.com/2008/1/29/yet-another-private-beta-this-ones-different-form-the-rest-i-ve-been-invited-to" rel="alternate" type="text/html"/>
    <title>Yet another private beta, this ones different form the rest I've been invited to</title>
<content type="html">
            &lt;p&gt;This one is a Symbian &lt;span class=&quot;caps&quot;&gt;S60&lt;/span&gt; application that &#8220;pings&#8221; the web server with your location at a user-defined duration or not all (for people with horrible mobile providers that charge by the KB), it&#8217;s currently a closed beta as they&#8217;re only accepting people with &lt;span class=&quot;caps&quot;&gt;GPS&lt;/span&gt; (internal eg. Nokia &lt;span class=&quot;caps&quot;&gt;N95&lt;/span&gt; or Bluetooth) until they&#8217;ve mapped more cell towers to make it useful for people without it.&lt;/p&gt;


	&lt;p&gt;Now you know what it is, heres the name &lt;a href=&quot;http://www.locatik.com&quot;&gt;Locatik&lt;/a&gt; and &lt;a href=&quot;http://www.locatik.com/shift&quot;&gt;my profile&lt;/a&gt; (for the stalkers).&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2008-01-28:16</id>
    <published>2008-01-28T18:54:00Z</published>
    <updated>2008-01-28T18:57:38Z</updated>
    <category term="General Web"/>
    <category term="nabaztag"/>
    <category term="online ordering"/>
    <link href="http://www.rwvhp.com/2008/1/28/oh-the-joys-of-ordering-from-uk-high-street-shops-online" rel="alternate" type="text/html"/>
    <title>Oh the joys of ordering from UK high street shops online</title>
<content type="html">
            &lt;p&gt;&amp;lt;rant&amp;gt;&lt;/p&gt;


	&lt;p&gt;I placed my order with &lt;a href=&quot;http://forbiddenplanet.co.uk&quot;&gt;Forbidden Planet&lt;/a&gt; for a &lt;a href=&quot;http://nabaztag.com&quot;&gt;Nabaztag/tag&lt;/a&gt; on 9/Dec/2007, the order confirmation e-mail they sent out said &#8220;Please allow 21 days from date of order before checking non arrivals.&#8221;, so on 23/Jan/2007 I e-mailed there sales team asking about the status of my order.&lt;/p&gt;


	&lt;p&gt;On the 18th of Jan I return home from work to find a &lt;span class=&quot;caps&quot;&gt;DHL&lt;/span&gt; card on the mat, not knowing what was dispatched I log into my online banking to find that Forbidden Planet have debited my account.&lt;/p&gt;


	&lt;p&gt;Today I got an e-mail from my e-mail sent on the 23/Jan stating &#8220;I can confirm that your order is in the process of being despatched and
should arrive within the next 10-14 days.&#8221;, I get the package picked up, open it and find a&#8230; &lt;a href=&quot;http://www.forbiddenplanet.co.uk/index.php?main_page=product_info&amp;amp;#38;products_id=38429&quot;&gt;Marvel 1/12th Scale Metal Statue &#8211; Wolverine&lt;/a&gt; clearly not what I ordered, box addressed in print to someone else, &lt;span class=&quot;caps&quot;&gt;DHL&lt;/span&gt; sticker put on it delivering it to me.&lt;/p&gt;


	&lt;p&gt;So I&#8217;ve e-mailed them as no one answered the phone number in the sales e-mail and on the invoice asking them to sort the problem.&lt;/p&gt;


	&lt;p&gt;What I can&#8217;t understand is how a company like this can still be in business, first they don&#8217;t have stock listing on the website (something I hadn&#8217;t noticed when I placed the order), second there was no correspondence to say the order was being debited or dispatched, thirdly someone&#8217;s managed to read a woman&#8217;s name and address in the other end of the UK and affix my delivery sticker to it. Fourthly and worst of all is the fact that they don&#8217;t seem to think they&#8217;ve dispatched my order.&lt;/p&gt;


	&lt;p&gt;&amp;lt;/rant&amp;gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2008-01-19:7</id>
    <published>2008-01-19T00:41:00Z</published>
    <updated>2008-01-21T09:15:39Z</updated>
    <category term="Home Automation"/>
    <category term="gems"/>
    <category term="home-automation"/>
    <category term="ruby"/>
    <category term="voip"/>
    <link href="http://www.rwvhp.com/2008/1/19/ordered-some-more-home-automation-stuff" rel="alternate" type="text/html"/>
    <title>Ordered more home automation stuff</title>
<content type="html">
            &lt;p&gt;I like gadgets, probably too much, I also like integrating everything with everything else, so on rolls HA or Home Automation.&lt;/p&gt;


	&lt;p&gt;I&#8217;ve already had a &lt;a href=&quot;http://en.wikipedia.org/wiki/X10_%28industry_standard%29&quot;&gt;&lt;span class=&quot;caps&quot;&gt;X10&lt;/span&gt;&lt;/a&gt; setup for a while that allows me to control lights, I&#8217;ve integrated this with &lt;a href=&quot;http://www.asterisk.org&quot;&gt;Asterisk&lt;/a&gt; (with help from &lt;a href=&quot;http://adhearsion.com/&quot;&gt;Adhearsion&lt;/a&gt;) which allows me to control lights from any phone, I also hooked Asterisk up with &lt;a href=&quot;http://amaok.kde.org&quot;&gt;Amarok&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Well today I ordered some &lt;a href=&quot;http://en.wikipedia.org/wiki/1-Wire&quot;&gt;1-Wire&lt;/a&gt; hardware to play with, I didn&#8217;t fancy running more cables for the 1-Wire setup and found &lt;a href=&quot;http://embeddeddatasystems.com/page/EDS/PROD/HA/HA7Net&quot;&gt;HA7Net&lt;/a&gt; which is a Ethernet to 1-Wire gateway basically, the only problem with it seems to be you need to scrape the embedded web server as it doesn&#8217;t provide any kind of web service. I also ordered a 1-Wire temperature sensor to mess around with, and help me make a Ruby gem for the HA7Net.&lt;/p&gt;


	&lt;p&gt;I&#8217;ll try and get around to documenting what hardware I&#8217;ve got setup, as I can never remember what&#8217;s where and providing what (from VoIP phones, &lt;span class=&quot;caps&quot;&gt;NAS&lt;/span&gt;, embedded machines, servers, consoles to a &lt;a href=&quot;http://nabaztag.com&quot;&gt;Nabaztag&lt;/a&gt;).&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2008-01-17:6</id>
    <published>2008-01-17T07:39:00Z</published>
    <updated>2008-01-18T21:22:34Z</updated>
    <category term="General Web"/>
    <category term="dns"/>
    <category term="openid"/>
    <category term="voip"/>
    <link href="http://www.rwvhp.com/2008/1/17/openid-for-mobile-use-ponderings" rel="alternate" type="text/html"/>
    <title>OpenID for mobile use ponderings</title>
<content type="html">
            &lt;p&gt;Consider this, your browsing the web on your phone with your unlimited data plan and a site requires you to register or login, whats easier to type on the phone? http://rwvhp.com or 07714110660 (my old mobile number), I know different people will prefer one over the other.&lt;/p&gt;


	&lt;p&gt;It is possible and heres how, VoIP uses &lt;a href=&quot;http://en.wikipedia.org/wiki/ENUM&quot;&gt;&lt;span class=&quot;caps&quot;&gt;ENUM&lt;/span&gt;&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/E.164&quot;&gt;e.164&lt;/a&gt; to work out the domain name from the phone number.  This could also be used to work out the OpenID of the user with very little work and as far as I can tell is just as secure as OpenID as both can suffer from attacks via &lt;span class=&quot;caps&quot;&gt;DNS&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;I&#8217;m basically just throwing this out there to get some feedback and as a note to myself.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2007-12-18:5</id>
    <published>2007-12-18T14:49:00Z</published>
    <updated>2008-01-21T09:09:42Z</updated>
    <category term="General Web"/>
    <category term="Ruby"/>
    <category term="gem"/>
    <category term="mojo"/>
    <category term="ruby"/>
    <link href="http://www.rwvhp.com/2007/12/18/i-almost-missed-it" rel="alternate" type="text/html"/>
    <title>I almost missed it</title>
<content type="html">
            &lt;p&gt;&lt;a href=&quot;http://mojo.bt.com&quot;&gt;Mojo&lt;/a&gt; is now in a public beta, if your reading this there is a 99% probability that your in the &lt;a href=&quot;http://www.ruby-lang.org&quot;&gt;Ruby&lt;/a&gt; world so if you want to get started wreaking havoc at work making all of the phones ring you can&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;gem install mojo&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Congrats to the guys at Mojo for a great job.&lt;/p&gt;


	&lt;p&gt;The following is just to claim the blog on its new &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; with Technorati by linking to my 
&lt;a href=&quot;http://technorati.com/claim/632ik7gv2w&quot;&gt;Technorati Profile&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.rwvhp.com,2007-12-17:1</id>
    <published>2007-12-17T11:59:00Z</published>
    <updated>2007-12-17T12:17:31Z</updated>
    <category term="mojo"/>
    <category term="ruby"/>
    <category term="work"/>
    <link href="http://www.rwvhp.com/2007/12/17/new-url-new-host" rel="alternate" type="text/html"/>
    <title>New URL, New host.</title>
<content type="html">
            &lt;p&gt;I got bored of the &lt;a href=&quot;http://rbd.shiftnetwork.co.uk&quot;&gt;old domain name&lt;/a&gt;, so I figured I&#8217;d get a vanity domain for my blog, vanity you say, how does &lt;span class=&quot;caps&quot;&gt;RWVHP&lt;/span&gt;.COM have anything to do with my name.  Well Vincent.com is already registered, VincentPalmer.com is also already registered so I thought, I know I&#8217;ll get a small(ish) domain name that means something to me in some way, So I picked my initials R(obert) W(illiam) V(incent) H(anley) P(almer). Yes, yes, I know, &lt;a href=&quot;http://slimpalmer.com&quot;&gt;my father&lt;/a&gt; didn&#8217;t know when to stop with the names.&lt;/p&gt;


	&lt;p&gt;How onto the host part, the old blog was hosted on a server I was sysadmin of, but the company that was running it recently decided to shut it doors so I was in need of a new host so this blog is hosted on its very own slice at &lt;a href=&quot;http://slicehost.com&quot;&gt;slicehost&lt;/a&gt;, nice to see theres currently no waiting list, I hit order and this slice was being built, very impressive.&lt;/p&gt;


	&lt;p&gt;So on with the party, what have I been upto recently&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Work&lt;/li&gt;
		&lt;li&gt;Accepted into the &lt;a href=&quot;http://mojo.bt.com&quot;&gt;Mojo&lt;/a&gt; alpha&lt;/li&gt;
		&lt;li&gt;Work&lt;/li&gt;
		&lt;li&gt;Authored a &lt;a href=&quot;http://mojo.bt.com&quot;&gt;gem for mojo&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;Work&lt;/li&gt;
	&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2007-03-08:14</id>
    <published>2007-03-08T06:44:00Z</published>
    <updated>2008-01-28T06:46:04Z</updated>
    <category term="Ruby"/>
    <category term="ruby"/>
    <category term="zeroconf"/>
    <link href="http://www.rwvhp.com/2007/3/8/avahi-for-discovering-rest-resources" rel="alternate" type="text/html"/>
    <title>Avahi for discovering REST resources</title>
<content type="html">
            &lt;p&gt;Avahi/Zeroconf or Rendezvous as your Mac would know it, can be used in published &lt;span class=&quot;caps&quot;&gt;DNS&lt;/span&gt; records (unicast) as well as the normal &lt;span class=&quot;caps&quot;&gt;LAN&lt;/span&gt; type setup (multicast), its already a standard why don’t we use this for discovering RESTful resources?&lt;/p&gt;


	&lt;p&gt;All this would require would be a service type registered eg. rest.tcp and a flag in the &lt;span class=&quot;caps&quot;&gt;TXT&lt;/span&gt; record naming your resources eg. “resources=/users /articles /articles/comments”.&lt;/p&gt;


	&lt;p&gt;I brought this up (quite randomly) during a talk at my local Ruby Group (ncl.rb).&lt;/p&gt;


	&lt;p&gt;Gimme your feedback?&lt;/p&gt;


	&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;UPDATE&lt;/span&gt; Forgot to add from the initial post use the :resource/new to get an empty object (to_xml or whatever)&lt;/p&gt;


An example of discovering unicast Zeroconf services is
&lt;pre&gt;
shift@carbon:~# avahi-browse -a -d 0pointer.de
+  n/a  n/a Lennart&amp;amp;#8217;s Blog                                _http-rss._tcp       0pointer.de
+  n/a  n/a tango                                         SSH Remote Terminal  0pointer.de
+  n/a  n/a dt115                                         SSH Remote Terminal  0pointer.de
+  n/a  n/a ring2                                         SSH Remote Terminal  0pointer.de
+  n/a  n/a PulseAudio Web Site                           Web Site             0pointer.de
+  n/a  n/a Avahi Web Site                                Web Site             0pointer.de
+  n/a  n/a Lennart's Blog                                Web Site             0pointer.de
+  n/a  n/a Lennart's Photos                              Web Site             0pointer.de
+  n/a  n/a Lennart's Homepage                            Web Site             0pointer.de
&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2007-03-07:12</id>
    <published>2007-03-07T06:30:00Z</published>
    <updated>2008-01-28T06:41:56Z</updated>
    <category term="Ruby"/>
    <category term="Work"/>
    <category term="apache"/>
    <category term="mongrel"/>
    <category term="rails"/>
    <category term="ruby"/>
    <link href="http://www.rwvhp.com/2007/3/7/apache-2-2-mongrel" rel="alternate" type="text/html"/>
    <title>Apache 2.2 + Mongrel</title>
<content type="html">
            &lt;p&gt;This isn&#8217;t so much a blog post as somewhere convenient to put some information for ncl.rb.&lt;/p&gt;


	&lt;p&gt;My Apache 2.2 + modproxybalancer virtualhost config&lt;/p&gt;


&lt;pre&gt;
&amp;lt;VirtualHost *:80&amp;gt;
  ServerName yourapp.com
  DocumentRoot /home/web/yourapp.com/current/public/
  &amp;lt;Directory &quot;/home/web/yourapp.com/current/public&quot;&amp;gt;
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
  &amp;lt;/Directory&amp;gt;
  # Configure the cluster member proxy
  &amp;lt;Proxy balancer://your_app_cluster&amp;gt;
    BalancerMember http://127.0.0.1:3000
    BalancerMember http://127.0.0.1:3001
    BalancerMember http://127.0.0.1:3002
    BalancerMember http://127.0.0.1:3003
  &amp;lt;/Proxy&amp;gt;
  RewriteEngine On
  # If there is a maintenence.html file in your
  # public dir all requests will get rerouted to
  # this file.  This is for use with capistrano
  RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
  RewriteCond %{SCRIPT_FILENAME} !maintenance.html
  RewriteRule ^.*$ /maintenance.html [L]

  # Rewrite index to check for static index.html
  RewriteRule ^/$ /index.html [QSA]

  # Rewrite to check for Rails cached pages with .html extentions
  RewriteRule ^([^.]+)$ $1.html [QSA]

  # All dynamic requests get sent to the cluster
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ balancer://your_app_cluster%{REQUEST_URI} [P,QSA,L]

  # Deflate for clients that support it.
  AddOutputFilterByType DEFLATE text/html text/plain text/xml
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

  # Error and access logs.
  ErrorLog /var/log/apache/app_error.log
  CustomLog /var/log/apache/app_access.log combined
&amp;lt;/VirtualHost&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;Now if you take the above example it&#8217;ll send all requests to your pack of mongrels, but say you want to have more then one application running on your domain (say beast).&lt;/p&gt;


You&#8217;ll need to create another proxy balancer
&lt;pre&gt;
  &amp;lt;Proxy balancer://your_second_app_cluster&amp;gt;
    BalancerMember http://127.0.0.1:3004
    BalancerMember http://127.0.0.1:3005
    BalancerMember http://127.0.0.1:3006
    BalancerMember http://127.0.0.1:3007
  &amp;lt;/Proxy&amp;gt;
&lt;/pre&gt;
And then add the RewriteRule for it

&lt;pre&gt;
RewriteRule ^/forums/(.*)$ balancer://your_second_app_cluster%{REQUEST_URI} [P,QSA,L]
&lt;/pre&gt;

Now anything going to / that isn&#8217;t /forums/.* will goto yourappcluster and anything with /forums/.* will goto yoursecondapp_cluster
&lt;pre&gt;
&amp;lt;VirtualHost *:80&amp;gt;
  ServerName yourapp.com
  DocumentRoot /home/web/yourapp.com/current/public/
  &amp;lt;Directory &quot;/home/web/yourapp.com/current/public&quot;&amp;gt;
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
  &amp;lt;/Directory&amp;gt;
  # Configure the cluster member proxy
  &amp;lt;Proxy balancer://your_app_cluster&amp;gt;
    BalancerMember http://127.0.0.1:3000
    BalancerMember http://127.0.0.1:3001
    BalancerMember http://127.0.0.1:3002
    BalancerMember http://127.0.0.1:3003
  &amp;lt;/Proxy&amp;gt;
  &amp;lt;Proxy balancer://your_second_app_cluster&amp;gt;
    BalancerMember http://127.0.0.1:3004
    BalancerMember http://127.0.0.1:3005
    BalancerMember http://127.0.0.1:3006
    BalancerMember http://127.0.0.1:3007
  &amp;lt;/Proxy&amp;gt;

  RewriteEngine On
  # If there is a maintenence.html file in your
  # public dir all requests will get rerouted to
  # this file.  This is for use with capistrano
  RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
  RewriteCond %{SCRIPT_FILENAME} !maintenance.html
  RewriteRule ^.*$ /maintenance.html [L]

  # Rewrite index to check for static index.html
  RewriteRule ^/$ /index.html [QSA]

  # Rewrite to check for Rails cached pages with .html extentions
  RewriteRule ^([^.]+)$ $1.html [QSA]

  # All dynamic requests get sent to the cluster
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule ^/forums/(.*)$ balancer://your_second_app_cluster%{REQUEST_URI} [P,QSA,L]
  RewriteRule ^/(.*)$ balancer://your_app_cluster%{REQUEST_URI} [P,QSA,L]

  # Deflate for clients that support it.
  AddOutputFilterByType DEFLATE text/html text/plain text/xml
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

  # Error and access logs.
  ErrorLog /var/log/apache/app_error.log
  CustomLog /var/log/apache/app_access.log combined
&amp;lt;/VirtualHost&amp;gt;
&lt;/pre&gt;
yourappcluster mongrel_cluster.yml
&lt;pre&gt;
---
port: &quot;3000&quot; 
environment: production
address: 127.0.0.1
pid_file: log/mongrel.pid
servers: 4

yoursecondappcluster mongrelcluster.yml

---
port: &quot;3004&quot; 
environment: production
address: 127.0.0.1
pid_file: log/mongrel.pid
servers: 4
&lt;/pre&gt;

	&lt;p&gt;Hope that made sense, as its off the top of the head apart from the base apache 2.2 vhost config&lt;/p&gt;


	&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;UPDATE&lt;/span&gt; If your running a Rails app under a path remember to set&lt;/p&gt;


&lt;pre&gt;
ActionController::AbstractRequest.relative_url_root = '/path'
&lt;/pre&gt;

	&lt;p&gt;In your environment.rb or your links will be wrong&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.rwvhp.com/">
    <author>
      <name>shift</name>
    </author>
    <id>tag:www.rwvhp.com,2007-02-28:13</id>
    <published>2007-02-28T06:42:00Z</published>
    <updated>2008-02-12T11:34:32Z</updated>
    <category term="Ruby"/>
    <category term="ruby"/>
    <category term="shortcuts"/>
    <link href="http://www.rwvhp.com/2007/2/28/ruby-if-shotcuts" rel="alternate" type="text/html"/>
    <title>Ruby If Shotcuts</title>
<content type="html">
            &lt;p&gt;The if statement, sometimes you don&#8217;t want to type&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;if user.password == user.username
    # do something
  end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Sometimes you might just want to simply check that the value set isn&#8217;t nil&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;user.password ||= 'default_password'&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Thats the same as writing&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;if user.password == nil
  user.password = 'default_password'
end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;A slight variation of that would be&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;user.password = params[:password] || 'default_password'&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Which would be the same as&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;if params[:password] != nil
  user.password = params[:password]
else
  user.password = 'default_password'
end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Theres probably more ways of doing things like this that I haven&#8217;t came across yet, if you know of others leave a comment.&lt;/p&gt;
          </content>  </entry>
</feed>
