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
### Keybase proof | |
I hereby claim: | |
* I am kiranpanesar on github. | |
* I am k_panesar (https://keybase.io/k_panesar) on keybase. | |
* I have a public key ASByGzsAJQrCaws76P0ZOHn8Tt8OLxtFjPAfO4LDdCNMaAo | |
To claim this, I am signing this object: |
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
class ApplicationController < ActionController::Base | |
before_action :skip_session | |
private | |
def skip_session | |
if request.format == :json | |
request.session_options[:skip] = true | |
end | |
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
// | |
// NTVImageView.h | |
// | |
// Created by kiran on 27/10/2015. | |
// | |
#import <UIKit/UIKit.h> | |
@interface NTVImageView : UIImageView |
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
NSError *categoryError; | |
NSError *activationError; | |
AVAudioSession *audioSession = [AVAudioSession sharedInstance]; | |
BOOL successfulCategory = [audioSession setCategory:AVAudioSessionCategorySoloAmbient error:&categoryError]; | |
BOOL successfulActivation = [audioSession setActive:YES error:&activationError]; | |
NSLog(@"Category: Error: %@. Success: %@", categoryError, [NSNumber numberWithBool:successfulCategory]); | |
NSLog(@"Category: Error: %@. Success: %@", activationError, [NSNumber numberWithBool:successfulActivation]); | |
AVPlayerItem *item = [[AVPlayerItem alloc] initWithURL:[[NSBundle mainBundle] URLForResource:@"trax" |
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
{ | |
"user_id": 1231, | |
"body": { | |
// The values for the user that are to be changed. | |
} | |
} |
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
{ | |
"location": { | |
"lat": "23.02", | |
"lon": "20.1", | |
"title":"Da Hood" | |
}, | |
"about_title": "About Us", | |
"description": "This is a small text piece about the user. It can be multiple lines blah blah", | |
"button": { | |
"title": "View Online", |
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)updateReaderDocument:(ReaderDocument *)object { | |
// Remove all the subviews | |
[[self.view subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; | |
document = object; // Update the PDF document | |
[object updateProperties]; // Update the properties | |
[ReaderThumbCache touchThumbCacheWithGUID:object.guid]; // Reload thumb images | |
// Set up all subviews and trigger all other set up | |
[self viewDidLoad]; |