<?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>databasically // Kansas City Small Business IT &#38;&#38; Ruby on Rails Programming &#187; Blog</title>
	<atom:link href="http://databasically.com/category/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://databasically.com</link>
	<description>Kansas City Small Business IT</description>
	<lastBuildDate>Fri, 20 Apr 2012 04:38:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Startup Weekend Kansas City</title>
		<link>http://databasically.com/2012/04/18/startup-weekend-kansas-city/</link>
		<comments>http://databasically.com/2012/04/18/startup-weekend-kansas-city/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 04:34:07 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=663</guid>
		<description><![CDATA[How the event is structured Startup Weekend attempt to shove building an entire business into one weekend. You show up, pitch an idea if you want, vote on ideas, then join up with one that you like. Everyone splits up and gets to work, looking forward to Sunday afternoon when you present your work to [...]]]></description>
			<content:encoded><![CDATA[<h2 id="howtheeventisstructured">How the event is structured</h2>
<p><a href="http://kansascity.startupweekend.org" title="Kansas City Startup Weekend">Startup Weekend</a> attempt to shove building an entire business into one weekend.  You show up, pitch an idea if you want, vote on ideas, then join up with one that you like. Everyone splits up and gets to work, looking forward to Sunday afternoon when you present your work to a bunch of people.</p>
<h2 id="thanks">Thanks!</h2>
<p>First, thanks to the organizers. They did a great job answering questions, being available, planning good meals.  The venue at the Kansas City Chamber of Commerce was fantastic, as well.</p>
<h2 id="comparisontorailsrumble">Comparison to Rails Rumble</h2>
<p>My previous experience with weekend events like this was <a href="http://railsrumble.com" title="Rails Rumble">Rails Rumble</a>.  There, you build an entire web application in 48 hours. It has to work. No one cares about if it makes money.  So, coming into the weekend with that premise made me think that we&#8217;d actually have some sort of working prototype at the end of the weekend.</p>
<p>On Sunday, they posted the judging criteria on the website.  Somehow, I&#8217;d missed these during the intro presentation:</p>
<blockquote>
<h2 id="judgingcriteria">Judging Criteria</h2>
<h3 id="customervalidation">Customer Validation</h3>
<ul>
<li>Interview potential and target customers.</li>
<li>Integrate feedback into your product.</li>
<li>Build a fan base and would-be customers.</li>
</ul>
<h3 id="businessmodel">Business model</h3>
<ul>
<li>Differentiate yourself from competitors.</li>
<li>Define your customer acquisition and rollout strategy.</li>
<li>Clearly and realistically articulate your revenue model.</li>
</ul>
<h3 id="execution">Execution</h3>
<ul>
<li>Develop a functional protoype.</li>
<li>Execute well as a team.</li>
</ul>
</blockquote>
<p>I was surprised to see &#8220;develop a functional prototype&#8221; as 1/3 of the judging.  A prototype?  To me, that&#8217;s something you demo and throw away. For instance, maybe you build it in a mockup tool to get an idea of what screens and flows you&#8217;ll have.</p>
<p>So, I focused on this working demo. Exclusively. Meanwhile, the teams that placed had no functionality working; just ideas on how it would work, but they spent a lot more effort on the other sections of their project.</p>
<h2 id="youaintgonnaneedit">You Ain&#8217;t Gonna Need It</h2>
<p>In the agile world, we use the term YAGNI (You Ain&#8217;t Gonna Need It) a lot.  We try not to build features that we&#8217;re not going to need. As the saying goes, &#8220;No code runs faster than no code.&#8221; By focusing on building the smallest thing that works, we can be more productive.</p>
<p>Applying this to the business as a whole, we shouldn&#8217;t work on businesses that aren&#8217;t going to work.  Do the smallest thing that works to validate your business before you jump into designing and coding.</p>
<p>This means asking questions first like &#8220;will people pay me for this?&#8221; and &#8220;how will we find customers?&#8221;</p>
<p>Currently, our company builds web applications for others, so I haven&#8217;t been focused on these questions. As we start thinking about other ideas and products, they&#8217;re going to become increasingly important.</p>
<h2 id="whyisntsomeoneelsedoingit">Why Isn&#8217;t Someone Else Doing It</h2>
<p>This is a great question to ask.  Thanks to Nick Seguin @nickseguin for bringing it up in conversation. I think a good corollary is &#8220;How Are We Going To Do This Better?&#8221; or something similar.  In short, differentiation.</p>
<h2 id="inclosing">In Closing</h2>
<p>All in all, I had a great time. I learned a lot, put some faces to Twitter avatars, had some great conversations, and enjoyed myself. Certainly, I have a lot of food for though, as well. </p>
<p>Comments are welcome, either below or emailed directly to wes on this domain.</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2012/04/18/startup-weekend-kansas-city/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lowdown is now free and open-source</title>
		<link>http://databasically.com/2012/04/09/lowdown-is-now-free-and-open-source/</link>
		<comments>http://databasically.com/2012/04/09/lowdown-is-now-free-and-open-source/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 19:16:03 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=657</guid>
		<description><![CDATA[Lowdown is now open-source]]></description>
			<content:encoded><![CDATA[<p>Lowdown was a Rails Rumble project in 2009, aiming to help business owners that want custom software work with developers and designers to get on the same page.</p>
<p>We continued to maintain Lowdown after Rails Rumble, but it&#8217;s time to let it go live its own life.</p>
<p>So, as of today: </p>
<ol>
<li>Lowdown is now 100% free with unlimited projects and unlimited collaborators. All current and paid subscribers have been converted to the free plan. </li>
<li>Lowdown is now Open Source Software. For more information please visit:  <a href="http://github.com/databasically/lowdown">http://github.com/databasically/lowdown</a></li>
<li>Support for the free hosted version has moved to Github issues. Please see #2 for more information. </li>
<li>We&#8217;ve migrated Lowdown to Heroku. All current projects will be intact, although there may be minor (if any) disruption in service as DNS propagates. Thanks for your patience.</li>
</ol>
<p>Thanks for trying/using Lowdown! If you&#8217;re interested in participating in the OS version, please contact us: <a href="http://twitter.com/databasically">@databasically</a></p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2012/04/09/lowdown-is-now-free-and-open-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bundler 1.1 vs 1.0 install speedup</title>
		<link>http://databasically.com/2012/03/08/bundler-1-1-vs-1-0-install-speedup/</link>
		<comments>http://databasically.com/2012/03/08/bundler-1-1-vs-1-0-install-speedup/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 20:11:57 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=646</guid>
		<description><![CDATA[Bundler 1.1 went official yesterday.  One of the big improvements is speed.  Previous versions of bundler would need to download all of the rubygems information in order to build a dependency tree. Whenever you see Fetching source index for http://rubygems.org/ when you do a bundle install, that&#8217;s bundler downloading the file with all of the gems&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://gembundler.com/">Bundler</a> 1.1 went official yesterday.  One of the big improvements is speed.  Previous versions of bundler would need to download all of the rubygems information in order to build a dependency tree.</p>
<p>Whenever you see <code>Fetching source index for http://rubygems.org/</code> when you do a <code>bundle install</code>, that&#8217;s bundler downloading the file with all of the gems&#8217; information.</p>
<p>Now, bundler 1.1 is smarter about this.  It can ask rubygems.org directly to give it the dependencies for a list of gems (see this post for a better explanation of the actual <a href="http://patshaughnessy.net/2011/10/14/why-bundler-1-1-will-be-much-faster">rubygems bundler API calls</a>) and use that to start downloading the gems.</p>
<p>Here are my results, for a project with a brand new empty gemset:</p>
<pre name="code" class="ruby">
$ gem install bundler -v=1.0.18 &#038;&#038; time bundle install
Installing ...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

real	48.174s
user	38.411s
sys	19.535s

$ gem install bundler -v=1.1.0 &#038;&#038; time bundle install
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

real	22.015s
user	28.377s
sys	18.442s
</pre>
<p>Speedy!</p>
<p>Check out the <code>bundle install --verbose</code> option if you want more insight into what bundler is doing, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2012/03/08/bundler-1-1-vs-1-0-install-speedup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kansas City Ruby:  What&#8217;s New in Ruby &#8211; February 2012</title>
		<link>http://databasically.com/2012/02/22/kansas-city-ruby-whats-new-in-ruby-february-2012/</link>
		<comments>http://databasically.com/2012/02/22/kansas-city-ruby-whats-new-in-ruby-february-2012/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 01:36:55 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Kansas City]]></category>
		<category><![CDATA[Kansas City Ruby User Group]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=639</guid>
		<description><![CDATA[At the beginning of each Kansas City Ruby meeting, I do a quick presentation on some new neat things from the last month in Ruby news. &#160; What&#8217;s New In Ruby February 2012 Ruby on Rails 3.2 released http://weblog.rubyonrails.org/ Faster development mode End of Ruby 1.8.7 puts Person.active.limit(5).explain Automatically shows when &#62; half a second [...]]]></description>
			<content:encoded><![CDATA[<p>At the beginning of each Kansas City Ruby meeting, I do a quick presentation on some new neat things from the last month in Ruby news.</p>
<p><iframe src="https://docs.google.com/present/embed?id=dgw9ksj_1cbtfshfp&amp;autoStart=true&amp;loop=true" frameborder="0" width="410" height="342"></iframe></p>
<p>&nbsp;</p>
<h2>What&#8217;s New In Ruby</h2>
<h3>February 2012</h3>
<h4>Ruby on Rails 3.2 released</h4>
<p><a href="http://weblog.rubyonrails.org/">http://weblog.rubyonrails.org/</a></p>
<ul>
<li>Faster development mode</li>
<li>End of Ruby 1.8.7</li>
<li>
<pre>puts Person.active.limit(5).explain</pre>
</li>
<li>Automatically shows when &gt; half a second</li>
<li>TaggedLogger</li>
</ul>
<h4></h4>
<h4>ActiveRecord Store</h4>
<pre>class User &lt; ActiveRecord::Base
  store :settings, accessors: [ :color, :homepage ]
end</pre>
<pre>u = User.new(color: 'black', homepage: '37signals.com')
u.color # Accessor stored attribute</pre>
<pre>  # Any attribute, even if not specified with an accessor
u.settings[:country] = 'Denmark'</pre>
<h3>RubyMine 4.0 released</h3>
<p><a href="http://blog.jetbrains.com/ruby/2012/02/rubymine-4-is-here-to-make-you-feel-the-productivity/">http://blog.jetbrains.com/ruby/2012/02/rubymine-4-is-here-to-make-you-feel-the-productivity/</a></p>
<p>RubyMine is a popular Ruby and Rails IDE by JetBrains (the folks behind IntelliJ IDEA).</p>
<p>A focus has been put on improving its performance and UI, but it now also supports all of Rails 3.2 features, including CoffeeScript compilation right from the IDE.</p>
<h3>Spree 1.0 Released</h3>
<p><a href="http://spreecommerce.com/">http://spreecommerce.com/</a></p>
<p>Spree is almost certainly the most popular, fully featured Rails-based e-commerce system and its creators are proud to announce the release of version 1.0.0.</p>
<h3>Strano</h3>
<p><a href="https://github.com/joelmoss/strano">https://github.com/joelmoss/strano</a><br />
The Github backed Capistrano deployment management UI.</p>
<h3>Guard::RSpectacle</h3>
<p><a href="https://github.com/netzpirat/guard-rspectacle">https://github.com/netzpirat/guard-rspectacle</a><br />
Guard::RSpectacle automatically tests your application with RSpec when files are modified.</p>
<h3>Lightning Talks</h3>
<ul>
<li>Samuel Mullen: using search provider shortcuts in Google Chrome, <a href="http://samuelmullen.com/2012/02/power-up-search-in-google-chrome/">blog post</a></li>
<li>Jaime Bellmyer: searching with <a href="http://leap2.com/">leap2</a></li>
<li>Advanced REST Client: help view API responses with Chrome app <a href="https://chrome.google.com/webstore/detail/hgmloofddffdnphfgcellkdfbfbjeloo">link</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2012/02/22/kansas-city-ruby-whats-new-in-ruby-february-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using aliases to forward incoming mail on Ubuntu</title>
		<link>http://databasically.com/2012/01/25/using-aliases-to-forward-incoming-mail-on-ubuntu/</link>
		<comments>http://databasically.com/2012/01/25/using-aliases-to-forward-incoming-mail-on-ubuntu/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 08:13:26 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=635</guid>
		<description><![CDATA[I only need to do this every couple years when I renew an SSL certificate and they want to verify domain ownership by sending to some non-standard address like ssladmin@example.com. So, here&#8217;s how: Edit the virtual alias file: (sudo) vi /etc/postfix/virtual Add your alias and the address(es) it forwards to: ssladmin@example.com realemail@example.com contact@example.com sales@gmail.com,support@gmail.com Reload [...]]]></description>
			<content:encoded><![CDATA[<p>I only need to do this every couple years when I renew an SSL certificate and they want to verify domain ownership by sending to some non-standard address like <code>ssladmin@example.com</code>.</p>
<p>So, here&#8217;s how:</p>
<p>Edit the virtual alias file:</p>
<pre name="code" class="ruby">
(sudo) vi /etc/postfix/virtual
</pre>
<p>Add your alias and the address(es) it forwards to:</p>
<pre name="code" class="ruby">
ssladmin@example.com   realemail@example.com
contact@example.com    sales@gmail.com,support@gmail.com
</pre>
<p>Reload the postfix virtual table:</p>
<pre name="code" class="ruby">
postmap /etc/postfix/virtual
</pre>
<p>Also make sure you have following line in /etc/postfix/main.cf file:</p>
<pre name="code" class="ruby">
virtual_alias_maps = hash:/etc/postfix/virtual
</pre>
<p>If you didn&#8217;t have that and you just added it, reload all of postfix:</p>
<pre name="code" class="ruby">
service postfix reload
</pre>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2012/01/25/using-aliases-to-forward-incoming-mail-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Even better: hiding zero balance clients/projects in Harvest Uninvoiced Report</title>
		<link>http://databasically.com/2011/12/16/even-better-hiding-zero-balance-clientsprojects-in-harvest-uninvoiced-report/</link>
		<comments>http://databasically.com/2011/12/16/even-better-hiding-zero-balance-clientsprojects-in-harvest-uninvoiced-report/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 03:51:27 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=627</guid>
		<description><![CDATA[I got a few comments on the original post (Hide zero balance clients in Harvest Uninvoiced Report) about not suppressing projects that have a zero balance if the overall client has some billing. For instance, this report with some $0 projects and some $0 clients. The previous bookmarklet would only hide the clients with a [...]]]></description>
			<content:encoded><![CDATA[<p>I got a few comments on the <a href="http://databasically.com/2011/09/09/hide-zero-balance-clients-in-harvest-uninvoiced-report/" title="Hide zero balance clients in Harvest Uninvoiced Report">original post</a> (<a href="http://databasically.com/2011/09/09/hide-zero-balance-clients-in-harvest-uninvoiced-report/">Hide zero balance clients in Harvest Uninvoiced Report</a>) about not suppressing projects that have a zero balance if the overall client has some billing.</p>
<p>For instance, this report with some $0 projects and some $0 clients.  The previous bookmarklet would only hide the clients with a total of $0, which could still leave a lot of cruft floating around:<br />
<img src="http://f.cl.ly/items/2L330v0s0m0W0n2q0S3A/harvest-lots-of-zeros.png" alt="Lots of zeros!" width="547" height="441" /></p>
<p>The new bookmarklet will reduce it down to this:<br />
<img src="http://f.cl.ly/items/1C37120f2h1u3c363822/harvest-no-zeros.png" alt="No more zeros!" width="548" height="88" /></p>
<p>Here&#8217;s the actual code:<br />
<script src="https://gist.github.com/1484362.js?file=gistfile1.js"></script></p>
<p>And here&#8217;s a bookmarklet to drag to your browser bookmark bar:<br />
<a href="javascript:$$('tbody%20.btn-disabled').each(function(element,index){element.up('tbody').hide()});$$('td.ur-name%20a.gray').each(function(element,index){element.up('tr').hide()});void(0);">Harvest Hide Uninvoiced</a></p>
<p>Note: this is very dependent on the implementation of the Harvest report, so if this breaks in the future, you should <a href="http://twiter.com/wesgarrison">ping me on twitter</a> to let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/12/16/even-better-hiding-zero-balance-clientsprojects-in-harvest-uninvoiced-report/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hide zero balance clients in Harvest Uninvoiced Report</title>
		<link>http://databasically.com/2011/09/09/hide-zero-balance-clients-in-harvest-uninvoiced-report/</link>
		<comments>http://databasically.com/2011/09/09/hide-zero-balance-clients-in-harvest-uninvoiced-report/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 04:42:01 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=613</guid>
		<description><![CDATA[UPDATE: Check out the updated bookmarklet for more functionality: Even better: hiding zero balance clients/projects in Harvest Uninvoiced Report I love the Harvest Uninvoiced Report. I actually built the same thing for myself using the Harvest API, so I could run it at will and see what client balances were. The Harvest provided one goes [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE:</strong> Check out the updated bookmarklet for more functionality:<br />
<a href="http://databasically.com/2011/12/16/even-better-hiding-zero-balance-clientsprojects-in-harvest-uninvoiced-report/" title="Even better: hiding zero balance clients/projects in Harvest Uninvoiced Report">Even better: hiding zero balance clients/projects in Harvest Uninvoiced Report</a></p>
<hr />
<p>I love the Harvest <a href="http://www.getharvest.com/blog/2011/05/the-uninvoiced-report-for-time-expenses/">Uninvoiced Report</a>. I actually built the same thing for myself using the Harvest API, so I could run it at will and see what client balances were.</p>
<p>The Harvest provided one goes a couple steps further, showing expenses and giving a link to create an invoice.</p>
<p>One thing, though:</p>
<p><img src="http://f.cl.ly/items/2c1j033w3j0z1W3d1T0r/harvest-uninvoiced.png" alt="harvest uninvoiced" height="322" width="584" /></p>
<p>We have a lot of clients and there might be a while that we don&#8217;t do something for someone. Showing all of these clients that don&#8217;t have a balance makes it hard to focus on the ones that <strong>do</strong> have a balance. This is the &#8216;Uninvoiced&#8217; report, after all, which I tend to use for &#8220;who do I need to invoice?&#8221;</p>
<p>Digging in, we can use some javascript to find the rows that are non-invoice-able and hide them:<br />
<script src="https://gist.github.com/1205514.js"> </script></p>
<p>Here&#8217;s a bookmarklet for you:<br />
<a href="javascript:$$('tbody%20.btn-disabled').each(function(element,%20index)%20{%20element.up('tbody').hide()%20});void(0);">Harvest Hide Uninvoiceable</a></p>
<p>Drag it to your bookmarks bar, go to the uninvoiced report, and click to hide.</p>
<p>Questions and improvements welcome, best way to get ahold of me is to <a href="http://twitter.com/wesgarrison">follow me on Twitter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/09/09/hide-zero-balance-clients-in-harvest-uninvoiced-report/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Use vim to remove ^M end of line characters</title>
		<link>http://databasically.com/2011/08/31/use-vim-to-remove-control-m-end-of-line-characters/</link>
		<comments>http://databasically.com/2011/08/31/use-vim-to-remove-control-m-end-of-line-characters/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 08:48:47 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=603</guid>
		<description><![CDATA[Sometimes, when you open a file in vim, the end-of-line (EOL) characters are messed up. You&#8217;ll especially see this if you move a file from Windows to Unix.  You&#8217;ll see a ^M at the end of each line. How do you remove all of these ^M characters from vim? :%s/^M//g The most difficult part of [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, when you open a file in vim, the end-of-line (EOL) characters are messed up. You&#8217;ll especially see this if you move a file from Windows to Unix.  You&#8217;ll see a ^M at the end of each line.</p>
<p>How do you remove all of these ^M characters from vim?</p>
<pre name="code" class="ruby">:%s/^M//g</pre>
<p>The most difficult part of this is entering the control character.  You type ^V to get that, making the actual keys you press this:</p>
<pre name="code" class="ruby">:%s/&lt;control&gt;V&lt;control&gt;M//g</pre>
<p>Breaking it down:</p>
<ul>
<li><code>:%s</code> &#8211; search and replace using regular expressions</li>
<li><code>^M</code> &#8211; the control V &#8211; control M characters</li>
<li><code>g</code> &#8211; global replace, ie replace all</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/08/31/use-vim-to-remove-control-m-end-of-line-characters/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using SQL to delete rows from a table using INNER JOIN to another table</title>
		<link>http://databasically.com/2011/08/31/using-sql-to-delete-rows-from-a-table-using-inner-join/</link>
		<comments>http://databasically.com/2011/08/31/using-sql-to-delete-rows-from-a-table-using-inner-join/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 03:22:45 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=592</guid>
		<description><![CDATA[Oftentimes, one wants to delete some records from a table based on criteria in another table. How do you delete from one of those tables without removing the records in both table? DELETE DeletingFromTable FROM DeletingFromTable INNER JOIN CriteriaTable ON DeletingFromTable.field_id = CriteriaTable.id WHERE CriteriaTable.criteria = "value"; The key is that you specify the name [...]]]></description>
			<content:encoded><![CDATA[<p>Oftentimes, one wants to delete some records from a table based on criteria in another table. How do you delete from one of those tables without removing the records in both table?</p>
<pre class="ruby" name="code">DELETE DeletingFromTable
 FROM DeletingFromTable INNER JOIN CriteriaTable
 ON DeletingFromTable.field_id = CriteriaTable.id
 WHERE CriteriaTable.criteria = "value";</pre>
<p>The key is that you specify <strong>the name of the table to be deleted</strong> from as the <strong>SELECT</strong>. So, the JOIN and WHERE do the selection and limiting, while the DELETE does the deleting.</p>
<p>You&#8217;re not limited to just one table, though. If you have a many-to-many relationship (for instance, Magazines and Subscribers, joined by a Subscription) and you&#8217;re removing a Subscriber, you need to remove any potential records from the join model as well.</p>
<pre class="ruby" name="code">
DELETE subscribers, subscriptions
 FROM subscribers INNER JOIN subscriptions
   ON subscribers.id = subscriptions.subscriber_id
 INNER JOIN magazines
   ON subscriptions.magazine_id = magazines.id
 WHERE subscribers.name='Wes';
</pre>
<p>Deleting records with a join could also be done with a LEFT JOIN and a WHERE to see if the joined table was NULL, so that you could remove records in one table that didn&#8217;t have a match (like in preparation for adding a relationship.)  Example post to come.</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/08/31/using-sql-to-delete-rows-from-a-table-using-inner-join/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuration for mailjet email delivery with Ruby on Rails</title>
		<link>http://databasically.com/2011/06/07/configuration-for-mailjet-email-delivery-with-ruby-on-rails/</link>
		<comments>http://databasically.com/2011/06/07/configuration-for-mailjet-email-delivery-with-ruby-on-rails/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 10:00:03 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=583</guid>
		<description><![CDATA[Setting up mailjet.com to deliver your mail via Ruby on Rails? Here&#8217;s how, because their Getting Started is nothing but placeholder headers right now. Create an account Go to https://www.mailjet.com and create an account. Note: the word &#8220;Faculatative&#8221; means &#8220;optional&#8221; on the signup form. Add your sending address Add a sending address (Accounts > Sender [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up mailjet.com to deliver your mail via Ruby on Rails?  Here&#8217;s how, because their <a href="https://www.mailjet.com/docs/getting_started">Getting Started</a> is nothing but placeholder headers right now.</p>
<div class="thumbnail"><a href="https://skitch.com/wesg/fdkc8/mailjet-real-time-emailing-mailjet.com"><img src="https://img.skitch.com/20110607-bmbfb3f4pjrcawsya4yab9dcic.preview.jpg" alt="Mailjet : Real-time Emailing - mailjet.com" /></a></div>
</p>
<p><span id="more-583"></span><br />
<h2>Create an account</h2>
<p>Go to <a href="https://www.mailjet.com">https://www.mailjet.com</a> and create an account.</p>
<p>Note: the word &#8220;Faculatative&#8221; means &#8220;optional&#8221; on the signup form.</p>
<h2>Add your sending address</h2>
<ul>
<li>Add a sending address (Accounts > <a href="https://www.mailjet.com/account/sender">Sender Addresses</a>)</li>
<li>Update your Rails ActionMailer configuration
<ul>
<li>Find the settings you need at: <a href="https://www.mailjet.com/account/setup">https://www.mailjet.com/account/setup</a></p>
<pre>
    SMTP server:
    in.mailjet.com

    Username (API Key):
    12345678901234567890

    Password (Secret Key):
    99999999999999999999999999999999

    Port:
    25 or 587 (some providers block port 25)

    Use TLS:
    yes
  </pre>
</li>
<li>Set these settings in config/application.rb (or config/environments/production.rb):
<pre name="code" class="ruby">

    config.action_mailer.raise_delivery_errors = false
    config.action_mailer.perform_deliveries = true

    config.action_mailer.smtp_settings = {
      :address => "in.mailjet.com",
      :enable_starttls_auto => true,
      :port => 587,
      :authentication => 'plain',
      :user_name => "12345678901234567890",
      :password => "99999999999999999999999999999999"
    }
</pre>
</li>
</ul>
</li>
</ul>
<h2>Setup domain authentication (SPF and/or DomainKeys/DKIM)</h2>
<h3>SPF</h3>
<p>
  <img src="https://img.skitch.com/20110607-nmn91j4ukdp8yna3pup3qu1sb8.png" alt="My Account - mailjet.com" /><br />
  Click <b>Domain DNS and SMTP setup</b>.<br />
  Then, under <b>Domain Authentication</b>, click your domain.
</p>
<p>Setting up SPF requires adding a DNS entry. Mailjet will look at your existing one and give you the one to replace it with.<br />
  It&#8217;ll look something like: <br /><code>domainname.com.	IN TXT "v=spf1 include:spf.mailjet.com mx ~all"</code><br />
  In my DNS manager, I created a TXT record, gave it a name of &#8220;domainname.com.&#8221; and set the value to the <br /><code>'v=spf1 include:spf.mailjet.com mx ~all'</code> portion (without the quotes).  The full example they give you is for the DNS zone syntax, which you may or may not have.</p>
<p>  If you need help configuring this, <a href="/contact-us">we would be happy to help you</a>.</p>
<h3>DKIM</h3>
<p>
  This is similar, a TXT record that has a key that identifies your server so mail can be sent.  Same deal.
</p>
<h2>Test</h2>
<p>Deploy your changes and kick off something that sends a mailer.  We have a Notifier model that has a <code>test_email()</code> method that I just called from the console to push a test through.  I just went to the reports and saw it there.</p>
<p>All in all, the service seems a little rough around the edges, mostly due to it being a French company that could use a little work on the translations and some serious love on the support documentations.  Hope this helps you get started with Mailjet configuration!</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/06/07/configuration-for-mailjet-email-delivery-with-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

