Skip to content

Instantly share code, notes, and snippets.

@markupboy
markupboy / execution
Last active December 11, 2015 04:18
execution
Site = {
init: function() {
// global stuff here
this.pages[$('body').attr('id')]()
}
pages: {
home: function() {},
@markupboy
markupboy / gist:3974485
Created October 29, 2012 16:07
Basic template
<html>
<head>
<style type="text/css">
body { font-family: monospace; }
</style>
</head>
<body>
why, hello there
</body>
</html>

#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
@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
window.PA = window.PA || {};
PA.homeslider = {
init: function() {
this.setDom('#panels');
this.setOptions();
this.setActive(0);
this.bindNav();
this.startCycle();
this.bindGestures();
@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();
},
<?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 / 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()
@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())
);
?>
{% extends "scores/base.html" %}
{% block body_class %} glossary {% endblock %}
{% block content %}
<dl>
{% for term in terms %}
<dt>
{{term.name}}