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)controllerWillChangeContent:(NSFetchedResultsController *)controller | |
{ | |
self.shouldReloadCollectionView = NO; | |
self.blockOperation = [[NSBlockOperation alloc] init]; | |
} | |
- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id<NSFetchedResultsSectionInfo>)sectionInfo | |
atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type | |
{ | |
__weak UICollectionView *collectionView = self.collectionView; |
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
ubuntu@ip-10-123-151-236:~$ cat beanstalk-purge | |
#!/usr/bin/expect -f | |
# Filename: beanstalk-purge | |
set timeout 1 | |
spawn telnet [lindex $argv 0] [lindex $argv 1] | |
sleep 1 | |
send "use [lindex $argv 2]\n" | |
expect "USING" |
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
%w(app as).each do |role| | |
desc "Adds #{role} to the target roles for the task" | |
task(role) do | |
if ENV['ROLES'] | |
ENV['ROLES'] += ",#{role}" | |
else | |
ENV['ROLES'] = role | |
end | |
end | |
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
NSSortDescriptor* sortByDate = [NSSortDescriptor sortDescriptorWithKey:@"createdDate" ascending:NO]; | |
allReminders = [allReminders sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortByDate]]; | |
self.reminders = [NSMutableArray arrayWithArray:allReminders]; |
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
# This gist is a small recipe for temporarily making your Lion box point to GCC 4.2 instead of LLVM, like for things such as Ruby, which isn't yet made to compile on the newer and better LLVM | |
# First make sure you've installed Command Line Tools from Xcode 4.3 preferences | |
cd /usr/bin/ | |
ls -l *gcc* | |
# Important: Only do this if gcc is a symlink to llvm! if not, this gist isn't the way to go! :) | |
# It should look like this: |