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 ([PFUser currentUser]) { | |
PFInstallation *currentInstallation = [PFInstallation currentInstallation]; | |
NSString *userId = currentInstallation[@"installationUser"]; | |
if (![userId isEqualToString:[[PFUser currentUser] objectId]]) { | |
currentInstallation[@"installationUser"] = [[PFUser currentUser] objectId]; | |
[currentInstallation saveEventually]; | |
} | |
} |
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)logInWithTwitter | |
{ | |
[PFTwitterUtils logInWithBlock:^(PFUser *user, NSError *error) { | |
if (error) { | |
NSLog(@"Failed to login with Twitter.."); | |
} else if (user.isNew) { | |
// Get information for new user | |
NSURL *verify = [NSURL URLWithString:@"https://api.twitter.com/1.1/account/verify_credentials.json"]; | |
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:verify]; |
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
label.font = [UIFont fontWithName:@"GillSans-Bold" size:28.0f]; // GilSans-Bold size 28 font | |
label.shadowColor = [UIColor blackColor]; // Black shadow color | |
label.shadowOffset = CGSizeMake(2.0f, 2.0f); // Width and height of the shadow offset | |
label.layer.shadowRadius = 1.0f; // The blur radius (in points) used to render the layer’s shadow | |
label.layer.shadowOpacity = 1.0f; // The opacity of the layer’s shadow |
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
// The %@ characters are placeholders for the string. | |
http://amdlasers.com/posttest/index.php?name=%@ %@ %@ %@&email=%@&address=%@&city=%@&state=%@&country=%@&zip=%@&phone=%@&fax=%@&date=%@&score=%f&ipad=%@&businessName=%@&serialNum=%@&licenseNum=%@ |
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
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation | |
{ | |
NSString *urlString = [url absoluteString]; | |
if ([urlString rangeOfString:@"from-dealer"].location != NSNotFound) { | |
NSLog(@"This application was launched from the dealer app!"); | |
return YES; | |
} | |
return NO; | |
} |
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
// To obtain the current location... | |
[PFGeoPoint geoPointForCurrentLocationInBackground:^(PFGeoPoint *geoPoint, NSError *error) { | |
if (error) { | |
// Unable to get user's location... | |
} else { | |
MKAnnotation *annotation = [[MKAnnotation alloc] init]; | |
annotation.coordinate = CLLocationCoordinate2DMake(geoPoint.latitude, geoPoint.longitude); | |
annotation.title = @"My location!"; |
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
Last login: Mon Nov 11 22:42:37 on ttys001 | |
-bash: /etc/profile.d/rvm.sh: No such file or directory | |
Michaels-MacBook-Air-3:~ mafellow$ gem install mechanize | |
ERROR: While executing gem ... (Gem::FilePermissionError) | |
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. | |
Michaels-MacBook-Air-3:~ mafellow$ | |
NewerOlder