All Your Autorotate Are Belong To UINavigationController

so if you’re like me, you usually don’t fuck around with screen orientation. You make an app to auto rotate. But if your building an app in a day for a pitch that scans barcodes and plays videos, and you don’t have full res images assets, basically screen shots. You have some pages that should auto rotate and some that

How to make a UIScrollView Programmatically

Ok, so I’ve stilll never made this work in interface builder. But it’s not that hard to make it in code. You want to add a scroll view to the middle of your screen, in your view controller.m file: – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. NSLog(@”viewDidLoad”); scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0.0, 107.0,

Fastest Loops in Javascript

I’m always interesting in Javascript and which constructs perform better than others. There are alot of funky things about this language, but for loops always seem to be a moving target for me. I tend to stick with the regular var i = 0 loop, because it’s easy to understand: for(var i = 0, l = something.length; i < l,

Launch At Login Cocoa

recently I needed something that launched itself when a user logs in or restarts their computer. Found this nifty little library: https://github.com/biocross/LaunchAtLoginController–with-ARC- Basically, you load those two files into xcode, the do the following: Hook a button or segmented control up to an IBAction in the action load the launchController set the launch controller to launch at startup profit In reality

How the F*** to Encode URL in Objective-C for IOS

Google it. You’ll find there are a ton of solutions, all of them produce memory related errors because of ARC. if you want to do it in a way that works, just: NSString *charactersToEscape = @”!*'();:@&=+$,/?%#[]” “; NSCharacterSet *allowedCharacters = [[NSCharacterSet characterSetWithCharactersInString:charactersToEscape] invertedSet]; NSString *url = [NSString stringWithFormat:@”%@”, @”http://stuff.com/things/”]; NSString *encodedUrl = [url stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacters]; Jesus…this took me way too long

Doritos Bold Stage

How do you make 70,000 people at SXSW care about a chip brand? Produce three days of can’t-miss performances, all inside the world’s largest vending machine. That’s exactly what we did. I was pulled in last minute to help make the control software that would allow users to go up on stage, select a bag and try to catch it as it

Adobe Remix

Our team was asked to take part in the Adobe Remix project, a showcase of creative interpretations of the Adobe logo. We wanted to highlight the creative activity that adobe products enable. So we re-created Adobe’s logo as a physical installation with 100 handmade cubes, each one correlating to an artist using Adobe software in real time. Each cube captures a single pixel from an

OMG OMG Tail?

So I have been trying to watch for a successful file upload in NodeJS for a while. Sure, you can use something inotify, but the process is heavy when all your looking to do is emit an event in NodeJS when a file is successfully uploaded to a directory on your server. For starters, I have vsftpd running on an

Can’t Connect Workbench to Amazon RDS

well shit… This one took me about 45 minutes. Kept getting hanging errors while trying to connect mysql workbench to amazon’s RDS services. So here’s what I did. Not sure what fixed it. I followed the tutorial here: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithSecurityGroups.html And then added a rule (which is probably really dangerous): CIDR/IP: 0.0.0.0/0 to allo connections from all sources. Woohoo! it works.

How to search Mint.com For Transactions During Tax Time

Ok, this isn’t really coding… but still a great way to gather your deductions for tax time prep and shit. First off, search by URL: https://wwws.mint.com/transaction.event?query=category:”13″&startDate=01/01/2013&endDate=01/01/2014&exclHidden=T This says, search category 13 (which I think is internet related stuff) from 1/1/2013 to 1/1/2014. It will give you the full report. Then if you want to exclude certain items in the category,