commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
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 | ---
+++
@@ -29,18 +29,22 @@
});
});
-test('unmasked values are correct', function(assert) {
- assert.expect(1);
+// Test below is failing because of wrong assertion of unmaskedValue
+// The unmasked value in the case of email-input will always be same as
+// masked input.
- var component = this.subject();
-... |
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 | ---
+++
@@ -8,7 +8,7 @@
console.log('MongoDB query done. Length: ', users.length);
let promises = [];
for (let user of users) {
- promises.push(sqlModel.User.create({
+ let userReq = sqlModel.User.create({
refreshToken: user.tokens.refresh_token,
accessToken: u... |
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 | ---
+++
@@ -10,17 +10,17 @@
/**
* Array of application names.
*/
- app_name: ['My Application'],
+ app_name: [process.env.BLINK_NEW_RELIC_APP_NAME],
/**
* Your New Relic license key.
*/
- license_key: 'license key here',
+ license_key: process.env.BLINK_NEW_RELIC_LICENSE_KEY,
logging: {
... |
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 | ---
+++
@@ -9,6 +9,7 @@
before: [
"bower_components/jquery/dist/jquery.js",
"bower_components/underscore/underscore.js",
+ "bower_components/bluebird/js/browser/bluebird.js",
"bower_components/react/react.js"
]
}
@@ -35,6 +36,7 @@
}
},
serv... |
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... | ---
+++
@@ -8,7 +8,6 @@
.project("x", "category", xScale)
.project("y", "value", yScale)
.project("fill", function() { return "steelblue"; } );
- yScale.padDomain();
var chart = new Plottable.Table([
... |
4b6e340e7683e57a5747d4b3b57e419d4f1545fa | bootstrap.js | bootstrap.js | var slice = [].slice
var util = require('util')
exports.createInterrupterCreator = function (_Error) {
return function (path) {
var ejector = function (name, depth, context, properties) {
var vargs = slice.call(arguments)
name = vargs.shift()
typeof vargs[0] == 'number' ... | var slice = [].slice
var util = require('util')
exports.createInterrupterCreator = function (_Error) {
return function (path) {
var ejector = function (name, depth, context, properties) {
var vargs = slice.call(arguments)
name = vargs.shift()
typeof vargs[0] == 'number' ... | Fix variable leak to global namespace. | Fix variable leak to global namespace.
| JavaScript | mit | bigeasy/interrupt | ---
+++
@@ -28,7 +28,7 @@
dump += '\ncause: ' + cause.stack + '\n\nstack:'
}
}
- message = path + ':' + name + body + dump
+ var message = path + ':' + name + body + dump
var error = new Error(message)
for (var key in 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 | ---
+++
@@ -3,7 +3,7 @@
var UserAPI = (function () {
"use strict";
- var url = "https://account.lab.fiware.org/user";
+ var url = "https://account.lab.fiware.org/user";
/*****************************************************************
* C O N S T R U C T O R ... |
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 | ---
+++
@@ -6,6 +6,8 @@
*/
"use strict";
+
+window.AudioContext = window.AudioContext || window.webkitAudioContext;
function PropertyNotInitialized(obj, propName) {
this.property = propName; |
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 | ---
+++
@@ -1,5 +1,6 @@
/*jshint rhino:true*/
print("Rhino showcase");
+/*exported gpfSourcesPath*/
+var gpfSourcesPath = "src/";
load("src/boot.js");
-
java.lang.System.exit(0); |
d2a4451e43db96c425f5546ed5b9fe08bb1588df | website/static/js/clipboard.js | website/static/js/clipboard.js | 'use strict';
var $ = require('jquery');
var Clipboard = require('clipboard');
var setTooltip = function (elm, message) {
$(elm).tooltip('hide')
.attr('title', message)
.tooltip('show');
}
var hideTooltip = function (elm) {
setTimeout(function() {
$(elm).tooltip('hide');
}, 2000);
}
var ... | 'use strict';
var $ = require('jquery');
var Clipboard = require('clipboard');
var setTooltip = function (elm, message) {
$(elm).tooltip('hide')
.attr('title', message)
.tooltip('show');
};
var hideTooltip = function (elm) {
setTimeout(function() {
$(elm).tooltip('hide');
}, 2000);
};
va... | Fix styling issues for travis tests | Fix styling issues for travis tests
| JavaScript | apache-2.0 | Johnetordoff/osf.io,sloria/osf.io,icereval/osf.io,felliott/osf.io,baylee-d/osf.io,felliott/osf.io,cslzchen/osf.io,brianjgeiger/osf.io,chennan47/osf.io,mfraezz/osf.io,TomBaxter/osf.io,crcresearch/osf.io,mattclark/osf.io,adlius/osf.io,caneruguz/osf.io,TomBaxter/osf.io,saradbowman/osf.io,HalcyonChimera/osf.io,icereval/osf... | ---
+++
@@ -7,13 +7,13 @@
$(elm).tooltip('hide')
.attr('title', message)
.tooltip('show');
-}
+};
var hideTooltip = function (elm) {
setTimeout(function() {
$(elm).tooltip('hide');
}, 2000);
-}
+};
var makeClient = function(elm) {
var $elm = $(elm); |
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 | ---
+++
@@ -35,5 +35,18 @@
});
$urlRouterProvider.otherwise('/');
+ })
+ .run(function($rootScope, $location, Supporter) {
+ $rootScope.$on('$stateChangeStart', function(event, next) {
+ Supporter.getCurrent().$promise
+ .then(function(user) {
+ if (!user) {
+ $location.ur... |
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 | ---
+++
@@ -2,7 +2,7 @@
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']);
+const SIDE_EFFECT_METHODS = FOR... |
c5fdf4c1da80aea1d05a1ba84a03252af371f819 | server/config/config.js | server/config/config.js | var path = require('path');
var rootPath = path.normalize(__dirname + '/../../');
module.exports = {
local: {
baseUrl: 'http://localhost:3051',
db: 'mongodb://localhost/rp_local',
rootPath: rootPath,
port: process.env.PORT || 3051
},
staging : {
baseUrl: 'http://... | var path = require('path');
var rootPath = path.normalize(__dirname + '/../../');
module.exports = {
local: {
baseUrl: 'http://localhost:3030',
db: 'mongodb://localhost/rp_local',
rootPath: rootPath,
port: process.env.PORT || 3016
},
staging : {
baseUrl: 'http://... | Add to download links ng-csv | Add to download links ng-csv
| JavaScript | mit | NRGI/rp-org-frontend,NRGI/rp-org-frontend | ---
+++
@@ -3,10 +3,10 @@
module.exports = {
local: {
- baseUrl: 'http://localhost:3051',
+ baseUrl: 'http://localhost:3030',
db: 'mongodb://localhost/rp_local',
rootPath: rootPath,
- port: process.env.PORT || 3051
+ port: process.env.PORT || 3016
},
st... |
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 | ---
+++
@@ -8,11 +8,7 @@
'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,
+ 'no-console': 0
},
'globals': { |
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 | ---
+++
@@ -18,8 +18,8 @@
*/
goog.module('goog.test_module');
+goog.module.declareLegacyNamespace();
goog.setTestOnly('goog.test_module');
-goog.module.declareLegacyNamespace();
/** @suppress {extraRequire} */ |
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 | ---
+++
@@ -16,16 +16,26 @@
cliSplit();
break;
default:
- console.log("Choose a option -s for split -m for merge");
+ printLegend();
}
}
function cliSplit() {
var file = process.argv[3];
- var parts = process.argv[4];
+ var parts = parseInt(process.argv[4]);
+
+ if (isNaN(p... |
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... | ---
+++
@@ -1,5 +1,21 @@
'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 (s... |
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 | ---
+++
@@ -18,15 +18,20 @@
}
};
- var execSync = require('exec-sync');
+ var hash = '(unknown git revision)';
+ try {
+ var execSync = require('exec-sync');
- var gitStatus = execSync('git describe --long --abbrev=10 --all --always --dirty');
+ var gitStatus = execSync('git describe --long --ab... |
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 | ---
+++
@@ -6,8 +6,8 @@
module.exports = config =>
getCommon(config).then(function(commonConfig) {
+ const template = config.antwar.template || {};
const devConfig = {
- cache: true,
node: {
__filename: true,
fs: "empty",
@@ -21,12 +21,11 @@
plugins: [
new H... |
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 | ---
+++
@@ -1,29 +1,24 @@
import types from '../types'
import createReducer from '../shared/create-reducer';
-
-const initialState = []
+import Immutable from 'immutable'
function itemsRequest( state ){ return state }
function itemsError( state ){ return state }
function itemsSucess(state, action) {
- ret... |
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 | ---
+++
@@ -47,6 +47,7 @@
if (environment === 'production') {
ENV.baseURL = '/ember-map-demo';
ENV.adapterNamespace = 'ember-map-demo/api';
+ ENV.locationType = 'hash';
}
return ENV; |
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... | ---
+++
@@ -24,8 +24,11 @@
},
uploadSuccess: function(file, item, data) {
- // FIXME: need to update the item with new data, but can't do that
- // from the returned data from S3
+ item.urls = {
+ 'delete': nodeApiUrl + 's3/delete/' + file.destinatio... |
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 | ---
+++
@@ -13,12 +13,12 @@
dialect: 'postgres'
},
test: {
- username: 'Newman',
- password: 'andela2017',
- database: 'postit-db-test',
- // username: 'postgres',
- // password: '',
- // database: 'postit_db_test',
+ // username: 'Newman',
+ // password: 'andela2017',
+ // datab... |
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 | ---
+++
@@ -3,7 +3,8 @@
var tests = [];
for (var file in window.__karma__.files) {
if (window.__karma__.files.hasOwnProperty(file)) {
- if (/\.spec\.js$/.test(file)) {
+ /* Add all the files within app/test path with .spec.js suffix */
+ if (/test\/app.+\.spec\.js$/.test(file)) {
tests.push(file);
}
} |
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 | ---
+++
@@ -1,5 +1,5 @@
// activity item template
-var itemtemplate = ['<div class="activity-item">',
+var itemtemplate = ['<li class="activity-item">',
'<a href="{{modifier_url}}">',
'<img src="{{modifier_siteicon}}" />',
'</a>',
@@ -9,9 +9,9 @@
'<a class="tiddler-title" href="{{tiddler_url}}">{{tiddler_... |
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 | ---
+++
@@ -3,7 +3,7 @@
$scope.loading = true;
$scope.movie = null;
- $http.get('/search/' + $scope.imdbId).then(function(response) {
+ $http.get('/search/' + $scope.imdbId.match(/tt[\d]{7}/)[0]).then(function(response) {
$scope.loading = false;
$scope.movie = response.data;
}); |
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,... | ---
+++
@@ -34,7 +34,8 @@
},
backend: backendOptions,
detection: detectionOptions,
- cache: cacheOptions
+ cache: cacheOptions,
+ fallbackLng: 'en'
}, function () {
var i;
initialized = true; |
1548ab81fd04e92a7a32ddfaeb072cd72493877d | grunt/contrib-connect.js | grunt/contrib-connect.js | // Local web server running on port 9001 with livereload functionality
module.exports = function(grunt) {
grunt.config('connect', {
livereload: {
options: {
port: 9001,
middleware: function(connect, options) {
return[
r... | // Local web server running on port 9001 with livereload functionality
module.exports = function(grunt) {
grunt.config('connect', {
livereload: {
options: {
port: 9001,
middleware: function(connect, options) {
return[
re... | Fix annoying bug in connect middleware | Fix annoying bug in connect middleware
| JavaScript | mit | yellowled/yl-bp,yellowled/yl-bp | ---
+++
@@ -1,5 +1,4 @@
// Local web server running on port 9001 with livereload functionality
-
module.exports = function(grunt) {
grunt.config('connect', {
livereload: {
@@ -8,7 +7,7 @@
middleware: function(connect, options) {
return[
re... |
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 | ---
+++
@@ -1,6 +1,6 @@
(function() {
- var user_id = localStorage.getItem('user_id');
- var session_id = localStorage.getItem('session_id');
+ var user_id = $.cookie('user_id');
+ var session_id = $.cookie('session_id');
if (user_id == null || session_id == null) {
alert('Not signed in.');
} else { |
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 | ---
+++
@@ -26,6 +26,7 @@
click: function() {
svgCanvas.setMode('ext-panning');
svgEditor.toolButtonClick('#ext-panning')
+ $('#styleoverrides').text('#svgcanvas *{cursor:move;pointer-events:all}, #svgcanvas {cursor:default}');
}
}
}], |
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 | ---
+++
@@ -8,9 +8,9 @@
// 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 decimalIndex = 2, the second digit shuld be round... |
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... | ---
+++
@@ -15,11 +15,3 @@
}
}
}
-
-$(document).ready(function() {
- checkedPaymentMethod = $('[data-hook="payment_method_field"] input[type="radio"]:checked');
- SpreePaypalExpress.hideSettings(checkedPaymentMethod);
- paymentMethods = $('[data-hook="payment_method_field"] input[type="radio"]').click(fun... |
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 | ---
+++
@@ -12,8 +12,7 @@
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
- // browsers: ['Chrome', 'Firefox', 'Safari'],
- browsers: ['Chrome'],
+ browsers: ['Chrome', 'Firefox'],
singleRun: true,
concurrency: Infinity
}) |
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 | ---
+++
@@ -3,6 +3,8 @@
module.exports = config => {
const tests = "tests/*.test.js";
+
+ process.env.BABEL_ENV = "karma";
config.set({
frameworks: ["mocha"], |
a92338bff1d78a07bd7598867b9a08e071317394 | client/src/initialize.js | client/src/initialize.js | import boot from './boot';
import logger from 'debug';
import React from 'react/addons';
const debug = logger('app:init');
// Executed when the browser has loaded everything.
window.onload = () => {
debug('`onload` event fired.');
debug('Initialize and start application.');
// TODO: pass global functions... | import boot from './boot';
import logger from 'debug';
import React from 'react/addons';
const debug = logger('app:init');
// Executed when the browser has loaded everything.
window.onload = () => {
debug('`onload` event fired.');
debug('Initialize and start application.');
// TODO: pass global functions... | Add helper function to help users enable logging | Add helper function to help users enable logging
| JavaScript | mit | jsilvestre/tasky,jsilvestre/tasky,jsilvestre/tasky | ---
+++
@@ -25,3 +25,9 @@
debug('Application started.');
};
+
+// Helper that people can use to enable logging from the console.
+window.debug = (pattern = 'app:*') => {
+ console.info(`Reload the page to see logs that match pattern ${pattern}`); // eslint-disable-line
+ localStorage.setItem('debug', pa... |
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 | ---
+++
@@ -3,5 +3,12 @@
const BaseStep = require('./base-step');
module.exports = class VoidStep extends BaseStep {
- start() { return new Promise(() => {}); }
+ constructor(options, action) {
+ super(options);
+ this.action = action;
+ }
+ start() {
+ this.action && this.action();
+ return new P... |
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 | ---
+++
@@ -6,6 +6,7 @@
initViewModels();
updateStatus(ImportedStrings.mha_loading);
sendHeadersRequest();
+ $("#diagnostics").text(viewModel.diagnostics);
});
};
|
c1eb5999f16ebb5bae06babafc91e64f34db0c2b | app/components/common/form-inputs/index.js | app/components/common/form-inputs/index.js | import React from 'react';
import PropTypes from 'prop-types';
import Text from './text';
import Radio from './radio';
import Select from './select';
import Date from './date';
import Blob from './blob';
import Number from './number';
// REDUX-FORM custom inputs
// http://redux-form.com/6.5.0/docs/api/Field.md/
export... | import React from 'react';
import PropTypes from 'prop-types';
import Text from './text';
import Radio from './radio';
import Select from './select';
import Date from './date';
import Blob from './blob';
// TODO: fix numbers input in iOS as we can't accept the value
// import Number from './number';
// REDUX-FORM cust... | Use input text for numbers | Use input text for numbers
| JavaScript | mit | Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher | ---
+++
@@ -5,7 +5,8 @@
import Select from './select';
import Date from './date';
import Blob from './blob';
-import Number from './number';
+// TODO: fix numbers input in iOS as we can't accept the value
+// import Number from './number';
// REDUX-FORM custom inputs
// http://redux-form.com/6.5.0/docs/api/Fie... |
714e1d5cc8a46a1466cc5e1a2e75ddf43e4fc78f | src/io/c9/ace/Config.js | src/io/c9/ace/Config.js | /**
* @license
* Copyright 2019 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
package: 'io.c9.ace',
name: 'Config',
properties: [
{
class: 'Int',
name: 'height',
value: 500
},
{
class: 'Int',
name: 'width',
... | /**
* @license
* Copyright 2019 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
package: 'io.c9.ace',
name: 'Config',
properties: [
{
class: 'Int',
name: 'height',
value: 400
},
{
class: 'Int',
name: 'width',
... | Change Ace editor default size. | Change Ace editor default size.
| JavaScript | apache-2.0 | foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2 | ---
+++
@@ -11,12 +11,12 @@
{
class: 'Int',
name: 'height',
- value: 500
+ value: 400
},
{
class: 'Int',
name: 'width',
- value: 700
+ value: 500
},
{
class: 'Enum', |
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 | ---
+++
@@ -1,22 +1,5 @@
$(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;
- }
-
- ... |
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... | ---
+++
@@ -4,4 +4,6 @@
// 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'));
+gulp.task('ios', ['native'], bg(
+ 'react-native', 'run-ios', '--simulator', 'iPhone 5s'... |
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 | ---
+++
@@ -2,11 +2,13 @@
import models from '../models';
export default () => {
- let app = Router()
+ let app = Router({mergeParams: true})
app.get('/new', (req, res) => {
- res.render('tasks/new')
+ models.Serfs.findAll().then((serfs) => {
+ res.render('tasks/new', {serfs})
+ })
})
app.get('/:... |
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 | ---
+++
@@ -6,10 +6,10 @@
function create() {
var serverCreated = server.listen(serverUrl, function (request, response) {
- var cleanedUrl = request.url
+ var cleanedUrl = decodeURIComponent(request.url
.replace(/\//g, fs.separator)
.replace(/\?.*$/g, '')
- .... |
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 | ---
+++
@@ -16,7 +16,7 @@
items.forEach(item => reportedItemNames.add(item.name));
hasFinishedFirstRun = true;
return newItemsToReport.map(formatItem);
- });
+ }).catch((e) => console.log(`Error fetching subreddit reports. Error code: ${e.statusCode}`));
}
};
|
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 | ---
+++
@@ -22,7 +22,7 @@
});
it('should save the current Workbook into a file', () => {
-
+ expect(false).to.be.true;
});
}); |
e4dfa6dab47f7fb2e9ad815c4069ae5a198e953b | lib/cli.js | lib/cli.js | 'use strict';
var findup = require('findup-sync');
var spawnSync = require('child_process').spawnSync;
var gruntPath = findup('node_modules/grunt-cli/bin/grunt', {cwd: __dirname});
process.title = 'grunth';
var harmonyFlags = [
'--harmony_scoping',
// '--harmony_modules', // We have `require` and ES6 modules ... | 'use strict';
var findup = require('findup-sync');
var spawnSync = require('child_process').spawnSync;
var gruntPath = findup('node_modules/grunt-cli/bin/grunt', {cwd: __dirname});
process.title = 'grunth';
var harmonyFlags = [
'--harmony_scoping',
// '--harmony_modules', // We have `require` and ES6 modules ... | Enable Symbol (it works fine on Node v0.12 branch) | Enable Symbol (it works fine on Node v0.12 branch)
| JavaScript | mit | EE/grunth-cli | ---
+++
@@ -9,7 +9,7 @@
var harmonyFlags = [
'--harmony_scoping',
// '--harmony_modules', // We have `require` and ES6 modules are still in flux
-// '--harmony_symbols', // `Symbol('s')` throws
+ '--harmony_symbols', // `Symbol('s')` throws
// '--harmony_proxies', // `new Proxy({}, {})` throws
//... |
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... | ---
+++
@@ -18,15 +18,25 @@
}
// Draw charts on Dashboard page.
- $('#dashboard-page ul.experiments .chart').each(function (index, val) {
- var colors = [];
- var circles = $(this).parent().find('span.circle').get();
- _.each(circles, function (val, index) {
- colors.push($(circles[index]).css... |
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 | ---
+++
@@ -17,10 +17,13 @@
const isValidPw = await user.checkPassword(body.password)
if (!isValidPw) ctx.throw(401, 'Wrong username or password. Login failed')
+ const usertoken = jwt.sign(
+ {username: body.username, role: 'user'}, JWT_KEY, {expiresIn: '1h'}
+ )
+
ctx.status ... |
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 | ---
+++
@@ -13,11 +13,14 @@
qidoSupportsIncludeField: false,
imageRendering: 'wadors',
thumbnailRendering: 'wadors',
+ // REQUIRED TAG:
+ // https://github.com/OHIF/ohif-core/blob/59e1e04b92be24aee5d4402445cb3dcedb746995/src/studies/retrieveStudyMetadata.js#L54
reques... |
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 | ---
+++
@@ -41,6 +41,19 @@
});
}
+ /**
+ * Re-sends the invitation for the given membership.
+ */
+ invite() {
+ return new Promise((resolve, reject) => {
+ apiClient.post(`/projects/${this.project.identifier}/members/${this.identifier}/invite`).then(() => {
+ resolve();
+ }).catch... |
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 | ---
+++
@@ -1,6 +1,7 @@
+/*global angular*/
'use strict';
-var angular = require('angular');
+require('angular');
// Require the almost-static-site main module
var mainModule = require('../../main'); |
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 | ---
+++
@@ -1,17 +1,19 @@
let PolarBear = Ember.Object.extend({
- schedule(target, f, interval) {
+ interval: 1000,
+
+ schedule(f) {
return Ember.run.later(this, function() {
- f.apply(target);
- this.start(target, f, interval);
- }, interval);
+ f.apply(this);
+ this.start(f);
+ }... |
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 | ---
+++
@@ -7,4 +7,11 @@
$('#header td').removeAttr('bgcolor');
$('#header > td > table > tbody > tr > td:first-child').removeAttr('style').attr('id', 'img-wrapper');
$('#header > td > table > tbody > tr > td:nth-child(2)').removeAttr('style').attr('id', 'title');
+
+ $('body > center > table > tbody > tr:n... |
23a43dc3226d73c9138284051510b6d4315d7dcb | postcss.config.js | postcss.config.js | module.exports = {
plugins: [
require('postcss-import'),
require('postcss-css-reset'),
require('postcss-custom-properties'),
require('postcss-extend'),
require('postcss-nested'),
require('postcss-color-function'),
require('postcss-button'),
require('postcss-inline-svg'),
require('p... | module.exports = {
plugins: [
require('postcss-import'),
require('postcss-css-reset'),
require('postcss-custom-properties'),
require('postcss-extend'),
require('postcss-nested'),
require('postcss-color-function'),
require('postcss-button'),
require('postcss-inline-svg'),
require('p... | Fix value of max. width ('neatMaxWidth') used by postcss-neat | Fix value of max. width ('neatMaxWidth') used by postcss-neat
| JavaScript | apache-2.0 | input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl-explorer,input-output-hk/cardano-sl-explorer,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/cardano-sl... | ---
+++
@@ -11,7 +11,7 @@
require('postcss-svgo'),
require('postcss-flexbox'),
require('postcss-neat')({
- neatMaxWidth: '960px'
+ neatMaxWidth: '1200px'
}),
require('postcss-extend'),
require('postcss-custom-media'), |
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: '→',
prevButton: '←',
follow: true,
followOnSelect: ... | $(document).on('turbo:load turbo:render', function() {
$('#departments').tabs({
cache: true
});
$('#departments').tabs('paging', {
nextButton: '→',
prevButton: '←',
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 | ---
+++
@@ -1,7 +1,4 @@
$(document).on('turbo:load turbo:render', function() {
- var $panels, $tabs;
- $tabs = $('#lab_tests').tabs();
- $panels = $('.ui-tabs-panel');
$('#departments').tabs({
cache: true
}); |
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 | ---
+++
@@ -11,8 +11,10 @@
export default {
fetchAgricultureCountriesContextsInit: state => setLoading(true, state),
- fetchAgricultureCountriesContextsReady: (state, { payload: { data } }) =>
- setLoaded(true, setLoading(false, { ...state, data })),
+ fetchAgricultureCountriesContextsReady: (
+ state,
... |
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 | ---
+++
@@ -1,10 +1,9 @@
/*
- * EksiOkuyucu - unofficial eksisozluk client
- * http://eksiokuyucu.com/
+ * EksiOkuyucu - eksisozluk reader
+ * https://github.com/onuraslan/EksiOkuyucu
*
- * Copyright (C) 2014 Onur Aslan <onuraslan@gmail.com>
+ * Copyright (C) 2015 Onur Aslan <onur@onur.im>
* Licensed under M... |
31cba1e550f8332ca46801b6884159af34324725 | package.js | package.js | Package.describe({
summary: "Twilio API Wrapper for Meteor"
});
Npm.depends({ "twilio": "1.1.4" });
Package.on_use(function(api) {
if (api.export) api.export('Twilio', 'server');
api.add_files('twilio_npm.js', 'server');
});
| Package.describe({
summary: "Twilio API Wrapper for Meteor"
});
Npm.depends({ "twilio": "1.4.0" });
Package.on_use(function(api) {
if (api.export) api.export('Twilio', 'server');
api.add_files('twilio_npm.js', 'server');
});
| Update twilio module reference to 1.4.0 | Update twilio module reference to 1.4.0
Latest twilio-node: https://github.com/twilio/twilio-node/ | JavaScript | mit | bright-sparks/twilio-meteor,andreioprisan/twilio-meteor | ---
+++
@@ -2,7 +2,7 @@
summary: "Twilio API Wrapper for Meteor"
});
-Npm.depends({ "twilio": "1.1.4" });
+Npm.depends({ "twilio": "1.4.0" });
Package.on_use(function(api) {
if (api.export) api.export('Twilio', 'server'); |
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 | ---
+++
@@ -1,6 +1,7 @@
const { clone, pull } = require('./lib/git')
const path = require('path')
const jetpack = require('fs-jetpack')
+const freshRequire = require('./lib/freshRequire')
const configuration = require('./configuration')
@@ -14,7 +15,7 @@
load () {
return this.download().then(() => {... |
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 | ---
+++
@@ -41,7 +41,10 @@
}
function fuseSearch (pattern) {
- return fuse.search(pattern.trim() || '')
+ const trimmedPattern = pattern.trim()
+ if (!trimmedPattern || trimmedPattern.length <= 1) return []
+
+ return fuse.search(trimmedPattern)
}
module.exports = { |
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 | ---
+++
@@ -1,4 +1,4 @@
-import { Request } from 'react-axios'
+import { Request, Get, Post, Put, Delete, Head, Patch } from 'react-axios'
import React from 'react'
import ReactDOM from 'react-dom'
@@ -8,22 +8,49 @@
this.state = {}
}
+ renderResponse(error, response, isLoading) {
+ if(error) {
+ ... |
490ae36bd10f9ccf6c8efc89fec5ac5c981a28aa | examples/profile-cards-react-with-styles/src/components/Profile.js | examples/profile-cards-react-with-styles/src/components/Profile.js | /* eslint-disable react/prop-types */
import React from 'react';
import { Image, View, Text } from 'react-sketchapp';
import { css, withStyles } from '../withStyles';
const Profile = ({ user, styles }) => (
<View {...css(styles.container)}>
{/* <Image source={user.profile_image_url} {...css(styles.avatar)} /> */... | /* eslint-disable react/prop-types */
import React from 'react';
import { Image, View, Text } from 'react-sketchapp';
import { css, withStyles } from '../withStyles';
const Profile = ({ user, styles }) => (
<View {...css(styles.container)}>
<Image source={user.profile_image_url} {...css(styles.avatar)} />
<V... | Fix commented out avatar in profile-cards-react-with-styles | Fix commented out avatar in profile-cards-react-with-styles | JavaScript | mit | weaintplastic/react-sketchapp | ---
+++
@@ -5,7 +5,7 @@
const Profile = ({ user, styles }) => (
<View {...css(styles.container)}>
- {/* <Image source={user.profile_image_url} {...css(styles.avatar)} /> */}
+ <Image source={user.profile_image_url} {...css(styles.avatar)} />
<View {...css(styles.titleWrapper)}>
<Text {...css(s... |
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 | ---
+++
@@ -21,6 +21,11 @@
const index = client.initIndex('icons');
const indexTmp = client.initIndex('icons_tmp');
+ index.setSettings({
+ searchableAttributes: ['unordered(name)', 'unordered(tags)'],
+ customRanking: ['asc(name)'],
+ });
+
console.log('Copying target index settings into temporary... |
b676b5db32487ef6754bf4a1ddd2df5d7d455ff2 | app/js/services.js | app/js/services.js | angular.module('F1FeederApp.services', [])
.factory('ergastAPIservice', function($http) {
var ergastAPI = {};
ergastAPI.getDrivers = function() {
return $http({
method: 'JSONP',
url: 'http://ergast.com/api/f1/2013/driverStandings.json?callback=JSON_CALLBACK'
});
}
ergas... | angular.module('F1FeederApp.services', [])
.factory('ergastAPIservice', function($http) {
var ergastAPI = {};
ergastAPI.getDrivers = function() {
return $http({
method: 'JSONP',
url: 'http://ergast.com/api/f1/2016/driverStandings.json?callback=JSON_CALLBACK'
});
}
ergas... | Update data source to 2016 feed | Update data source to 2016 feed
| JavaScript | mit | buchananjason/softsource,buchananjason/softsource | ---
+++
@@ -6,21 +6,21 @@
ergastAPI.getDrivers = function() {
return $http({
method: 'JSONP',
- url: 'http://ergast.com/api/f1/2013/driverStandings.json?callback=JSON_CALLBACK'
+ url: 'http://ergast.com/api/f1/2016/driverStandings.json?callback=JSON_CALLBACK'
});
}
... |
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 | ---
+++
@@ -4,11 +4,11 @@
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',
},
+ e... |
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 | ---
+++
@@ -7,7 +7,7 @@
var simulator = {};
simulator.id = sensor_id;
- simulator.type = 'humidity';
+ simulator.type = 'moisture';
simulator.unit = 'humidity.%perL';
simulator.getValue = function(){ |
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 | ---
+++
@@ -1,6 +1,18 @@
angular.module('materialscommons').component('mcExperimentNotes', {
templateUrl: 'app/project/experiments/experiment/components/notes/mc-experiment-notes.html',
+ controller: MCExperimentNotesComponentController,
bindings: {
experiment: '='
}
});
+
+class MCExperi... |
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... | ---
+++
@@ -5,7 +5,8 @@
config.entry = './{% if isV4 %}assets{% else %}src/{{ bundle.namespace|replace({'\\':'/'}) }}/Resources{% endif %}/admin/js/admin-bundle-extra.js';
config.output = {
- filename: './{% if isV4 %}public{% else %}web{% endif %}/frontend/js/admin-bundle-extra.js',
+ path:... |
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 | ---
+++
@@ -2,4 +2,4 @@
var static_server = require('./static_server');
-static_server('dist');
+static_server(process.env.DIST || 'dist'); |
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 | ---
+++
@@ -45,4 +45,8 @@
// configure html5 to get links working on jsfiddle
$locationProvider.html5Mode(true);
-});
+}).config(["$routeProvider", "$httpProvider",
+ function($routeProvider, $httpProvider){
+ $httpProvider.defaults.headers.common['Access-Control-Allow-Headers'] = '*';
+ }
+]... |
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 | ---
+++
@@ -14,10 +14,21 @@
var bundle = browserify({
basedir: Path.dirname(path)
});
- bundle.require(detective(source));
- bundle.bundle(function (err, require) {
- // TODO: Preserve strict mode.
- return cb(err, require + source);
+
+ var dependencies = detective(source);
+ i... |
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 | ---
+++
@@ -52,6 +52,7 @@
onClick={onClick}
onTouchStart={onClick}
target={external ? '_blank' : null}
+ rel={external ? 'noopener' : null}
href={url}
>
{this.props.children} |
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 | ---
+++
@@ -4,19 +4,19 @@
import OrganisationListRow from './OrganisationListRow'
//Snippet taken from https://www.npmjs.com/package/jquery
-require("jsdom").env("", function(err, window) {
- if (err) {
- console.error(err);
- return;
- }
-
- var $ = require("jquery")(window);
- require('bootstrap');
-});
+// ... |
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 | ---
+++
@@ -11,7 +11,7 @@
'view engine': 'jade',
'auto update': true,
- 'mongo': 'mongodb://localhost/mottramec',
+ 'mongo': 'mongodb://'+ (process.env.MOTTRAM_CONFIG_MONGO_CON || 'localhost')+'/mottramec',
'session': true,
'auth': true, |
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 | ---
+++
@@ -8,12 +8,7 @@
return (
<header className="navigation-bar">
<button className="logo"></button>
- <button className="icon new" title="Start new TDD session" onClick={this.props.onNew}>New</button>
<button className="icon save" title="Save and Run tests (⌘S)" onClick={this... |
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 | ---
+++
@@ -12,7 +12,7 @@
var helper = require('./helpers').init(grunt);
- grunt.registerTask('coverage', 'check coverage thresholds', function () {
+ grunt.registerMultiTask('coverage', 'check coverage thresholds', function () {
//set default options
var options = this.options({
... |
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 | ---
+++
@@ -1,12 +1,8 @@
/* eslint-env mocha */
-// TODO : Do not reference the server from here or any related files
-import { dropTestDb } from './utils'
+require('../src/config/config')
+
import { SERVER_PORTS } from './constants'
import nconf from 'nconf'
-// TODO : Remove the need for this
+// Set the route... |
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... | ---
+++
@@ -1,10 +1,11 @@
+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: './server',
+ watch: path.resolve(__dirname, './server'),
... |
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 | ---
+++
@@ -1,18 +1,29 @@
import React, { Component } from 'react'
import styled from 'styled-components'
import TextInput from './TextInput'
-import { Search } from '../icons'
+import { Search, Close } from '../icons'
export default class SearchBar extends Component {
constructor (props) {
super(props)... |
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 | ---
+++
@@ -3,6 +3,7 @@
_h = require('../../helpers/helpers'),
jwt = require('jsonwebtoken'),
co = require('co'),
+ cloudinary = require('cloudinary'),
userHelper = require('./controller-helpers').userHelper,
docHelper = require('./controller-helpers').docHelper,
roleHelper = require('./controller-... |
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 | ---
+++
@@ -1,4 +1,5 @@
var path = require('path');
+var webpack = require('webpack');
var Paths = {
APP: path.resolve(__dirname, 'src/js'),
@@ -7,7 +8,14 @@
module.exports = {
entry: {
- app: Paths.APP
+ app: Paths.APP,
+ vendor: [
+ 'bluebird', 'classnames', 'falcor', 'falcor-http-datasou... |
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 | ---
+++
@@ -9,7 +9,10 @@
devtool: 'eval-source-map',
entry: {
// Used to extract common libraries
- vendor: ['react', 'react-dom'],
+ vendor: [
+ 'classnames', 'es6-promise', 'isomorphic-fetch',
+ 'moment', 'react', 'react-bootstrap', 'react-dom'
+ ],
frontpageEvents: [
'./as... |
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 | ---
+++
@@ -5,12 +5,18 @@
module.exports = getConfig({
in: 'src/app.js',
out: 'public',
- clearBeforeBuild: true
+ clearBeforeBuild: true,
});
module.exports.node = {
child_process: 'empty'
}
-module.exports.devServer.host = '0.0.0.0'
+if(process.env.NODE_ENV === 'development'){
+ module.exports.d... |
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 | ---
+++
@@ -9,7 +9,7 @@
/* eslint no-console: 0 */
function logVersionInfo (appName) {
- console.log(getTitle() + ' v' + getVersion() + ' ' + appName);
+ console.log(getTitle() + ' : v' + getVersion() + ' : ' + appName);
}
function Bookmarklet (params) { |
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 | ---
+++
@@ -1,10 +1,13 @@
+const path = require('path')
+
module.exports = {
entry: './docs/App.jsx',
output: {
filename: './docs/bundle.js'
},
devServer: {
- inline: true
+ inline: true,
+ contentBase: path.join(__dirname, 'docs'),
},
module: {
rules: [{ |
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 | ---
+++
@@ -1,5 +1,25 @@
;(_ => {
'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..... |
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 | ---
+++
@@ -1,3 +1,6 @@
+/* global $, alert, localStorage */
+/* eslint-env jquery, browser */
+
'use strict'
var eq = { |
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 | ---
+++
@@ -20,7 +20,7 @@
try{
if(platform == 'android'){
var lintOptions = 'android { \nlintOptions {\ndisable \'MissingTranslation\' \ndisable \'ExtraTranslation\' \n} \n}';
- fs.writeFileSync('platforms/android/build-extras.gradle', lintOptions, 'UTF-8');
+ fs.appendFileSync('platforms/android/bu... |
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... | ---
+++
@@ -36,8 +36,13 @@
},
files: function(req, res) {
- PlazaService.files("localhost", "", "/home/qleblqnc/", (files) => {
- res.send(files);
+ let filename = req.query["filename"];
+ let user = req.user;
+
+ StorageService.findOrCreate(user, (err, storage) => {
+ PlazaService.files... |
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 | ---
+++
@@ -18,7 +18,8 @@
"Recaptcha",
"alert",
"confirm",
- "SWFUpload"
+ "SWFUpload",
+ "Handlebars"
]
},
format : "JS Lint {{type}}: [{{file}}:{{line}}] {{message}}", |
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 | ---
+++
@@ -37,7 +37,7 @@
policy.addMessage({
plugin,
message:
- 'Policy has a Response variable named "response", this may lead to unexpected side effects. Rename the Resopnse variable.'
+ 'Policy has a Response variable named "response", this may lead to unexpected side effects. Ren... |
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 | ---
+++
@@ -22,28 +22,3 @@
].join('\n')
);
});
-
-it('should truncate trace output for node 4', () => {
- const isTranspiled = true;
-
- expect(
- truncate(
- [
- 'expected callback was called times 2',
- ' expected',
- ' callba... |
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 | ---
+++
@@ -13,11 +13,11 @@
this.model.get("name").should.equal("Test device");
});
it('should have a URL', function() {
- this.model.get("url").should.a("string");
+ this.model.get("url").should.be.a("string");
this.model.get("url").should.equal("Test%20device/");
});
it('... |
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 | ---
+++
@@ -1,4 +1,7 @@
module.exports = {
+ globals: {
+ expect: true
+ },
rules: {
// disallow usage of expressions in statement position
'no-unused-expressions': 0 |
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 | ---
+++
@@ -3,6 +3,15 @@
{
name: 'default',
dependencies: { }
+ },
+ {
+ name: 'ember-1.13',
+ dependencies: {
+ 'ember': '1.13.8'
+ },
+ resolutions: {
+ 'ember': '1.13.8'
+ }
},
{
name: 'ember-release', |
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 | ---
+++
@@ -1,11 +1,12 @@
'use strict';
class BottomTab extends HTMLElement{
-
- initialize(Content, onClick) {
- this._active = false
- this._visibility = true
+ constructor(Content){
this.innerHTML = Content
+ }
+ attachedCallback() {
+ this.active = false
+ this.visibility = false
thi... |
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 | ---
+++
@@ -11,12 +11,9 @@
articles: response.articles
}
})
- return response.articles
})
.catch(error => {
throw(error);
});
}
}
-
- |
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... | ---
+++
@@ -1,4 +1,5 @@
var assign = require('object-assign');
+var isFunction = require('lodash/lang/isFunction');
var actionMixin = {
/**
@@ -22,7 +23,10 @@
//Build the entity value from the ref getVaue.
var htmlData = {};
for(var r in this.refs){
- htmlData[r] = this.refs[r].getValue();
+ ... |
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 | ---
+++
@@ -5,10 +5,15 @@
fetch('/login')
.then(response => response.json())
.then(userAuthInfo => {
+ let loginButton = document.getElementById('google-login-button');
+ let loginButtonText = document.getElementById('google-login-button-text');
+
if(userAuthInfo.isLo... |
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 | ---
+++
@@ -4,7 +4,6 @@
// 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",
"/register": "register"
@@ -14,6 +13,13 @@
"/about": "about",
"/library... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.