Skip to content

Instantly share code, notes, and snippets.

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
/**
* 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;
@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();
@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';
Michael Hoover, CEO
[email protected]
Joshua Langberg, Product Manager
[email protected]
https://twitter.com/negativetim3
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
import htmlLoginForm from './login-form.html';
export default class LoginForm
{
constructor()
{
this.template = htmlLoginForm;
}
link(scope, elem, attrs)
module.exports = function(grunt) {
grunt.loadNpmTasks('sbp-frontend');
grunt.initConfig({
sbp: {
client: {
options: {
vendorLibs: [
'angular',
import angular from 'angular';
import angularMocks from 'angular-mocks';
import choosePageTemplate from './index.js';
describe('choose page template directive', function () {
var $scope, element;
beforeEach(angular.mock.module('w2o.nextworks.choosePageTemplate'));
beforeEach(angular.mock.inject(function($compile, $rootScope) {
import angular from 'angular';
import htmlChoosePageTemplate from './choose-page-template.html';
const TEMPLATES = [
{ id: '1-column-simple', name: '1-Column Simple', icon: 'icon-grid' },
{ id: '2-column-simple', name: '2-Column Simple', icon: 'icon-grid' },
{ id: '3-column-simple', name: '3-Column Simple', icon: 'icon-grid' },
{ id: '1-column-staggered', name: '1-Column Staggered', icon: 'icon-grid' },
{ id: '2-column-staggered', name: '2-Column Staggered', icon: 'icon-grid' },
{ id: '3-column-staggered', name: '3-Column Staggered', icon: 'icon-grid' },