This file contains hidden or 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 generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains hidden or 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 MySharedThing | |
+ (id)sharedInstance | |
{ | |
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{ | |
return [[self alloc] init]; | |
}); | |
} | |
@end |
This file contains hidden or 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)scrollWithOffset:(CGSize)offset animated:(BOOL)animated | |
{ | |
MKMapPoint centerMapPoint = MKMapPointForCoordinate(self.centerCoordinate); | |
CGPoint centerPoint = [self convertCoordinate:self.centerCoordinate toPointToView:self]; | |
CGPoint destinationPoint = CGPointMake(centerPoint.x+offset.width, centerPoint.y+offset.height); | |
CLLocationCoordinate2D destinationCoordinate = [self convertPoint:destinationPoint toCoordinateFromView:self]; | |
MKMapPoint destMapPoint = MKMapPointForCoordinate(destinationCoordinate); | |
MKMapRect mapRect = self.visibleMapRect; |