<?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>medecau</title>
	<atom:link href="http://medecau.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://medecau.com</link>
	<description>Hacks and rants.</description>
	<lastBuildDate>Tue, 02 Mar 2010 07:55:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='medecau.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Could not find rails locally or on remote repository</title>
		<link>http://medecau.com/2010/03/02/could-not-find-rails-locally-or-on-remote-repository/</link>
		<comments>http://medecau.com/2010/03/02/could-not-find-rails-locally-or-on-remote-repository/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 07:55:07 +0000</pubDate>
		<dc:creator>medecau</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[ruby rails gem install error repository]]></category>

		<guid isPermaLink="false">http://medecau.com/2010/03/02/could-not-find-rails-locally-or-on-remote-repository/</guid>
		<description><![CDATA[If you get this Error message when installing rails on a mac with OS X 10.5 Leopard, try one updating your gems.
> sudo gem update &#8211;system
and then:
> sudo gem install rails
]]></description>
			<content:encoded><![CDATA[<p>If you get this Error message when installing rails on a mac with OS X 10.5 Leopard, try one updating your gems.<br />
> sudo gem update &#8211;system<br />
and then:<br />
> sudo gem install rails</p>
]]></content:encoded>
			<wfw:commentRss>http://medecau.com/2010/03/02/could-not-find-rails-locally-or-on-remote-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rsync for webmasters</title>
		<link>http://medecau.com/2010/02/04/rsync-for-webmasters/</link>
		<comments>http://medecau.com/2010/02/04/rsync-for-webmasters/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 19:56:06 +0000</pubDate>
		<dc:creator>medecau</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://medecau.com/?p=258</guid>
		<description><![CDATA[Updating code on remote servers can be a painful experience, specially if you are still iterating on that code.
There are lots of available solutions to update files remotely, [S]FTP, git/svn, etc.
I have personally used FTP, tried out git and even attempted to used macFuse to mount a local drive of an SFTP folder.
FTP is ok [...]]]></description>
			<content:encoded><![CDATA[<p>Updating code on remote servers can be a painful experience, specially if you are still iterating on that code.</p>
<p>There are lots of available solutions to update files remotely, [S]FTP, git/svn, etc.</p>
<p>I have personally used FTP, tried out git and even attempted to used macFuse to mount a local drive of an SFTP folder.</p>
<p>FTP is ok for one file at a time but becomes unusable for many files, git is acceptable for multiple file changes, keeps history but is a bit too slow for one file changes and macFuse is impossibly slow to mount.</p>
<p>I set out to find the silver bullet and went to a place long forgotten.<br />
Enter the unix world, the world where programs do one thing and do it well. rsync. It&#8217;s purpose is to keep directories in sync, the largest mirror sites use this to keep up to date with the changes.<br />
In my setup I am using rsync over an ssh connection, which makes this a tad be more complicated, still extremely useful while safe.</p>
<p>Keeping local directories in sync with rsync is pretty simple.</p>
<p>&gt; rsync origin/ destination/</p>
<p>That will keep the contents of the directory &#8216;destination&#8217; in sync with &#8216;origin&#8217;.<br />
I added the option -r to make sure rsync recurses into directories.</p>
<p>&gt; rsync -r origin/ destination/</p>
<p>rsync does not delete files from destination that are missing in origin folder, for this i added &#8211;delete and &#8211;force to remove directories from destination even if they are not empty.</p>
<p>&gt; rsync -r &#8211;delete &#8211;force origin/ destination/</p>
<p>But because I sometimes work on live code the updates should not mess with the running code. For this I added the option &#8211;delay-updates and changed &#8211;delete to &#8211;delete-after. &#8211;delay-updates will tell rsync to upload all changes and apply them after all uploads are sent, making the time it takes to apply changes much shorter. &#8211;delete-after will tell rsync to delete the files after uploading. These both options make changes look more &#8220;atomic&#8221;.</p>
<p>&gt; rsync -r &#8211;delete-after &#8211;delay-updates &#8211;force origin/ destination/</p>
<p>Because I get bored really fast and having some info on how things are going I also added &#8211;progress, this will show how much has been uploaded, transfer speed and ETA.</p>
<p>&gt; rsync -r &#8211;delete-after &#8211;delay-updates &#8211;force &#8211;progress origin destination</p>
<p>Know because sync happens over the internet I decided to use ssh for the transfer. To tell rsync to transfer over ssh I used the -e option which allows the user to define a shell for rsync.</p>
<p>&gt; rsync -r &#8211;delete-after &#8211;delay-updates &#8211;force &#8211;progress -e &#8217;ssh&#8217; origin/ example.com:~/destination/</p>
<p>Note to separate the domain name from the path with &#8216;:&#8217;</p>
<p>Most of the work is done, but has you may notice, if you have large files, the upload speed is not very fast. To help speed up the syncing I use -z</p>
<p>&gt; rsync -r &#8211;delete-after &#8211;delay-updates &#8211;force &#8211;progress -e &#8217;ssh&#8217; -z origin/ example.com:~/destination/</p>
<p>or for a shorter version</p>
<p>&gt; rsync -rze &#8217;ssh&#8217; &#8211;force &#8211;delete-after &#8211;delay-updates &#8211;progress origin/ example.com:~/destination/</p>
<p>At this point rsync is pretty decent, except it request the password every time you want to sync.</p>
<p>This is easily fixed with public/private key files.</p>
<p>For further help take a look at this <a href="http://pkeck.myweb.uga.edu/ssh/" target="_blank">fine tutorial on setting up ssh keys</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://medecau.com/2010/02/04/rsync-for-webmasters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating old git repositories from svn</title>
		<link>http://medecau.com/2010/02/03/updating-old-git-repositories-from-svn/</link>
		<comments>http://medecau.com/2010/02/03/updating-old-git-repositories-from-svn/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 13:42:57 +0000</pubDate>
		<dc:creator>medecau</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://medecau.com/?p=252</guid>
		<description><![CDATA[This is how I got an old github repository of wordpress to come up-to-date with the SVN upstream.
I wanted to have a git based repository of wordpress but the most recent one I found in github was skynet&#8217;s one.
This repo had been last updated to r11948 in September 2009 so i had to either

 fetch [...]]]></description>
			<content:encoded><![CDATA[<p>This is how I got an old github repository of wordpress to come up-to-date with the SVN upstream.</p>
<p>I wanted to have a git based repository of wordpress but the most recent one I found in github was <a href="http://github.com/skynet/wordpress">skynet&#8217;s one</a>.</p>
<p>This repo had been last updated to <a href="http://github.com/skynet/wordpress/commit/8e7f77c8fb8bed893bd1d9c56db084e9ad4504ab" target="_blank">r11948</a> in September 2009 so i had to either</p>
<ul>
<li> fetch the whole history of wordpress from the svn repo since sometime around 2006,</li>
<li>clone svn and lose the history or</li>
<li>clone this git repo add the remote svn  from wordpress.org and then update since r11948</li>
</ul>
<p>The first was out of question has it is both unecessary and useless, it would also take a shit load of time to complete. The second was something I did not want to resort to has i wanted to keep connected to skynet and it&#8217;s other forks inside github. I had to try to clone from github and then somehow connect to the wordpress svn repo.</p>
<p>I have been fiddling around with this for the last few days and has I expected, in the end, it was quite simple to do.</p>
<p>First I forked skynet repository to create one of my own and keep the relation inside of github. This is somewhat unecessary has i could have just cloned skynet repo directly but i wanted to keep the github network connection.</p>
<p>With the github repo forked I cloned the svn repo from wordpress.org from the point in which it was left by skynet.</p>
<p>For this I looked into the information of the <a href="http://github.com/medecau/wordpress/commit/8e7f77c8fb8bed893bd1d9c56db084e9ad4504ab" target="_blank">last update</a> and took the revision number 11948.</p>
<p>&gt; git svn clone http://core.svn.wordpress.org/trunk/ wordpress -r 11949</p>
<p>This will tell git to clone the svn repository starting after the last revision.</p>
<p>Now the repo needs to be brought up to date.</p>
<p>&gt; cd wordpress</p>
<p>&gt; git svn rebase</p>
<p>This will get all revisions past the current HEAD and rebase all changes</p>
<p>Then I added my github repository to the local configuration.</p>
<p>&gt; git remote add github git@github.com:medecau/wordpress.git</p>
<p>And pushed to github</p>
<p>&gt; git push github</p>
<p>I also cleaned up, has svn tends to be quite messy.</p>
<p>&gt; git gc</p>
<p>And now I have <a href="http://github.com/medecau/wordpress" target="_blank">fresh WordPress repository in  github</a></p>
<p>Thanks in part to <a href="http://www.fnokd.com/2008/08/20/mirroring-svn-repository-to-github/" target="_blank">fnokd</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://medecau.com/2010/02/03/updating-old-git-repositories-from-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Voice invite Fail</title>
		<link>http://medecau.com/2009/10/21/google-voice-invite-fai/</link>
		<comments>http://medecau.com/2009/10/21/google-voice-invite-fai/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 22:27:30 +0000</pubDate>
		<dc:creator>medecau</dc:creator>
				<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://medecau.com/?p=211</guid>
		<description><![CDATA[
Just got my invite to Google Voice, can&#8217;t use it because it&#8217;s not available in my country,
Next time let me know when I ask for the invite, thanks.
]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-213" title="Google Voice_1256158972332" src="http://medecau.com/wp-content/uploads/2009/10/Google-Voice_1256158972332.png" alt="Google Voice_1256158972332" width="438" height="170" /></p>
<p>Just got my invite to Google Voice, can&#8217;t use it because it&#8217;s not available in my country,</p>
<p>Next time let me know when I ask for the invite, thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://medecau.com/2009/10/21/google-voice-invite-fai/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Help save Bittorrent trackers</title>
		<link>http://medecau.com/2009/09/17/help-save-bittorrent-trackers/</link>
		<comments>http://medecau.com/2009/09/17/help-save-bittorrent-trackers/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 12:43:24 +0000</pubDate>
		<dc:creator>medecau</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://medecau.com/?p=206</guid>
		<description><![CDATA[A few weeks ago the The Pirate Bay tracker went down and many .torrents stopped working properly.
This got me curious again and knowing, from previous readings, that bittorrent trackers use HTTP  the idea for trackhub started to grow on my head. I started to wonder if BT clients followed HTTP redirects.After searching the web [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago the The Pirate Bay tracker went down and many .torrents stopped working properly.</p>
<p>This got me curious again and knowing, from previous readings, that bittorrent trackers use HTTP  the idea for trackhub started to grow on my head. I started to wonder if BT clients followed HTTP redirects.After searching the web for bittorrent+redirect, I found that some BT clients used standard libraries and thus had this already built in.</p>
<p>The plan was in motion, I created the app instance on GAE and started coding. A few tests later and sure enough <a href="http://www.reddit.com/r/p2p/comments/9h9mv/need_your_help_testing_a_bt_tracker_hub_please/">some guys were able to download</a>. I started to ask some questions on irc.freenode.net/#bittorrent and fixed some bugs and functionality, released it to github and fired an email to torrentfreak.com editor Ernesto. After the <a href="http://torrentfreak.com/trackhub-offers-a-solution-for-failing-bittorrent-trackers-090912/">article on torrentfreak</a> traffic immediately spiked and a few bug fixes had to be done.</p>
<p>But soon enough it was obvious that trackhub would not survive.</p>
<p><strong>Why?</strong></p>
<p>There&#8217;s a few reasons for this:</p>
<ul>
<li>trackhub sucks, <a href="http://github.com/medecau/trackhub">help it suck lesss</a></li>
<li>keeps logs and is US based</li>
<li><a href="http://code.google.com/appengine/docs/quotas.html">GAE resources are limited</a></li>
<li>Popular <a href="http://forum.utorrent.com/viewtopic.php?id=62139">bt clients misbehave</a></li>
<li>.torrent creators put trackhub next to other trackers</li>
</ul>
<p>But the idea is not completely stupid. In my opinion it helps shed light on some problems with BT.</p>
<p><strong>What&#8217;s needed?</strong></p>
<ul>
<li>More <a href="http://erdgeist.org/arts/software/opentracker/">public trackers</a> that can be <a href="http://openbittorrent.com/">trusted</a></li>
<li>Bt clients that speak <a href="http://www.w3.org/Protocols/rfc2616/rfc2616.html">proper http</a></li>
<li>pirates that walk the walk, develop and/or donate to these projects</li>
<li>.torrent creators use proper tools to create the .torrent files and <a href="http://wiki.depthstrike.com/index.php/P2P:Protocol:Specifications:Multitracker">use tiers</a></li>
<li>UDP trackers, DHT, PEX, etc.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://medecau.com/2009/09/17/help-save-bittorrent-trackers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.285 seconds -->
