<?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>Artsy Techie &#187; Hack</title>
	<atom:link href="http://olivier.thereaux.net/category/tech/hack/feed/" rel="self" type="application/rss+xml" />
	<link>http://olivier.thereaux.net</link>
	<description>Mix Web Technology, Art, Culture. Bake Until Crispy</description>
	<lastBuildDate>Fri, 13 Aug 2010 00:12:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Bixi on the iPhone</title>
		<link>http://olivier.thereaux.net/2009/05/16/bixi-on-the-iphone/</link>
		<comments>http://olivier.thereaux.net/2009/05/16/bixi-on-the-iphone/#comments</comments>
		<pubDate>Sat, 16 May 2009 19:22:04 +0000</pubDate>
		<dc:creator>Olivier Thereaux</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Urban]]></category>

		<guid isPermaLink="false">http://artbeat.me/?p=164</guid>
		<description><![CDATA[(… and ipod touch, and blackberry…) Bixi is the new community bike service here in Montreal. Lots of brewhaha around launchtime, but to me, the really annoying shortcoming of the system so far was not being able to check the status of stations on the go. According to a message I read on the facebook [...]]]></description>
			<content:encoded><![CDATA[<p>(… and ipod touch, and blackberry…)</p>
<p><a href="http://bixi.ca">Bixi</a> is the new community bike service here in Montreal. Lots of brewhaha around launchtime, but to me, the really annoying shortcoming of the system so far was not being able to check the status of stations on the go.</p>
<p>According to a <a href="http://www.facebook.com/pages/Bixi-Velo/76554328648?v=feed&amp;story_fbid=76492574167&amp;ref=mf">message</a> I read on the facebook group for bixi a few weeks ago, there is “no plan to provide an API, iphone app or mobile access to the map of bixi stations”. That&#8217;s rather silly, knowing that the users will want to know, <em>in real time</em> and <em>on the go</em>, whether they can get or return a bike nearby.</p>
<p> I&#8217;m too lazy to build a real iphone app over the week-end, but I wanted to prove that it doesn&#8217;t cost tens of thousands of dollars to provide bixi users mobile access to the status of the stations.</p>
<p>30 minutes and about as many lines of python later, I had a working hack to include a <a href="http://yoda.zoy.org/2009/05/bixi">map of all stations</a> in google earth, google maps or the map application on my iphone.</p>
<h3>iPhone Instructions</h3>
<p>Here&#8217;s how to use it on the iphone (or networked iPod Touch):<br />

<a href='http://olivier.thereaux.net/2009/05/16/bixi-on-the-iphone/bixi_map_1/' title='iphone map application'><img width="150" height="150" src="http://olivier.thereaux.net/wp-content/uploads/2009/05/bixi_map_1-150x150.png" class="attachment-thumbnail" alt="1) Launch the iphone map application" title="iphone map application" /></a>
<a href='http://olivier.thereaux.net/2009/05/16/bixi-on-the-iphone/bixi_map_2/' title='Fetching the stations'><img width="150" height="150" src="http://olivier.thereaux.net/wp-content/uploads/2009/05/bixi_map_2-150x150.png" class="attachment-thumbnail" alt="2) Enter the address http://bit.ly/bixi in the search bar" title="Fetching the stations" /></a>
<a href='http://olivier.thereaux.net/2009/05/16/bixi-on-the-iphone/bixi_map_3/' title='The stations show on the map'><img width="150" height="150" src="http://olivier.thereaux.net/wp-content/uploads/2009/05/bixi_map_3-150x150.png" class="attachment-thumbnail" alt="3) Tada! all active stations show on the map, with the number of available bikes and parking slots" title="The stations show on the map" /></a>
</p>
<p><strong>Disclaimer</strong>: I built this using only publicly available data – not a public, official API, though. If the powers-that-be at bixi decide they don&#8217;t like it, or change the way they organise their data, or any other silly move, I&#8217;ll have to pull the plug on this little hack. In the meantime, I intend to use it and provide it for free. Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://olivier.thereaux.net/2009/05/16/bixi-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
		<item>
		<title>Synchronizing two instances of wordpress</title>
		<link>http://olivier.thereaux.net/2009/02/26/wordpress-sync/</link>
		<comments>http://olivier.thereaux.net/2009/02/26/wordpress-sync/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 23:12:03 +0000</pubDate>
		<dc:creator>Olivier Thereaux</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[artbeat]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[ultra-geeky]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://artbeat.me/?p=3</guid>
		<description><![CDATA[The TokyoArtBeat and NYArtBeat blogs use a fairly highly customized WordPress theme, with a number of php scripts and routines. For the longest time, this was one of the very few areas of the ArtBeat sites which were not fully duplicated on the staging and production servers. Using subversion for the theme code itself did [...]]]></description>
			<content:encoded><![CDATA[<p>The TokyoArtBeat and NYArtBeat blogs use a fairly highly customized WordPress theme, with a number of php scripts and routines. For the longest time, this was one of the very few areas of the ArtBeat sites which were not fully duplicated on the <em>staging</em> and <em>production</em> servers.</p>
<p>Using subversion for the theme code itself did help us test changes to the theme scripts and style before pushing them to production, but the content itself was not duplicated: the development instance of the blog had some fairly antiquated content, while the production instance had all the latest article.</p>
<p>Synchronising the content from the production to the development server was not as easy as simply dumping and reimporting the whole SQL database. Be aware that if you import a whole WordPress database, you also import some field setup that will cause unwanted redirects.</p>
<p><span id="more-311"></span></p>
<p>Suppose you dump the wordpress database for <code>http://www.myblog.example.com/</code> into a duplicate instance at <code> http://dev.myblog.example.com/</code>. Try accessing  <code> http://dev.myblog.example.com/</code> and wordpress will automatically redirect you to <code>http://www.myblog.example.com/</code>, which it thinks is the right URI for your blog. What to do? Go to the WordPress Dashboard and edit the settings? Not going to happen, since trying to access <code> http://dev.myblog.example.com/wp-admin/</code> will <strong>also</strong> redirect you to <code>http://www.myblog.example.com/</code>.</p>
<p>The solution I found was to:</p>
<ol>
<li>
<p>Make sure you use separate databases for your production and development blog. This is much safer, anyway. Also, make sure your databases and files are properly backed up before attempting the following hack.</p>
<p>Disable all plugins before the sync. Especially <strong>if you are using wp-cache, disable it</strong>. You&#8217;ve been warned.</p>
</li>
<li>
<p>Dump the database from your production blog into the separate database for your development blog. With mysql, this will look like: </p>
<p><code> mysqldump PROD_DATABASE_NAME -h PROD_DATABASE_HOST -u PROD_DATABASE_USER -p &gt; wordpress_dump.sql</code></p>
<p> then </p>
<p><code> mysql DEV_DATABASE_NAME -h DEV_DATABASE_HOST -u DEV_DATABASE_USER -p &lt; wordpress_dump.sql</code></p>
<p>(You will be prompted for the database password both times. Make sure to replace the placeholders PROD_DATABASE_HOST with actual values for your setup.</p>
</li>
<li>
<p>Edit the development database to tell wordpress the location of the dev blog. With MySQL again:</p>
<p><code> echo 'update wp_options set option_value="http://staging.address.com/" where option_name="home";' | mysql DEV_DATABASE_NAME -h DEV_DATABASE_HOST -u DEV_DATABASE_USER -p</code></p>
<p> and </p>
<p><code> echo 'update wp_options set option_value="http://staging.address.com/wordpress" where option_name="siteurl";' | mysql DEV_DATABASE_NAME -h DEV_DATABASE_HOST -u DEV_DATABASE_USER -p</code></p>
</li>
</ol>
<p>This worked for me, in two very distinct configurations last week. Any way this could have been done in a less hack-ish way? Tell me in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://olivier.thereaux.net/2009/02/26/wordpress-sync/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
