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
$( ".delete-confirm" ).on('click', function(e) { | |
var input = $(this); | |
var form = input.next(); | |
e.preventDefault(); | |
bsconfirm.confirm(function(confirmed){ | |
if(confirmed){ | |
form.submit(); | |
} |
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
/* | |
|-------------------------------------------------------------------------- | |
| Detect The Application Environment | |
|-------------------------------------------------------------------------- | |
| | |
| Laravel takes a dead simple approach to your application environments | |
| so you can just specify a machine name for the host that matches a | |
| given environment, then we will automatically detect it for you. | |
| | |
*/ |
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
Event::listen('github.webhook', function($payload) | |
{ | |
Log::info('Github Webhook Push Event fired'); | |
Log::info('Deploying new code because of a commit push by ' . $payload->head_commit->author->name); | |
Log::info('Deploying commit ID : ' . $payload->after); | |
// really only need to use this if you have ngrok running and testing the webhook code. | |
if (App::environment('local')) | |
{ |
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
NSMutableIndexSet *mutableIndexSet = [[NSMutableIndexSet alloc] initWithIndexesInRange:NSMakeRange(200, 100)]; | |
[mutableIndexSet addIndex:401]; | |
[mutableIndexSet addIndex:403]; | |
_sharedClient.responseSerializer.acceptableStatusCodes = mutableIndexSet; |
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
failure:^(NSURLSessionDataTask *task, NSError *error) { | |
//convert error.data back to json | |
NSError* jsonerror; | |
NSDictionary* json = [NSJSONSerialization | |
JSONObjectWithData:error.userInfo[@"com.alamofire.serialization.response.error.data"] //1 | |
options:kNilOptions | |
error:&jsonerror]; | |
NSLog(@"json response data %@",json); | |
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)highlightControl: (UITextField *) textField{ | |
; | |
// textField.layer.cornerRadius = 5; | |
// textField.clipsToBounds = YES; | |
// textField.layer.borderWidth = 1; | |
// textField.layer.borderColor =[[UIColor redColor] CGColor]; | |
textField.layer.masksToBounds = NO; | |
textField.layer.shadowColor = [[UIColor redColor] CGColor]; | |
textField.layer.shadowOffset = CGSizeZero; |
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
if (UIDeviceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) { | |
flowLayout.itemSize = CGSizeMake(115.f, 115.f); | |
} else { | |
flowLayout.itemSize = CGSizeMake(105.f, 105.f); | |
} |
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)viewWillLayoutSubviews; | |
{ | |
[super viewWillLayoutSubviews]; | |
UICollectionViewFlowLayout *flowLayout = (id)self.collectionViewLayout; | |
// really should get this value from the Photo class, but for now max thumb of 110px. | |
CGFloat cellSize = [self calculateCellSizeForMaxImageWidth:110]; | |
flowLayout.itemSize = CGSizeMake(cellSize, cellSize); | |
} |
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
#import "DebugTableViewController.h" | |
#import <ZipArchive/ZipArchive.h> | |
#import <MessageUI/MessageUI.h> | |
@interface DebugTableViewController ()<MFMailComposeViewControllerDelegate> | |
@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
// | |
// Logging.h | |
// | |
#import <CocoaLumberjack/CocoaLumberjack.h> | |
// | |
//typedef NS_ENUM(NSUInteger, DDLogLevel) { | |
// DDLogLevelOff = 0, | |
// DDLogLevelError = (DDLogFlagError), // 0...00001 | |
// DDLogLevelWarning = (DDLogLevelError | DDLogFlagWarning), // 0...00011 | |
// DDLogLevelInfo = (DDLogLevelWarning | DDLogFlagInfo), // 0...00111 |