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
extern NSString * const <# value #>; |
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
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"XibFileName" owner:self options:nil]; | |
UIView *view = [nib objectAtIndex:0]; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
- (CGSize)collectionView:(UICollectionView*)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
return CGSizeMake(160.0f, 160.0f); | |
} | |
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section | |
{ | |
return UIEdgeInsetsMake(0.0f, 0.0f, 0.0f, 0.0f); | |
} |
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
[user] | |
name = xxx | |
email = xxx@xxx.xxx | |
[color] | |
ui = auto | |
[alias] | |
di = diff | |
st = status | |
co = checkout | |
graph = log --graph --date=short --decorate=short --pretty=format:'%Cgreen%h %Creset%cd %Cblue%cn %Cred%d %Creset%s' |
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
# Podfile | |
target :XXXIntegrationTests do | |
pod 'KIF' | |
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
IDMPhoto *photo = [IDMPhoto photoWithImage:self.floorImage.image]; | |
IDMPhotoBrowser *browser = [[IDMPhotoBrowser alloc] initWithPhotos:[NSArray arrayWithObject:photo] | |
animatedFromView:self.floorImage]; | |
browser.delegate = self; | |
browser.displayToolbar = NO; | |
browser.displayActionButton = NO; | |
browser.displayArrowButton = NO; | |
browser.displayCounterLabel = YES; | |
[self presentViewController:browser animated:YES completion: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
$ openssl pkcs12 -clcerts -nokeys -out apns_dev_cert.pem -in apns_dev.p12 | |
$ openssl pkcs12 -nocerts -out apns_dev_key.pem -in apns_dev.p12 | |
$ openssl rsa -in apns_dev_key.pem -out apns_dev_nopass_key.pem | |
$ cat apns_dev_cert.pem apns_dev_nopass_key.pem > apns_dev.pem |
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
function sendPushNotification() | |
{ | |
$deviceToken = '<64桁のデバイストークン>'; | |
// Push通知で表示するメッセージ | |
$alert = 'Push通知を送信しました'; | |
// Push通知受け取り時、アイコンに表示するバッジの数字 | |
$badge = 1; |
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
UIImageWriteToSavedPhotosAlbum(image, self, nil, nil); |