This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PropTypes, Component } from 'react'; | |
import { connect } from 'react-redux'; | |
import Dropzone from 'react-dropzone'; | |
import pictureable from 'shared/pictures/components/pictureable.jsx'; | |
const _getPictureIds = (pictureCheckStatuses) => R.filter(key => | |
pictureCheckStatuses[key], R.keys(pictureCheckStatuses) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global $ document */ | |
const Horseman = require('node-horseman'); | |
const cheerio = require('cheerio'); | |
const R = require('ramda'); | |
const phantomjs = require('phantomjs-prebuilt'); | |
const { Task, mapf } = require('../utils/f.js'); | |
// fetch :: string -> Task Error HTML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ReversePagination | |
attr_reader :page, :per_page, :total_count, :total_pages, :records | |
def initialize(scope, page) | |
initialize_params(scope.klass, page) | |
@records = scope.limit(limit).offset(offset).order(:created_at).reverse | |
end | |
def initialize_params(klass, page) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ActivityFinder | |
attr_reader :activities, :user | |
def initialize(user) | |
@user = user | |
@activities = Activity.all.where(:user_id => user_ids). | |
with_subject.with_user.desc | |
activities.group_by(&:subject_type).each do |name, group| |