Skip to content

Instantly share code, notes, and snippets.

@CHEWX
CHEWX / .htacccess
Created March 5, 2018 09:08
Get uploads from live domain if they do not exist locally — Must be added to wp-content/uploads/.htaccess
RewriteEngine On
RewriteBase /wp-content/uploads/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^localsite\.test$
RewriteRule ^(.+)$ http://livesite.com/wp-content/uploads/$1 [L,R=301,NE]
@CHEWX
CHEWX / _grid-helper.scss
Last active September 5, 2017 14:28
Foundation grid overlay helper.
// Supports up to 20 column grid. For more support add more spans.
// @NOTE: You can have any number of spans, the grid will only show what is needed.
.grid-helper {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
max-width: $global-width;
@CHEWX
CHEWX / _helper.scss
Created March 31, 2017 15:25
Foundation Responsive Design Helper
.rwd-helper {
position: fixed;
bottom: 0;
right: 0;
width: 100%;
height: 25px;
background: black;
color: white;
line-height: 25px;
text-align: center;
@CHEWX
CHEWX / gist:55450d70f19981cd28e6
Created April 1, 2015 10:46
Selector Hierarchy
.selector {
// extend is the very first incase you wish to overwrite
@extend %overlay;
// alphabetical order of rules
text-align: right;
// z-index in increments of 5
z-index: 5;