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
6bba09d9f9946d3498d6b31112074cd07bc6fc86
generators/app/templates/app/scripts/main.js
generators/app/templates/app/scripts/main.js
import App from './app'; import 'babel-polyfill'; common.app = new App(common); common.app.start();
import App from './app'; common.app = new App(common); common.app.start();
Remove babel-polyfill import in man.js
Remove babel-polyfill import in man.js
JavaScript
mit
snphq/generator-sp,i-suhar/generator-sp,snphq/generator-sp,snphq/generator-sp,i-suhar/generator-sp,i-suhar/generator-sp
6a26cf39c0ee32e58c73a1e8b5b62422e802e2e6
tests/dummy/app/components/button-cell.js
tests/dummy/app/components/button-cell.js
import Em from 'ember'; import LlamaBodyCell from 'llama-table/components/llama-body-cell/component'; import layout from 'dummy/templates/components/button-cell'; var computed = Em.computed; var gt = computed.gt; var not = computed.not; var ButtonCell = LlamaBodyCell.extend({ layout: layout, showButton: not('isFoote...
import Em from 'ember'; import LlamaBodyCell from 'llama-table/components/llama-body-cell/component'; import layout from 'dummy/templates/components/button-cell'; var computed = Em.computed; var gt = computed.gt; var not = computed.not; var ButtonCell = LlamaBodyCell.extend({ layout: layout, showButton: not('isFoote...
Fix remove button in demo table
Fix remove button in demo table
JavaScript
mit
luxbet/ember-cli-llama-table,j-/ember-cli-llama-table,luxbet/ember-cli-llama-table,j-/ember-cli-llama-table
31da6e2c375d4eec9b4056b05939ebe496915a67
Gruntfile.js
Gruntfile.js
'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { files: ['Gruntfile.js', 'lib/**/*.js'], options: { globalstrict: true, node: true, globals: { jQuery: true, console: false, ...
'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { options: { globalstrict: true, node: true, globals: { jQuery: true, console: false, module: true, document: true ...
Remove `file` field from jshint configuration.
Remove `file` field from jshint configuration. Tests were failing with message "Warning: Path must be a string. Received null" Closes imdone/imdone-core#48
JavaScript
mit
imdone/imdone-core,imdone/imdone-core
f321bea271fd94c665c1e524a743e2b88ed21134
src/components/Rectangle.js
src/components/Rectangle.js
import React from 'react'; import styles from 'stylesheets/components/common/typography'; const Rectangle = () => ( <div> <h1 className={styles.heading}>Rechteck</h1> <div> <h2>Eingabe</h2> <form> <div> <label id="rechteck_a">a: <input type="text" /> </lab...
import React from 'react'; import styles from 'stylesheets/components/common/typography'; class Rectangle extends React.Component { constructor(props) { super(props); this.state = { edgeA: 0, edgeB: 0, area: 0 }; this.handleChange = this.handleChange.bind(this); } handleChange...
Implement computation of rectangle's area
Implement computation of rectangle's area
JavaScript
mit
laschuet/geometrie_in_react,laschuet/geometrie_in_react
e714a374e85fbf90dffcdf4c9991cdb0ce1e35c2
lib/deps.js
lib/deps.js
var canihaz = require('canihaz'), fs = require('fs'), p = require('path'); /** * Install dependency modules that are not yet installed, and needed for executing the tasks. * * @param {Array} depNames: an array of dependency module names * @param {String} dir: application directory where node_modules dir is loc...
var canihaz = require('canihaz'), fs = require('fs'), p = require('path'); const GLOBALS = ['npm']; /** * Install dependency modules that are not yet installed, and needed for executing the tasks. * Global modules (like npm) are assumed to already exist. * * @param {Array} depNames: an array of dependency mod...
Add global modules list, to be excluded from lazy installation.
Add global modules list, to be excluded from lazy installation.
JavaScript
mit
cliffano/bob
787aba818986daf0a17342b8d86918c8925541e8
js/links.js
js/links.js
function setupLinkHandling() { window.history.pushState({"html": document.documentElement.outerHTML}, "", window.location.href); var anchors = document.getElementsByTagName("a"); for (var i = 0; i < anchors.length; i++) { if (anchors[i].href.startsWith("http://localhost") || anchors[i].href.starts...
function setupLinkHandling() { window.history.pushState({"html": document.documentElement.outerHTML}, "", window.location.href); var anchors = document.getElementsByTagName("a"); for (var i = 0; i < anchors.length; i++) { if (["localhost", "atomhacks.github.io", "bxhackers.club"].includes(window.l...
Fix custom page loading with new domain
Fix custom page loading with new domain
JavaScript
mit
atomhacks/club,atomhacks/club,atomhacks/club
14d3e65b2130937df97b0f1c3837a97bea28b5e9
src/game/vue-game-plugin.js
src/game/vue-game-plugin.js
import GameStateManager from "./GameStates/GameStateManager"; import CommandParser from "./Commands/CommandParser"; import GenerateName from "./Generators/NameGenerator"; export default { install: (Vue) => { Vue.prototype.$game = { startGame() { return GameStateManager.StartGame(); }, g...
import GameStateManager from "./GameStates/GameStateManager"; // import CommandParser from "./Commands/CommandParser"; import GenerateName from "./Generators/NameGenerator"; export default { install: (Vue) => { Vue.prototype.$game = { startGame() { return GameStateManager.StartGame(); }, ...
Stop using command parser file
Stop using command parser file
JavaScript
mit
Trymunx/Dragon-Slayer,Trymunx/Dragon-Slayer
2ba4862ed41b50cf8a2dc7eb67abf0fc7b7426cf
assets/code-blocks.js
assets/code-blocks.js
var fs = require('fs') var path = require('path') var codeBlocks = document.querySelectorAll('code[data-path]') Array.prototype.forEach.call(codeBlocks, function (code) { code.textContent = fs.readFileSync(path.join(__dirname, code.dataset.path)) })
var fs = require('fs') var path = require('path') var codeBlocks = document.querySelectorAll('code[data-path]') Array.prototype.forEach.call(codeBlocks, function (code) { var codePath = code.dataset.path code.textContent = fs.readFileSync(path.join(__dirname, '..', codePath)) })
Use new path based on changed __dirname
Use new path based on changed __dirname
JavaScript
mit
electron/electron-api-demos,electron/electron-api-demos,blep/electron-api-demos,blep/electron-api-demos,electron/electron-api-demos,PanCheng111/XDF_Personal_Analysis,blep/electron-api-demos,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,PanCheng111/XDF_Personal_Analysis
277bf2ab16b7936a35dcf65fa886ee836a2f98e5
lib/argv.js
lib/argv.js
var argv = require('cmdenv')('micromono') /** * Parse commmand line and environment options */ argv .allowUnknownOption() .option('-s --service [services]', 'Names of services to require. Use comma to separate multiple services. (e.g. --service account,cache) Env name: MICROMONO_SERVICE') .option('-d --service...
var argv = require('cmdenv')('micromono') /** * Parse commmand line and environment options */ argv .allowUnknownOption() .option('-s --service [services]', 'Names of services to require. Use comma to separate multiple services. (e.g. --service account,cache) Env name: MICROMONO_SERVICE') .option('-d --service...
Add rpc host and remove --allow-pending.
Add rpc host and remove --allow-pending.
JavaScript
mit
lsm/micromono,lsm/micromono,lsm/micromono
f46aae10757ea8d86d1870503972e7c8d379aa81
src/tizen/SplashScreenProxy.js
src/tizen/SplashScreenProxy.js
( function() { win = null; module.exports = { show: function() { if ( win === null ) { win = window.open('splashscreen.html'); } }, hide: function() { if ( win !== null ) { win.close(); win = null; } } }; require("cordova/tizen/comm...
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); y...
Add license headers to Tizen code
CB-6465: Add license headers to Tizen code
JavaScript
apache-2.0
IWAtech/cordova-plugin-splashscreen,Icenium/cordova-plugin-splashscreen,revolunet/cordova-plugin-splashscreen,journeyapps/cordova-splashscreen,bamlab/cordova-plugin-splashscreen,chrskrchr/cordova-plugin-splashscreen,sportstech/cordova-plugin-splashscreen,Panajev/cordova-plugin-splashscreen,journeyapps/cordova-splashscr...
7de243b38dc879ee29e34adf1e3a0fd49f772592
webpack.config.js
webpack.config.js
'use strict'; const NODE_ENV = process.env.NODE_ENV || 'development'; const webpack = require('webpack'); const path = require('path'); const PATHS = { app: path.join(__dirname, 'app'), build: path.join(__dirname, 'build') }; module.exports = { entry: { app: PATHS.app }, output: { ...
'use strict'; const NODE_ENV = process.env.NODE_ENV || 'development'; const webpack = require('webpack'); const path = require('path'); const PATHS = { app: path.join(__dirname, 'app'), build: path.join(__dirname, 'build') }; module.exports = { entry: { app: PATHS.app }, output: { ...
Add include property to babel loader
Add include property to babel loader
JavaScript
mit
boriskaiser/starterkit,boriskaiser/starterkit
d9e2d9c515ba46bae3b86ca44119e445ae51e9ee
lib/services/facebook.service.js
lib/services/facebook.service.js
var serviceName = "facebook"; var request = require("request"); var serviceConfig = require("./../config/services.config.json"); var result = { service: serviceName, status: false } function facebook (cb) { request({ url: serviceConfig[serviceName], method: "GET...
var serviceName = "facebook"; var request = require("request"); var serviceConfig = require("./../config/services.config.json"); function facebook (cb) { var result = { service: serviceName, status: false }; request({ url: serviceConfig[serviceName], ...
Make result object local to function
Make result object local to function
JavaScript
mit
punit1108/upstatejs
d8271950357cda3fd4fdefc79e4c1f95432b8c41
public/js/initialize.js
public/js/initialize.js
$(document).ready(function() { $.ajax({ url: '/questions/index', method: 'GET', dataType: 'json' }).done(function(data){ user_questions = data['questions'] updateQuestions(user_questions); }); $(".button").click(function(e){ e.preventDefault(); $('#question_form').show(); $('....
$(document).ready(function(){ var controller = new Controller(View); });
Edit Initialize JS to Activate Controller/View On Load
Edit Initialize JS to Activate Controller/View On Load
JavaScript
mit
n-zeplo/AskDBC,n-zeplo/AskDBC
9778f7c92896804bca436120471f7dc9577b39f9
src/modules/entityModels.js
src/modules/entityModels.js
import fetch from 'isomorphic-fetch' export const REQUEST_ENTITY_MODELS = 'REQUEST_ENTITY_MODELS' export const RECEIVE_ENTITY_MODELS = 'RECEIVE_ENTITY_MODELS' function requestEntityModels() { return { type: REQUEST_ENTITY_MODELS } } function receiveEntityModels(json) { return { type: RECEIVE_ENTITY_MOD...
import fetch from 'isomorphic-fetch' export const REQUEST_ENTITY_MODELS = 'REQUEST_ENTITY_MODELS' export const RECEIVE_ENTITY_MODELS = 'RECEIVE_ENTITY_MODELS' function requestEntityModels() { return { type: REQUEST_ENTITY_MODELS } } function receiveEntityModels(json) { return { type: RECEIVE_ENTITY_MOD...
Include credentials when entity models are fetched
Include credentials when entity models are fetched
JavaScript
agpl-3.0
tocco/tocco-client,tocco/tocco-client,tocco/tocco-client
6568e4bacc41eb4666aa37a007a39215432fea37
lib/ascii-art.js
lib/ascii-art.js
'use strict'; var ascii = require('image-to-ascii'); function mock() { return function(url, callback) { callback('[ascii art]'); }; } function prod() { return function(url, callback) { ascii({ colored: false, path: url }, function (err, result) { callback(err ? 'Ascii art error...
'use strict'; var ascii = require('image-to-ascii'); function mock() { return function(url, callback) { callback('[ascii art]'); }; } function prod() { return function(url, callback) { ascii({ colored: false, path: url, size: {height: 30} }, function (err, result) { ca...
Set ascii art max height to 30 lines
Set ascii art max height to 30 lines
JavaScript
mit
earldouglas/sectery
adf821a39271131ef5ba4116b29ec38a6a3b13db
lib/countdown.js
lib/countdown.js
'use strict'; (function() { var root = this; var Countdown = function(duration, onTick, onComplete){ this.secondsLeft = duration; var tick = function() { if (this.secondsLeft > 0) { onTick(this.secondsLeft); this.secondsLeft -= 1; } else { clearInterval(...
'use strict'; (function() { var root = this; var Countdown = function(duration, onTick, onComplete){ this.secondsLeft = duration; var tick = function() { if (this.secondsLeft > 0) { onTick(this.secondsLeft); this.secondsLeft -= 1; } else { clearInterval(...
Fix a bug related to the first tick not being called
Fix a bug related to the first tick not being called
JavaScript
mit
gumroad/countdown.js
3857c7cce4967365d560dc8ed4c9436cac6409e9
lib/info-view.js
lib/info-view.js
'use babel' export default class InfoView { constructor(serializedState) { // Create root element this.rootElement = document.createElement('div') this.rootElement.classList.add('root-info') // Create message element const message = document.createElement('div') message.textContent = 'The M...
'use babel' jQuery = require('jquery') export default class InfoView { constructor(serializedState) { // Create root element this.rootElement = document.createElement('div') this.rootElement.classList.add('root-info') // Create message element this.message = document.createElement('div') t...
Add addLines for updating messages
Add addLines for updating messages
JavaScript
mit
THM-MoTE/mope-atom-plugin
9bbb27f85c6c8b59d19d620803cb75eb24fa74ed
app/reducers.js
app/reducers.js
import { combineReducers } from 'redux' import { reducer as form } from 'redux-form' import filter from './components/filter/filter.reducer' import routes from './components/routes/routes.reducer' import sort from './components/sort/sort.reducer' const rootReducer = combineReducers({ filter, routes, sort, toke...
import { combineReducers } from 'redux' import { reducer as form } from 'redux-form' import filter from './components/filter/filter.reducer' import routes from './components/routes/routes.reducer' import sort from './components/sort/sort.reducer' const rootReducer = combineReducers({ filter, routes, sort, form...
Remove usage of bad import
Remove usage of bad import
JavaScript
mit
chrisronline/route-finder,chrisronline/route-finder
44811f0ca64f2ebd7aea57ab9398cf80d0371588
src/utils/utils.spec.js
src/utils/utils.spec.js
import { getUrlFromCriterias, storeToArray } from './utils'; describe('Utils', () => { test('getUrlFromCriterias', () => { expect(getUrlFromCriterias()).toBe(''); expect(getUrlFromCriterias({})).toBe(''); expect(getUrlFromCriterias({ key1: 'value-key1' })).toBe( '?key1=value-key1', ); expec...
import { getUrlFromCriterias, storeToArray, verifyVariable } from './utils'; describe('Utils', () => { test('getUrlFromCriterias', () => { expect(getUrlFromCriterias()).toBe(''); expect(getUrlFromCriterias({})).toBe(''); expect(getUrlFromCriterias({ key1: 'value-key1' })).toBe( '?key1=value-key1', ...
Add test for function verifyVariable
Add test for function verifyVariable
JavaScript
mit
InseeFr/Pogues,InseeFr/Pogues,InseeFr/Pogues
05b7b2045613cb6c7cc6507a0ade7028016c9df9
tests/unit/components/email-input-test.js
tests/unit/components/email-input-test.js
import Ember from 'ember'; import { moduleForComponent, test } from 'ember-qunit'; import startApp from '../../helpers/start-app'; var App; moduleForComponent('email-input', 'email-input component', { setup: function() { App = startApp(); }, teardown: function() { Ember.run(App, 'destroy'); }, unit: ...
import Ember from 'ember'; import { moduleForComponent, test } from 'ember-qunit'; import startApp from '../../helpers/start-app'; var App; moduleForComponent('email-input', 'email-input component', { setup: function() { App = startApp(); }, teardown: function() { Ember.run(App, 'destroy'); }, unit: ...
Comment out faulty email-input assertion test
Comment out faulty email-input assertion test
JavaScript
mit
pzuraq/ember-inputmask,blimmer/ember-inputmask,blimmer/ember-inputmask,pzuraq/ember-inputmask
28a144d15ebab7c5eaae35fc8fd432962da25046
migrate/index.js
migrate/index.js
const mongoModel = require('./mongo-model'); const sqlModel = require('./sql-model'); function main() { sqlModel.sequelize.sync() .then(() => mongoModel.find({})) .then(users => { console.log('MongoDB query done. Length: ', users.length); let promises = []; for (let user of users) { ...
const mongoModel = require('./mongo-model'); const sqlModel = require('./sql-model'); function main() { sqlModel.sequelize.sync() .then(() => mongoModel.find({})) .then(users => { console.log('MongoDB query done. Length: ', users.length); let promises = []; for (let user of users) { ...
Use bulk operation in migration script for performance
FEAT: Use bulk operation in migration script for performance
JavaScript
mit
Holi0317/sms-library-helper,Holi0317/sms-library-helper,Holi0317/sms-library-helper,Holi0317/sms-library-helper
386c6336dd96ca76768ff0245eef00bfbd0b167c
newrelic.js
newrelic.js
'use strict' /** * New Relic agent configuration. * * See lib/config.defaults.js in the agent distribution for a more complete * description of configuration variables and their potential values. */ exports.config = { /** * Array of application names. */ app_name: ['My Application'], /** * Your New...
'use strict' /** * New Relic agent configuration. * * See lib/config.defaults.js in the agent distribution for a more complete * description of configuration variables and their potential values. */ exports.config = { /** * Array of application names. */ app_name: [process.env.BLINK_NEW_RELIC_APP_NAME],...
Configure New Relic from env vars
Configure New Relic from env vars
JavaScript
mit
DoSomething/blink,DoSomething/blink
6498f1040644407b5b28d52c54e959d94fa40865
brunch-config.js
brunch-config.js
module.exports.config = { files: { javascripts: { joinTo: { "js/app.js": /^app/, "js/vendor.js": /^(?!app)/ }, order: { before: [ "bower_components/jquery/dist/jquery.js", "bower_components/underscore/underscore.js", "bower_components/react/r...
module.exports.config = { files: { javascripts: { joinTo: { "js/app.js": /^app/, "js/vendor.js": /^(?!app)/ }, order: { before: [ "bower_components/jquery/dist/jquery.js", "bower_components/underscore/underscore.js", "bower_components/bluebir...
Use express server instead of brunch default
Use express server instead of brunch default
JavaScript
mit
chubas/instaband,gdljs/instaband,gdljs/instaband,chubas/instaband
eca9c24ce69b92dfb9d97424c8dd67518dcf3489
tutorials/barChart/barChart.js
tutorials/barChart/barChart.js
function makeBarChart() { var xScale = new Plottable.OrdinalScale().rangeType("bands"); var yScale = new Plottable.LinearScale(); var xAxis = new Plottable.XAxis(xScale, "bottom", function(d) { return d; }); var yAxis = new Plottable.YAxis(yScale, "left"); var renderer = new Plottable.BarRenderer(barData, xS...
function makeBarChart() { var xScale = new Plottable.OrdinalScale().rangeType("bands"); var yScale = new Plottable.LinearScale(); var xAxis = new Plottable.XAxis(xScale, "bottom", function(d) { return d; }); var yAxis = new Plottable.YAxis(yScale, "left"); var renderer = new Plottable.BarRenderer(barData, xS...
Remove padding call from tutorial.
Remove padding call from tutorial.
JavaScript
mit
iobeam/plottable,RobertoMalatesta/plottable,softwords/plottable,iobeam/plottable,jacqt/plottable,danmane/plottable,RobertoMalatesta/plottable,onaio/plottable,NextTuesday/plottable,onaio/plottable,alyssaq/plottable,gdseller/plottable,iobeam/plottable,gdseller/plottable,palantir/plottable,gdseller/plottable,NextTuesday/p...
0897f65359bb90e777866f9af6be8601ed5062c4
src/js/UserAPI.js
src/js/UserAPI.js
/* global console, MashupPlatform */ var UserAPI = (function () { "use strict"; var url = "https://account.lab.fiware.org/user"; /***************************************************************** * C O N S T R U C T O R * *********************************...
/* global console, MashupPlatform */ var UserAPI = (function () { "use strict"; var url = "https://account.lab.fiware.org/user"; /***************************************************************** * C O N S T R U C T O R * **********************************...
Update user api to real functionaliy
Update user api to real functionaliy
JavaScript
apache-2.0
fidash/widget-calendar,fidash/widget-calendar
9d311a37f5381ed26a7e212966f30d5a14bc60ca
src/lib/common.js
src/lib/common.js
/* * Copyright (c) 2013 Csernik Flaviu Andrei * * See the file LICENSE.txt for copying permission. * */ "use strict"; function PropertyNotInitialized(obj, propName) { this.property = propName; this.obj = obj; } PropertyNotInitialized.prototype.toString = function () { return this.obj + " : " + this....
/* * Copyright (c) 2013 Csernik Flaviu Andrei * * See the file LICENSE.txt for copying permission. * */ "use strict"; window.AudioContext = window.AudioContext || window.webkitAudioContext; function PropertyNotInitialized(obj, propName) { this.property = propName; this.obj = obj; } PropertyNotInitial...
Fix AudioContext not define reference error.
Fix AudioContext not define reference error.
JavaScript
mit
archblob/amit
45ec083349602a01eacfaf7416e48c9fb2cd5ca7
test/host/rhino.js
test/host/rhino.js
/*jshint rhino:true*/ print("Rhino showcase"); load("src/boot.js"); java.lang.System.exit(0);
/*jshint rhino:true*/ print("Rhino showcase"); /*exported gpfSourcesPath*/ var gpfSourcesPath = "src/"; load("src/boot.js"); java.lang.System.exit(0);
Allow boot by specifying the source path
Allow boot by specifying the source path
JavaScript
mit
ArnaudBuchholz/gpf-js,ArnaudBuchholz/gpf-js
593695be54f4e68a613cdb1b514ae90d1a3cb362
client/scripts/app.js
client/scripts/app.js
'use strict'; (function() { angular.module('bifrost',[ 'lumx', 'ui.router', 'lbServices', 'leaflet-directive', 'ngMaterial', 'angularFileUpload' ]) .config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('main', { url: '/', templateUrl: 'view...
'use strict'; (function() { angular.module('bifrost',[ 'lumx', 'ui.router', 'lbServices', 'leaflet-directive', 'ngMaterial', 'angularFileUpload' ]) .config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('main', { url: '/', templateUrl: 'view...
Return to login page if didn't login
Return to login page if didn't login
JavaScript
mit
bifrostio/bifrost,bifrostio/bifrost
b25451ded86bab0ed28424131e1a826b4479c69f
rules/core/constants.js
rules/core/constants.js
'use strict'; const COMPOSITION_METHODS = ['compose', 'flow', 'flowRight', 'pipe']; const FOREACH_METHODS = ['forEach', 'forEachRight', 'each', 'eachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight']; const SIDE_EFFECT_METHODS = FOREACH_METHODS.concat(['bindAll']); module.exports = { COMPOSITION_METHODS, FOR...
'use strict'; const COMPOSITION_METHODS = ['compose', 'flow', 'flowRight', 'pipe']; const FOREACH_METHODS = ['forEach', 'forEachRight', 'each', 'eachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight']; const SIDE_EFFECT_METHODS = FOREACH_METHODS.concat(['bindAll', 'defer', 'delay']); module.exports = { COMPOSIT...
Add defer and delay as side-effect methods
Add defer and delay as side-effect methods
JavaScript
mit
jfmengels/eslint-plugin-lodash-fp
66b3fb8e7f084eda5d25c6d17af213d1596649a7
tests/.eslintrc.js
tests/.eslintrc.js
module.exports = { 'extends': '../.eslintrc.js', 'env': { 'mocha': true }, 'rules': { 'func-names': 0, 'no-unused-expressions': 0, 'no-console': 0, // These are said to be deprecated, but we use them in tests. 'react/no-find-dom-node': 0, 'react/no-render-return-value': 0, }, ...
module.exports = { 'extends': '../.eslintrc.js', 'env': { 'mocha': true }, 'rules': { 'func-names': 0, 'no-unused-expressions': 0, 'no-console': 0 }, 'globals': { 'expect': false } };
Enable back the findDOMNode and render lint rules
Enable back the findDOMNode and render lint rules
JavaScript
mit
NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet
7c402a2c17fb491c5ea2ac212d4a89c15b093c5d
closure/goog/test_module.js
closure/goog/test_module.js
// Copyright 2014 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
// Copyright 2014 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
Move goog.module.declareLegacyNamespace() calls to be next to goog.module
Move goog.module.declareLegacyNamespace() calls to be next to goog.module ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=271418472
JavaScript
apache-2.0
google/closure-library,lucidsoftware/closure-library,lucidsoftware/closure-library,lucidsoftware/closure-library,google/closure-library,lucidsoftware/closure-library,google/closure-library,google/closure-library,google/closure-library
117ce3f5b86de2ec4d773537bd88c9f2e9d38391
split-file-cli.js
split-file-cli.js
#!/usr/bin/env node var split = require('./split-file.js'); if (require.main === module) { cli(); } function cli() { var option = process.argv[2]; switch (option) { case '-m': cliMerge(); break; case '-s': cliSplit(); break; default: console.log("Choose a option -s for...
#!/usr/bin/env node var split = require('./split-file.js'); if (require.main === module) { cli(); } function cli() { var option = process.argv[2]; switch (option) { case '-m': cliMerge(); break; case '-s': cliSplit(); break; default: printLegend(); } } function cliS...
Add legend for the CLI tool helping new users to understand the CLI commands.
[FEATURE] Add legend for the CLI tool helping new users to understand the CLI commands.
JavaScript
mit
tomvlk/node-split-file
cc2dc0d455685b8294dc9b23bdad33f715afafd6
src/background.js
src/background.js
'use strict'; chrome.app.runtime.onLaunched.addListener(function() { chrome.app.window.create('chrome.html', { 'bounds': { 'width': 1024, 'height': 768 } }); });
'use strict'; // check for update and restart app automatically chrome.runtime.onUpdateAvailable.addListener(function(details) { console.log("Updating to version " + details.version); chrome.runtime.reload(); }); chrome.runtime.requestUpdateCheck(function(status) { if (status === "update_found") { ...
Check for updates on every start of teh chrome app and restart automatically.
Check for updates on every start of teh chrome app and restart automatically.
JavaScript
mit
sheafferusa/mail-html5,clochix/mail-html5,halitalf/mail-html5,kalatestimine/mail-html5,dopry/mail-html5,kalatestimine/mail-html5,whiteout-io/mail,whiteout-io/mail,tanx/hoodiecrow,halitalf/mail-html5,b-deng/mail-html5,dopry/mail-html5,whiteout-io/mail-html5,sheafferusa/mail-html5,whiteout-io/mail-html5,halitalf/mail-htm...
35bb630e30e6ec721a1b2dbfceccc8bdc6fef425
config/environment.js
config/environment.js
/* jshint node: true */ module.exports = function(environment) { var ENV = { environment: environment, baseURL: '/', locationType: 'hash', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true } },...
/* jshint node: true */ module.exports = function(environment) { var ENV = { environment: environment, baseURL: '/', locationType: 'hash', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true } },...
Handle exec-sync failure on Windows.
Handle exec-sync failure on Windows.
JavaScript
apache-2.0
fhchina/Klondike,Stift/Klondike,Stift/Klondike,fhchina/Klondike,fhchina/Klondike,Stift/Klondike,themotleyfool/Klondike,themotleyfool/Klondike,davidvmckay/Klondike,jochenvangasse/Klondike,themotleyfool/Klondike,jochenvangasse/Klondike,davidvmckay/Klondike,jochenvangasse/Klondike,davidvmckay/Klondike
22b4fdbbef2d1fcff51334fa1ae5492345ec6576
packages/antwar/src/config/dev.js
packages/antwar/src/config/dev.js
import * as path from "path"; import merge from "webpack-merge"; import HtmlWebpackPlugin from "html-webpack-plugin"; import webpack from "webpack"; import getCommon from "./common"; module.exports = config => getCommon(config).then(function(commonConfig) { const devConfig = { cache: true, node: { ...
import * as path from "path"; import merge from "webpack-merge"; import HtmlWebpackPlugin from "html-webpack-plugin"; import webpack from "webpack"; import getCommon from "./common"; module.exports = config => getCommon(config).then(function(commonConfig) { const template = config.antwar.template || {}; cons...
Allow initial context to be passed from antwar configuration
fix: Allow initial context to be passed from antwar configuration
JavaScript
mit
antwarjs/antwar
e2d99cbda42e1993f667cbf09e9c20b6f325cdfe
src/reducers/Items.js
src/reducers/Items.js
import types from '../types' import createReducer from '../shared/create-reducer'; const initialState = [] function itemsRequest( state ){ return state } function itemsError( state ){ return state } function itemsSucess(state, action) { return { ...state, data: action.result } } function changeItemState(state, a...
import types from '../types' import createReducer from '../shared/create-reducer'; import Immutable from 'immutable' function itemsRequest( state ){ return state } function itemsError( state ){ return state } function itemsSucess(state, action) { return Immutable.List(action.result); } function changeItemState(st...
Create an inmutable list with server received data; refactor changeItemState
Create an inmutable list with server received data; refactor changeItemState
JavaScript
mit
atSistemas/react-base
c2aa71310c99a5dd6d6c827afa9ee3f3ca2338c7
config/environment.js
config/environment.js
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'letnar-frontend', environment: environment, baseURL: '/', locationType: 'auto', adapterNamespace: 'api', contentSecurityPolicy: { 'connect-src': "*", 'script-src': "'unsafe-eval' *", },...
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'letnar-frontend', environment: environment, baseURL: '/', locationType: 'auto', adapterNamespace: 'api', contentSecurityPolicy: { 'connect-src': "*", 'script-src': "'unsafe-eval' *", },...
Use hash location type for Github pages.
Use hash location type for Github pages.
JavaScript
mit
simi/ember-map-demo,simi/ember-map-demo
14c1746ece7314d8c906aeb4272bb288a15947c3
website/addons/s3/static/s3-rubeus-cfg.js
website/addons/s3/static/s3-rubeus-cfg.js
(function(Rubeus) { Rubeus.cfg.s3 = { uploadMethod: 'PUT', uploadUrl: null, uploadAdded: function(file, item) { var self = this; var parent = self.getByID(item.parentID); var name = file.name; // Make it possible to upload into subfolders ...
(function(Rubeus) { Rubeus.cfg.s3 = { uploadMethod: 'PUT', uploadUrl: null, uploadAdded: function(file, item) { var self = this; var parent = self.getByID(item.parentID); var name = file.name; // Make it possible to upload into subfolders ...
Update file after being uploaded.
Update file after being uploaded.
JavaScript
apache-2.0
Ghalko/osf.io,sloria/osf.io,bdyetton/prettychart,GageGaskins/osf.io,abought/osf.io,petermalcolm/osf.io,erinspace/osf.io,zachjanicki/osf.io,mluo613/osf.io,doublebits/osf.io,CenterForOpenScience/osf.io,jolene-esposito/osf.io,himanshuo/osf.io,lyndsysimon/osf.io,mluke93/osf.io,Johnetordoff/osf.io,danielneis/osf.io,canerugu...
dc5e223410001b9f2099041931d4b4553f769295
server/config/config.js
server/config/config.js
const dotenv = require('dotenv'); dotenv.config(); module.exports = { development: { username: 'Newman', password: 'andela2017', database: 'postit-db-dev', host: '127.0.0.1', port: 5432, secret_key: process.env.SECRET_KEY, dialect: 'postgres' }, test: { username: 'Newman', pa...
const dotenv = require('dotenv'); dotenv.config(); module.exports = { development: { username: 'Newman', password: 'andela2017', database: 'postit-db-dev', host: '127.0.0.1', port: 5432, secret_key: process.env.SECRET_KEY, dialect: 'postgres' }, test: { // username: 'Newman', ...
Troubleshoot failing tests on Travis
Troubleshoot failing tests on Travis
JavaScript
mit
Philipeano/post-it,Philipeano/post-it
9a7d13540e5a731ec868d8051600c17d93683337
src/test/test-main.js
src/test/test-main.js
// Fetch all the files to be loaded by Karma; parse the actual tests // based on '.spec.js' filter var tests = []; for (var file in window.__karma__.files) { if (window.__karma__.files.hasOwnProperty(file)) { if (/\.spec\.js$/.test(file)) { tests.push(file); } } } // Fetch the base (main) config, override by ...
// Fetch all the files to be loaded by Karma; parse the actual tests // based on '.spec.js' filter var tests = []; for (var file in window.__karma__.files) { if (window.__karma__.files.hasOwnProperty(file)) { /* Add all the files within app/test path with .spec.js suffix */ if (/test\/app.+\.spec\.js$/.test(file))...
Make stricter filter for matching the .spec files, so that we don't get 3rd party spec files into the test
Make stricter filter for matching the .spec files, so that we don't get 3rd party spec files into the test
JavaScript
mit
SC5/grunt-boreless-boilerplate,SC5/grunt-boreless-boilerplate
db1dcca22cfc9f5e4adf4c8e90d6e792ce9ee5ca
src/ts-sockets.js
src/ts-sockets.js
// activity item template var itemtemplate = ['<div class="activity-item">', '<a href="{{modifier_url}}">', '<img src="{{modifier_siteicon}}" />', '</a>', '<div>', '<p>', '<a href="{{modifier_url}}">{{modifier}}</a> is {{action}} ', '<a class="tiddler-title" href="{{tiddler_url}}">{{tiddler_title}}</a>', ...
// activity item template var itemtemplate = ['<li class="activity-item">', '<a href="{{modifier_url}}">', '<img src="{{modifier_siteicon}}" />', '</a>', '<div>', '<p>', '<a href="{{modifier_url}}">{{modifier}}</a> is {{action}} ', '<a class="tiddler-title" href="{{tiddler_url}}">{{tiddler_title}}</a>', ...
Improve html markup of added item
Improve html markup of added item
JavaScript
bsd-3-clause
TiddlySpace/tiddlyspacesockets,TiddlySpace/tiddlyspacesockets
3d22c4f290734201fd8466a18c529c82c33a0660
static/js/main.js
static/js/main.js
function AppCtrl($scope, $http) { $scope.search = function() { $scope.loading = true; $scope.movie = null; $http.get('/search/' + $scope.imdbId).then(function(response) { $scope.loading = false; $scope.movie = response.data; }); }; }
function AppCtrl($scope, $http) { $scope.search = function() { $scope.loading = true; $scope.movie = null; $http.get('/search/' + $scope.imdbId.match(/tt[\d]{7}/)[0]).then(function(response) { $scope.loading = false; $scope.movie = response.data; }); }; }
Support full IMDB URLs in the search field.
Support full IMDB URLs in the search field.
JavaScript
mit
renstrom/imdb-api,renstrom/imdb-api
99c430f70769028a876db54df19e359cca03b128
static/js/src/main.js
static/js/src/main.js
// commonjs code goes here (function () { var i18n = window.i18n = require('i18next'); var XHR = require('i18next-xhr-backend'); var lngDetector = require('i18next-browser-languagedetector'); var Cache = require('i18next-localstorage-cache'); var backendOptions = { loadPath: '/static/local...
// commonjs code goes here (function () { var i18n = window.i18n = require('i18next'); var XHR = require('i18next-xhr-backend'); var lngDetector = require('i18next-browser-languagedetector'); var Cache = require('i18next-localstorage-cache'); var backendOptions = { loadPath: '/static/local...
Make English the fallback language in i18next.
Make English the fallback language in i18next. Fixes: #1580
JavaScript
apache-2.0
punchagan/zulip,showell/zulip,andersk/zulip,paxapy/zulip,susansls/zulip,dattatreya303/zulip,timabbott/zulip,verma-varsha/zulip,eeshangarg/zulip,jrowan/zulip,blaze225/zulip,sharmaeklavya2/zulip,jainayush975/zulip,souravbadami/zulip,eeshangarg/zulip,synicalsyntax/zulip,peguin40/zulip,j831/zulip,sup95/zulip,dawran6/zulip,...
f93e4206fd2caf2c25b85940fd377547133cb545
static/userdetails.js
static/userdetails.js
(function() { var user_id = localStorage.getItem('user_id'); var session_id = localStorage.getItem('session_id'); if (user_id == null || session_id == null) { alert('Not signed in.'); } else { alert(user_id + ' ' + session_id); } })();
(function() { var user_id = $.cookie('user_id'); var session_id = $.cookie('session_id'); if (user_id == null || session_id == null) { alert('Not signed in.'); } else { alert(user_id + ' ' + session_id); } })();
Use cookie instead of local storage.
Use cookie instead of local storage.
JavaScript
agpl-3.0
ushahidi/riverid-python,ushahidi/riverid-python,ushahidi/riverid-python
d6cb1d94c0a0397615ba5f4f90ac281b644ab3d9
image_occlusion_enhanced/svg-edit/svg-edit-2.6/extensions/ext-panning.js
image_occlusion_enhanced/svg-edit/svg-edit-2.6/extensions/ext-panning.js
/*globals svgEditor, svgCanvas*/ /*jslint eqeq: true*/ /* * ext-panning.js * * Licensed under the MIT License * * Copyright(c) 2013 Luis Aguirre * */ /* This is a very basic SVG-Edit extension to let tablet/mobile devices panning without problem */ svgEditor.addExtension('ext-panning', function() {'use stri...
/*globals svgEditor, svgCanvas*/ /*jslint eqeq: true*/ /* * ext-panning.js * * Licensed under the MIT License * * Copyright(c) 2013 Luis Aguirre * */ /* This is a very basic SVG-Edit extension to let tablet/mobile devices panning without problem */ svgEditor.addExtension('ext-panning', function() {'use stri...
Switch to appropriate cursor style when panning active
Switch to appropriate cursor style when panning active
JavaScript
bsd-2-clause
Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-enhanced,Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-enhanced
1cebf1bf3cd75e2ba67062078dd178594f41d7e1
js/library.js
js/library.js
/* * Developed by Radu Puspana * Date August 2017 * Version 1.0 */ // Round the n-th decimal of a float number // number Number the floating point number to be rounded // decimalIndex Number the decimal position to be rounded // E.g decimalIndex = 1, the first digit shuld be rounded // E.g decimal...
/* * Developed by Radu Puspana * Date August 2017 * Version 1.0 */ // Round the n-th decimal of a float number // number Number the floating point number to be rounded // decimalIndex Number the decimal position to be rounded // E.g decimalIndex = 1, the first decimal will be rounded // E.g decima...
Edit the roundDecimal() comment correcting mistakes
Edit the roundDecimal() comment correcting mistakes
JavaScript
mit
rpuspana/myExpenses,rpuspana/myExpenses
09b7512cd8196f643440448d9f885e3996670f56
app/assets/javascripts/admin/spree_paypal_express.js
app/assets/javascripts/admin/spree_paypal_express.js
//= require admin/spree_backend SpreePaypalExpress = { hideSettings: function(paymentMethod) { if (SpreePaypalExpress.paymentMethodID && paymentMethod.val() == SpreePaypalExpress.paymentMethodID) { $('.payment-method-settings').children().hide(); $('#payment_amount').prop('disabled', 'disabled'); ...
//= require admin/spree_backend SpreePaypalExpress = { hideSettings: function(paymentMethod) { if (SpreePaypalExpress.paymentMethodID && paymentMethod.val() == SpreePaypalExpress.paymentMethodID) { $('.payment-method-settings').children().hide(); $('#payment_amount').prop('disabled', 'disabled'); ...
Remove dead code around unused payment_method_field data-hook
Remove dead code around unused payment_method_field data-hook
JavaScript
agpl-3.0
mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodn...
480fa7537fda14c7f25d986b2276565271a96323
karma.conf.js
karma.conf.js
'use strict' module.exports = function(config) { config.set({ basePath: '', frameworks: ['jasmine-jquery', 'jasmine'], files: [ 'src/audiochart.js', 'spec/*.html', 'spec/*.js' ], reporters: ['progress'], colors: true, logLevel: config.LOG_INFO, autoWatch: true, // browsers: ['Chrome', 'Firef...
'use strict' module.exports = function(config) { config.set({ basePath: '', frameworks: ['jasmine-jquery', 'jasmine'], files: [ 'src/audiochart.js', 'spec/*.html', 'spec/*.js' ], reporters: ['progress'], colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome', 'Firefox'...
Enable Chrome and Firefox for tests
Enable Chrome and Firefox for tests Safari is not reliable ATM due to https://github.com/karma-runner/karma-safari-launcher/issues/24
JavaScript
mit
matatk/audiochart,matatk/audiochart
59292cc35cbfdebbedd4a58f7527a715d4dc5f55
karma.conf.js
karma.conf.js
const path = require("path"); const parts = require("./webpack.parts"); module.exports = config => { const tests = "tests/*.test.js"; config.set({ frameworks: ["mocha"], files: [ { pattern: tests, }, ], preprocessors: { [tests]: ["webpack"], }, webpack: parts.l...
const path = require("path"); const parts = require("./webpack.parts"); module.exports = config => { const tests = "tests/*.test.js"; process.env.BABEL_ENV = "karma"; config.set({ frameworks: ["mocha"], files: [ { pattern: tests, }, ], preprocessors: { [tests]: ["web...
Set babel env while running Karma
chore: Set babel env while running Karma This is needed for the coverage setup to work.
JavaScript
mit
survivejs-demos/webpack-demo
144d98ff633d3d00868e1aa716d85ea5f9ced5a6
lib/install/void-step.js
lib/install/void-step.js
'use strict'; const BaseStep = require('./base-step'); module.exports = class VoidStep extends BaseStep { start() { return new Promise(() => {}); } };
'use strict'; const BaseStep = require('./base-step'); module.exports = class VoidStep extends BaseStep { constructor(options, action) { super(options); this.action = action; } start() { this.action && this.action(); return new Promise(() => {}); } };
Add an action function to void steps so as to execute code on start
Add an action function to void steps so as to execute code on start It does not alter the step behaviour, it's just a way to trigger additional actions when needed
JavaScript
bsd-3-clause
kiteco/kite-installer
1cee6a5ef930508959fdde398285ea181655fbca
Scripts/Default.js
Scripts/Default.js
// This function is run when the app is ready to start interacting with the host application. // It ensures the DOM is ready before updating the span elements with values from the current message. Office.initialize = function () { $(document).ready(function () { $(window).resize(onResize); initView...
// This function is run when the app is ready to start interacting with the host application. // It ensures the DOM is ready before updating the span elements with values from the current message. Office.initialize = function () { $(document).ready(function () { $(window).resize(onResize); initView...
Set diagnostics into old UI
Set diagnostics into old UI
JavaScript
mit
stephenegriffin/MHA,stephenegriffin/MHA,stephenegriffin/MHA
a2f5836cc763ed63d2bba47e494c636f64ef0b7e
public/javascripts/application.js
public/javascripts/application.js
$(document).ready(function() { if (window.location.href.search(/query=/) == -1) { $('#query').one('click, focus', function() { $(this).val(''); }); } $(document).bind('keyup', function(event) { if ($(event.target).is(':input')) { return; } if (event.which == 83) { $('#query...
$(document).ready(function() { $('#version_for_stats').change(function() { window.location.href = $(this).val(); }); });
Remove JS that handled not-quite-placeholder.
Remove JS that handled not-quite-placeholder.
JavaScript
mit
rubygems/rubygems.org-backup,square/rubygems.org,rubygems/rubygems.org-backup,square/rubygems.org,square/rubygems.org,rubygems/rubygems.org-backup
17fb38813a8b843c889e8fa826e5d686fad4ff1a
gulp/ios.js
gulp/ios.js
import bg from 'gulp-bg'; import gulp from 'gulp'; // If this doesn't work, while manual Xcode works, try: // 1) delete ios/build directory // 2) reset content and settings in iOS simulator gulp.task('ios', ['native'], bg('react-native', 'run-ios'));
import bg from 'gulp-bg'; import gulp from 'gulp'; // If this doesn't work, while manual Xcode works, try: // 1) delete ios/build directory // 2) reset content and settings in iOS simulator gulp.task('ios', ['native'], bg( 'react-native', 'run-ios', '--simulator', 'iPhone 5s' ));
Set iPhone 5s as default simulator
Set iPhone 5s as default simulator Design for the smallest mobile device first.
JavaScript
mit
robinpokorny/este,abelaska/este,TheoMer/este,christophediprima/este,TheoMer/este,syroegkin/mikora.eu,christophediprima/este,sikhote/davidsinclair,TheoMer/este,christophediprima/este,steida/este,amrsekilly/updatedEste,este/este,christophediprima/este,abelaska/este,skallet/este,abelaska/este,skallet/este,sikhote/davidsin...
08b70906907f70d83a2e441bce45863c3f749c85
api/routes/tasks.js
api/routes/tasks.js
import {Router} from 'express' import models from '../models'; export default () => { let app = Router() app.get('/new', (req, res) => { res.render('tasks/new') }) app.get('/:id', (req, res) => { models.Task.find(req.params.id).then((task) => { res.render('tasks/show', {task}) }) }) app.post('/', (re...
import {Router} from 'express' import models from '../models'; export default () => { let app = Router({mergeParams: true}) app.get('/new', (req, res) => { models.Serfs.findAll().then((serfs) => { res.render('tasks/new', {serfs}) }) }) app.get('/:id', (req, res) => { models.Task.find(req.params.id).the...
Add functionality to include serfs
Add functionality to include serfs
JavaScript
mit
taodav/MicroSerfs,taodav/MicroSerfs
a36bd915dfe25fbb53da2fc83b6c048beb5fa5af
js/headless/localserver.js
js/headless/localserver.js
var server = require('webserver').create(), fs = require('fs'); var serverUrl = '127.0.0.1:8888'; var workingDirectory = fs.workingDirectory.replace(/\//g, fs.separator); function create() { var serverCreated = server.listen(serverUrl, function (request, response) { var cleanedUrl = request.url ...
var server = require('webserver').create(), fs = require('fs'); var serverUrl = '127.0.0.1:8888'; var workingDirectory = fs.workingDirectory.replace(/\//g, fs.separator); function create() { var serverCreated = server.listen(serverUrl, function (request, response) { var cleanedUrl = decodeURIComponent...
Fix SVG load with spaces in filename
Fix SVG load with spaces in filename
JavaScript
apache-2.0
bperel/geotime,bperel/geotime,bperel/geotime
90ea06f0d7955419f9f19dc464655b4f589fddee
tasks/reports.js
tasks/reports.js
'use strict'; const r = require('../services/reddit'); let reportedItemNames = new Set(); let hasFinishedFirstRun = false; const SUBREDDITS = ['pokemontrades', 'SVExchange']; module.exports = { period: 60, onStart: true, task () { return r.get_subreddit(SUBREDDITS.join('+')).get_reports({limit: hasFinishedF...
'use strict'; const r = require('../services/reddit'); let reportedItemNames = new Set(); let hasFinishedFirstRun = false; const SUBREDDITS = ['pokemontrades', 'SVExchange']; module.exports = { period: 60, onStart: true, task () { return r.get_subreddit(SUBREDDITS.join('+')).get_reports({limit: hasFinishedF...
Remove initial error if reddit isn't given correct information
Remove initial error if reddit isn't given correct information
JavaScript
apache-2.0
pokemontrades/porygon-bot
fe0608cb308a8f083a7db4502b0f9c92d37b00e9
test/workbook.js
test/workbook.js
import {Workbook} from '../src/parsing/workbook.js'; import {expect} from 'chai'; import fs from 'fs'; describe('Workbook parsing', () => { let file = fs.readFileSync('example/example-with-data.xlsx'); let wb = new Workbook(file); it('should build a Workbook instance from a binary file', () => { ...
import {Workbook} from '../src/parsing/workbook.js'; import {expect} from 'chai'; import fs from 'fs'; describe('Workbook parsing', () => { let file = fs.readFileSync('example/example-with-data.xlsx'); let wb = new Workbook(file); it('should build a Workbook instance from a binary file', () => { ...
Add failing test for Workbook file save function
Add failing test for Workbook file save function
JavaScript
mit
biosustain/microplate
3ceb06bb42c156b58e25888b8c97c41f8b320de0
sixpack/static/js/script.js
sixpack/static/js/script.js
$(function () { // Display correct URL on "no-experiments" page. $('#base-domain').html(document.location.origin); // Draw charts on Details page. if ($('#details-page').length) { var id, alternative_name, color; var colors = $('#details-page').find('span.circle').get(); var chart = new Chart($(...
$(function () { // Display correct URL on "no-experiments" page. $('#base-domain').html(document.location.origin); // Draw charts on Details page. if ($('#details-page').length) { var id, alternative_name, color; var colors = $('#details-page').find('span.circle').get(); var chart = new Chart($(...
Load Dashboard charts on scroll.
Load Dashboard charts on scroll.
JavaScript
bsd-2-clause
seatgeek/sixpack,seatgeek/sixpack,llonchj/sixpack,vpuzzella/sixpack,vpuzzella/sixpack,nickveenhof/sixpack,blackskad/sixpack,smokymountains/sixpack,llonchj/sixpack,spjwebster/sixpack,llonchj/sixpack,blackskad/sixpack,vpuzzella/sixpack,smokymountains/sixpack,seatgeek/sixpack,seatgeek/sixpack,vpuzzella/sixpack,nickveenhof...
0e0d3278002b01c4cd0d732fd937141d6a0f262a
api-server/src/routes/auth.js
api-server/src/routes/auth.js
import * as m from '../models' import parse from 'co-body' import jwt from 'koa-jwt' import {JWT_KEY} from '../config' export default ({api}) => { api.post('/auth', async ctx => { const body = await parse.json(ctx) try { if (!body.username) throw new Error('Username is required') if (!body.passw...
import * as m from '../models' import parse from 'co-body' import jwt from 'koa-jwt' import {JWT_KEY} from '../config' export default ({api}) => { api.post('/auth', async ctx => { const body = await parse.json(ctx) try { if (!body.username) throw new Error('Username is required') if (!body.passw...
Set up exp time for JWT
Set up exp time for JWT
JavaScript
mit
websash/q-and-a-react-redux-app,websash/q-and-a-react-redux-app
acbb593cec671d223aa0b13020f1201bb016e987
public/config/example_openidc.js
public/config/example_openidc.js
window.config = { // default: '/' routerBasename: '/', // default: '' relativeWebWorkerScriptsPath: '', servers: { dicomWeb: [ { name: 'Orthanc', wadoUriRoot: 'http://127.0.0.1/pacs/wado', qidoRoot: 'http://127.0.0.1/pacs/dicom-web', wadoRoot: 'http://127.0.0.1/pacs/d...
window.config = { // default: '/' routerBasename: '/', // default: '' relativeWebWorkerScriptsPath: '', servers: { dicomWeb: [ { name: 'Orthanc', wadoUriRoot: 'http://127.0.0.1/pacs/wado', qidoRoot: 'http://127.0.0.1/pacs/dicom-web', wadoRoot: 'http://127.0.0.1/pacs/d...
Make sure we're setting our bearer token; not basic auth
Make sure we're setting our bearer token; not basic auth
JavaScript
mit
OHIF/Viewers,OHIF/Viewers,OHIF/Viewers
8747f9e4501b623c8eaa125c455fe1b45a8669bf
src/project/member/client.js
src/project/member/client.js
'use strict'; let apiClient; class DrushIOMember { constructor(client, project, identifier, data = {}) { apiClient = client; this.identifier = identifier; this.project = project; this.data = data; } /** * Updates the given membership with the provided details. * * @param {Object} deta...
'use strict'; let apiClient; class DrushIOMember { constructor(client, project, identifier, data = {}) { apiClient = client; this.identifier = identifier; this.project = project; this.data = data; } /** * Updates the given membership with the provided details. * * @param {Object} deta...
Allow invitations to members to be re-sent.
Allow invitations to members to be re-sent.
JavaScript
mit
drush-io/api-client-js,drush-io/api-client-js
3f43dbfb81de9cab58fdc83c02f864872ad69210
examples/demo/index.js
examples/demo/index.js
'use strict'; var angular = require('angular'); // Require the almost-static-site main module var mainModule = require('../../main'); // Define the Demo App var app = window.app = angular.module('demoApp', [ 'assMain' ]); // Here you can define app specific angular extensions to the almost-static-site main module...
/*global angular*/ 'use strict'; require('angular'); // Require the almost-static-site main module var mainModule = require('../../main'); // Define the Demo App var app = window.app = angular.module('demoApp', [ 'assMain' ]); // Here you can define app specific angular extensions to the almost-static-site main m...
Fix angular 1.3 CommonJS require on example/demo
Fix angular 1.3 CommonJS require on example/demo
JavaScript
mit
unkhz/almost-static-site,unkhz/almost-static-site
c0bfd8a797232d1ee43f9f554b932f0c6df10b2f
addon/index.js
addon/index.js
let PolarBear = Ember.Object.extend({ schedule(target, f, interval) { return Ember.run.later(this, function() { f.apply(target); this.start(target, f, interval); }, interval); }, kill() { return Ember.run.cancel(this.get('timer')); }, start(target, f, interval = 500) { this.set('...
let PolarBear = Ember.Object.extend({ interval: 1000, schedule(f) { return Ember.run.later(this, function() { f.apply(this); this.start(f); }, this.get('interval')); }, kill() { return Ember.run.cancel(this.get('timer')); }, start(f) { this.set('timer', this.schedule(f)); } ...
Revert "Instantiate when it is imporeted"
Revert "Instantiate when it is imporeted" This reverts commit e80b68bb5791247ae80179e541e04f865002206b.
JavaScript
mit
sozuuuuu/ember-cli-polar-bear,sozuuuuu/ember-cli-polar-bear
7dd9607934d0dc964878f570a21274874c719dbe
hn.js
hn.js
// Adapted from https://github.com/etcet/HNES/blob/master/js/hn.js $(document).ready(function() { $('body > center > table > tbody > tr:first-child').attr('id', 'header'); $('#header td').removeAttr('bgcolor'); $('#header > td > table > tbody > tr > td:first-child').removeAttr('style').attr('id', 'img-wrappe...
// Adapted from https://github.com/etcet/HNES/blob/master/js/hn.js $(document).ready(function() { $('body > center > table > tbody > tr:first-child').attr('id', 'header'); $('#header td').removeAttr('bgcolor'); $('#header > td > table > tbody > tr > td:first-child').removeAttr('style').attr('id', 'img-wrappe...
Add classes to article table elements.
Add classes to article table elements.
JavaScript
mit
johnotander/hckrnws
671aeb8ef771da601e037ad93af5ce97a2c020c7
app/javascript/old/navtabs.js
app/javascript/old/navtabs.js
$(document).on('turbo:load turbo:render', function() { var $panels, $tabs; $tabs = $('#lab_tests').tabs(); $panels = $('.ui-tabs-panel'); $('#departments').tabs({ cache: true }); $('#departments').tabs('paging', { nextButton: '&rarr;', prevButton: '&larr;', follow: true, followOnSelect: ...
$(document).on('turbo:load turbo:render', function() { $('#departments').tabs({ cache: true }); $('#departments').tabs('paging', { nextButton: '&rarr;', prevButton: '&larr;', follow: true, followOnSelect: true }); $('#order_tests').tabs({ cache: true }); return $('#order_tests').ta...
Remove declared but unused vars
Remove declared but unused vars
JavaScript
mit
Labtec/OpenLIS,Labtec/OpenLIS,Labtec/OpenLIS
152727eb30260004929c5e212cd1217e76deb371
app/javascript/app/providers/agriculture-countries-context-provider/agriculture-countries-context-provider-reducers.js
app/javascript/app/providers/agriculture-countries-context-provider/agriculture-countries-context-provider-reducers.js
export const initialState = { loading: false, loaded: false, data: [], error: false }; const setLoading = (loading, state) => ({ ...state, loading }); const setLoaded = (loaded, state) => ({ ...state, loaded }); const setError = (state, error) => ({ ...state, error }); export default { fetchAgricultureCount...
export const initialState = { loading: false, loaded: false, data: [], error: false }; const setLoading = (loading, state) => ({ ...state, loading }); const setLoaded = (loaded, state) => ({ ...state, loaded }); const setError = (state, error) => ({ ...state, error }); export default { fetchAgricultureCount...
Add meta data to agriculture contexts store
Add meta data to agriculture contexts store
JavaScript
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
1e1aaff133bdc271386a02247811063dcbaf672e
app/js/main.js
app/js/main.js
/* * EksiOkuyucu - unofficial eksisozluk client * http://eksiokuyucu.com/ * * Copyright (C) 2014 Onur Aslan <onuraslan@gmail.com> * Licensed under MIT * https://github.com/onuraslan/EksiOkuyucu/blob/master/COPYING */ require.config ({ paths: { requireLib: 'libs/require', jquery: 'libs/jquery-1.11.0....
/* * EksiOkuyucu - eksisozluk reader * https://github.com/onuraslan/EksiOkuyucu * * Copyright (C) 2015 Onur Aslan <onur@onur.im> * Licensed under MIT */ require.config ({ paths: { requireLib: 'libs/require', jquery: 'libs/jquery-1.11.0.min', underscore: 'libs/underscore-min', backbone: 'libs/...
Update copyright year, homepage and email
Update copyright year, homepage and email
JavaScript
mit
onur/EksiOkuyucu,onuraslan/EksiOkuyucu,onur/EksiOkuyucu,onuraslan/EksiOkuyucu
f98f628dec56251db734226843b26a3d5c01e97a
app/package.js
app/package.js
const { clone, pull } = require('./lib/git') const path = require('path') const jetpack = require('fs-jetpack') const configuration = require('./configuration') class Package { constructor (url) { this.path = path.join(configuration.pluginDir, url) this.url = url this.clone = clone this.pull = pull ...
const { clone, pull } = require('./lib/git') const path = require('path') const jetpack = require('fs-jetpack') const freshRequire = require('./lib/freshRequire') const configuration = require('./configuration') class Package { constructor (url) { this.path = path.join(configuration.pluginDir, url) this.url...
Allow new blocks to be reloaded.
Allow new blocks to be reloaded.
JavaScript
mit
tinytacoteam/zazu,tinytacoteam/zazu
a472c660b51be2a1aed5012caa68661a0d7906f4
app/utilities/search/index.js
app/utilities/search/index.js
'use strict' const Fuse = require('fuse.js') let fuse = null let fuseIndex = [] const fuseOptions = { shouldSort: true, tokenize: true, matchAllTokens: true, findAllMatches: true, threshold: 0.2, location: 0, distance: 100, maxPatternLength: 32, minMatchCharLength: 1, keys: [ 'description', ...
'use strict' const Fuse = require('fuse.js') let fuse = null let fuseIndex = [] const fuseOptions = { shouldSort: true, tokenize: true, matchAllTokens: true, findAllMatches: true, threshold: 0.2, location: 0, distance: 100, maxPatternLength: 32, minMatchCharLength: 1, keys: [ 'description', ...
Disable the search when the input pattern's length is less than or equal to 1
Disable the search when the input pattern's length is less than or equal to 1
JavaScript
mit
wujysh/Lepton,wujysh/Lepton
10921ad47828ed7b5a2c3d6d3e40e7ad69418bc7
examples/request/app.js
examples/request/app.js
import { Request } from 'react-axios' import React from 'react' import ReactDOM from 'react-dom' class App extends React.Component { constructor(props) { super(props) this.state = {} } render() { return ( <div> <code> <Request method="get" url="/api/request"> {(er...
import { Request, Get, Post, Put, Delete, Head, Patch } from 'react-axios' import React from 'react' import ReactDOM from 'react-dom' class App extends React.Component { constructor(props) { super(props) this.state = {} } renderResponse(error, response, isLoading) { if(error) { return (<div>So...
Add examples for each component type.
Add examples for each component type.
JavaScript
mit
sheaivey/react-axios,sheaivey/react-axios
fb057f1f94237885bc027d0f209739cc384166b7
bin/sync-algolia.js
bin/sync-algolia.js
import algolia from 'algoliasearch'; import icons from '../dist/icons.json'; import tags from '../src/tags.json'; const ALGOLIA_APP_ID = '5EEOG744D0'; if ( process.env.TRAVIS_PULL_REQUEST === 'false' && process.env.TRAVIS_BRANCH === 'master' ) { syncAlgolia(); } else { console.log('Skipped Algolia sync.'); } ...
import algolia from 'algoliasearch'; import icons from '../dist/icons.json'; import tags from '../src/tags.json'; const ALGOLIA_APP_ID = '5EEOG744D0'; if ( process.env.TRAVIS_PULL_REQUEST === 'false' && process.env.TRAVIS_BRANCH === 'master' ) { syncAlgolia(); } else { console.log('Skipped Algolia sync.'); } ...
Initialize algolia settings in script
build: Initialize algolia settings in script
JavaScript
mit
colebemis/feather,colebemis/feather
5e766f596a8f5173d77e86079555f82bd90a1c38
shared/config/env/development.js
shared/config/env/development.js
'use strict'; var _ = require('lodash'); var base = require('./base'); const development = _.merge({}, base, { env: 'development', auth0: { callbackURL: process.env.AUTH0_CALLBACK_URL || 'http://localhost:9000/auth/callback', clientID: process.env.AUTH0_CLIENT_ID || 'uyTltKDRg1BKu3nzDu6sLpHS44sInwOu', }...
'use strict'; var _ = require('lodash'); var base = require('./base'); const development = _.merge({}, base, { auth0: { callbackURL: process.env.AUTH0_CALLBACK_URL || 'http://localhost:9000/auth/callback', clientID: process.env.AUTH0_CLIENT_ID || 'uyTltKDRg1BKu3nzDu6sLpHS44sInwOu', }, env: 'development'...
Align ordering of config vars between files
Align ordering of config vars between files
JavaScript
mit
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
4f531ab17b81b0412a4d093cae41989ebaac4e92
website/src/app/project/experiments/experiment/components/notes/mc-experiment-notes.component.js
website/src/app/project/experiments/experiment/components/notes/mc-experiment-notes.component.js
angular.module('materialscommons').component('mcExperimentNotes', { templateUrl: 'app/project/experiments/experiment/components/notes/mc-experiment-notes.html', bindings: { experiment: '=' } });
angular.module('materialscommons').component('mcExperimentNotes', { templateUrl: 'app/project/experiments/experiment/components/notes/mc-experiment-notes.html', controller: MCExperimentNotesComponentController, bindings: { experiment: '=' } }); class MCExperimentNotesComponentController { /...
Add controller (to be filled out).
Add controller (to be filled out).
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
9b3ab9735e8e95b342514996d8603d333b957604
src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/groundcontrol/bin/config/webpack.config.admin-extra.js
src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/groundcontrol/bin/config/webpack.config.admin-extra.js
import defaultConfig from './webpack.config.default'; export default function webpackConfigAdminExtra(speedupLocalDevelopment, optimize = false) { const config = defaultConfig(speedupLocalDevelopment, optimize); config.entry = './{% if isV4 %}assets{% else %}src/{{ bundle.namespace|replace({'\\':'/'}) }}/Reso...
import defaultConfig from './webpack.config.default'; export default function webpackConfigAdminExtra(speedupLocalDevelopment, optimize = false) { const config = defaultConfig(speedupLocalDevelopment, optimize); config.entry = './{% if isV4 %}assets{% else %}src/{{ bundle.namespace|replace({'\\':'/'}) }}/Reso...
Fix webpack output path for admin-bundle-extra js
[GeneratorBundle] Fix webpack output path for admin-bundle-extra js
JavaScript
mit
wesleylancel/KunstmaanBundlesCMS,Numkil/KunstmaanBundlesCMS,dbeerten/KunstmaanBundlesCMS,FVKVN/KunstmaanBundlesCMS,wesleylancel/KunstmaanBundlesCMS,insiders/KunstmaanBundlesCMS,Numkil/KunstmaanBundlesCMS,Numkil/KunstmaanBundlesCMS,FVKVN/KunstmaanBundlesCMS,dbeerten/KunstmaanBundlesCMS,mwoynarski/KunstmaanBundlesCMS,fch...
65dc838950683034ca613889b24cfb0a1abfb183
app.js
app.js
'use strict'; var static_server = require('./static_server'); static_server('dist');
'use strict'; var static_server = require('./static_server'); static_server(process.env.DIST || 'dist');
Allow env to specify dist directory
Allow env to specify dist directory
JavaScript
mit
UoSMediaFrameworks/uos-media-playback-framework-legacy,UoSMediaFrameworks/uos-media-playback-framework-legacy,UoSMediaFrameworks/uos-media-playback-framework-legacy
0aed1cbe613be7a8925c377d9ffbba59ac237de6
app/scripts/app.js
app/scripts/app.js
'use strict'; /** * @ngdoc overview * @name torrentSubscribeFrontendApp * @description * # torrentSubscribeFrontendApp * * Main module of the application. */ angular .module('torrentSubscribeFrontendApp', [ 'ngResource', 'ngSanitize', 'ngRoute', 'constants', 'ngStorage' ]).config( [ '$compilePr...
'use strict'; /** * @ngdoc overview * @name torrentSubscribeFrontendApp * @description * # torrentSubscribeFrontendApp * * Main module of the application. */ angular .module('torrentSubscribeFrontendApp', [ 'ngResource', 'ngSanitize', 'ngRoute', 'constants', 'ngStorage' ]).config( [ '$compilePr...
Add Access-Control-Allow-Headers to http header
Add Access-Control-Allow-Headers to http header
JavaScript
mit
aqibmushtaq/torrent-subscribe-frontend,aqibmushtaq/torrent-subscribe-frontend
4a78c9450b187a4eb136e6bef52cb46f682243ba
lib/scriptify.js
lib/scriptify.js
'use strict'; var browserify = require('browserify'), detective = require('detective'); var fs = require('fs'), Path = require('path'); module.exports = function (path, cb) { fs.readFile(path, { encoding: 'utf8' }, function (err, source) { if (err) return cb(err); var bundle = browserify({ ...
'use strict'; var browserify = require('browserify'), detective = require('detective'); var fs = require('fs'), Path = require('path'); module.exports = function (path, cb) { fs.readFile(path, { encoding: 'utf8' }, function (err, source) { if (err) return cb(err); var bundle = browserify({ ...
Append require function definition to the end
Append require function definition to the end
JavaScript
mit
eush77/nodei
b9311ff37cea38d3c95d7d6f43a97ee598e3f186
src/components/Link/Link.js
src/components/Link/Link.js
import React, {PureComponent} from 'react'; import classNames from 'classnames'; import {Link as RoutedLink} from 'react-router-dom'; import styles from './Link.scss'; export default class Link extends PureComponent { static defaultProps = { selected: false, }; routedLink() { const {url, selected, clas...
import React, {PureComponent} from 'react'; import classNames from 'classnames'; import {Link as RoutedLink} from 'react-router-dom'; import styles from './Link.scss'; export default class Link extends PureComponent { static defaultProps = { selected: false, }; routedLink() { const {url, selected, clas...
Add rel="noopener" for external anchors
Add rel="noopener" for external anchors Recommended by Lighthouse https://developers.google.com/web/tools/lighthouse/audits/noopener
JavaScript
mit
tech-conferences/confs.tech,tech-conferences/confs.tech,tech-conferences/confs.tech
e4c11a660be53873fdd47fcbf5fee21c369f0f4d
components/OrganisationList.js
components/OrganisationList.js
import React, { Component, PropTypes } from 'react' import classnames from 'classnames' import { jsdom } from 'jsdom' import OrganisationListRow from './OrganisationListRow' //Snippet taken from https://www.npmjs.com/package/jquery require("jsdom").env("", function(err, window) { if (err) { console.error(err); re...
import React, { Component, PropTypes } from 'react' import classnames from 'classnames' import { jsdom } from 'jsdom' import OrganisationListRow from './OrganisationListRow' //Snippet taken from https://www.npmjs.com/package/jquery // require("jsdom").env("", function(err, window) { // if (err) { // console.error(e...
Comment out bootstrap to make test suite pass
Comment out bootstrap to make test suite pass
JavaScript
apache-2.0
CodeHubOrg/organisations-database,CodeHubOrg/organisations-database
274079af4bfb6a434c1dbfb6deb9dde56bb68cce
web.js
web.js
var keystone = require('keystone'); keystone.init({ 'name': 'Mottram Evangelical Church', 'favicon': 'public/favicon.ico', 'less': 'public', 'static': 'public', 'views': 'templates/views', 'view engine': 'jade', 'auto update': true, 'mongo': 'mongodb://localhost/mottramec', 'session': t...
var keystone = require('keystone'); keystone.init({ 'name': 'Mottram Evangelical Church', 'favicon': 'public/favicon.ico', 'less': 'public', 'static': 'public', 'views': 'templates/views', 'view engine': 'jade', 'auto update': true, 'mongo': 'mongodb://'+ (process.env.MOTTRAM_CONFIG_MONGO_CO...
Change mongo connection to read from process.env OR use localhost
Change mongo connection to read from process.env OR use localhost
JavaScript
mit
jamlen/mottramec,jamlen/mottramec
4383afc7734b785e381bc6c372db28ece4a2fdc1
src/navigation-bar/navigation-bar-view.js
src/navigation-bar/navigation-bar-view.js
/** @jsx React.DOM */ var React = require('react'); var View = React.createClass({ render: function() { return ( <header className="navigation-bar"> <button className="logo"></button> <button className="icon new" title="Start new TDD session" onClick={this.props.onNew}>New</button> ...
/** @jsx React.DOM */ var React = require('react'); var View = React.createClass({ render: function() { return ( <header className="navigation-bar"> <button className="logo"></button> <button className="icon save" title="Save and Run tests (⌘S)" onClick={this.props.onSave}>Save and Run ({...
Remove UI controls that are not needed now.
Remove UI controls that are not needed now.
JavaScript
mit
tddbin/tddbin-frontend,tddbin/tddbin-frontend,tddbin/tddbin-frontend
33793017933028ea196e9df30a055380dec5ca33
test/setupTest.js
test/setupTest.js
/* eslint-env mocha */ // TODO : Do not reference the server from here or any related files import { dropTestDb } from './utils' import { SERVER_PORTS } from './constants' import nconf from 'nconf' // TODO : Remove the need for this nconf.set('router', { httpPort: SERVER_PORTS.httpPort }) before(async () => { await...
/* eslint-env mocha */ require('../src/config/config') import { SERVER_PORTS } from './constants' import nconf from 'nconf' // Set the router http port to the mocked constant value for the tests nconf.set('router', { httpPort: SERVER_PORTS.httpPort })
Remove the clearing of the database from the script
Remove the clearing of the database from the script This was causing race conditions with some of the files which were already connected to a mongo connection and then not having a reference to an existing collection. This was picked up in the LogsAPITests were the tests were failing intermittently. Replaced the inclu...
JavaScript
mpl-2.0
jembi/openhim-core-js,jembi/openhim-core-js
2921f6035d43a143f575144c540e9b9ca328370e
app/renderer/views/SearchBar.js
app/renderer/views/SearchBar.js
import React, { Component } from 'react' import styled from 'styled-components' import TextInput from './TextInput' import { Search } from '../icons' export default class SearchBar extends Component { constructor (props) { super(props) this.onChange = this.onChange.bind(this) } onChange (e) { e.prev...
import React, { Component } from 'react' import styled from 'styled-components' import TextInput from './TextInput' import { Search, Close } from '../icons' export default class SearchBar extends Component { constructor (props) { super(props) this.update = this.update.bind(this) this.clear = this.clear.b...
Add close button to search bar
Add close button to search bar
JavaScript
apache-2.0
blenoski/movie-night,blenoski/movie-night
b2ba9755f4ce484bcd02b1abf912cede7fa254fe
app/server/controllers/index.js
app/server/controllers/index.js
var models = require('../models'), _validate = require('../../helpers/express-validators'), _h = require('../../helpers/helpers'), jwt = require('jsonwebtoken'), co = require('co'), userHelper = require('./controller-helpers').userHelper, docHelper = require('./controller-helpers').docHelper, roleHelper =...
var models = require('../models'), _validate = require('../../helpers/express-validators'), _h = require('../../helpers/helpers'), jwt = require('jsonwebtoken'), co = require('co'), cloudinary = require('cloudinary'), userHelper = require('./controller-helpers').userHelper, docHelper = require('./controll...
Add image upload and delete routes to parent route
Add image upload and delete routes to parent route
JavaScript
mit
andela-blawrence/DMS-REST-API,andela-blawrence/DMS-REST-API
ec3f99bf3e4af37752e3207f746311db3034ea6c
webpack.config.js
webpack.config.js
var path = require('path'); var Paths = { APP: path.resolve(__dirname, 'src/js'), BUILD_OUTPUT: path.resolve(__dirname, 'out/webpack') }; module.exports = { entry: { app: Paths.APP }, resolve: { extensions: [ '', '.js', '.jsx' ], root: [ Paths.APP ] }, output: { path: Paths.BUI...
var path = require('path'); var webpack = require('webpack'); var Paths = { APP: path.resolve(__dirname, 'src/js'), BUILD_OUTPUT: path.resolve(__dirname, 'out/webpack') }; module.exports = { entry: { app: Paths.APP, vendor: [ 'bluebird', 'classnames', 'falcor', 'falcor-http-datasource', 'jsuri', '...
Create a second webpack chunk for vendor dependencies
Create a second webpack chunk for vendor dependencies
JavaScript
apache-2.0
KillrVideo/killrvideo-web,KillrVideo/killrvideo-web,KillrVideo/killrvideo-web
8934f90f07961a59b1a1b75dad018e217c34ee3d
webpack.config.js
webpack.config.js
var path = require('path'); var webpack = require('webpack'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var BundleTracker = require('webpack-bundle-tracker'); var CommonsChunkPlugin = require("webpack/lib/optimize/CommonsChunkPlugin"); module.exports = { context: __dirname, devtool: 'eval-sou...
var path = require('path'); var webpack = require('webpack'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var BundleTracker = require('webpack-bundle-tracker'); var CommonsChunkPlugin = require("webpack/lib/optimize/CommonsChunkPlugin"); module.exports = { context: __dirname, devtool: 'eval-sou...
Add more modules to vendor entry
Add more modules to vendor entry
JavaScript
mit
dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4
1a616f91fcf697b1d073cfb2281e378927fb8f3d
webpack.config.js
webpack.config.js
var getConfig = require('hjs-webpack') var webpack = require('webpack') var path = require('path'); module.exports = getConfig({ in: 'src/app.js', out: 'public', clearBeforeBuild: true }); module.exports.node = { child_process: 'empty' } module.exports.devServer.host = '0.0.0.0' module.exports.resolve.root =...
var getConfig = require('hjs-webpack') var webpack = require('webpack') var path = require('path'); module.exports = getConfig({ in: 'src/app.js', out: 'public', clearBeforeBuild: true, }); module.exports.node = { child_process: 'empty' } if(process.env.NODE_ENV === 'development'){ module.exports.devServer...
Check NODE_ENV before setting devserver host
Check NODE_ENV before setting devserver host Optional quiet mode. Remove comments to enable quiet mode.
JavaScript
mit
getguesstimate/guesstimate-app
3a0bdaf3812b78ceb53e1040afcde6abf40498cb
webpack.config.js
webpack.config.js
module.exports = { entry: './docs/App.jsx', output: { filename: './docs/bundle.js' }, devServer: { inline: true }, module: { rules: [{ test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader' }] }, devtool: 'source-map' }
const path = require('path') module.exports = { entry: './docs/App.jsx', output: { filename: './docs/bundle.js' }, devServer: { inline: true, contentBase: path.join(__dirname, 'docs'), }, module: { rules: [{ test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader' ...
Change contentBase to docs folder in webpack build.
Change contentBase to docs folder in webpack build.
JavaScript
mit
mosch/react-avatar-editor,mosch/react-avatar-editor,mosch/react-avatar-editor
e937804e7ed3952d044cff127e3460e2be660c12
demo/case1/router2-content.js
demo/case1/router2-content.js
;(_ => { 'use strict'; class Router2Content extends HTMLElement { createdCallback() { this.hidden = true; // by default } } window.addEventListener('hashchange', (e) => { var containers = document.querySelectorAll('router2-content'); for (var i = 0; i < containers.length; i++) { co...
;(_ => { 'use strict'; function matchHash() { var containers = document.querySelectorAll('router2-content'); for (var i = 0; i < containers.length; i++) { containers[i].hidden = true; } var hash = window.location.hash.slice(1); // nothing to unhide... if (!hash) { return; }...
Add more complexity to the simple example
Add more complexity to the simple example
JavaScript
isc
m3co/router3,m3co/router3
0d713d31c56891ebd5ce563a079cf623c4650da6
static/js/eq-item-detail.js
static/js/eq-item-detail.js
'use strict' var eq = { item: { detail: function () { var elem = document.getElementById('item-detail-search') var value = elem.getElementsByTagName('input')[0].value window.location.href = [ '/action/eq/item-detail/', value.replace(/ /g, '+') ].join('') return fal...
/* global $, alert, localStorage */ /* eslint-env jquery, browser */ 'use strict' var eq = { item: { detail: function () { var elem = document.getElementById('item-detail-search') var value = elem.getElementsByTagName('input')[0].value window.location.href = [ '/action/eq/item-detail/...
Update for other js file the linting
Update for other js file the linting
JavaScript
agpl-3.0
ahungry/com.ahungry,ahungry/com.ahungry,ahungry/com.ahungry,ahungry/com.ahungry
d81ef09da6115f93e7f271b12aba9062a8d14028
api/controllers/StorageController.js
api/controllers/StorageController.js
/** * UploadController * * @description :: Server-side logic for managing uploads * @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers */ /* globals JsonApiService */ module.exports = { upload: function(req, res) { let user = req.user; StorageService.findOrCreate(user, (err,...
/** * UploadController * * @description :: Server-side logic for managing uploads * @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers */ /* globals JsonApiService */ module.exports = { upload: function(req, res) { let user = req.user; StorageService.findOrCreate(user, (err,...
Fix GET /files endpoint to list files in user storage.
Fix GET /files endpoint to list files in user storage.
JavaScript
agpl-3.0
Nanocloud/nanocloud,corentindrouet/nanocloud,Leblantoine/nanocloud,corentindrouet/nanocloud,romain-ortega/nanocloud,Nanocloud/nanocloud,Nanocloud/nanocloud,Gentux/nanocloud,romain-ortega/nanocloud,corentindrouet/nanocloud,Leblantoine/nanocloud,Gentux/nanocloud,romain-ortega/nanocloud,dynamiccast/nanocloud,Gentux/nanocl...
ad3892d7cd65d973c4277e17c0e0f6bbf60c9153
jshint/jshint.config.js
jshint/jshint.config.js
module.exports = { options : { latedef : true, noempty : true, undef : true, strict : false, node : true, browser : true, eqnull : true, scripturl : true, predef : [ "$", "jQuery", "Classify", "Avalon", "Page", "Highcharts", "Recaptcha", "alert", "confirm", "SWFUpload" ...
module.exports = { options : { latedef : true, noempty : true, undef : true, strict : false, node : true, browser : true, eqnull : true, scripturl : true, predef : [ "$", "jQuery", "Classify", "Avalon", "Page", "Highcharts", "Recaptcha", "alert", "confirm", "SWFUpload", ...
Switch internal templater to handlebars
Switch internal templater to handlebars
JavaScript
mit
weikinhuang/closedinterval-git-hooks,weikinhuang/closedinterval-git-hooks
0b4baf7c5fd6b33a6bc9ba0e410852cb99b48a42
test/utils/truncate.spec.js
test/utils/truncate.spec.js
const expect = require('unexpected'); const truncate = require('./truncate'); it('should truncate trace output', () => { expect( truncate( [ 'expected callback was called times 2', ' expected', ' callback(); at Object.it (Users/alex/Document...
const expect = require('unexpected'); const truncate = require('./truncate'); it('should truncate trace output', () => { expect( truncate( [ 'expected callback was called times 2', ' expected', ' callback(); at Object.it (Users/alex/Document...
Remove leftover test after f198d9a.
Remove leftover test after f198d9a.
JavaScript
bsd-3-clause
alexjeffburke/jest-unexpected
c6e569a9089d701761b7d93a0a8d9231e825db63
chai.js
chai.js
module.exports = { rules: { // disallow usage of expressions in statement position 'no-unused-expressions': 0 } }
module.exports = { globals: { expect: true }, rules: { // disallow usage of expressions in statement position 'no-unused-expressions': 0 } }
Mark expect as a global when using Chai
Mark expect as a global when using Chai In some test running configurations (such as when using Karma), `expect` is treated as a global symbol and does not need to be imported. This PR updates `chai.js` to mark `expect` as a global so ESLint doesn’t report it as an undefined value.
JavaScript
mit
CodingZeal/eslint-config-zeal
13ea6366af1ad73ae2c7e4e3e685dab2e8edee76
config/ember-try.js
config/ember-try.js
module.exports = { scenarios: [ { name: 'default', dependencies: { } }, { name: 'ember-release', dependencies: { 'ember': 'components/ember#release' }, resolutions: { 'ember': 'release' } }, { name: 'ember-beta', dependencies: {...
module.exports = { scenarios: [ { name: 'default', dependencies: { } }, { name: 'ember-1.13', dependencies: { 'ember': '1.13.8' }, resolutions: { 'ember': '1.13.8' } }, { name: 'ember-release', dependencies: { 'ember': '...
Add Ember 1.13 to the test matrix
Add Ember 1.13 to the test matrix
JavaScript
mit
cibernox/ember-basic-dropdown,cibernox/ember-basic-dropdown,cibernox/ember-basic-dropdown,cibernox/ember-basic-dropdown
4071285dce8afab8daff52cf46799719d5ed0a48
lib/views/bottom-tab.js
lib/views/bottom-tab.js
'use strict'; class BottomTab extends HTMLElement{ initialize(Content, onClick) { this._active = false this._visibility = true this.innerHTML = Content this.classList.add('linter-tab') this.countSpan = document.createElement('span') this.countSpan.classList.add('count') this.countSpan.t...
'use strict'; class BottomTab extends HTMLElement{ constructor(Content){ this.innerHTML = Content } attachedCallback() { this.active = false this.visibility = false this.classList.add('linter-tab') this.countSpan = document.createElement('span') this.countSpan.classList.add('count') ...
Move DOM Updates to attachedCallback of BottomTab
:new: Move DOM Updates to attachedCallback of BottomTab
JavaScript
mit
JohnMurga/linter,kaeluka/linter,Arcanemagus/linter,levity/linter,UltCombo/linter,shawninder/linter,iam4x/linter,AtomLinter/Linter,steelbrain/linter,DanPurdy/linter,blakeembrey/linter,e-jigsaw/Linter,mdgriffith/linter,elkeis/linter,atom-community/linter,AsaAyers/linter
f29f864c971c460d7ba121db0ad3017c63573bec
client/src/actions/channelsActions.js
client/src/actions/channelsActions.js
import {fetchChannels} from '../api/channelsApi' export function getArticles(channel) { return function(dispatch) { return fetchChannels(channel) .then(response => { dispatch({ type: 'GET_ARTICLES', payload: { name: channel.name, articles: response.articl...
import {fetchChannels} from '../api/channelsApi' export function getArticles(channel) { return function(dispatch) { return fetchChannels(channel) .then(response => { dispatch({ type: 'GET_ARTICLES', payload: { name: channel.name, articles: response.articl...
Remove return value from getArticles
Remove return value from getArticles
JavaScript
mit
kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed
312023a21652ae5d6ddb8a8ce5c0dcd3e5c68e69
src/main/webapp/scripts/index.js
src/main/webapp/scripts/index.js
/** * Check if user is logged in */ function authUser() { fetch('/login') .then(response => response.json()) .then(userAuthInfo => { if(userAuthInfo.isLoggedIn) { console.log("User is logged in"); } else { console.log("User is logged out"); } }); }
/** * Check if user is logged in */ function authUser() { fetch('/login') .then(response => response.json()) .then(userAuthInfo => { let loginButton = document.getElementById('google-login-button'); let loginButtonText = document.getElementById('google-login-button-text'); ...
Make google login button functional with JS
Make google login button functional with JS
JavaScript
apache-2.0
googleinterns/step27-2020,googleinterns/step27-2020,googleinterns/step27-2020
09eb706f499092bc67ad5470acabd1f620e77349
client/routes.js
client/routes.js
Router.map(function() { // Read paths from a JSON configuration file. // Formatted as { '/path': 'template', ... } // This seems nicer in a config file than hard coding it here. // Pull this from routes.js var welcome_routes = { "/": "welcome_blurb", "/welcome": "welcome_blurb", "/login": "login",...
Router.map(function() { // Read paths from a JSON configuration file. // Formatted as { '/path': 'template', ... } // This seems nicer in a config file than hard coding it here. // Pull this from routes.js var welcome_routes = { "/welcome": "welcome_blurb", "/login": "login", "/register": "registe...
Make / and /welcome show the same page by redirecting to /welcome in the / route.
Make / and /welcome show the same page by redirecting to /welcome in the / route.
JavaScript
agpl-3.0
FinalsClub/Annotorious
7001a99ac6e7341b900472cb72eb92385765bf6d
contactmps/static/javascript/embed.js
contactmps/static/javascript/embed.js
if (document.location.hostname == "localhost") { var baseurl = ""; } else { var baseurl = "https://noconfidencevote.openup.org.za"; } var initContactMPsPymParent = function() { var pymParent = new pym.Parent('contactmps-embed-parent', baseurl + '/campaign/newsmedia/', {}); }; var agent = navigator.userAgent...
if (document.location.hostname == "localhost") { var baseurl = ""; } else { var baseurl = "https://noconfidencevote.openup.org.za"; } var initContactMPsPymParent = function() { var pymParent = new pym.Parent('contactmps-embed-parent', baseurl + '/campaign/newsmedia/', {}); }; var agent = navigator.userAgent...
Fix background - abs url for injected code
Fix background - abs url for injected code
JavaScript
mit
OpenUpSA/contact-mps,OpenUpSA/contact-mps,OpenUpSA/contact-mps,OpenUpSA/contact-mps