<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<title type="text">CoffeeBreak</title>
	<subtitle type="text">CoffeeBreak:CoffeeBreak, the neverpanic.de blog</subtitle>
	<link rel="alternate" type="text/html" href="http://www.neverpanic.de/blog/" />
	<link rel="self" type="application/atom+xml" href="http://www.neverpanic.de/blog/atom/" />
	<updated>2010-07-30T23:14:02Z</updated>
	<rights>Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Germany License</rights>
	<generator uri="http://expressionengine.com/" version="1.6.8">ExpressionEngine</generator>
	<id>tag:neverpanic.de,2010-07-30:/blog/</id>
	
	<entry>
		<title>whatthecommit.com git hook</title>
		<link rel="alternate" type="text/html" href="http://www.neverpanic.de/blog/single/whatthecommit.com&#45;git&#45;hook/" />
		<id>tag:neverpanic.de,2010-07-03:/blog/single/whatthecommit.com-git-hook/#3.83</id>
		<published>2010-07-03T17:23:52Z</published>
		<updated>2010-07-03T17:36:53Z</updated>
		<author>
			<name>Clemens Lang</name>
			<email>neverpanic@gmail.com</email>
			<uri>http://www.neverpanic.de/about-me</uri>		</author>
		
			<category
				term="Development"
				scheme="/site/category/development/"
				label="Development" />
		
			<category
				term="Linux"
				scheme="/site/category/linux/"
				label="Linux" />
		<content type="html">
			<![CDATA[
				<p>I currently use <a href="http://gitscm.org/">Git</a> for most of my version control needs. I'm keeping all of my hand-ins for university under version control to be able to sync them between university and my laptop easily and to make it easy for others to contribute (and sometimes they actually do!). But those of you using version control systems know what the biggest problem with version control is: Thinking of a commit message. Wait no moar! The ultimate solution is here!</p>
<p><a href="http://whatthecommit.com/" title="a commit message generator">whatthecommit.com</a> is a website that provides you with a fresh commit message every time you load it. So all you have to do, is copy and paste the line into your commit window. Still too much work? That's why git comes with hook scripts. Paste the following code in <code>.git/hooks/prepare-commit-msg</code> in your working copy and make the file executable and you'll be provided with a wonderful commit message every time you type <code>git commit</code> automatically!
<pre class="bash" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">#</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># A hook script to prepare the commit log message.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># Called by &quot;git commit&quot; with the name of the file that has the</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># commit message, followed by the description of the commit</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># message's source.  The hook's purpose is to edit the commit</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># message file.  If the hook fails with a non-zero status,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># the commit is aborted.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$2,$3&quot;</span> <span style="color: #000000; font-weight: bold;">in</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        ,<span style="color: #000000; font-weight: bold;">|</span>template,<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                <span style="color: #007800;">line</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>whatthecommit.com<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-O</span> - <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-o</span> <span style="color: #ff0000;">'&lt;p&gt;.*$'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/&lt;[^&gt;]*&gt;//g'</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                <span style="color: #007800;">file</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'1d'</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${1}</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${line}</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${1}</span>&quot;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${file}</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${1}</span>&quot;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #000000; font-weight: bold;">;;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">;;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">esac</span></div></li></ol></pre></p> 
			]]>
		</content>
	</entry>
	
	<entry>
		<title>Xcode from NULL to 100;</title>
		<link rel="alternate" type="text/html" href="http://www.neverpanic.de/blog/single/xcode&#45;from&#45;null&#45;to&#45;100/" />
		<id>tag:neverpanic.de,2009-09-17:/blog/single/xcode-from-null-to-100/#3.79</id>
		<published>2009-09-17T16:24:41Z</published>
		<updated>2009-09-18T00:08:42Z</updated>
		<author>
			<name>Clemens Lang</name>
			<email>neverpanic@gmail.com</email>
			<uri>http://www.neverpanic.de/about-me</uri>		</author>
		
			<category
				term="Development"
				scheme="/site/category/development/"
				label="Development" />
		
			<category
				term="OS X"
				scheme="/site/category/os-x/"
				label="OS X" />
		<content type="html">
			<![CDATA[
				<p>
    I was recently browsing the new <a href="http://www.apple.com/itunes/">iTunes 9</a> Store and somehow ended up in the podcast section. I had a look around the featured podcast and noticed a somewhat new podcast about Xcode called “Xcode von NULL auf Hundert;” (the podcast is german and, as such, has a german title). Ever since I switched to a Mac I have wanted to learn some basics of Cocoa programming.
</p>
<p>
    I started reading some resources on Objective-C programming a while ago, but didn't finish any because most of them were pretty technical and theoretical and thus getting boring pretty fast. The “Xcode from NULL to 100;” podcast does a lot more learning by doing – e.g. they guide you to build a (graphical!) calculator and explain memory allocating and releasing using that example.
</p>
<p>
    The podcast targets absolute beginners – if you already have a background in programming, some of the information not related to OS X GUI programming will probably be pretty redundant to you, but you might still use the podcast to get started with Apple's Interface Builder.
</p>
<p>
    <a href="http://0x02100.silutions.de/">Xcode von NULL auf Hundert; podcast</a>
</p> 
			]]>
		</content>
	</entry>
	
	<entry>
		<title>Thunderbird IMAP push email</title>
		<link rel="alternate" type="text/html" href="http://www.neverpanic.de/blog/single/thunderbird&#45;imap&#45;push&#45;email/" />
		<id>tag:neverpanic.de,2008-07-12:/blog/single/thunderbird-imap-push-email/#3.63</id>
		<published>2008-07-12T10:18:49Z</published>
		<updated>2010-03-23T23:10:50Z</updated>
		<author>
			<name>Clemens Lang</name>
			<email>neverpanic@gmail.com</email>
			<uri>http://www.neverpanic.de/about-me</uri>		</author>
		
			<category
				term="Development"
				scheme="/site/category/development/"
				label="Development" />
		
			<category
				term="Web Development"
				scheme="/site/category/web-development/"
				label="Web Development" />
		
			<category
				term="Personal"
				scheme="/site/category/personal/"
				label="Personal" />
		<content type="html">
			<![CDATA[
				<p><a href="http://www.ietf.org/rfc/rfc2177.txt" title="RFC 2177 defining IMAP4 IDLE command">RFC 2177</a> defines IDLE, an extension to the IMAP protocol allowing mail clients to change into an idle mode while keeping the TCP-connection open. This allows the servers to notify the clients of new mails on arrival (the so-called push e-mail).</p>
<p>Not all e-mail providers support IMAP IDLE, though – you should check whether your mail provider supports it by opening a telnet connection to the IMAP server (standard port for IMAP is 143) and sending <code>001 capability</code>. If the answer contains „IDLE” your server supports IMAP IDLE.<br />
GMail for example answers<br />
<code>* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA XLIST CHILDREN XYZZY<br />
001 OK Thats all she wrote!</code></p>
<p><s>There's one thing to look out for, though – Thunderbird only sends the IDLE command (effectively enabling push e-mail) if you disable the „check for new mail every <var>n</var><sup>th</sup> minute”-option. I could not find any documentation on that feature – however using Help » Mozilla Thunderbird Help causes a 404 File Not Found error for me anyway (using the German version of Thunderbird).</s></p>
<p>Steve Jobs would say: „Exchange for the rest of us” – using GMail, IMAP and Thunderbird.</p> 
			]]>
		</content>
	</entry>
	
</feed>