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
- (void)makeCircleAt:(CGPoint)center withDiameter:(float)diameter withColor:(int)myColor | |
{ | |
float radius = diameter * 0.5; | |
CGRect myOval = {center.x - radius, center.y - radius, diameter, diameter}; | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextSetRGBFillColor(context, 1.0, 0.0, 0.0, 1.0); | |
CGContextAddEllipseInRect(context, myOval); | |
CGContextFillPath(context); | |
} |
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
repl: [up] is the last used line (cycles upwards) | |
text: #foo is a tag; @foo likewise, but informs user (object with that name) | |
repl alias shell |
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
def safe_eval(text) | |
begin | |
Kernel.eval(text) | |
rescue Exception => e | |
"Exception " + e.to_s | |
rescue SyntaxError => e | |
"Syntax Error #{e}" | |
rescue Error => e | |
"Error #{e}" | |
rescue NameError => e #"multicast" nameerror, so inventory can caputre it |
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
online code repository for ruby/game code. | |
game client fetch from library & cache | |
ruby, gosu, opengl, bastardshell (OS/3) | |
evil idea: | |
use gist as code editor with highlighting (for JSmalltalk) | |
requires cross_domain_xhr_transport ]] cross_domain_ajax | |
# that would be so cooL! |
NewerOlder