<?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>avp::ptr weblog</title>
	<atom:link href="http://weblog.avp-ptr.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://weblog.avp-ptr.de</link>
	<description>Everything that is in our mind.</description>
	<lastBuildDate>Tue, 26 Mar 2013 21:21:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Android button states understood</title>
		<link>http://weblog.avp-ptr.de/20130321/android-button-states-understood/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=android-button-states-understood</link>
		<comments>http://weblog.avp-ptr.de/20130321/android-button-states-understood/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 17:11:23 +0000</pubDate>
		<dc:creator>weblogger</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[drawable]]></category>
		<category><![CDATA[states]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://weblog.avp-ptr.de/?p=285</guid>
		<description><![CDATA[After a lot of research, trial and error I finally understood how I can specify four different button states via XML. The important detail is that you need to add both state parameters in every item. In the following example those are android:state_checked and android:state_pressed which can be combined to four different states. &#60;?xml version="1.0" [...]]]></description>
				<content:encoded><![CDATA[<p>After a lot of research, trial and error I finally understood how I can specify four different button states via XML. The important detail is that you need to add both state parameters in every item. In the following example those are <span style="color: #666699;">android:state_checked</span> and <span style="color: #666699;">android:state_pressed</span> which can be combined to four different states.</p>
<pre><span style="color: #455268;">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
&lt;!--
finger is on while button is up
--&gt;
&lt;item android:state_checked="false" android:state_pressed="true"
android:drawable="@drawable/ic_btn_medium_grey"/&gt;
&lt;!--
finger is gone, button is up, default
--&gt;
&lt;item android:state_checked="false" android:state_pressed="false"
android:drawable="@drawable/ic_btn_light_grey"/&gt;
&lt;!--
finger is gone, button is down
--&gt;
&lt;item android:state_checked="true" android:state_pressed="false"
android:drawable="@drawable/ic_btn_dark_grey"/&gt;
&lt;!--
finger is on while button is down
--&gt;
&lt;item android:state_checked="true" android:state_pressed="true"
android:drawable="@drawable/ic_btn_deep_dark_grey"/&gt;
&lt;/selector&gt;</span></pre>
<p>&nbsp;</p>
<p>If you are unsure why you want to have four states for a single button just imagine the button can stay in its checked state.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.avp-ptr.de/20130321/android-button-states-understood/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git: How to copy a range of commits from one branch to another?</title>
		<link>http://weblog.avp-ptr.de/20120928/git-how-to-copy-a-range-of-commits-from-one-branch-to-another/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=git-how-to-copy-a-range-of-commits-from-one-branch-to-another</link>
		<comments>http://weblog.avp-ptr.de/20120928/git-how-to-copy-a-range-of-commits-from-one-branch-to-another/#comments</comments>
		<pubDate>Fri, 28 Sep 2012 21:45:11 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[cherry-pick]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rebase]]></category>

		<guid isPermaLink="false">http://weblog.avp-ptr.de/?p=256</guid>
		<description><![CDATA[Sometimes it is useful to copy a series of commit to another branch. This post describes how to do this using git rebase. Two example illustrate different scenarios which should help to understand the command arguments in generell. Example 1: The commit P, Q, R which are contained in branch feature should be copied to [...]]]></description>
				<content:encoded><![CDATA[<p>Sometimes it is useful to copy a series of commit to another branch. This post describes how to do this using <code style="background: #ddd; padding: 0 0.3em; white-space: nowrap;">git rebase</code>. Two example illustrate different scenarios which should help to understand the command arguments in generell.</p>
<p><strong>Example 1:</strong> The commit <em>P, Q, R</em> which are contained in branch feature should be copied to branch <em>master</em>. The commits should be appended to commit <em>M</em>.</p>
<p><img class="alignnone size-full wp-image-257 colorbox-256" title="git-rebase-onto-master" src="http://weblog.avp-ptr.de/wp-content/uploads/git-rebase-onto-master.png" alt="git rebase --onto M O R &amp;&amp; git rebase HEAD master" width="528" height="348" /></p>
<p>The first command <code style="background: #ddd; padding: 0 0.3em; white-space: nowrap;">git rebase --onto M O R</code> copies the commits <em>P, Q, R</em> to the branch <em>master</em>. They won&#8217;t be visible if you check the visual graph in <em>gitk</em>. This is because there is no branch reference that points to one of the three commits. To update the branch <em>master</em> run the second command <code style="background: #ddd; padding: 0 0.3em; white-space: nowrap;">git rebase HEAD master</code> which moves up the <em>HEAD</em> to commit <em>R</em>.</p>
<p><strong><span id="more-256"></span>Example 2:</strong> The second scenario is similar. It concentrates on two things: 1) You can choose any destination commit as the root for the copied commits. In this case I have chosen commit <em>L</em> as the root commit. 2) As in the first example you need to apply a branch name to the last commit of the group after you did the actual copy operation in order to let the commits become visible.</p>
<p><img class="alignnone size-full wp-image-258 colorbox-256" title="git-rebase-onto-topic" src="http://weblog.avp-ptr.de/wp-content/uploads/git-rebase-onto-topic.png" alt="git rebase --onto L O R &amp;&amp; git branch topic" width="526" height="422" /></p>
<p>At the point when you understand the three arguments in general it will be much easier to use this command in various situations. Therefore, memorize the following:</p>
<p><code style="background: #ddd; padding: 0 0.3em; white-space: nowrap;">git rebase --onto argument1 argument2 argument3</code></p>
<ul>
<li><strong>argument1</strong> is the destination commit for the copy operation.<br />
It will be the predecessor of the commit subsequent to <strong>argument2</strong>.</li>
<li><strong>argument2</strong> is the predecessor of the first commit of the range that will be copied.<br />
<strong>argument2</strong> itself will <strong>not</strong> be copied, though.</li>
<li><strong>argument3</strong> is the last commit of the range that will be copied.</li>
</ul>
<p>Further information can be found on the <a title="git rebase man page" href="http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html">man page of git rebase</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.avp-ptr.de/20120928/git-how-to-copy-a-range-of-commits-from-one-branch-to-another/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix Eclipse colors for autocompletion and tooltips</title>
		<link>http://weblog.avp-ptr.de/20120728/how-to-fix-eclipse-colors-for-autocompletion-and-tooltips/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-fix-eclipse-colors-for-autocompletion-and-tooltips</link>
		<comments>http://weblog.avp-ptr.de/20120728/how-to-fix-eclipse-colors-for-autocompletion-and-tooltips/#comments</comments>
		<pubDate>Sat, 28 Jul 2012 15:11:52 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[autocompletion]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[dotfiles]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[tooltips]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://weblog.avp-ptr.de/?p=231</guid>
		<description><![CDATA[Sadly Eclipse ships with a broken color theme when it comes to autocompletion and tooltips. I cannot tell if the problem is limited to Ubuntu Precise, however, it is worth getting fixed immediately. The following screenshots illustrate the broken color settings in both situations. The tooltop window shows up with a black background color and [...]]]></description>
				<content:encoded><![CDATA[<p>Sadly Eclipse ships with a broken color theme when it comes to autocompletion and tooltips. I cannot tell if the problem is limited to Ubuntu Precise, however, it is worth getting fixed immediately. The following screenshots illustrate the broken color settings in both situations. The tooltop window shows up with a black background color and blue links.</p>
<div id="attachment_232" class="wp-caption alignnone" style="width: 310px"><a href="http://weblog.avp-ptr.de/wp-content/uploads/eclipse-tooltip-colors-broken.png"><img class="size-full wp-image-232  colorbox-231" title="Eclipse IDE - Tooltip with default colors settings" src="http://weblog.avp-ptr.de/wp-content/uploads/eclipse-tooltip-colors-broken.png" alt="Eclipse IDE - Tooltip with default colors settings" width="300" height="300" /></a><p class="wp-caption-text">Eclipse &#8211; Tooltip with default colors settings</p></div>
<p>When autocompletion popup appears the first suggestions is not readable at all.</p>
<div id="attachment_233" class="wp-caption alignnone" style="width: 310px"><a href="http://weblog.avp-ptr.de/wp-content/uploads/eclipse-autocompletion-colors-broken.png"><img class="size-full wp-image-233  colorbox-231" title="Eclipse IDE - Autocompletion with default colors settings" src="http://weblog.avp-ptr.de/wp-content/uploads/eclipse-autocompletion-colors-broken.png" alt="Eclipse IDE - Autocompletion with default colors settings" width="300" height="150" /></a><p class="wp-caption-text">Eclipse &#8211; Autocompletion with default colors settings</p></div>
<p>So, here is what you need to do to fix the colors.<span id="more-231"></span></p>
<h1>Fixing the color settings</h1>
<p>Create configuration file in your <code>HOME</code> folder. The name is not essential, mine is named <code>.gtkrc-eclipse</code></p>
<pre class="brush: plain; gutter: false; title: ; notranslate"># Customs color settings for Eclipse.
# Load Eclipse as follows:
# GTK2_RC_FILES=~/.gtkrc-eclipse eclipse
#
# Sources:
# http://askubuntu.com/a/131348/18533
# http://stackoverflow.com/a/8063723/356895
# http://askubuntu.com/a/70964/18533

# Autocompletion background color.
style &quot;eclipse-autocompletion&quot; {
base[ACTIVE] = shade(0.7, &quot;#F2F1F0&quot;)
}

# Tooltip background color.
style &quot;eclipse-tooltips&quot; {
bg[NORMAL] = &quot;#e8e8e8&quot;
fg[NORMAL] = &quot;#000000&quot;
}

# Load settings.
class &quot;GtkTreeView&quot; style &quot;eclipse-autocompletion&quot;
widget &quot;gtk-tooltip*&quot; style &quot;eclipse-tooltips&quot;</pre>
<p>To load the settings whenever you launch Eclipse from the command line simple alias the original binary and preload the settings file.</p>
<pre class="brush: plain; gutter: false; title: ; notranslate">alias eclipse='GTK2_RC_FILES=~/.gtkrc-eclipse eclipse'</pre>
<p>Further, if you use the launcher within Ubuntu, you need to modify the <code>.desktop</code> file for Eclipse, too. You can find the file in <code>~/.local/share/applications</code>.</p>
<pre class="brush: plain; gutter: false; title: ; notranslate">/bin/bash -c &quot;GTK2_RC_FILES=~/.gtkrc-eclipse eclipse&quot;</pre>
<p>When you are done and restart Eclipse the autocompletion and the tooltip should look similar to the following screenshots. I have chosen a light gray for the background color of the tooltip window. Feel free to customize the colors to your own taste.</p>
<div id="attachment_239" class="wp-caption alignnone" style="width: 310px"><a href="http://weblog.avp-ptr.de/wp-content/uploads/eclipse-tooltip-colors-fixed.png"><img class="size-full wp-image-239 colorbox-231" title="Eclipse IDE - Tooltip with default colors settings" src="http://weblog.avp-ptr.de/wp-content/uploads/eclipse-tooltip-colors-fixed.png" alt="Eclipse IDE - Tooltip with default colors settings" width="300" height="300" /></a><p class="wp-caption-text">Eclipse &#8211; Tooltip with default colors settings</p></div>
<p>The first tooltip suggestion should be readable now.</p>
<div id="attachment_238" class="wp-caption alignnone" style="width: 310px"><a href="http://weblog.avp-ptr.de/wp-content/uploads/eclipse-autocompletion-colors-fixed.png"><img class="size-full wp-image-238  colorbox-231" title="Eclipse IDE - Autocompletion with fixed colors settings" src="http://weblog.avp-ptr.de/wp-content/uploads/eclipse-autocompletion-colors-fixed.png" alt="Eclipse IDE - Autocompletion with fixed colors settings" width="300" height="150" /></a><p class="wp-caption-text">Eclipse &#8211; Autocompletion with fixed colors settings</p></div>
<p>I compiled this article from various sources which I like to add as a reference.</p>
<ul>
<li><a title="Post by bain" href="http://askubuntu.com/a/131348/18533">http://askubuntu.com/a/131348/18533</a></li>
<li><a title="Post by IntoTheVoid" href="http://stackoverflow.com/a/8063723/356895">http://stackoverflow.com/a/8063723/356895</a></li>
<li><a title="Post by genail" href="http://askubuntu.com/a/70964/18533">http://askubuntu.com/a/70964/18533</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://weblog.avp-ptr.de/20120728/how-to-fix-eclipse-colors-for-autocompletion-and-tooltips/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to manually install TeX Live 2012</title>
		<link>http://weblog.avp-ptr.de/20120710/how-to-manually-install-tex-live-2012/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-manually-install-tex-live-2012</link>
		<comments>http://weblog.avp-ptr.de/20120710/how-to-manually-install-tex-live-2012/#comments</comments>
		<pubDate>Tue, 10 Jul 2012 21:50:02 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[2012]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[precise]]></category>
		<category><![CDATA[tex]]></category>
		<category><![CDATA[texlive]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://weblog.avp-ptr.de/?p=220</guid>
		<description><![CDATA[Some days ago, at July 8, TeX Live 2012 has been released. In the meantime, I also updated to Ubuntu 12.04. (Precise) but I did not find the time to install TeX Live. I am happy to report that there is nothing new to learn regarding the installation. You can straight follow the very same instructions [...]]]></description>
				<content:encoded><![CDATA[<p>Some days ago, at July 8, <a title="TeX Live" href="http://www.tug.org/texlive/">TeX Live 2012 has been released</a>. In the meantime, I also updated to <a title="Ubuntu 12.04 (Precise)" href="http://releases.ubuntu.com/12.04/">Ubuntu 12.04. (Precise)</a> but I did not find the time to install TeX Live. I am happy to report that there is nothing new to learn regarding the installation. You can straight follow the very same <a title="How to manually install TeX Live 2011 and Kile 2.1.0" href="http://weblog.avp-ptr.de/20111008/how-to-manually-install-tex-live-2011-and-kile-2-1-0/">instructions I posted earlier for TeX Live 2011</a>. Have fun.</p>
<p><strong>Update:</strong> I noticed that <a title="TeX Live installation via backports" href="http://askubuntu.com/a/163683/18533">TeX Live 2012 has been made available via apt-get</a>. I recommend testing it out (I haven&#8217;t done so yet).</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.avp-ptr.de/20120710/how-to-manually-install-tex-live-2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Search and replace across multiple directories</title>
		<link>http://weblog.avp-ptr.de/20120407/search-and-replace-across-multiple-directories/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=search-and-replace-across-multiple-directories</link>
		<comments>http://weblog.avp-ptr.de/20120407/search-and-replace-across-multiple-directories/#comments</comments>
		<pubDate>Sat, 07 Apr 2012 15:00:13 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[automatization]]></category>
		<category><![CDATA[gtd]]></category>
		<category><![CDATA[macro]]></category>
		<category><![CDATA[recording]]></category>
		<category><![CDATA[recursive]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[subdirectories]]></category>
		<category><![CDATA[substitute]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://weblog.avp-ptr.de/?p=197</guid>
		<description><![CDATA[Today, I tried to find a convenient way to unify the spelling of a word used in various text files spread across multiple directories. Of course vim has a solution to this. In my case all files are of type *.txt. The term I want to search for is &#8220;re-use&#8221; which should be replaced by &#8220;reuse&#8220;. Here [...]]]></description>
				<content:encoded><![CDATA[<p>Today, I tried to find a convenient way to unify the spelling of a word used in various text files spread across multiple directories. Of course <a title="Vim Editor" href="http://www.vim.org/">vim</a> has a solution to this. In my case all files are of type <em>*.txt</em>. The term I want to search for is &#8220;<em style="white-space: nowrap;">re-use</em>&#8221; which should be replaced by &#8220;<em>reuse</em>&#8220;. Here is what I did:</p>
<ol>
<li>Open vim while loading all relevant files recursively as a argument list the editor. <code>vim **/*.txt</code></li>
<li>Start recording a macro in register &#8220;a&#8221;. Type <code>qa</code></li>
<li>Enter the substitution command to search and replace a specific character pattern <code>:%s/re\-use/reuse/ge</code></li>
<li>Change to the next file in the argument list. Type <code>:wnext</code></li>
<li>Stop recording the macro in register &#8220;a&#8221;. Press <code>q</code></li>
<li>Playback the macro 999-times by entering. <code>999@a</code></li>
</ol>
<p>The posts &#8220;<a title="Vim 101: Search and Replace on Multiple Files" href="http://www.usevim.com/2012/04/06/search-and-replace-files/">Vim 101: Search and Replace on Multiple Files</a>&#8221; and &#8220;<a title=" Vim. How to replace a word (string) in several files.   Vim. How to replace a word (string) in several files.  " href="https://madyogi.wordpress.com/2008/05/15/vim-how-to-replace-a-word-string-in-several-files/">Vim. How to replace a word (string) in several files.</a>&#8221; guided me. Please have a look there for further information.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.avp-ptr.de/20120407/search-and-replace-across-multiple-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Colored Diffs add-on for Thunderbird</title>
		<link>http://weblog.avp-ptr.de/20120208/colored-diffs-add-on-for-thunderbird/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=colored-diffs-add-on-for-thunderbird</link>
		<comments>http://weblog.avp-ptr.de/20120208/colored-diffs-add-on-for-thunderbird/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 14:33:21 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[addon]]></category>
		<category><![CDATA[colors]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[differences]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[post-receive]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[thunderbird]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://weblog.avp-ptr.de/?p=186</guid>
		<description><![CDATA[Reading todays post-hook emails with the latest diffs of some project the thought rushed to my head that it would be nice to have the diffs displayed in color. Since I am using Thunderbird as my email client I found a great add-on named &#8220;Colored Diff&#8221;. Although, the add-on seems to be outdated to work [...]]]></description>
				<content:encoded><![CDATA[<p>Reading todays post-hook emails with the latest diffs of some project the thought rushed to my head that it would be nice to have the diffs displayed in color. Since I am using Thunderbird as my email client I found a great add-on named &#8220;Colored Diff&#8221;.</p>
<p>Although, the add-on seems to be outdated to work with the latest Thunderbird version (which is 10.0 right now) there is an easy way to install the add-on while the automatic installer refuses to do so. Here is what you can do to make the installation work.</p>
<ol>
<li><a title="Colored Diffs" href="https://addons.mozilla.org/en-us/thunderbird/addon/colored-diffs/">Download the Colored Diffs *.xpi file</a></li>
<li>Open the archive with an archive manager of your choice</li>
<li>Edit the contained <strong>install.rdf</strong> with a text editor of your choice</li>
<li>Change the maxVersion parameter to be equal or greater then the current version of Thunderbird<br />
<strong>Before:</strong> <code style="background: #ddd; padding: 0 0.3em; white-space: nowrap;">&lt;em:maxVersion&gt;3.1.*&lt;/em:maxVersion&gt;</code><br />
<strong>After:</strong> <code style="background: #ddd; padding: 0 0.3em; white-space: nowrap;">&lt;em:maxVersion&gt;13.1.*&lt;/em:maxVersion&gt;</code></li>
<li>Save the changes and store them back into the archive</li>
<li>Install the add-on</li>
</ol>
<p>Do not forget to check out the <strong>preferences</strong> after you installed the add-on. You can choose 4 different types to display the diffs and customize the colors as well.</p>
<p>If you feel interested to enhance the add-on you can do so. The <a title="Colored Diffs on Google Code" href="http://code.google.com/p/colorediffs/">&#8220;Colored Diffs&#8221; project is hosted on google-code</a> open for people to participate.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.avp-ptr.de/20120208/colored-diffs-add-on-for-thunderbird/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Amend files to a git commit without changing the commit message</title>
		<link>http://weblog.avp-ptr.de/20120205/amend-files-to-a-git-commit-without-changing-the-commit-message/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=amend-files-to-a-git-commit-without-changing-the-commit-message</link>
		<comments>http://weblog.avp-ptr.de/20120205/amend-files-to-a-git-commit-without-changing-the-commit-message/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 20:11:00 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amend]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://weblog.avp-ptr.de/?p=182</guid>
		<description><![CDATA[Quiet often there is the need to add files to the recent commit. This can be done with 2 simple commands. In case you do not wand to change the commit message there is the new option &#8211;no-edit for git commit introduced in git 1.7.9. The git release notes describe how the &#8211;no-edit option can [...]]]></description>
				<content:encoded><![CDATA[<p>Quiet often there is the need to add files to the recent commit. This can be done with 2 simple commands.</p>
<pre class="brush: plain; gutter: false; title: ; notranslate">git add file
git commit --amend</pre>
<p>In case you do not wand to change the commit message there is the new option &#8211;no-edit for git commit introduced in git 1.7.9. The <a title="Git 1.7.9 release notes" href="https://raw.github.com/gitster/git/master/Documentation/RelNotes/1.7.9.txt">git release notes</a> describe how the &#8211;no-edit option can be used.</p>
<blockquote><p>&#8220;git commit &#8211;amend&#8221; learned &#8220;&#8211;no-edit&#8221; option to say that the<br />
user is amending the tree being recorded, without updating the<br />
commit log message.</p></blockquote>
<pre class="brush: plain; gutter: false; title: ; notranslate">git commit --amend --no-edit</pre>
<p>Of course, I added an alias for the new option to my global git configuration.</p>
<pre class="brush: plain; gutter: false; title: ; notranslate">ci = commit
cm = commit -m
ca = commit --amend
cn = commit --amend --no-edit</pre>
]]></content:encoded>
			<wfw:commentRss>http://weblog.avp-ptr.de/20120205/amend-files-to-a-git-commit-without-changing-the-commit-message/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reset the author of a git commit</title>
		<link>http://weblog.avp-ptr.de/20120205/reset-the-author-of-a-git-commit/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reset-the-author-of-a-git-commit</link>
		<comments>http://weblog.avp-ptr.de/20120205/reset-the-author-of-a-git-commit/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 19:54:07 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amend]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[reset]]></category>

		<guid isPermaLink="false">http://weblog.avp-ptr.de/?p=177</guid>
		<description><![CDATA[Once in a while one forgets to configure the user name and email address for git when initializing or cloning a new git repository. So do I. But git would not be git if it does not have an answer to that problem. Here is what git prints out when you commit without previously configuring [...]]]></description>
				<content:encoded><![CDATA[<p>Once in a while one forgets to configure the <strong>user name</strong> and <strong>email address</strong> for git when initializing or cloning a new git repository. So do I. But git would not be git if it does not have an answer to that problem. Here is what git prints out when you commit without previously configuring the user credentials.</p>
<pre class="brush: plain; gutter: false; title: ; notranslate">⚡ git cm 'Initial import.';
[master (root-commit) 0396c37] Initial import.
Committer: User User@Machine.(none);
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name ''Your Name''
    git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file</pre>
<p>Well done git!</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.avp-ptr.de/20120205/reset-the-author-of-a-git-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom NSLog for Xcode 4</title>
		<link>http://weblog.avp-ptr.de/20111026/custom-nslog-for-xcode-4/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=custom-nslog-for-xcode-4</link>
		<comments>http://weblog.avp-ptr.de/20111026/custom-nslog-for-xcode-4/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 19:06:06 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[autocompletion]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[nslog]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://weblog.avp-ptr.de/?p=164</guid>
		<description><![CDATA[This post describes how you can to setup a custom NSLog snippet in Xcode 4. By default, this custom NSLog prints the class and method name of the position it is inserted. Please follow these steps to add the code snippet to the scripts in Xcode 4. Copy and paste the following code into your [...]]]></description>
				<content:encoded><![CDATA[<p>This post describes how you can to setup a<strong> custom NSLog snippet</strong> in Xcode 4. By default, this custom NSLog prints the class and method name of the position it is inserted.</p>
<div id="attachment_166" class="wp-caption aligncenter" style="width: 310px"><a href="http://weblog.avp-ptr.de/wp-content/uploads/nslog-completion.png"><img class="size-medium wp-image-166  colorbox-164" title="NSLog auto completion" src="http://weblog.avp-ptr.de/wp-content/uploads/nslog-completion-300x93.png" alt="NSLog auto completion" width="300" height="93" /></a><p class="wp-caption-text">NSLog auto completion</p></div>
<p>Please follow these steps to add the code snippet to the scripts in Xcode 4.</p>
<ol>
<li>Copy and paste the following code into your editor. Anywhere.<br />
<code>NSLog(@"%@ %@", self.className, NSStringFromSelector(_cmd)); /* DEBUG LOG */</code></li>
<li>Open up the <strong>code snippets library</strong> which sits in the utility pane on the right side. Look for the curly braces <strong>{}</strong>.</li>
<li>Highlight the above mentioned code &#8211; click and hold the mouse over the text  (for a short while) &#8211; drag them into the <strong>code snippet library</strong>.</li>
<li>Afterwards you can edit the snippet and add a <em>title</em>, <em>summary</em> and a <em>completion shortcut</em>. I used the following settings:
<pre>              Title: Custom NSLog (Class &amp; method name)
            Summary: NSLog prints the class and method name
           Platform: All
           Language: Objective-C
Completion Shortcut: NSLog
  Completion Scopes: All</pre>
</li>
</ol>
<div id="attachment_165" class="wp-caption aligncenter" style="width: 310px"><a href="http://weblog.avp-ptr.de/wp-content/uploads/custom-nslog-snippet.png"><img class="size-medium wp-image-165 colorbox-164" title="Custom  NSLog snippet" src="http://weblog.avp-ptr.de/wp-content/uploads/custom-nslog-snippet-300x137.png" alt="Custom  NSLog snippet" width="300" height="137" /></a><p class="wp-caption-text">Custom NSLog snippet</p></div>
<p>You are welcome to comment and post your custom code snippets!<br />
This article is inspired by the post <a title="Easy Doxygen code snippets for Xcode 4" href="http://cbpowell.wordpress.com/2011/06/15/easy-doxygen-code-snippets-for-xcode-4/">&#8220;Easy Doxygen code snippets for Xcode 4&#8243; by Chris Powell</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.avp-ptr.de/20111026/custom-nslog-for-xcode-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create an independent branch in git?</title>
		<link>http://weblog.avp-ptr.de/20111009/how-to-create-an-independent-branch-in-git/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-create-an-independent-branch-in-git</link>
		<comments>http://weblog.avp-ptr.de/20111009/how-to-create-an-independent-branch-in-git/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 15:16:55 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[orphan]]></category>

		<guid isPermaLink="false">http://weblog.avp-ptr.de/?p=151</guid>
		<description><![CDATA[While working with a version control system like git it is sometimes a good idea to create an independent branch. This article shows how to accomplish that. In this example I want to hold onto the documentation in a separate branch. I assume, that you already created a repository and added various commits onto you [...]]]></description>
				<content:encoded><![CDATA[<p>While working with a version control system like <a title="git - The fast version control system" href="http://git-scm.com/">git</a> it is sometimes a good idea to create an independent branch. This article shows how to accomplish that. In this example I want to hold onto the <em>documentation</em> in a separate branch.<br />
I assume, that you already created a repository and added various commits onto you <code>master</code> branch.</p>
<p><strong>Prepare your ignore list<br />
</strong>Now its time to prepare for the repository. First, edit your <code>.gitignore</code> file and exclude the <code>doc/</code> folder which you will be creating in the next step.</p>
<p><strong>Create an orphan branch</strong><br />
Create a new independent branch with the <code>git checkout</code> option <code>--orphan</code>. The option is available since Git 1.7.2. Initially, you will have to remove the files that have been created in the working directory, but right after the branch is independent.<br />
Now you can create a <code>doc/</code> folder and create documentation files. In the end you can commit them to the repository as usual.</p>
<p><code>git checkout --orphan documentation<br />
git rm -rf .<br />
mkdir doc<br />
cd doc<br />
// Do work.<br />
// git add your files to the doc/ folder<br />
git commit -m "Added documentation files."</code></p>
<p><strong>Checkout the master branch</strong><br />
To checkout the <code>master</code> branch while still being able to list the <em>documentation</em> files do the following.</p>
<p><code>git checkout master &amp;&amp; git merge --no-commit documentation<br />
git reset master</code></p>
<p>The files added to the <code>documentation</code> branch earlier will appear in the <em>working directory</em> visible to the <code>master</code> branch. Thanks to the <code>.gitgnore</code> file they will not be listed as untracked files.</p>
<p>The initial <a title="In git, is there a simple way of introducing an unrelated branch to a repository?" href="http://stackoverflow.com/questions/1384325/in-git-is-there-a-simple-way-of-introducing-an-unrelated-branch-to-a-repository">discussion on an unrelated branch</a> can be found on stackoverflow.com. Thanks to <a title="User hillu" href="http://stackoverflow.com/users/72344/hillu">hillu</a>, <a title="User tcovo" href="http://stackoverflow.com/users/137188/tcovo">tcovo</a> and <a title="User phord" href="http://stackoverflow.com/users/33342/phord">phord</a> for their input!</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.avp-ptr.de/20111009/how-to-create-an-independent-branch-in-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
