Skip to content

Instantly share code, notes, and snippets.

View rqreyes's full-sized avatar

Randy Reyes rqreyes

View GitHub Profile
@rqreyes
rqreyes / .htaccess
Last active November 22, 2017 01:00 — forked from cmg-jess/Page Speed Insights
leverage browser caching and enable gzip compression
## LEVERAGE BROWSER CACHING ##
## https://gtmetrix.com/leverage-browser-caching.html ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
@rqreyes
rqreyes / functions.php
Last active February 23, 2016 22:51 — forked from cmg-jess/Version Control Notice
wordpress admin notice
#the infomration in this notice MUST BE CUSTOMIZED PER SITE
#If the CMG JS has not been updated to CDN OR is NOT enqueued, leave a note for Victoria so a task can be created or so she can give you approval to swap it out
#If SCSS/Foundation or Shared Hosting does not apply to the site, it can be left out of the the admin notice
// Admin Notice
function your_admin_notice(){
echo '<div class="update-nag">
<p>Version Control is <span style="color:green; font-weight: bold;">ACTIVE</span> for this site.</p>
<p>Mobile Site: <span style="color:green; font-weight: bold;">YES - Responsive/Theme Switcher/Third Party</span> / <span style="color:red; font-style:italic;">NO</span></p>
<p>CMG CDN JS Enqueued: <span style="color:green; font-weight: bold;">YES</span> / <span style="color:red; font-style:italic;">NO - Enqueued, Not CDN OR CDN, Not enqueued</span></p>
@rqreyes
rqreyes / functions.php
Last active March 11, 2016 02:29 — forked from cmg-jess/CMG JS Enqueue
cmg form script enqueue
#add to an existing enqueue function
wp_enqueue_script( 'cmg-form-js', 'https://dil34hcn6yju7.cloudfront.net/assets/cmgform.js', null, null, false );
#add a separate enqueue function
// CMG Form Script
function cmg_cdn_script() {
wp_enqueue_script( 'cmg-form-js', 'https://dil34hcn6yju7.cloudfront.net/assets/cmgform.js', null, null, false );
}
add_action( 'wp_enqueue_scripts', 'cmg_cdn_script' );