<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>ducttape.it - home</title>
  <id>tag:ducttape.it,2009:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.8.0">Mephisto Drax</generator>
  <link href="http://ducttape.it/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://ducttape.it/" rel="alternate" type="text/html"/>
  <updated>2009-01-27T16:34:34Z</updated>
  <entry xml:base="http://ducttape.it/">
    <author>
      <name>sob</name>
    </author>
    <id>tag:ducttape.it,2009-01-27:9</id>
    <published>2009-01-27T16:03:00Z</published>
    <updated>2009-01-27T16:34:34Z</updated>
    <category term="announcements"/>
    <category term="projects"/>
    <category term="code"/>
    <category term="examples"/>
    <category term="open source"/>
    <category term="rails"/>
    <category term="salesforce"/>
    <link href="http://ducttape.it/2009/1/27/has_force-a-salesforce-web2lead-gateway" rel="alternate" type="text/html"/>
    <title>has_force: a salesforce web2lead tool</title>
<content type="html">
            &lt;p&gt;For an upcoming project I needed to submit contact and signup submissions directly into salesforce.com for safe keeping. The problem was that the API enabled salesforce.com account runs somewhere around $1500/year per person. For any other level of account salesforce offers a Web2Lead gateway that allows you to POST form data to, along with your organization id (OID) and have it show up as a new unassigned lead.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Problems with the Web2Lead Form&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;b&gt;spam:&lt;/b&gt; If a spammer were to get a hold of your OID they could submit an unlimited number of spam entries.&lt;/li&gt;
  &lt;li&gt;&lt;b&gt;data loss:&lt;/b&gt; What if the form submission fails? Having used the salesforce.com site a bit in the last few weeks I've noticed that while it does seem to be responsive and up, there could be issues.&lt;/li&gt;
  &lt;li&gt;&lt;b&gt;formmail:&lt;/b&gt; The whole process reminded me of the late 90s formmail.pl experience and how easily those were abused.&lt;/ul&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;b&gt;Spam Prevention&lt;/b&gt;&lt;br /&gt;I found a few articles in which people had used various custom fields and incorporated Akismet and Defensio type plugins to prevent bogus submissions which seemed to work great based on their reports. For me this simply added another point of failure to the equation. All I want is their information, and they won't give it to me twice.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;has_force&lt;/b&gt;&lt;br /&gt;What I came up with is &lt;b&gt;&lt;a href=&quot;http://github.com/sob/has_force&quot; title=&quot;has_force source repository (via github.com)&quot;&gt;has_force&lt;/a&gt;&lt;/b&gt;. It's an ActiveRecord extension that once properly configured will pass the attributes of the record to the Web2Lead gateway. In my application I've incorporated courtney's splam plugin to provide some level of spam filtering but I also save the leads into my local app database for later operations (account provisioning, etc).&lt;/p&gt;



&lt;p&gt;&lt;b&gt;Source Code&lt;/b&gt;&lt;br /&gt;The source for &lt;b&gt;&lt;a href=&quot;http://github.com/sob/has_force&quot; title=&quot;has_force source repository (via github.com)&quot;&gt;has_force&lt;/a&gt;&lt;/b&gt; is of course hosted at github at the URL below:&lt;br /&gt;
&lt;a href=&quot;http://github.com/sob/has_force&quot; title=&quot;has_force source repository (via github.com)&quot;&gt;http://github.com/sob/has_force&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://ducttape.it/">
    <author>
      <name>sob</name>
    </author>
    <id>tag:ducttape.it,2008-11-05:5</id>
    <published>2008-11-05T21:25:00Z</published>
    <updated>2008-11-05T21:28:38Z</updated>
    <category term="reviews"/>
    <category term="expandrive"/>
    <category term="osx"/>
    <category term="remote administration"/>
    <category term="ssh"/>
    <link href="http://ducttape.it/2008/11/5/expandrive" rel="alternate" type="text/html"/>
    <title>ExpanDrive</title>
<content type="html">
            &lt;p&gt;Aside from the typical Y! perks (free coffee, coffee bar, and soda) every now and then companies will give a handful of software licenses to Y! developers in an attempt to generate buzz for their software. Some of the software is really strange but every now and then I get a nugget of ones and zeros that changes the way I work. &lt;a href=&quot;http://magnetk.com/expandrive&quot; title=&quot;ExpanDrive homepage (via magnetk.com)&quot;&gt;ExpanDrive&lt;/a&gt; by &lt;a href=&quot;http://magnetk.com&quot; title=&quot;Magnetk, LLC homepage (via magnetk.com)&quot;&gt;Magnetk&lt;/a&gt; is one of those. It's basically a wrapper for fuse-ssh (which has always been a bit buggy for me) that works flawlessly.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Features&lt;/b&gt;
&lt;ul&gt;
  &lt;li&gt;Map drives using SSH (sftp) or FTP/FTPS&lt;/li&gt;
  &lt;li&gt;Automatically reconnect drives at login&lt;/li&gt;
  &lt;li&gt;Fast access from a menu bar icon&lt;/li&gt;
  &lt;li&gt;Directory listing caching to prevent &lt;a href=&quot;http://macromates.com/&quot; title=&quot;TextMate homepage (via macromates.com)&quot;&gt;TextMate&lt;/a&gt; lockups (see below)&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;TextMate + ReMate + ExpanDrive&lt;/b&gt;&lt;br /&gt;One of my biggest gripes about working with network drives is that TextMate constantly refreshes the directory tree upon gaining window focus. This is fine for small folders but large rails apps for example, this can lead to a visible lag. ExpanDrive utilizes some sort of magic caching above what your standard fuse-ssh stuff does to cut down on this but Magnetk recommends using &lt;a href=&quot;http://ciaranwal.sh/remate/&quot; title=&quot;ReMate homepage (via ciaranwal.sh)&quot;&gt;ReMate&lt;/a&gt; by &lt;a href=&quot;http://ciaranwal.sh/&quot; title=&quot;home page for Ciarán Walsh (via ciaranwal.sh)&quot;&gt;Ciarán Walsh&lt;/a&gt; to reduce this lag even further.&lt;/p&gt;

&lt;p&gt;I've found ExpanDrive especially useful here at Y! when working with virtual machines hosted on my linux desktop from my mac laptop. No more copying .vimrc or .profile files among virtual machines that I'm simply throwing away after finishing a task. I can edit and test away all from the comfort of my macbook pro.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://ducttape.it/">
    <author>
      <name>sob</name>
    </author>
    <id>tag:ducttape.it,2008-11-05:4</id>
    <published>2008-11-05T00:25:00Z</published>
    <updated>2009-01-29T18:51:00Z</updated>
    <category term="tips &amp; tricks"/>
    <category term="oracle"/>
    <category term="palm-to-forehead"/>
    <category term="ssh"/>
    <link href="http://ducttape.it/2008/11/5/oracle-ssh-load-balancing" rel="alternate" type="text/html"/>
    <title>oracle + ssh + load balancing</title>
<content type="html">
            &lt;h3&gt;Problem&lt;/h3&gt;
&lt;p&gt;So you've configured your SSH tunnel properly through your corporate login machine and right into your Oracle 10g RAQ.&lt;/p&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;# ssh -L 1521:db.prod.corp.com:1521 login.corp.com&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


&lt;p&gt;You've also pointed your tnsnames.ora to localhost 1521 and can successfully tnsping your connection. However, upon successfully logging in the machine hangs. strace reveals that the listener is directing your client to the production server ip address (ignoring your kind request to use SSH tunnels). This causes the client to timeout immediately after successful authentication.&lt;/p&gt;

&lt;h3&gt;Solution&lt;/h3&gt;
&lt;p&gt;You need to direct the client to use a specific instance (rather than allowing the listener to direct it). You need to specify the instance name in the CONNECT_DATA block. Your TNSNAMES should look something like...&lt;/p&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;BLACKBEAR =&lt;tt&gt;
&lt;/tt&gt; (DESCRIPTION =&lt;tt&gt;
&lt;/tt&gt;   (ADDRESS_LIST =&lt;tt&gt;
&lt;/tt&gt;     (ADDRESS = &lt;tt&gt;
&lt;/tt&gt;       (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))&lt;tt&gt;
&lt;/tt&gt;     (ADDRESS = &lt;tt&gt;
&lt;/tt&gt;       (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))&lt;tt&gt;
&lt;/tt&gt;     (LOAD_BALANCE = YES)&lt;tt&gt;
&lt;/tt&gt;   )&lt;tt&gt;
&lt;/tt&gt;   (CONNECT_DATA =&lt;tt&gt;
&lt;/tt&gt;     (SERVICE_NAME = BLACKBEAR)&lt;tt&gt;
&lt;/tt&gt;     (SRVR = DEDICATED)&lt;tt&gt;
&lt;/tt&gt;     (INSTANCE_NAME = BLACKBEAR1)&lt;tt&gt;
&lt;/tt&gt;   )&lt;tt&gt;
&lt;/tt&gt; )&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


&lt;p&gt;This basically makes load balancing useless and as such should probably not be used for production (use network acls instead) but should be fine on a development or staging machine. If the instance is down simply modify the INSTANCE_NAME value and connect again.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://ducttape.it/">
    <author>
      <name>sob</name>
    </author>
    <id>tag:ducttape.it,2008-11-04:3</id>
    <published>2008-11-04T23:42:00Z</published>
    <updated>2008-11-05T00:52:01Z</updated>
    <category term="announcements"/>
    <link href="http://ducttape.it/2008/11/4/back-in-action" rel="alternate" type="text/html"/>
    <title>back in action</title>
<content type="html">
            &lt;p&gt;So I finally got the blog back up and running, domains re-pointed, mod_rewrite working, oh and Mephisto working properly. I somehow lost my database backups so no return of the old articles, not that there were many but expect more content this time around...&lt;/p&gt;
          </content>  </entry>
</feed>
