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
var logger = new (winston.Logger)({ | |
transports: [ | |
new (winston.transports.File)({ filename: 'error.log', level: 'error', handleExceptions: true}), | |
new (winston.transports.File)({ filename: 'info.log', level: 'info'}), | |
new (winston.transports.File)({ filename: 'logs.log'}), | |
new (winston.transports.Console)({ colorize: true }) | |
] | |
}); |
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
" Keep a backup file. | |
" set backup | |
" Do not back up temporary files. | |
set backupskip=/tmp/*,/private/tmp/*" | |
" Store backup files in one place. | |
" set backupdir^=$HOME/.vim/backup// | |
set nobackup |
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
/* 3/13/2015 NH2 | |
* topTweeters.js | |
* For a given topic, finds and sets the top (size) tweeters | |
*/ | |
var stream = require('readable-stream') | |
var util = require('util') | |
var TopTweeters = module.exports = function (options) { | |
options || (options = {}) | |
var hwm = options.hwm || 16 |
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
var chai = require('chai'); | |
var assert = chai.assert; | |
var sinon = require('sinon'); | |
var sinonChai = require('sinon-chai'); | |
var Fixture = require('sequelize-fixtures') | |
var isStream = require('isstream') | |
var streamify = require('stream-array') | |
chai.use(sinonChai); | |
chai.should(); |
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
/* 3/13/2015 NH2 | |
* listMembers.js | |
* For a given list, sync its members to Twitter's values | |
*/ | |
var stream = require('readable-stream') | |
var util = require('util') | |
var after = require('after') | |
var through = require('through2') | |
var streamify = require('stream-array') |
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
var chai = require('chai'); | |
var assert = chai.assert; | |
var sinon = require('sinon'); | |
var sinonChai = require('sinon-chai'); | |
var Fixture = require('sequelize-fixtures') | |
var isStream = require('isstream') | |
var streamify = require('stream-array') | |
chai.use(sinonChai); | |
chai.should(); |
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
/* 3/13/2015 NH2 | |
* listMembers.js | |
* For a given list, sync its members to Twitter's values | |
*/ | |
var stream = require('readable-stream') | |
var util = require('util') | |
var after = require('after') | |
var through = require('through2') | |
var streamify = require('stream-array') | |
var parallel = require('concurrent-transform') |
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
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script> | |
// Initialize params | |
var width = document.documentElement.clientWidth | |
var height = document.documentElement.clientHeight | |
var url = document.location.href + '?' + 'width=' + width + '&height=' + height | |
// Send request |
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 { methods } from '../utils/api'; | |
// returns object w/ REQ/FAIL/DONE types | |
var createType = (method) => ({ | |
REQUEST: 'API_'+method.toUpperCase()+'_REQUEST', | |
FAIL: 'API_'+method.toUpperCase()+'_FAIL', | |
DONE: 'API_'+method.toUpperCase()+'_DONE' | |
}) | |
// returns an object of action types, one for each action method |
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 { Mapware } from 'fluxette' | |
import { API } from '../types'; | |
import { dispatch, proxy } from '..'; | |
import api from '../../utils/api'; | |
import { methods } from '../../utils/api'; | |
var createCreator = (method, API) => ({ | |
request: (data) => ({ type: API[method.toUpperCase()].REQUEST, data }), | |
fail: (data) => ({ type: API[method.toUpperCase()].FAIL, data }), | |
done: (data) => ({ type: API[method.toUpperCase()].DONE, data }) |
OlderNewer