Skip to content

Instantly share code, notes, and snippets.

View samselikoff's full-sized avatar

Sam Selikoff samselikoff

View GitHub Profile
@samselikoff
samselikoff / _.md
Created May 29, 2013 16:59
pie chart
@samselikoff
samselikoff / jsbin.efehir.html
Created August 1, 2013 06:34
Failing test, handlebars doesn't notify of mismatch tag.
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Ember template" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.6/ember.min.js"></script>
<script src="http://builds.emberjs.com.s3.amazonaws.com/ember-data-latest.js"></script>
<meta charset=utf-8 />
@samselikoff
samselikoff / README.md
Last active August 8, 2017 06:54 — forked from llad/README.md
Simple grid example
@samselikoff
samselikoff / brush_redraw_vertical_axis.js
Created September 5, 2013 07:44
Brush function for d3.js that redraws the vertical axis based on the range of data currently shown
function brush() {
// Use x.domain to filter the data, then find the max and min duration of this new set, and set y.domain to that
x.domain(brush.empty() ? x2.domain() : brush.extent());
var dataFiltered = data.filter(function(d, i) {
if ( (d.date >= x.domain()[0]) && (d.date <= x.domain()[1]) ) {
return this;
}
})
var buildersFiltered = color.domain().map(function(name) {
return {
@samselikoff
samselikoff / MonthlyDatepickerComponent
Last active December 25, 2015 06:09
A monthly datepicker Ember component that wraps Bootstrap datepicker (https://github.com/eternicode/bootstrap-datepicker).
App.MonthlyDatepickerComponent = Ember.Component.extend({
classNames: ['dp'],
didInsertElement: function() {
var _this = this;
this.$().datepicker({format: 'M-yyyy',minViewMode: 'months'})
.on('changeDate', function(e) {
_this.sendAction('action', e.format());
});
classes: function() {
var classes = Ember.keys(this.get('data.classes'));
debugger;
return getClasses(classes);
}.property('data.classes'),
@samselikoff
samselikoff / _.md
Created February 27, 2014 17:58
cambridge
// Generated on 2014-02-27 using generator-webapp 0.4.7
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
Hey there!