Moved to proper GitHub repo
After upgrading to Mountain Lion, I got this message when trying to run my local rails server:
Installing rmagick (2.13.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
Users/user/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby extconf.rb
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
@implementation NSManagedObject (TCCreation) | |
+ (instancetype)tc_insertIntoContext:(NSManagedObjectContext*)ctx | |
{ | |
for(NSEntityDescription *desc in [ctx.persistentStoreCoordinator.managedObjectModel entities]) { | |
if([desc.managedObjectClassName isEqual:NSStringFromClass(self)]) { | |
return [[self alloc] initWithEntity:desc insertIntoManagedObjectContext:ctx]; | |
} | |
} | |
NSAssert(NO, @"This class does not exist in the managed object model for %@", ctx); | |
return nil; |
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
import Darwin | |
import CoreFoundation.CFDate | |
protocol NumberGeneratorType { | |
mutating func generateNumber() -> Int | |
} | |
struct RandomGenerator: NumberGeneratorType { | |
func generateNumber() -> Int { | |
return Int(arc4random_uniform(10)) |
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
/* | |
Copyright (c) 2011-present, NimbusKit. All rights reserved. | |
This source code is licensed under the BSD-style license found at http://nimbuskit.info/license | |
Extracted from NimbusKit: Swift Edition at https://github.com/nimbuskit/swift | |
*/ | |
extension NSNotificationCenter { | |
/** |
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
import Foundation | |
protocol SomeDelegateProtocol : class { | |
func firstFunc() -> String | |
func secondFunc() -> Bool | |
func thirdFunc() -> Self | |
} | |
class MyClass { | |
weak var delegate : SomeDelegateProtocol? |
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
#!/bin/sh | |
# ID='A16FF353-8441-459E-A50C-B071F53F51B7' # Xcode 6.2 | |
# ID='992275C1-432A-4CF7-B659-D84ED6D42D3F' # Xcode 6.3 | |
# ID='AABB7188-E14E-4433-AD3B-5CD791EAD9A3' # Xcode 7b5 | |
# ID='7265231C-39B4-402C-89E1-16167C4CC990' #Xcode 7.1.1 | |
ID='F41BD31E-2683-44B8-AE7F-5F09E919790E' # Xcode 7.2 | |
PLIST_BUDDY=/usr/libexec/PlistBuddy |
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
// We're going to try to build a collectionview layout engine that can serve up cells and supplementary views | |
// in a generic way. I haven't built this all the way to the collection view, and I don't konw what the real | |
// brief is, so there may be lots of gotchas here that don't work as desired, but it scopes out several ways | |
// to get a handle on the problem and how I'd at least probably start. | |
// Ultimately, this requires converting (Model, IndexPath) -> Cell and (Model, IndexPath) -> SupView. I'm | |
// assuming that's the only feature of these factories. |
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
SELECT pods.name, stats_metrics.download_total, stats_metrics.download_week, stats_metrics.app_total, stats_metrics.app_week FROM stats_metrics JOIN pods ON stats_metrics.pod_id = pods.id ORDER BY app_total DESC LIMIT 300; |
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
// Photoshop Script to Create iPhone Icons from iTunesArtwork // // WARNING!!! In the rare case that there are name collisions, this script will // overwrite (delete perminently) files in the same folder in which the selected // iTunesArtwork file is located. Therefore, to be safe, before running the // script, it's best to make sure the selected iTuensArtwork file is the only // file in its containing folder. // // Copyright (c) 2010 Matt Di Pasquale // Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and |
OlderNewer