Article RSS Feed http://mbauman.net/rss/ en-us 40 The main blog feed for my Web site. Tracking the ISS <p style="float:right"><a href="/iss"><img src="http://s3.amazonaws.com/static.mbauman.net/page_attachments/166/fancyicon2.png" alt="" /></a></p> <p>Back when I <a href="http://mbauman.net/geek/2009/08/06/iphone-geolocation-bookmarklets/">wrote about creating iPhone bookmarklets that automagically grab <span class="caps">GPS</span> location</a>, I lamented that you&#8217;re unable to easily bookmark them within an iOS device or save them as web apps. A few friends were pestering me about the using the <span class="caps">GPS</span>-enabled <a href="http://heavens-above.com">Heavens Above</a> link to track the <span class="caps">ISS</span>, so I quickly threw together something here on my website. The webpage <a href="http://mbauman.net/iss">http://mbauman.net/iss</a> will simply request your location and forward you on to Heavens Above&#8217;s <span class="caps">ISS</span> tracking page.</p> <p>The page itself is extraordinary simple. It uses entirely client-side processing; no data is logged. I only use your location to point to the correct <span class="caps">URL</span> to Heavens Above. The only little bit of fanciness involved is that it detects if you&#8217;re on an iPhone or iPod and then displays instructions on how to add to your homescreen. There&#8217;s a nice homescreen icon to go along with it. That said, it also works quite nicely with relatively advanced desktop browsers.</p> Sat, 02 Jul 2011 17:41:32 GMT http://mbauman.net/geek/2011/07/02/tracking-the-iss/ http://mbauman.net/geek/2011/07/02/tracking-the-iss/ Finer zoom increments in WebKit <p style="float:right"><a href="http://s3.amazonaws.com/static.mbauman.net/page_attachments/160/SafariViewMenu.png"><img src="http://s3.amazonaws.com/static.mbauman.net/page_attachments/162/SafariViewMenuSmall.png" alt="" /></a></p> <p>I&#8217;ve always been annoyed at how large the jumps are between zoom increments in every single web browser. One click of &#8220;Zoom In&#8221; and suddenly the text is <span class="caps">HUGE</span>. I have found it so unhelpful in the past that I had completely forgotten about the feature. But then two things changed:</p> <ol> <li>I purchased a high resolution laptop. I really like the display, but it can make text on some websites too small to read comfortably.</li> <li>Apple made <em>zoom in</em> a built-in gesture on their trackpads. In almost all applications, the &#8220;pinch&#8221; and &#8220;stretch&#8221; gestures gradually zooms the content in and out. In Safari, however, the jump between zoom levels is so large that the zoomed page feels jarringly disjointed from the original.</li> </ol> <p>Fortunately, WebKit is open source and anyone can <a href="http://webkit.org/">download and modify the source code</a>. And it&#8217;s an extremely simple change (as it should be). In file <code>WebKit/mac/WebView/WebView.mm</code>, change</p> <p><code>#define ZoomMultiplierRatio 1.2f</code></p> <p>to:</p> <p><code>#define ZoomMultiplierRatio 1.06265857f</code></p> <p>To be more precise, you may use <a href="https://gist.github.com/770529">this diff file</a> as a patch. Why <code>1.06265857f</code>? It&#8217;s the cube root of 1.2. Since the current zoom level is computed by multiplying by this ratio, using the cube root effectively makes the zoom increment a third of what is previously was.</p> <p>To compile your very own modified WebKit, go to <code>WebKit/ Tools/Scripts</code> and run <code>./build-webkit --release</code> (it takes a while &#8211; about 40 minutes for me). To use it, open and compile <code>WebKit/Tools/WebKitLauncher/WebKitLauncher.xcodeproj</code> in Xcode. This creates the WebKit.app that is found in the nightly builds. But you&#8217;re not done yet. You need to add your custom-built webkit into this app. Navigate into the build directory and right-click on WebKit.app to Show Package Contents. You need to create the directory <code>Contents/Frameworks/10.6</code> (or <code>10.5</code> if you&#8217;re still on Leopard). Finally, copy all the items from <code>WebKit/WebKitBuild/Release</code> into that new folder, and you&#8217;re done!</p> <p>Now if only I could hack Safari to not require such a large gesture to zoom in&#8230; but alas that code resides in Apple&#8217;s closed source.</p> Fri, 07 Jan 2011 21:47:00 GMT http://mbauman.net/geek/2011/01/07/finer-zoom-increments-in-webkit/ http://mbauman.net/geek/2011/01/07/finer-zoom-increments-in-webkit/ iPhone Geolocation Bookmarklets <p style="float:left"><a href="http://s3.amazonaws.com/static.mbauman.net/page_attachments/156/IMG_0010.PNG"><img src="http://s3.amazonaws.com/static.mbauman.net/page_attachments/158/IMG_0010_240.png" alt="" /></a></p> <p>Very few websites have implemented the new javascript <span class="caps">GPS</span> geolocation features that were intruduced with <span class="caps">HTML 5</span>. However, there are a few sites that use latitude and longitude directly in their URLs.</p> <p>I first wanted a quick way to get my current latitude and longitude while looking at <a href="http://heavens-above.com">Heavens Above</a>. It&#8217;s a great site that allows you to find visible satellites based upon your current location. Here&#8217;s <a href="javascript:navigator.geolocation.getCurrentPosition(function(g){c=g.coords;z=c.altitude;z=z?z:0;d=new%20Date(2009,0,1,0,0,0,0).toLocaleString().substr(-3,3);window.location='http://www.heavens-above.com/?lat='+c.latitude+'&#38;lng='+c.longitude+'&#38;alt='+z+'&#38;loc=iPhone&#38;tz='+d;},function(){alert('Permission%20denied.')});">the bookmarklet</a> that I created:</p> <div> <code style="word-wrap:break-word">javascript:navigator.geolocation.getCurrentPosition(function(g){c=g.coords;z=c.altitude;z=z?z:0;d=new Date(2009,0,1,0,0,0,0).toLocaleString().substr(-3,3);window.location="http://www.heavens-above.com/?lat="+c.latitude+"&#38;lng="+c.longitude+"&#38;alt="+z+"&#38;loc=iPhone&#38;tz="+d;},function(){alert("Permission denied.")});</code> </div> <p>Copy <a href="javascript:navigator.geolocation.getCurrentPosition(function(g){c=g.coords;z=c.altitude;z=z?z:0;d=new%20Date(2009,0,1,0,0,0,0).toLocaleString().substr(-3,3);window.location='http://www.heavens-above.com/?lat='+c.latitude+'&#38;lng='+c.longitude+'&#38;alt='+z+'&#38;loc=iPhone&#38;tz='+d;},function(){alert('Permission%20denied.')});">this link to your bookmarks</a> and when accessed on an iPhone or location-aware web browser, it will directly load the site with your current location entered!</p> <p>I had to jump through several hoops here. When the altitude is not available (when only using cell-tower triangulation), the javascript code returns <code>null</code>. The website only supports numeric values, so <code>z=z?z:0</code> replaces the <code>null</code> with a <code>0</code>. Secondly, the website needs the local timezone, but unfortunately it only accepts a small subset of the three letter codes (and not the numeric offset from <span class="caps">UTC</span>). Even worse, the daylight savings version of the code (EDT/CDT/MDT/PDT) are unsupported &#8211; the site just assumes that you follow the trend (sorry Arizona). So I grab the code from January 1, 2009 (when daylight savings is not in effect), and parse the three letter code from that string.</p> <p>For most sites, you&#8217;d only need something of the form (<a href="javascript:navigator.geolocation.getCurrentPosition(function(g){c=g.coords;window.location='http://forecast.weather.gov/MapClick.php?lat='+c.latitude+'&#38;lon='+c.longitude;},function(){alert('Permission%20denied.')});">The <span class="caps">NOAA</span>&#8217;s weather forecast</a> , for example):</p> <div> <code style="word-wrap:break-word">javascript:navigator.geolocation.getCurrentPosition(function(g){c=g.coords;window.location="http://forecast.weather.gov/MapClick.php?lat="+c.latitude+"&#38;lon="+c.longitude;},function(){alert("Permission denied.")});</code> </div> <p>Now if only I could find a way to save the javascript bookmark to the Home Screen, I&#8217;d be set!</p> Thu, 06 Aug 2009 01:33:15 GMT http://mbauman.net/geek/2009/08/06/iphone-geolocation-bookmarklets/ http://mbauman.net/geek/2009/08/06/iphone-geolocation-bookmarklets/ Minor Truetype Font Editing on a Mac <p style="float:left"><img src="http://s3.amazonaws.com/static.mbauman.net/page_attachments/150/cfonts.png" alt="" /></p> <p><em>Update December 5, 2011: Changed download link to the most recent version of Apple Font Tool suite, which is now x86 compatible.</em></p> <p>With the release of Windows Vista, Microsoft included six new fonts that they commissioned for the occasion. They are the new defaults for Vista and Office. They&#8217;ve also made them available for Mac through Office as well as a handful of free (as in beer) utilities. I got them by following <a href="http://www.wezm.net/2009/03/03/install-consolas-mac-osx/">these instructions</a>.</p> <p>These new modern fonts are explicitly designed for display on computer screens with ClearType. Although Apple has a <a href="http://www.codinghorror.com/blog/archives/000884.html">different philosophy on font rendering</a>, the same basic premise is used in <span class="caps">OS X</span>. Besides all that (or, rather, because of it) these fonts are very pretty.</p> <p>But there&#8217;s a problem, and you can see it in the image above. When packaging these fonts up for the Mac, Microsoft goofed on the baseline for Consolas. The icon previews below show it much more obviously.</p> <p style="float:center"><img src="http://s3.amazonaws.com/static.mbauman.net/page_attachments/154/icons.png" alt="" /></p> <p>In short: it&#8217;s annoying. And wrong. And the fix is after the break.</p> Sun, 15 Mar 2009 21:36:03 GMT http://mbauman.net/geek/2009/03/15/minor-truetype-font-editing-on-a-mac/ http://mbauman.net/geek/2009/03/15/minor-truetype-font-editing-on-a-mac/ …Worth a million campaign promises <p>Every once and a while, someone figures out a creative and astute way to represent the data behind some of those <em>talking points</em>. Here are a few I&#8217;ve run across over the past few months:</p> <h3>Whose taxes?</h3> <p><a href="http://s3.amazonaws.com/static.mbauman.net/page_attachments/129/taxplans.gif"><img src="http://s3.amazonaws.com/static.mbauman.net/page_attachments/129/taxplans.gif" width="440" alt="Source: Originally a Washington Post graphic; re-proportioned by chartjunk: http://chartjunk.karmanaut.com/taxplans/" title="Source: Originally a Washington Post graphic; re-proportioned by chartjunk: http://chartjunk.karmanaut.com/taxplans/" /></a></p> <h3>Drill, Baby, Drill.</h3> <p><img src="http://s3.amazonaws.com/static.mbauman.net/page_attachments/127/drill.jpg" title="Source: http://norvig.com/election-faq.html" alt="Source: http://norvig.com/election-faq.html" /></p> <h3>All those overpriced &ldquo;overhead&rdquo; projectors</h3> <p><img src="http://s3.amazonaws.com/static.mbauman.net/page_attachments/131/earmarks.gif" title="Source: http://norvig.com/election-faq.html" alt="Source: http://norvig.com/election-faq.html" /></p> Mon, 20 Oct 2008 21:54:14 GMT http://mbauman.net/life/2008/10/20/worth-a-million-campaign-promises/ http://mbauman.net/life/2008/10/20/worth-a-million-campaign-promises/ The Blues <p style="float:left"><a href="http://faculty.kutztown.edu/bauman/chicagoblues.html"><img src="http://s3.amazonaws.com/static.mbauman.net/page_attachments/125/chi16_160.jpg" title="The Chicago Skyline, with the BCBS building lit up for the occasion. Now if only they'd play nice with my dental bills..." alt="The Chicago Skyline, with the BCBS building lit up for the occasion. Now if only they'd play nice with my dental bills..." /></a></p> <p>Dad and Ben came down to Chicago for the Blues Festival. It was quite a blast, and dad put up some of the pictures on <a href="http://faculty.kutztown.edu/bauman/chicagoblues.html">his website</a>. Boy, did they wear me out! I tell ya&#8217;&nbsp;—&nbsp;it&#8217;s a lot of work bouncing around the city every day! <br /><br /></p> Sun, 10 Jun 2007 00:30:11 GMT http://mbauman.net/life/2007/06/10/the-blues/ http://mbauman.net/life/2007/06/10/the-blues/ On the LSD <p style="float:left"><a href="http://s3.amazonaws.com/static.mbauman.net/page_attachments/119/Picture021.jpg"><img src="http://s3.amazonaws.com/static.mbauman.net/page_attachments/121/Picture021_160.jpg" title="On my bike again. Click for bigger." alt="On my bike again. Click for bigger." /></a></p> <p>Well, not quite. This picture is on my way home from biking the Lake Shore Drive. It was wet and rainy until they kicked us off the road, at which point the sun immediately emerged and the clouds completely cleared from the sky. I got two flats, as well. (The first was from a shard of glass, which I fixed with the spare I brought along. I went to the bike-fixing-station to get it pumped up, and the guy there promptly broke the valve.) Even so, it was great to get back on the bike and just cruise without interruption.</p> <p>And yes, I am missing a tooth.</p> Tue, 29 May 2007 00:33:27 GMT http://mbauman.net/life/2007/05/29/on-the-lsd/ http://mbauman.net/life/2007/05/29/on-the-lsd/ Adding an OptiBay to my MacBook Pro <p>Well, I finally decided to risk voiding my warranty for the luxury of double the disk space. I have a 160GB hard drive installed in my MacBook, but I&#8217;m constantly squeezed for space. I never use my internal CD drive (the last time was over two months ago&#8230; and it was actually my house-mate that needed it), so the thought of occasionally using an external CD drive is much more pleasant than lugging an external HD around all the time.</p> <p><a href="http://www.mcetech.com/"><span class="caps">MCE</span> Technologies</a> sells a decent-looking package called <a href="http://www.mcetech.com/optibay/">OptiBay</a> for a little too much money that takes the internal optical drive and replaces it with a Hard Drive. You can do it on most any Mac laptop. I searched around online quite a bit for reviews and experiences, but it seems as though nobody has done a formal review. So, I figured I&#8217;d photograph and document my experience as I went.</p> Sat, 26 May 2007 21:14:43 GMT http://mbauman.net/geek/2007/05/26/adding-an-optibay-to-my-macbook-pro/ http://mbauman.net/geek/2007/05/26/adding-an-optibay-to-my-macbook-pro/ Lies, Lies! <p style="float:left"><a href="http://s3.amazonaws.com/static.mbauman.net/page_attachments/77/Arcade_Fire_800.jpg"><img src="http://s3.amazonaws.com/static.mbauman.net/page_attachments/75/Arcade_Fire_300.jpg" title="The Chicago Theatre Marquee: Arcade Fire" alt="The Chicago Theatre Marquee: Arcade Fire" /></a></p> <p>What a blast. A few months ago, Jesse and I managed to grab some of the last tickets for the <a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewArtist?id=23203991">Arcade Fire</a> shows in Chicago. Not kidding&nbsp;—&nbsp;I searched for singles immediately after we got our pair (others were interested in going, too), but none were to be had. The concert was last night, and what a show it was. I am continually impressed by their musicianship; I can&#8217;t count the number of instruments they bounced between. Even a <em>Bass</em> Saxophone made an appearance.</p> <p>It&#8217;s always refreshing to get out and be reminded how live music is <em>supposed</em> to sound. And the Chicago Theatre is gorgeous (we even had fancy box seats).</p> Mon, 21 May 2007 02:04:01 GMT http://mbauman.net/life/2007/05/21/lies-lies/ http://mbauman.net/life/2007/05/21/lies-lies/ The Temporary Crowns <p>Here&#8217;s the after photo. The dentist on Thursday fitted me with temporary crowns, so I really haven&#8217;t been walking around with a big hole in my mouth. For a temporary quick fix, I&#8217;m pretty impressed. They don&#8217;t quite match, and boy do they feel weird. My nerves from the old teeth were removed, so they really don&#8217;t hurt at all.</p> <p>That said, I certainly am not going to be eating any caramel apples anytime soon. Or anything that I have to bite off with my front teeth, for that matter.</p> <p><img src="http://s3.amazonaws.com/static.mbauman.net/page_attachments/69/Crowns_440.jpg" /></p> <p>Yesterday at work someone mentioned that I should just screw the replacement implants and just go for a grill. I think it&#8217;s a <a href="http://s3.amazonaws.com/static.mbauman.net/page_attachments/71/grillz.png">marvelous idea</a> (thanks for lending them to me, Nelly). Insurance will cover that, right?</p> Sat, 19 May 2007 12:41:26 GMT http://mbauman.net/life/2007/05/19/the-temporary-crowns/ http://mbauman.net/life/2007/05/19/the-temporary-crowns/