Skip to content

Instantly share code, notes, and snippets.


Eric Rasch ericrasch

View GitHub Profile
View index.html
<link href="" 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>
ericrasch / WP Security
Last active February 17, 2022 09:17
Hardening & Improving WordPress Security
View WP Security
ericrasch / 0_Bulletproof PHP Paths.php
Last active August 22, 2021 05:18
Different ways to find paths via PHP
View 0_Bulletproof PHP Paths.php
* Defined paths for local/production vs. staging servers
* example:
* $full_uri:
$full_uri = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$path = dirname($_SERVER[PHP_SELF]);
$current_path = substr( $path, strrpos($path,'/') + 1 );
ericrasch / SEO
Last active August 7, 2021 20:38
SEO Checklist
View SEO
View index.html
<div class="container">
<div class="card">
<div class="image">
<img src=",f_auto,g_center,q_auto:good,r_0,w_350/samples/landscapes/nature-mountains.jpg">
<div class="content">
<div class="price">$750,000</div>
<div class="address">101 Greenfield Drive</div>
ericrasch / index.html
Created July 22, 2020 17:17
position: sticky
View index.html
<div class="content">
<h1>So <code>position: sticky</code> is a thing now in a <em>bunch</em> of browsers.</h1>
<p><a href="" target="_blank"></a></p>
<p><a href="" target="_blank"></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
View all-form-elements.markdown
ericrasch / full-viewport-width-image-container-inside-article.markdown
Created July 22, 2020 17:15
full viewport width image (container) inside article
View full-viewport-width-image-container-inside-article.markdown
View .00 Solid Base

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.