Skip to content

Instantly share code, notes, and snippets.

View ericrasch's full-sized avatar

Eric Rasch ericrasch

View GitHub Profile
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"></link>
<div class="social">
<a href="#" class="fb" title="Join us on Facebook"><i class="fa fa-facebook" aria-hidden="true"></i></a>
<a href="#" class="tw" title="Join us on Twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a>
<a href="#" class="insta" title="Join us on Instagram"><i class="fa fa-instagram" aria-hidden="true"></i></a>
<a href="#" class="in" title="Join us on Linked In"><i class="fa fa-linkedin" aria-hidden="true"></i></a>
</div>
@ericrasch
ericrasch / WP Security README.md
Last active February 17, 2022 09:17
Hardening & Improving WordPress Security
@ericrasch
ericrasch / 0_Bulletproof PHP Paths.php
Last active August 22, 2021 05:18
Different ways to find paths via PHP
<?php
/**
* Defined paths for local/production vs. staging servers
* example: http://website.com/main-folder/sub-folder/paths.php
* $full_uri: http://website.com/main-folder/sub-folder/paths.php
*/
$full_uri = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$path = dirname($_SERVER[PHP_SELF]);
$current_path = substr( $path, strrpos($path,'/') + 1 );
@ericrasch
ericrasch / SEO Checklist.md
Last active August 7, 2021 20:38
SEO Checklist
@ericrasch
ericrasch / pull_request_template.md
Created May 14, 2021 17:28
Pull Request Template for GitHub

Resolves #

Description

Staging Links

Screenshots (if appropriate):

<div class="container">
<div class="card">
<div class="image">
<img src="http://res.cloudinary.com/dzuf4ztit/image/upload/c_fill,f_auto,g_center,q_auto:good,r_0,w_350/samples/landscapes/nature-mountains.jpg">
</div>
<div class="content">
<div>AMAZING WILDERNESS VIEWS • 350 ACRES</div>
<div class="price">$750,000</div>
<div class="address">101 Greenfield Drive</div>
</div>
@ericrasch
ericrasch / index.html
Created July 22, 2020 17:17
position: sticky
<div class="content">
<h1>So <code>position: sticky</code> is a thing now in a <em>bunch</em> of browsers.</h1>
<p><a href="https://caniuse.com/#search=position%3A%20sticky" target="_blank">https://caniuse.com/#search=position%3A%20sticky</a></p>
<p><a href="https://developers.google.com/web/updates/2012/08/Stick-your-landings-position-sticky-lands-in-WebKit" target="_blank">https://developers.google.com/web/updates/2012/08/Stick-your-landings-position-sticky-lands-in-WebKit</a></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam lectus lectus, adipiscing molestie accumsan ut, facilisis at massa. Praesent ut dictum massa. Sed vel nunc nec augue vestibulum consectetur ac mattis elit. Proin euismod cursus cursus. Sed ut aliquet lectus. Fusce pellentesque pretium massa, ut gravida elit sagittis sit amet. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris at augue justo. In mollis hendrerit eleifend. Aenean ultricies au
@ericrasch
ericrasch / full-viewport-width-image-container-inside-article.markdown
Created July 22, 2020 17:15
full viewport width image (container) inside article

full viewport width image (container) inside article

elements like images (or containers) break out from inside a wrapper to full viewport width

A Pen by HigherEducation.com on CodePen.

License.

Solid Base .htaccess

Creating a solid base for your .htaccess file. Currently includes RewriteBase, Security (against indexes, files, etc.), and Expires Headers (caching, performance).

  • The URL REWRITES would go at the top of the file.
  • The SECURITY and the WEB PERFORMANCE can go towards the bottom... before and WordPress or WP Super Cache items.
  • UPDATE 2013-08-21: Added code for forcing either non-www or www. on URLs. Also added the MultiViews option.
  • UPDATE 2013-08-23: Added specific code for wp-config.php
  • UPDATE 2013-10-04: Increased favicon expire time.
  • UPDATE 2014-02-05: Removed the Force URL rewrites since there's more than one option.