<?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>BitBonsai Labs &#187; mac</title>
	<atom:link href="http://www.bitbonsai.com/tag/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bitbonsai.com</link>
	<description>Mauricio Wolff&#039;s geekness</description>
	<lastBuildDate>Tue, 18 Oct 2011 12:47:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to Make an HTML5 iPhone App</title>
		<link>http://www.bitbonsai.com/html-iphone-app/</link>
		<comments>http://www.bitbonsai.com/html-iphone-app/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 13:12:44 +0000</pubDate>
		<dc:creator>mw</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://www.bitbonsai.com/?p=186</guid>
		<description><![CDATA[This is nice. An article on SixRevisions, short version here for my Archive. If you write a couple meta tags, your html5 app will look like any other iPhone App, but will also work on Android, PalmPre, etc&#8230; &#60;meta name=&#34;viewport&#34; content=&#34;user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0&#34;/&#62; &#60;meta name=&#34;apple-mobile-web-app-capable&#34; content=&#34;yes&#34; /&#62; &#60;meta name=&#34;apple-mobile-web-app-status-bar-style&#34; content=&#34;black&#34; /&#62; &#60;link rel=&#34;apple-touch-icon&#34; href=&#34;iphone_icon.png&#34;/&#62; [...]]]></description>
			<content:encoded><![CDATA[<h4><a href="http://img.skitch.com/20100329-k4k9rkinb4m8r2xebsqtb6d4s9.jpg"><img class="aligncenter" title="iPhone" src="http://img.skitch.com/20100329-k4k9rkinb4m8r2xebsqtb6d4s9.jpg" alt="" width="402" height="232" /></a>This is nice. An <a href="http://sixrevisions.com/web-development/html5-iphone-app/" target="_blank">article on SixRevisions</a>, short version here for my Archive.</h4>
<p>If you write a couple meta tags, your html5 app will look like any other iPhone App, but will also work on Android, PalmPre, etc&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;viewport&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apple-mobile-web-app-capable&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;yes&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apple-mobile-web-app-status-bar-style&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;black&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apple-touch-icon&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;iphone_icon.png&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apple-touch-startup-image&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;startup.png&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;styles.css&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;screen, mobile&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;main&quot;</span> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span>&gt;</span></pre></div></div>

<ul>
<li>apple-mobile-web-app-capable: This is another tip-off that we want to be an offline app.</li>
<li>apple-mobile-web-app-status-bar-style: This hides the status bar, and nav bar when the app is offline.</li>
<li>apple-touch-icon:This is the pointer to the image that want to be the icon.</li>
<li>apple-touch-startup-image: This is a url pointing to the startup image.</li>
</ul>
<h4>Application Cache</h4>
<p>Application caching allows browsers to determine in advance all the files a web page will need for the web page to work.</p>
<p>One tricky part to this whole thing is that the manifest (the list of files that need to be cached offline) has to be passed with a filetype Header set to text/manifest. That is why you need access to a web server that can set HTTP headers.</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">    CACHE MANIFEST
&nbsp;
    <span style="color: #adadad; font-style: italic;"># Version 3 </span>
&nbsp;
    style.css
    index.html
    init.js
&nbsp;
    <span style="color: #adadad; font-style: italic;"># offline icons</span>
    startup.png
    iphone_icon.png</pre></div></div>

<h4>Offline Data</h4>
<p>Along with the ability to keep files that are needed offline, you can also store user data in an offline database. There are two major APIs for per user and/or per page data. The first is localStorage. localStorage, is an easy to use key-value store with a dead simple API.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">    localStorage.<span style="color: #660066;">dataToStore</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span>
    console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>localStorage.<span style="color: #660066;">dataToStore</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// 5</span></pre></div></div>

<h4>Its also possible to use a webdatabase (SQLite):</h4>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">    <span style="color: #006600; font-style: italic;">// Try and get a database object</span>
    <span style="color: #003366; font-weight: bold;">var</span> db<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">openDatabase</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            db <span style="color: #339933;">=</span> openDatabase<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;NoteTest&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;1.0&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;HTML5 Database API example&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">200000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>db<span style="color: #009900;">&#41;</span>
                <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Failed to open the database on disk.  This is probably because the version was /
                bad or there is not enough space left in this domain's quota&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span>
            <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Couldn't open the database.  Please try with a WebKit nightly with this feature enabled&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span>err<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// Check and see if you need to initalize the DB</span>
    db.<span style="color: #660066;">transaction</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>tx<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        tx.<span style="color: #660066;">executeSql</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;SELECT COUNT(*) FROM WebkitStickyNotes&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>result<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            loadNotes<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>tx<span style="color: #339933;">,</span> error<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            tx.<span style="color: #660066;">executeSql</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;CREATE TABLE WebKitStickyNotes (id REAL UNIQUE, note TEXT, timestamp /
            REAL, left TEXT, top TEXT, zindex REAL)&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>result<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                loadNotes<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// Insert a test Note.</span>
    <span style="color: #003366; font-weight: bold;">var</span> note <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
        id<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;1&quot;</span><span style="color: #339933;">,</span>
        text<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot; This is a test note&quot;</span><span style="color: #339933;">,</span>
        timestamp<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;112123000&quot;</span><span style="color: #339933;">,</span>
        left<span style="color: #339933;">:</span><span style="color: #CC0000;">10</span><span style="color: #339933;">,</span>
        top<span style="color: #339933;">:</span><span style="color: #CC0000;">10</span><span style="color: #339933;">,</span>
        zIndex<span style="color: #339933;">:</span><span style="color: #CC0000;">2</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    db.<span style="color: #660066;">transaction</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>tx<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        tx.<span style="color: #660066;">executeSql</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;INSERT INTO WebKitStickyNotes (id, note, timestamp, left, top, zindex) VALUES /
        (?, ?, ?, ?, ?, ?)&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span>note.<span style="color: #660066;">id</span><span style="color: #339933;">,</span> note.<span style="color: #660066;">text</span><span style="color: #339933;">,</span> note.<span style="color: #660066;">timestamp</span><span style="color: #339933;">,</span> note.<span style="color: #660066;">left</span><span style="color: #339933;">,</span> note.<span style="color: #660066;">top</span><span style="color: #339933;">,</span> note.<span style="color: #660066;">zIndex</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
    <span style="color: #006600; font-style: italic;">// Get all the notes out of the database.</span>
    db.<span style="color: #660066;">transaction</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>tx<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        tx.<span style="color: #660066;">executeSql</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;SELECT id, note, timestamp, left, top, zindex /
        FROM WebKitStickyNotes&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>tx<span style="color: #339933;">,</span> result<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> result.<span style="color: #660066;">rows</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> <span style="color: #339933;">++</span>i<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>                 <span style="color: #003366; font-weight: bold;">var</span> row <span style="color: #339933;">=</span> result.<span style="color: #660066;">rows</span>.<span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>                 <span style="color: #003366; font-weight: bold;">var</span> note <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Note<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>                 note.<span style="color: #660066;">id</span> <span style="color: #339933;">=</span> row<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>                 note.<span style="color: #660066;">text</span> <span style="color: #339933;">=</span> row<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'note'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>                 note.<span style="color: #660066;">timestamp</span> <span style="color: #339933;">=</span> row<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'timestamp'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>                 note.<span style="color: #660066;">left</span> <span style="color: #339933;">=</span> row<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'left'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>                 note.<span style="color: #660066;">top</span> <span style="color: #339933;">=</span> row<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'top'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>                 note.<span style="color: #660066;">zIndex</span> <span style="color: #339933;">=</span> row<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'zindex'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>                 <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&gt;</span> highestId<span style="color: #009900;">&#41;</span>
                    highestId <span style="color: #339933;">=</span> row<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'zindex'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&gt;</span> highestZ<span style="color: #009900;">&#41;</span>
                    highestZ <span style="color: #339933;">=</span> row<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'zindex'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
&nbsp;
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>result.<span style="color: #660066;">rows</span>.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span>
                newNote<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>tx<span style="color: #339933;">,</span> error<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Failed to retrieve notes from database - '</span> <span style="color: #339933;">+</span> error.<span style="color: #660066;">message</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bitbonsai.com/html-iphone-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dois programas para ser mais produtivo</title>
		<link>http://www.bitbonsai.com/produtivo/</link>
		<comments>http://www.bitbonsai.com/produtivo/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 08:14:09 +0000</pubDate>
		<dc:creator>mw</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://www.bitbonsai.com/blog/?p=87</guid>
		<description><![CDATA[Tenho uma inclinação natural ao ceticismo, ou seja, a não aceitar imediatamente o que leio ou vejo sem, no mínimo, uma boa reflexão sobre o assunto. Uma das afirmações que li algum tempo atrás do Leo Babuta no mnmlist.com foi a dica de fazer menos, e procurar programas com menos distrações. É interessante perceber que [...]]]></description>
			<content:encoded><![CDATA[<p>Tenho uma inclinação natural ao ceticismo, ou seja, a não aceitar imediatamente o que leio ou vejo sem, no mínimo, uma boa reflexão sobre o assunto.</p>
<p>Uma das afirmações que li algum tempo atrás do Leo Babuta no <a href="http://mnmlist.com/" target="_blank">mnmlist.com</a> foi a dica de fazer menos, e procurar programas com menos distrações.  É interessante perceber que programas que deveriam aumentar a produtividade por permitir multitasking acabam só atrapalhado (pelo menos a mim) pois para realmente utilizá-los é preciso dedicar um bom tempo a eles ao invés de trabalhar, e acabam ficando parecidos com uma escrivaninha com pilhas de papéis e coisas a resolver, que o sujeito fica olhando sem saber por onde começar.</p>
<p>Pois depois de um tempo descobri que esta é uma chave para uma maior produtividade. <strong>Menos botões, menos janelas, menos tudo</strong>. Uma coisa de cada vez, wrap it up, get it done.</p>
<p>Isto acabou influenciando inclusive como navego na internet, pois ter 15 tabs abertos ao mesmo tempo com leituras diferentes, referências, emails, etc estavam me deixando demasiado cansado e retendo menos informação do que agora. Então preparei uma lista de programas que estão me ajudando na mudança, que espero sejam úteis para outras pessoas. Como ultimamente estou só no mac são mac-only, mas com certeza existem equivalentes para Windows.</p>
<h3><a href="http://www.codealchemists.com/jdarkroom/">JDarkRoom</a></h3>
<p><a href="http://www.bitbonsai.com/wp-content/uploads/2009/10/Screen-shot-2009-10-06-at-05.23.44.png"><img class="alignleft size-thumbnail wp-image-94" title="jDarkroom" src="http://www.bitbonsai.com/wp-content/uploads/2009/10/Screen-shot-2009-10-06-at-05.23.44-150x150.png" alt="jDarkroom" width="150" height="150" /></a>O melhor editor de textos, totalmente geek-style, que já vi até hoje.</p>
<p>Junte o nano (ou pico, para os mais antigos) e os atalhos de teclado do mac e o resultado é ele. Estou escrevendo este texto nele agora, pois a falta de formatação permite que o conteúdo seja o foco. Depois de terminar o texto, salve no desktop, copie e cole no editor preferido (word, wordpress, pages, whatever) e formate da melhor forma possível. Como ele toma conta da tela, além de uma certa nostalgia dos tempos dos PC XT, nada mais distrai.</p>
<p>Caso precise fazer algo, tipo abrir o mail ou algo em janelas, basta usar os atalhos do Spaces para mudar de desktop e depois voltar para a imersão nas próprias palavras. ⌘ + H também funciona.</p>
<h3><a href="http://www.barbariangroup.com/software/plainview">PlainView</a></h3>
<p><strong><a href="http://www.bitbonsai.com/wp-content/uploads/2009/10/Screen-shot-2009-10-06-at-05.03.26.png"><img class="alignleft size-thumbnail wp-image-88" title="Plain View Start Page" src="http://www.bitbonsai.com/wp-content/uploads/2009/10/Screen-shot-2009-10-06-at-05.03.26-150x150.png" alt="Plain View Start Page" width="150" height="150" /></a>Como</strong> eu consegui viver tantos anos lendo vários tabs ao mesmo tempo, às vezes em várias janelas, não sei.</p>
<p>O PlainView é um programinha super simples e despretensioso, que abre um browser (WebKit engine) em fullscreen, e os atalhos de teclado abrem HUDs (janelas modal translúcidas) que executam uma determinada função (como digitar um endereço ou ver as outras páginas abertas) e depois são fechados, eliminando as distrações.</p>
<p>Tão interessante que está fixo no Dock, descoberto ao acaso ao procurar uma extensão de Full Screen para o Firefox, que no Mac não funciona o F11 para o FFox. Se for preciso, também pode virar uma janela (com ⌘ + ⇪ + F) mas o grande barato é abrir um artigo em tela cheia e fechar ao terminar de ler.</p>
<p><strong>Por enquanto é só</strong>, mas vou continuar na procura e se achar mais algum atualizo este post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitbonsai.com/produtivo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capturar website screenshot no Mac</title>
		<link>http://www.bitbonsai.com/capturar-website-screenshot-no-mac/</link>
		<comments>http://www.bitbonsai.com/capturar-website-screenshot-no-mac/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 11:31:09 +0000</pubDate>
		<dc:creator>mw</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://www.bitbonsai.com/blog/?p=76</guid>
		<description><![CDATA[Algumas coisas no mac me deixam realmente feliz, como freewares práticos e objetivos, que fazem uma só coisa bem feita. Agora mesmo descobri uma que é o resumo destas qualidades; precisei capturar um website, que é mais comprido que um screenshot comum me daria a possibilidade de capturar com um simples ⌘ + 3. Solução? [...]]]></description>
			<content:encoded><![CDATA[<p>Algumas coisas no mac me deixam realmente feliz, como freewares práticos e objetivos, que fazem uma só coisa bem feita.</p>
<p>Agora mesmo descobri uma que é o resumo destas qualidades; precisei capturar um website, que é mais comprido que um screenshot comum me daria a possibilidade de capturar com um simples ⌘ + 3. Solução? <a href="http://derailer.org/paparazzi/" target="_blank">Papparazzi!</a></p>
<p>Ele permite configurar a resolução mínima, crop na imagem final e salva em PNG. Depois é só abrir no preview para redimensionar e salvar. <strong>Doce</strong>.</p>
<p style="text-align: center;"><a class="fancybox" rel="fancybox" href="http://img.skitch.com/20090925-bg9xjcejgbwb5f52mxddrwmy93.jpg"><img class="aligncenter" title="Paparazzi!" src="http://img.skitch.com/20090925-1dx474xfqxqngbybh99kusdbir.jpg" alt="" width="490" height="475" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitbonsai.com/capturar-website-screenshot-no-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Growl no Snow Leopard</title>
		<link>http://www.bitbonsai.com/growl-no-snow-leopard/</link>
		<comments>http://www.bitbonsai.com/growl-no-snow-leopard/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 11:09:47 +0000</pubDate>
		<dc:creator>mw</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://www.bitbonsai.com/blog/?p=72</guid>
		<description><![CDATA[Finalmente uma versão 64bits do Growl, compatível com Mail 4. Growl-1.2b3.dmg É ß, mas está funcionando perfeitamente so far&#8230;]]></description>
			<content:encoded><![CDATA[<p>Finalmente uma versão 64bits do Growl, compatível com Mail 4. <a href="http://growl.info/files/beta/Growl-1.2b3.dmg">Growl-1.2b3.dmg</a> É <span style="font-family: Helvetica, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: normal; font-size: 12px;"><strong><em>ß</em></strong><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px;">, mas está funcionando perfeitamente so far&#8230;</span></span></p>
<p><span style="font-family: Helvetica, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: normal; font-size: 12px;"><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px;"><a rel="fancybox" class="fancybox" href="http://img.skitch.com/20090925-tnu7qubeyixw4chg3qyb7q1kkn.jpg"><img class="aligncenter" title="Growl 64bits" src="http://img.skitch.com/20090925-bicwyrp95j8pw4hr7hefkuq82t.jpg" alt="" width="490" height="411" /></a><br />
</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitbonsai.com/growl-no-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spaces no Snow Leopard</title>
		<link>http://www.bitbonsai.com/spaces-no-snow-leopard/</link>
		<comments>http://www.bitbonsai.com/spaces-no-snow-leopard/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 15:33:20 +0000</pubDate>
		<dc:creator>mw</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://www.bitbonsai.com/blog/?p=62</guid>
		<description><![CDATA[Um truque que usava de vez em quando no Leopard era teclar F8 para ver os Spaces, F9 para ver o Expose e, quando me incomodava ter várias janelas em vários Spaces, teclava c para consolidar todas as janelas no primeiro Space. Fui fazer isso hoje no Snow Leopard e&#8230; nada. Não acreditei que tiraram [...]]]></description>
			<content:encoded><![CDATA[<p>Um truque que usava de vez em quando no Leopard era teclar <em><strong>F8</strong></em> para ver os <em>Spaces</em>, <em><strong>F9</strong></em> para ver o <em>Expose</em> e, quando me incomodava ter várias janelas em vários <em>Spaces</em>, teclava <strong><em>c</em></strong> para consolidar todas as janelas no primeiro <em>Space</em>. Fui fazer isso hoje no Snow Leopard e&#8230; <strong>nada</strong>.</p>
<p><strong>Não acreditei que tiraram um atalho tão útil</strong>. Procurando descobri que ele foi substituído por atalhos mais poderosos&#8230;</p>
<p>Agora o teclado funciona no <em>Spaces</em>, então pode-se navegar pelas setas. Clicando <strong>⌘ ←</strong> por exemplo move as janelas do <em>Space</em> selecionado para o da esquerda.  Se ao invés de <strong>⌘</strong> for usado <strong>⌥</strong>, ele troca a posição do <em>Space</em> da direita pelo da esquerda.</p>
<p>Melhor, não? Até agora todas as alterações que tenho visto no Snow Leopard o são&#8230;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto; border: 0px initial initial;" title="Spaces no Snow Leopard" src="http://img.skitch.com/20090917-c1697ab9nunw89irmbbsc1tkt3.jpg" alt="" width="460" height="159" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitbonsai.com/spaces-no-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snow Leopard&#8230; Notas do Upgrade</title>
		<link>http://www.bitbonsai.com/snow-leopard/</link>
		<comments>http://www.bitbonsai.com/snow-leopard/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 12:05:17 +0000</pubDate>
		<dc:creator>mw</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://www.bitbonsai.com/blog/?p=35</guid>
		<description><![CDATA[Realmente é rápido. Extremamente rápido. Vou descrever neste post algumas notas importantes da minha experiência no upgrade para Snow Leopard; encontrei algumas dificuldades e espero que estas notas poupem alguns cabelos brancos, assim como algumas que encontrei no caminho pouparam os meus. E se precisar reinstalar, que me sirva de guia. Não faça um upgrade, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Realmente é rápido. Extremamente rápido</strong>. Vou descrever neste post algumas notas importantes da minha experiência no upgrade para Snow Leopard; encontrei algumas dificuldades e espero que estas notas poupem alguns cabelos brancos, assim como algumas que encontrei no caminho pouparam os meus. E se precisar reinstalar, que me sirva de guia.</p>
<h4>Não faça um upgrade, instale do zero</h4>
<p>Quando peguei o DVD, o impulso foi bootar por ele e fazer um upgrade no meu Leopard que estava atualizado. Resultado: Na hora de fazer o upgrade do XTools simplesmente não instalava. Macports não funcionava. Resultado, computador meia-boca. Solução: Carbon Copy Cloner (backup no HD externo de todo o disco do mac) e formatar o disco. Instalar o Snow Leopard do zero.</p>
<h3>Resultado</h3>
<p>XTools instalou de primeira, tudo parece mais rápido. No final da instalação ele perguntou se queria restaurar os dados de outro mac. Como estava com o HD externo plugado, ele reconheceu tudo. Instalei Contas de usuário, etc mas não Aplicativos. Vou instalar à medida que sentir necessidade. Já havia preparado uma pasta _install no HD externo com tudo que estava instalado no Leopard antigo, é só escolher e instalar.</p>
<h3>Aplicativos 64bits</h3>
<p>O que já estou vendo que vou sentir falta é o <a href="http://docs.blacktree.com/visor/visor">Visor</a> (Terminal estilo Quake). Como não tem SIMBL para 64 bits, a alternativa é fazer o Terminal rodar em 32bits, selecionando Get Info ( + i) mas estou gostando da performance dele em 64. A outra alternativa é copiar o Terminal 32bits do Leopard e colocar ele junto como outra aplicação (<a href="http://metaskills.net/2009/8/18/visor-terminal-on-snow-leopard">VisorTerminal</a>) Essa devo testar mais tarde&#8230;</p>
<h3>First things first: layout de teclado, correções, Quicksilver, Growl &amp; Macports</h3>
<p>A primeira diferença que muito me agradou foi ver que colocaram um layout de teclado US International no core do SnowLeopard. Selecionando ele pode-se desabilitar o US e ficar bem mais feliz. <img src='http://www.bitbonsai.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <a href="http://get.adobe.com/flashplayer/">Atualizar o Flash Player</a>, pois co<a href="http://www.macuser.co.uk/news/267589/snow-leopard-ships-with-insecure-flash.html">m o DVD vem uma versão bugada</a>. Em seguida, instalar <a href="http://www.blacktree.com/">Quicksilver</a> e a skin que deveria ser default: <a href="http://code.bencochran.com/bezelhud/">BezelHud</a>. Hmmm; tem uma <a href="http://blacktree-alchemy.googlecode.com/files/Quicksilver-b56a7.tar.gz">versão nova do QS para SnowLeopard</a>! E o bezelHud é novo tb&#8230; o antigo não funcionou. Outra coisa que não funcionou no upgrade foi a instalação do <a href="http://www.islayer.com/apps/istatmenus/">iStat menu pro</a>&#8230; vamos ver agora&#8230; <strong>maza</strong>!!! instalou que foi um doce.</p>
<p>Em seguida, <a href="http://growl.info/">Growl</a>. Tem um aviso no site avisando que deve-se esperar pelo 1.2 para compatibilidade, mas o que acontece é que os aplicativos 64bits não podem usar o Growl atual (32). Resumindo: no Growl for Mail por enquanto. Mas instalei assim mesmo e quando atualizarem lá, atualizo cá.</p>
<h3>Macports</h3>
<p>Capítulo à parte: Isto é realmente importante, pois o meu Apache, PHP, MySQL, tudo é compilado a partir do macports. Ele tem de ser resgatado do SVN e feito no terminal, então vamos ao passo-a-passo. O que for código vou colocar em <span style="color: #008000;">verde</span>.</p>
<p>Se ainda não instalou, coloque o DVD do Snow Leopard e instale <strong>XCode 3.2</strong> (<strong>Optional Installs &gt; Xcode.mpkg</strong>)</p>
<h4>Instalar MacPorts para Snow Leopard</h4>
<p>Qual não foi a minha surpresa ao descobrir que o Macports por SVN instala uma versão i386&#8230; Então melhor <a href="http://distfiles.macports.org/MacPorts/">baixar o DMG</a> do <a href="http://www.macports.org/">MacPorts</a> e instalar. Tem muita gente usando o Apache e PHP do SL padrão, pois eles estão na última versão. Tentei, durou 1 dia. Instalar módulos não é tão prático, e quando tiver de fazer um upgrade não quero nem pensar.</p>
<p>Vou ter de tirar o <strong>mysql</strong> tb, pois baixei a versão em DMG do site deles. É legal ter um appletzinho no Painel de Controle, mas ele tem de ser carregado em 32 bits (o que faz com que ele tenha de relaunch o Painel) e nada que uma linha no .bash_profile não resolva&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">mysqlstart</span>=<span style="color: #ff0000;">'sudo /usr/local/mysql/bin/mysqld_safe &amp;'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">mysqlstop</span>=<span style="color: #ff0000;">'/usr/local/mysql/bin/mysqladmin -u root -p shutdown'</span></pre></div></div>

<p>E mais detalhes de mysql&#8230;</p>
<h4>Alterar /etc/my.cnf e copiar todos os bancos para o meu home, para facilitar o backup</h4>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>my.cnf
datadir = <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>mw<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>data
:x
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-czf</span> mysql.tar.gz <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>mysql
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">*</span>.tar.gz <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>mw<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>data
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>mw<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>data
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> mysql.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> _mysql data</pre></div></div>

<p>Agora estou recompilando o coreutils em 64bits, pq antes estava em 32. Para ver se algo está em 32 ou 64 bits basta um:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>macports.conf
 <span style="color: #666666; font-style: italic;"># machine architectures</span>
 <span style="color: #666666; font-style: italic;">#universal_archs   x86_64 i386</span>
 universal_archs    x86_64</pre></div></div>

<h3>Instalando PHP</h3>
<p>Com o macports, tudo fica mais fácil&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> php5 +apache2 +php5-imap +php5-mysql +pear +suhosin +php5-tidy +universal</pre></div></div>

<p>Sorry, acabou ficando incompleto, mas já é uma boa introdução para quem vai se aventurar&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitbonsai.com/snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IphoneApp – Hello World</title>
		<link>http://www.bitbonsai.com/iphone/</link>
		<comments>http://www.bitbonsai.com/iphone/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 21:19:17 +0000</pubDate>
		<dc:creator>mw</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.bitbonsai.com/blog/?p=17</guid>
		<description><![CDATA[Decidi escrever iPhoneApps. Primeiro passo? Aprender Objective-C. Com uma cópia do Learn Objective-C on the Mac, de Mark Dalrymple &#38; Scott Knaster coloquei a mão na massa. Como já tenho uma noção de C, não é tão estranho assim… claro que pensei que emNSString o NS era de NameSpace e não de NextStep, mas para [...]]]></description>
			<content:encoded><![CDATA[<p>Decidi escrever iPhoneApps. Primeiro passo? Aprender <a style="color: #2970a6; text-decoration: none; padding: 0px; margin: 0px;" href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/">Objective-C</a>.</p>
<p>Com uma cópia do <a style="color: #2970a6; text-decoration: none; padding: 0px; margin: 0px;" href="http://www.apress.com/book/view/9781430218159">Learn Objective-C on the Mac</a>, de Mark Dalrymple &amp; Scott Knaster coloquei a mão na massa. Como já tenho uma noção de C, não é <strong>tão</strong> estranho assim… claro que pensei que em<em>NSString</em> o NS era de NameSpace e não de NextStep, mas para essas informações super úteis um livro é essencial. <img src='http://www.bitbonsai.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>A primeira coisa, depois de baixar os 1,5GB do SDK (acho que vem com o XCode junto, que já tinha instalado) é escrever um Hello World, certo? Nada muito impressionante, mas é preciso começar por algum lugar…</p>
<p>Como preciso fazer algo mais bonito que o sample do livro, coloquei o fundo preto e um título na app. O grande lance é fazê-lo girar em qualquer direção e a App acompanhar. Aeae…</p>
<p><a href="http://www.bitbonsai.com/wp-content/uploads/2009/08/iphone-hello-world-300x192.jpg"><img class="aligncenter size-full wp-image-18" title="iphone-hello-world-300x192" src="http://www.bitbonsai.com/wp-content/uploads/2009/08/iphone-hello-world-300x192.jpg" alt="iphone-hello-world-300x192" width="300" height="192" /></a></p>
<div style="padding-top: 2px; padding-right: 4px; padding-bottom: 2px; padding-left: 4px; vertical-align: top; color: #333333; margin: 0px;">
<pre style="background-image: none; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; width: auto; float: none; clear: none; overflow-x: visible; overflow-y: visible; font-size: 12px; line-height: 1.333; font-family: monospace; background-position: initial initial; padding: 0px; margin: 0px; border: 1px none #cccccc;"><span style="color: #002200; padding: 0px; margin: 0px;">-</span> <span style="color: #002200; padding: 0px; margin: 0px;">(</span><span style="color: #a61390; padding: 0px; margin: 0px;">BOOL</span><span style="color: #002200; padding: 0px; margin: 0px;">)</span>shouldAutorotateToInterfaceOrientation<span style="color: #002200; padding: 0px; margin: 0px;">:</span>
    <span style="color: #002200; padding: 0px; margin: 0px;">(</span>UIInterfaceOrientation<span style="color: #002200; padding: 0px; margin: 0px;">)</span>interfaceOrientation <span style="color: #002200; padding: 0px; margin: 0px;">{</span>
    <span style="color: #a61390; padding: 0px; margin: 0px;">return</span> <span style="color: #a61390; padding: 0px; margin: 0px;">YES</span>;
<span style="color: #002200; padding: 0px; margin: 0px;">}</span></pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bitbonsai.com/iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

