Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View zoerooney's full-sized avatar

Zoe Rooney zoerooney

View GitHub Profile
@zoerooney
zoerooney / header-for-most-emails.html
Last active August 1, 2018 13:49
Shopify notification emails, bettered. I usually use the first one as the header for all the emails other than the ones with specific template code below. Be sure to put the correct logo dimensions in place in each snippet before using it!
<div style="width: 100%; margin: 0 auto; text-align: center; background: #ffffff;">
<a href="{{ shop.url }}"><img src="{{ 'logo.png' | asset_url }}" alt="{{ shop_name }}" width="WIDTH" height="HEIGHT" style="margin: 0 auto;" /></a>
<br/><br/>
</div>
@zoerooney
zoerooney / inline-validation.js
Last active December 17, 2015 21:09
Customized MailChimp code that works inline with WordPress. The JS goes in the footer - make sure to replace the URL on line 9 with the one from YOUR account (you can get it by grabbing the original version of this code - generate a "classic" embedded sign-up form and it'll be in there). There's also a bit you'll need to replace in the form code…
<script type="text/javascript">
var fnames = new Array();var ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';
jQuery(document).ready( function($) {
var options = { errorClass: 'mce_inline_error', errorElement: 'div', onkeyup: function(){}, onfocusout:function(){}, onblur:function(){} };
var mce_validator = $("#mc-embedded-subscribe-form").validate(options);
$("#mc-embedded-subscribe-form").unbind('submit');//remove the validator so we can get into beforeSubmit on the ajaxform, which then calls the validator
options = { url: 'http://replace-with-your-specific-url', type: 'GET', dataType: 'json', contentType: "application/json; charset=utf-8",
beforeSubmit: function(){
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/