<?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>Pedro Assunção &#187; tips</title>
	<atom:link href="http://pedroassuncao.com/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://pedroassuncao.com</link>
	<description>Thoughts on technology, skydiving, life, and the universe...</description>
	<lastBuildDate>Mon, 06 Feb 2012 15:13:33 +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>Swatch to sell touchscreen watches</title>
		<link>http://pedroassuncao.com/2011/09/swatch-to-sell-touchscreen-watches/</link>
		<comments>http://pedroassuncao.com/2011/09/swatch-to-sell-touchscreen-watches/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 23:45:33 +0000</pubDate>
		<dc:creator>Pedro Assunção</dc:creator>
				<category><![CDATA[findings]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://pedroassuncao.com/?p=1446</guid>
		<description><![CDATA[They are coming out October 26th and i want one. Enough said No related posts.


No related posts.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://pedroassuncao.com/wp-content/uploads/2011/09/Swatch-Touch-Collection.jpg"><img class="size-medium wp-image-1449 alignnone" style="margin-top: 10px; margin-bottom: 10px; border: 1px solid black;" title="Swatch-Touch-Collection" src="http://pedroassuncao.com/wp-content/uploads/2011/09/Swatch-Touch-Collection-300x229.jpg" alt="" width="300" height="229" /></a></p>
<p><a href="http://pedroassuncao.com/wp-content/uploads/2011/09/Swatch-Touch-Collection.jpg"></a>They are <a href="http://techcrunch.com/2011/09/29/swatch-announces-touchscreen-watches">coming out October 26th</a> and i want one. Enough said <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<div class="shr-publisher-1446"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F09%2Fswatch-to-sell-touchscreen-watches%2F' data-shr_title='Swatch+to+sell+touchscreen+watches'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F09%2Fswatch-to-sell-touchscreen-watches%2F' data-shr_title='Swatch+to+sell+touchscreen+watches'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://pedroassuncao.com/2011/09/swatch-to-sell-touchscreen-watches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Export Mysql result as CSV</title>
		<link>http://pedroassuncao.com/2011/09/export-mysql-result-as-csv/</link>
		<comments>http://pedroassuncao.com/2011/09/export-mysql-result-as-csv/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 20:25:04 +0000</pubDate>
		<dc:creator>Pedro Assunção</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[findings]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://pedroassuncao.com/?p=1439</guid>
		<description><![CDATA[Don&#8217;t ask me how the sed magic works, but it does. Taken from here. Running this: mysql -u&#60;USER&#62; -p&#60;PASSWORD&#62; &#60;DATABASE&#62; -B -e "select * from videos_video;" &#124; sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' will produce something like this: "id","title","url" "1","video 1","http://youtube(...)" "2","video 2","http://youtube(...)" "3","video 3","http://youtube(...)" Just pipe it to a .csv file and you&#8217;re done Related posts:How to export [...]


Related posts:<ol><li><a href='http://pedroassuncao.com/2009/07/how-to-export-hd-video-for-the-web/' rel='bookmark' title='How to export HD video for the web'>How to export HD video for the web</a></li>
<li><a href='http://pedroassuncao.com/2010/02/video-speed-controls-on-youtubes-html5-player/' rel='bookmark' title='Video speed controls on youtube&#8217;s HTML5 player'>Video speed controls on youtube&#8217;s HTML5 player</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Don&#8217;t ask me how the sed magic works, but it does. <a href="http://tlug.dnho.net/node/209">Taken from here</a>.</p>
<p>Running this:</p>
<pre>mysql -u&lt;USER&gt; -p&lt;PASSWORD&gt; &lt;DATABASE&gt; -B -e "select * from videos_video;" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g'</pre>
<p>will produce something like this:</p>
<pre>"id","title","url"
"1","video 1","http://youtube(...)"
"2","video 2","http://youtube(...)"
"3","video 3","http://youtube(...)"</pre>
<p>Just pipe it to a .csv file and you&#8217;re done <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="shr-publisher-1439"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F09%2Fexport-mysql-result-as-csv%2F' data-shr_title='Export+Mysql+result+as+CSV'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F09%2Fexport-mysql-result-as-csv%2F' data-shr_title='Export+Mysql+result+as+CSV'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->

<p>Related posts:<ol><li><a href='http://pedroassuncao.com/2009/07/how-to-export-hd-video-for-the-web/' rel='bookmark' title='How to export HD video for the web'>How to export HD video for the web</a></li>
<li><a href='http://pedroassuncao.com/2010/02/video-speed-controls-on-youtubes-html5-player/' rel='bookmark' title='Video speed controls on youtube&#8217;s HTML5 player'>Video speed controls on youtube&#8217;s HTML5 player</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://pedroassuncao.com/2011/09/export-mysql-result-as-csv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nice tweaks for OSX</title>
		<link>http://pedroassuncao.com/2011/09/nice-tweaks-for-osx/</link>
		<comments>http://pedroassuncao.com/2011/09/nice-tweaks-for-osx/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 14:11:06 +0000</pubDate>
		<dc:creator>Pedro Assunção</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[findings]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://pedroassuncao.com/?p=1433</guid>
		<description><![CDATA[I think most of them work on both Snow Leopard and Lion. Not sure about previous versions. Just type the ones you want to activate/deactivate on the command line and have fun. # Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs) defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 # Enable the [...]


Related posts:<ol><li><a href='http://pedroassuncao.com/2009/07/changing-default-browseremail-client-in-osx/' rel='bookmark' title='Changing default browser/email client in OSX'>Changing default browser/email client in OSX</a></li>
<li><a href='http://pedroassuncao.com/2010/12/is-your-safari-5-slow-heres-a-probable-problem-and-solution/' rel='bookmark' title='Is your Safari 5 slow? Here&#8217;s a probable problem and solution.'>Is your Safari 5 slow? Here&#8217;s a probable problem and solution.</a></li>
<li><a href='http://pedroassuncao.com/video/' rel='bookmark' title='Video'>Video</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I think most of them work on both Snow Leopard and Lion. Not sure about previous versions. Just type the ones you want to activate/deactivate on the command line and have fun.</p>
<pre># Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3

# Enable the 2D Dock
defaults write com.apple.dock no-glass -bool true

# Disable menu bar transparency
defaults write -g AppleEnableMenuBarTransparency -bool false

# Expand save panel by default
defaults write -g NSNavPanelExpandedStateForSaveMode -bool true

# Expand print panel by default
defaults write -g PMPrintingExpandedStateForPrint -bool true

# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true

# Enable highlight hover effect for the grid view of a stack (Dock)
defaults write com.apple.dock mouse-over-hilte-stack -bool true

# Enable spring loading for all Dock items
defaults write enable-spring-load-actions-on-all-items -bool true

# Disable press-and-hold for keys in favor of key repeat
defaults write -g ApplePressAndHoldEnabled -bool false

# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false

# Disable window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

# Disable disk image verification
defaults write com.apple.frameworks.diskimages skip-verify -bool true
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true

# Automatically open a new Finder window when a volume is mounted
defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true

# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

# Disable Safari’s thumbnail cache for History and Top Sites
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2

# Enable Safari’s debug menu
defaults write com.apple.Safari IncludeDebugMenu -bool true

# Remove useless icons from Safari’s bookmarks bar
defaults write com.apple.Safari ProxiesInBookmarksBar "()"

# Disable send and reply animations in Mail.app
defaults write com.apple.Mail DisableReplyAnimations -bool true
defaults write com.apple.Mail DisableSendAnimations -bool true

# Disable Resume system-wide
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false

# Enable Dashboard dev mode (allows keeping widgets on the desktop)
defaults write com.apple.dashboard devmode -bool true

# Reset Launchpad
rm ~/Library/Application\ Support/Dock/*.db

# Show the ~/Library folder
chflags nohidden ~/Library

# Disable local Time Machine backups
sudo tmutil disablelocal

# Kill affected applications
for app in Safari Finder Dock Mail; do killall "$app"; done

# Fix for the ancient UTF-8 bug in QuickLook (http://mths.be/bbo)
echo "0x08000100:0" &gt; ~/.CFUserTextEncoding</pre>
<p>The original source <a href="https://github.com/mathiasbynens/dotfiles/blob/master/.osx">can be found here</a>.</p>
<div class="shr-publisher-1433"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F09%2Fnice-tweaks-for-osx%2F' data-shr_title='Nice+tweaks+for+OSX'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F09%2Fnice-tweaks-for-osx%2F' data-shr_title='Nice+tweaks+for+OSX'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->

<p>Related posts:<ol><li><a href='http://pedroassuncao.com/2009/07/changing-default-browseremail-client-in-osx/' rel='bookmark' title='Changing default browser/email client in OSX'>Changing default browser/email client in OSX</a></li>
<li><a href='http://pedroassuncao.com/2010/12/is-your-safari-5-slow-heres-a-probable-problem-and-solution/' rel='bookmark' title='Is your Safari 5 slow? Here&#8217;s a probable problem and solution.'>Is your Safari 5 slow? Here&#8217;s a probable problem and solution.</a></li>
<li><a href='http://pedroassuncao.com/video/' rel='bookmark' title='Video'>Video</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://pedroassuncao.com/2011/09/nice-tweaks-for-osx/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Enable/disable spotlight in OSX</title>
		<link>http://pedroassuncao.com/2011/09/enabledisable-spotlight-in-osx/</link>
		<comments>http://pedroassuncao.com/2011/09/enabledisable-spotlight-in-osx/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 08:38:58 +0000</pubDate>
		<dc:creator>Pedro Assunção</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://pedroassuncao.com/?p=1423</guid>
		<description><![CDATA[This is just a self reminder on how to disable and enable spotlight in Snow Leopard and Lion. Open a terminal and type: To enable: sudo mdutil -a -i on To disable: sudo mdutil -a -i off In system preferences you can control which drives and/or folders are not to be indexed. Related posts:Sproutcore on [...]


Related posts:<ol><li><a href='http://pedroassuncao.com/2010/04/sproutcore-on-osx-snow-leopard/' rel='bookmark' title='Sproutcore on OSX snow leopard'>Sproutcore on OSX snow leopard</a></li>
<li><a href='http://pedroassuncao.com/2010/12/is-your-safari-5-slow-heres-a-probable-problem-and-solution/' rel='bookmark' title='Is your Safari 5 slow? Here&#8217;s a probable problem and solution.'>Is your Safari 5 slow? Here&#8217;s a probable problem and solution.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This is just a self reminder on how to disable and enable spotlight in Snow Leopard and Lion. Open a terminal and type:</p>
<p>To enable:</p>
<pre>sudo mdutil <span style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #cccccc; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">-</span>a <span style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #cccccc; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">-</span>i on</pre>
<p>To disable:</p>
<pre>sudo mdutil <span style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #cccccc; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">-</span>a <span style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #cccccc; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">-</span>i off</pre>
<p>In system preferences you can control which drives and/or folders are not to be indexed.</p>
<div class="shr-publisher-1423"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F09%2Fenabledisable-spotlight-in-osx%2F' data-shr_title='Enable%2Fdisable+spotlight+in+OSX'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F09%2Fenabledisable-spotlight-in-osx%2F' data-shr_title='Enable%2Fdisable+spotlight+in+OSX'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->

<p>Related posts:<ol><li><a href='http://pedroassuncao.com/2010/04/sproutcore-on-osx-snow-leopard/' rel='bookmark' title='Sproutcore on OSX snow leopard'>Sproutcore on OSX snow leopard</a></li>
<li><a href='http://pedroassuncao.com/2010/12/is-your-safari-5-slow-heres-a-probable-problem-and-solution/' rel='bookmark' title='Is your Safari 5 slow? Here&#8217;s a probable problem and solution.'>Is your Safari 5 slow? Here&#8217;s a probable problem and solution.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://pedroassuncao.com/2011/09/enabledisable-spotlight-in-osx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OSX: Change time machine auto backup interval</title>
		<link>http://pedroassuncao.com/2011/05/osx-change-time-machine-auto-backup-interval/</link>
		<comments>http://pedroassuncao.com/2011/05/osx-change-time-machine-auto-backup-interval/#comments</comments>
		<pubDate>Thu, 26 May 2011 07:56:45 +0000</pubDate>
		<dc:creator>Pedro Assunção</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[findings]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://pedroassuncao.com/?p=1404</guid>
		<description><![CDATA[The default time machine backup interval is every hour. Sometimes this can be really annoying so, if you find yourself in need to change this, here&#8217;s how: Navigate to /System/Library/LaunchDaemons and locate the file named com.apple.backupd-auto.plist. Inside this file you will find the following content: &#60;key&#62;StartInterval&#60;/key&#62; &#60;integer&#62;3600&#60;/integer&#62; 3600 means hourly (60 minutes X 60 seconds). [...]


Related posts:<ol><li><a href='http://pedroassuncao.com/2011/03/why-you-should-sleep-at-least-7-hours-per-night/' rel='bookmark' title='Why you should sleep at least 7 hours per night'>Why you should sleep at least 7 hours per night</a></li>
<li><a href='http://pedroassuncao.com/2010/03/lack-of-ram-will-kill-your-blog-host-virtual-machine/' rel='bookmark' title='Lack of RAM will kill your blog host virtual machine'>Lack of RAM will kill your blog host virtual machine</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The default time machine backup interval is every hour. Sometimes this can be really annoying so, if you find yourself in need to change this, here&#8217;s how:</p>
<p>Navigate to <strong><em>/System/Library/LaunchDaemons</em></strong> and locate the file named<strong><em> com.apple.backupd-auto.plist.</em></strong></p>
<p>Inside this file you will find the following content:</p>
<pre> &lt;key&gt;StartInterval&lt;/key&gt;
 &lt;integer&gt;3600&lt;/integer&gt;</pre>
<p>3600 means hourly (60 minutes X 60 seconds). If you multiply by 4, for instance, and use that value (14400) you will have automatic backups every 4 hours instead. Or whatever interval you prefer.<br />
Happy backing up <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="shr-publisher-1404"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F05%2Fosx-change-time-machine-auto-backup-interval%2F' data-shr_title='OSX%3A+Change+time+machine+auto+backup+interval'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F05%2Fosx-change-time-machine-auto-backup-interval%2F' data-shr_title='OSX%3A+Change+time+machine+auto+backup+interval'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->

<p>Related posts:<ol><li><a href='http://pedroassuncao.com/2011/03/why-you-should-sleep-at-least-7-hours-per-night/' rel='bookmark' title='Why you should sleep at least 7 hours per night'>Why you should sleep at least 7 hours per night</a></li>
<li><a href='http://pedroassuncao.com/2010/03/lack-of-ram-will-kill-your-blog-host-virtual-machine/' rel='bookmark' title='Lack of RAM will kill your blog host virtual machine'>Lack of RAM will kill your blog host virtual machine</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://pedroassuncao.com/2011/05/osx-change-time-machine-auto-backup-interval/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NonUniqueObjectException: a different object with the same identifier value was already associated with the session</title>
		<link>http://pedroassuncao.com/2011/05/nonuniqueobjectexception-a-different-object-with-the-same-identifier-value-was-already-associated-with-the-session/</link>
		<comments>http://pedroassuncao.com/2011/05/nonuniqueobjectexception-a-different-object-with-the-same-identifier-value-was-already-associated-with-the-session/#comments</comments>
		<pubDate>Thu, 05 May 2011 18:00:26 +0000</pubDate>
		<dc:creator>Pedro Assunção</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[findings]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[swing]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://pedroassuncao.com/?p=1399</guid>
		<description><![CDATA[If you are developing in Swing and using hibernate you might &#8211; at some point in time &#8211; run into this exception: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session What happened, you might ask? Well, turns out that when you close the session that created a given [...]


Related posts:<ol><li><a href='http://pedroassuncao.com/2010/12/spring-and-hibernate-lazy-loading-collections-in-desktop-swing-applications/' rel='bookmark' title='Spring and hibernate: Lazy loading collections in desktop (swing) applications'>Spring and hibernate: Lazy loading collections in desktop (swing) applications</a></li>
<li><a href='http://pedroassuncao.com/2010/04/spring-inject-proxy-instead-of-proxied-object/' rel='bookmark' title='Spring : inject proxy instead of proxied object'>Spring : inject proxy instead of proxied object</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>If you are developing in <a href="http://en.wikipedia.org/wiki/Swing_(Java)">Swing</a> and using <a href="http://www.hibernate.org/">hibernate</a> you might &#8211; at some point in time &#8211; run into this exception:</p>
<pre>org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session</pre>
<p><strong>What happened</strong>, you might ask? Well, turns out that when you close the session that created a given hibernate-managed object, this object becomes &#8220;detached&#8221; (meaning hibernate no longer has any control over it). So, when you attempt to save or update it in another session, hibernate will complain with that exception, because it can no longer tell which is the &#8220;true&#8221; version of the object.</p>
<p><strong>The solution(s)</strong>? Look inside your code for places where you might be closing the session and take that out. That&#8217;s the solution in the case where you are using a long session (one that spans the entirety of the application&#8217;s life). In case you really want to close the session, you might consider using the session&#8217;s merge() method, which basically merges the fields in both the attached and non-attached instances of the object, and performs an update.</p>
<p>Hope that saves someone half a day of debugging <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="shr-publisher-1399"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F05%2Fnonuniqueobjectexception-a-different-object-with-the-same-identifier-value-was-already-associated-with-the-session%2F' data-shr_title='NonUniqueObjectException%3A+a+different+object+with+the+same+identifier+value+was+already+associated+with+the+session'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F05%2Fnonuniqueobjectexception-a-different-object-with-the-same-identifier-value-was-already-associated-with-the-session%2F' data-shr_title='NonUniqueObjectException%3A+a+different+object+with+the+same+identifier+value+was+already+associated+with+the+session'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->

<p>Related posts:<ol><li><a href='http://pedroassuncao.com/2010/12/spring-and-hibernate-lazy-loading-collections-in-desktop-swing-applications/' rel='bookmark' title='Spring and hibernate: Lazy loading collections in desktop (swing) applications'>Spring and hibernate: Lazy loading collections in desktop (swing) applications</a></li>
<li><a href='http://pedroassuncao.com/2010/04/spring-inject-proxy-instead-of-proxied-object/' rel='bookmark' title='Spring : inject proxy instead of proxied object'>Spring : inject proxy instead of proxied object</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://pedroassuncao.com/2011/05/nonuniqueobjectexception-a-different-object-with-the-same-identifier-value-was-already-associated-with-the-session/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My selection of top iPad 2 apps</title>
		<link>http://pedroassuncao.com/2011/04/my-selection-of-top-ipad-2-apps/</link>
		<comments>http://pedroassuncao.com/2011/04/my-selection-of-top-ipad-2-apps/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 22:27:53 +0000</pubDate>
		<dc:creator>Pedro Assunção</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://pedroassuncao.com/?p=1356</guid>
		<description><![CDATA[After buying my shiny new ipad2 I, like most other tablet enthusiasts, devoted a fair amount of time in search of the coolest and most useful apps to install. The major problem in most results that google returns is that they all mention the same list: twitter, IMO.im, friendly, dropbox, etc. (for a list of [...]


Related posts:<ol><li><a href='http://pedroassuncao.com/2010/01/things-i-wanted-in-apples-ipad-tablet/' rel='bookmark' title='Things i wanted in Apple&#8217;s iPad (tablet)'>Things i wanted in Apple&#8217;s iPad (tablet)</a></li>
<li><a href='http://pedroassuncao.com/2011/03/osx-video-streaming-the-easy-way/' rel='bookmark' title='OSX video streaming the easy way'>OSX video streaming the easy way</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>After buying my shiny new ipad2 I, like most other tablet enthusiasts, devoted a fair amount of time in search of the coolest and most useful apps to install.</p>
<p>The major problem in most results that google returns is that they all mention the same list: twitter, IMO.im, friendly, dropbox, etc. (for a list of the obvious, <a href="http://www.wired.com/gadgetlab/2011/03/download-apps-ipad/">follow this link)</a>.</p>
<p>After some deeper searches I found the following apps to be  extremely interesting to me. I&#8217;m hoping they will be to you as well:</p>
<table>
<tbody>
<tr>
<td colspan="2">
<h3><strong>Writing</strong></h3>
</td>
</tr>
<tr>
<td width="220"><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-10.59.59-AM.png"><img class="size-full wp-image-1357 alignnone" title="iaWriter" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-10.59.59-AM.png" alt="" width="208" height="95" /></a></td>
<td>If you write anything, these are the most well spent 79 cents, believe me.</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.06.39-AM.png"><img class="alignleft size-full wp-image-1358" title="Private journal" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.06.39-AM.png" alt="" width="212" height="95" /></a></td>
<td>Log your life, with notes, pictures, and music.</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.10.11-AM.png"><img class="alignleft size-full wp-image-1360" title="Advanced English Dictionary" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.10.11-AM.png" alt="" width="237" height="92" /></a></td>
<td>Find the perfect word to convey your message <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </td>
</tr>
<tr>
<td colspan="2">
<h3>Games</h3>
</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.14.40-AM.png"><img class="alignleft size-full wp-image-1362" title="iStunt 2 HD" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.14.40-AM.png" alt="" width="242" height="96" /></a></td>
<td>Snowboard fun <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.17.35-AM.png"><img class="alignleft size-full wp-image-1363" title="Shadow Era" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.17.35-AM.png" alt="" width="202" height="96" /></a></td>
<td>Awesome card game, kinda like Magic the gathering. Warning: Massive time waster <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.18.18-AM.png"><img class="alignleft size-full wp-image-1364" title="Braveheart" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.18.18-AM.png" alt="" width="207" height="91" /></a></td>
<td>Cool top down RPG.</td>
</tr>
<tr>
<td colspan="2">
<h3>Reading</h3>
</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.19.23-AM.png"><img class="alignleft size-full wp-image-1365" title="Mobile RSS" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.19.23-AM.png" alt="" width="234" height="92" /></a></td>
<td>Read all your google reader subscriptions in this clean RSS reader.</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.20.05-AM.png"><img class="alignleft size-full wp-image-1366" title="Marvel" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.20.05-AM.png" alt="" width="209" height="93" /></a></td>
<td>There&#8217;s a few marvel comics for free in this app.</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.20.53-AM.png"><img class="alignleft size-full wp-image-1367" title="Kindle" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.20.53-AM.png" alt="" width="213" height="93" /></a></td>
<td>The great classics are free in the Kindle store. And the iPad is the perfect e-reader.</td>
</tr>
<tr>
<td colspan="2">
<h3>News and Magazines</h3>
</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.21.56-AM.png"><img class="alignleft size-full wp-image-1368" title="CNN for iPad" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.21.56-AM.png" alt="" width="211" height="92" /></a></td>
<td>A beautiful way of keeping track of current events worldwide.</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.22.41-AM.png"><img class="alignleft size-full wp-image-1369" title="Discover - Wikipedia in a Magazine" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.22.41-AM.png" alt="" width="257" height="90" /></a></td>
<td>A new take on wikipedia articles; everyday a new selection of wonderfully formated articles.</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.23.52-AM.png"><img class="alignleft size-full wp-image-1371" title="AppStart for iPad" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.23.52-AM.png" alt="" width="216" height="91" /></a></td>
<td>A kind of magazine with a gazillion tips on how to make the most of your shiny new iPad.</td>
</tr>
<tr>
<td colspan="2">
<h3>Notes and doodles</h3>
</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.25.06-AM.png"><img class="alignleft size-full wp-image-1372" title="Springpad" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.25.06-AM.png" alt="" width="208" height="93" /></a></td>
<td>Keep all your notes in sync across your computers, tablets, and phones. Much better than evernote, in my opinion.</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.27.06-AM.png"><img class="alignleft size-full wp-image-1373" title="Sketch Pad 3 - Unlimited canvas for iPad" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.27.06-AM.png" alt="" width="230" height="94" /></a></td>
<td>Everyone doodles from time to time <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </td>
</tr>
<tr>
<td colspan="2">
<h3>Remote desktop and media centre control</h3>
</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.28.18-AM.png"><img class="alignleft size-full wp-image-1374" title="Rowmote Pro" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.28.18-AM.png" alt="" width="237" height="96" /></a></td>
<td>Money well invested, if you have a mac mini in your living room and don&#8217;t want to spend $100+ on a wireless keyboard + mouse setup. This app allows you to use the iPad as both. And does one hell of a job at it.</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.28.56-AM.png"><img class="alignleft size-full wp-image-1375" title="XBMoteC" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.28.56-AM.png" alt="" width="200" height="95" /></a></td>
<td>To control your XBMC from the iPad.</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.29.40-AM.png"><img class="alignleft size-full wp-image-1376" title="TeamViewer HD" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.29.40-AM.png" alt="" width="208" height="90" /></a></td>
<td>A remote viewer for your computers (VNC).</td>
</tr>
<tr>
<td colspan="2">
<h3>Video streaming</h3>
</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.30.45-AM.png"><img class="alignleft size-full wp-image-1377" title="StreamToMe" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.30.45-AM.png" alt="" width="204" height="92" /></a></td>
<td>The best way i found to stream video and music from my server to the iPad and other computers. It compresses video on the fly, allowing you to stream even through a 3G connection. Priceless.</td>
</tr>
<tr>
<td colspan="2">
<h3>Graphics</h3>
</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.31.54-AM.png"><img class="alignleft size-full wp-image-1378" title="Adobe Photoshop Express" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.31.54-AM.png" alt="" width="237" height="92" /></a></td>
<td>Just in case you need to retouch some pictures on the iPad.</td>
</tr>
<tr>
<td colspan="2">
<h3>Cooking</h3>
</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.32.43-AM.png"><img class="alignleft size-full wp-image-1379" title="Epicurious Recipes" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.32.43-AM.png" alt="" width="230" height="91" /></a></td>
<td>If you&#8217;re lazy like me, this will come in handy to discover new recipes to cook.</td>
</tr>
<tr>
<td colspan="2">
<h3>Data</h3>
</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.33.48-AM.png"><img class="alignleft size-full wp-image-1380" title="Analytics for iPad" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.33.48-AM.png" alt="" width="210" height="90" /></a></td>
<td>View your Google analytics data from this cool app.</td>
</tr>
<tr>
<td colspan="2">
<h3>Alarms</h3>
</td>
</tr>
<tr>
<td><a href="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.34.35-AM.png"><img class="alignleft size-full wp-image-1381" title="iHome+Sleep" src="http://pedroassuncao.com/wp-content/uploads/2011/04/Screen-shot-2011-05-01-at-11.34.35-AM.png" alt="" width="232" height="96" /></a></td>
<td>And finally, everyone needs an alarm. This one is simple and gets the job done <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </td>
</tr>
</tbody>
</table>
<div class="shr-publisher-1356"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F04%2Fmy-selection-of-top-ipad-2-apps%2F' data-shr_title='My+selection+of+top+iPad+2+apps'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F04%2Fmy-selection-of-top-ipad-2-apps%2F' data-shr_title='My+selection+of+top+iPad+2+apps'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->

<p>Related posts:<ol><li><a href='http://pedroassuncao.com/2010/01/things-i-wanted-in-apples-ipad-tablet/' rel='bookmark' title='Things i wanted in Apple&#8217;s iPad (tablet)'>Things i wanted in Apple&#8217;s iPad (tablet)</a></li>
<li><a href='http://pedroassuncao.com/2011/03/osx-video-streaming-the-easy-way/' rel='bookmark' title='OSX video streaming the easy way'>OSX video streaming the easy way</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://pedroassuncao.com/2011/04/my-selection-of-top-ipad-2-apps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pooping: you&#8217;re doing it wrong</title>
		<link>http://pedroassuncao.com/2011/04/pooping-youre-doing-it-wrong/</link>
		<comments>http://pedroassuncao.com/2011/04/pooping-youre-doing-it-wrong/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 11:48:04 +0000</pubDate>
		<dc:creator>Pedro Assunção</dc:creator>
				<category><![CDATA[findings]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[nature]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://pedroassuncao.com/?p=1351</guid>
		<description><![CDATA[Ever found yourself sitting  in the toilet and, when it&#8217;s that time to do some pushing, instinctively getting on your toes to help the process? Well, it turns out that there is a reason for that: Humans have an easier time pooping in a crouching position. So when you get on your toes you are [...]


Related posts:<ol><li><a href='http://pedroassuncao.com/2011/03/mitochondria-regeneration-method-found-wanna-live-forever/' rel='bookmark' title='Mitochondria regeneration method found. Wanna live forever?'>Mitochondria regeneration method found. Wanna live forever?</a></li>
<li><a href='http://pedroassuncao.com/2009/01/rfm-online-radio-on-osx/' rel='bookmark' title='RFM online radio on OSX'>RFM online radio on OSX</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Ever found yourself sitting  in the toilet and, when it&#8217;s that time to do some pushing, instinctively getting on your toes to help the process? Well, it turns out that there is a reason for that: Humans have an easier time pooping in a crouching position. So when you get on your toes you are just getting closer to that shape.</p>
<p>And &#8211; as it turns out &#8211; there are <a href="http://www.cracked.com/article_19121_7-really-basic-things-you-wont-believe-youre-doing-wrong.html">6 other things we might be doing wrong</a> all our lives. Live and learn <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="shr-publisher-1351"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F04%2Fpooping-youre-doing-it-wrong%2F' data-shr_title='Pooping%3A+you%27re+doing+it+wrong'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F04%2Fpooping-youre-doing-it-wrong%2F' data-shr_title='Pooping%3A+you%27re+doing+it+wrong'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->

<p>Related posts:<ol><li><a href='http://pedroassuncao.com/2011/03/mitochondria-regeneration-method-found-wanna-live-forever/' rel='bookmark' title='Mitochondria regeneration method found. Wanna live forever?'>Mitochondria regeneration method found. Wanna live forever?</a></li>
<li><a href='http://pedroassuncao.com/2009/01/rfm-online-radio-on-osx/' rel='bookmark' title='RFM online radio on OSX'>RFM online radio on OSX</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://pedroassuncao.com/2011/04/pooping-youre-doing-it-wrong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Earthquake information in Ruby</title>
		<link>http://pedroassuncao.com/2011/04/earthquake-information-in-ruby/</link>
		<comments>http://pedroassuncao.com/2011/04/earthquake-information-in-ruby/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 23:42:45 +0000</pubDate>
		<dc:creator>Pedro Assunção</dc:creator>
				<category><![CDATA[software development]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://pedroassuncao.com/?p=1347</guid>
		<description><![CDATA[Here&#8217;s a little script to get the latest earthquakes worldwide (1 hour). Sorry, Ruby purists, for not using RSS 2.0 and hpricot for a cleaner extraction of the coordinates, but my xcode installation is messed up and i can&#8217;t build any gems require 'rss/1.0' require 'rss/2.0' require 'rss/atom' require 'open-uri' require 'cgi' source = "http://earthquake.usgs.gov/earthquakes/catalogs/1hour-M1.xml" # [...]


Related posts:<ol><li><a href='http://pedroassuncao.com/2009/07/several-years-of-email-statistics-code-included/' rel='bookmark' title='Several years of email statistics &#8211; code included'>Several years of email statistics &#8211; code included</a></li>
<li><a href='http://pedroassuncao.com/2009/11/android-location-provider-mock/' rel='bookmark' title='Android location provider mock'>Android location provider mock</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Here&#8217;s a little script to get the latest earthquakes worldwide (1 hour). Sorry, Ruby purists, for not using RSS 2.0 and hpricot for a cleaner extraction of the coordinates, but my xcode installation is messed up and i can&#8217;t build any gems <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<pre>require 'rss/1.0'
require 'rss/2.0'
require 'rss/atom'
require 'open-uri'
require 'cgi'

source = "http://earthquake.usgs.gov/earthquakes/catalogs/1hour-M1.xml" # url or local
filecontent = "" # raw content of rss feed will be loaded here
open(source) do |s| content = s.read end
rss = RSS::Parser.parse(content, false)
rss.items.each do |item|
  data = item.summary.to_s
  # Extract raw info
  data = data.scan( /alt\=\&amp;quot\;([^&gt;]*)W\&amp;quot\;/).last.first
  # Remove html escaping
  data = CGI.unescapeHTML(data).gsub("&amp;#176;N", "").gsub("&amp;#176;", "")
  # Convert into coords
  lat = data.split(' ')[0]
  lon = data.split(' ')[1]
  # Print it
  print item.updated.content, " ", item.title.content, " ", lat, " ", lon, "\n"
end</pre>
<p>Next step: Show this on a map <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<div class="shr-publisher-1347"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F04%2Fearthquake-information-in-ruby%2F' data-shr_title='Earthquake+information+in+Ruby'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F04%2Fearthquake-information-in-ruby%2F' data-shr_title='Earthquake+information+in+Ruby'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->

<p>Related posts:<ol><li><a href='http://pedroassuncao.com/2009/07/several-years-of-email-statistics-code-included/' rel='bookmark' title='Several years of email statistics &#8211; code included'>Several years of email statistics &#8211; code included</a></li>
<li><a href='http://pedroassuncao.com/2009/11/android-location-provider-mock/' rel='bookmark' title='Android location provider mock'>Android location provider mock</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://pedroassuncao.com/2011/04/earthquake-information-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Dropbox to automatically download torrents</title>
		<link>http://pedroassuncao.com/2011/03/using-dropbox-to-automatically-download-torrents/</link>
		<comments>http://pedroassuncao.com/2011/03/using-dropbox-to-automatically-download-torrents/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 10:19:59 +0000</pubDate>
		<dc:creator>Pedro Assunção</dc:creator>
				<category><![CDATA[findings]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://pedroassuncao.com/?p=1268</guid>
		<description><![CDATA[Need to be able to remotely add torrents to your secure machine at home? Don&#8217;t want to expose any ports to the world in order to accomplish that? Solution: Use Dropbox and uTorrent. How? Setup uTorrent to automatically download any torrent files found in your Dropbox folder (like the picture says). After that, any torrent [...]


Related posts:<ol><li><a href='http://pedroassuncao.com/2011/02/dropbox-plus-mercurial-driven-development-anyone-tried-that/' rel='bookmark' title='Dropbox plus Mercurial -driven development. Anyone tried that?'>Dropbox plus Mercurial -driven development. Anyone tried that?</a></li>
<li><a href='http://pedroassuncao.com/2008/11/my-computer/' rel='bookmark' title='My computer'>My computer</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Need to be able to remotely add torrents to your secure machine at home? Don&#8217;t want to expose any ports to the world in order to accomplish that?</p>
<p>Solution: Use <a href="http://www.dropbox.com/">Dropbox</a> and <a href="http://www.utorrent.com/">uTorrent</a>.<a href="http://pedroassuncao.com/wp-content/uploads/2011/03/Screen-shot-2011-03-16-at-10.12.59-AM.png"><img class="alignright size-medium wp-image-1270" style="margin: 10px; border: 1px solid black;" title="Screen shot 2011-03-16 at 10.12.59 AM" src="http://pedroassuncao.com/wp-content/uploads/2011/03/Screen-shot-2011-03-16-at-10.12.59-AM-300x126.png" alt="" width="300" height="126" /></a></p>
<p>How? Setup uTorrent to automatically download any torrent files found in your Dropbox folder (like the picture says). After that, any torrent files that you put in Dropbox &#8211; from any computer where you set it up &#8211; will begin to be downloaded. Oh, the joy <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="shr-publisher-1268"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F03%2Fusing-dropbox-to-automatically-download-torrents%2F' data-shr_title='Using+Dropbox+to+automatically+download+torrents'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fpedroassuncao.com%2F2011%2F03%2Fusing-dropbox-to-automatically-download-torrents%2F' data-shr_title='Using+Dropbox+to+automatically+download+torrents'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->

<p>Related posts:<ol><li><a href='http://pedroassuncao.com/2011/02/dropbox-plus-mercurial-driven-development-anyone-tried-that/' rel='bookmark' title='Dropbox plus Mercurial -driven development. Anyone tried that?'>Dropbox plus Mercurial -driven development. Anyone tried that?</a></li>
<li><a href='http://pedroassuncao.com/2008/11/my-computer/' rel='bookmark' title='My computer'>My computer</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://pedroassuncao.com/2011/03/using-dropbox-to-automatically-download-torrents/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

