Skip to content

Instantly share code, notes, and snippets.

View dfadler's full-sized avatar

Dustin Fadler dfadler

View GitHub Profile
@dfadler
dfadler / backbone-history.js
Last active January 3, 2016 03:19
Backbone History
define(['lib/namespace', 'lib/extend'], function(namespace, extend) {
'use strict';
var breaker = {};
var // Keep the identity function around for default iterators.
identity = function(value) {
return value;
},
buildPager: function() {
var pagerElements = [];
childViews.forEach(function(childView, i) {
var thumbnail = childView.model.get('thumbnail'),
pagerElement = $('<a href=""></a>');
{
preload: function() {
var $el = this.$el,
context = this;
$el.on('click', function() {
// this now is equal to $el
// context is equal to the view instance
});
{
preload: function() {
var model = this.model;
$el = this.$el;
}
}
<h1>Section Label Tags</h1>
<h1>Header One Style Lorem Ipsum</h1>
<h2>Header One Style Lorem Ipsum</h2>
<h3>Header One Style Lorem Ipsum</h3>
<h4>Header One Style Lorem Ipsum</h4>
<h5>Header One Style Lorem Ipsum</h5>
<h6>Header One Style Lorem Ipsum</h6>
The vision for our diversity networks is to create and sustainan inclusive environment in which all network members may thrive and reach their potential. The mission of our diversity networks is to further members’ professional development to maximize their individual contributions to corporate goals and objectives. Monsanto diversity networks sponsor efforts that support career development, networking, recruitment, promotion of cultural awareness and the creation of an inclusive environment. All the diversity networking groups have an Executive Team member as a sponsor and high levels of employee participation. Any employee can join any diversity network. Mark Sutherland, for example, is a Caucasian Scotsman and member of Monsanto Asian Connection (MAC),
<h1>H1 – It was perhaps</h1>
It was <a href="#">perhaps a vague</a> idea of <strong>making his way</strong> to Chelmsford, where <em>some friends of</em> his lived, <span style="text-decoration: underline;">that at last induced</span> my brother to strike into a quiet lane running eastward. Presently he came upon a stile, and, crossing it, followed a footpath northeastward.
<hr />
<h2>H2 – He passed near several farmhouses</h2>
<div>He<strong> passed near several</strong> farmhouses and s<em>ome little places</em> whose <a href="#">names he did not</a> learn. He<span style="text-decoration: underline;"> saw few fugitives until</span>, in a grass lane towards High Barnet, he happened upon two ladies who became his fellow travellers.</div>
<hr />
@dfadler
dfadler / loaded-module-example.js
Created September 18, 2013 01:28
Require Example
// Using Example A or B
require(['scripts/mousetrap'], function(Mousetrap) {
// Mousetrap is not returned from a module its actually a reference to window.Mousetrap
});
// Using Example C or D
require.config({
baseUrl: 'scripts',
paths: {
mousetrap: 'script/mousetrap'
<?php
'capabilities' => array(
'edit_terms' => 'edit_event_categories',
'delete_terms' => 'delete_event_categories',
'assign_terms' => 'assign_event_categories'
)
<?php
array(
'capability_type' => array( 'event', 'events' )
);
<?php
$custom_admin = add_role( 'custom_admin', 'Custom Administrator', array(
'edit_posts'=>false,
'delete_posts'=>false,
'delete_published_posts'=>false,
'edit_published_posts'=>false
'edit_events'=>true,