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
Notice for building Custom Keyboard App using Jenkins and xctools | |
# please use $(BUILT_PRODUCTS_DIR) as Installation Directory on Build Settings | |
# please specify $(SDKROOT)/ResourceRules.plist as Code Signing Resource Rules Path | |
# use 2 prov profile: containing app and custom keyboard extension |
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
// iOS 7+ | |
// on custom cell | |
- (void)awakeFromNib // or layoutSubviews | |
{ | |
// make table separator without any indent | |
if ([self respondsToSelector:@selector(setLayoutMargins:)]) { | |
self.layoutMargins = UIEdgeInsetsZero; | |
} |
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
#!/bin/sh | |
# | |
# Simple script for uploading binaries to Fabric (d/h Crashlytics) | |
# | |
# written by @taufik_obet | |
# modified for pushing to fabric by @hismamaz | |
# | |
# |
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 download | |
# curl -o Podfile https://gist.githubusercontent.com/mamaz/87909165fd6a5c496a6c/raw/dddf4aad97ecfda42ade1e0cc216fc8cad14e000/Podfile | |
platform :ios, '8.0' | |
inhibit_all_warnings! | |
source 'https://github.com/CocoaPods/Specs.git' | |
pod 'AFNetworking', '2.5.2' |
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)registerForPushNotifications | |
{ | |
UIApplication *sharedApplication = [UIApplication sharedApplication]; | |
if ([sharedApplication respondsToSelector:@selector(registerUserNotificationSettings:)]) { | |
UIUserNotificationType type = (UIUserNotificationTypeSound|UIUserNotificationTypeAlert|UIUserNotificationTypeBadge); | |
UIUserNotificationSettings *notificationSettings = [UIUserNotificationSettings settingsForTypes:type | |
categories:nil]; | |
[sharedApplication registerUserNotificationSettings:notificationSettings]; |
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
// on VC | |
// remove spacing | |
if ([self.table respondsToSelector:@selector(setSeparatorInset:)]) { // Safety check for below iOS 7 | |
[self.table setSeparatorInset:UIEdgeInsetsZero]; | |
} | |
// on custom cell subclass | |
- (UIEdgeInsets)layoutMargins | |
{ | |
return UIEdgeInsetsZero; |
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
// source: | |
// http://stackoverflow.com/a/12664093/1328982 | |
// credits to: Gervasio Marchand | |
- (void)moveBannerOffScreen { | |
[self.view layoutIfNeeded]; | |
[self.childView mas_remakeConstraints:(MASConstraint* make){ | |
make.top.mas_equal(0); | |
make.left.mas_equal(0); |
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
// make sure one cell has one subscriber | |
[[thumbnailCell.checkMarkSignals | |
takeUntil:cell.rac_prepareForReuseSignal] | |
subscribeNext:^(id x) {}]; |
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
var assert = require('assert'); | |
var async = require('asyncawait/async'); | |
var await = require('asyncawait/await'); | |
describe('hooks', function() { | |
before(function() { | |
// runs before all tests in this block | |
}); |
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
/^http:\/\/|(www\.)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/ |