Skip to content

Instantly share code, notes, and snippets.

View probablycorey's full-sized avatar
πŸ‘―β€β™‚οΈ
Dancing with my twin

Corey Johnson probablycorey

πŸ‘―β€β™‚οΈ
Dancing with my twin
View GitHub Profile
def test
a = 5
end
function myTest(word)
print("here comes the word!")
print(word)
end
myTest("It worked")
#import <UIKit/UIKit.h>
#import "lua.h"
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSFileManager *fileManager = [NSFileManager defaultManager];
[fileManager changeCurrentDirectoryPath:[[NSBundle mainBundle] bundlePath]];
if (luaL_dofile(L, "data/scripts/WHATEVER-FILE-IS-NAMED.dat") != 0) {
fprintf(stderr,"Fatal error: %s\n", lua_tostring(L,-1));
titleAttributes = [[NSDictionary alloc] initWithObjectsAndKeys:
color, kCTForegroundColorAttributeName,
[font fontName], kCTFontNameAttribute,
[font pointSize], kCTFontSizeAttribute,
nil];
####
#########
## # ##
# # #
# # ##
# # ###
# #####
# #
## ###
waxClass{"AppDelegate", protocols = {"UIApplicationDelegate", "CAAnimationDelegate"}}
function applicationDidFinishLaunching(self, application)
local frame = UIScreen:mainScreen():bounds()
self.window = UIWindow:initWithFrame(frame)
self.window:setBackgroundColor(UIColor:orangeColor())
local label = UILabel:initWithFrame(CGRect(0, 100, 320, 40))
label:setFont(UIFont:boldSystemFontOfSize(30))
label:setColor(UIColor:orangeColor())
// Why I Hate Objective-C
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
@"getPopular", @"method",
[NSString stringWithFormat:@"%d", [offset intValue]], @"offset",
nil];
NSString *url = @"http://api.twitter.com/1/users/show.json?screen_name=probablycorey";
[Seriously get:url handler:^(SeriouslyResponse *response, NSError *error) {
if (error) {
NSLog(@"Got error %@", error);
}
else {
NSLog(@"%@", [response.body objectForKey:@"username"]);
}
}];
- (void)viewDidLoad
UIView *v = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 50, 50)];
v.autoresizingMask = UIViewAutoresizingFlexibleHeight;
v.backgroundColor = [UIColor redColor];
[self.scrollView addSubview:v];
}
[HTTP get:url callback:^ {(HTTPResponse *response, NSError *error)
if (error) {
// Do something
return;
}
NSLog(@"Response Body %@", response.body);
}]