commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
212a9431617bd97daa14b6ae635da247feb4c573
index.js
index.js
var httpProxy = require('http-proxy'); var http = require('http'); var morgan = require('morgan'); var logger = morgan('short'); var proxy = httpProxy.createProxyServer({ target: 'https://accountview.net', secure: false }) .on('proxyRes', function (proxyRes, req, res) { proxyRes.headers['access-control-...
var httpProxy = require('http-proxy'); var http = require('http'); var morgan = require('morgan'); var logger = morgan('short'); var proxy = httpProxy.createProxyServer({ target: 'https://accountview.net', secure: false }) .on('proxyRes', function (proxyRes, req, res) { proxyRes.headers['access-control-...
Fix access-control-allow-headers value on response
Fix access-control-allow-headers value on response
JavaScript
mit
mauricedb/av-proxy
b81c7586023e3a987368a7f432e729dd0eaae979
src/each_day.js
src/each_day.js
var parse = require('./parse') /** * Returns array of dates withtin specified range. * @param {date|string} dirtyStart * @param {date|string} dirtyEnd * @returns {date[]} */ var eachDay = function(dirtyStart, dirtyEnd) { var endTime = parse(dirtyEnd).getTime() var dates = [] var tmpDate var curDate = par...
var parse = require('./parse') /** * Returns array of dates withtin specified range. * @param {date|string} dirtyStart * @param {date|string} dirtyEnd * @returns {date[]} */ var eachDay = function(dirtyStart, dirtyEnd) { var endTime = parse(dirtyEnd).getTime() var dates = [] var currentDate = parse(dirtySt...
Remove DST fix in `eachDay` function
Remove DST fix in `eachDay` function
JavaScript
mit
date-fns/date-fns,js-fns/date-fns,js-fns/date-fns,date-fns/date-fns,date-fns/date-fns
ad09417676aecc1ce2585fd8cae25a8e877eff2f
index.js
index.js
'use strict'; var _ = require('lodash-node'), es = require('event-stream'), PluginError = require('gulp-util').PluginError, Cache = require('cache-swap'), TaskProxy = require('./lib/TaskProxy'); var fileCache = new Cache({ cacheDirName: 'gulp-cache' }); var defaultOptions = { fileCache: fileC...
'use strict'; var _ = require('lodash-node'), es = require('event-stream'), PluginError = require('gulp-util').PluginError, Cache = require('cache-swap'), TaskProxy = require('./lib/TaskProxy'); var fileCache = new Cache({ cacheDirName: 'gulp-cache' }); var defaultOptions = { fileCache: fileC...
Fix error to pass through
Fix error to pass through
JavaScript
mit
jgable/gulp-cache
25f7c4b9899288874459827e674a28b03e6b9ae0
index.js
index.js
function escapeCarriageReturn(txt) { if(!txt) return ''; txt = txt.replace(/\r+\n/gm, '\n'); // \r followed by \n --> newline while (txt.search(/\r[^$]/g) > -1) { var base = txt.match(/^(.*)\r+/m)[1]; var insert = txt.match(/\r+(.*)$/m)[1]; insert = insert + base.slice(insert.length, base.length...
function escapeCarriageReturn(txt) { if (!txt) return ''; if (!/\r/.test(txt)) return txt; txt = txt.replace(/\r+\n/gm, '\n'); // \r followed by \n --> newline while (/\r[^$]/.test(txt)) { var base = /^(.*)\r+/m.exec(txt)[1]; var insert = /\r+(.*)$/m.exec(txt)[1]; insert = insert + base.slice(insert...
Improve performance for normal text
Improve performance for normal text
JavaScript
mit
lgeiger/escape-carriage
ddf7491c7de053773e9c189b1507dc74d01d8335
index.js
index.js
'use strict'; var es = require('event-stream'), w3cjs = require('w3cjs'), gutil = require('gulp-util'), path = require('path'); /** * Handles messages. * * @param file The file array. * @param messages Array of messages returned by w3cjs. * @return boolean Return false if errors have occurred. */ function ha...
'use strict'; var es = require('event-stream'), w3cjs = require('w3cjs'), gutil = require('gulp-util'), path = require('path'); /** * Handles messages. * * @param file The file array. * @param messages Array of messages returned by w3cjs. * @return boolean Return false if errors have occurred. */ function ha...
Handle invalid returns better. Useful for if you get blocked by W3C.
Handle invalid returns better. Useful for if you get blocked by W3C.
JavaScript
mit
callumacrae/gulp-w3cjs,callumacrae/gulp-w3cjs
739e5968cd35799de9ceb77c93aead3346c08409
index.js
index.js
'use strict' const flatten = require('@flatten/array') // allow nested arrays // shared - shared object given to every function as 2nd arg. // tasks - array of functions to call. // done - error accepting callback. // executor - defaults to process.nextTick, could be setImmediate. module.exports = function r...
'use strict' // ignore for coverage. its coverage is checked manually with the two different // node versions required to test both branches of the statement. /* istanbul ignore next */ const flatten = // allow nested arrays. try to use node 12's builtin flatten. Array.prototype.flat ? (array) => { return array....
Use Node 12's Array.flat() when available and start flattening tasks given to taskling. It was already flattening tasks given to prepend() and append().
Use Node 12's Array.flat() when available and start flattening tasks given to taskling. It was already flattening tasks given to prepend() and append().
JavaScript
mit
elidoran/node-taskling
fb31f6885a53167b5549cb21e8538a9064aade22
index.js
index.js
#!/usr/bin/env node 'use strict'; const dnode = require('dnode'); const host = process.env.COLLECTD_HOSTNAME || 'storj.node'; const interval = 120; //override default collectd interval to avoid storj-daemon performance issue const storjDaemonPort = 45015; const outputCollectdData = (share) => { console.log(`PUTV...
#!/usr/bin/env node 'use strict'; const dnode = require('dnode'); const host = process.env.COLLECTD_HOSTNAME || 'storj.node'; const interval = 120; //override default collectd interval to avoid storj-daemon performance issue const storjDaemonPort = 45015; const outputCollectdData = (share) => { console.log(`PUTV...
Remove useless params in callback
Remove useless params in callback
JavaScript
mit
bobey/storj-collectd-plugin
62a101d863905a473c9e28e0e3c56ece38b1e682
src/js/index.js
src/js/index.js
import config from './config'; import Keyboard from './keyboard'; import Mouse from './mouse'; import Recorder from './recorder'; import Scroll from './scroll'; import Timer from './timer'; import moment from 'moment'; import Data from '../db/eventsLog'; const Mimic = (params) => { const container = document.getEle...
import Keyboard from './keyboard'; import Mouse from './mouse'; import Recorder from './recorder'; const Mimic = (params) => { const container = document.getElementById(params.container), recorder = Recorder('session'), keyboard = Keyboard(), mouse = Mouse(container); const startRecording ...
Clean up. Remove what is not used for now.
Clean up. Remove what is not used for now.
JavaScript
mit
jeromeds/mimic,jdsninja/mimic,jdsninja/mimic,jeromeds/mimic
4fc10d9d34b5abd0bc0fedace9a543e1460605c5
src/js/index.js
src/js/index.js
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import { BrowserRouter, Route, Switch } from 'react-router-dom'; import promise from 'redux-promise'; import reducers from './reducers'; import Example from './comp...
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import { HashRouter, Route, Switch } from 'react-router-dom'; import promise from 'redux-promise'; import reducers from './reducers'; import Example from './compone...
Use HashRouter to support direct links/refresh
Use HashRouter to support direct links/refresh
JavaScript
mit
jdd1260/react-project-starter,jdd1260/react-project-starter
1514f7b337b9231037ab3d4747f609e96741385c
src/pipeline.js
src/pipeline.js
/** * @license * Pipeline version @VERSION * Copyright (c) 2011 Rob Griffiths (http://bytespider.eu) * Pipeline is freely distributable under the terms of an MIT-style license. */ (function(){ function Pipeline() { } Pipeline.prototype = { createCollection: function (collection) { this[collection...
/** * @license * Pipeline version @VERSION * Copyright (c) 2011 Rob Griffiths (http://bytespider.eu) * Pipeline is freely distributable under the terms of an MIT-style license. */ (function(){ function Pipeline() {} Pipeline.prototype = { createCollection: function (collection) { this[collection] = n...
Set up DocumentCollectionCursor as an array-like object
Set up DocumentCollectionCursor as an array-like object
JavaScript
mit
bytespider/Pipeline
c4fe834bb5730b8afb9f60bc3e0871c2c48d4e09
src/helpers/file.js
src/helpers/file.js
/** * Node modules */ const path = require('path'); const util = require('util'); const ncp = util.promisify(require('ncp').ncp); /** * FileSystem helper. * * @class FileSystem * @package Helpers * @author Patrick Ferreira <paatrickferreira@gmail.com> */ class FileSystem { /** * Checks if a file is an ima...
/** * Node modules */ const path = require('path'); const util = require('util'); const ncp = util.promisify(require('ncp').ncp); /** * FileSystem helper. * * @class FileSystem * @package Helpers * @author Patrick Ferreira <paatrickferreira@gmail.com> */ class FileSystem { /** * Checks if a file is an ima...
Change optimized dir prefix to tinyme-optimized
Change optimized dir prefix to tinyme-optimized
JavaScript
mit
patarkf/tinyme
2086dfa2db47b6c23595c79f7500849841d98de9
src/helpers/file.js
src/helpers/file.js
/** * Node modules */ const path = require('path'); const util = require('util'); const ncp = util.promisify(require('ncp').ncp); /** * FileSystem helper. * * @class FileSystem * @package Helpers * @author Patrick Ferreira <paatrickferreira@gmail.com> */ class FileSystem { /** * Checks if a file is an ima...
/** * Node modules */ const path = require('path'); const util = require('util'); const ncp = util.promisify(require('ncp').ncp); /** * FileSystem helper. * * @class FileSystem * @package Helpers * @author Patrick Ferreira <paatrickferreira@gmail.com> */ class FileSystem { /** * Checks if a file is an ima...
Set clobber as false on clone dir. Add ncp module link on clone dir documentation
Set clobber as false on clone dir. Add ncp module link on clone dir documentation
JavaScript
mit
patarkf/tinyme
6123ba8b673b22bf6be5c9a934ed5271ed7d0d57
public/js/application.js
public/js/application.js
$(document).ready(function() { // add a question to Make Survey form when user clicks on "add question" $('#add-answer-option-field').on('click', function(event) { var answerOptionNode = "<p><label>Answer Option: </label> <input type='text' name='answer-option'></p>"; $('.answer-option-container').append(an...
$(document).ready(function() { var answer_number = 1; // add a question to Make Survey form when user clicks on "add question" $('#add-answer-option-field').on('click', function(event) { var answerOptionNode = "<p><label>Answer Option: </label> <input type='text' name='answer-option-" + answer_number + "'></p...
Set add option answer to auto increment name field value
Set add option answer to auto increment name field value
JavaScript
mit
nyc-rock-doves-2015/survey-werewolf,nyc-rock-doves-2015/survey-werewolf,nyc-rock-doves-2015/survey-werewolf
e9c12a2e49d938feee3b9c5eb6ec789ace7540fa
javascripts/basepack.js
javascripts/basepack.js
Ext.ns("Netzke.pre"); Ext.ns("Netzke.pre.Basepack"); Ext.ns("Ext.ux.grid"); Ext.util.Format.mask = function(v){ return "********"; }; Ext.define('Ext.ux.form.TriCheckbox', { extend: 'Ext.form.field.ComboBox', alias: 'widget.tricheckbox', store: [[true, "Yes"], [false, "No"]], forceSelection: true });
Ext.ns("Netzke.pre"); Ext.ns("Netzke.pre.Basepack"); Ext.ns("Ext.ux.grid"); Ext.util.Format.mask = function(v){ return "********"; }; Ext.define('Ext.ux.form.TriCheckbox', { extend: 'Ext.form.field.ComboBox', alias: 'widget.tricheckbox', store: [[true, "Yes"], [false, "No"]], forceSelection: true }); // Fi...
Patch race condition bug in Ext JS 5
Patch race condition bug in Ext JS 5
JavaScript
mit
rvwong/netzke-basepack,rvwong/netzke-basepack,skmitty/netzke-basepack,skmitty/netzke-basepack,skmitty/netzke-basepack,rvwong/netzke-basepack,skmitty/netzke-basepack,rvwong/netzke-basepack
0978876b09a297266a64cfa15dce2e507c71ff5a
tasks/data-download.js
tasks/data-download.js
"use strict"; var path = require('path'), exec = require('child_process').exec; module.exports = function (grunt) { grunt.registerTask('data-download', '1. Download data from iana.org/time-zones.', function (version) { version = version || 'latest'; var done = this.async(), src = 'ftp://ftp.iana.org/tz/t...
"use strict"; var path = require('path'), exec = require('child_process').exec; module.exports = function (grunt) { grunt.registerTask('data-download', '1. Download data from iana.org/time-zones.', function (version) { version = version || 'latest'; var done = this.async(), src = 'ftp://ftp.iana.org/tz/t...
Fix download link for non-latest releases.
Fix download link for non-latest releases.
JavaScript
mit
dieface/moment-timezone,samjoch/moment-timezone,6ft-invsbl-rbbt/moment-timezone,mkhuramj/moment-timezone,orocrm/moment-timezone,bcbroussard/moment-timezone,kidaa/moment-timezone,lookfirst/moment-timezone,almamedia/moment-timezone,eddywashere/moment-timezone,moment/moment-timezone,d0rc/moment-timezone,mj1856/moment-time...
086f8bdc81d96d1e4c8ca55f1877d4d3878b2c1d
step-01/js/main.js
step-01/js/main.js
'use strict'; // Define navigator.mediaDevices.getUserMedia() for older devices. /** * Constraints to apply to MediaStream. * On this codelab, you will be streaming only video (true). */ const mediaStreamConstraints = { video: true, }; /** Video element where stream will be placed. */ const localVideo = documen...
'use strict'; /** * On this codelab, you will be streaming only video (true). * Constraints to apply to MediaStream. */ const mediaStreamConstraints = { video: true, }; /** Video element where stream will be placed. */ const localVideo = document.querySelector('video'); /** Handles success by adding the MediaSt...
Simplify function names, some comments and additional text.
Simplify function names, some comments and additional text.
JavaScript
apache-2.0
googlecodelabs/webrtc-web,googlecodelabs/webrtc-web
df1ee1bd99584997061365aabde5caf419ecad83
lib/Relation.js
lib/Relation.js
/* @flow weak */ var inflector = require('./utils/inflector'); var merge = require('./utils/merge'); var Relation = function(parent, relation) { this.parent = parent; this.relation = relation; this.namespace = inflector.pluralize(relation); this.store = parent.store; }; merge(Relation.prototype, ...
/* @flow weak */ var inflector = require('./utils/inflector'); var merge = require('./utils/merge'); var Relation = function(parent, relation) { this.parent = parent; this.relation = relation; this.namespace = inflector.pluralize(relation); this.store = parent.store; }; merge(Relation.prototype, ...
Use private function for relation ids
Use private function for relation ids
JavaScript
mit
dscout/immunid,dscout/immunid
1627c07e1edfc7b6ffff4215f3efb4a842240bc8
src/services/googleapi/googleapi.js
src/services/googleapi/googleapi.js
let config = require('config.js'); function queryGoogleApiData(resolve, reject, queryObj) { let google = require('googleapis'); let analytics = google.analytics('v3'); let jwtClient = new google.auth.JWT( config.ga.client_email, null, config.ga.private_key, ['https://www.googleapis.com/auth/anal...
let config = require('config.js'); function queryGoogleApiData(resolve, reject, queryObj) { let google = require('googleapis'); let analytics = google.analytics('v3'); console.log(config.ga); let jwtClient = new google.auth.JWT( config.ga.client_email, null, config.ga.private_key, ['https://w...
Add more google analytics logging
Add more google analytics logging
JavaScript
agpl-3.0
podverse/podverse-web,podverse/podverse-web,podverse/podverse-web,podverse/podverse-web
b4a1dae8e6d8e01c42289a88af667af8d8888cda
lib/transforms/deleteColumn.js
lib/transforms/deleteColumn.js
/** * Delete current column in a table * * @param {Object} opts * @param {Slate.Transform} transform * @param {Number} at * @return {Slate.Transform} */ function deleteColumn(opts, transform, at) { } module.exports = deleteColumn;
const TablePosition = require('../TablePosition'); /** * Delete current column in a table * * @param {Object} opts * @param {Slate.Transform} transform * @param {Number} at * @return {Slate.Transform} */ function deleteColumn(opts, transform, at) { let { state } = transform; let { startBlock } = state; ...
Complete transform to delete a column
Complete transform to delete a column
JavaScript
apache-2.0
strelka-institute/slate-edit-table,strelka-institute/slate-edit-table
8414e0057949458aa6e3dc909815d53ad9d94d09
component/BackgroundMap.js
component/BackgroundMap.js
import React from 'react' import MapView from 'react-native-maps' import { connect } from 'react-redux' import { StyleSheet } from 'react-native' import { updateMap } from '../store/reducer/map' // This slightly strange structure (taking the first element out of the array) // is to avoid pins getting 'stuck' on blue...
import React from 'react' import MapView from 'react-native-maps' import { connect } from 'react-redux' import { StyleSheet } from 'react-native' import { updateMap } from '../store/reducer/map' import merge from '../util/merge' // This slightly strange structure (taking the first element out of the array) // is to ...
Update map and list when marker is pressed
Update map and list when marker is pressed
JavaScript
mit
BristolPound/cyclos-mobile-3-TownPound
1c1dc9023b5cc1c4301a1e3e8c27ed0012bb62d7
tests/.eslintrc.js
tests/.eslintrc.js
module.exports = { env: { 'embertest': true }, extends: [ 'eslint:recommended', 'plugin:ember-suave/recommended' ], globals: { '$': true, 'addOfflineUsersForElectron': true, 'attachCustomForm': true, 'authenticateUser': true, 'checkCustomFormIsDisplayed': true, 'checkCust...
module.exports = { parserOptions: { 'ecmaVersion': 2017, }, env: { 'embertest': true }, extends: [ 'eslint:recommended', 'plugin:ember-suave/recommended' ], globals: { '$': true, 'addOfflineUsersForElectron': true, 'attachCustomForm': true, 'authenticateUser': true, ...
Allow async functions in tests
ESLint: Allow async functions in tests
JavaScript
mit
HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend
54beae205a1537efe7e1f0b5984d982f74a4c4d7
test/List/slice/call.js
test/List/slice/call.js
'use strict'; module.exports = function (t, a) { a(t([1,2,3,4,5], 1, 3).length, 2); };
'use strict'; exports.__generic = function (t, a) { a(t(this, 1, 3).length, 2); };
Bring back scopes support in slice test
Bring back scopes support in slice test
JavaScript
isc
medikoo/es5-ext
0afd5190f357f14eb7a9f0be7a10ff477bb9c25f
static/js/client.js
static/js/client.js
'use strict'; $(document).on('online', function() { console.log('Application got online event, reloading'); window.location.reload(); }); //$(document).ready(function() { // console.log('Application got ready event'); // window.Nightscout.client.init(); //}); window.Nightscout.client.init();
'use strict'; $(document).on('online', function() { console.log('Application got online event, reloading'); window.location.reload(); }); $(document).ready(function() { console.log('Application got ready event'); window.Nightscout.client.init(); });
Revert "see if document ready is the problem when testing on travis"
Revert "see if document ready is the problem when testing on travis" This reverts commit 7428040e0536b55dff48f9b72ea783c25e5afb3c.
JavaScript
agpl-3.0
Gallooggi/cgm-remote-monitor,Jimwedel/cgm-remote-monitor,perkins19/cgm-remote-monitor,JeffJinSD/cgm-remote-monitor,lukedolezal/cgm-remote-monitor,kmasseygh/cgm-remote-monitor-1,live4sw/cgm-remote-monitor,renoca/cgm-remote-monitor,DavMedek/cgm-remote-monitor,LTatu/cgm-remote-monitor,destea1/cgm-remote-monitor,ajbrugnano...
1ca604c898fff72aaa6330728e0070e1bd445fcb
databases/app-config-sync/fragment-feature-release-toggle-definitions.js
databases/app-config-sync/fragment-feature-release-toggle-definitions.js
{ channels: { view: [ 'view-feature-release-toggle-definitions', 'view-config' ], add: [ 'edit-feature-release-toggle-definitions', 'edit-config' ], replace: [ 'edit-feature-release-toggle-definitions', 'edit-config' ], remove: [ 'remove-feature-release-toggle-definitions', 'remove-config' ] }, ty...
{ channels: { view: [ 'view-feature-release-toggle-definitions', 'view-config' ], add: [ 'edit-feature-release-toggle-definitions', 'edit-config' ], replace: [ 'edit-feature-release-toggle-definitions', 'edit-config' ], remove: [ 'remove-feature-release-toggle-definitions', 'remove-config' ] }, ty...
Fix documentation for the feature release toggle definitions document.
CWAP-212: Fix documentation for the feature release toggle definitions document.
JavaScript
mit
Kashoo/kashoo-document-definitions,Kashoo/kashoo-document-definitions
d05754e954d17faba2f999751a915bf2250daf32
lib/blocklocator.js
lib/blocklocator.js
var BlockLocator = exports.BlockLocator = function () { }; BlockLocator.createFromBlockChain = function (blockChain, callback) { var height = blockChain.getTopBlock().height; var step = 1; var heights = []; while (height > 0) { heights.push(height); if (heights.length > 10) { step *= 2; } ...
var BlockLocator = exports.BlockLocator = function () { }; BlockLocator.createFromBlockChain = function (blockChain, callback) { var height = blockChain.getTopBlock().height; var step = 1; var heights = []; while (height > 0) { heights.push(height); if (heights.length > 10) { step *= 2; } ...
Handle case where BlockLocator query turns up empty.
Handle case where BlockLocator query turns up empty. This shouldn't happen in normal operation, but can happen if there is an issue with the database, so we need to handle it.
JavaScript
mit
zhangweis/node-jds,dazoe/bitcoinjs-server,javascriptit/bitcoinjs-server,bankonme/bitcoinjs-server,zhangweis/node-jds,zhangweis/node-jds,bankonme/bitcoinjs-server,dazoe/bitcoinjs-server,bankonme/bitcoinjs-server,javascriptit/bitcoinjs-server,bitfloor/bitcoinjs-server,javascriptit/bitcoinjs-server,bitfloor/bitcoinjs-serv...
4f792a6f740269b07b9717f6e90315cb90a385b8
lib/views/filter.js
lib/views/filter.js
module.exports = { events: { 'submit': 'filter' }, attach: function() { var _view = this; _view.regex = []; this.$('input[data-regex]').each(function() { _view.regex.push({ el: this, namespace: this.name.split('.'), flags: $(this).data('flags') || '' }); }); }, filter: function(e)...
module.exports = { events: { 'submit': 'filter' }, attach: function() { var _view = this; _view.regex = []; this.$('input[data-regex]').each(function() { _view.regex.push({ el: this, namespace: this.name.split('.').map(function(value) { return value.split(':').join('.'); }), flags...
Enable using : to indicate . namespacing for mongo.
Enable using : to indicate . namespacing for mongo.
JavaScript
mit
thecodebureau/ridge
3891e8d019b87a09fb4f79a1f4b9b74b1906536c
JavaScript/console.js
JavaScript/console.js
;(function(global, print, undefined) { 'use strict'; <+CURSOR+> })((this || 0).self || global, typeof console === 'undefined' ? print : console.log);
;(function(global, print, undefined) { 'use strict'; <+CURSOR+> })((this || 0).self || typeof global === 'object' && global || this, typeof console === 'object' && console.log || print);
Use logical operators instead of conditional operators
Use logical operators instead of conditional operators
JavaScript
mit
koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate
d064af9b6686b6bbd939e8d8946cadde1dd02700
config/ember-try.js
config/ember-try.js
/*jshint node:true*/ module.exports = { scenarios: [ { name: 'default', bower: { dependencies: { } } }, { name: 'ember-release', bower: { dependencies: { 'ember': 'components/ember#release' }, resolutions: { 'ember': 'releas...
/*jshint node:true*/ module.exports = { scenarios: [ { name: 'default', bower: { dependencies: { } } }, { name: 'ember-release', bower: { dependencies: { 'ember': 'components/ember#release' }, resolutions: { 'ember': 'releas...
Allow Canary ember try test run to fail
Allow Canary ember try test run to fail
JavaScript
mit
josemarluedke/ember-cli-segment,josemarluedke/ember-cli-segment
87722fe2eaf5575c22da07d8ba9d2c800bbcb86e
lib/s3-paging-stream.js
lib/s3-paging-stream.js
var Readable = require('readable-stream').Readable; function identity(_in) { return _in; } /** * Returns a stream for any paged AWS function * you can optionally provide a mapping function * like S3::listObjectsV2() * * @param {function} req - a non executed AWS function * @param {function} fn - a function th...
var Readable = require('readable-stream').Readable; function identity(_in) { return _in; } /** * Returns a stream for any paged AWS function * you can optionally provide a mapping function * like S3::listObjectsV2() * * @param {function} req - a non executed AWS function * @param {function} fn - a function th...
Fix an assumption around read/page_handler order of operations
Fix an assumption around read/page_handler order of operations
JavaScript
mit
pgherveou/gulp-awspublish
cc21073bb678fd9d36250d4efd1f3507f3ff6616
src/components/RegistrationStatusInfo.js
src/components/RegistrationStatusInfo.js
import React, {Component, PropTypes} from 'react' import Grid from 'react-bootstrap/lib/Grid' import Row from 'react-bootstrap/lib/Row' import Col from 'react-bootstrap/lib/Col' export default class RegistrationStatusInfo extends Component { static propTypes = { } constructor(props) { super(props); this...
import React, {Component, PropTypes} from 'react' import Grid from 'react-bootstrap/lib/Grid' import Row from 'react-bootstrap/lib/Row' import Col from 'react-bootstrap/lib/Col' export default class RegistrationStatusInfo extends Component { constructor(props) { super(props); this.state = props.state || {} ...
Support passing message in as a prop
Support passing message in as a prop
JavaScript
apache-2.0
jack-hoang/registration,jack-hoang/registration
be440ba4915629ba6a9a7fa9dbfeb6f4ecca8a33
webpack.config.build.js
webpack.config.build.js
var webpack = require('webpack'); var ejs = require('ejs'); var MIN = process.argv.indexOf('-p') > -1; function getBanner() { var pkg = require('./bower.json'); var banner = ['/**', ' * <%= pkg.name %> - <%= pkg.description %>', ' * @version v<%= pkg.version %>', ' * @link <%= pkg.homepage %>', ' *...
var webpack = require('webpack'); var ejs = require('ejs'); var MIN = process.argv.indexOf('-p') > -1; function getBanner() { var pkg = require('./bower.json'); var banner = ['/**', ' * <%= pkg.name %> - <%= pkg.description %>', ' * @version v<%= pkg.version %>', ' * @link <%= pkg.homepage %>', ' *...
Fix require of bluebird when installing from npm
Fix require of bluebird when installing from npm
JavaScript
mit
mattlewis92/angular-bluebird-promises,lucastschmidt/angular-bluebird-promises,lucastschmidt/angular-bluebird-promises,mattlewis92/angular-bluebird-promises
fb38eb98a6ef09550b5d0187aaf3146c6af5740c
util/request.js
util/request.js
'use strict'; module.exports = function request(method, url, data, cb) { var request = new XMLHttpRequest(); request.open(method, url, true); request.setRequestHeader('Content-Type', 'application/json; charset=UTF-8'); request.onload = function() { if (request.status >= 200 && request.status < 400) { ...
'use strict'; module.exports = function request(method, url, data, cb) { var request = new XMLHttpRequest(); request.open(method, url, true); request.setRequestHeader('Content-Type', 'application/json; charset=UTF-8'); request.onload = function() { if (request.status >= 200 && request.status < 400) { ...
Return JSON when it's possible.
Return JSON when it's possible.
JavaScript
mit
substance/substance,podviaznikov/substance,michael/substance-1,andene/substance,michael/substance-1,jacwright/substance,andene/substance,substance/substance,stencila/substance,podviaznikov/substance,jacwright/substance
2950e846feb55d648e5051e2ba591893556f2f63
src/scripts/plugins/Transitions/Copy.js
src/scripts/plugins/Transitions/Copy.js
class Copy extends Phaser.Image { constructor (game, width, height) { this._texture = new PIXI.RenderTexture( game.width, game.height, game.renderer); super(game, 0, 0, this._texture); this.clear(); } // -------------------------------------------------------------------------- copyScreen...
class Copy extends Phaser.Image { constructor (game, width, height) { this._texture = new PIXI.RenderTexture(width, height, game.renderer); super(game, 0, 0, this._texture); this.clear(); } // -------------------------------------------------------------------------- copyScreen () { this._t...
Use parameter values (fix jshint warning).
Use parameter values (fix jshint warning).
JavaScript
mit
rblopes/heart-star,rblopes/heart-star
a9d5c56df011f10015601bffe5b8ed6bb984c70c
react-front/src/components/Attendee/Attendee.js
react-front/src/components/Attendee/Attendee.js
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import './Attendee.css'; import Clap from '../../components/Clap/Clap.container'; class Atendee extends Component { constructor(props) { super(props); this.confettiClass = 'button button--large button--circle button--withChrome u...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import './Attendee.css'; import Clap from '../../components/Clap/Clap.container'; class Atendee extends Component { constructor(props) { super(props); this.confettiClass = 'button button--large button--circle button--withChrome u...
Add style to the attendee
Add style to the attendee
JavaScript
mit
adaschevici/firebase-demo,adaschevici/firebase-demo,adaschevici/firebase-demo
885816c694f559b5229c77bd272a7bf11210b973
routes/requests/index.js
routes/requests/index.js
const requestsController = require('../../controllers/requests.js'); const requestHelper = require('../../helpers/requestHelper.js'); module.exports = { '/:request/top/:size': { get: function get(req, res, cb) { const size = parseInt(req.params.size); res.setHeader('Access-Control-Allow-Origin', '*'); ...
const requestsController = require('../../controllers/requests.js'); const requestHelper = require('../../helpers/requestHelper.js'); module.exports = { '/:request/top/:size': { get: function get(req, res, cb) { const size = parseInt(req.params.size); res.setHeader('Access-Control-Allow-Origin', '*'); ...
Add route for todays hits
Add route for todays hits
JavaScript
apache-2.0
seestats/api
8a95afb53506a1f24e9a4486d374a18087bd952c
src/shared/js/msg-handling.js
src/shared/js/msg-handling.js
import { POST_MESSAGE_TYPE_BACKGROUND_SETTINGS } from './constants' import { updateBackgroundSettings } from './background' // Handle messages from webpage. var trustedOrigins = [ 'http://localhost:3000', // dev 'http://tab.gladly.io', 'https://tab.gladly.io', 'http://www.tabforacause.org', 'https://ww...
import { POST_MESSAGE_TYPE_BACKGROUND_SETTINGS } from './constants' import { updateBackgroundSettings } from './background' // Handle messages from webpage. var trustedOrigins = [ 'http://tab.gladly.io', 'https://tab.gladly.io', 'http://www.tabforacause.org', 'https://www.tabforacause.org', 'http://gla...
Add other dev domains to trusted domains.
Add other dev domains to trusted domains.
JavaScript
mit
gladly-team/tab-extensions,gladly-team/tab-extensions,gladly-team/tab-extensions
5252a1d24eef8e687a49ad685d7ceef161edb9cf
client/client.js
client/client.js
//var url = "https://brew-fridge.herokuapp.com"; //var url = "http://localhost:5000"; var url ="http://brew-fridge.azurewebsites.net" var graph = require('./graph.js'); function start() { $.post(url + "/start", function(data) {}); } function stop() { $.post(url + "/stop", function(data) {}); } $(document).ready(f...
//var url = "https://brew-fridge.herokuapp.com"; //var url = "http://localhost:5000"; var url = "http://brew-fridge.azurewebsites.net" var graph = require('./graph.js'); function start() { $.post(url + "/start", function(data) {}); } function stop() { $.post(url + "/stop", function(data) {}); } $(document).ready...
Change to Ajax with JSONP instead of regular ajax
Change to Ajax with JSONP instead of regular ajax
JavaScript
mit
kimsb/brewfridge,simenstoa/brew-fridge,kimsb/brewfridge,simenstoa/brew-fridge,kimsb/brewfridge,simenstoa/brew-fridge
c45fd10f1b6c2ec55c4823563ebe850da40be88e
components/game/news-article/news-article-model.js
components/game/news-article/news-article-model.js
angular.module( 'gj.Game.NewsArticle' ).factory( 'Game_NewsArticle', function( Model, User, Game, Notification, KeyGroup ) { function Game_NewsArticle( data ) { if ( data ) { angular.extend( this, data ); if ( data.game ) { this.game = new Game( data.game ); } if ( data.notification ) { this.n...
angular.module( 'gj.Game.NewsArticle' ).factory( 'Game_NewsArticle', function( Model, User, Game, KeyGroup ) { function Game_NewsArticle( data ) { if ( data ) { angular.extend( this, data ); if ( data.game ) { this.game = new Game( data.game ); } if ( data.key_groups ) { this.key_groups = KeyG...
Remove notification from news article model.
Remove notification from news article model.
JavaScript
mit
gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib
0f2b47dfbebed37079ea0c05df60903a5f55c172
client/routes.js
client/routes.js
import React from 'react'; import { IndexRoute, Route, Router, browserHistory } from 'react-router'; import App from './components/App'; import Home from './components/Home'; import NotFound from './components/NotFound'; export default ( <Router history={browserHistory}> <Route component={App} path='/'...
import React from 'react'; import { IndexRoute, Route, Router, browserHistory } from 'react-router'; import App from './components/App'; import Home from './components/Home'; import NotFound from './components/NotFound'; export default ( <Router history={browserHistory}> <Route component={App} path='/'...
Remove unused isNotFound attribute on 404 route
Remove unused isNotFound attribute on 404 route
JavaScript
mit
Thomas0c/react-starter,richardkall/react-starter,adamjking3/react-redux-apollo-starter
027ecab2cae3eb2bd27dbbc021bcd808db5ccd83
lib/services/configuration.js
lib/services/configuration.js
// Copyright 2014, Renasar Technologies Inc. /* jshint node: true */ 'use strict'; var di = require('di'), fs = require('fs'); module.exports = nconfServiceFactory; di.annotate(nconfServiceFactory, new di.Provide('Services.Configuration')); di.annotate(nconfServiceFactory, new di.Inject( 'nconf' ...
// Copyright 2014, Renasar Technologies Inc. /* jshint node: true */ 'use strict'; var di = require('di'), fs = require('fs'); module.exports = nconfServiceFactory; di.annotate(nconfServiceFactory, new di.Provide('Services.Configuration')); di.annotate(nconfServiceFactory, new di.Inject( 'nconf' ...
Fix nconf to source multiple files
Fix nconf to source multiple files
JavaScript
apache-2.0
YoussB/on-core,YoussB/on-core
1c355beab4b8fc38e6859d10bbdb996543a882dc
.eslintrc.js
.eslintrc.js
module.exports = { extends: require.resolve('@rispa/eslint-config'), rules: { 'no-console': 'off', 'global-require': 'off', 'import/no-dynamic-require': 'off', 'class-methods-use-this': 'off', 'comma-dangle': ['error', { 'arrays': 'ignore', 'objects': 'ignore', 'imports':...
module.exports = { extends: require.resolve('@rispa/eslint-config'), rules: { 'complexity': ['error', 10], 'no-console': 'off', 'global-require': 'off', 'import/no-dynamic-require': 'off', 'class-methods-use-this': 'off', 'comma-dangle': ['error', { 'arrays': 'ignore', 'objec...
Change eslint, add more complexity
Change eslint, add more complexity
JavaScript
mit
rispa-io/rispa-cli
b2e98ae06137d927ae0295dafed0ac286c2cfee7
index.js
index.js
var express = require('express'); var app = express(); app.get('/', function(req, res) { if (new Date().getTime() % 3 === 0) { process.exit(1); } else { res.send('hello world'); } }); var server = app.listen(process.env.BAD_WEBAPP_PORT, function() { var host = server.address().address; var port = se...
var express = require('express'); var app = express(); app.get('/', function(req, res) { if (new Date().getTime() % 3 === 0) { console.log('catastrophic failure!'); res.status(500).send('oh no!'); process.exit(1); } else { console.log('incredible success!'); res.send('hello world'); } }); va...
Return a 500 on exit. Also add a bit of console logging.
Return a 500 on exit. Also add a bit of console logging.
JavaScript
mit
Shyp/bad-webapp
6ff49c5453516503fec91596ace956a3d2329d8a
index.js
index.js
var http = require('http'); var webhookHandler = require('github-webhook-handler'); module.exports = (function() { function chimneypot(opts) { if (!opts || !isOptionsValid(opts)) { throw new Error("Required options: port, path, secret"); } this.options = { port: opts.port, path: opts.p...
var http = require('http'); var webhookHandler = require('github-webhook-handler'); module.exports = (function() { function chimneypot(opts) { if (!opts || !isOptionsValid(opts)) { throw new Error("Required options: port, path, secret"); } this.options = { port: opts.port, path: opts.p...
Create the initial server listen
Create the initial server listen
JavaScript
unlicense
chimneypot/chimneypot
454c76e0f1181e21d93f9ff9614b0e27a846da88
index.js
index.js
'use strict'; // Electron doesn't support notifications in Windows yet. https://github.com/atom/electron/issues/262 // So we hijack the Notification API.' const ipc = require('electron').ipcRenderer; module.exports = () => { const OldNotification = Notification; Notification = function (title, options) { // Send...
'use strict'; // Electron doesn't automatically show notifications in Windows yet, and it's not easy to polyfill. // So we have to hijack the Notification API. let ipc; try { // Using electron >=0.35 ipc = require('electron').ipcRenderer; } catch (e) { // Assume it's electron <0.35 ipc = require('ipc'); } module....
Add fallback for electron <0.35
Add fallback for electron <0.35
JavaScript
mit
seriema/electron-notification-shim
bfbca35c090a1a4c5ee98119acc54d413b2186af
index.js
index.js
'use strict'; var through = require('through') var write = function write(data) { var envArr = data.split('=') var envObj = { key: envArr[0], value: envArr[1] } this.emit('data', envObj) } var end = function end () { this.emit('end') } module.exports = through(write, end)
'use strict'; var through = require('through') var write = function write(data) { data = data.toString('utf8') //split on first occurance of = var envArr = data.split(/=(.+)?/) //clean up value, extracting from quotation if necessary var val = envArr[1].replace(/^['"]/, '').replace(/['"]$/, '') var en...
Update module to handle test spec
Update module to handle test spec
JavaScript
mit
digitalsadhu/env-parser
fd9984abab8f871d0344d6c76d05da93a2d2fd00
index.js
index.js
(function(global) { var indexOfProperty = function(property, value) { var length = this.length; for (var i = 0; i < length; ++i) { if (this[i][property] === value) { return i; } } return -1; }; if (!Array.prototype.indexOfProperty) { Array.prototype.indexOfProperty = inde...
(function(global) { var indexOfProperty = function(property, value) { var length = this.length; for (var i = 0; i < length; ++i) { if (this[i][property] === value) { return i; } } return -1; }; if (!Array.prototype.indexOfProperty) { Object.defineProperty(Array.prototype,...
Change how method is defined on Array prototype
Change how method is defined on Array prototype
JavaScript
mit
rafaelmenta/array-index-of-property
86827e6eca8f9532b4c97a5d6d963b55ae460923
index.js
index.js
var es = require('event-stream') , clone = require('clone') , sass = require('node-sass') , ext = require('gulp-util').replaceExtension ; module.exports = function (options) { var opts = options ? clone(options) : {}; function nodeSass (file, cb) { if (file.isNull()) { return cb(null, fil...
var es = require('event-stream') , clone = require('clone') , sass = require('node-sass') , path = require('path') , gutil = require('gulp-util') , ext = gutil.replaceExtension ; module.exports = function (options) { var opts = options ? clone(options) : {}; function nodeSass (file, cb) { /...
Update error handling and handled partials
Update error handling and handled partials 1. Updated so as an error is logged rather than reported as an error as this will stop the watcher which could be annoying - although may be a preference option? 2. Added logic to ignore a partial (doesn't log) essentially a sass file prefixed with '_'
JavaScript
mit
Snugug/gulp-sass,xzyfer/gulp-sass,Mirtle/gulp-sass,minted/gulp-sass,dazld/gulp-sass,jlgeering/gulp-sass,zacwasielewski/gulp-sass-liquid,maxaille/gulp-sass,danreeves/gulp-sass,eoneill/gulp-sass,EdwonLim/gulp-sass-china,mariusGundersen/gulp-sass,emil-mi/gulp-sass,nstokoe/gulp-sass,dlmanning/gulp-sass,cinic/gulp-sass,call...
a04ef2109c15203ec27d8c7a22572e8073835266
index.js
index.js
'use strict'; var micromatch = require('micromatch'); var arrify = require('arrify'); var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) { criteria = arrify(criteria); value = arrify(value); if (arguments.length === 1) { return criteria.length === 1 ? micromatch.matcher(criter...
'use strict'; var micromatch = require('micromatch'); var arrify = require('arrify'); var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) { criteria = arrify(criteria); value = arrify(value); if (arguments.length === 1) { return criteria.length === 1 ? micromatch.matcher(criter...
Use micromatch.matcher on criteria arrays too
Use micromatch.matcher on criteria arrays too should pre-optimize globs by retaining their converted regexes
JavaScript
isc
es128/anymatch,floatdrop/anymatch
64590261f431e181b3c8bb11cf5ac6930c73a0a9
index.js
index.js
var exec = require('child_process').exec; var through = require('through2'); var gutil = require('gulp-util'); var merge = require('merge'); var PluginError = gutil.PluginError; var vnuJar = require('vnu-jar'); module.exports = function(opt) { var vnuCmd = 'java -Xss512k -jar ' + vnuJar + ' '; var options = merge...
var exec = require('child_process').exec; var through = require('through2'); var gutil = require('gulp-util'); var merge = require('merge'); var PluginError = gutil.PluginError; var vnuJar = require('vnu-jar'); module.exports = function(opt) { var vnuCmd = 'java -Xss512k -jar ' + vnuJar + ' '; var options = merge...
Use stdout when stderr is empty
Use stdout when stderr is empty
JavaScript
mit
watilde/gulp-html,watilde/gulp-html
3722ec329be4900a00388bdc40a1da3f2ba7a8ea
examples/async/actions/PostsActions.js
examples/async/actions/PostsActions.js
import fetch from 'isomorphic-fetch'; export function invalidateReddit({ reddit }) { return arguments[0]; } function requestPosts({ reddit }) { return arguments[0]; } function receivePosts({ reddit, json }) { return { reddit, posts: json.data.children.map(child => child.data), receivedAt: Date.now...
import fetch from 'isomorphic-fetch'; export function invalidateReddit({ reddit }) {} export function requestPosts({ reddit }) {} export function receivePosts({ reddit, json }) { return { reddit, posts: json.data.children.map(child => child.data), receivedAt: Date.now() }; } function fetchPosts({ r...
Use new currentActionSet in async
Use new currentActionSet in async
JavaScript
apache-2.0
BurntCaramel/flambeau
ac9a6a7aca075e9e8fe15f6d3ef86166842759ba
index.js
index.js
'use strict'; var acquire = require('acquire'), mapKeys = require('map-keys'), camelCase = require('camel-case'); var fs = require('fs'), path = require('path'), EventEmitter = require('events'); module.exports = function (repl, dir) { var ee = new EventEmitter; process.nextTick(function () { ...
'use strict'; var acquire = require('acquire'), mapKeys = require('map-keys'), camelCase = require('camel-case'); var fs = require('fs'), path = require('path'), EventEmitter = require('events').EventEmitter; module.exports = function (repl, dir) { var ee = new EventEmitter; process.nextTick(fu...
Fix EventEmitter on Node 0.10
Fix EventEmitter on Node 0.10
JavaScript
mit
eush77/repl-here
994bb8646b82c2a841a42d5f5350d92e28721f21
lumify-web-war/src/main/webapp/js/util/withAsyncQueue.js
lumify-web-war/src/main/webapp/js/util/withAsyncQueue.js
define([], function() { 'use strict'; return withAsyncQueue; function withAsyncQueue() { this.before('initialize', function() { var self = this, deferreds = {}, stacks = {}; this.setupAsyncQueue = function(name) { var stac...
define([], function() { 'use strict'; return withAsyncQueue; function withAsyncQueue() { this.before('initialize', function() { var self = this, deferreds = {}, stacks = {}; this.setupAsyncQueue = function(name) { var stac...
Fix error from removed api after upgrading jquery
Fix error from removed api after upgrading jquery
JavaScript
apache-2.0
dvdnglnd/lumify,j-bernardo/lumify,j-bernardo/lumify,Steimel/lumify,TeamUDS/lumify,bings/lumify,TeamUDS/lumify,RavenB/lumify,dvdnglnd/lumify,lumifyio/lumify,RavenB/lumify,lumifyio/lumify,lumifyio/lumify,TeamUDS/lumify,TeamUDS/lumify,dvdnglnd/lumify,RavenB/lumify,TeamUDS/lumify,bings/lumify,bings/lumify,j-bernardo/lumify...
dafb6cc2582a8cd8e22a76b45c5cbc8756b0d9e9
index.js
index.js
// Native const fs = require('fs') const path = require('path') const styles = fs.readFileSync(path.join(__dirname, 'styles.css'), 'utf8') const colors = { yellow: '#afaf00', lightGreen: '#30de04' } exports.decorateConfig = config => Object.assign({}, config, { padding: '7px 7px', backgroundColor: '#fff', ...
// Native const fs = require('fs') const path = require('path') const styles = fs.readFileSync(path.join(__dirname, 'styles.css'), 'utf8') const colors = { yellow: '#afaf00', lightGreen: '#30de04' } exports.decorateConfig = config => Object.assign({}, config, { padding: '7px 7px', backgroundColor: '#fff', ...
Make it work with VIM
Make it work with VIM
JavaScript
mit
leo/hyperterm-native
f5cf9c4f3e27d74038a08345cf50a60ac65c3370
index.js
index.js
exports.decorateConfig = (config) => { return Object.assign({}, config, { foregroundColor: '#ECEFF1', backgroundColor: '#263238', borderColor: '#222d32', cursorColor: 'rgba(0, 150, 136, .5)', colors: [ '#263238', '#FF5252', '#9CCC65', '#fee94e', '#2b98f0', '#b38...
exports.decorateConfig = (config) => { return Object.assign({}, config, { foregroundColor: '#ECEFF1', backgroundColor: '#263238', borderColor: '#222d32', cursorColor: 'rgba(0, 150, 136, .5)', colors: [ '#263238', '#FF5252', '#9CCC65', '#fee94e', '#2b98f0', '#b38...
Fix active tab bottom border
Fix active tab bottom border
JavaScript
isc
dperrera/hyperterm-material
50e9fa81c10fc0ba3481f521e2da4e58f5896fdc
index.js
index.js
var path = require('path'); var notifier = require('node-notifier'); var WebpackNotifierPlugin = module.exports = function() { this.lastBuildSucceeded = false; }; WebpackNotifierPlugin.prototype.compileMessage = function(stats) { var error; if (stats.hasWarnings()) { error = stats.compilation.warn...
var path = require('path'); var notifier = require('node-notifier'); var WebpackNotifierPlugin = module.exports = function(options) { this.lastBuildSucceeded = false; this.options = options || {}; }; WebpackNotifierPlugin.prototype.compileMessage = function(stats) { var error; if (stats.hasErrors()) {...
Allow specifying options to ignore warnings
Allow specifying options to ignore warnings I have a dependency that results in a warning every time it builds (the request of a dependency is an expression). I don't think that there's a way for me to avoid this one, so I'd prefer to be able to specify that I don't want to show warnings.
JavaScript
isc
Turbo87/webpack-notifier,Turbo87/webpack-notifier
753632ae6081e3bff4b950b7610d77c39337d442
index.js
index.js
#!/usr/bin/env node 'use strict'; var program = require('commander') , gulp = require('gulp') , chalk = require('chalk') , exec = require('exec') , pjson = require('./package.json') var strings = { create: 'Creating new project', install: 'Installing dependencies', complete: 'Done!' } var pa...
#!/usr/bin/env node 'use strict'; var program = require('commander') , gulp = require('gulp') , chalk = require('chalk') , exec = require('exec') , pjson = require('./package.json') var strings = { create: 'Creating new project', install: 'Installing dependencies', complete: 'Done!' } var pa...
Fix new command script description
Fix new command script description
JavaScript
mit
jinn-tool/jinn
e0b0223541ccef296fc829dd90bda2cb0db8ea67
index.js
index.js
'use strict'; const https = require('https'); const request = require('request'); console.log('Loading function'); exports.handler = (event, context, callback) => { var token = event.token; var body = ""; var githubOptions = { url: "https://api.github.com/notifications", headers: { ...
'use strict'; const https = require('https'); const request = require('request'); console.log('Loading function'); exports.handler = (event, context, callback) => { var token = event.token; var body = ""; var githubOptions = { url: "https://api.github.com/notifications", headers: { ...
Define options for API at near place
Define options for API at near place
JavaScript
mit
yoshihara/gnotiflack
6bff5853f7f0e44c6bb4c3cd0755203f0dd99df0
index.js
index.js
'use strict'; var got = require('got'); var _ = require('lodash'); module.exports = function (opts, callback) { opts = opts || ''; var requestURL = (opts === 'qotd') ? 'https://favqs.com/api/qotd.json' : 'https://favqs.com/api/quotes' + _.random(0, 9999); got(requestURL, function (err, data, response) { if (er...
'use strict'; var got = require('got'); var _ = require('lodash'); module.exports = function (opts, callback) { opts = opts || ''; var requestURL = (opts === 'qotd') ? 'https://favqs.com/api/qotd.json' : 'https://favqs.com/api/quotes/'; var headers = { 'Authorization': 'Token token=a857a430e3a1e6d481eaafc1ab6e...
Add API key and parse returned data properly
Add API key and parse returned data properly
JavaScript
mit
barbietunnie/quote-cli,riyadhalnur/quote-cli
453cca000a42d3f0e2ca9f7887faf2f643b69928
index.js
index.js
'use strict'; var gulp = require('gulp'); // for gulp.watch module.exports = function(lingon, config) { if(!config) config = {}; config.watchDir = config.watchDir || process.cwd() + '/' + lingon.sourcePath; config.watchDir += "/**/*"; console.log(config.watchDir); var watchFn = function() {...
'use strict'; var gulp = require('gulp'); // for gulp.watch module.exports = function(lingon, config) { if(!config) config = {}; config.watchDir = config.watchDir || process.cwd() + '/' + lingon.config.sourcePath; config.watchDir += "/**/*"; console.log(config.watchDir); var watchFn = funct...
Update to work with lingon 2.*
Update to work with lingon 2.*
JavaScript
mit
nikek/lingon-watch
e3546a724540a0d29c07e347887df94c3f8de5c4
index.js
index.js
var es = require('event-stream'), uglify = require('uglify-js'), clone = require('clone'); module.exports = function() { 'use strict'; function minify(file, callback) { var newFile = clone(file); newFile.contents = new Buffer(uglify.minify(String(file.contents), {fromString: true}).code); callback(null, n...
var es = require('event-stream'), uglify = require('uglify-js'); module.exports = function(opt) { 'use strict'; opt = opt || {}; opt.fromString = true; return es.map(function (file, callback) { file.contents = new Buffer(uglify.minify(String(file.contents), opt).code); callback(null, file); }); };
Clone is no longer necessary, allow passing in options
Clone is no longer necessary, allow passing in options
JavaScript
mit
cqol/gulp-uglify,letrunghieu/gulp-uglify,odino/gulp-uglify,xsurge83/gulp-uglify,zaygraveyard/gulp-uglify,ebakan/gulp-uglify,butchi/gulp-decodecode,RobertJGabriel/gulp-uglify,terinjokes/gulp-uglify
a96cb2f4313c08c4f70ebf3e065b41cf514c4175
scripts/releaseHotels.js
scripts/releaseHotels.js
// @flow const path = require('path'); const child_process = require('child_process'); const exec = (command, options) => child_process.execSync(command, { stdio: 'inherit', ...options, }); const hotelPath = path.join(__dirname, '..', 'app', 'hotels'); const buildPath = path.join(__dirname, '..', '.build...
// @flow const path = require('path'); const child_process = require('child_process'); const exec = (command, options) => child_process.execSync(command, { stdio: 'inherit', ...options, }); const hotelPath = path.join(__dirname, '..', 'app', 'hotels'); const buildPath = path.join(__dirname, '..', '.build...
Make Android build script output to be Gradle compatible
Make Android build script output to be Gradle compatible
JavaScript
mit
mrtnzlml/native,mrtnzlml/native
98244e63c9665afadfce8e8a14ea193acc1bab7b
index.js
index.js
var EventEmitter = require('events').EventEmitter , inherits = require('inherits') module.exports = fps // Try use performance.now(), otherwise try // +new Date. var now = ( (function(){ return this }()).performance && 'function' === typeof performance.now ) ? function() { return performance.now() } : functio...
var EventEmitter = require('events').EventEmitter , inherits = require('inherits') module.exports = fps // Try use performance.now(), otherwise try // +new Date. var now = ( (function(){ return this }()).performance && 'function' === typeof performance.now ) ? function() { return performance.now() } : Date.no...
Allow for using Date.now too...
Allow for using Date.now too...
JavaScript
mit
hughsk/fps
f993d67733aa307ab3f7486deb63024c9a46121b
index.js
index.js
// see http://www.mathgen.ch/codes/tfn.html var weights = [1, 4, 3, 7, 5, 8, 6, 9, 10]; var multiple = 11; module.exports = function validateTFN(tfn) { var digits = tfn.replace(/[^\d]/g, '').split('').map(Number); if (digits.length != 9) return { valid: false }; var sum = digits.reduce(function(p, v, i) {...
// see http://www.mathgen.ch/codes/tfn.html var nineDigitTfnWeights = [1, 4, 3, 7, 5, 8, 6, 9, 10]; var eightDigitTfnWeights = [10, 7, 8, 4, 6, 3, 5, 1, 0]; var multiple = 11; module.exports = function validateTFN(tfn) { var digits = tfn.replace(/[^\d]/g, '').split('').map(Number); if (digits.length == 8) { ...
Update module to support 8 digit TFN
Update module to support 8 digit TFN
JavaScript
mit
sidorares/tfn
86d81edec82392745b3e547be42a9b9117e2e8b9
shared/db.js
shared/db.js
'use strict'; const Promise = require('bluebird'); const pg = require('pg'); const database = JSON.parse( process.env.PLATFORM_RELATIONSHIPS ? new Buffer(process.env.PLATFORM_RELATIONSHIPS, 'base64').toString('ascii') : // Development settings JSON.stringify({ database: [{ ...
'use strict'; const Promise = require('bluebird'); const pg = require('pg'); const database = JSON.parse( process.env.PLATFORM_RELATIONSHIPS ? new Buffer(process.env.PLATFORM_RELATIONSHIPS, 'base64').toString('ascii') : // Development settings JSON.stringify({ database: [{ ...
Fix the missing host variable
Fix the missing host variable
JavaScript
mit
ralt/dpsv,ralt/dpsv
707e66c6558eb42904311c9f1ca9ebe9ba5a8a1c
Cloudy/cloudy.js
Cloudy/cloudy.js
var Cloudy = { isEpisodePage: function() { return $("#audioplayer").length == 1; }, sendEpisodeToCloudy: function() { var episodeTitle = $(".titlestack .title").text(); var showTitle = $(".titlestack .caption2").text(); var details = { "show_title": showTitle, ...
var Cloudy = { isEpisodePage: function() { return $("#audioplayer").length == 1; }, getEpisodeDetails: function() { var episodeTitle = $(".titlestack .title").text(); var showTitle = $(".titlestack .caption2").text(); return { show_title: showTitle, e...
Refactor episode details JavaScript functions.
Refactor episode details JavaScript functions.
JavaScript
mit
calebd/cloudy,calebd/cloudy
778a9afc88441b5faa82a72f9a9ee416967dcd81
app.js
app.js
var express = require('express'); var jade = require('jade'); require('mootools'); var app = express(); app.configure(function(){ app.set('view engine', 'jade'); app.set('views', __dirname + '/views'); app.set('view options', { layout: 'shared/layout' }); app.use(express.methodOverride()); app.use(expr...
var express = require('express'), app = express(), controller = require('./classes/controller.class'); controller.initialize(app); app.configure(function(){ app.set('view engine', 'jade'); app.use(express.static(__dirname + '/public')); app.use(express.cookieParser()); app.use(express.sessio...
Clean up init script, tabs -> spaces (eek)
Clean up init script, tabs -> spaces (eek)
JavaScript
mit
fakedarren/edamame
3b93a944d0810ced8a8b475797e56ebf8a6698ef
app.js
app.js
#!/usr/bin/env node const express = require('express'); const app = express(); app.set('port', (process.env.PORT || 5000)); app.get('/', function (req, res) { console.log("/"); res.sendFile(__dirname + '/static/index.html'); }); const calendar = require('./calendar.js'); app.get('/calendar', (req, res) => ...
#!/usr/bin/env node const express = require('express'); const app = express(); app.set('port', (process.env.PORT || 5000)); app.get('/', function (req, res) { console.log("/"); res.sendFile(__dirname + '/static/index.html'); }); const calendar = require('./calendar.js'); app.get('/calendar', (req, res) => ...
Handle errors from the calendar module
Handle errors from the calendar module
JavaScript
mit
theseal/hockey-mchockeyface,theseal/hockey-mchockeyface
87cbb2614244df08fa4de0e5dd0b68355537cfd3
src/index.js
src/index.js
import Ghastly from './client/Ghastly'; import configure from './core/configure'; import provide from './middleware/provide'; export { Ghastly as Client, configure, provide, }; export default Ghastly;
import Dispatcher from './client/Dispatcher'; import Ghastly from './client/Ghastly'; import configure from './core/configure'; import provide from './middleware/provide'; export { Dispatcher, Ghastly as Client, configure, provide, };
Add Dispatcher export. Remove default export.
Add Dispatcher export. Remove default export.
JavaScript
mit
hkwu/ghastly
f079bab134dcf6eb5244eb25fed7c2985e2cfa16
routes/users.js
routes/users.js
const express = require('express'), router = express.Router(), db = require('../models'); router.get('/', function(req, res, next) { res.render('index'); }); router.get('/new', function(req, res, next) { res.render('users/new'); }); router.get('/:id/edit', function(req, res, next) { db.User.findByI...
const express = require('express'), router = express.Router(), db = require('../models'); router.get('/', function(req, res, next) { res.render('index'); }); router.get('/new', function(req, res, next) { res.render('users/new'); }); router.get('/:username', function(req, res, next) { // db.User.fin...
Change :id to :username for more clarity
Change :id to :username for more clarity
JavaScript
mit
tymeart/mojibox,tymeart/mojibox
41caf3f37c05e6cd07aaceafc37a563325bdbe12
app.js
app.js
import express from 'express'; import logger from 'morgan'; import bodyParser from 'body-parser'; import passport from 'passport'; import http from 'http'; import routes from './server/routes'; const app = express(); const port = parseInt(process.env.PORT, 10) || 8080; app.use(logger('dev')); app.use(bodyParser.json(...
import express from 'express'; import logger from 'morgan'; import bodyParser from 'body-parser'; import passport from 'passport'; import http from 'http'; import routes from './server/routes'; import models from './server/models'; const app = express(); const port = parseInt(process.env.PORT, 10) || 8080; app.use(lo...
Remove code to create tables
Remove code to create tables
JavaScript
mit
3m3kalionel/PostIt,3m3kalionel/PostIt
4a215fb74167675485df7d6d2fb1197a184cc461
src/index.js
src/index.js
import createStore from './createStore' import combineReducers from './combineReducers' import bindActionCreators from './bindActionCreators' import applyMiddleware from './applyMiddleware' import compose from './compose' import warning from './utils/warning' import __DO_NOT_USE__ActionTypes from './utils/actionTypes' ...
import createStore from './createStore' import combineReducers from './combineReducers' import bindActionCreators from './bindActionCreators' import applyMiddleware from './applyMiddleware' import compose from './compose' import warning from './utils/warning' import __DO_NOT_USE__ActionTypes from './utils/actionTypes' ...
Update mixed env message for Webpack 4
Update mixed env message for Webpack 4
JavaScript
mit
CompuIves/redux,CompuIves/redux,gaearon/redux,gaearon/redux
5e1b185989a29084727bcd981aeed087e94095ef
start.js
start.js
const commandLineArgs = require('command-line-args'); const childProcess = require('child_process'); function launchPolyserve(isDev) { const spawn = childProcess.spawn; const apiPath = process.env.API || 'http://localhost:3000/'; const options = [ 'serve', '--compile=never', '--proxy-path=api', ...
const commandLineArgs = require('command-line-args'); const childProcess = require('child_process'); function launchPolyserve(isDev) { const spawn = childProcess.spawn; const apiPath = process.env.API || 'http://localhost:3000/'; const options = [ 'serve', '--hostname=0.0.0.0', '--compile=never', ...
Change hostname to 0.0.0.0 for Docker
Change hostname to 0.0.0.0 for Docker
JavaScript
apache-2.0
frocher/bnb_app,frocher/bnb_app
63489167ca77271ec1c2d10a34432caf2faad5bf
src/index.js
src/index.js
import express from 'express'; import handleRoutes from './handle-routes'; import config from './commons/config'; import connectDb from './commons/db'; const app = express(); handleRoutes(app); // app.start = () => { // return connectDb() // .then(() => { // app.listen(config.app.port, config.app.host, (...
import express from 'express'; import handleRoutes from './handle-routes'; import config from './commons/config'; import connectDb from './commons/db'; const app = express(); handleRoutes(app); app.use((err, req, res, next) => { console.error(err.stack); res.status(500).json({ error: 'Something failed!' }); ne...
Add error handler for express
Add error handler for express
JavaScript
mit
BrunoCamargos/billdone
226d0a0fc0181bc887c6e0f5aecb387d7346f104
src/index.js
src/index.js
class FakeStorage { #data = {}; get length() { return Object.keys(this.#data).length; } key(n) { return Object.keys(this.#data)[Number.parseInt(n, 10)] ?? null; } getItem(key) { const _data = this.#data; const _key = `${key}`; return _data.hasOwnProperty(_key) ? _data[_key] : null; ...
class FakeStorage { #data = new Map(); get length() { return this.#data.size; } key(n) { n = Number.parseInt(n, 10); const iterator = this.#data.keys(); let i = 0; let result = iterator.next(); while (!result.done) { if (i === n) { return result.value; } i += ...
Refactor internals to store date in a Map instead of Object
Refactor internals to store date in a Map instead of Object
JavaScript
mit
jacobbuck/fake-storage
17be319e0400862284dd69158fdecf9e8e819936
src/index.js
src/index.js
var through = require ('through2') var mjmlDefaultEngine = require ('mjml') var gutil = require ('gulp-util') var GulpError = gutil.PluginError var NAME = 'MJML' module.exports = function mjml (mjmlEngine, options) { if(mjmlEngine === undefined) { mjmlEngine = mjmlDefaultEngine } if (options === undefined) ...
var through = require ('through2') var mjmlDefaultEngine = require ('mjml') var gutil = require ('gulp-util') var GulpError = gutil.PluginError var NAME = 'MJML' module.exports = function mjml (mjmlEngine, options) { if(!mjmlEngine) { mjmlEngine = mjmlDefaultEngine } if (options === undefined) { options...
Allow mjmlEngine to be null
Allow mjmlEngine to be null It looks better when we want to pass options but no mjmlEngine ``` mjml(null, {}) // :) mjml(undefined, {}) // :( ```
JavaScript
mit
mjmlio/gulp-mjml
d03ed1872a2cb86c4b04fea1b6c6618b8a072245
src/index.js
src/index.js
import React from 'react'; export default function pendingComponent(hasLoadedTest, ReadyComponent, NotReadyComponent) { return (props) => { if (hasLoadedTest(props)) { return <ReadyComponent { ...props } />; } else { return <NotReadyComponent />; } } }
import React from 'react'; export default function pending(NotReadyComponent) { return (hasLoadedTest, ReadyComponent) => (props) => { if (hasLoadedTest(props)) { return <ReadyComponent { ...props } />; } else { return <NotReadyComponent />; } } }
Make pending function curried, to be set up with NotReadyComponent
Make pending function curried, to be set up with NotReadyComponent
JavaScript
mit
BurntCaramel/react-pending
4c41a55403c67af67d122eb6de426ca9fd162951
src/sputils.user.js
src/sputils.user.js
function $_global_sputils_user () { (function (window) { 'use strict'; var loginAsAnotherUser = function () { window.location.href = "/_layouts/closeconnection.aspx?loginasanotheruser=true"; }; var logoutUser = function () { window.location.href = "/_layouts/closeconnection.aspx"; };...
function $_global_sputils_user () { (function (window) { 'use strict'; var loginAsAnotherUser = function () { window.location.href = "/_layouts/closeconnection.aspx?loginasanotheruser=true"; }; var logoutUser = function () { window.location.href = "/_layouts/closeconnection.aspx"; };...
Add getCurrentUser function in User module
Add getCurrentUser function in User module User utility getCurrentUser that returns a promise with the current SPUser object.
JavaScript
mit
BoolNordicAB/sharepoint-utilities,roobie/sharepoint-utilities,roobie/sharepoint-utilities
0ab817d3a8bb3c5c373378506a93e25cd958c336
load/mediator/http-handler.js
load/mediator/http-handler.js
'use strict' function handleRequest (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}) res.end('Hello world') } exports.handleRequest = handleRequest
'use strict' function respondImmediately (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}) res.end('Hello world') } function handleRequest (req, res) { if (req.url === '/immediate') { return respondImmediately(req, res) } res.writeHead(404) res.end() } exports.handleRequest = handleRequ...
Add endpoint which responds immediately
Add endpoint which responds immediately For stress testing the OpenHIM. OHM-552
JavaScript
mpl-2.0
jembi/openhim-core-js,jembi/openhim-core-js
31aa429a86abbec426316fd9a489e85361ecdb00
test/cypress/support/index.js
test/cypress/support/index.js
/* eslint-disable */ import '@cypress/code-coverage/support' require('./commands')
/* eslint-disable */ import '@cypress/code-coverage/support' require('./commands') Cypress.Keyboard.defaults({ keystrokeDelay: 5, })
Increase typing speed when filling out forms x2
Increase typing speed when filling out forms x2
JavaScript
mit
uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend
5873a7d87fbcec834ac9aeeab7180c482706af22
examples/colors.js
examples/colors.js
var green = '\u001b[42m \u001b[0m'; var red = '\u001b[41m \u001b[0m'; var ProgressBar = require('../'); var bar = new ProgressBar(' [:bar]', { complete: green, incomplete: red, total: 20 }); var id = setInterval(function (){ bar.tick(); if (bar.complete) { clearInterval(id); } }, 100);
var green = '\u001b[42m \u001b[0m'; var red = '\u001b[41m \u001b[0m'; var ProgressBar = require('../'); var bar = new ProgressBar(' :title [:bar] :percent', { complete: green, incomplete: red, total: 20 }); var id = setInterval(function (){ bar.tick({title: 'Download:'}); if (bar.complete) { clearInter...
Update title and percent complete
Update title and percent complete
JavaScript
mit
Vietworm/node-progress
1c71e5ab478d85a62b3c7b61384cb54041a6ad16
server/server.js
server/server.js
'use strict'; var path = require('path'), React = require('react'), navigateAction = require('flux-router-component').navigateAction, bodyParser = require('body-parser'), express = require('express'), server = express(), morgan = require('morgan'), logger = require('./logger'), renderOn...
'use strict'; var path = require('path'), navigateAction = require('flux-router-component').navigateAction, bodyParser = require('body-parser'), express = require('express'), server = express(), morgan = require('morgan'), logger = require('./logger'), renderOnServer = require('./lib/render...
Remove unused require of react
Remove unused require of react
JavaScript
mit
lxanders/community
7cd3a624fa17974959bc33436314e6d0d0b237a2
script/build.js
script/build.js
import {join} from 'path' import {terser} from 'rollup-plugin-terser' import size from 'rollup-plugin-size' const options = {mangle: true, compress: false, toplevel: true} const defaults = { onwarn(warning, warn) { switch (warning.code) { case 'CIRCULAR_DEPENDENCY': return default: warn(warning) } ...
import {join} from 'path' import {terser} from 'rollup-plugin-terser' import size from 'rollup-plugin-size' const options = {mangle: true, compress: false, toplevel: true} const defaults = { onwarn(warning, warn) { switch (warning.code) { case 'CIRCULAR_DEPENDENCY': return default: warn(warning) } ...
Simplify output bundles by making .cjs an UMD bundle
Simplify output bundles by making .cjs an UMD bundle
JavaScript
mit
thysultan/stylis.js,thysultan/stylis.js,thysultan/stylis.js
7d4ad6b00bd443822b9d0503abdbf2632b434a4e
src/Header/index.js
src/Header/index.js
import React from 'react/addons'; import NavMenu from './NavMenu'; export default class Header extends React.Component { constructor(props) { super(props); } render() { let navMenu; if (this.props.config.header_menu_links.length > 0) { navMenu = <NavMenu config={this.props.config} /> } ...
import React from 'react/addons'; import NavMenu from './NavMenu'; export default class Header extends React.Component { constructor(props) { super(props); } render() { let navMenu; if (this.props.config.headerMenuLinks.length > 0) { navMenu = <NavMenu links={this.props.config.headerMenuLinks...
Use proper constant for logo link
Use proper constant for logo link
JavaScript
apache-2.0
naltaki/naltaki-front,naltaki/naltaki-front
1626895bbe6598560b75455f249c495a6e9e8fd3
src/utils.js
src/utils.js
import fs from "fs"; import InputStream from "./InputStream"; export function isGreyspace(string) { if (string === "" || string === " " || string === "\n" || /^\s*$/.test(string)) { return true; } if (string === undefined || string === null) throw new Error("passed ...
import fs from "fs"; import InputStream from "./InputStream"; export function isGreyspace(string) { if (string === "" || string === " " || string === "\n" || /^\s*$/.test(string)) { return true; } if (string === undefined || string === null) throw new Error("passed ...
Change debug logger to be synchronous.
Change debug logger to be synchronous.
JavaScript
mit
Mark-Simulacrum/attractifier,Mark-Simulacrum/pretty-generator
03e1ace65afad97aee1296b697462b467e50dc2d
src/common/appId.js
src/common/appId.js
var utils = require('utils'); var AppId = { app_id: ( document.location.port === '8080' ) ? 1168 : ( ( document.location.hostname.indexOf('github.io') >= 0 ) ? 1180 : 1169 ), redirectOauth: function oauthLogin(){ document.location = 'https://oauth.binary.com/oauth2/authorize?app_id=' + this.app_id + '&l=' + window...
var utils = require('utils'); var $ = require('jquery'); var AppId = { app_id: ( document.location.port === '8080' ) ? 1168 : ( ( document.location.hostname.indexOf('github.io') >= 0 ) ? 1180 : 1169 ), redirectOauth: function oauthLogin(){ document.location = 'https://oauth.binary.com/oauth2/authorize?app_id=' + t...
Hide body of the index page when redirecting
Hide body of the index page when redirecting
JavaScript
mit
aminmarashi/binary-bot,aminmarashi/binary-bot,binary-com/binary-bot,binary-com/binary-bot
37cad1765caea16caa66e21996839eab09b8e450
extra/routeToURL.js
extra/routeToURL.js
// Fluxex extra action // you should attach a `routing()` action creator on your fluxexapp // For most case you will not require this file directly // See routing.js for more info // // To support IE8, // You will need to npm install html5-history-api, // then add require('fluxex/extra/history'); in your fluxexapp.js ...
// Fluxex extra action // you should attach a `routing()` action creator on your fluxexapp // For most case you will not require this file directly // See routing.js for more info // // To support IE8, // You will need to npm install html5-history-api, // then add require('fluxex/extra/history'); in your fluxexapp.js ...
Support routing termination on client side
Support routing termination on client side
JavaScript
mit
zordius/fluxex,zordius/fluxex
7bbe616ec22469b3eb3c20088a7cdceb17a59db7
feedsportal.user.js
feedsportal.user.js
// ==UserScript== // @name Feedsportal Ads-Skipper // @namespace http://github.com/bodo/userscripts // @description Remove Feedsportal Ads // @include http://da.feedsportal.com/* // ==/UserScript== links = document.evaluate("//div[@align='right']/p/a[1]", document, null, XPathResult.UNORDERED_N...
// ==UserScript== // @name Feedsportal Ads-Skipper // @namespace http://github.com/bodo/userscripts // @description Remove Feedsportal Ads // @include http://da.feedsportal.com/* // ==/UserScript== (function(){ links = document.evaluate("//div[@align='right']/p/a[1]", document, null, XPath...
Fix script to run in other greasmonkey engines (e.g. chrome)
Fix script to run in other greasmonkey engines (e.g. chrome)
JavaScript
bsd-3-clause
bitboxer/userscripts
37ea88cc8f6b01c1a2c28dc608a605204203c58e
src/store.js
src/store.js
import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const state = { charRect: null, } const mutations = { setCharRect (state, charRect) { state.charRect = charRect }, } export default new Vuex.Store({ /* eslint-disable no-undef */ strict: process.env.NODE_ENV === 'development', /* eslint-ena...
import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const state = { charRect: null, } const mutations = { setCharRect (state, charRect) { state.charRect = charRect }, } export default new Vuex.Store({ strict: process.env.NODE_ENV === 'development', state, mutations, })
Remove useless eslint rule: 'eslint-disable no-undef'
Remove useless eslint rule: 'eslint-disable no-undef'
JavaScript
mit
cnlon/regexp.online,cnlon/regexp.online
5038f05f035a43a017ebf9fd92406e0edf415844
api/src/pages/Html.js
api/src/pages/Html.js
import React, { PropTypes } from 'react' export default class Html extends React.Component { render () { return ( <html> <head> <title> {this.props.title} </title> <meta name='viewport' content='width=device-width, initial-scale=1' /> <link type='...
import React, { PropTypes } from 'react' export default class Html extends React.Component { render () { return ( <html> <head> <title> {this.props.title} </title> <meta name='viewport' content='width=device-width, initial-scale=1' /> <link type='...
Add description and author meta tags
Add description and author meta tags
JavaScript
mit
svagi/httptest
bf2174050dc34b8d78ff1dc1cbdd5662b74755ae
server/index.js
server/index.js
'use strict'; var bodyParser = require('body-parser'); var express = require('express'); var app = express(); var Config = require('./config/index'); //var SessionConfig = require('./config/session'); /* Requires mongo and isn't used yet. */ var NunjucksEnv = require('./config/nunjucks')(app); var server = app.list...
'use strict'; var bodyParser = require('body-parser'); var express = require('express'); var app = express(); var Config = require('./config/index'); //var SessionConfig = require('./config/session'); /* Requires mongo and isn't used yet. */ var NunjucksEnv = require('./config/nunjucks')(app); var server = app.list...
Make 404 page show <h1>404</h1>
Make 404 page show <h1>404</h1>
JavaScript
mit
DevelopersGuild/dgwebsite2,DevelopersGuild/dgwebsite2
3f43ed887ecd5284737e8cef0c7250c3415abbfc
lib/ExecutionControlEpic/Plugins/Flowtype/index.js
lib/ExecutionControlEpic/Plugins/Flowtype/index.js
"use babel"; // @flow import type { PlanConfig } from "../../PlanConfigurationFeature/Types/types.js.flow"; import path from "path"; import FlowDiagnostic from "./Presenters/FlowDiagnostic.js"; export default { infos: { name: "flow", iconUri: "atom://molecule-dev-environment/.storybook/public/devtool-...
"use babel"; // @flow import type { PlanConfig } from "../../PlanConfigurationFeature/Types/types.js.flow"; import path from "path"; import FlowDiagnostic from "./Presenters/FlowDiagnostic.js"; export default { infos: { name: "flow", iconUri: "atom://molecule-dev-environment/.storybook/public/devtool-...
Use enum instead of conditional
Use enum instead of conditional
JavaScript
mit
lorenzoalfieri/atom-molecule-dev-environment,lorenzoalfieri/atom-molecule-dev-environment,alanzanattadev/atom-molecule-dev-environment,lorenzoalfieri/atom-molecule-dev-environment,alanzanattadev/atom-molecule-dev-environment,alanzanattadev/atom-molecule-dev-environment
3f2dd2c6da8b5468302634ca7ea7020ddfeb74f9
tasks/styleguide.js
tasks/styleguide.js
/** * Main styleguide grunt task */ module.exports = function(grunt) { 'use strict'; var fs = require('fs'), nunjucks = require('nunjucks'); grunt.registerMultiTask('styleguide', 'Generate a static HTML style guide', function() { var context = this.data, output = fs.realpathSync(con...
/** * Main styleguide grunt task */ module.exports = function(grunt) { 'use strict'; var fs = require('fs'), nunjucks = require('nunjucks'); grunt.registerMultiTask('styleguide', 'Generate a static HTML style guide', function() { var context = this.data, partials = fs.realpathSync(c...
Remove call to realPath for output file
Remove call to realPath for output file
JavaScript
mit
silvermine/grunt-styleguide
5faebf00102e2b24600fc9c17a7a5199ab3303cd
app.js
app.js
var fs = require('fs'); var git = require('./git.js'); var casper = require('./casper.js'); var userInfoFileName = process.argv[2]; var userInfo = new Object(); var solvedProblemInfo = new Array(); if (userInfoFileName != undefined) { fs.exists(userInfoFileName, function(exists) { if (!exists) { console.log('fi...
var fs = require('fs'); var git = require('./git.js'); var casper = require('./casper.js'); var userInfoFileName = process.argv[2]; var userInfo = new Object(); var solvedProblemInfo = new Array(); if (userInfoFileName != undefined) { fs.exists(userInfoFileName, function(exists) { if (!exists) { console.log('fi...
Add a function to clone after checking the repository.
Add a function to clone after checking the repository.
JavaScript
mit
ISKU/BOJ-AutoCommit
38f298417daaccf35ee63fd9a606c28f16c09cb5
app/javascript/pawoo/actions/column_media.js
app/javascript/pawoo/actions/column_media.js
export const COLUMN_MEDIA_RESIZE = 'PAWOO_COLUMN_MEDIA_RESIZE'; export function resizeColumnMedia(single) { return (dispatch, getState) => dispatch({ type: COLUMN_MEDIA_RESIZE, columnCount: getState().getIn(['settings', 'columns']).count(), defaultPage: getState().getIn(['pawoo', 'page']) === 'DEFAULT', ...
export const COLUMN_MEDIA_RESIZE = 'PAWOO_COLUMN_MEDIA_RESIZE'; export function resizeColumnMedia(single) { return (dispatch, getState) => dispatch({ type: COLUMN_MEDIA_RESIZE, columnCount: getState().getIn(['settings', 'pawoo', 'multiColumn']) ? getState().getIn(['settings', 'columns']).count() : 2, ...
Fix column counting for Pawoo single column layout
Fix column counting for Pawoo single column layout
JavaScript
agpl-3.0
pixiv/mastodon,pixiv/mastodon,pixiv/mastodon,pixiv/mastodon
4023137f9048edcdc7df116ee02e61cfc09b47e9
server/schema/resolvers/media.js
server/schema/resolvers/media.js
const knex = require('../../knex.js') const Media = module.exports = { posted_by: ({user_id}) => knex('users').where('id', user_id).then(([user]) => user), myReaction: ({id}, _, {me}) => knex('reactions').where({user_id: me.id, media_id: id}) .limit('1') .then(([ro...
const knex = require('../../knex.js') const Media = module.exports = { posted_by: ({user_id}) => knex('users').where('id', user_id).then(([user]) => user), myReaction: ({id}, _, {me}) => !me ? null : knex('reactions').where({user_id: me.id, media_id: id}) .limit('1') ...
Return null for reaction if user isn't connected
Return null for reaction if user isn't connected
JavaScript
mit
xouabita/friends-radio
6e3b373535e9297f02c938654d9237a6c93e174f
github-cleandiff.js
github-cleandiff.js
lines = document.querySelectorAll('.diff-line-code'); for (var i = 0; i < lines.length; i++) { line = lines[i]; lineContent = line.innerText; firstChar = lineContent[0]; restContent = lineContent.slice(1); first = document.createElement('span'); first.classList.add('clean-diff-sheker'); first.setAttri...
var lines = document.querySelectorAll('.diff-line-code'); for (var i = 0; i < lines.length; i++) { var line = lines[i], lineContent = line.innerText, firstChar = lineContent[0], restContent = lineContent.slice(1); var first = document.createElement('span'); first.classList.add('clean-diff-sh...
Add vars because this isn't coffeescript :unamused:
Add vars because this isn't coffeescript :unamused:
JavaScript
mit
iic-ninjas/github-cleandiff,rot-13/github-cleandiff,iic-ninjas/github-cleandiff,rot-13/github-cleandiff
0a4557865a776dbb9d294a9c546984a21058d619
src/ext/Function.js
src/ext/Function.js
/* ================================================================================================== Lowland - JavaScript low level functions Copyright (C) 2012 Sebatian Fastner ================================================================================================== */ /** * #require(ext.sugar.Object) ...
/* ================================================================================================== Lowland - JavaScript low level functions Copyright (C) 2012 Sebatian Fastner ================================================================================================== */ /** * #require(ext.sugar.Object) ...
Use browser agnostic stop propagation of events
Use browser agnostic stop propagation of events
JavaScript
mit
fastner/lowland,fastner/lowland
9ed3286f3c6dd9902a4ec17996e055b9b6af7338
mpl_style_gallery/static/js/gallery.js
mpl_style_gallery/static/js/gallery.js
/*jslint browser:true */ /*global $, Spinner*/ (function mplStyleGallery() { 'use strict'; function createLightbox($el) { var ESCAPE_KEY = 27, lightboxFacade; // Press ESCAPE to hide the lightbox window. $(document).keyup(function (event) { if (event.keyCode ==...
/*jslint browser:true */ /*global $, Spinner*/ (function mplStyleGallery() { 'use strict'; /** * Create simple lightbox for viewing images. * * @param {JQuery} Target lightbox div containing single `img` element. */ function createLightbox($el) { var ESCAPE_KEY = 27, ...
Fix element lookup and add docstrings
Fix element lookup and add docstrings
JavaScript
bsd-3-clause
tonysyu/matplotlib-style-gallery,tonysyu/matplotlib-style-gallery,tonysyu/matplotlib-style-gallery
580565bef73803c32bfdaf265b904c7ac2d511d4
wire/modules/Process/ProcessRole/ProcessRole.js
wire/modules/Process/ProcessRole/ProcessRole.js
$(document).ready(function() { /* var filterInputfieldPermissions = function() { var pageEdit = $("#Inputfield_permissions_32").is(":checked"); $("#wrap_Inputfield_permissions input").each(function() { var val = $(this).val(); if(val == 36) return; // page-view if(val == 32) return; // page-edit if(v...
$(document).ready(function() { var $pageView = $("#Inputfield_permissions_36"); if(!$pageView.is(":checked")) $pageView.attr('checked', 'checked'); $pageView.click(function() { if(!$(this).is(":checked")) { $(this).attr('checked', 'checked'); alert('page-view is a required permission'); } }); }); ...
Make the page-view permission already checked (@apeisa) in roles editor when adding a new role.
Make the page-view permission already checked (@apeisa) in roles editor when adding a new role.
JavaScript
mpl-2.0
rusjoan/poly-hackaton,ryancramerdesign/ProcessWire,rusjoan/poly-hackaton,ryancramerdesign/ProcessWire,ryancramerdesign/ProcessWire,fezde/ProcessWire,ryancramerdesign/ProcessWire,rusjoan/poly-hackaton,fezde/ProcessWire,fezde/ProcessWire,ryancramerdesign/ProcessWire,rusjoan/poly-hackaton,fezde/ProcessWire,rusjoan/poly-ha...
a8828ce67e0a3547d76492ee51757c3c04d78336
app/lib/userstatus.js
app/lib/userstatus.js
// SERVER: Listen for events if(Meteor.isServer) { // listen for user logout events, call the clearAssignments server method UserStatus.events.on("connectionLogout", function(fields){ //console.log("Logout Event"); //console.log(fields.userId); Meteor.call('clearAssignments', Meteor.users.findOne({_id:...
// SERVER: Listen for events if(Meteor.isServer) { // listen for user logout events, call the clearAssignments server method UserStatus.events.on("connectionLogout", function(fields){ //console.log("Logout Event"); //console.log(fields.userId); Meteor.call('clearAssignments', Meteor.users.findOne({_id:...
Add comment for user idle
Add comment for user idle
JavaScript
mit
wtwalsh/nexq,wtwalsh/nexq