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
<?php echo $_SERVER['HTTP_HOST']; |
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
<?php | |
/** | |
* Super-simple AWS CloudFront Invalidation Script | |
* | |
* Steps: | |
* 1. Set your AWS access_key | |
* 2. Set your AWS secret_key | |
* 3. Set your CloudFront Distribution ID | |
* 4. Define the batch of paths to invalidate | |
* 5. Run it on the command-line with: php cf-invalidate.php |
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
/** | |
* @param $app | |
* @return int: | |
* -4: Error | |
* -3: Googlebot | |
* -2: Found locally, not a VPN | |
* -1: Looked up, not a VPN | |
* 1: Looked up, VPN | |
* 2: Found locally, VPN | |
*/ |
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
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; | |
AFHTTPSessionManager *_afHTTPSessionManager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:configuration]; | |
// set your response content type here | |
NSMutableSet *contentTypes = [[NSMutableSet alloc] init]; | |
[contentTypes addObject:@"application/json"]; | |
_afHTTPSessionManager.responseSerializer.acceptableContentTypes = contentTypes; | |
[_afHTTPSessionManager.requestSerializer setAuthorizationHeaderFieldWithUsername:username password:password]; |