commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
624
message
stringlengths
15
4.7k
lang
stringclasses
3 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
315a504853934027997a08faf7d91a2da5aead4f
simulators/moisture_simulator.js
simulators/moisture_simulator.js
/* * Moisture simulator * */ module.exports = function(sensor_id){ var simulator = {}; simulator.id = sensor_id; simulator.type = 'humidity'; simulator.unit = 'humidity.%perL'; simulator.getValue = function(){ return Math.round((60 + 5 * Math.random())*100)/100; }; ...
/* * Moisture simulator * */ module.exports = function(sensor_id){ var simulator = {}; simulator.id = sensor_id; simulator.type = 'moisture'; simulator.unit = 'humidity.%perL'; simulator.getValue = function(){ return Math.round((60 + 5 * Math.random())*100)/100; }; ...
Update simulator.type for moisture simulator
Update simulator.type for moisture simulator
JavaScript
apache-2.0
HomeAgain/HomePi
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
d40c221293b87ab1da056f5eab6f07cc6db3b137
tasks/coverage.js
tasks/coverage.js
/* * grunt-istanbul-coverage * https://github.com/daniellmb/grunt-istanbul-coverage * * Copyright (c) 2013 Daniel Lamb * Licensed under the MIT license. */ 'use strict'; module.exports = function (grunt) { var helper = require('./helpers').init(grunt); grunt.registerTask('coverage', 'check coverage th...
/* * grunt-istanbul-coverage * https://github.com/daniellmb/grunt-istanbul-coverage * * Copyright (c) 2013 Daniel Lamb * Licensed under the MIT license. */ 'use strict'; module.exports = function (grunt) { var helper = require('./helpers').init(grunt); grunt.registerMultiTask('coverage', 'check covera...
Switch task to be a multitask so you can have multipe options for what you need
Switch task to be a multitask so you can have multipe options for what you need
JavaScript
mit
daniellmb/grunt-istanbul-coverage
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
147e61e4f7557bcc3154fdfee50b128366229fb0
api-server/development-entry.js
api-server/development-entry.js
const nodemon = require('nodemon'); nodemon({ ext: 'js json', // --silent squashes an ELIFECYCLE error when the server exits exec: 'DEBUG=fcc* npm run --silent babel-dev-server', watch: './server', spawn: true }); nodemon.on('restart', function nodemonRestart(files) { console.log('App restarted due to: ',...
const path = require('path'); const nodemon = require('nodemon'); nodemon({ ext: 'js json', // --silent squashes an ELIFECYCLE error when the server exits exec: 'DEBUG=fcc* npm run --silent babel-dev-server', watch: path.resolve(__dirname, './server'), spawn: true }); nodemon.on('restart', function nodemonR...
Resolve the correct watch path for nodemon
fix(nodemon): Resolve the correct watch path for nodemon
JavaScript
bsd-3-clause
FreeCodeCamp/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp,jonathanihm/freeCodeCamp,pahosler/freecodecamp,HKuz/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp,otavioarc/freeCodeCamp,BhaveshSGupta/FreeCodeCamp,raisedadead/FreeCodeCamp,raisedadead/FreeCodeCamp,FreeCodeCamp/FreeCodeCamp,otavioarc/freeCodeCamp,HKuz/FreeCodeCamp,pahosler...
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
34877f95ac93068b5dcc1d0746fbc505fe378b42
Bookmarklet.js
Bookmarklet.js
/* * Bookmarklet.js */ import { getGlobalName, getTitle, getVersion } from './utils/constants'; import { addNodes, removeNodes } from './utils/dom'; import { MessageDialog } from './utils/dialog'; export { Bookmarklet }; /* eslint no-console: 0 */ function logVersionInfo (appName) { console.log(getTitle() + ' v' ...
/* * Bookmarklet.js */ import { getGlobalName, getTitle, getVersion } from './utils/constants'; import { addNodes, removeNodes } from './utils/dom'; import { MessageDialog } from './utils/dialog'; export { Bookmarklet }; /* eslint no-console: 0 */ function logVersionInfo (appName) { console.log(getTitle() + ' : v...
Format version info with separators
Format version info with separators
JavaScript
apache-2.0
oaa-tools/bookmarklets-library,oaa-tools/bookmarklets-library
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
c9d6413c5480f4fb059904ed3f84821ad1513570
android_ignore_translation_errors.js
android_ignore_translation_errors.js
#!/usr/bin/env node // add additional build-extras.gradle file to instruct android's lint to ignore translation errors // v0.1.c // causing error in the build --release // Issue: https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/80 // // Warning: This solution does not solve the problem only makes it p...
#!/usr/bin/env node // add additional build-extras.gradle file to instruct android's lint to ignore translation errors // v0.1.c // causing error in the build --release // Issue: https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/80 // // Warning: This solution does not solve the problem only makes it p...
Use append mode in case other hooks want to write to build-extras.gradle
Use append mode in case other hooks want to write to build-extras.gradle
JavaScript
mit
driftyco/ionic-package-hooks,driftyco/ionic-package-hooks
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
1bc1a5cc39570cff0713f748505d3973fb9ec534
lib/package/plugins/serviceCalloutResponseName.js
lib/package/plugins/serviceCalloutResponseName.js
/* Copyright 2019 Google LLC 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
/* Copyright 2019 Google LLC 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
Fix typo: 'Resopnse' should be 'Response'
Fix typo: 'Resopnse' should be 'Response'
JavaScript
apache-2.0
apigee/apigeelint,apigeecs/bundle-linter
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
d776024c9e45c7f95ccf3f6e0e8f16ad9515b458
tests/models/DeviceModel.js
tests/models/DeviceModel.js
/*jshint expr:true */ describe('DeviceModel', function() { describe('instantiation', function() { beforeEach(function() { this.model = new spiderOakApp.DeviceModel({ name: "Test device", url: "Test%20device/", icon: "mac" }); }); it('should have a name', function() { ...
/*jshint expr:true */ describe('DeviceModel', function() { describe('instantiation', function() { beforeEach(function() { this.model = new spiderOakApp.DeviceModel({ name: "Test device", url: "Test%20device/", icon: "mac" }); }); it('should have a name', function() { ...
Fix chaining grammar typoo - use '.should.be.a()' instead of (working, but less clear) '.should.a()'
Fix chaining grammar typoo - use '.should.be.a()' instead of (working, but less clear) '.should.a()'
JavaScript
apache-2.0
SpiderOak/SpiderOakMobileClient,SpiderOak/SpiderOakMobileClient,antoniodesouza/SpiderOakMobileClient,antoniodesouza/SpiderOakMobileClient
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
f6702eaf4dae76b1d678c1e3885b2b0ebdb4bc69
common/form/mixin/action-behaviour.js
common/form/mixin/action-behaviour.js
var assign = require('object-assign'); var actionMixin = { /** * Get the entity identifier for the form loading. * @returns {object} - The identifier of the entity. */ _getId: function formGetId() { if(this.getId){ return this.getId(); } return this.state.id; }, /** * Get the constr...
var assign = require('object-assign'); var isFunction = require('lodash/lang/isFunction'); var actionMixin = { /** * Get the entity identifier for the form loading. * @returns {object} - The identifier of the entity. */ _getId: function formGetId() { if(this.getId){ return this.getId(); } ...
Add checking befor getEntity value..
[form] Add checking befor getEntity value..
JavaScript
mit
JRLK/focus-components,sebez/focus-components,Ephrame/focus-components,JRLK/focus-components,Ephrame/focus-components,JRLK/focus-components,Bernardstanislas/focus-components,anisgh/focus-components,JabX/focus-components,Jerom138/focus-components,anisgh/focus-components,asimsir/focus-components,Bernardstanislas/focus-com...
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
02b3bb70674d192b864f1c15f542af125a1655ef
public/js/main.js
public/js/main.js
$(document).ready(function () { $(".carousel-inner-download").cycle({ fx:'scrollVert', pager: '.pager', timeout: 4000, speed: 500, // pause: 1, }); $(".c1-right").on("click", function(e) { var activeImage = $(".c1-image-shown"); var nextImage = activeImage.next(); if(nextImage...
$(document).ready(function () { $(".carousel-inner-download").cycle({ fx:'scrollVert', pager: '.pager', timeout: 4000, speed: 1000, // pause: 1, }); $(".c1-right").on("click", function(e) { var activeImage = $(".c1-image-shown"); var nextImage = activeImage.next(); if(nextImag...
Add slow down carousel speed
Add slow down carousel speed
JavaScript
mit
ZachKGordon/project_week_one,ZachKGordon/project_week_one
031a0774e1995ca132120617131b5582bdf67b07
lib/handlers/documents/index.js
lib/handlers/documents/index.js
"use strict"; var restify = require('restify'); var async = require('async'); var Anyfetch = require('anyfetch'); module.exports.get = function get(req, res, next) { if(!req.query.context) { return next(new restify.ConflictError("Missing query parameter")); } async.waterfall([ function getDocuments(cb)...
"use strict"; var restify = require('restify'); var async = require('async'); var Anyfetch = require('anyfetch'); module.exports.get = function get(req, res, next) { if(!req.query.context) { return next(new restify.ConflictError("Missing query parameter")); } async.waterfall([ function getDocuments(cb)...
Handle null case for client id
Handle null case for client id
JavaScript
mit
AnyFetch/companion-server
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
740fe7c68a3dc0c66621ac83b04df579d7e0b180
pages/about.js
pages/about.js
/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import React, { Component } from 'react'; export default class extends Component { render() { return ( <div> <h1>About Us</h1> <p>We are a...
/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import React, { Component } from 'react'; export default class extends Component { render() { return ( <div> <h1>About Us</h1> <p>We are a...
Revert "Added revert test line"
Revert "Added revert test line" This reverts commit 493c18f25d20e16f044d7ec489f836f72151e3bb.
JavaScript
mit
Princeton-SSI/organization-website
dd0fc15d814acf458ce1e2e53859552c8ebe19da
server/routers/cars-router.js
server/routers/cars-router.js
var express = require('express'), router = express.Router(), carsData = require('../data/data-cars'), carsController = require('../controllers/cars-controller')(carsData), passport = require('passport'); // TODO: Add more routes. router .get('/:id', carsController.getCarById) .post('/delete', p...
var express = require('express'), router = express.Router(), carsData = require('../data/data-cars'), carsController = require('../controllers/cars-controller')(carsData), passport = require('passport'); // TODO: Add more routes. router .get('/all', carsController.getAllCars) .get('/:id', carsC...
Add routing for getting cars and buying car.
Add routing for getting cars and buying car.
JavaScript
mit
TA-2016-NodeJs-Team2/Telerik-Racer,TA-2016-NodeJs-Team2/Telerik-Racer
217dac82baeb840fc9f6c0e65962cd1b817b7f10
client/templates/bets/create.js
client/templates/bets/create.js
var createBetNotification = function(bet){ var bet = Bets.findOne({ _id: bet }); BetNotifications.insert({ toNotify: bet.bettors[1], betBy: bet.bettors[0], bet: bet._id }); } Template.createBetForm.events({ "submit .create-bet" : function(event){ event.preventDefault(); var title = even...
var createBetNotification = function(bet){ var bet = Bets.findOne({ _id: bet }); BetNotifications.insert({ toNotify: bet.bettors[1], betBy: bet.bettors[0], bet: bet._id }); } Template.createBetForm.events({ "submit .create-bet" : function(event){ event.preventDefault(); var title = event....
Fix spacing in multiline variables
Fix spacing in multiline variables
JavaScript
mit
nmmascia/webet,nmmascia/webet
94468916921501961db178a80f93439f686bf830
config.js
config.js
module.exports = { auth : { github: { appId: 'edfc013fd01cf9d52a31', appSecret: 'a9ebb79267b7d968f10e9004724a9d9ac817a8ee', callbackURL : 'http://akrasia.ujo.guru:7173/auth/github/callback', username : "Zeukkari" }, local : { subnets : [ "192.168.1.0/24", "127.0.0.1/32" ] ...
var process = require('process'); module.exports = { auth : { local : { subnets : [ "192.168.1.0/24", "127.0.0.1/32" ] }, github : { /* * FIXME: Authentication mechanism is improperly implemented. * * - Username checkup seems a little strange * - appSecret should remain secr...
Read app secret from environment
Read app secret from environment
JavaScript
apache-2.0
Zeukkari/node-telldusserver,Zeukkari/node-telldusserver
eeb4f53559cecab3c01b3d62c69eaf1a599c3f0e
config/models.js
config/models.js
/** * Default model configuration * (sails.config.models) * * Unless you override them, the following properties will be included * in each of your models. * * For more info on Sails models, see: * http://sailsjs.org/#!/documentation/concepts/ORM */ module.exports.models = { /******************************...
/** * Default model configuration * (sails.config.models) * * Unless you override them, the following properties will be included * in each of your models. * * For more info on Sails models, see: * http://sailsjs.org/#!/documentation/concepts/ORM */ module.exports.models = { /******************************...
Set sails.js migration property to 'alter'
Set sails.js migration property to 'alter' We want Sails.js to try to perform migration automatically
JavaScript
agpl-3.0
romain-ortega/nanocloud,Nanocloud/nanocloud,Gentux/nanocloud,Leblantoine/nanocloud,corentindrouet/nanocloud,romain-ortega/nanocloud,corentindrouet/nanocloud,corentindrouet/nanocloud,Nanocloud/nanocloud,Gentux/nanocloud,corentindrouet/nanocloud,Nanocloud/nanocloud,dynamiccast/nanocloud,Gentux/nanocloud,dynamiccast/nanoc...
4c2f94d399f37f39bd9cb4d4fad8b0cce35f2231
data/assets.js
data/assets.js
module.exports = [ { id: 'Hairstyles', required: false, sortOrder: 1 }, { id: 'Beards', required: false, sortOrder: 4 }, { id: 'Body', required: true, sortOrder: 0 }, { id: 'Glasses', required: false, sortOrder: 2 }, { id: 'Scarfes', required: fa...
module.exports = [ { id: 'Hairstyles', required: false, sortOrder: 1 }, { id: 'Beards', required: false, sortOrder: 5 }, { id: 'Body', required: true, sortOrder: 0 }, { id: 'Glasses', required: false, sortOrder: 2 }, { id: 'Scarfes', required: fa...
Update sort order in order to fix tie to be under jackets
Update sort order in order to fix tie to be under jackets
JavaScript
mit
g8extended/Character-Generator,g8extended/Character-Generator
33f0d928fa52c7bab202017d31bbed5be43bb57f
data/search-data.js
data/search-data.js
module.exports = function (models) { const { Photo, User } = models; return { searchPhotos(pattern) { let regex = new RegExp(pattern, 'i'); return new Promise((resolve, reject) => { Photo.find({ $or: [{ ...
module.exports = function (models) { const { Photo, User } = models; return { searchPhotos(pattern) { let regex = new RegExp(pattern, 'i'); return new Promise((resolve, reject) => { Photo.find({ $or: [{ ...
Tag searching now really works!
Tag searching now really works!
JavaScript
mit
Bird-Shamaness/MuchPixels,Bird-Shamaness/MuchPixels
dfaea825bc63b9930a3ed2ae4e170771981f9c0a
app.js
app.js
var RtmClient = require('@slack/client').RtmClient; var RTM_CLIENT_EVENTS = require('@slack/client').CLIENT_EVENTS.RTM; var RTM_EVENTS = require('@slack/client').RTM_EVENTS; var Conversation = require('watson-developer-cloud/conversation/v1') var conversation = new Conversation({ username: process.env.CONVERSATION_US...
var RtmClient = require('@slack/client').RtmClient; var RTM_CLIENT_EVENTS = require('@slack/client').CLIENT_EVENTS.RTM; var RTM_EVENTS = require('@slack/client').RTM_EVENTS; var Conversation = require('watson-developer-cloud/conversation/v1') var conversation = new Conversation({ username: process.env.CONVERSATION_US...
Fix history message user issue
Fix history message user issue
JavaScript
mit
SinisterBlade/slackbot
1348dbf2b3dc6150ed1939da81a630943eafe99c
lib/octobat-moss-service.js
lib/octobat-moss-service.js
'use strict'; var rest = require('restler-q'); var q = require('q'); module.exports = function(options) { return q.fcall(function() { if (!options) { throw new Error("options required"); } var supplier = options.supplier; var customer = options.customer; if (!supplier || !customer) { ...
'use strict'; var rest = require('restler-q'); var q = require('q'); module.exports = function(options) { return q.fcall(function() { if (!options) { throw new Error("options required"); } var supplier = options.supplier; var customer = options.customer; if (!supplier || !customer) { ...
Handle change to octobat service api.
Handle change to octobat service api.
JavaScript
mit
gitterHQ/vat-calculator
f60c3ffc40204c6c92581b96584a176d88fc21ec
lib/transport/demo/index.js
lib/transport/demo/index.js
"use babel"; import github from './github'; import git from './git'; export default { github, git, make: function ({git, github}) { let dup = Object.create(this); if (git) { let g = Object.create(this.git); Object.keys(git).forEach((k) => { g[k] = git[k]; }); dup.git ...
"use babel"; import github from './github'; import git from './git'; function validStub(name, real, stub) { if (real === undefined) { throw new Error(`Attempt to stub nonexistent property: ${name}`); } if (typeof real !== typeof stub) { throw new Error(`Attempt to stub ${name} (${typeof real}) with ${t...
Validate stubs before permitting them.
Validate stubs before permitting them.
JavaScript
mit
smashwilson/pull-request
d27e66c219a2b0f175ea392ca41b074f25fdd4ef
source/moon-container-init.js
source/moon-container-init.js
(function (enyo, scope) { enyo.kind({ name: 'moon.ContainerInitializer', components: [ {kind: 'moon.Drawers', drawers: [{}], components: [ {kind: 'moon.Panels', pattern: 'activity', components: [ {components: [ {kind: 'moon.TooltipDecorator', components: [{kind: 'moon.Button'},{kind: 'moon.Toolti...
(function (enyo, scope) { enyo.kind({ name: 'moon.ContainerInitializer', components: [ {kind: 'moon.Drawers', drawers: [{}], components: [ {kind: 'moon.Panels', pattern: 'activity', components: [ {components: [ {kind: 'moon.TooltipDecorator', components: [{kind: 'moon.Button'},{kind: 'moon.Toolti...
Remove moon.Slider from set of pre-[initialized, rendered, destroyed] controls.
ENYO-373: Remove moon.Slider from set of pre-[initialized, rendered, destroyed] controls. Enyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>
JavaScript
apache-2.0
mcanthony/moonstone,mcanthony/moonstone,mcanthony/moonstone,enyojs/moonstone
120371b68002767acad1310860cbfaecef5dfd7d
server/routes/schema-info.js
server/routes/schema-info.js
require('../typedefs'); const router = require('express').Router(); const mustHaveConnectionAccess = require('../middleware/must-have-connection-access.js'); const ConnectionClient = require('../lib/connection-client'); const wrap = require('../lib/wrap'); /** * @param {Req} req * @param {Res} res */ async function...
require('../typedefs'); const router = require('express').Router(); const mustHaveConnectionAccess = require('../middleware/must-have-connection-access.js'); const ConnectionClient = require('../lib/connection-client'); const wrap = require('../lib/wrap'); /** * @param {Req} req * @param {Res} res */ async function...
Send schema info error as 400
Send schema info error as 400 This assume schema info failure is due to user input, not application code. This could be that the server is unavailable however. Regardless it is something to be expected as opposed to an internal server error
JavaScript
mit
rickbergfalk/sqlpad,rickbergfalk/sqlpad,rickbergfalk/sqlpad
3869efee28f86209ba9bb692d9f70c63f1b3bc8c
share/spice/youtube/spice.js
share/spice/youtube/spice.js
function ddg_spice_youtube(api_result) { "use strict"; DDG.require("/js/nryt.js", { success: function() { window.iqyt = 2; ddgyt.nryt(api_result); } }); }
function ddg_spice_youtube(api_result) { "use strict"; DDG.load("/js/nryt.js", { success: function() { window.iqyt = 2; ddgyt.nryt(api_result); } }); }
Use DDG.load instead of DDG.require on the YouTube plugin.
Use DDG.load instead of DDG.require on the YouTube plugin. - DDG.require was renamed to DDG.load.
JavaScript
apache-2.0
digit4lfa1l/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,stennie/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,marianosimone/zero...
1ee9edda855c8570fe016fd4abb1cf6857a0396a
lib/util/badgeVault.js
lib/util/badgeVault.js
'use strict'; const Promise = require('bluebird'); const readFile = Promise.promisify(require('fs').readFile); const stat = Promise.promisify(require('fs').stat); const cache = {}; const badgesDir = `${__dirname}/../../badges`; function info(score, options) { const isUnknown = typeof score !== 'number'; opt...
'use strict'; const Promise = require('bluebird'); const readFile = Promise.promisify(require('fs').readFile); const stat = Promise.promisify(require('fs').stat); const cache = {}; const badgesDir = `${__dirname}/../../badges`; function info(score, options) { const isUnknown = typeof score !== 'number'; opt...
Change rev option to 0.
Change rev option to 0.
JavaScript
mit
npms-io/npms-badges
184d6265997ef8fd114e0a605a1a2b279c150543
game/game-state-managers/instructionsState.js
game/game-state-managers/instructionsState.js
var instructionsState = { create: function () { _setBackgroundImage('instructions'); battleStateButton = new MenuButton(528, 175, "mainMenuButtons", "mapSelectState", "battleGround", "map", "army1", "army2", "battleButton", 0, 0, 1, 0); campaignStateButton = new MenuButton(528, 275, "mainMenuButtons", "m...
var instructionsState = { create: function () { _setBackgroundImage('instructions'); battleStateButton = new MenuButton(175, 500, "mainMenuButtons", "mapSelectState", "battleGround", "map", "army1", "army2", "battleButton", 0, 0, 1, 0); campaignStateButton = new MenuButton(450, 500, "mainMenuButtons", "m...
Adjust buttons on instructions page
Adjust buttons on instructions page
JavaScript
mit
JohnP42/Fantasy-Wars,JohnP42/Fantasy-Wars
d92515ee55752ab9054441ac2dc2ae7f2dd7fc07
source/nestedSortableCtrl.js
source/nestedSortableCtrl.js
(function () { 'use strict'; angular.module('ui.nestedSortable') .controller('NestedSortableController', ['$scope', '$attrs', 'nestedSortableConfig', function ($scope, $attrs, nestedSortableConfig) { $scope.sortableElement = null; $scope.sortableModelValue = null; $scope.callba...
(function () { 'use strict'; angular.module('ui.nestedSortable') .controller('NestedSortableController', ['$scope', 'nestedSortableConfig', function ($scope, nestedSortableConfig) { $scope.sortableElement = null; $scope.sortableModelValue = null; $scope.callbacks = null; ...
Remove unexisting $attrs provider + unused itemScope parameter
Remove unexisting $attrs provider + unused itemScope parameter
JavaScript
mit
joaocc/angular-ui-tree,TommyM/angular-ui-tree,akshath4u/akkutest,kotmatpockuh/angular-ui-tree,robertdamoc/angular-ui-tree,faceleg/angular-ui-tree,Movideo/angular-ui-tree,fmoliveira/angular-ui-tree,foglerek/angular-ui-tree,BlakeBrown/angular-ui-tree,albi34/angular-ui-tree,zachlysobey/angular-ui-tree,asciicode/angular-ui...
3d95a7876e938cc9dc7ade149a3b7e4b460f854a
web/src/constants/stocks.js
web/src/constants/stocks.js
const stockIndexRegex = /^([^/]+)\/([^/]+)$/; export const STOCK_INDICES = (process.env.STOCK_INDICES || '') .split(',') .map(code => code.match(stockIndexRegex)) .filter(code => code) .reduce((last, [, code, name]) => ({ ...last, [code]: name }), {}); export const DO_STOCKS_LIST =...
const stockIndexRegex = /^([^/]+)\/([^/]+)$/; export const STOCK_INDICES = (process.env.STOCK_INDICES || '') .split(',') .map(code => code.match(stockIndexRegex)) .filter(code => code) .reduce((last, [, code, name]) => ({ ...last, [code]: name }), {}); export const DO_STOCKS_LIST =...
Fix reference to DO_STOCKS_LIST environment variable
Fix reference to DO_STOCKS_LIST environment variable
JavaScript
mit
felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget
07ceb4095f62f37ba36b401f8834706f9aeb712a
app.js
app.js
/*jslint node: true*/ "use strict"; var site = require("./lib/scraper").site; site. getRecipeUrls(). then(function (recipeUrls) { return site.getRecipe(recipeUrls[0]); }). then(function (recipe) { console.log(JSON.stringify(recipe)); });
/*jslint node: true*/ "use strict"; var site = require("./lib/scraper").site; site. getRecipeUrls(). then(function (recipeUrls) { return site.getRecipe(recipeUrls[0]); }). then(function (recipe) { console.log(JSON.stringify(recipe)); }). done();
Make sure to call done to end the promise chain
Make sure to call done to end the promise chain
JavaScript
mit
Koekelas/dagelijkse-kost,Koekelas/dagelijkse-kost
d859978c912d6a49ca1d87f012647eccdd7378d9
app.js
app.js
const Server = require('./server.heroku.js') const port = (process.env.PORT || 8080) const app = Server.app() /*if (process.env.NODE_ENV !== 'production') { const webpack = require('webpack') const webpackDevMiddleware = require('webpack-dev-middleware') const webpackHotMiddleware = require('webpack-hot-middlewa...
const Server = require('./server.heroku.js') const port = (process.env.PORT || 8080) const app = Server.app() if (process.env.NODE_ENV !== 'production') { const webpack = require('webpack') const WebpackDevServer = require('webpack-dev-server'); const config = require('./webpack.config.js') new WebpackDevServ...
Consolidate dev and prod server initialization
Consolidate dev and prod server initialization
JavaScript
mit
kngroo/Kngr,kngroo/Kngr
2a6d614b453c545bce4c8a8b0ef9d7548554c74b
app.js
app.js
var config = require('./config'); var express = require('express'); var bodyParser = require('body-parser'); var winston = require('winston'); winston.add(winston.transports.File, { filename: 'info.log', level: 'info' }); winston.remove(winston.transports.Console); winston.add(winston.transports.Console, { level: 'info...
var config = require('./config'); var express = require('express'); var bodyParser = require('body-parser'); var winston = require('winston'); winston.add(winston.transports.File, { filename: 'info.log', level: 'info' }); winston.remove(winston.transports.Console); winston.add(winston.transports.Console, { level: 'info...
Test serving static log file.
Test serving static log file.
JavaScript
mit
membersheep/4bot
d927134ca685dcdadfafbea6a732cb95120399ff
app.js
app.js
const discord = require('discord.js'); const fs = require('fs'); const yaml = require('js-yaml'); const client = new discord.Client({ fetchAllMembers: true, messageCacheMaxSize: 100000 }); if (fs.existsSync('./config.yml')) { var config = yaml.safeLoad(fs.readFileSync('./config.yml', 'utf8')); } else { th...
const discord = require('discord.js'); const fs = require('fs'); const yaml = require('js-yaml'); const client = new discord.Client({ fetchAllMembers: true, messageCacheMaxSize: 100000 }); if (fs.existsSync('./config.yml')) { var config = yaml.safeLoad(fs.readFileSync('./config.yml', 'utf8')); } else { th...
Add some basic error logging
Add some basic error logging
JavaScript
mit
IanMurray/AnnuBot
75534b5dca41c6e5a36b34094ce50d72a23a3889
app.js
app.js
var app = require('express')(); var server = require('http').Server(app); var io = require('socket.io')(server); var path = require('path'); var game = require('./game.js'); server.listen(3000, function() { console.log("listening on port 3000"); }); app.set('views', path.join(__dirname, 'templates')); app.set('view...
var express = require('express'); var http = require('http'); var socketIO = require('socket.io'); var path = require('path'); var game = require('./game.js'); var app = express(); var server = http.Server(app); var io = socketIO(server); app.set('views', path.join(__dirname, 'templates')); app.set('view engine', 'ja...
Rename imports to get access to express
Rename imports to get access to express
JavaScript
mit
vakila/net-set,vakila/net-set
cc41abb3c8ea389bdf526c3fcafbc83b5b2a1785
cli.js
cli.js
#!/usr/bin/env node 'use strict'; var meow = require('meow'); var w3counter = require('./'); var cli = meow({ help: [ 'Usage', ' $ w3counter <type>', '', 'Example', ' $ w3counter browser', ' $ w3counter country', ' $ w3counter os', ' $ w3counter res' ].join('\n') }); if (!cli.input.length) { ...
#!/usr/bin/env node 'use strict'; var meow = require('meow'); var w3counter = require('./'); var cli = meow({ help: [ 'Usage', ' $ w3counter <type>', '', 'Example', ' $ w3counter browser', ' $ w3counter country', ' $ w3counter os', ' $ w3counter res' ].join('\n') }); if (!cli.input.length) { ...
Add percentage to CLI output
Add percentage to CLI output
JavaScript
mit
kevva/w3counter
b5351acc81211a1f57362ed02283e8215a7feca3
src/components/posts_show.js
src/components/posts_show.js
import React from 'react'; import connect from 'react-redux'; import { fetchPost } from '../actions'; class PostsShow extends React.Component { componentDidMount() { const { id } = this.props.match.params; this.props.fetchPost(id); } render() { return ( <div> Posts Show </div> ...
import React from 'react'; import connect from 'react-redux'; import { fetchPost } from '../actions'; class PostsShow extends React.Component { componentDidMount() { const { id } = this.props.match.params; this.props.fetchPost(id); } render() { const { post } = this.props; return ( <div> ...
Add basic markup of single post
Add basic markup of single post
JavaScript
mit
monsteronfire/redux-learning-blog,monsteronfire/redux-learning-blog
6d4640854d6842b3c283cea18efd4a5f008d5121
packages/core/module.js
packages/core/module.js
/** * @copyright 2016-2019, Miles Johnson * @license https://opensource.org/licenses/MIT */ // Our index re-exports TypeScript types, which Babel is unable to detect and omit. // Because of this, Webpack and other bundlers attempt to import values that do not exist. // To mitigate this issue, we need this mod...
/** * @copyright 2016-2019, Miles Johnson * @license https://opensource.org/licenses/MIT */ // Our index re-exports TypeScript types, which Babel is unable to detect and omit. // Because of this, Webpack and other bundlers attempt to import values that do not exist. // To mitigate this issue, we need this mod...
Add Element and Parser to esm index.
Add Element and Parser to esm index.
JavaScript
mit
milesj/interweave,milesj/interweave,milesj/interweave
e3726db6f132c4c170c892da74a542f9967bc1ff
server/migrations/20180201131052-create-shares.js
server/migrations/20180201131052-create-shares.js
'use strict' var Sequelize = require('sequelize') var tableName = 'Shares' var schema = { id: { type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true }, sharer: { type: Sequelize.INTEGER, allowNull: false }, sharee: { type: Sequelize.INTEGER, allowNull: false } } mod...
'use strict' var Sequelize = require('sequelize') var tableName = 'Shares' var schema = { id: { type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true }, sharer: { type: Sequelize.INTEGER, allowNull: false }, sharee: { type: Sequelize.INTEGER, allowNull: false } } mod...
Enable shares migration for all databases
Enable shares migration for all databases
JavaScript
agpl-3.0
BspbOrg/smartbirds-server,BspbOrg/smartbirds-server,BspbOrg/smartbirds-server
0cb7904353a5b900e026d22df28a0357acad58b0
server/services/signup/hooks/getSignupAndEvent.js
server/services/signup/hooks/getSignupAndEvent.js
const config = require('../../../../config/ilmomasiina.config'); // eslint-disable-line const md5 = require('md5'); module.exports = () => (hook) => { const models = hook.app.get('models'); const id = hook.id; const editToken = hook.params.query.editToken; if (editToken !== md5(`${`${hook.id}`}${config.editTo...
const _ = require('lodash'); const config = require('../../../../config/ilmomasiina.config'); // eslint-disable-line const md5 = require('md5'); module.exports = () => (hook) => { const models = hook.app.get('models'); const id = hook.id; const editToken = hook.params.query.editToken; const fields = []; cons...
Add necessary data to server response and improve error handling
Add necessary data to server response and improve error handling
JavaScript
mit
athenekilta/ilmomasiina,athenekilta/ilmomasiina
d0768e1473108f14abeb9d2d29fdbceae87caf94
playground/parseMson.js
playground/parseMson.js
import protagonist from 'protagonist'; export default function parseMson(mson, cb) { protagonist.parse(mson.trim(), (err, parseResult) => { let dataStructureElements; if (err) { return cb(err); } dataStructureElements = parseResult.content[0].content; dataStructureElements = dataStructure...
import protagonist from 'protagonist'; export default function parseMson(mson, cb) { protagonist.parse(mson.trim(), (err, parseResult) => { let dataStructureElements; if (err) { return cb(err); } dataStructureElements = parseResult.content[0].content[0].content; dataStructureElements = ...
Send a list of all data structure elements.
Send a list of all data structure elements.
JavaScript
mit
apiaryio/attributes-kit,apiaryio/attributes-kit,apiaryio/attributes-kit
58d6977d32d96b19bbf76d51f5612313b29fdc4a
src/plugins/plugin-shim.js
src/plugins/plugin-shim.js
/** * Add shim config for configuring the dependencies and exports for * older, traditional "browser globals" scripts that do not use define() * to declare the dependencies and set a module value. */ (function(seajs, global) { // seajs.config({ // shim: { // "jquery": { // src: "lib/jquery.js", // ...
/** * Add shim config for configuring the dependencies and exports for * older, traditional "browser globals" scripts that do not use define() * to declare the dependencies and set a module value. */ (function(seajs, global) { // seajs.config({ // shim: { // "jquery": { // src: "lib/jquery.js", // ...
Fix a bug in Node.js
Fix a bug in Node.js
JavaScript
mit
LzhElite/seajs,Lyfme/seajs,seajs/seajs,miusuncle/seajs,imcys/seajs,tonny-zhang/seajs,miusuncle/seajs,lianggaolin/seajs,eleanors/SeaJS,evilemon/seajs,wenber/seajs,eleanors/SeaJS,treejames/seajs,coolyhx/seajs,MrZhengliang/seajs,JeffLi1993/seajs,uestcNaldo/seajs,Gatsbyy/seajs,liupeng110112/seajs,Lyfme/seajs,kuier/seajs,Mr...
c8aefb887e233ad064db33ba87fe6b83a7b67338
test/grunt-accessibility_test.js
test/grunt-accessibility_test.js
'use strict'; var grunt = require('grunt'); exports.accessibilityTests = { matchReports: function(test) { var actual; var expected; test.expect(2); actual = grunt.file.read('reports/txt/test.txt'); expected = grunt.file.read('test/expected/txt/test.txt'); test.equal(actual, expected, 'Sho...
'use strict'; var grunt = require('grunt'); function readFile(file) { var contents = grunt.file.read(file); if (process.platform === 'win32') { contents = contents.replace(/\r\n/g, '\n'); } return contents; } exports.accessibilityTests = { matchReports: function(test) { var actual; var expec...
Fix tests on Windows with autocrlf on.
Fix tests on Windows with autocrlf on.
JavaScript
mit
yargalot/grunt-accessibility,yargalot/grunt-accessibility
8341dad7f0ca21d296253c8668f99d9c27b9f175
app/models/virtualMachines.js
app/models/virtualMachines.js
/*global Backbone*/ var URL = require('./URL'); var VirtualMachine = require('./virtualMachine'); //define a collection of virtual machines module.exports = Backbone.Collection.extend({ model: VirtualMachine, url: URL.virtualMachine });
/*global Backbone*/ //Dependencies. var URL = require('./URL'); var VirtualMachine = require('./virtualMachine'); //define a collection of virtual machines module.exports = Backbone.Collection.extend({ //A collection only need a model property in order to _Type_ each element of the collection. model: VirtualMachine,...
Add the comments on the Virtual machine collection.
Add the comments on the Virtual machine collection.
JavaScript
mit
KleeGroup/front-end-spa,pierr/front-end-spa,pierr/front-end-spa,KleeGroup/front-end-spa
63743241a188b427c061bea2dc4572a208567daa
troposphere/static/js/components/modals/instance/launch/components/AdvancedOptionsFooter.react.js
troposphere/static/js/components/modals/instance/launch/components/AdvancedOptionsFooter.react.js
import React from 'react'; export default React.createClass({ render: function() { let saveOptionsDisabled = this.props.saveOptionsDisabled ? "disabled" : ""; return ( <div className="modal-footer"> <button type="button" disabled={this.props.saveOptio...
import React from 'react'; import Button from 'components/common/ui/Button.react'; export default React.createClass({ render: function() { let saveOptionsDisabled = this.props.saveOptionsDisabled ? "disabled" : ""; return ( <div className="modal-footer"> <Button ...
Refactor to use new button and add tooltip message
Refactor to use new button and add tooltip message
JavaScript
apache-2.0
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
4d11031607c718fb0ede81562c36b0e6cf50af13
src/reducers/aboutReducer.js
src/reducers/aboutReducer.js
import * as actions from '../constants/actionTypes'; export default function(state = {}, action) { switch(action.type) { case actions.ABOUT_FETCH: return Object.assign(...state, action.payload.data); default: return state; } }
import * as actions from '../constants/actionTypes'; import initialState from './initialState'; export default function(state = initialState.about, action) { switch(action.type) { case actions.ABOUT_FETCH: return Object.assign(...state, action.payload.data); default: return state; } }
Update about reducer to use initial state
Update about reducer to use initial state
JavaScript
mit
veryaustin/veryaustin-2017-frontend,veryaustin/veryaustin-2017-frontend
679ce7c3942f7b6d150653ba3a8e9cfda3af1b99
extensions/tools/targets/myCreeps.js
extensions/tools/targets/myCreeps.js
'use strict'; var all = false; var cache = {}; function getCache(room) { if (all === false) { all = []; for (var i in Game.creeps) { if (!Game.creeps.spawning) { if (cache[Game.creeps[i].room] === undefined) { cache[Game.creeps[i].room] = [Game.creep...
'use strict'; var all = false; var cache = {}; function getCache(room) { if (all === false) { all = []; for (var i in Game.creeps) { if (!Game.creeps.spawning) { if (cache[Game.creeps[i].room.name] === undefined) { cache[Game.creeps[i].room.name] = [...
Use room name as string, instead as object for key value
Use room name as string, instead as object for key value
JavaScript
mit
avdg/screeps
7cf0a253819661c84e593d4a8dade96d1f4f253c
ghost/admin/controllers/forgotten.js
ghost/admin/controllers/forgotten.js
/* jshint unused: false */ import ajax from 'ghost/utils/ajax'; import ValidationEngine from 'ghost/mixins/validation-engine'; var ForgottenController = Ember.Controller.extend(ValidationEngine, { email: '', submitting: false, // ValidationEngine settings validationType: 'forgotten', a...
/* jshint unused: false */ import ajax from 'ghost/utils/ajax'; import ValidationEngine from 'ghost/mixins/validation-engine'; var ForgottenController = Ember.Controller.extend(ValidationEngine, { email: '', submitting: false, // ValidationEngine settings validationType: 'forgotten', a...
Stop validation error notification stack
Stop validation error notification stack closes #3383 - Calls closePassive() if a new validation error is thrown to display only the latest validation error
JavaScript
mit
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
4d491cc111a7084cae7069b26f597e7993acafa4
web/app/themes/theme/assets/ng/events/directives/preview.directive.js
web/app/themes/theme/assets/ng/events/directives/preview.directive.js
angular .module('events.preview.directive', ['ui.router']) .directive('eventPreview', function () { return { restrict: 'E', replace: true, template: '<div class="event-preview__item">'+ '<div class="event-preview__image-overlay event-preview__image-overlay--gradient"></div>' ...
angular .module('events.preview.directive', ['ui.router']) .directive('eventPreview', function () { return { restrict: 'E', replace: true, template: '<div class="event-preview__item">'+ '<div class="event-preview__image-overlay event-preview__image-overlay--gradient"></div>' ...
Fix the preview image size
Fix the preview image size
JavaScript
mit
rslnk/reimagine-belonging,rslnk/reimagine-belonging,rslnk/reimagine-belonging
01b7581484ef5ec3e020a4da099e6407b5744a76
assets/js/modules/analytics/common/account-create/create-account-field.js
assets/js/modules/analytics/common/account-create/create-account-field.js
/** * CreateAccountField component. * * Site Kit by Google, Copyright 2020 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE-...
/** * CreateAccountField component. * * Site Kit by Google, Copyright 2020 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE-...
Change event parameter name from `e` to `event`.
Change event parameter name from `e` to `event`.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
630f21ebededd3ab940137187925c47af789f2c6
realtime/index.js
realtime/index.js
const io = require('socket.io'), winston = require('winston'); winston.remove(winston.transports.Console); winston.add(winston.transports.Console, {'timestamp': true}); const PORT = 3031; winston.info('Rupture real-time service starting'); winston.info('Listening on port ' + PORT); var socket = io.listen(PORT...
const io = require('socket.io'), winston = require('winston'), http = require('http'); winston.remove(winston.transports.Console); winston.add(winston.transports.Console, {'timestamp': true}); const PORT = 3031; winston.info('Rupture real-time service starting'); winston.info('Listening on port ' + PORT)...
Add get-work request from realtime to backend
Add get-work request from realtime to backend
JavaScript
mit
esarafianou/rupture,dimriou/rupture,dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimriou/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,dion...
7b9419174ef72b0ff19dd60657272d894d5fd165
games/common/js/submit_score.js
games/common/js/submit_score.js
function submit_score(score) { auth_data = get_auth_data() submit_data = auth_data + "&" + score call_api("set_score", submit_data) } function get_auth_data() { hash = window.location.hash return hash.substring(1, hash.indexOf("&")) } function call_api(name, data) { request = new XMLHttpReques...
function submit_score(score) { auth_data = get_auth_data() submit_data = auth_data + "&" + score call_api("set_score", submit_data) } function get_auth_data() { hash = window.location.hash auth_data = hash.substring(1) additionalDataStart = auth_data.indexOf("&") if (additionalDataStart > 0...
Fix get_auth_data when no additional data on hash
Fix get_auth_data when no additional data on hash
JavaScript
apache-2.0
alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games
e743fab34e49352d902d8b027252bf013e039b40
snippet.js
snippet.js
(function (instanceName) { var i, s, z, w = window, d = document, q = 'script', f = ['config', 'track', 'identify', 'push', 'call'], c = function () { var self = this; self._e = []; for (i = 0; i < f.length; i++) { ...
(function (instanceName) { var i, s, z, w = window, d = document, q = 'script', f = ['config', 'track', 'identify', 'visit', 'push', 'call'], c = function () { var self = this; self._e = []; for (i = 0; i < f.length; i++) { ...
Add 'visit' to tracker stub
Add 'visit' to tracker stub
JavaScript
mit
Woopra/js-client-tracker,Woopra/js-client-tracker
1194543426bba9f5620423f53920a0eaf96e1601
client/mobilizations/paths.js
client/mobilizations/paths.js
import DefaultConfigServer from '~server/config' export const mobilizations = () => '/' export const mobilization = (mobilization, domain = DefaultConfigServer.appDomain) => { if (domain && domain.indexOf('staging') !== -1) { return `http://${mobilization.slug}.${domain}` } return mobilization.custom_domain...
import DefaultConfigServer from '~server/config' export const mobilizations = () => '/mobilizations' export const mobilization = (mobilization, domain = DefaultConfigServer.appDomain) => { if (domain && domain.indexOf('staging') !== -1) { return `http://${mobilization.slug}.${domain}` } return mobilization....
Change mobilization root path to /mobilizations
Change mobilization root path to /mobilizations
JavaScript
agpl-3.0
nossas/bonde-client,nossas/bonde-client,nossas/bonde-client
d9d6e8e84f038a08d4bdbf33256f7cf8f9d23cd0
src/app.js
src/app.js
(function (window) { 'use strict'; var hearingTest = HearingTest; var hearing = hearingTest.init(); var app = new Vue({ el: '#hearing-test-app', data: { frequency: 1000 }, methods: { changeFrequency: function() { hearing.sound.frequency.value = this.frequency; } } }); }(window));
(function (window) { 'use strict'; var hearingTest = HearingTest; var hearing = hearingTest.init(); var app = new Vue({ el: '#hearing-test-app', data: { isPlaySound: false, frequency: 1000 }, methods: { changeFrequency: function() { hearing.sound.frequency.value = this.frequency; } } })...
Add a play sound flag
Add a play sound flag
JavaScript
mit
kubosho/hearing-test-app
aaa8f64c4ce06e67dc078cb417e085499fb4504d
scripts/views/quizz-view.js
scripts/views/quizz-view.js
var QuizzListView = Backbone.View.extend({ el: '#app', templateHandlebars: Handlebars.compile( $('#play-template-handlebars').html() ), remove: function() { this.$el.empty(); return this; }, initialize: function() { console.log('Initialize in quizz view'); this.myQuizzCollection = ne...
var QuizzListView = Backbone.View.extend({ el: '#app', templateHandlebars: Handlebars.compile( $('#play-template-handlebars').html() ), remove: function() { this.$el.empty(); return this; }, shuffleArray: function (o){ for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x =...
Add random on quizz list
Add random on quizz list
JavaScript
mit
KillianKemps/MovieQuizz,KillianKemps/MovieQuizz
11f7957362867684b2e30c70944f3496fc6f99b6
renderer/index.js
renderer/index.js
require('./patches/gherkin') require('./keyboard/bindings') const electron = require('electron') const Cucumber = require('cucumber') const Options = require('../cli/options') const Output = require('./output') const output = new Output() const options = new Options(electron.remote.process.argv) process.on('unhandl...
require('./patches/gherkin') require('./keyboard/bindings') const electron = require('electron') const Cucumber = require('cucumber') const Options = require('../cli/options') const Output = require('./output') const output = new Output() const options = new Options(electron.remote.process.argv) process.on('unhandl...
Remove console.log about exit code
Remove console.log about exit code
JavaScript
mit
cucumber/cucumber-electron,featurist/cucumber-electron,featurist/cucumber-electron,cucumber/cucumber-electron,cucumber/cucumber-electron,cucumber/cucumber-electron
6a8cd955389226e749afd36b85641cc08ac54023
feelings/client/lib/router.js
feelings/client/lib/router.js
Router.route('/', function () { this.layout("layout") this.render('feelings'); });
Router.route('/', function () { this.layout("layout") this.render('feelings'); }, {name: 'feelings'}); Router.route('/results', function () { this.layout("layout") this.render('results'); }, {name: 'results'});
Add results route; name routes
Add results route; name routes
JavaScript
agpl-3.0
GeriLife/feelings,GeriLife/feelings
f8c11d94e363d8d3c8d571723a85b4087cfbe6fd
src/map.js
src/map.js
function ObjectMap(){ this._obj = {}; } let p = ObjectMap.prototype; p.set = function( key, val ){ this._obj[ key ] = val; }; p.delete = function( key ){ this._obj[ key ] = null; }; p.has = function( key ){ return this._obj[ key ] != null; }; p.get = function( key ){ return this._obj[ key ]; }; // TODO ...
class ObjectMap { constructor(){ this._obj = {}; } set( key, val ){ this._obj[ key ] = val; return this; } delete( key ){ this._obj[ key ] = undefined; return this; } clear(){ this._obj = {}; } has( key ){ return this._obj[ key ] !== undefined; } get( key ){ ...
Use class syntax for `Map`
Use class syntax for `Map`
JavaScript
mit
cytoscape/cytoscape.js,cytoscape/cytoscape.js
77e82bf90581e98a95ba5c1f58cf1cbb67e8bdc6
app/config/auth.js
app/config/auth.js
module.exports = { settings: { domain: 'your-domain.auth0.com', clientID: 'your-client-id', clientSecret: 'your-client-secret' }, allow: function(user) { return true; }, };
module.exports = { settings: { domain: 'your-domain.auth0.com', clientID: 'your-client-id', clientSecret: 'your-client-secret' }, allow: function() { return false; }, };
Set default for allow method to be false
Set default for allow method to be false
JavaScript
mit
spleenboy/pallium-cms,spleenboy/pallium-cms
e9b59975ca5b1f3584a3fa0f828e015205be28be
app/controllers.js
app/controllers.js
'use strict'; /* Controllers */ var recordControllers = angular.module('myApp.recordControllers', []); recordControllers.controller('recordCtrl', ['$scope', '$http', '_', function($scope, $http, _) { // Initialize $scope.distance = '25m'; $scope.style = '自由形'; $scope.submit = function() { let...
'use strict'; /* Controllers */ var recordControllers = angular.module('myApp.recordControllers', []); recordControllers.controller('recordCtrl', ['$scope', '$http', '_', function($scope, $http, _) { // Initialize $scope.distance = '25m'; $scope.style = '自由形'; $scope.submit = function() { let...
Use relative path for db REST API access
Use relative path for db REST API access
JavaScript
mit
chopstickexe/swimtrack,chopstickexe/swimtrack
b3cb93f4b798e08841d9681cf06a783bab62de41
examples/main-page/main.js
examples/main-page/main.js
window.onload = function() { d3.json("../examples/data/gitstats.json", function(data) { data.forEach(function(d) { d.date = new Date(d.date); d.name = d.name === "ashwinraman9" ? "aramaswamy" : d.name; }); var dataset = {data: data, metadata: {}}; var commitSVG = d3.select("#intro-chart")...
window.onload = function() { d3.json("examples/data/gitstats.json", function(data) { data.forEach(function(d) { d.date = new Date(d.date); d.name = d.name === "ashwinraman9" ? "aramaswamy" : d.name; }); var dataset = {data: data, metadata: {}}; var commitSVG = d3.select("#intro-chart"); ...
Fix it gau! oh godgp
Fix it gau! oh godgp
JavaScript
mit
palantir/plottable,gdseller/plottable,jacqt/plottable,danmane/plottable,RobertoMalatesta/plottable,RobertoMalatesta/plottable,iobeam/plottable,gdseller/plottable,iobeam/plottable,NextTuesday/plottable,palantir/plottable,softwords/plottable,palantir/plottable,danmane/plottable,RobertoMalatesta/plottable,NextTuesday/plot...
36e6a4eabfe79f7e0df25621e4380ad49697aba7
external-ab-neuter/main.js
external-ab-neuter/main.js
'use strict'; const release_type = process.config.target_defaults.default_configuration; const ab_neuter = require(`./build/${release_type}/ab_neuter`); module.exports = neuter; function neuter(obj) { ab_neuter.neuter(ArrayBuffer.isView(obj) ? obj.buffer : obj); }
'use strict'; const ab_neuter = require('./build/Release/ab_neuter'); module.exports = neuter; function neuter(obj) { ab_neuter.neuter(ArrayBuffer.isView(obj) ? obj.buffer : obj); }
Support Release only to simplify webpack
Support Release only to simplify webpack
JavaScript
mit
silklabs/silk,silklabs/silk,silklabs/silk,silklabs/silk,silklabs/silk,silklabs/silk
18ebe527e06ffb04d22da5491d7dde5b40943a1c
packages/truffle-core/lib/testing/deployed.js
packages/truffle-core/lib/testing/deployed.js
// Using web3 for its sha function... var Web3 = require("web3"); var Deployed = { makeSolidityDeployedAddressesLibrary: function(mapping) { var self = this; var source = ""; source += "pragma solidity ^0.4.6; \n\n library DeployedAddresses {" + "\n"; Object.keys(mapping).forEach(function(name) { ...
// Using web3 for its sha function... var Web3 = require("web3"); var Deployed = { makeSolidityDeployedAddressesLibrary: function(mapping) { var self = this; var source = ""; source += "pragma solidity ^0.4.6; \n\n library DeployedAddresses {" + "\n"; Object.keys(mapping).forEach(function(name) { ...
Use revert() instead of throw
Use revert() instead of throw
JavaScript
mit
ConsenSys/truffle
658ba7209b07bb763e6e93592bfefdde9c9ce78a
server/src/app.js
server/src/app.js
const express = require('express') const bodyParser = require('body-parser') const cors = require('cors') const morgan = require('morgan') const app = express() // Seting up middleware app.use(morgan('combined')) app.use(bodyParser.json()) app.use(cors()) app.get('/', (req, res) => { res.send('Hello world') }) app....
const express = require('express') const bodyParser = require('body-parser') const cors = require('cors') const morgan = require('morgan') const app = express() // Seting up middleware app.use(morgan('combined')) app.use(bodyParser.json()) app.use(cors()) app.get('/', (req, res) => { res.send('Hello world') }) app....
Test post register response with Postman
Test post register response with Postman
JavaScript
mit
rahman541/tab-tracker,rahman541/tab-tracker
76c112da2263ea398e5da129e1f9663f727d031e
ember-cli-build.js
ember-cli-build.js
'use strict'; const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); const Project = require('ember-cli/lib/models/project'); module.exports = function(defaults) { let project = Project.closestSync(process.cwd()); project.pkg['ember-addon'].paths = ['sandbox']; defaults.project = project; var ap...
'use strict'; const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); const Project = require('ember-cli/lib/models/project'); module.exports = function(defaults) { let project = Project.closestSync(process.cwd()); project.pkg['ember-addon'].paths = ['sandbox']; defaults.project = project; var ap...
Stop including jquery and shims in the output
Stop including jquery and shims in the output
JavaScript
mit
ember-learn/ember-cli-addon-docs,ember-learn/ember-cli-addon-docs,ember-learn/ember-cli-addon-docs
14d9151ba1d0376b1ba9a86761c0aaf9e02d37f6
ember-cli-build.js
ember-cli-build.js
'use strict'; const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function(defaults) { let app = new EmberAddon(defaults, { // Import _all_ Froala Editor files // for the "dummy" app 'ember-froala-editor': { plugins : [ 'align','char_counter','colors','emot...
'use strict'; const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function(defaults) { let app = new EmberAddon(defaults, { 'ember-froala-editor': { plugins : [ 'align','char_counter','colors','emoticons','entities','font_family','font_size', 'line_breaker'...
Remove comment about importing all plugins
Remove comment about importing all plugins No longer the case
JavaScript
mit
Panman8201/ember-froala-editor,Panman8201/ember-froala-editor,froala/ember-froala-editor,froala/ember-froala-editor
0f5d2e7a73abf567750489748058a75cb6a4989b
ember-cli-build.js
ember-cli-build.js
/* eslint-env node */ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function(defaults) { var app = new EmberAddon(defaults, { // Add options here }); /* This build file specifies the options for the dummy test app of this addon, located in `/tests/dummy` This...
/* eslint-env node */ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function(defaults) { var app = new EmberAddon(defaults, { sourcemaps: { enabled: false, extensions: ['js'], } }); /* This build file specifies the options for the dummy test app of th...
Disable source map in dev
Disable source map in dev
JavaScript
mit
masonwan/ember-render-validate,masonwan/ember-render-validate
e91126a3233e719eedba767dbcc656750ac0f523
app/src/upgrade.js
app/src/upgrade.js
var path = require('path'); var fs = require('fs-extra'); function upgradeNeeded(config, callback) { var oldSyncDir = syncDirWrong(config); var needsUpgrade = oldSyncDir; callback(needsUpgrade); //return oldSyncDir; } function syncDirWrong(config) { for (var r in config.roots) { var old...
var path = require('path'); var fs = require('fs-extra'); function upgradeNeeded(config, callback) { var oldSyncDir = syncDirWrong(config); var needsUpgrade = oldSyncDir; callback(needsUpgrade); //return oldSyncDir; } function syncDirWrong(config) { for (var r in config.roots) { var old...
Add help for upgrading to latest version.
Add help for upgrading to latest version.
JavaScript
mit
dynamicdan/filesync,dynamicdan/sn-filesync,Echo3ToEcho7/filesync
90ab18f216757cb67af21d2b28d1da3cf4e8b1b4
source/components/SiteHeader.js
source/components/SiteHeader.js
import React from 'react' import { Link } from 'react-router-dom' import Facebook from '../components/Facebook' import SearchBox from '../components/SearchBox' const SiteHeader = ({ user }) => ( <header className="site-header"> <div className="logo icon-axis"> <Link to="/"><b>Axis</b>RPG</Link> </div> ...
import React from 'react' import { Link } from 'react-router-dom' import Facebook from '../components/Facebook' import SearchBox from '../components/SearchBox' const SiteHeader = ({ user }) => ( <header className="site-header"> <Link className="logo icon-axis" to="/"> <span className="name"><b>Axis</b>RPG<...
Add Axis icon to the clickable area of logo
Add Axis icon to the clickable area of logo
JavaScript
mit
TroyAlford/axis-wiki,TroyAlford/axis-wiki
5a26dfebaf9bf2a9604df92f6dd029c43ab9bddc
troposphere/static/js/components/modals/instance_launch/ProjectOption.react.js
troposphere/static/js/components/modals/instance_launch/ProjectOption.react.js
/** @jsx React.DOM */ define( [ 'react', 'backbone' ], function (React, Backbone) { return React.createClass({ propTypes: { project: React.PropTypes.instanceOf(Backbone.Model).isRequired }, render: function () { var projectName = this.props.project.get('name'); ...
/** @jsx React.DOM */ define( [ 'react', 'backbone' ], function (React, Backbone) { return React.createClass({ propTypes: { project: React.PropTypes.instanceOf(Backbone.Model).isRequired }, render: function () { var project = this.props.project; return ( ...
Remove alternate statement for Default project
Remove alternate statement for Default project
JavaScript
apache-2.0
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
1ea825202a2b67d05e6be5f9fc1cf3009f263764
server/server.js
server/server.js
const express = require('express'); const mongoose = require('mongoose'); const app = express(); mongoose.connect('mongodb://localhost/speechdoctor'); require('./config/middleware')(app, express); require('./config/routes.js')(app); const port = process.env.PORT || 8080; app.listen(port); console.log('Listening o...
const express = require('express'); const mongoose = require('mongoose'); const app = express(); mongoose.connect('mongodb://localhost/speechdoctor'); require('./config/middleware')(app, express); require('./config/routes.js')(app); const port = process.env.PORT || 80; app.listen(port); console.log('Listening on ...
Change port number from 8080 to 80 for deployment
Change port number from 8080 to 80 for deployment
JavaScript
mit
nonchalantkettle/SpeechDoctor,nonchalantkettle/SpeechDoctor,alexxisroxxanne/SpeechDoctor,alexxisroxxanne/SpeechDoctor
30a571553b09a4e221445f9f0292fd9da449c3ce
app/assets/javascripts/student_profile/provided_by_educator_dropdown.js
app/assets/javascripts/student_profile/provided_by_educator_dropdown.js
(function() { window.shared || (window.shared = {}); var dom = window.shared.ReactHelpers.dom; var ProvidedByEducatorDropdown = window.shared.ProvidedByEducatorDropdown = React.createClass({ displayName: 'ProvidedByEducatorDropdown', propTypes: { educatorsForServicesDropdown: React.PropTypes.array...
(function() { window.shared || (window.shared = {}); var dom = window.shared.ReactHelpers.dom; var ProvidedByEducatorDropdown = window.shared.ProvidedByEducatorDropdown = React.createClass({ displayName: 'ProvidedByEducatorDropdown', propTypes: { educatorsForServicesDropdown: React.PropTypes.array...
Add placeholder text and suggest Last Name, First Name
Add placeholder text and suggest Last Name, First Name
JavaScript
mit
studentinsights/studentinsights,jhilde/studentinsights,jhilde/studentinsights,jhilde/studentinsights,jhilde/studentinsights,studentinsights/studentinsights,erose/studentinsights,erose/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,erose/studentinsights,erose/studentinsights
9b00021f5bf69a6d76e26543a527802319d6cdd3
grunt-tasks/grunt-babel.js
grunt-tasks/grunt-babel.js
module.exports = function gruntBabel(grunt) { grunt.config('babel', { options: { sourceMap: false, modules: 'amd', moduleIds: true, moduleRoot: 'crm', sourceRoot: 'src', blacklist: [ 'strict', ], }, dist: { files: [{ expand: true, cwd...
module.exports = function gruntBabel(grunt) { grunt.config('babel', { options: { sourceMaps: 'inline', modules: 'amd', moduleIds: true, moduleRoot: 'crm', sourceRoot: 'src', blacklist: [ 'strict', ], }, dist: { files: [{ expand: true, ...
Enable inline sourcemaps for better ES6 debugging.
Enable inline sourcemaps for better ES6 debugging.
JavaScript
apache-2.0
Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix
8f220780ef56b5b3c010c3368e83a86452ef3042
assets/js/index.js
assets/js/index.js
function ready(fn) { if (document.readyState != 'loading'){ fn(); } else { document.addEventListener('DOMContentLoaded', fn); } } function previousElementSibling( elem ) { do { elem = elem.previousSibling; } while ( elem && elem.nodeType !== 1 ); return elem; } function pullPullQuotes(){ var...
function previousElementSibling( elem ) { do { elem = elem.previousSibling; } while ( elem && elem.nodeType !== 1 ); return elem; } function pullPullQuotes(){ var pullquotes = document.getElementsByClassName('pullquote'); for (var i = 0; i < pullquotes.length; i++) { var el = pullquotes[i]; for (...
Simplify js ready function (and make it work…)
Simplify js ready function (and make it work…)
JavaScript
mit
curiositry/mnml-ghost-theme,omphalosskeptic/mnml-ghost-theme,omphalosskeptic/mnml-ghost-theme