I hereby claim:
- I am st8998 on github.
- I am st8998 (https://keybase.io/st8998) on keybase.
- I have a public key ASDFRm_i7IWAvAiUln9xt4CkIyT5FsQXWzsP9nYpEDPKNQo
To claim this, I am signing this object:
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "os" | |
| ) | |
| type ManifestItem struct { |
I hereby claim:
To claim this, I am signing this object:
| import { eventChannel } from 'redux-saga' | |
| import { take, spawn, put, takeLatest, takeEvery, call } from 'redux-saga/effects' | |
| import { isEmpty } from 'ramda' | |
| import * as actions from './auth_actions' | |
| const provider = new firebase.auth.GoogleAuthProvider() | |
| const authStateChannel = eventChannel((emit) => { | |
| firebase.auth().onAuthStateChanged((user) => { |
| const cheerio = require('cheerio') | |
| const request = require('request') | |
| const fs = require('fs') | |
| const { map, join, stringify, readable } = require('event-stream') | |
| const BASE_URL = 'http://www.profjournal.com/update2016/article_page_new.cfm' | |
| const SUBID = 110890 | |
| const START_ID = 74371 //81209//468 |
| import { map, is, filter, keys, compose, identity, join } from 'ramda' | |
| const processObj = compose(classnames, keys, filter(identity)) | |
| const processArr = compose(join(' '), filter(identity), map(classnames)) | |
| function classnames (arg) { | |
| switch (true) { | |
| case is(String, arg): return arg | |
| case is(Array, arg): return processArr(arg) |
| @connect( | |
| (state, props) => ({ user: find(propEq('id', Number(props.params.id)), state.users) }), | |
| { requestUser } | |
| ) | |
| export default class UserProfile extends Component { | |
| static contextTypes = { | |
| router: React.PropTypes.object | |
| }; | |
| componentWillMount() { |
| import './header.css' | |
| import React, { Component } from 'react' | |
| import { connect } from 'react-redux' | |
| import { Link } from 'react-router' | |
| import { find, propEq, assoc, compose, __ } from 'ramda' | |
| import { createSelector } from 'reselect' | |
| import { requestCurrent as requestCurrentUser } from 'users/users_actions' | |
| import Transition from 'misc/transition' | |
| import Loader from 'loader/loader' |
| import { default as randomStr } from 'randomatic' | |
| export default function register() { | |
| return this.directive('radiogroup', /* @ngInject */ function () { | |
| return { | |
| restrict: 'A', | |
| require: ['ngModel'], | |
| scope: true, | |
| controller() {}, |
| class DefaultAvatarController < ApplicationController | |
| respond_to :svg | |
| COLORS = %w( #ff658c #fa80db #d185ee #b385f5 #7075ef #5098ea #a8b6cc #03bee9 #00bdb3 | |
| #00d590 #a0d930 #f3cb00 #efc47b #ff9740 #d8965b #ff755a #3e464e ) | |
| def avatar | |
| model = params[:model_name].capitalize.constantize.find(params[:id]) | |
| @abbr = model.name.match(/(?:\s*(\w).*?\s+(\w).*)|(?:^\s*(\w)(\w).*)|(\w)/).to_a[1..-1].join('').upcase | |
| @color = COLORS[model.id % COLORS.size] |
| // imperative way | |
| function rangeMonths(start, end) { | |
| const out = [] | |
| for(let curr = moment(start), mEnd = moment(end); curr.isBefore(mEnd); curr.add(1, 'day')) | |
| if (curr.date() === 1) | |
| out.push(curr.format()) | |
| return out | |
| } | |
| const months = rangeMonths('2015-01-01', '2015-10-01') |