Skip to content

Instantly share code, notes, and snippets.

@avantegarde
avantegarde / add-to-cart.php
Created March 25, 2016 18:42 — forked from claudiosanches/add-to-cart.php
WooCommerce - Template add-to-cart.php with quantity and Ajax!
<?php
/**
* Custom Loop Add to Cart.
*
* Template with quantity and ajax.
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.
global $product;
@avantegarde
avantegarde / match-height.js
Created February 24, 2016 18:41 — forked from tomhodgins/match-height.js
Match Height is a jQuery-free pure JavaScript plugin that will measure the height of a group of elements and assign each of them the highest value.
/*
# The Mad CSScientist's Matching Height Plugin
written by Tommy Hodgins: http://codepen.io/tomhodgins/pen/pjmKNj
## Usage
This plugin will measure the height of a group of elements and assign each of them the highest value.
To group elements together, assign each element a `data-col` attribute with the same value. This way, the plugin can calculate the heights of different groups of elements on the same page.
@avantegarde
avantegarde / snippets.md
Created November 19, 2015 00:58 — forked from tomhodgins/snippets.md
Snippets.md is my most often used HTML, CSS and JavaScript snippets for front-end web development
<?php header('X-Frame-Options: GOFORIT'); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SpeedTester</title>
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, minimal-ui">
<style type="text/css">
* { box-sizing: border-box; -moz-box-sizing: border-box; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-kerning: auto; font-family: 'Source Sans Pro', 'Open Sans', Roboto, 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', 'Myriad Pro', 'Segoe UI', Myriad, Helvetica, 'Lucida Grande', 'DejaVu Sans Condensed', 'Liberation Sans', 'Nimbus Sans L', Tahoma, Geneva, Arial, sans-serif; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; cursor: default; }
html { font-size: 10pt; background: #ccc; -webkit-text-size-adjust: 100%; }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {