<?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>info.michael-simons.eu &#187; Tipps</title>
	<atom:link href="http://info.michael-simons.eu/tag/tipps/feed/" rel="self" type="application/rss+xml" />
	<link>http://info.michael-simons.eu</link>
	<description>Just another nerd blog</description>
	<lastBuildDate>Fri, 09 Jul 2010 07:40:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Linux: Persistent wake-on-lan</title>
		<link>http://info.michael-simons.eu/2010/03/03/linux-persistent-wake-on-lan/</link>
		<comments>http://info.michael-simons.eu/2010/03/03/linux-persistent-wake-on-lan/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 08:36:22 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[ethtool]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=399</guid>
		<description><![CDATA[Just a quick reminder for myself: You need to enable wake-on-lan on the nic in most linux distributions via ethtool. If your nic supports WOL, it probably needs to be enabled in your computers BIOS first. Most WOL tools use the &#8220;MagicPacket(tm)&#8221; method, so the right command to enable it on the nic &#8220;eth0&#8243; would [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick reminder for myself: You need to enable wake-on-lan on the nic in most linux distributions via <em>ethtool</em>.</p>
<p>If your nic supports WOL, it probably needs to be enabled in your computers BIOS first.</p>
<p>Most WOL tools use the &#8220;MagicPacket(tm)&#8221; method, so the right command to enable it on the nic &#8220;eth0&#8243; would be</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ethtool <span style="color: #660033;">-s</span> eth0 wol g</pre></div></div>

<p>This is not a persistent setting and it is gone after a reboot. Most tips around recommend creating a runlevel script for executing this command after boot or before shutdown.</p>
<p>I&#8217;ve added the command as a hook in my network scripts:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">auto eth0
iface eth0 inet dhcp
        pre-down ethtool <span style="color: #660033;">-s</span> eth0 wol g</pre></div></div>

<p>You can also use post-up. I like this method because i tend to forget about my runlevel scripts and so i keep the network stuff in one place <img src='http://info.michael-simons.eu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>If you are a debian user, you maybe need to stop your system from turning off the nic on HALT. To do so, add</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">NETDOWN</span>=no</pre></div></div>

<p>to &#8220;/etc/default/halt&#8221;.</p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=399&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_399" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2010/03/03/linux-persistent-wake-on-lan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change the image assets path in Rails</title>
		<link>http://info.michael-simons.eu/2009/11/01/how-to-change-the-image-assets-path-in-rails/</link>
		<comments>http://info.michael-simons.eu/2009/11/01/how-to-change-the-image-assets-path-in-rails/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 08:16:33 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=372</guid>
		<description><![CDATA[I found no other way to change the path of &#8220;images&#8221; in a Rails application than monkey patching the AssetTagHelper like so: module ActionView module Helpers #:nodoc: module AssetTagHelper def image_path&#40;source&#41; compute_public_path&#40;source, 'static_images'&#41; end alias_method :path_to_image, :image_path # aliased to avoid conflicts with an image_path named route end end end Share This]]></description>
			<content:encoded><![CDATA[<p>I found no other way to change the path of &#8220;images&#8221; in a Rails application than monkey patching the AssetTagHelper like so:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">module</span> ActionView
  <span style="color:#9966CC; font-weight:bold;">module</span> Helpers <span style="color:#008000; font-style:italic;">#:nodoc:</span>
    <span style="color:#9966CC; font-weight:bold;">module</span> AssetTagHelper
      <span style="color:#9966CC; font-weight:bold;">def</span> image_path<span style="color:#006600; font-weight:bold;">&#40;</span>source<span style="color:#006600; font-weight:bold;">&#41;</span>
        compute_public_path<span style="color:#006600; font-weight:bold;">&#40;</span>source, <span style="color:#996600;">'static_images'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
      alias_method <span style="color:#ff3333; font-weight:bold;">:path_to_image</span>, <span style="color:#ff3333; font-weight:bold;">:image_path</span> <span style="color:#008000; font-style:italic;"># aliased to avoid conflicts with an image_path named route</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p class="akst_link"><a href="http://info.michael-simons.eu/?p=372&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_372" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2009/11/01/how-to-change-the-image-assets-path-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN: Revert to previous version</title>
		<link>http://info.michael-simons.eu/2009/09/09/svn-revert-to-previous-version/</link>
		<comments>http://info.michael-simons.eu/2009/09/09/svn-revert-to-previous-version/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 20:56:29 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=366</guid>
		<description><![CDATA[Just a quick reminder: To revert a complete working copy or a single file use: svn merge -rHEAD:PREV . # or svn merge -rHEAD:PREV path/to/file svn commit -m &#34;reverted&#34; Share This]]></description>
			<content:encoded><![CDATA[<p>Just a quick reminder:</p>
<p>To revert a complete working copy or a single file use:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> merge -rHEAD:PREV .
<span style="color: #666666; font-style: italic;"># or</span>
<span style="color: #c20cb9; font-weight: bold;">svn</span> merge -rHEAD:PREV path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">file</span>
<span style="color: #c20cb9; font-weight: bold;">svn</span> commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;reverted&quot;</span></pre></div></div>

<p class="akst_link"><a href="http://info.michael-simons.eu/?p=366&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_366" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2009/09/09/svn-revert-to-previous-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phusion Passenger and memcache-client revisited</title>
		<link>http://info.michael-simons.eu/2009/03/23/phusion-passenger-and-memcache-client-revisited/</link>
		<comments>http://info.michael-simons.eu/2009/03/23/phusion-passenger-and-memcache-client-revisited/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 10:35:49 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=313</guid>
		<description><![CDATA[The last Passenger update brought some good explanation off the problems regarding Passenger and memcache-client (see here). Smart spawning of Passenger processes creates shared file descriptors. As the connections to memcached are sockets they are shared as well so data on them gets corrupted which is explained very nicely in the Passenger documentation: Example 1: [...]]]></description>
			<content:encoded><![CDATA[<p>The last <a href="http://www.modrails.com/">Passenger</a> update brought some good explanation off the problems regarding Passenger and memcache-client (see <a href="http://info.michael-simons.eu/2009/02/23/phusion-passenger-and-memcached-memcache-client/">here</a>). </p>
<p>Smart spawning of Passenger processes creates shared file descriptors. As the connections to memcached are sockets they are shared as well so data on them gets corrupted which is explained very nicely in the Passenger documentation: <a href="http://www.modrails.com/documentation/Users%20guide.html#_example_1_memcached_connection_sharing_harmful">Example 1: Memcached connection sharing (harmful)</a>.</p>
<p>The solution presented there works like a charm. The <em>reestablish_connection_to_memcached</em> line is actually not more than <em>CACHE.reset</em> where CACHE is the reference to the memcache connection.</p>
<p>After that change, spawning methods smart-lv2 and smart will work in connection with environment.rb configured memcache connections.</p>
<p><ins datetime="2009-03-25T15:15:15+00:00">Edit</ins>: As requested in the comments, a little example:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">memcache_options = <span style="color:#006600; font-weight:bold;">&#123;</span>
  <span style="color:#ff3333; font-weight:bold;">:c_threshold</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">10000</span>,
  <span style="color:#ff3333; font-weight:bold;">:compression</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>,
  <span style="color:#ff3333; font-weight:bold;">:debug</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">false</span>,
  <span style="color:#ff3333; font-weight:bold;">:namespace</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'some_ns'</span>,
  <span style="color:#ff3333; font-weight:bold;">:readonly</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">false</span>,
  <span style="color:#ff3333; font-weight:bold;">:urlencode</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">false</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
CACHE = MemCache.<span style="color:#9900CC;">new</span> memcache_options
CACHE.<span style="color:#9900CC;">servers</span> = <span style="color:#996600;">'127.0.0.1:11211'</span>
<span style="color:#9966CC; font-weight:bold;">begin</span>
   PhusionPassenger.<span style="color:#9900CC;">on_event</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:starting_worker_process</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>forked<span style="color:#006600; font-weight:bold;">|</span>
     <span style="color:#9966CC; font-weight:bold;">if</span> forked
       <span style="color:#008000; font-style:italic;"># We're in smart spawning mode, so...</span>
       <span style="color:#008000; font-style:italic;"># Close duplicated memcached connections - they will open themselves</span>
       CACHE.<span style="color:#9900CC;">reset</span>
     <span style="color:#9966CC; font-weight:bold;">end</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#008000; font-style:italic;"># In case you're not running under Passenger (i.e. devmode with mongrel)</span>
<span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#CC00FF; font-weight:bold;">NameError</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> error
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>In this case, CACHE is the global constant that i use to access my memcache-client.</p>
<p>I guess you&#8217;ll need to do the same with the global Rails.cache object, but i&#8217;m not sure. Anyway, the above solution works for me. </p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=313&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_313" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2009/03/23/phusion-passenger-and-memcache-client-revisited/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Phusion Passenger and memcached / memcache-client</title>
		<link>http://info.michael-simons.eu/2009/02/23/phusion-passenger-and-memcached-memcache-client/</link>
		<comments>http://info.michael-simons.eu/2009/02/23/phusion-passenger-and-memcached-memcache-client/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 16:23:46 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=294</guid>
		<description><![CDATA[I recently switch from a mod_proxy / thin setup to Phusion Passenger and my application started to do the funniest things and the production.log was full with errors related to memcached. It seems, that passengers spawn method &#8220;smart&#8221; isn&#8217;t compatible with memcached. Within seconds on a lightly loaded server the cache gets corrupted big time. [...]]]></description>
			<content:encoded><![CDATA[<p>I recently switch from a mod_proxy / thin setup to <a href="http://www.modrails.com/">Phusion Passenger</a> and my application started to do the funniest things and the production.log was full with errors related to memcached.</p>
<p>It seems, that passengers spawn method &#8220;smart&#8221; isn&#8217;t compatible with memcached. Within seconds on a lightly loaded server the cache gets corrupted big time.</p>
<p>I got better results with a newer memcache client (the ruby gem actually), but for that i need to remove the client from the rails vendor lib. Furthermore, under higher load there still where errors.</p>
<p>Only solution is to set the spawn method to conservative like so</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">RailsSpawnMethod conservative</pre></div></div>

<p>Problem seems to be known in the Phusion and Rails teams.</p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=294&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_294" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2009/02/23/phusion-passenger-and-memcached-memcache-client/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby: Formatting time values as RFC3339</title>
		<link>http://info.michael-simons.eu/2008/11/01/ruby-formatting-time-values-as-rfc3339/</link>
		<comments>http://info.michael-simons.eu/2008/11/01/ruby-formatting-time-values-as-rfc3339/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 12:07:15 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=228</guid>
		<description><![CDATA[Times in RSS Feeds and the like are formatted as RFC3339 most of the time. You can save yourself from strftime by using Time.now.xmlschema Share This]]></description>
			<content:encoded><![CDATA[<p>Times in RSS Feeds and the like are formatted as RFC3339 most of the time. You can save yourself from strftime by using</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">now</span>.<span style="color:#9900CC;">xmlschema</span></pre></div></div>

<p class="akst_link"><a href="http://info.michael-simons.eu/?p=228&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_228" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2008/11/01/ruby-formatting-time-values-as-rfc3339/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Turn off RoRs automatic timezone conversion for columns</title>
		<link>http://info.michael-simons.eu/2008/11/01/turn-off-rors-automatic-timezone-conversion-for-columns/</link>
		<comments>http://info.michael-simons.eu/2008/11/01/turn-off-rors-automatic-timezone-conversion-for-columns/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 09:15:32 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=225</guid>
		<description><![CDATA[I couldn&#8217;t find this in the documents, but Geoff Buesing showed me the hooks to turn off Ruby On Rails&#8217; automatic timezone conversions for some columns of a model or a complete model: # Turn it off for just some columns class Picture &#60; ActiveRecord::Base def self.skip_time_zone_conversion_for_attributes &#91;:created_at, :published_at&#93; end end &#160; # Turin it [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t find this in the documents, but <a href="http://www.geoffbuesing.com/">Geoff Buesing</a> showed me the hooks to turn off Ruby On Rails&#8217; automatic timezone conversions for some columns of a model or a complete model:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># Turn it off for just some columns</span>
<span style="color:#9966CC; font-weight:bold;">class</span> Picture <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>
 <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">skip_time_zone_conversion_for_attributes</span>
   <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:created_at</span>, <span style="color:#ff3333; font-weight:bold;">:published_at</span><span style="color:#006600; font-weight:bold;">&#93;</span>
 <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Turin it off for the whole model</span>
<span style="color:#9966CC; font-weight:bold;">class</span> Picture <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>
 <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">time_zone_aware_attributes</span>
   <span style="color:#0000FF; font-weight:bold;">false</span>
 <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Thanks a lot!</p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=225&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_225" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2008/11/01/turn-off-rors-automatic-timezone-conversion-for-columns/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sony Ericsson C702: Show received and send traffic</title>
		<link>http://info.michael-simons.eu/2008/07/28/sony-ericsson-c702-show-received-and-send-traffic/</link>
		<comments>http://info.michael-simons.eu/2008/07/28/sony-ericsson-c702-show-received-and-send-traffic/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 20:02:27 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=193</guid>
		<description><![CDATA[Once again, a quick reminder for myself: Howto display the internet traffic on your Sony Ericsson C702: Menü, #, 4th Tab, 5 (On a german phone: &#8220;Einstellungen / Anrufe / Zeit und Kosten&#8221;) I guess that works with other SEs like K800i and K850i. I remember an old SE that i had which always displayed [...]]]></description>
			<content:encoded><![CDATA[<p>Once again, a quick reminder for myself: Howto display the internet traffic on your Sony Ericsson C702:</p>
<pre>Menü, #, 4th Tab, 5</pre>
<p>(On a german phone: &#8220;Einstellungen / Anrufe / Zeit und Kosten&#8221;)</p>
<p>I guess that works with other SEs like K800i and K850i.</p>
<p>I remember an old SE that i had which always displayed the traffic after ending an internet session, i wonder why they changed it.</p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=193&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_193" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2008/07/28/sony-ericsson-c702-show-received-and-send-traffic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make XQuartz more usable</title>
		<link>http://info.michael-simons.eu/2008/07/28/make-xquartz-more-usable/</link>
		<comments>http://info.michael-simons.eu/2008/07/28/make-xquartz-more-usable/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 17:31:01 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[English posts]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=191</guid>
		<description><![CDATA[This post is an update to Make Gimp.app usable on a mac: The &#8220;Click through&#8221; property on both Apples X11 and the X11 provided by XQuartz is not set. This leads to the fact, that you have to click on each X11 window twice: First activating it, 2nd pushing a button or whatever else. I [...]]]></description>
			<content:encoded><![CDATA[<p>This post is an update to <a href="http://info.michael-simons.eu/2007/06/22/make-gimpapp-usable-on-a-mac/">Make Gimp.app usable on a mac</a>:</p>
<p>The &#8220;Click through&#8221; property on both Apples X11 and the X11 provided by <a href="http://xquartz.macosforge.org/trac/wiki">XQuartz</a> is not set. This leads to the fact, that you have to click on each X11 window twice: First activating it, 2nd pushing a button or whatever else. I hate this, i really do.</p>
<p>With Apples X11, open a terminal and enter:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">defaults <span style="color: #c20cb9; font-weight: bold;">write</span> com.apple.X11 wm_click_through <span style="color: #660033;">-bool</span> <span style="color: #c20cb9; font-weight: bold;">true</span></pre></div></div>

<p>With XQuartz X11 enter:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">defaults <span style="color: #c20cb9; font-weight: bold;">write</span> org.x.X11 wm_click_through <span style="color: #660033;">-bool</span> <span style="color: #c20cb9; font-weight: bold;">true</span></pre></div></div>

<p>This will help you with all X11 apps, like Gimp, Inkscape, Open Office and the likes.</p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=191&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_191" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2008/07/28/make-xquartz-more-usable/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Put your mac to rest via ssh</title>
		<link>http://info.michael-simons.eu/2008/07/17/put-your-mac-to-rest-via-ssh/</link>
		<comments>http://info.michael-simons.eu/2008/07/17/put-your-mac-to-rest-via-ssh/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 11:23:52 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[English posts]]></category>
		<category><![CDATA[Applescript]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=179</guid>
		<description><![CDATA[Sometimes my Macbook decides to wake up from his sleep (a.k.a hibernation). Most of the times i notice this at work when my emails disappear from my imap inbox as Mail.app applies his rules. As i do not have Apple Remote Desktop or any other VNC server enabled on my Macbook, i do have a [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes my Macbook decides to wake up from his sleep (a.k.a hibernation). Most of the times i notice this at work when my emails disappear from my imap inbox as Mail.app applies his rules.</p>
<p>As i do not have Apple Remote Desktop or any other VNC server enabled on my Macbook, i do have a problem.</p>
<p>I can vpn into my home and i can ssh into the Macbook, so i came up with the following solution:</p>
<p>Put the following three lines into a plain textfile, i.e. &#8220;sleep.txt&#8221; and save it somewhere:</p>
<pre>
tell application "Finder"
  sleep
end tell
</pre>
<p>Then, open Terminal.app, change to the directory you saved the file in and execute:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">osascript sleep.txt</pre></div></div>

<p><del>Your ssh connection will then timeout and the Mac sleeps.</del></p>
<p>Stupid me forgot that ssh can execute remote commands: From your workmachine execute</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> my_home_computer <span style="color: #ff0000;">'osascript sleep.txt'</span></pre></div></div>

<p>and you&#8217;re done. Thanks &#8220;tante&#8221; for reminding me <img src='http://info.michael-simons.eu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Alternatively, you can achieve similar with Mail.app itself, have a look at the solution <a href="http://osxdaily.com/2007/02/06/put-your-mac-to-sleep-remotely-via-email-or-text-message/">here</a>, but i like mine better.</p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=179&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_179" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2008/07/17/put-your-mac-to-rest-via-ssh/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
