Skip to content

Instantly share code, notes, and snippets.

// everyone's new favorite closure pattern:
(function(window,document,undefined){ ... })(this,this.document);
// when minified:
(function(w,d,u){ ... })(this,this.document);
// which means all uses of window/document/undefined inside the closure
// will be single-lettered, so big gains in minification.
// it also will speed up scope chain traversal a tiny tiny little bit.
@markupboy
markupboy / gist:913487
Created April 11, 2011 13:08
carousel
/* JS carousel instantiated as -
function newsTickerAnimation(activeID, stagedObj, callback) {
var activeObj = $(activeID);
activeObj.animate({
left: '-=100px',
opacity: 0
}, 250, function() {
$(this).css({
{% extends "scores/base.html" %}
{% block body_class %} glossary {% endblock %}
{% block content %}
<dl>
{% for term in terms %}
<dt>
{{term.name}}
@markupboy
markupboy / gist:1322478
Created October 28, 2011 15:01
city and state
<?php
$states = array(
"MD" => array("title" => "Maryland", "cities" => array()),
"VA" => array("title" => "Virginia", "cities" => array()),
"NC" => array("title" => "North Carolina", "cities" => array()),
"NJ" => array("title" => "New Jersey", "cities" => array()),
"DC" => array("title" => "Washington DC", "cities" => array())
);
?>
@markupboy
markupboy / pi.property_info.php
Created October 31, 2011 15:47
Property Info
<?php
// TODO: REFACTOR CRAZY ASS QUERIES
$plugin_info = array(
'pi_name' => 'Property Info',
'pi_version' => '1.0',
'pi_author' => 'Blake Walters',
'pi_description' => 'Returns general info about a property',
'pi_usage' => Property_info::usage()
<?php
$plugin_info = array(
'pi_name' => 'Property Info',
'pi_version' => '1.0',
'pi_author' => 'Blake Walters, Viget Labs',
'pi_description' => 'Returns general info about a property',
'pi_usage' => Property_info::usage()
);
@markupboy
markupboy / pa_player.js
Created November 11, 2011 23:04
PA Player
var PA = PA || {};
PA.homevideo = {
init: function() {
this.getDom();
this.setupPlayer();
this.bindControls();
this.bindReady();
},
window.PA = window.PA || {};
PA.homeslider = {
init: function() {
this.setDom('#panels');
this.setOptions();
this.setActive(0);
this.bindNav();
this.startCycle();
this.bindGestures();
@markupboy
markupboy / locator.js
Created November 17, 2011 18:36
PA Locator
window.PA = window.PA || {};
PA.locator = {
sampleJson: [{"first_name":"Vance","last_name":"Nitzsche","degrees":null,"credential":"Award Winner","medical_school":'Mizzou',"primary_specialty":"Internal Medicine","secondary_specialty":null,"residency":"Johns Hopkins","practice":{"name":"Laudantiumearum","phone_number":null,"office_hours":null,"external_url":null,"address":{"city":"Boulder","lat":null,"long":null,"state":"CO","street":"1539 Pearl","zip_code":"80302"}}},{"first_name":"Vance","last_name":"Nitzsche","degrees":null,"credential":"Award Winner","medical_school":'Mizzou',"primary_specialty":"Internal Medicine","secondary_specialty":null,"residency":"Johns Hopkins","practice":{"name":"Laudantiumearum","phone_number":null,"office_hours":null,"external_url":null,"address":{"city":"Boulder","lat":null,"long":null,"state":"CO","street":"4930 Meredith","zip_code":"80303"}}}],
emptyJson: [],
resultsPoints: [],
// main search function, fires on submit

#Contents

  1. Site Conventions
  2. Special tags
  3. Database Management
  4. Sass and Compass
  5. Installation
    1. DB config
    2. DB import
    3. Local Virtual Host