Skip to content

Instantly share code, notes, and snippets.

@pitch-gist
pitch-gist / gist:5703847
Last active January 12, 2017 05:37
Matrix Check
{exp:channel:entries channel="standard_page" limit="1"}
{embed="include/header"}
<div class="wrapper main-container">
<article class="main-content">
{!-- if there are no section fields content we are a standard content page --}
{if mx_standard_sections != "1"}
<hgroup>
<h2>{title}</h2>
@pitch-gist
pitch-gist / gist:5624138
Last active December 17, 2015 14:20
PayPal Snippet Structure
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" class="paypal">
<span class="heading">
<input type="hidden" name="cmd" value="_s-xclick" />
Fast delivery &amp; great customer service
</span> <!-- close heading -->
<div class="paypal-left">
<input type="hidden" name="hosted_button_id" value="H5M2APXDL2N4Y" /><span class="price">$483.30 NZD ex GST &amp; freight.</span>
<span class="details">SAM0523X Light Head - Double Arm LED Task light with base.</span>
</div> <!-- close paypal left -->
@pitch-gist
pitch-gist / gist:4956385
Created February 14, 2013 21:04
Emmet: Simple Site Structure
div.wrapper>(header.site-header>(a.logo.ir[href="#"]{Business Name}+nav.main-naviation>ul>(li>a[href="#"])*6))+(div.wrapper>(article.main-content>(h1+p))+aside.sidebar>nav.sub-navigation>ul>(li>a[href="#"])*6)+footer.site-footer>((ul>(li>a[href="#"])*6))+p.copyright
@pitch-gist
pitch-gist / gist:4956236
Last active December 13, 2015 18:38 — forked from axelav/gist:1839777
Sublime: Shortcuts
h1. Sublime Text 2 - Useful Shortcuts (Mac OS X)
h2. General
| *⌘T* | go to file |
| *⌘⌃P* | go to project |
| *⌘R* | go to methods |
| *⌃G* | go to line |
| *⌘KB* | toggle side bar |
| *⌘⇧P* | command prompt |
@pitch-gist
pitch-gist / gist:4956207
Last active December 13, 2015 18:38
Emmet: Simple Navigation
nav.main-navigation>ul>(li>a[href="#"][title=""])*6
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/Tomorrow-Night.tmTheme",
"find_selected_text": true,
"folder_exclude_patterns":
[
".svn",
".git"
],
"font_face": "Source Code Pro",
@pitch-gist
pitch-gist / gist:3753751
Created September 20, 2012 03:11
Mobile Testing
Below is the list of devices that we are currently testing at Pitch. We have found them to be the most popular and giving us over 90% coverage of mobile traffic on our client websites. It's not perfect, check your analytics but this is probably a good place to start.
iPhone 3GS (Apple iOS 5)
iPhone 4 (Apple iOS 6)
iPhone 5 (Apple iOS 6)
iPad 1 (Apple iOS 5)
iPad 3 (Apple iOS 6)
Nexus S (Google Android 4.1)
Nexus 7 Tablet (Google Android 4.1)
Samsung Galaxy S3 (Google Android 4.0)
@pitch-gist
pitch-gist / gist:3432288
Last active October 9, 2015 03:38
Javascript: Price Switching
// setup our default plans and their pricing options, we only support rounded to the dollar prices
var plans = {
'standard': {
price: 6,
term: 10
},
'premium': {
price: 10,
term: 12
},
@pitch-gist
pitch-gist / gist:3073581
Created July 9, 2012 00:42
JavaScript: Display Screen Width
// write the current screen width to our screen
$("#widget span").html($(window).width());
$(window).resize(function() {
$("#widget span").html($(window).width());
});
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>