Skip to content

Instantly share code, notes, and snippets.

View brjadams's full-sized avatar

Brian A. brjadams

  • Indianapolis, IN
View GitHub Profile
@brjadams
brjadams / _.md
Created June 19, 2013 02:47
Tributary inlet
@brjadams
brjadams / d3
Last active December 18, 2015 16:59
createVisitsTimeSeries: function(container, visit_data){
var margin = {top: 5, right: 5, bottom: 5, left: 5},
width = $(container).width() - (margin.left - margin.right),
height = $(container).height() + 50;
var parseDate = d3.time.format("%Y-%m-%d").parse;
entries = d3.values(visit_data);
var x = d3.time.scale()
@brjadams
brjadams / main.js
Created October 28, 2015 14:43
I have a form in new_video that upon submitting, I want it to add the video to the videocollection, and update just that section(region?) of the page.
function($, _, Backbone, app, global_bindings, VideoModel, VideosCollection, VideoCollectionView, VideoForm) {
"use strict";
var data_items = app.setting("bootstrapped_videos");
var video_collection_items = new VideosCollection();
video_collection_items.reset(data_items);
var video_collection_view = new VideoCollectionView({
collection: video_collection_items