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
AFHTTPClient *client = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:@"http://www.apple.com"]]; | |
[client setReachabilityStatusChangeBlock:^(BOOL isNetworkReachable) { | |
NSLog(@"Reachable %i", isNetworkReachable); | |
}]; |
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
resources :zones do | |
resources :users, :module => "zones" | |
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
self.roles.each do |r| | |
define_method "#{r}?" do | |
role == r | |
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
SecureRandom.base64(5).tr('+/=lIO0', 'pqrsxyz') |
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 AppDelegate | |
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { | |
[NSApp setServicesProvider:[MyService new]]; | |
... |
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
pg_dump databas > dump.sql |
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
UserInterfaceState.xcuserstate | |
car-sharing-ios.xcodeproj/project.xcworkspace/xcuserdata/fousa.xcuserdatad/UserInterfaceState.xcuserstate |
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
Devise.friendly_token |
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
.ring { | |
border: 3px solid #999; | |
-webkit-border-radius: 30px; | |
height: 40px; | |
width: 40px; | |
position: fixed; | |
top: 45%; | |
left: 45%; |
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
+ (MyClass *)sharedInstance { | |
static dispatch_once_t _predicate; | |
static MyClass *_sharedInstance = nil; | |
dispatch_once(&_predicate, ^{ | |
_sharedInstance = [self new]; | |
}); | |
return _sharedInstance; | |
} |