<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-4720945447075286086</id><updated>2009-08-03T05:38:46.197-07:00</updated><title type='text'>Raul's hacks</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://raulhacks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4720945447075286086/posts/default'/><link rel='alternate' type='text/html' href='http://raulhacks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>raul</name><uri>http://www.blogger.com/profile/17352828861737786535</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4720945447075286086.post-5886162304067922968</id><published>2009-03-06T13:59:00.000-08:00</published><updated>2009-03-06T14:07:49.544-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='google maps hack mac'/><title type='text'>Applying hack directly to maps.google.com</title><content type='html'>When I wrote my original hack for navigating google maps on a Mac Book Pro by tilting the computer it was only working in my own page.  Someone asked if it could be possible to use the hack for google maps directly on http://maps.google.com&lt;br /&gt;&lt;br /&gt;For this I wrote a Greasemonkey script.&lt;br /&gt;&lt;br /&gt;Steps to make this work:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;First step is the same than for the original hack.So if you did this already you dont need to do it again.&lt;br /&gt;&lt;br /&gt;Install the native libraries, I used &lt;a href="http://www.shiffman.net/p5/sms/"&gt;Daniel Shiffman's Java Native libraries&lt;/a&gt;. From his website download &lt;a href="http://www.shiffman.net/p5/sms.zip"&gt;sms.zip&lt;/a&gt;. Extract:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li class="arrow"&gt;sms.jar — contains the Unimotion class&lt;/li&gt; &lt;li class="arrow"&gt;libUnimotionLib.jnilib — The java native interface to Unimotion&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Copy those two files into ~/Library/Java/Extensions/&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="arrow"&gt;Install &lt;a href="http://addons.mozilla.org/es-ES/firefox/addon/748"&gt;Greasemonkey addon for firefox&lt;/a&gt;(I think it may work for Opera too but I have not tried).&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Now install the Greasemonkey script, I posted it in &lt;a href="http://userscripts.org/scripts/show/42901"&gt;userscripts&lt;/a&gt;.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;Enjoy, and post here if you have any problems&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4720945447075286086-5886162304067922968?l=raulhacks.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raulhacks.blogspot.com/feeds/5886162304067922968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4720945447075286086&amp;postID=5886162304067922968' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4720945447075286086/posts/default/5886162304067922968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4720945447075286086/posts/default/5886162304067922968'/><link rel='alternate' type='text/html' href='http://raulhacks.blogspot.com/2009/03/applying-hack-directly-to-mapsgooglecom.html' title='Applying hack directly to maps.google.com'/><author><name>raul</name><uri>http://www.blogger.com/profile/17352828861737786535</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07322530332360934935'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4720945447075286086.post-195116127792676062</id><published>2008-07-14T15:26:00.000-07:00</published><updated>2008-07-14T15:27:14.110-07:00</updated><title type='text'>Video of google maps navigation tilting my mac.</title><content type='html'>&lt;object width="425" height="350"&gt; &lt;param name="movie" value="http://www.youtube.com/v/ZoRaGID3xeY"&gt; &lt;/param&gt; &lt;embed src="http://www.youtube.com/v/ZoRaGID3xeY" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;  &lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4720945447075286086-195116127792676062?l=raulhacks.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raulhacks.blogspot.com/feeds/195116127792676062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4720945447075286086&amp;postID=195116127792676062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4720945447075286086/posts/default/195116127792676062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4720945447075286086/posts/default/195116127792676062'/><link rel='alternate' type='text/html' href='http://raulhacks.blogspot.com/2008/07/video-of-google-maps-navigation-tilting.html' title='Video of google maps navigation tilting my mac.'/><author><name>raul</name><uri>http://www.blogger.com/profile/17352828861737786535</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07322530332360934935'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4720945447075286086.post-7053406298392501185</id><published>2008-06-24T16:13:00.000-07:00</published><updated>2008-07-02T14:42:48.378-07:00</updated><title type='text'>Navigating Google maps using the MAC sudden motion detector</title><content type='html'>I will explain here how I can navigate google maps by tilting my MacBook Pro.&lt;br /&gt;&lt;br /&gt;1. Install the native libraries, I used &lt;a href="http://www.shiffman.net/p5/sms/"&gt;Daniel Shiffman's Java Native libraries&lt;/a&gt;. From his website download &lt;a href="http://www.shiffman.net/p5/sms.zip"&gt;sms.zip&lt;/a&gt;. Extract:&lt;br /&gt;&lt;br /&gt;&lt;div class="itemtext"&gt;&lt;li class="arrow"&gt;sms.jar — contains the Unimotion class&lt;/li&gt; &lt;li class="arrow"&gt;libUnimotionLib.jnilib — The java native interface to Unimotion&lt;/li&gt;&lt;/div&gt;&lt;br /&gt;Copy those two files into ~/Library/Java/Extensions/&lt;br /&gt;&lt;br /&gt;2. Now just go to &lt;a href="http://fotos.toppunter.com/tiltmap/map2.html"&gt;my example&lt;/a&gt; and enjoy (it will ask you to "trust" me, since you are giving the applet access to the native libraries that I told you to install above). You may need to restart the browser if you just installed the libs above. I tried it with Firefox 3.0 and  Safar1 3.1.1&lt;br /&gt;&lt;br /&gt;If you want to copy and modify the example. Here is the java code for the applet:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;package sms;&lt;br /&gt;&lt;br /&gt;public class Unimotion {&lt;br /&gt;&lt;br /&gt;// Load the JNI Interface&lt;br /&gt;static {    &lt;br /&gt;    System.loadLibrary("UnimotionLib");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Native function&lt;br /&gt;private static native int[] readSMS();&lt;br /&gt;&lt;br /&gt;// Return three values as array&lt;br /&gt;public static int[] getSMSArray() {&lt;br /&gt;    return readSMS();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And the following class:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import java.applet.Applet;&lt;br /&gt;import java.net.URL;&lt;br /&gt;&lt;br /&gt;public class MapTiltNavigatorApplet extends Applet implements Runnable {&lt;br /&gt;int initialXYZ[];&lt;br /&gt;float speedXYZ[] = new float[]{0,0,0};&lt;br /&gt;&lt;br /&gt;public void init () {&lt;br /&gt; Thread t = new Thread(this);&lt;br /&gt; t.start();&lt;br /&gt; initialXYZ = sms.Unimotion.getSMSArray();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void run() {&lt;br /&gt; int refreshTime = getParameter("framesPerSecond")==null?&lt;br /&gt;   80:1000/Integer.parseInt(getParameter("framesPerSecond"));;&lt;br /&gt; while(true) {&lt;br /&gt;  try {&lt;br /&gt;   Thread.currentThread().sleep(refreshTime);&lt;br /&gt;  } catch (InterruptedException e) {&lt;br /&gt;  }&lt;br /&gt;  calculateSpeed();&lt;br /&gt;  sendMoveToClient();&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void calculateSpeed() {&lt;br /&gt; int []nowV = sms.Unimotion.getSMSArray();&lt;br /&gt; for (int i = 0; i &lt;&gt;5.0) speedXYZ[i]=5.0f;&lt;br /&gt;  //decay&lt;br /&gt;  if (speedXYZ[i]&gt;0) speedXYZ[i]-=speedXYZ[i]/5.0;&lt;br /&gt;  if (speedXYZ[i]&lt;0)&gt;1 || Math.abs(speedXYZ[1])&gt;1) {&lt;br /&gt;      this.getAppletContext().showDocument(&lt;br /&gt;        new URL("javascript:click("+speedXYZ[0]+","+speedXYZ[1]+");"));&lt;br /&gt;  }&lt;br /&gt; } catch (Exception e) {&lt;br /&gt;  e.printStackTrace();&lt;br /&gt; }            &lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Easy, isn't it?&lt;br /&gt;&lt;br /&gt;For the Javascript and the exact tag for including the applet just look at the source in my example above.&lt;br /&gt;&lt;br /&gt;If you build the jar for the aplet yourself remember to sign it, since it uses native libraries.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4720945447075286086-7053406298392501185?l=raulhacks.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raulhacks.blogspot.com/feeds/7053406298392501185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4720945447075286086&amp;postID=7053406298392501185' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4720945447075286086/posts/default/7053406298392501185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4720945447075286086/posts/default/7053406298392501185'/><link rel='alternate' type='text/html' href='http://raulhacks.blogspot.com/2008/06/navigating-google-maps-using-mac-sudden.html' title='Navigating Google maps using the MAC sudden motion detector'/><author><name>raul</name><uri>http://www.blogger.com/profile/17352828861737786535</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07322530332360934935'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry></feed>