Skip to content

Instantly share code, notes, and snippets.

import htmlLoginForm from './login-form.html';
export default class LoginForm
{
constructor()
{
this.template = htmlLoginForm;
}
link(scope, elem, attrs)
import $ from 'jquery';
import dataTable from 'datatables';
import template from './table.hbs';
$.fn.dataTable = dataTable;
export default class TableView
{
/**
* A table view that displays tabular data bound to it
Michael Hoover, CEO
[email protected]
Joshua Langberg, Product Manager
[email protected]
https://twitter.com/negativetim3
@zxqx
zxqx / ContentStore.js
Created March 18, 2015 21:22
ContentStore.js
import extend from 'extend';
import urlUtil from 'url';
import _ from 'underscore';
import debug from 'debug';
// Models
import PostList from '../models/PostList.js';
import InfluencerList from '../models/InfluencerList.js';
import ContentList from '../models/ContentList.js';
@zxqx
zxqx / curl.js
Last active August 29, 2015 14:16
var curl = require('curlrequest');
var cheerio = require('cheerio');
var htmlToJson = require('html-to-json');
var SCHEDULE_URL = 'http://www.teamsideline.com/Org/StandingsResults.aspx?d=xRIu3qqX6IiJhYMtStQM19yg%2bGldWQ%2fwY6l1Ih06EiU%2fAloRbrErPgMTYoSrfOkeDoJnrrWK7go%3d';
curl.request({ url: SCHEDULE_URL }, function(err, res) {
$ = cheerio.load(res);
var schedule = $('#ctl00_OrgContentUnit_ScheduleGrid_ctl00 tbody').html();
/**
* Ensure all async action is done before injecting container view
* @param {number} retries
* @return {Promise}
*/
loadContent(retries = 0)
{
var category = this.appConfig.defaultContentCategory;
var logoUrl = this.appConfig.logoUrl;
src/client/app/AppConfig.js
1:0 error 'module' is not defined no-undef
19:2 error Expected { after 'if' condition curly
src/client/app/ContentStore.js
27:19 error Multiple spaces found before '=' no-multi-spaces
79:82 error Trailing spaces not allowed no-trailing-spaces
104:29 error Multiple spaces found before '=' no-multi-spaces
105:29 error Multiple spaces found before '=' no-multi-spaces
@zxqx
zxqx / sass.js
Last active August 29, 2015 14:16
var path = require('path');
module.exports = function(grunt)
{
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.registerTask('client-compile-sass', function() {
// This is set via the Gruntfile with grunt.config
var brands = grunt.config.get('brands');
@zxqx
zxqx / .vimrc
Created February 23, 2015 21:34
set nocompatible
filetype off
" --------------------------------------------------
" Vundle
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
@zxqx
zxqx / .vimrc
Created February 23, 2015 17:27
set nocompatible
filetype off
" --------------------------------------------------
" Vundle
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'