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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor1", | |
"Effect": "Allow", | |
"Action": [ | |
"rekognition:DetectLabels", | |
"rekognition:GetCelebrityRecognition", | |
"rekognition:GetContentModeration", |
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
<?php | |
add_filter('ilab-imgix-filter-parameters', function($params, $size, $id, $meta) { | |
// $params contains the imgix parameters | |
// $size is either an array of two numbers for width/height, or it is the name of a size | |
// $id is the attachment ID | |
// $meta is the attachment's meta | |
if (!is_array($size) && ($size == 'download')) { | |
// Full size |
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
[ | |
{ | |
"origin": ["https://yourdomain.com"], | |
"responseHeader": ["*"], | |
"method": ["GET", "HEAD", "DELETE", "POST", "PUT", "OPTIONS"], | |
"maxAgeSeconds": 3600 | |
} | |
] |
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
<?php | |
function fixJobAttachmentURL($parentPostID, $url) { | |
global $wpdb; | |
$path = parse_url($url, PHP_URL_PATH); | |
$imageName = basename($path); | |
$query = $wpdb->prepare("select ID from {$wpdb->posts} where guid like %s and post_type='attachment' and post_parent=%d order by ID desc limit 1", '%'.$wpdb->esc_like($imageName), $parentPostID); | |
$attachmentID = $wpdb->get_var($query); |
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
<?php | |
add_filter('ilab_s3_can_calculate_srcset', function($true) { | |
return false; | |
}); | |
add_filter('ilab_media_cloud_filter_content', function($true) { | |
return false; | |
}); |
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
<?php | |
// Add to your functions.php | |
// Disable SRCSET | |
add_filter('wp_get_attachment_image_attributes', function($attr) { | |
if (isset($attr['sizes'])) { | |
unset($attr['sizes']); | |
} | |
if (isset($attr['srcset'])) { |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:GetObject", | |
"s3:ListBucket", | |
"s3:GetBucketLocation" | |
], |
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
[ | |
{ | |
"AllowedHeaders": [ | |
"*" | |
], | |
"AllowedMethods": [ | |
"GET", | |
"PUT", | |
"POST", | |
"HEAD" |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:DeleteObjectTagging", | |
"s3:ListBucketMultipartUploads", | |
"s3:DeleteObjectVersion", | |
"s3:ListBucket", |
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 AVFoundation; | |
@import AVKit; | |
AVQueuePlayer *player = [[AVQueuePlayer alloc] init]; | |
AVPlayerLayer *playerLayer = [AVPlayerLayer playerLayerWithPlayer:player]; | |
playerLayer.frame = self.bounds; | |
playerLayer.videoGravity = AVLayerVideoGravityResizeAspectFill; | |
[self.layer addSublayer:playerLayer]; |
NewerOlder