Skip to content

Instantly share code, notes, and snippets.

Avatar

Sam Selikoff samselikoff

View GitHub Profile
View _.md
@samselikoff
samselikoff / jsbin.efehir.html
Created Aug 1, 2013
Failing test, handlebars doesn't notify of mismatch tag.
View jsbin.efehir.html
<!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 Aug 8, 2017 — forked from llad/README.md
Simple grid example
View README.md
@samselikoff
samselikoff / brush_redraw_vertical_axis.js
Created Sep 5, 2013
Brush function for d3.js that redraws the vertical axis based on the range of data currently shown
View brush_redraw_vertical_axis.js
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 Dec 25, 2015
A monthly datepicker Ember component that wraps Bootstrap datepicker (https://github.com/eternicode/bootstrap-datepicker).
View MonthlyDatepickerComponent
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());
});
View gist:9080059
classes: function() {
var classes = Ember.keys(this.get('data.classes'));
debugger;
return getClasses(classes);
}.property('data.classes'),
View Gruntfile.js
// 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) {