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
# For nginx -- goes in the /sites-available/domainnamehere.com file | |
location ~ /\.git { | |
return 404; | |
#deny all; | |
} | |
# or, all . directories/files in general (including .htaccess, etc) | |
# i like to use 'deny all' for all . files ~mj | |
location ~ /\. { |
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
RENAME table `wp_commentmeta` TO `wp_localapi_commentmeta`; | |
RENAME table `wp_comments` TO `wp_localapi_comments`; | |
RENAME table `wp_links` TO `wp_localapi_links`; | |
RENAME table `wp_options` TO `wp_localapi_options`; | |
RENAME table `wp_postmeta` TO `wp_localapi_postmeta`; | |
RENAME table `wp_posts` TO `wp_localapi_posts`; | |
RENAME table `wp_terms` TO `wp_localapi_terms`; | |
RENAME table `wp_termmeta` TO `wp_localapi_termmeta`; | |
RENAME table `wp_term_relationships` TO `wp_localapi_term_relationships`; | |
RENAME table `wp_term_taxonomy` TO `wp_localapi_term_taxonomy`; |
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
// thank you https://ariasthompson.com/2018/02/08/adding-instagram-feed-website-without-plugin/ | |
// for the basis of this feed grab | |
var getInstagramFeed = function () { | |
var request = new XMLHttpRequest(); | |
var token = 'ACCESS_TOKEN'; | |
var count = 3; | |
request.open('GET', 'https://api.instagram.com/v1/users/self/media/recent/?access_token='+token+'&count='+count, true); | |
request.onload = function(container) { |
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 // WordPress Stuffs! | |
// Add this to functions.php | |
// for removing password protected posts from the Loop | |
function wpb_password_post_filter( $where = '' ) { | |
if (!is_single() && !is_admin()) { | |
$where .= " AND post_password = ''"; | |
} | |
return $where; | |
} |
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
// Checks if on mobile device | |
// Changes link to go to Google Maps | |
// Which should open automatically in Apple or Google Maps on Android/iOS device ~mj | |
function mobileMapClicker() { | |
console.log(navigator.userAgent); | |
// Checks userAgent if mobile device | |
if (/Mobi/.test(navigator.userAgent)) { | |
console.log('Mobile Device Detected!'); | |
/* if we're on iOS, open in Apple Maps */ |
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
echo "<pre>"; print_r( get_defined_functions() ); |
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
# 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 |
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
# Thank you to this gist for some edits (check history! lol) https://gist.github.com/Zodiac1978/3145830 | |
# Leverage Browser Caching | |
# Fonts | |
# Add correct content-type for fonts | |
AddType application/vnd.ms-fontobject .eot | |
AddType application/x-font-ttf .ttf | |
AddType application/x-font-opentype .otf | |
AddType application/x-font-woff .woff | |
AddType image/svg+xml .svg |
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
<Directory /var/www/html/> | |
<IfModule mod_mime.c> | |
AddType application/x-javascript .js | |
AddType text/css .css | |
</IfModule> | |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/plain text/xml application/javascript | |
<IfModule mod_setenvif.c> | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4.0[678] no-gzip |
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
!function(e,t){"use strict";function n(e){var t=e.length,n=K.type(e);return!K.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)))}function r(e,n,r,i){if(K.acceptData(e)){var a,o,s=K.expando,u="string"==typeof n,l=e.nodeType,c=l?K.cache:e,d=l?e[s]:e[s]&&s;if(d&&c[d]&&(i||c[d].data)||!u||r!==t)return d||(l?e[s]=d=$.pop()||K.guid++:d=s),c[d]||(c[d]={},l||(c[d].toJSON=K.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[d]=K.extend(c[d],n):c[d].data=K.extend(c[d].data,n)),a=c[d],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[K.camelCase(n)]=r),u?(o=a[n],null==o&&(o=a[K.camelCase(n)])):o=a,o}}function i(e,t,n){if(K.acceptData(e)){var r,i,a,s=e.nodeType,u=s?K.cache:e,l=s?e[K.expando]:K.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){K.isArray(t)?t=t.concat(K.map(t,K.camelCase)):t in r?t=[t]:t=(t=K.camelCase(t))in r?[t]:t.split(" ");for(i=0,a=t.length;a>i;i++)delete r[t[i]];if(!(n?o:K.isEmptyObject)(r))return}(n||(delete u[l].data,o(u[l])))&&(s?K.cleanData([ |