<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Voodoo Programming &#187; Google</title>
	<atom:link href="http://www.cneophytou.com/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cneophytou.com</link>
	<description>Things programmers do that they know shouldn&#039;t work but they try anyway, and which sometimes actually work, such as recompiling everything.</description>
	<lastBuildDate>Tue, 20 Oct 2009 13:54:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Downloading your code from Google App Engine</title>
		<link>http://www.cneophytou.com/2008/04/17/downloading-your-code-from-google-app-engine/</link>
		<comments>http://www.cneophytou.com/2008/04/17/downloading-your-code-from-google-app-engine/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 14:42:23 +0000</pubDate>
		<dc:creator>Constantinos</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Apps]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.cneophytou.com/?p=112</guid>
		<description><![CDATA[I've started using Google's App Engine since it launched, mostly playing around with Python (always wanted to learn), and setting up a small app to deal with my Desktop Photo Feed script. One irritation I had was that I wanted to share my code with a friend, but the app engine doesn't provide any way [...]]]></description>
			<content:encoded><![CDATA[I've started using Google's <a href="http://appengine.google.com/">App Engine</a> since it launched, mostly playing around with Python (always wanted to learn), and setting up a small app to deal with my <a href="http://www.cneophytou.com/2008/04/17/photo-feed-as-desktop-background/">Desktop Photo Feed</a> script. One irritation I had was that I wanted to share my code with a friend, but the app engine doesn't provide any way of downloading the source code.<br />
<br />
One way around this that I found, was a blog post by <a href="http://david-burger.blogspot.com/">David Burger</a> on <a href="http://david-burger.blogspot.com/2008/04/download-your-code-from-google-app.html">Download Your Code from Google App Engine</a>, where he created a Makefile to do the dirtywork. Because I don't like Makefiles (and have it from good authority that Googlers hate Makefiles too, but that's besides the point - just to reinforce my position), I modified his method to make it slightly more versatile so that it can work well with OS X (<code>tar</code> includes ._* resource fork files which are annoying), and also turn it into a shell script.<br />
<span id="more-112"></span>
<br />
There are two steps to the process. First, save this code as a file called something like <code>update.sh</code> in the base folder where your app code is located, and make it executable:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">ARCHIVE_DIR</span>=archive
<span style="color: #007800;">ARCHIVE_NAME</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">basename</span> <span style="color: #007800;">$PWD</span><span style="color: #000000; font-weight: bold;">`</span>.tgz
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #800000;">${ARCHIVE_DIR}</span>
<span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*~&quot;</span> <span style="color: #660033;">-delete</span>
<span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*pyc&quot;</span> <span style="color: #660033;">-delete</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">COPY_EXTENDED_ATTRIBUTES_DISABLE</span>=<span style="color: #c20cb9; font-weight: bold;">true</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">COPYFILE_DISABLE</span>=<span style="color: #c20cb9; font-weight: bold;">true</span>
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-czf</span> <span style="color: #800000;">${ARCHIVE_NAME}</span> <span style="color: #660033;">--exclude</span> .DS_Store <span style="color: #660033;">--exclude</span> <span style="color: #800000;">${ARCHIVE_NAME}</span> <span style="color: #660033;">-C</span> ..<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">basename</span> <span style="color: #007800;">$PWD</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #800000;">${ARCHIVE_DIR}</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #800000;">${ARCHIVE_NAME}</span> <span style="color: #800000;">${ARCHIVE_DIR}</span>
appcfg.py update .<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>



<p>
<a href='http://www.cneophytou.com/wp-content/uploads/2008/04/update.sh'>Download this script</a><br />
<br />
Then, you would probably want to password protect the resource that points to this archive file, so add this to your <code>app.yaml</code> file:</p>


<div class="wp_syntax"><div class="code"><pre class="yaml" style="font-family:monospace;">- url: /archive
  static_dir: archive
  login: admin</pre></div></div>



<p>
Now, whenever you wish to update your app, just execute <code>./update.sh</code> instead of <code>./appcfg.py update ./</code>, and the archive of your source will be created and uploaded with your changes. To download, assuming the folder your application is in has the same name as your application, just visit <code>http://yourapp.appspot.com/archive/yourapp.tgz</code> where <code>yourapp</code> is your app's name, and <code>yourapp.tgz</code> is your app folder's name if it's different from your app's name, and you will be prompted to download the archive assuming you're logged in as administrator. That's it!]]></content:encoded>
			<wfw:commentRss>http://www.cneophytou.com/2008/04/17/downloading-your-code-from-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Searching Google the way you want</title>
		<link>http://www.cneophytou.com/2007/09/18/searching-google-the-way-you-want/</link>
		<comments>http://www.cneophytou.com/2007/09/18/searching-google-the-way-you-want/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 19:56:53 +0000</pubDate>
		<dc:creator>Constantinos</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Search]]></category>

		<guid isPermaLink="false">http://www.cneophytou.com/2007/09/18/searching-google-the-way-you-want/</guid>
		<description><![CDATA[Google is awesome. I don&#8217;t even know where to start with all the features they&#8217;ve got packed in that tiny little searchbox of theirs. There&#8217;s a lot of sites that explain some of these advanced features [google.com], but I&#8217;m more interested in the ones I use regularly, or ones that make my search experience easier. [...]]]></description>
			<content:encoded><![CDATA[Google is awesome. I don&#8217;t even know where to start with all the features they&#8217;ve got packed in that tiny little searchbox of theirs. <a href='http://blogoscoped.com/archive/2005-09-29-n85.html'>There&#8217;s</a> a <a href='http://www.mapelli.info/tips/ultimate-google-search-tips-guide'>lot</a> of <a href='http://googlesystem.blogspot.com/2007/01/google-search-tips.html'>sites</a> that explain some of these advanced <a href='http://www.google.com/help/basics.html'>features</a> [google.com], but I&#8217;m more interested in the ones I use regularly, or ones that make my search experience easier.<br />
<br />
First, I&#8217;ll start with the <a href='http://www.google.com/experimental/index.html#BetaShortcuts'>Google by Keyboard</a> search. I first came across this in a <a href='http://lifehacker.com/software/firefox/install-the-google-by-keyboard-firefox-search-plugin-261569.php'>Lifehacker article</a>. I liked Google by Keyboard because it allowed me to use the same keyboard shortcuts that I use in <a href='http://www.google.com/reader/'>Google Reader</a> for my search results. The best part? The post included a link to an .xml file which would enable Firefox to have &#8216;Google by Keyboard&#8217; as one of the options in it&#8217;s search box!<br />
<span id="more-98"></span>
<br />
Unfortunately, the link on lifehacker no longer works, so here&#8217;s a link to <a href='http://www.cneophytou.com/wp-content/uploads/scripts/ffgooglekeyboard.xml'>my copy</a> of the .xml file. To install, simply download the .xml file, and save it in the <code>searchplugins</code> directory inside your Firefox profile directory, as per the lifehacker post instructions. To repeat:<br />
</p>
<blockquote>
<p>
On Windows, that path is C:\Program Files\Mozilla Firefox\searchplugins\<br />
On the Mac, go with ~/Library/Application Support/Firefox/profiles/yourprofilenamehere/searchplugins/
</p>
</blockquote>
<p>
and then simply restart Firefox. Now at the time, I was not using Firefox&#8217;s box to search, but instead Google&#8217;s toolbar. So I went ahead and created a custom .xml file to add the button to the Google toolbar. To install it, you can simply <a href='http://toolbar.google.com/buttons/add?url=http://www.cneophytou.com/wp-content/uploads/scripts/googlekeyboard.xml'>click on this link</a>.<br />
<br />
But that&#8217;s not all. There&#8217;s another search feature that I&#8217;ve learned to love, and use all the time, especially since I&#8217;ve started <a href='http://www.cneophytou.com/2007/07/24/itunes-scripts-i-cant-live-without/'>organizing my iTunes Library</a>. I&#8217;m talking about Google Music search, and like most &#8216;special&#8217; searches in Google it triggers automatically when it detects you&#8217;re searching for something music-related. I have not been able to find a &#8216;home page&#8217; for Google Music Search, which is a problem because most of my searches don&#8217;t get automatically recognized as a music search (for example I&#8217;ve recently been searching for the band called &#8216;<a href='http://www.google.com/musica?aid=t32ACWyHO6F'>Peaches</a>&#8216;&#8230; They&#8217;re pretty good btw. Obviously there&#8217;s no way searching for &#8216;peaches&#8217; on Google will ever trigger music search).<br />
<br />
Now what I would usually do is search for something like &#8216;Pixies&#8217; (as per the Music Search example), which would always bring up the Music search link, and proceed from there. But that&#8217;s two steps I&#8217;d love to completely eliminate. So, instead, I went ahead and modified the above .xml files to directly search Google Music. To use, you can either <a href='http://www.cneophytou.com/wp-content/uploads/scripts/ffgooglemusic.xml'>download</a> the firefox search plugin and follow the same directions as above, or if you&#8217;re using the Google toolbar, <a href='http://toolbar.google.com/buttons/add?url=http://www.cneophytou.com/wp-content/uploads/scripts/googlemusic.xml'>install the button</a>.<br />
<br />
I wonder if there&#8217;s an easy way of creating a script to automate this process for any arbitrary Google Search url&#8230; hmm&#8230;]]></content:encoded>
			<wfw:commentRss>http://www.cneophytou.com/2007/09/18/searching-google-the-way-you-want/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
