Skip to content

Instantly share code, notes, and snippets.

View joeldrapper's full-sized avatar
🇺🇦
Slava Ukraini

Joel Drapper joeldrapper

🇺🇦
Slava Ukraini
View GitHub Profile
@joeldrapper
joeldrapper / content.txt
Last active August 29, 2015 14:15
Markdown Example
Right aligned
![Alt text](/path/to/image.jpg#right)
Left aligned
![Alt text](/path/to/image.jpg#left)
@joeldrapper
joeldrapper / style.css
Last active August 29, 2015 14:15
Markdown Image Alignment
img {
margin-top: 20px;
margin-bottom:20px;
}
img[src*='#left'] {
float: left;
margin-right: 20px;
}
@joeldrapper
joeldrapper / deploy.php
Created December 12, 2014 18:30
Deploy
<?php
shell_exec('git pull');
@joeldrapper
joeldrapper / product.liquid
Created September 3, 2014 07:28
Shopify "you ordered this before" message for the product page
{% if customer.orders.size != 0 %}
{% assign orderfound = false %}
{% for order in customer.orders %}
{% if orderfound == false %}
{% for line_item in order.line_items %}
{% if line_item.product.url == product.url and orderfound == false %}
{% assign orderfound = true %}
<p>
You ordered this on {{ order.created_at | date: "%b %d, %Y" }}. <a href="{{ order.customer_url }}">View Order</a>
</p>
@joeldrapper
joeldrapper / outlook-background-images.html
Created January 18, 2013 09:41
Makes background images work in outlook.
<!--[if gte mso 9]>
<v:image xmlns:v="urn:schemas-microsoft-com:vml" id="theImage" style='behavior: url(#default#VML); display:inline-block;position:absolute; height:190px; width:554px;top:0;left:0;border:0;z-index:1;' src="http://www.postgoldforcash.com/system/assets/images/ticksBg.jpg"/>
<v:shape xmlns:v="urn:schemas-microsoft-com:vml" id="theText" style='behavior: url(#default#VML); display:inline-block;position:absolute; height:190px; width:554px;top:-5;left:-10;border:0;z-index:2;'>
<div>
<![endif]-->
<!-- This is where you nest a table with the content that will float over the image -->
<table>
<tr>
<td style="background: url('/image.png');"></td>
@joeldrapper
joeldrapper / block-shadow.sass
Last active December 10, 2015 15:08
Handy little snippet for generating block shadows with SASS.
=vendor($property, $value)
-webkit-#{$property}: $value
-moz-#{$property}: $value
-o-#{$property}: $value
#{$property}: $value
=block-shadow($distance, $horizontal, $vertical, $color)
$property: null
$i: 1