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
## php | |
function number_of_items(){ | |
$count = 0; | |
foreach ($this->queries as $query) { | |
$count += sizeof($query->items); | |
} | |
return $count; | |
} |
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
ruby - use the one on leopard | |
gems - sudo gem update --system | |
rails - sudo gem install rails | |
mongrel - sudo gem install mongrel | |
subversion - use the one on leopard | |
git - http://git-osx-installer.googlecode.com/files/git-1.5.6.4-intel-leopard.dmg (http://code.google.com/p/git-osx-installer/) | |
mysql - http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51b-osx10.5-x86.dmg/from/http://mysql.osuosl.org/ | |
postgres - on your own but i'm sure theres an installer, avoid macports at all costs, use google! | |
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
~/media/movies/downloading | |
~/media/movies/movies | |
~/media/tv/downloading | |
~/media/tv/tv | |
~/media/tv/full seasons | |
~/media/tv/full seasons/the office/season 2/1x02.avi | |
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
# index | |
@downloads = get_downloads | |
# PYROT AND NEWZBIN STUFF | |
def get_pyrot | |
@pyrot = Pyrot.new(:url => current_user.pyrot_url, :path => '/xmlrpc', :port => current_user.pyrot_port) | |
end |
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
rake aborted! | |
You have a nil object when you didn't expect it! | |
You might have expected an instance of Array. | |
The error occurred while evaluating nil.length | |
/Users/jmaddox/source/github/vendor/plugins/fixture_scenarios/tasks/fixture_scenarios_tasks.rake:39 | |
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
// | |
// DataSrc.m | |
// summizer | |
// | |
// Created by Jon Maddox on 8/6/08. | |
// Copyright 2008 Mustache, Inc.. All rights reserved. | |
// | |
#import "DataSrc.h" | |
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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
static NSString *MyIdentifier = @"MyIdentifier"; | |
TweetCell *cell = (TweetCell *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier]; | |
if (cell == nil) { | |
cell = [[[TweetCell alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease]; | |
} | |
// SummizerAppDelegate *appDelegate = (SummizerAppDelegate *)[[UIApplication sharedApplication] delegate]; |
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
if (self.tweetView == nil){ | |
TweetViewController *viewController = [[TweetViewController alloc] initWithNibName:@"TweetView" bundle:[NSBundle mainBundle]]; | |
self.tweetView = viewController; | |
[viewController release]; | |
} | |
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
NSURL *jsonURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://search.twitter.com/search.json?q=%@", (NSString *)[appDelegate.trends objectAtIndex:indexPath.row]]]; | |
NSString *jsonData = [[NSString alloc] initWithContentsOfURL:jsonURL]; | |
self.tweetView.jsonArray = [[jsonData JSONValue] objectForKey:@"results"]; | |
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
//determine height of label | |
CGSize size = CGSizeMake(240.0,1000.0); | |
size = [[NSString stringWithFormat:@"%@: %@", [tweetResult objectForKey:@"from_user"], [tweetResult objectForKey:@"text"]] sizeWithFont:[UIFont systemFontOfSize:14.0] constrainedToSize:size lineBreakMode:UILineBreakModeWordWrap]; | |