This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework 'Cocoa' | |
class FaceDetectionDelegate | |
attr_accessor :window | |
def initWithURL(url) | |
case url | |
when String | |
@photo_url = NSURL.URLWithString(url) | |
when NSURL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework 'Cocoa' | |
framework 'avfoundation' | |
class Santa | |
t_url = NSURL.URLWithString("http://dl.dropbox.com/u/349788/mustache.png") | |
t_source = CGImageSourceCreateWithURL t_url, nil | |
@@tache = CGImageSourceCreateImageAtIndex t_source, 0, nil | |
g_url = NSURL.URLWithString("http://dl.dropbox.com/u/349788/glasses.png") | |
g_source = CGImageSourceCreateWithURL g_url, nil |