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
### BOOST START ### | |
# Allow for alt paths to be set via htaccess rules; allows for cached variants (future mobile support) | |
RewriteRule .* - [E=boostpath:normal] | |
# Caching for anonymous users | |
# Skip boost IF not get request OR uri has wrong dir OR cookie is set OR request came from this server OR https request | |
RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [OR] | |
RewriteCond %{REQUEST_URI} (^/(admin|cache|misc|modules|sites|system|openid|themes|node/add|comment/reply))|(/(edit|user|user/(login|password|register))$) [OR] | |
RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR] |
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
From 924fca618c5f2754c48bc76d8b9f87cc4e3adbd7 Mon Sep 17 00:00:00 2001 | |
From: Mark Carver <[email protected]> | |
Date: Thu, 24 Jan 2019 13:15:35 -0600 | |
Subject: [PATCH] Issue #3027569 by markcarver, just_like_good_vibes: Error: | |
Unsupported operand types during providers JSON discovery | |
--- | |
includes/cdn.inc | 39 +++++++++++++++++++++------------------ | |
1 file changed, 21 insertions(+), 18 deletions(-) |
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
/** | |
* JavaScript Get URL Parameter via https://www.kevinleary.net/javascript-get-url-parameters/ | |
* | |
* @param String prop The specific URL parameter you want to retreive the value for | |
* @return String|Object If prop is provided a string value is returned, otherwise an object of all properties is returned | |
*/ | |
function getUrlParams( prop ) { | |
var params = {}; | |
var search = decodeURIComponent( window.location.href.slice( window.location.href.indexOf( '?' ) + 1 ) ); |
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 | |
// fix for broken dpm() output with bootstrap. | |
// see https://www.drupal.org/node/2824578#comment-12075185 | |
function THEMENAME_status_messages($variables){ | |
$display = $variables['display']; | |
$output = ''; | |
$status_heading = array( | |
'status' => t('Status message'), | |
'error' => t('Error message'), | |
'warning' => t('Warning message'), |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
Copied from https://www.webdesign.org/absolutely-responsive-full-screen-background-images.22549.html | |
The HTML | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Absolutely Responsive Background Image Demo</title> | |
</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
### Following are security enhancements. See https://securityheaders.com/ | |
# Header always append X-Frame-Options SAMEORIGIN | |
Header always append X-Content-Type-Options: nosniff | |
Header always append X-XSS-Protection: 1 | |
Header always append X-Permitted-Cross-Domain-Policies: master-only | |
### | |
Header set ServerName "{MY SERVER NAME}" | |
Header set X-Frame-Options "SAMEORIGIN" | |
RequestHeader unset Proxy early |
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
body { | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | |
} |
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
<Files "wp-login.php"> | |
Order Deny,Allow | |
Deny from All | |
# allow certain whitelisted IPs | |
Allow from localhost 123.456.789 | |
AuthName "Authentication required!” | |
AuthType Basic | |
AuthUserFile /path/to/passwd-file | |
require valid-user | |
# Allow password-less access for allowed IPs |
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
# Require any additional compass plugins here. | |
# Set this to the root of your project when deployed: | |
http_path = "/" | |
css_dir = "css" | |
sass_dir = "sass" | |
images_dir = "img" | |
javascripts_dir = "js" | |
# You can select your preferred output style here (can be overridden via the command line): |
NewerOlder