<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.justaddwater.dk/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>justaddwater.dk</title>
	
	<link>http://justaddwater.dk</link>
	<description>Instant Usability &amp; Web Standards</description>
	<lastBuildDate>Sun, 07 Feb 2010 13:13:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.justaddwater.dk/jaw/posts" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="jaw/posts" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">jaw/posts</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Rake Task To Validate All Items on All Models</title>
		<link>http://justaddwater.dk/2010/02/07/rake-task-to-validate-all-items-on-all-models/</link>
		<comments>http://justaddwater.dk/2010/02/07/rake-task-to-validate-all-items-on-all-models/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 13:13:04 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1270</guid>
		<description><![CDATA[I wanted a way to see if somebody had entered &#8220;illegal&#8221; data into loaded fixtures. So I wrote this simple rake task. It&#8217;s also useful to run as you add more validations to your files.

]]></description>
			<content:encoded><![CDATA[<p>I wanted a way to see if somebody had entered &#8220;illegal&#8221; data into loaded fixtures. So I wrote this simple rake task. It&#8217;s also useful to run as you add more validations to your files.</p>
<p><script src="http://gist.github.com/297427.js"></script></p>
<div class="feedflare">
<a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=MumqDlDjiNU:YloO7AKOR54:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=MumqDlDjiNU:YloO7AKOR54:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jaw/posts?i=MumqDlDjiNU:YloO7AKOR54:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=MumqDlDjiNU:YloO7AKOR54:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=MumqDlDjiNU:YloO7AKOR54:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jaw/posts/~4/MumqDlDjiNU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2010/02/07/rake-task-to-validate-all-items-on-all-models/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac Harddisk Upgrade Usability Improvements</title>
		<link>http://justaddwater.dk/2010/02/04/mac-harddisk-upgrade-usability-improvements/</link>
		<comments>http://justaddwater.dk/2010/02/04/mac-harddisk-upgrade-usability-improvements/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 21:56:23 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[User experience]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[usablitiy]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1264</guid>
		<description><![CDATA[Blogging for the first time in a long time from my wife&#8217;s computer, because I&#8217;m installing my brand new Intel SSD hard drive in my macbook.

Oddly enough I ran into a few things during the install process that I think Apple could improve in their interface. (using Snow Leopard)
Apple should recognize a new unformatted disk [...]]]></description>
			<content:encoded><![CDATA[<p>Blogging for the first time in a long time from my wife&#8217;s computer, because I&#8217;m installing my brand new Intel SSD hard drive in my macbook.</p>
<p><a href="http://justaddwater.dk/wp-content/uploads/2010/02/intel_160gb_ssd.jpg"><img class="aligncenter size-thumbnail wp-image-1265" title="intel_160gb_ssd" src="http://justaddwater.dk/wp-content/uploads/2010/02/intel_160gb_ssd-150x150.jpg" alt="intel_160gb_ssd" width="150" height="150" /></a></p>
<p>Oddly enough I ran into a few things during the install process that I think Apple could improve in their interface. (using Snow Leopard)</p>
<h2>Apple should recognize a new unformatted disk inserted and show an install guide</h2>
<p>I took out the old disk, inserted the new one, and booted the machine. After 1-2 minutes of nothing, a big folder with a questionmark appeared in the middle of the screen &#8212; blinking. No helpful text (no text at all). Just one big blinking questionmark on top of a folder.</p>
<p>Several things could have helped me here.</p>
<ul>
<li>Show a helpful message that boot disk is not found (it may have crashed or have been replaced)</li>
<li>Show a note that to select a boot menu, restart the computer while pressing and holding the &#8216;C&#8217; key.</li>
<li>Detect that a new harddisk (other than the one used on last successful boot) is inserted, and show a message helpful for explaining harddisk upgrade steps.</li>
<li>Tell me that I need to insert the Mac OS X disk in order to restore the system, restore backups, or install.</li>
<li>After loading the Mac OS install menu from the Mac OS X disk, there is one big primary action: Install new OS on this computer. I rushed and pressed, but should have looked for the secondary options in the dropdown menus. An easy improvement is to add smaller, visually less dominant, but visible  secondary options (&#8221;format new hard drive&#8221;, &#8220;restore system from backup&#8221;).</li>
</ul>
<p>Many of these points are pretty obvious when i write it now, but I <em>know </em>each one of them could have saved me brain cycles and time in the harddisk swap process.</p>
<p>I wasted 2 hours of valuable time here. Because of the missing help on screens, first I put the old hard drive back in. Then I put the SSD drive in a usb-dockingstation to investigate it with Disk Utility. Then I called Thomas to learn that I had to press &#8216;C&#8217; at startup to force a boot menu. Furthermore I was too quick and pressed &#8220;Install new system&#8221;, before I found the dropdown menu and saw the menu item I should have taken: &#8220;Restore the system from backup&#8221;</p>
<p><a href="../wp-content/uploads/2010/02/IMG_0198-restore-system-from-backup-mac-osx10.6.jpg"><img title="IMG_0198-restore-system-from-backup-mac-osx10.6" src="../wp-content/uploads/2010/02/IMG_0198-restore-system-from-backup-mac-osx10.6.jpg" alt="IMG_0198-restore-system-from-backup-mac-osx10.6" width="250" height="188" /></a></p>
<p>By the way, It took roughly 3 hours to read 120GB from the TimeCapsule and everything was back up and running. Hooray for TimeCapsule.</p>
<p>Photos and more info from:<a rel="bookmark" href="http://njr.sabi.net/2009/01/15/restoring-a-hard-drive-from-time-machine/"></a></p>
<ul>
<li>njr 3.0:  <a rel="bookmark" href="http://njr.sabi.net/2009/01/15/restoring-a-hard-drive-from-time-machine/">Restoring a hard drive from Time Machine</a></li>
<li>James Duncan Davidson: <a href="http://blog.duncandavidson.com/2008/01/restoring-from-time-machine.html">Restoring  from Time Machine</a></li>
<li>Legit Storage Reviews: <a href="http://www.legitreviews.com/article/1022/1/">Intel X25-M 160GB 34nm MLC G2 SSD Benchmark Review</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=eK0fm95YesQ:VIfWVdEwE_w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=eK0fm95YesQ:VIfWVdEwE_w:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jaw/posts?i=eK0fm95YesQ:VIfWVdEwE_w:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=eK0fm95YesQ:VIfWVdEwE_w:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=eK0fm95YesQ:VIfWVdEwE_w:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jaw/posts/~4/eK0fm95YesQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2010/02/04/mac-harddisk-upgrade-usability-improvements/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How To Recover Deleted Subversion Branch</title>
		<link>http://justaddwater.dk/2009/12/09/how-to-recover-deleted-subversion-branch/</link>
		<comments>http://justaddwater.dk/2009/12/09/how-to-recover-deleted-subversion-branch/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 15:33:48 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1257</guid>
		<description><![CDATA[I recently deleted a branch from our (svn) code repository. Did you know that it&#8217;s the general recommendation to delete a branch after a merge to ensure that nobody commits to it. (see svnmerge wiki for more on that advice)
Svn checkout, svn info, etc. all fail when you try to access the deleted branch immediately:

$ [...]]]></description>
			<content:encoded><![CDATA[<p>I recently deleted a branch from our (svn) code repository. Did you know that it&#8217;s the general recommendation to delete a branch after a merge to ensure that nobody commits to it. (see <a href="http://www.orcaware.com/svn/wiki/Svnmerge.py#Merging_development_branches_back_to_trunk">svnmerge wiki</a> for more on that advice)</p>
<p>Svn checkout, svn info, etc. all fail when you try to access the deleted branch immediately:</p>
<blockquote><pre>
$ HOST=https://repository.com/repos_path
$ svn log --limit=3 $HOST/portal/branches/VA1-12
svn: '/svn/repos_path/!svn/bc/8881/portal/branches/VA1-12' path not found
</pre>
</blockquote>
<p>But the interesting thing is that we need to add a so-called peg revision, denoted by the @ after the URL:</p>
<blockquote><pre>
$ svn log --limit=3 $HOST/portal/branches/VA1-12@8800

------------------------------------------------------------------------
r8774 | jronn | 2009-11-23 11:30:40 +0100 (Mon, 23 Nov 2009) | 3 lines

Max height in search results (indberetninger): 34px is 2 lines for a total of max 4 lines.

Also converted spaces to tabs and removed trailing whitespace for consistency
------------------------------------------------------------------------
r8769 | jronn | 2009-11-17 17:01:25 +0100 (Tue, 17 Nov 2009) | 1 line

Horizontal train first-shot with new image files
------------------------------------------------------------------------
r8768 | jronn | 2009-11-17 17:01:21 +0100 (Tue, 17 Nov 2009) | 1 line

Removed image files having not been used for a long time
------------------------------------------------------------------------
</pre>
</blockquote>
<p>And to recover the deleted branch (for instance by checking out a copy):</p>
<pre>
<blockquote>
$ svn co $HOST/portal/branches/VA1-12@8800 va112
</blockquote>
</pre>
<p>More info on <a href="http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html">peg revisions in svn book</a></p>
<div class="feedflare">
<a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=-lO3XBeoABo:H1qBZCJ0Bkc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=-lO3XBeoABo:H1qBZCJ0Bkc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jaw/posts?i=-lO3XBeoABo:H1qBZCJ0Bkc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=-lO3XBeoABo:H1qBZCJ0Bkc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=-lO3XBeoABo:H1qBZCJ0Bkc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jaw/posts/~4/-lO3XBeoABo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/12/09/how-to-recover-deleted-subversion-branch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To add “Open folder in Textmate” to Finder Context Menu</title>
		<link>http://justaddwater.dk/2009/12/08/how-to-add-open-folder-in-textmate-to-finder-context-menu/</link>
		<comments>http://justaddwater.dk/2009/12/08/how-to-add-open-folder-in-textmate-to-finder-context-menu/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 09:44:43 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[automator]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1252</guid>
		<description><![CDATA[I wanted to add a menu item in Finder&#8217;s context menu that would open the selected folder in Textmate.

A google search suggested the method described by K. Adam Christensen on his blog: &#8220;Opening a directory in TextMate from Finder&#8220;. However, from the documentation, I learned that that method is now outdated. Snow Leopard users should [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to add a menu item in Finder&#8217;s context menu that would open the selected folder in Textmate.<br />
<a href="http://justaddwater.dk/wp-content/uploads/2009/12/Screen-shot-2009-12-08-at-10.24.20-AM.png"><img src="http://justaddwater.dk/wp-content/uploads/2009/12/Screen-shot-2009-12-08-at-10.24.20-AM-289x300.png" alt="Textmate context menu item: Open selected folder in  Textmate" title="Textmate context menu item: Open selected folder in  Textmate" width="289" height="300" class="aligncenter size-medium wp-image-1253" /></a></p>
<p>A google search suggested the method described by K. Adam Christensen on his blog: &#8220;<a href="http://shifteleven.com/articles/2006/09/17/opening-a-directory-in-textmate-from-finder">Opening a directory in TextMate from Finder</a>&#8220;. However, from the documentation, I learned that that method is now outdated. Snow Leopard users should use &#8220;Services&#8221; and not &#8220;workflow&#8221; for setting this up.</p>
<p>Here is what I did:</p>
<p>Open Automator.app. </p>
<p>From the menu item &#8220;File&#8221; > &#8220;New&#8221; choose &#8220;Services&#8221;</p>
<p><a href="http://justaddwater.dk/wp-content/uploads/2009/12/Screen-shot-2009-12-08-at-10.22.00-AM.png"><img src="http://justaddwater.dk/wp-content/uploads/2009/12/Screen-shot-2009-12-08-at-10.22.00-AM-300x280.png" alt="Automator-File-New-Service" title="Automator-File-New-Service" width="300" height="280" class="aligncenter size-medium wp-image-1254" /></a></p>
<p>Now there are 3 steps to be filled out like so:</p>
<p><a href="http://justaddwater.dk/wp-content/uploads/2009/12/Screen-shot-2009-12-08-at-10.23.23-AM.png"><img src="http://justaddwater.dk/wp-content/uploads/2009/12/Screen-shot-2009-12-08-at-10.23.23-AM-300x152.png" alt="Automator final setup for &quot;open in textmate&quot; Finder.app context menu itm" title="Automator final setup for &quot;open in textmate&quot; Finder.app context menu itm" width="300" height="152" class="aligncenter size-medium wp-image-1255" /></a><br />
First, edit the top so that &#8220;Service recieves selected: <strong>files or folders</strong> in <strong>Finder.app</strong>&#8220;.</p>
<p>Second, add the action &#8220;Get Selected Finder Items&#8221; from the left column (use the search field to find, then drag selected into the right work area).</p>
<p>Third, add the action &#8220;Run Shell Script&#8221; to your service. Fill in the following command:</p>
<pre>cat | xargs mate</pre>
<p>Finally, choose &#8220;File&#8221; &gt; &#8220;Save&#8230;&#8221; and give it a name like &#8220;Open in Textmate&#8221;</p>
<div class="feedflare">
<a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=IZFPkHLpAD8:t6fBVDdm7Ww:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=IZFPkHLpAD8:t6fBVDdm7Ww:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jaw/posts?i=IZFPkHLpAD8:t6fBVDdm7Ww:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=IZFPkHLpAD8:t6fBVDdm7Ww:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=IZFPkHLpAD8:t6fBVDdm7Ww:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jaw/posts/~4/IZFPkHLpAD8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/12/08/how-to-add-open-folder-in-textmate-to-finder-context-menu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to make Git ignore files that already exist in your project</title>
		<link>http://justaddwater.dk/2009/12/07/how-to-make-git-ignore-files-that-already-exist-in-your-project/</link>
		<comments>http://justaddwater.dk/2009/12/07/how-to-make-git-ignore-files-that-already-exist-in-your-project/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 12:28:34 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[ignore]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1247</guid>
		<description><![CDATA[For a project I&#8217;m working on, I had to change some files with personal settings, and the files kept showing up with a git status. 
Adding files to .gitignore that are already tracked does not work. (and it&#8217;s actually pretty well documented in the documentation). In stead, it&#8217;s possible to use this command:
git update-index --assume-unchanged [...]]]></description>
			<content:encoded><![CDATA[<p>For a project I&#8217;m working on, I had to change some files with personal settings, and the files kept showing up with a <code>git status</code>. </p>
<p>Adding files to .gitignore that are already tracked does not work. (and it&#8217;s actually pretty well documented in the documentation). In stead, it&#8217;s possible to use this command:</p>
<pre>git update-index --assume-unchanged [filename(s)]</pre>
<p>From <a href="http://www.kernel.org/pub/software/scm/git/docs/git-update-index.html">git-update-index manual page</a>:</p>
<blockquote cite="http://www.kernel.org/pub/software/scm/git/docs/git-update-index.html"><pre><code>--assume-unchanged
--no-assume-unchanged</code></pre>
<p>  When these flags are specified, the object names recorded for the paths are not updated. Instead, these options set and unset the &#8220;assume unchanged&#8221; bit for the paths.</p>
<p> When the &#8220;assume unchanged&#8221; bit is on, git stops checking the working tree files for possible modifications, so you need to manually unset the bit to tell git when you change the working tree file. This is sometimes helpful when working with a big project on a filesystem that has very slow lstat(2) system call (e.g. cifs). </p>
</blockquote>
<p>Fantastic! my system files are now ignored by git :) </p>
<p>It&#8217;s an incredibly useful tip for example if you have files that MUST live in the repository and that servers/editors change. In this particular project, Tomcat keeps changing two files. Furthermore I have changed the log-level from INFO to WARN which I should not commit into the repository. </p>
<p><code>git update-index --assume-unchanged</code> lets me do exactly that.</p>
<div class="feedflare">
<a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=gro37KyvRFs:X6IITDGm3LU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=gro37KyvRFs:X6IITDGm3LU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jaw/posts?i=gro37KyvRFs:X6IITDGm3LU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=gro37KyvRFs:X6IITDGm3LU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=gro37KyvRFs:X6IITDGm3LU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jaw/posts/~4/gro37KyvRFs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/12/07/how-to-make-git-ignore-files-that-already-exist-in-your-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Run Tiny Webserver From Any Directory</title>
		<link>http://justaddwater.dk/2009/12/01/run-tiny-webserver-from-any-directory/</link>
		<comments>http://justaddwater.dk/2009/12/01/run-tiny-webserver-from-any-directory/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 19:56:13 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1245</guid>
		<description><![CDATA[There are alternatives to Resolve Symlinks When Copying Files With Rsync .
How about firing up a (tiny) webserver that starts up quickly. Yehuda Katz suggested this some years ago:

Just drop this file in any directory, run the script, and it serves the files. I use this frequently for instance when I need to browser test [...]]]></description>
			<content:encoded><![CDATA[<p>There are alternatives to<a title="Permanent Link to Resolve Symlinks When Copying Files With Rsync" rel="bookmark" href="../2009/10/15/resolve-symlinks-when-copying-files-with-rsync/"> Resolve Symlinks When Copying Files With Rsync .</a></p>
<p>How about firing up a (tiny) webserver that starts up quickly. Yehuda Katz suggested this some years ago:</p>
<p><script src="http://gist.github.com/246571.js"></script></p>
<p>Just drop this file in any directory, run the script, and it serves the files. I use this frequently for instance when I need to browser test static files on different virtual machines. (I modified the script shebang to work on my Mac).</p>
<p>I prefer to use this server.rb script in stead of accessing the files from a shared folder from the virtual machine. It&#8217;s faster to write the address for <code>http://172.16.244.1:2000/accordion.html</code> than for <code>\\.host\Shared Folders\jesper On My Mac\src\htmlguide\accordion.html</code> – and easier to remember.</p>
<p>Tip from Yehuda Katz&#8217; &#8220;<a href="http://yehudakatz.com/2007/08/06/webrick-anywhere/">Webrick Anywhere</a>&#8220;</p>
<div class="feedflare">
<a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=je7DJ7qPssQ:LrJw-1DyREM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=je7DJ7qPssQ:LrJw-1DyREM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jaw/posts?i=je7DJ7qPssQ:LrJw-1DyREM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=je7DJ7qPssQ:LrJw-1DyREM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=je7DJ7qPssQ:LrJw-1DyREM:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jaw/posts/~4/je7DJ7qPssQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/12/01/run-tiny-webserver-from-any-directory/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Remove Trailing Space from source files</title>
		<link>http://justaddwater.dk/2009/11/26/remove-trailing-space-from-source-files/</link>
		<comments>http://justaddwater.dk/2009/11/26/remove-trailing-space-from-source-files/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 14:10:40 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[justaddwater.dk]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1241</guid>
		<description><![CDATA[This Stackoverflow user asked How To Remove Trailing Whitespace Of All Files Recursively.
This reply helped me to work around the fact that \s and \t are not supported in the mac version of sed:  
find dir -type f -print0 &#124; xargs -0 sed -i .bak -E &#8220;s/[[:space:]]*$//&#8221;

So using [:space:] can actually work for both [...]]]></description>
			<content:encoded><![CDATA[<p>This Stackoverflow user asked <a href="http://stackoverflow.com/questions/149057/how-to-removing-trailing-whitespace-of-all-files-recursively">How To Remove Trailing Whitespace Of All Files Recursively</a>.</p>
<p>This reply helped me to work around the fact that \s and \t are not supported in the mac version of sed:  </p>
<blockquote><p>find dir -type f -print0 | xargs -0 sed -i .bak -E &#8220;s/[[:space:]]*$//&#8221;
</p></blockquote>
<p>So using [:space:] can actually work for both tabs and spaces.</p>
<p>However, I ended up not using &#8216;find&#8217; for the files, and then passing the files to sed directly:</p>
<blockquote><p>sed -i &#8221; &#8217;s/[[:space:]]*$//g&#8217; **/*.*</p></blockquote>
<div class="feedflare">
<a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=e2Zo77LMlD4:k8IwmA4MaAg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=e2Zo77LMlD4:k8IwmA4MaAg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jaw/posts?i=e2Zo77LMlD4:k8IwmA4MaAg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=e2Zo77LMlD4:k8IwmA4MaAg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=e2Zo77LMlD4:k8IwmA4MaAg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jaw/posts/~4/e2Zo77LMlD4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/11/26/remove-trailing-space-from-source-files/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Greasemonkey Script For Removing Scrollbars on Al-Anon Page</title>
		<link>http://justaddwater.dk/2009/11/06/greasemonkey-script-for-removing-scrollbars-on-al-anon-page/</link>
		<comments>http://justaddwater.dk/2009/11/06/greasemonkey-script-for-removing-scrollbars-on-al-anon-page/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 11:49:45 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1235</guid>
		<description><![CDATA[I have recently discovered an alcoholic in my family. And in order to deal with that, a friend pointed me to Al-Anon which has material and publications to help relatives.
The angle for this blog, however, is that i wrote this small script to remove scrollbars and remove menu when printing page. The script works on [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently discovered an alcoholic in my family. And in order to deal with that, a friend pointed me to Al-Anon which has material and publications to help relatives.</p>
<p>The angle for this blog, however, is that i wrote this small script to remove scrollbars and remove menu when printing page. The script works on the Danish pages <a href="http://al-anon.dk/">http://al-anon.dk/</a></p>
<p><script src="http://gist.github.com/227952.js"></script></p>
<p>I have published a few notes via <a href="http://www.facebook.com/jesperronn">my Facebook Status</a> about the incident (in Danish).</p>
<div class="feedflare">
<a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=E9bx22Jqx88:MRcFtBeR5nc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=E9bx22Jqx88:MRcFtBeR5nc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jaw/posts?i=E9bx22Jqx88:MRcFtBeR5nc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=E9bx22Jqx88:MRcFtBeR5nc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=E9bx22Jqx88:MRcFtBeR5nc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jaw/posts/~4/E9bx22Jqx88" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/11/06/greasemonkey-script-for-removing-scrollbars-on-al-anon-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zyb.com sync with new Nokia E52 phone</title>
		<link>http://justaddwater.dk/2009/11/03/zyb-com-sync-with-new-nokia-e52-phone/</link>
		<comments>http://justaddwater.dk/2009/11/03/zyb-com-sync-with-new-nokia-e52-phone/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 17:19:36 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[justaddwater.dk]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1215</guid>
		<description><![CDATA[The company I work for has negotiated a new phone deal with another tele provider, which meant everybody had to change phones and numbers. 
I have been using Zyb.com for syncing phones and it has helped me out great every time the old Nokia 6500 has been handed in for repair. The new Nokia E52 [...]]]></description>
			<content:encoded><![CDATA[<p>The company I work for has negotiated a new phone deal with another tele provider, which meant everybody had to change phones and numbers. </p>
<p>I have been using Zyb.com for syncing phones and it has helped me out great every time the old Nokia 6500 has been handed in for repair. The new Nokia E52 is at present not accepting the sync setting from Zyb, so I had to set it up manually. For future&#8217;s sake, this is what I did:</p>
<p>First, request a phone update  from the Zyb page (https://zyb.com/my/home/) click my image to expand the hidden section.<br />
Click &#8220;I got a new phone&#8221; button and wait for sms with configuration settings.In the phones menu choose<br />
Menu > Control Panel > Settings > Connection > Destinations > Uncategorized</p>
<p>And here i am stuck??? I can only edit the settings. How do I use it, how do I activate the sync settings?</p>
<p><strong>UPDATE 2 days later:</strong> I got a good explanation from ZYB support on how to get it working:</p>
<blockquote><p>To start the sync, please go as follows:1<br />
    * Menu<br />
    * Control panel<br />
    * Phone<br />
    * Sync<br />
    * Choose ZYB
</p></blockquote>
<p>This works perfectly as long as you remember that the default sync profile is &#8220;Nokia PC Suite&#8221;. Thus, the step to &#8220;choose ZYB&#8221; is very important</p>
<div class="feedflare">
<a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=KnAHVI7UHNk:7MbEX5MpzRA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=KnAHVI7UHNk:7MbEX5MpzRA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jaw/posts?i=KnAHVI7UHNk:7MbEX5MpzRA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=KnAHVI7UHNk:7MbEX5MpzRA:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=KnAHVI7UHNk:7MbEX5MpzRA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jaw/posts/~4/KnAHVI7UHNk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/11/03/zyb-com-sync-with-new-nokia-e52-phone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Script identifying CSS shorthand possibilities</title>
		<link>http://justaddwater.dk/2009/10/21/script-identifying-css-shorthand-possibilities/</link>
		<comments>http://justaddwater.dk/2009/10/21/script-identifying-css-shorthand-possibilities/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 12:29:17 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1211</guid>
		<description><![CDATA[For my own convenience I created this script to identify css files where colors like #aaaaaa can be rewritten in the short form #aaa
(saves bandwith, but can also make it easier to identify similar colors)

grep -nE '#([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3' **/*.css

output from a random project:

css/actions.css:19:  color: #000000;
css/actions.css:38:  color: #000000 !important;
css/actions.css:53:  color: #ffffff !important;
css/admin.css:90:	color: #cccccc;
css/admin.css:94:	color: #aaaaaa [...]]]></description>
			<content:encoded><![CDATA[<p>For my own convenience I created this script to identify css files where colors like #aaaaaa can be rewritten in the short form #aaa</p>
<p>(saves bandwith, but can also make it easier to identify similar colors)</p>
<pre><code>
grep -nE '#([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3' **/*.css
</code></pre>
<p>output from a random project:</p>
<pre><code>
css/actions.css:19:  color: #000000;
css/actions.css:38:  color: #000000 !important;
css/actions.css:53:  color: #ffffff !important;
css/admin.css:90:	color: #cccccc;
css/admin.css:94:	color: #aaaaaa !important;
</code></pre>
<div class="feedflare">
<a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=ihrS68qVAiY:9HebotD05iE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=ihrS68qVAiY:9HebotD05iE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jaw/posts?i=ihrS68qVAiY:9HebotD05iE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=ihrS68qVAiY:9HebotD05iE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.justaddwater.dk/~ff/jaw/posts?a=ihrS68qVAiY:9HebotD05iE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jaw/posts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jaw/posts/~4/ihrS68qVAiY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/10/21/script-identifying-css-shorthand-possibilities/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
