Skip to content

Instantly share code, notes, and snippets.

View sean-gilmore's full-sized avatar
🥦

Sean sean-gilmore

🥦
View GitHub Profile
{
"Version": "2008-10-17",
"Statement": [{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": { "AWS": "*" },
"Action": ["s3:GetObject"],
"Resource": ["arn:aws:s3:::bucket-name/*" ]
}]
}
@sean-gilmore
sean-gilmore / simple-wordpress-breadcrumb.php
Created May 28, 2017 11:50
Paste this inside the functions.php file, call on page, pass in page id
<?php
function the_breadcrumb($id) {
$result= "";
if($id == 0) {
echo '<a href="' . get_permalink(get_option( 'page_on_front' )) . '">Home</a>';
} else if (get_post_type($id) == "team") {
$parent = get_page_by_title("Meet Our Team")->ID;
$result.= the_breadcrumb($parent);
echo '<a href="' . get_permalink($id) . '">' . get_the_title($id) . '</a>';
} else {
@sean-gilmore
sean-gilmore / htaccess gzip and browser caching
Last active August 29, 2018 03:32
htaccess gzip and browser caching
# Enable Compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf