<?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>petersteinberger.com &#187; Useful Bits</title>
	<atom:link href="http://petersteinberger.com/category/useful-bits/feed/" rel="self" type="application/rss+xml" />
	<link>http://petersteinberger.com</link>
	<description>bits about life, coding and stuff</description>
	<lastBuildDate>Fri, 13 Jan 2012 16:32:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>This week&#8217;s links</title>
		<link>http://petersteinberger.com/2010/04/this-weeks-links-6/</link>
		<comments>http://petersteinberger.com/2010/04/this-weeks-links-6/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 08:11:58 +0000</pubDate>
		<dc:creator>studpete</dc:creator>
				<category><![CDATA[Useful Bits]]></category>

		<guid isPermaLink="false">http://petersteinberger.com/?p=798</guid>
		<description><![CDATA[Make Your Facebook Account Private Love the group feature. E.g. you can have &#8220;friends&#8221; and &#8220;close friends&#8221;, with different visibility settings Easy UIView debugging on the iPhone [i love this one!] When building a complex application with a lot of views, sometimes it’s handy to be able to see exactly what that relationship is. Farewell [...]
Related posts:<ol>
<li><a href='http://petersteinberger.com/2010/06/going-android-for-two-weeks/' rel='bookmark' title='Going Android for two Weeks'>Going Android for two Weeks</a></li>
<li><a href='http://petersteinberger.com/2010/04/this-weeks-links-4/' rel='bookmark' title='This week&#8217;s links'>This week&#8217;s links</a></li>
<li><a href='http://petersteinberger.com/2010/04/this-weeks-links-5/' rel='bookmark' title='This week&#8217;s links'>This week&#8217;s links</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://howto.wired.com/wiki/Make_Your_Facebook_Account_Private" target="_blank" class="liexternal">Make Your Facebook Account Private</a></p>
<blockquote><p>Love the group feature. E.g. you can have &#8220;friends&#8221; and &#8220;close friends&#8221;, with different visibility settings</p></blockquote>
<p><a href="http://ramin.firoozye.com/2008/12/11/easy-uiview-debugging-on-the-iphone/" target="_blank" class="liexternal">Easy UIView debugging on the iPhone</a> [i love this one!]</p>
<blockquote><p>When building a complex application with a lot of views, sometimes it’s handy to be able to see exactly what that relationship is.</p></blockquote>
<p><a href="http://design.canonical.com/2010/04/notification-area/" target="_blank" class="liexternal">Farewell to the notification area</a></p>
<blockquote><p>&#8220;We can&#8217;t go on like this&#8221; &#8211; Very interesting read from Canonical, Ubuntu. Mac OS has the same problem with the notification area.</p></blockquote>
<p><a href="http://github.com/jdg/MBProgressHUD" target="_blank" class="liexternal">Really really really great Progress HUD for the iPhone</a></p>
<blockquote><p>You gotta love this one. So smooth.</p></blockquote>
<p>Related posts:<ol>
<li><a href='http://petersteinberger.com/2010/06/going-android-for-two-weeks/' rel='bookmark' title='Going Android for two Weeks'>Going Android for two Weeks</a></li>
<li><a href='http://petersteinberger.com/2010/04/this-weeks-links-4/' rel='bookmark' title='This week&#8217;s links'>This week&#8217;s links</a></li>
<li><a href='http://petersteinberger.com/2010/04/this-weeks-links-5/' rel='bookmark' title='This week&#8217;s links'>This week&#8217;s links</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://petersteinberger.com/2010/04/this-weeks-links-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This week&#8217;s links</title>
		<link>http://petersteinberger.com/2010/04/this-weeks-links-5/</link>
		<comments>http://petersteinberger.com/2010/04/this-weeks-links-5/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 08:03:10 +0000</pubDate>
		<dc:creator>studpete</dc:creator>
				<category><![CDATA[Useful Bits]]></category>

		<guid isPermaLink="false">http://petersteinberger.com/?p=779</guid>
		<description><![CDATA[Things I learned from iPhone and Droid ads Good stuff. And is in sync with the fact that most Android users are men. This site is also interesting for the use of different stylesheets via css3, see next Detecting device size &#38; orientation Nice: As the user resizes the window, Firefox will switch style sheets as [...]
Related posts:<ol>
<li><a href='http://petersteinberger.com/2009/06/home/' rel='bookmark' title='HOME'>HOME</a></li>
<li><a href='http://petersteinberger.com/2010/06/going-android-for-two-weeks/' rel='bookmark' title='Going Android for two Weeks'>Going Android for two Weeks</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://mislav.uniqpath.com/iphone-droid-ads/" target="_blank" class="liexternal">Things I learned from iPhone and Droid ads</a></p>
<blockquote><p>Good stuff. And is in sync with the fact that <a href="http://www.engadget.com/2010/02/26/survey-says-android-users-mostly-male-webos-not-just-for-women/" target="_blank" class="liexternal">most Android users are men</a>. This site is also interesting for the use of different stylesheets via css3, see next</p></blockquote>
<p><a href="http://mislav.uniqpath.com/2010/04/targeted-css/" target="_blank" class="liexternal">Detecting device size &amp; orientation</a></p>
<blockquote><p>Nice: As the user resizes the window, Firefox will switch style sheets as appropriate based on media queries using the width and height media features.</p></blockquote>
<p><a href="http://sam.brown.tc/entry/414/how-to-stay-sane-when-freelancing-from-home" target="_blank" class="liexternal">How to stay sane when freelancing from home</a></p>
<blockquote><p>My top productivity tip? Turn off Twitter when you’re working. <img src='http://petersteinberger.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p></blockquote>
<p><a href="http://www.leemunroe.com/freelance-document-templates/" target="_blank" class="liexternal">5 Essential Document Templates for Freelance Designers</a></p>
<p>PS: I know, there&#8217;re not <em>really</em> weekly, but I can&#8217;t hold it back&#8230;</p>
<p>Related posts:<ol>
<li><a href='http://petersteinberger.com/2009/06/home/' rel='bookmark' title='HOME'>HOME</a></li>
<li><a href='http://petersteinberger.com/2010/06/going-android-for-two-weeks/' rel='bookmark' title='Going Android for two Weeks'>Going Android for two Weeks</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://petersteinberger.com/2010/04/this-weeks-links-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This week&#8217;s links</title>
		<link>http://petersteinberger.com/2010/04/this-weeks-links-4/</link>
		<comments>http://petersteinberger.com/2010/04/this-weeks-links-4/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 17:59:56 +0000</pubDate>
		<dc:creator>studpete</dc:creator>
				<category><![CDATA[Useful Bits]]></category>

		<guid isPermaLink="false">http://petersteinberger.com/?p=765</guid>
		<description><![CDATA[Great stuff this week! Helvetireader &#8211; ZEN for Google Reader. I love it! Multi-Monitor Wallpaper Simple Iphone Image Processing Library iPad Benchmarks I believe the technical term for this is “Holy crap!” iBooks and private APIs Apple, shame yourself. The functionality is great, but this App is on the AppStore and completes directly with other [...]
Related posts:<ol>
<li><a href='http://petersteinberger.com/2010/04/this-weeks-links-6/' rel='bookmark' title='This week&#8217;s links'>This week&#8217;s links</a></li>
<li><a href='http://petersteinberger.com/2010/06/going-android-for-two-weeks/' rel='bookmark' title='Going Android for two Weeks'>Going Android for two Weeks</a></li>
<li><a href='http://petersteinberger.com/2010/04/this-weeks-links-5/' rel='bookmark' title='This week&#8217;s links'>This week&#8217;s links</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Great stuff this week!</p>
<p><a href="http://helvetireader.com/" target="_blank" class="liexternal">Helvetireader</a> &#8211; ZEN for Google Reader. I love it!</p>
<p><a href="http://mintywhite.com/customize/multi-monitor/100-triple-screenmonitor-desktop-wallpapers/" target="_blank" class="liexternal">Multi-Monitor Wallpaper</a></p>
<p><a href="http://code.google.com/p/simple-iphone-image-processing/" target="_blank" class="liexternal">Simple Iphone Image Processing Library</a></p>
<p><a href="http://furbo.org/2010/04/03/benchmarking-in-your-lap/" target="_blank" class="liexternal">iPad Benchmarks</a></p>
<blockquote><p>I believe the technical term for this is “Holy crap!”</p></blockquote>
<p><a href="http://www.marco.org/500743718" target="_blank" class="liexternal">iBooks and private APIs</a></p>
<p>Apple, shame yourself. The functionality is great, but this App is on the AppStore and completes directly with other reader apps. People won&#8217;t understand why iBook has e.g. a real brightness control where your app don&#8217;t.<br />
Let&#8217;s just hope iPhone OS 4 Sneak Peak on Thursday will open those APIs.</p>
<p><a href="http://dirtywords.tv/2009/reclaim-disk-space-after-creative-suite-4-updates/" target="_blank" class="liexternal">Delete Adobe Creative Suite CS4 Patch Files</a></p>
<blockquote><p>Grrr. space is limited on a SSD. There&#8217;s just no reason for Adobe to keep them on my disk!</p></blockquote>
<p>Related posts:<ol>
<li><a href='http://petersteinberger.com/2010/04/this-weeks-links-6/' rel='bookmark' title='This week&#8217;s links'>This week&#8217;s links</a></li>
<li><a href='http://petersteinberger.com/2010/06/going-android-for-two-weeks/' rel='bookmark' title='Going Android for two Weeks'>Going Android for two Weeks</a></li>
<li><a href='http://petersteinberger.com/2010/04/this-weeks-links-5/' rel='bookmark' title='This week&#8217;s links'>This week&#8217;s links</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://petersteinberger.com/2010/04/this-weeks-links-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Change the default text for password protected pages</title>
		<link>http://petersteinberger.com/2010/03/wordpress-change-the-default-text-for-password-protected-pages/</link>
		<comments>http://petersteinberger.com/2010/03/wordpress-change-the-default-text-for-password-protected-pages/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 00:09:31 +0000</pubDate>
		<dc:creator>studpete</dc:creator>
				<category><![CDATA[Useful Bits]]></category>

		<guid isPermaLink="false">http://petersteinberger.com/?p=684</guid>
		<description><![CDATA[Edit functions.php of your template and paste in this [CC lang="php"] // Password Protected Page Message function custom_password_form($form) { $subs = array( &#8216;# This post is password protected. To view it please enter your password below: #&#8217; => &#8216; Hopefully this works. &#8216;, &#8216;# #&#8217; => &#8216; &#8216;, &#8216;# #&#8217; => &#8216; &#8216;, &#8216;# #&#8217; [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Edit functions.php of your template and paste in this</p>
<p>[CC lang="php"]<br />
// Password Protected Page Message<br />
function custom_password_form($form) {<br />
  $subs = array(<br />
    &#8216;#
<p>This post is password protected. To view it please enter your password below:</p>
<p>#&#8217; => &#8216;
<p>Hopefully this works.</p>
<p>&#8216;,<br />
    &#8216;#<br />
<form(.*?)>#&#8217; => &#8216;<br />
<form$1 class="passwordform">&#8216;,<br />
    &#8216;#<br />
<input(.*?)type="password"(.*?) />#&#8217; => &#8216;<br />
<input$1type="password"$2 class="text" />&#8216;,<br />
    &#8216;#<br />
<input(.*?)type="submit"(.*?) />#&#8217; => &#8216;<br />
<input$1type="submit"$2 class="button" />&#8216;<br />
  );</p>
<p>  echo preg_replace(array_keys($subs), array_values($subs), $form);<br />
}</p>
<p>add_filter(&#8216;the_password_form&#8217;, &#8216;custom_password_form&#8217;);<br />
[/CC]</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://petersteinberger.com/2010/03/wordpress-change-the-default-text-for-password-protected-pages/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Backup Server with rsnapshot</title>
		<link>http://petersteinberger.com/2010/02/backup-server-with-rsnapshot/</link>
		<comments>http://petersteinberger.com/2010/02/backup-server-with-rsnapshot/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 22:22:25 +0000</pubDate>
		<dc:creator>studpete</dc:creator>
				<category><![CDATA[Useful Bits]]></category>

		<guid isPermaLink="false">http://petersteinberger.com/?p=579</guid>
		<description><![CDATA[rsnapshot is the TimeMachine for servers. Get it via macports. Next, configure /opt/local/etc/rsnapshot.conf. Change snapshot_root to a directory you like (probably within /Users/xxx/Backups/) Uncomment cmd_ssh Set the Backup Interval to interval manual 20 (use tabs!) Last, configure the server address. You want root for that, so be sure that public key auth is working on [...]
Related posts:<ol>
<li><a href='http://petersteinberger.com/2009/07/snippet-copy-ssh-key-to-server-in-one-line/' rel='bookmark' title='Snippet: copy ssh key to server in one line'>Snippet: copy ssh key to server in one line</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rsnapshot.org/howto/1.2/rsnapshot-HOWTO.en.html" target="_blank" class="liexternal">rsnapshot</a> is the TimeMachine for servers. Get it via macports.</p>
<p>Next, configure /opt/local/etc/rsnapshot.conf.</p>
<p>Change snapshot_root to a directory you like (probably within /Users/xxx/Backups/)</p>
<p>Uncomment cmd_ssh</p>
<p>Set the Backup Interval to<br />
interval	manual	20 (use tabs!)</p>
<p>Last, configure the server address. You want root for that, so be sure that public key auth is working on your remote machine.<br />
backup root@yourserver.com:/ SubPathInBackupDir/	exclude=proc,exclude=sys,exclude=tmp</p>
<p>Done! Invoke with sudo rsnapshot manual.</p>
<p>Related posts:<ol>
<li><a href='http://petersteinberger.com/2009/07/snippet-copy-ssh-key-to-server-in-one-line/' rel='bookmark' title='Snippet: copy ssh key to server in one line'>Snippet: copy ssh key to server in one line</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://petersteinberger.com/2010/02/backup-server-with-rsnapshot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If you ever make a startup.</title>
		<link>http://petersteinberger.com/2009/11/if-you-ever-make-a-startup/</link>
		<comments>http://petersteinberger.com/2009/11/if-you-ever-make-a-startup/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 08:43:19 +0000</pubDate>
		<dc:creator>studpete</dc:creator>
				<category><![CDATA[Useful Bits]]></category>

		<guid isPermaLink="false">http://petersteinberger.com/?p=497</guid>
		<description><![CDATA[be a bit creative on job conditions. people will love u. Related posts: This week&#8217;s links Don&#8217;t make the Demo look Done
Related posts:<ol>
<li><a href='http://petersteinberger.com/2010/04/this-weeks-links-4/' rel='bookmark' title='This week&#8217;s links'>This week&#8217;s links</a></li>
<li><a href='http://petersteinberger.com/2009/11/dont-make-the-demo-look-done/' rel='bookmark' title='Don&#8217;t make the Demo look Done'>Don&#8217;t make the Demo look Done</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>be a bit <a href="http://answers.onstartups.com/questions/1498/what-fun-and-low-cost-fringe-benefits-perks-would-you-offer-to-employees/1502" target="_blank" class="liexternal">creative on job conditions</a>. people will love u.</p>
<p>Related posts:<ol>
<li><a href='http://petersteinberger.com/2010/04/this-weeks-links-4/' rel='bookmark' title='This week&#8217;s links'>This week&#8217;s links</a></li>
<li><a href='http://petersteinberger.com/2009/11/dont-make-the-demo-look-done/' rel='bookmark' title='Don&#8217;t make the Demo look Done'>Don&#8217;t make the Demo look Done</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://petersteinberger.com/2009/11/if-you-ever-make-a-startup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snippet: copy ssh key to server in one line</title>
		<link>http://petersteinberger.com/2009/07/snippet-copy-ssh-key-to-server-in-one-line/</link>
		<comments>http://petersteinberger.com/2009/07/snippet-copy-ssh-key-to-server-in-one-line/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 08:29:47 +0000</pubDate>
		<dc:creator>studpete</dc:creator>
				<category><![CDATA[Useful Bits]]></category>

		<guid isPermaLink="false">http://petersteinberger.com/?p=287</guid>
		<description><![CDATA[cat ~/.ssh/id_rsa.pub &#124; ssh user@domain.com "cat >> .ssh/authorized_keys2 Related posts: Backup Server with rsnapshot
Related posts:<ol>
<li><a href='http://petersteinberger.com/2010/02/backup-server-with-rsnapshot/' rel='bookmark' title='Backup Server with rsnapshot'>Backup Server with rsnapshot</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><code lang="bash"><br />
cat ~/.ssh/id_rsa.pub | ssh user@domain.com "cat >> .ssh/authorized_keys2<br />
</code></p>
<p>Related posts:<ol>
<li><a href='http://petersteinberger.com/2010/02/backup-server-with-rsnapshot/' rel='bookmark' title='Backup Server with rsnapshot'>Backup Server with rsnapshot</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://petersteinberger.com/2009/07/snippet-copy-ssh-key-to-server-in-one-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tricks with bash</title>
		<link>http://petersteinberger.com/2009/05/tricks-with-bash/</link>
		<comments>http://petersteinberger.com/2009/05/tricks-with-bash/#comments</comments>
		<pubDate>Wed, 20 May 2009 13:19:44 +0000</pubDate>
		<dc:creator>studpete</dc:creator>
				<category><![CDATA[Useful Bits]]></category>

		<guid isPermaLink="false">http://petersteinberger.com/?p=114</guid>
		<description><![CDATA[Update: Even better, @zzamboni pointed me to &#60;&#60; commandlinefu &#62;&#62; the place to record those command-line gems that you return to again and again &#8212; Just use the searchbar on top Howto copy text to clipboard: (mac only, for linux, use xclip, see here) [cc]cat textfile &#124; pbcopy[/cc] I&#8217;ll update this blog post as I [...]
Related posts:<ol>
<li><a href='http://petersteinberger.com/2009/03/git-aliases-for-bash/' rel='bookmark' title='Git Aliases for bash'>Git Aliases for bash</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Update: Even better, @zzamboni pointed me to &lt;&lt; <a href="http://www.commandlinefu.com" target="_blank" class="liexternal">commandlinefu</a> &gt;&gt;<br />
the place to record those command-line gems that you return to again and again &#8212; Just use the searchbar on top</p>
<p>Howto copy text to clipboard: (mac only, for linux, use xclip, <a href="http://www.commandlinefu.com/commands/view/653/copy-text-to-the-clipboard" target="_blank" class="liexternal">see here</a>)</p>
<p>[cc]cat textfile | pbcopy[/cc]</p>
<p>I&#8217;ll update this blog post as I stumble upon something new.</p>
<p>Related posts:<ol>
<li><a href='http://petersteinberger.com/2009/03/git-aliases-for-bash/' rel='bookmark' title='Git Aliases for bash'>Git Aliases for bash</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://petersteinberger.com/2009/05/tricks-with-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Repair a crashed mysql table</title>
		<link>http://petersteinberger.com/2009/05/repair-a-crashed-mysql-table/</link>
		<comments>http://petersteinberger.com/2009/05/repair-a-crashed-mysql-table/#comments</comments>
		<pubDate>Sun, 03 May 2009 11:27:32 +0000</pubDate>
		<dc:creator>studpete</dc:creator>
				<category><![CDATA[Useful Bits]]></category>

		<guid isPermaLink="false">http://petersteinberger.com/?p=57</guid>
		<description><![CDATA[If phpmyadmin shows you that your table needs repair, just repair it (databases are wonderful EDIT:  Realized that the linked blog article is just crap. Repair via phpmyadmin is nice, but you&#8217;re better of trying it with sqladmin. No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<p>If phpmyadmin shows you that your table needs repair, <a href="http://paulstamatiou.com/2006/05/31/how-to-quickie-repair-mysql-tables-in-phpmyadmin" target="_blank" class="liexternal">just repair it</a> (databases are wonderful <img src='http://petersteinberger.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>EDIT:  Realized that the linked blog article is just crap. Repair via phpmyadmin is nice, but you&#8217;re better of trying it with sqladmin.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://petersteinberger.com/2009/05/repair-a-crashed-mysql-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql5 with mac os x</title>
		<link>http://petersteinberger.com/2009/05/mysql5-with-mac-os-x/</link>
		<comments>http://petersteinberger.com/2009/05/mysql5-with-mac-os-x/#comments</comments>
		<pubDate>Sun, 03 May 2009 11:25:59 +0000</pubDate>
		<dc:creator>studpete</dc:creator>
				<category><![CDATA[Useful Bits]]></category>

		<guid isPermaLink="false">http://petersteinberger.com/?p=54</guid>
		<description><![CDATA[Use macports to install [cc lang="bash"]sudo port install mysql5 +server[/cc] A startup link is prepared. Use these commandos to enable/disable the server AND the auto startup [cc lang="bash"]sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql5.plist Generate the connector socket: (Rails, Python and other language may access your  server directly via socket) sudo ln [...]
Related posts:<ol>
<li><a href='http://petersteinberger.com/2010/09/switching-to-homebrew/' rel='bookmark' title='Switching to homebrew'>Switching to homebrew</a></li>
<li><a href='http://petersteinberger.com/2010/03/convert-mercurial-repos-to-git/' rel='bookmark' title='Convert mercurial repos to git'>Convert mercurial repos to git</a></li>
<li><a href='http://petersteinberger.com/2009/07/snippet-copy-ssh-key-to-server-in-one-line/' rel='bookmark' title='Snippet: copy ssh key to server in one line'>Snippet: copy ssh key to server in one line</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Use macports to install<br />
[cc lang="bash"]sudo port install mysql5 +server[/cc]<br />
A startup link is prepared. Use these commandos to enable/disable the server AND the auto startup<br />
[cc lang="bash"]sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist<br />
sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql5.plist</p></blockquote>
<p>Generate the connector socket: (Rails, Python and other language may access your  server directly via socket)</p>
<blockquote><p>sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock<br />
sudo mkdir /var/mysql<br />
sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /var/mysql/mysql.sock[/cc]<br />
Set up your default user: (change &#8216;password&#8217; to anything you like)<br />
[cc lang="bash"]sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql5.plist<br />
sudo /opt/local/lib/mysql5/bin/mysql_install_db &#8211;user=mysql<br />
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist<br />
mysql5 -u root<br />
UPDATE mysql.user SET Password = PASSWORD(&#8216;password&#8217;) WHERE User = &#8216;root&#8217;;<br />
FLUSH PRIVILEGES;<br />
quit[/cc]<br />
finally, try to login:<br />
[cc lang="bash"]mysql5 -u root -p[/cc]<br />
If you need to change the default settings, you have to generate my.cnf:<br />
[cc lang="bash"]sudo cp /opt/local/share/mysql5/mysql/my-large.cnf /opt/local/etc/mysql5/my.cnf[/cc]<br />
I altered the max_allowed_package &#8211; Setting for [client] to import large mysql dumps.</p>
<p>For connecting, there is a nice cocoa app called Sequel Pro. I like phpmyadmin, so i set up apache+php5+phpmyadmin for that. (its all in macports)</p>
<p>Related posts:<ol>
<li><a href='http://petersteinberger.com/2010/09/switching-to-homebrew/' rel='bookmark' title='Switching to homebrew'>Switching to homebrew</a></li>
<li><a href='http://petersteinberger.com/2010/03/convert-mercurial-repos-to-git/' rel='bookmark' title='Convert mercurial repos to git'>Convert mercurial repos to git</a></li>
<li><a href='http://petersteinberger.com/2009/07/snippet-copy-ssh-key-to-server-in-one-line/' rel='bookmark' title='Snippet: copy ssh key to server in one line'>Snippet: copy ssh key to server in one line</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://petersteinberger.com/2009/05/mysql5-with-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

