GitHub Issues App Bookmarklet

Here's a simple little bookmarklet for automatically switching from GitHub's issue tracker to the Cappuccino-based GitHub Issues App.

(Posterous won't let me make a nice link for you to drag to your bookmarks bar, so unfortunately you'll have to create your own.)

Loading mentions Retweet

Comments [0]

Accessing file:// URIs from Local Files in Google Chrome (on Mac OS X)

Recent versions of Google Chrome added a new security feature that prevents local files from accessing other local files. For web development, especially for developing Cappuccino apps, that makes testing locally in Chrome difficult. So, I made this: http://github.com/paulbaumgart/google-chrome-insecure.

In response to: http://code.google.com/p/chromium/issues/detail?id=37586

Installation:

  1. Download and extract the application.
  2. Copy Google Chrome Insecure.app to /Applications .
  3. Run it instead of Google Chrome.app when you need to access file:// URIs locally.

You can edit it by double clicking the file Google Chrome Insecure.app/Contents/Resources/Scripts/main.scpt . It should open up in Script Editor.app.

Loading mentions Retweet

Comments [0]

Opening mailto: Links in Gmail with Google Chrome on Mac OS X

Update 4/6: subject/body/bcc/cc should now be handled also. Let me know if this is not working as expected.

 

I couldn't find a good way to get Google Chrome to open mailto: links in Gmail, so I made a little AppleScript-based application to do it for me:

http://github.com/paulbaumgart/gmail-mailto-chrome-handler

These are the instructions from the README:

How to use Gmail Mailto Chrome Handler

  1. Make sure Google Chrome is your default browser. This program will probably break mailto: links if you have a different default browser.
  2. Download Gmail Mailto Chrome Handler.app, put it somewhere useful (like /Applications), and run it.
  3. Try clicking this mailto: link. If it opens a new message in Gmail, you're all done!
  4. If the mailto link didn't work as expected, open Mail.app, go to Preferences, and under the General tab, select Gmail Mailto Chrome Handler.app as your "Default email reader".

Report any problems to paul@baumgart.us, or fix them and send a pull request. :-)

 

It even handles mailto: links that open in a new tab correctly. The only thing that doesn't work 100% is middle- or command-clicking a mailto: link. In that case, an extra empty tab will be opened. But just don't do that and you'll be fine.

Inspired by this: http://www.macosxautomation.com/applescript/linktrigger/index.html

Also, thanks to Joe for pointing out this trick and listing the relevant caveats: http://code.google.com/p/chromium/issues/detail?id=27468#c32

 

Loading mentions Retweet

Comments [0]

Situational Awareness for Your Git Repositories

If you use git a lot, and you're clumsy sometimes like me, you know it's a little too easy to accidentally merge things into the wrong branch. It's also very easy to have your git-stash stack build up indefinitely (git stash clear will fix that for you, by the way, assuming you don't actually want any of the stashed changes anymore). Following Tom's advice, I put some info about the current git repository in my Bash prompt.

You can find the latest version on GitHub or download it directly. It even comes with an installation script!

If the current directory is a git repository, this adds the name of the current branch, a representation of the current state, and the height of the git-stash stack (if there is one) to the Bash prompt. It also adds some pretty colors.

Do you have other good pieces of information to add to the prompt? Fork the repository on GitHub and let me know.

See it in action:

Loading mentions Retweet

Comments [2]

Sneak Preview: One-Hot Gaming's First Title

Everything's finally OpenGL ES 1.1 compatible, and all GLUT calls are
converted to Cocoa Touch.

It's really nice that Xcode can handle Objective-C and C++ in the same
file. Such a huge time-saver.

Still needs some performance tweaks ("mip-mapping" the canyon vertices
is an option we're considering), but, hey, it runs!

Loading mentions Retweet

Comments [0]

This is more like it

Those JS articles I linked last week were fairly disappointing, it
turns out. But this seems really promising:
http://eloquentjavascript.net/contents.html
Loading mentions Retweet

Comments [1]

Chromium Icon for Mac OS X

I find the default Chrome icon a bit too colorful and distracting sitting there on my dock... so, to replace it with the nicely subdued, blue Chromium icon, run the following command in Terminal.app:

http://gist.github.com/345715/

This will download the two icon files Chrome uses, and replace the old ones. I haven't been able to figure out a way to keep updates from over-writing the icon, so you'll have to re-run this command the next time Chrome updates itself.

Loading mentions Retweet

Comments [2]

Learning JavaScript Properly

I'm going to finally learn JavaScript properly. I've a decent amount
of time writing mediocre JavaScript code, from simple browser games to
a half-assed HTTP server that ran on top of XULRunner. But I have
nowhere near the depth of understanding of what's actually going on
"under the hood" as I have with C or Python or even Objective-C.

So I'm documenting my adventures here- both for my own reference and
in the hope that it makes it easier for someone else to do the same.

First stop, a refresher on the object system:

http://www.devarticles.com/c/a/JavaScript/ObjectOriented-JavaScript-An-Introduction-to-Core-Concepts/
http://www.devarticles.com/c/a/JavaScript/Object-Oriented-JavaScript-Using-the-Prototype-Property/

Douglas Crockford's presentation "JavaScript - The Good Parts" sounds
promising: http://video.yahoo.com/watch/630959/2974197 ... maybe in
conjunction with finishing up the chapter on him in Coders at Work.

Loading mentions Retweet

Comments [0]

CSE 167 Wrap-Up

Just figured I'd post this screen shot of what Eric and my CSE 167
project eventually became.

Eric's also planning on making an iPhone game out of this; I'm looking
forward to that... accelerometer controls are probably a lot more fun
than keyboard arrows.

It's still in the same GitHub repository:
http://github.com/paulbaumgart/CanyonPilot

Loading mentions Retweet

Comments [0]

Introduction to Computer Graphics (CSE 167) Final Project

So, for the Intro to Computer Graphics final project, our assignment is basically "make something cool with 3d graphics". (I really wish more classes did that. Maybe then I'd stay for a Master's.) Points are  awarded based on the difficulty of various "technical features".

This is what Eric and I have set out to do:

Final Project Proposal

by Paul Baumgart and Eric Levine

We intend to build a simple 3d flight simulator game.

The player will control an airplane that flies through an infinite canyon. The objective of the game will be to pilot the plane through the canyon as long as possible without crashing. The player's score will be based on the distance between the start point and the crash site.

The plane will be a textured 3d model, with moving ailerons. It will be controlled with the keyboard arrow keys. The plane will cast a shadow on the ground as it flies, based on a directional light high above the landscape that simulates sunlight during midday. A bounding volume for the plane will be used to determine if it crashes into the canyon walls. The camera will follow the plane. Time permitting, we will include a "Pilot's view" mode in addition to the default 3rd-person view mode.

The canyon will be built on-the-fly from a piecewise cubic Bezier curve. The curve will determine the path of the canyon. In order to ensure a smooth path, the piecewise curve will be C1 continuous. A height map will be generated based on path defined by the curve. The height map will be perturbed using fractal terrain generation techniques in order to create a realistic appearance for the canyon.

Below is a summary of the technical features to be included in this project:

- Shadow mapping
- Bounding volumes for collision detection
- Piecewise Bezier curves as paths
- C1 continuity
- Fractal terrain generation
- Height maps

You can follow our progress on GitHub.

After working on it for about 4 days, we have the canyon generation working nicely (though not optimally- we create more quads than we actually need still), and collision detection works 99% of the time (and will soon be 100%, assuming our math is right).

Screenshot:

Yeah, the terrain needs some work. But isn't the airplane pretty?

Loading mentions Retweet

Comments [0]

About

You can contact me at paul@baumgart.us

You can view my LinkedIn profile here: http://www.linkedin.com/in/paulbaumgart