Skip to content

Instantly share code, notes, and snippets.

View AmeliaBriscoe's full-sized avatar

Amelia Briscoe AmeliaBriscoe

View GitHub Profile
@AmeliaBriscoe
AmeliaBriscoe / nginx.conf
Last active February 7, 2018 01:17
Add X-Frame-Options and Content-Security-Policy Headers to Nginx Based Servers
# Add X-Frame-Option Headers
add_header X-Frame-Options ALLOWALL;
add_header X-Frame-Options “ALLOW-FROM https://rightmessage.com”;
# Apply a CSP
add_header Content-Security-Policy "frame-ancestors https:; default-src https:; font-src https: data:; img-src https: data:; script-src 'unsafe-inline' 'unsafe-eval' https:; style-src 'unsafe-inline' https:; connect-src https; object-src 'none';";
@AmeliaBriscoe
AmeliaBriscoe / .htaccess
Last active February 7, 2018 01:03
Add X-Frame-Options and Content-Security-Policy headers to Apache (.htaccess file)
# Add X-Frame-Option Headers
<IfModule mod_headers.c>
Header always append X-Frame-Options "ALLOW-FROM https://rightmessage.com"
Header always append X-Frame-Options ALLOWALL
</IfModule>
# Apply a CSP to all HTML and PHP files
<FilesMatch "\.(html|php)$">
Header set Content-Security-Policy "frame-ancestors https:; default-src https:; font-src https: data:; img-src https: data:; script-src 'unsafe-inline' 'unsafe-eval' https:; style-src 'unsafe-inline' https:; connect-src https; object-src 'none';"
</FilesMatch>
@AmeliaBriscoe
AmeliaBriscoe / 404-nosidebar.css
Created November 7, 2017 18:51
Show Rainmaker 404 error page with no sidebar
/* paste the below code to the Custom CSS area */
.error404 .sidebar { display: none; }
.error404 .content {
width: 100%;
margin: 0;
float: none;
padding: 40px;
}
@AmeliaBriscoe
AmeliaBriscoe / sales-page-arrow.html
Created November 5, 2017 19:19
Change the link in the arrow on the 'Sales Page' landing page
<script type='text/javascript'>
jQuery(document).ready(function() {
jQuery('.button-more').attr('href','#');
});
</script>
@AmeliaBriscoe
AmeliaBriscoe / altitude-smooth-scroll.html
Last active October 19, 2017 00:58
Altitude Pro Smooth Scrolling
/* Add the below code to the 'Design' --> 'Appearance' --> 'Scripts' --> 'Header Scripts' area in your Rainmakwr Admin */
<script type='text/javascript' src='/wp-content/themes/altitude-pro/js/home.js?ver=1.0.0'></script>
<script type='text/javascript' src='/wp-content/themes/altitude-pro/js/jquery.scrollTo.min.js?ver=1.4.5-beta'></script>
<script type='text/javascript' src='/wp-content/themes/altitude-pro/js/jquery.localScroll.min.js?ver=1.2.8b'></script>
@AmeliaBriscoe
AmeliaBriscoe / after-entry-hide-show.css
Created October 17, 2017 04:51
After Entry Opt In Form Hide/Show
/* Here is the code I used to hide and show my opt in forms. Make sure to replace the enews ID with your own */
#enews-ext-3, #enews-ext-4, #enews-ext-5 { display: none; }
.category-3 #enews-ext-5 { display: block; }
.category-2 #enews-ext-4 { display: block; }
.category-1 #enews-ext-3 { display: block; }
@AmeliaBriscoe
AmeliaBriscoe / altitude-pro-remove-overlay.css
Created October 15, 2017 22:22
Remove the overlay background from the home page of the Altitude Pro theme on Rainmaker
/* Add the code below to the 'Design' --> 'Custom CSS' area in your Rainmaker Admin */
.image-section {
background: none;
}
@AmeliaBriscoe
AmeliaBriscoe / rainmaker-custom-header.css
Created January 16, 2017 19:44
Rainmaker Custom Header Image CSS Code
.site-title a,
.site-title a:hover {
background-image: url('imageURL');
background-size: contain;
background-repeat: no-repeat;
color: transparent;
display: block;
height: HHHpx;
width: WWWpx;
}
@AmeliaBriscoe
AmeliaBriscoe / tgtw-5-background-image.css
Created September 8, 2016 19:18
TGTW 5 Background Image
body{
background-image: url('images/pathtoimage.png');
}
.header, .primary-menu{
background-image: url('images/pathtoimage.png')
}
.header{
min-height: 120px;
@AmeliaBriscoe
AmeliaBriscoe / tgtw-5-header-image.css
Created September 8, 2016 19:15
TGTW 5 Header Image
#site_title a{
background-image: url('images/pathtoimage.png');
display: block;
height: 80px;
width: 500px;
font: 0/0 a;
color: transparent;
}