Skip to content

Instantly share code, notes, and snippets.

@nrambeck
nrambeck / browser
Created April 7, 2015 17:09
Email Lab example
<head>
<style>
p {
margin: 0 0 1em 0;
}
</style>
</head>
<body>
<p>My first paragraph</p>
<p>My second paragraph</p>
@nrambeck
nrambeck / template
Last active August 29, 2015 14:16
Product Category Filter reference
<!doctype html>
<html class=" no-js" lang="en">
<!--<![endif]-->
<head>
</head>
<body>
<div class="global-message-wrapper notification_error">
</div>
<div class="pl-solo header-wrapper">
@nrambeck
nrambeck / gist:b17f3c5a1717f60b9ff6
Last active August 29, 2015 14:14
New computer setup
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap gapple/services
brew install caskroom/cask/brew-cask
brew install composer
brew install hub
brew install node
brew install git
brew install sphp
brew install ssh-copy-id
@nrambeck
nrambeck / products-form-render.php
Created January 28, 2015 20:59
Example of rendering products form based on an associative array as input
function renderProductsForm($products) {
echo '<form action="#">';
foreach ($products as $key => $value) {
echo "<label>{$key}</label>";
echo "<input type='text' name='{$key}' />";
}
echo '<input type="submit">';
echo '</form>';
}
@nrambeck
nrambeck / attempt1
Last active August 29, 2015 14:13
EE 1.6 variables
{exp:weblog:entries weblog="category-page" status="open|closed"}
<?php $contentListTag = "{content-list-tag}" ?>
{/exp:weblog:entries}
{exp:simpletag:taglist tagname="<?php echo $contentListTag ?>"}
{exp:weblog:entries entry_id="{tagged_entries}" limit="10" orderby="view_count_one" sort="desc" dynamic="off" paginate="both"}
{embed=includes/page-teaser title="{title}" detail-page-thumbnail="{detail-page-thumbnail}" page_uri="{page_uri}" summary_text="{summary_text}" featured-content-new="{embed:featured-content-new}"}
/results
Primary Payload: result_number, photographer_id, distance
Sideload Payload: Full Photographer Objects for each search result
Meta Payload: seed, pagintation data
/photographers/:id
Primary Payload: Full photographer object, including specialties
/specialties
Primary Payload: Full list of specialties
$ git st
M contact.html
M contact.php
$ git add contact.html
$ git st
A contact.html
M contact.php
$ git ci -m "Add required attribute to form fields"
@nrambeck
nrambeck / gist:4590997
Created January 22, 2013 00:36
Drupal shell script to sync dev site to a local environment
#!/bin/bash
if [ ! $1 ]; then
echo "Usage:"
echo " $0 site_shortname"
echo "Example:"
echo " $0 acme"
exit
fi