commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 624 | message stringlengths 15 4.7k | lang stringclasses 3
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
90d450bf4183942e81865a20f91780d27f208994 | src/main/web/florence/js/functions/_viewLogIn.js | src/main/web/florence/js/functions/_viewLogIn.js | function viewLogIn() {
var login_form = templates.login;
$('.section').html(login_form);
$('.form-login').submit(function (e) {
e.preventDefault();
var email = $('.fl-user-and-access__email').val();
var password = $('.fl-user-and-access__password').val();
postLogin(email, password);
});
}
| function viewLogIn() {
var login_form = templates.login;
$('.section').html(login_form);
$('.form-login').submit(function (e) {
e.preventDefault();
loadingBtn($('#login'));
var email = $('.fl-user-and-access__email').val();
var password = $('.fl-user-and-access__password').... | Add loading icon to login screen | Add loading icon to login screen
| JavaScript | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence |
f9569ceee9c7db8c35240c66f511ef8472d936f0 | ui/features/lti_collaborations/index.js | ui/features/lti_collaborations/index.js | /*
* Copyright (C) 2014 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... | /*
* Copyright (C) 2014 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... | Fix lti collaborations page unresponsive on load in chrome | Fix lti collaborations page unresponsive on load in chrome
fixes VICE-2440
flag=none
Test Plan:
- follow repro steps in linked ticket
Change-Id: I9b682719ea1e258f98caf90a197167a031995f7b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284881
Reviewed-by: Jeffrey Johnson <7a0f98bfe168bc29d5611ba0275e88567... | JavaScript | agpl-3.0 | sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms |
16e2716fddd2d217b53ab0141f74fadf628d589c | config/database.js | config/database.js | var mongodb = require('mongodb');
var host = "alex.mongohq.com";
var port = 10016;
var options = {};
var server = new mongodb.Server(host, port, options, {native_parser: true});
var Database = new mongodb.Db("TexasEstimateEm", server, {safe: false});
var inspect = require('eyes').inspector({ stream: null });
expor... | var mongodb = require('mongodb');
var host = "alex.mongohq.com";
var port = 10016;
var options = {};
var server = new mongodb.Server(host, port, options, {native_parser: true});
var Database = new mongodb.Db("TexasEstimateEm", server, {safe: false});
var inspect = require('eyes').inspector({ stream: null });
expor... | Add games and tasks collections | Add games and tasks collections
| JavaScript | mit | tangosource/pokerestimate,tangosource/pokerestimate |
b52d81de1ccf370e813e7f35dee48d0340e542a6 | app/redux/constants.js | app/redux/constants.js | export default {
FETCH_DATA_BATCH_SIZE: 75,
FETCH_DATA_EXPIRE_SEC: 30,
DEFAULT_SORT_ORDER: 'trending',
JULY_14_HACK: new Date('2016-07-14T00:00:00Z').getTime(),
};
| export default {
FETCH_DATA_BATCH_SIZE: 20,
FETCH_DATA_EXPIRE_SEC: 30,
DEFAULT_SORT_ORDER: 'trending',
JULY_14_HACK: new Date('2016-07-14T00:00:00Z').getTime(),
};
| Revert "Temp increase fetch batch size to work around missing blog history" | Revert "Temp increase fetch batch size to work around missing blog history"
This reverts commit edc49e88c559aee6ee42fae6cd8e93a43e1457b3.
| JavaScript | mit | steemit-intl/steemit.com,TimCliff/steemit.com,GolosChain/tolstoy,TimCliff/steemit.com,enisey14/platform,steemit/steemit.com,steemit/steemit.com,steemit-intl/steemit.com,enisey14/platform,GolosChain/tolstoy,TimCliff/steemit.com,GolosChain/tolstoy,steemit/steemit.com |
0a480399709fb4b22b1e6be4edc32ceb261520f8 | tests/system/test-trigger-upload-on-file-selection.js | tests/system/test-trigger-upload-on-file-selection.js | const numberOfPlannedTests = 6
casper.test.begin('test-trigger-upload-on-file-selection', numberOfPlannedTests, (test) => {
casper.start(`http://${testhost}/trigger-on-file-select`, function () {
})
casper.then(function () {
const curr = this.getCurrentUrl()
const fixturePath = this.fetchText('#fixture_... | const numberOfPlannedTests = 5
casper.test.begin('test-trigger-upload-on-file-selection', numberOfPlannedTests, (test) => {
casper.start(`http://${testhost}/trigger-on-file-select`, function () {
})
casper.then(function () {
const curr = this.getCurrentUrl()
const fixturePath = this.fetchText('#fixture_... | Change num of planned tests. | Change num of planned tests.
| JavaScript | mit | transloadit/jquery-sdk,transloadit/jquery-sdk,transloadit/jquery-sdk |
a01fac7c6dc5979b98d1206b91d8798cdfbcf33e | src/Oro/Bundle/EmailBundle/Resources/public/js/app/modules/views-module.js | src/Oro/Bundle/EmailBundle/Resources/public/js/app/modules/views-module.js | require([
'oroui/js/app/controllers/base/controller'
], function(BaseController) {
'use strict';
BaseController.loadBeforeAction([
'jquery',
'oroemail/js/app/components/email-notification-component',
'oroemail/js/app/components/new-email-message-component',
'oroemail/js/app/... | require([
'oroui/js/app/controllers/base/controller'
], function(BaseController) {
'use strict';
BaseController.loadBeforeAction([
'jquery',
'oroemail/js/app/components/email-notification-component',
'oroemail/js/app/models/email-notification/email-notification-count-model'
], f... | Fix "You have a new email" message | CRM-4194: Fix "You have a new email" message
fixed compositions concept | JavaScript | mit | orocrm/platform,orocrm/platform,geoffroycochard/platform,ramunasd/platform,trustify/oroplatform,geoffroycochard/platform,geoffroycochard/platform,ramunasd/platform,Djamy/platform,orocrm/platform,trustify/oroplatform,ramunasd/platform,Djamy/platform,trustify/oroplatform,Djamy/platform |
7ba9860efaf5e6eee85d3343cd257e8f46c78a06 | assets/js/components/notifications/site/mark-notification.js | assets/js/components/notifications/site/mark-notification.js | /**
* External dependencies
*/
import data, { TYPE_CORE } from 'GoogleComponents/data';
import { trackEvent } from 'assets/js/util/tracking';
const ACCEPTED = 'accepted';
const DISMISSED = 'dismissed';
/**
* Marks the given notification with the provided state.
*
* @param {string} id Notification ID.
* @param... | /**
* External dependencies
*/
import data, { TYPE_CORE } from 'GoogleComponents/data';
import { trackEvent } from 'assets/js/util/tracking';
const ACCEPTED = 'accepted';
const DISMISSED = 'dismissed';
/**
* Marks the given notification with the provided state.
*
* @param {string} id Notification ID.
* @para... | Fix invalid type in JSdoc. | Fix invalid type in JSdoc.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
4ed024451e1bcfd5657c0814f16cd1ce56ed620e | scripts/publishForDesktop.js | scripts/publishForDesktop.js | const fs = require('fs');
const glob = require('glob');
const path = require('path');
const rimraf = require('rimraf');
const workspaceRoot = path.join(__dirname, '..');
const desktopUpdatesPath = path.join(workspaceRoot, '..', 'toolkit-for-ynab-gh-pages', 'desktop-updates');
// Clear out the directory and create it ... | const fs = require('fs');
const glob = require('glob');
const path = require('path');
const rimraf = require('rimraf');
const workspaceRoot = path.join(__dirname, '..');
const desktopUpdatesPath = path.join(workspaceRoot, '..', 'toolkit-for-ynab-gh-pages', 'desktop-updates');
// Clear out the directory and create it ... | Update publish for desktop script | Update publish for desktop script
| JavaScript | mit | toolkit-for-ynab/toolkit-for-ynab,dbaldon/toolkit-for-ynab,dbaldon/toolkit-for-ynab,dbaldon/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,dbaldon/toolkit-for-ynab,blargity/toolkit-for-ynab,blargity/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,ahatzz11/toolkit-for-ynab,falkencreative/toolkit-for-ynab,ahatzz11... |
4e335d931c15995c29989cc2e5e6b2ac77fbd4eb | assets/js/wikipedia.js | assets/js/wikipedia.js | /**
* Retrieves the first wikipedia article for a provided
* name and passes it to the provided callback. If it fails,
* "null" will be provided to the callback, or if provided,
* the failCallback will be called.
*/
function getWikipediaExcerpt(name, callback, failCallback)
{
$.getJSON("https://en.wikipedia.or... | /**
* Retrieves the first wikipedia article for a provided
* name and passes it to the provided callback. If it fails,
* "null" will be provided to the callback, or if provided,
* the failCallback will be called.
*/
function getWikipediaExcerpt(name, callback, failCallback)
{
$.getJSON("https://en.wikipedia.or... | Fix calling fail every time | Fix calling fail every time
| JavaScript | mit | thenaterhood/todayinmy.city,thenaterhood/todayinmy.city,thenaterhood/todayinmy.city |
de4f102e9e02ecdf6778ee3a2e5cd60a65cea2c4 | assets/github.js | assets/github.js | require([ 'gitbook' ], function (gitbook) {
gitbook.events.bind('start', function (e, config) {
var githubURL = config.github.url;
if (githubURL) {
jQuery('.book-header > h1').before(
'<a href="' + githubURL + '" _target="blank" class="btn pull-right github-sharing-link sharing-link" aria-label... | require([ 'gitbook' ], function (gitbook) {
var githubURL;
function insertGitHubLink() {
if (githubURL && jQuery('.github-sharing-link').length === 0) {
jQuery('.book-header > h1').before(
'<a href="' + githubURL + '" _target="blank" class="btn pull-right github-sharing-link sharing-link" aria-la... | Update link on page.change event | Update link on page.change event
| JavaScript | apache-2.0 | GitbookIO/plugin-github |
101d2d24a28145bd1352c96d4e361223dd0a464d | src/js/components/Footer.js | src/js/components/Footer.js | import React from 'react';
import SocialLinks from './SocialLinks';
import { withClassName } from './HOC';
import { currentYear } from '../utils';
function Footer({ className }) {
return (
<footer className={className}>
<SocialLinks />
<p>
<small className="footer__copy">
Slava Pav... | import React from 'react';
import SocialLinks from './SocialLinks';
import { withClassName } from './HOC';
import { currentYear } from '../utils';
function Footer({ className }) {
return (
<footer className={className}>
<SocialLinks />
<div>
<small className="footer__copy">
Slava P... | Replace <p> with <div> in .footer | Replace <p> with <div> in .footer [skip ci]
| JavaScript | mit | slavapavlutin/pavlutin-node,slavapavlutin/pavlutin-node |
abc6c2d42c1f5d7063974ac0bd196bbf05b3205a | src/mixins/updateable.js | src/mixins/updateable.js | var updatable = function() {
var self = this;
// Update all children
this.on('update', dt => {
self.children.forEach(child => {
if (child.update) {
child.trigger('update', dt);
}
});
});
};
export default updatable;
| import checkForFlag from 'flockn/utils/ckeckforflag';
var isStatic = checkForFlag('static');
// TODO: This is not completely how I want it be as it only sets the children as static and not the element itself
var updatable = function updateable() {
// Update all children
this.on('update', dt => {
if (!isStatic... | Add an "visible" equivalent for update mixin | Add an "visible" equivalent for update mixin
| JavaScript | mit | freezedev/flockn,freezedev/flockn |
7d68d53d3ad32b8c1e6a301a8c5a038e0d0f89f6 | coeus-webapp/src/main/webapp/scripts/common/global.js | coeus-webapp/src/main/webapp/scripts/common/global.js | var Kc = Kc || {};
Kc.Global = Kc.Global || {};
(function (namespace, $) {
// set all modals to static behavior (clicking out does not close)
$.fn.modal.Constructor.DEFAULTS.backdrop = "static";
})(Kc.Global, jQuery); | var Kc = Kc || {};
Kc.Global = Kc.Global || {};
(function (namespace, $) {
// set all modals to static behavior (clicking out does not close)
$.fn.modal.Constructor.DEFAULTS.backdrop = "static";
$(document).on("ready", function(){
// date conversion for date fields to full leading 0 - for days and ... | Convert non-full date to full date on loss of focus in js | [KRACOEUS-8479] Convert non-full date to full date on loss of focus in js
| JavaScript | agpl-3.0 | iu-uits-es/kc,jwillia/kc-old1,mukadder/kc,kuali/kc,ColostateResearchServices/kc,iu-uits-es/kc,kuali/kc,UniversityOfHawaiiORS/kc,jwillia/kc-old1,iu-uits-es/kc,ColostateResearchServices/kc,jwillia/kc-old1,UniversityOfHawaiiORS/kc,jwillia/kc-old1,mukadder/kc,UniversityOfHawaiiORS/kc,mukadder/kc,ColostateResearchServices/k... |
3f7e152cbcbca8429658b45a6805d0ff5d721d05 | app/models/employee.js | app/models/employee.js | import DS from 'ember-data';
import ProjectedModel from './projected-model';
import Proj from '../utils/projection-attributes';
var Model = ProjectedModel.extend({
firstName: DS.attr('string'),
lastName: DS.attr('string'),
birthDate: DS.attr('date'),
employee1: DS.belongsTo('employee', { inverse: null, async: ... | import DS from 'ember-data';
import ProjectedModel from './projected-model';
import Proj from '../utils/projection-attributes';
var Model = ProjectedModel.extend({
firstName: DS.attr('string'),
lastName: DS.attr('string'),
birthDate: DS.attr('date'),
employee1: DS.belongsTo('employee', { inverse: null, async: ... | Fix typos in EmployeeE projection | Fix typos in EmployeeE projection
| JavaScript | mit | Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry |
e53e51c0adf5a027148067ccbf06535e49bea469 | numeric-string/numeric-string.js | numeric-string/numeric-string.js | var numericString = function (number) {
var string = ('' + number).split('.'),
length = string[0].length,
places = 0;
while (--length) {
places += 1;
// At every third position we want to insert a comma
if (places % 3 === 0) {
string[0] = string[0].substr(0, length) + ',' + string[0].... | var numericString = function (number) {
var parts = ('' + number).split('.'),
length = parts[0].length,
places = 0;
while (--length) {
places += 1;
// At every third position we want to insert a comma
if (places % 3 === 0) {
parts[0] = parts[0].substr(0, length) + ',' + parts[0].subs... | Implement regex numeric string solution. | Implement regex numeric string solution.
| JavaScript | mit | saurabhjn76/code-problems,angelkar/code-problems,sethdame/code-problems,jefimenko/code-problems,lgulliver/code-problems,caoglish/code-problems,lgulliver/code-problems,SterlingVix/code-problems,aloisdg/code-problems,diversedition/code-problems,patrickford/code-problems,caoglish/code-problems,caoglish/code-problems,patri... |
1b95d90af76ebeea88e3c12b34c3360b09486ea8 | src/reducers/reducerTone.js | src/reducers/reducerTone.js | import { GET_TONE } from '../actions/index';
export default function (state = [], action) {
switch (action.type) {
case GET_TONE:
return action.payload.data;
default:
return state;
}
}
| import { GET_TONE } from '../actions/index';
export default function (state = [], action) {
switch (action.type) {
case GET_TONE:
if (action.payload.status === 200) {
return action.payload.data;
}
return state;
default:
return state;
}
}
| Add conditional to tone reducer | Add conditional to tone reducer
| JavaScript | mit | badT/Chatson,badT/twitchBot,dramich/twitchBot,dramich/Chatson,dramich/Chatson,TerryCapan/twitchBot,TerryCapan/twitchBot,dramich/twitchBot,badT/Chatson,badT/twitchBot |
a44798bff6aae4b6436ed15c62af5d4f700b6552 | website/mcapp.projects/src/app/project/experiments/experiment/components/processes/mc-workflow-process-templates.component.js | website/mcapp.projects/src/app/project/experiments/experiment/components/processes/mc-workflow-process-templates.component.js | class MCWorkflowProcessTemplatesComponentController {
/*@ngInit*/
constructor(templates) {
this.templates = templates.get();
this.templateTypes = [
{
title: 'CREATE SAMPLES',
cssClass: 'mc-create-samples-color',
icon: 'fa-cubes',
... | class MCWorkflowProcessTemplatesComponentController {
/*@ngInit*/
constructor(templates) {
this.templates = templates.get();
this.templateTypes = [
{
title: 'CREATE SAMPLES',
cssClass: 'mc-create-samples-color',
icon: 'fa-cubes',
... | Modify filter to show new computational sample templates. | Modify filter to show new computational sample templates.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
b8a79dd951253822bcfe1f48f6eb7f351d457f02 | IPython/html/static/notebook/js/widgets/button.js | IPython/html/static/notebook/js/widgets/button.js | //----------------------------------------------------------------------------
// Copyright (C) 2013 The IPython Development Team
//
// Distributed under the terms of the BSD License. The full license is in
// the file COPYING, distributed as part of this software.
//------------------------------------------------... | //----------------------------------------------------------------------------
// Copyright (C) 2013 The IPython Development Team
//
// Distributed under the terms of the BSD License. The full license is in
// the file COPYING, distributed as part of this software.
//------------------------------------------------... | Use setElement to set the view's element properly. | Use setElement to set the view's element properly.
| JavaScript | bsd-3-clause | ipython/ipython,ipython/ipython |
a773fb3910892ce18e9566f849a8ab3069367c0d | app/templates/_main.js | app/templates/_main.js | import Vue from 'vue';
import app from './App';<% if (extraConfig.isUseVueRouter) { %>
import VueRouter from 'vue-router';
import { configRouter } from './route';<% } %>
<% if (extraConfig.isUseVueRouter) { %>
Vue.use(VueRouter);
const App = Vue.extend(app);
const router = new VueRouter();
configRouter(router);
route... | import Vue from 'vue';
import app from './App';<% if (extraConfig.isUseVueRouter) { %>
import VueRouter from 'vue-router';
import { configRouter } from './route';<% } %>
<% if (extraConfig.isUseVueRouter) { %>
Vue.use(VueRouter);
const App = Vue.extend(app);
const router = new VueRouter();
configRouter(router);
route... | Fix code style error in main.js | Fix code style error in main.js
| JavaScript | mit | PeachScript/generator-abstack-vuejs,PeachScript/generator-abstack-vuejs |
9fc6057d0c29a21ea40284a13ad4af79251cde10 | app/assets/javascripts/koi/controllers/application.js | app/assets/javascripts/koi/controllers/application.js | import { Application } from "@hotwired/stimulus"
// Stimulus controllers. This should ultimately be moved to koi/admin.js
import "@hotwired/turbo-rails"
import "trix";
import "@rails/actiontext";
const application = Application.start()
window.Stimulus = application
export { application }
| import { Application } from "@hotwired/stimulus"
// Stimulus controllers. This should ultimately be moved to koi/admin.js
import "@hotwired/turbo-rails"
import "@rails/actiontext";
const application = Application.start()
window.Stimulus = application
export { application }
| Move trix dependency to content gem | FRIN23-19: Move trix dependency to content gem
| JavaScript | mit | katalyst/koi,katalyst/koi,katalyst/koi |
ca78cd4901e2322a5f63fcd4c0f555b5c553dde9 | assets/js/functions.js | assets/js/functions.js | $(document).ready(function () {
attachResizeVideo();
switchAd();
});
function attachResizeVideo() {
$(window).resize(function () {
resizeVideo();
});
resizeVideo();
}
function resizeVideo() {
console.log("fired");
var $ytplayer = $('#ytplayer');
var $parent = $ytplayer.par... | $(document).ready(function () {
attachResizeVideo();
switchAd();
});
function attachResizeVideo() {
$(window).resize(function () {
resizeVideo();
});
resizeVideo();
}
function resizeVideo() {
console.log("fired");
var $ytplayer = $('#ytplayer');
var $parent = $ytplayer.par... | Add width checking to video javascript. | Add width checking to video javascript.
| JavaScript | unlicense | LiteracyFanatic/TruckAdvertisements,LiteracyFanatic/TruckAdvertisements |
b15abeabe4b0b395485cb8754e05732c9de4953d | test/integration/server/test_bunyan.js | test/integration/server/test_bunyan.js |
'use strict';
var path = require('path');
var expect = require('thehelp-test').expect;
var util = require('./util');
describe('bunyan', function() {
var child;
before(function(done) {
this.timeout(10000);
util.setupScenario('bunyan', function(err) {
if (err) {
throw err;
}
... |
'use strict';
var path = require('path');
var expect = require('thehelp-test').expect;
var util = require('./util');
describe('bunyan', function() {
var child;
before(function(done) {
this.timeout(30000);
util.setupScenario('bunyan', function(err) {
if (err) {
throw err;
}
... | Increase timeout for bunyan test | Increase timeout for bunyan test
Build can sometimes take a long time… | JavaScript | mit | thehelp/log-shim |
b5750d7cb92e99e8eb2fb6e419336d2e5a96c521 | server/api/controllers/utils/utilsCtrl.spec.js | server/api/controllers/utils/utilsCtrl.spec.js | 'use strict';
var should = require('should');
var utils = require('./utilsCtrl.js');
describe('utilsCtrl tests', function() {
it('should find list with some id', function(done) {
var lists = {
listContainer1: [ {id: 'idlist1'}, {id: 'idlist2'}, {id: 'idlist3'} ],
listContainer2: [ {id: 'idlist4'},... | 'use strict';
var should = require('should');
var utils = require('./utilsCtrl.js');
describe('utils module tests', function() {
it('should find list with some id', function(done) {
var lists = {
listContainer1: [ {id: 'idlist1'}, {id: 'idlist2'}, {id: 'idlist3'} ],
listContainer2: [ {id: 'idlist4... | Add automatic test for utils | Add automatic test for utils
| JavaScript | mit | safv12/trello-metrics,safv12/trello-metrics |
9b53d4814b4170dd3e502e459e2a145ff3eec779 | app/operation/operation.js | app/operation/operation.js | 'use strict';
angular.module('myApp.operation', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/operation', {
templateUrl: 'operation/operation.html',
controller: 'OperationController'
});
}])
.controller('OperationController', ['$scope', '$rootScope', function($s... | 'use strict';
angular.module('myApp.operation', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/operation', {
templateUrl: 'operation/operation.html',
controller: 'OperationController'
});
}])
.controller('OperationController', ['$scope', '$rootScope', function($s... | Set typeOperation for default to select option | Set typeOperation for default to select option
| JavaScript | mit | AitorRodriguez990/angular-testing-examples,AitorRodriguez990/angular-testing-examples |
e45662e92bee7e48ef2df981d0b6322f7522b463 | app/scripts/src/request.js | app/scripts/src/request.js | 'use strict';
var Settings = require('./settings.js');
var ChromeStorage = require('./chrome-storage.js');
function Request() {};
Request._send = function _send(options, accessToken) {
var xhr = new XMLHttpRequest();
xhr.open(options.method, options.url, true);
xhr.setRequestHeader('Content-type', 'applicatio... | 'use strict';
var Settings = require('./settings.js');
var ChromeStorage = require('./chrome-storage.js');
function Request() {};
Request._send = function _send(options, accessToken) {
var xhr = new XMLHttpRequest();
xhr.open(options.method, options.url, true);
xhr.setRequestHeader('Content-type', 'applicatio... | Increase timeout for trakt.tv API calls | Increase timeout for trakt.tv API calls
| JavaScript | mit | tegon/traktflix,MrMamen/traktflix,MrMamen/traktflix,tegon/traktflix |
10d041569a0b19dee2024001f7aae310ddd89dca | tests/unit/components/compiler-test.js | tests/unit/components/compiler-test.js | import hbs from 'htmlbars-inline-precompile';
import { moduleForComponent, test } from 'ember-qunit';
moduleForComponent('my-component', {
integration: true
});
test('precompile enabled flags', function(assert) {
this.render(hbs`
{{#if-flag-ENABLE_FOO}}Foo{{/if-flag-ENABLE_FOO}}
`);
assert.equal(this.$()... | import hbs from 'htmlbars-inline-precompile';
import { moduleForComponent, test } from 'ember-qunit';
moduleForComponent('my-component', {
integration: true
});
test('precompile enabled flags', function(assert) {
this.render(hbs`
{{#if-flag-ENABLE_FOO}}Foo{{/if-flag-ENABLE_FOO}}
`);
assert.equal(this.$()... | Add test for {{else}} block | Add test for {{else}} block
| JavaScript | mit | minichate/ember-cli-conditional-compile,minichate/ember-cli-conditional-compile |
01d5c7a264f47306646e04cabab5d5e08ec76d20 | template/share/spice/example/example.js | template/share/spice/example/example.js | (function (env) {
"use strict";
env.ddg_spice_<: $lia_name :> = function(api_result){
// Validate the response (customize for your Spice)
if (api_result.error) {
return Spice.failed('<: $lia_name :>');
}
// Render the response
Spice.add({
... | (function (env) {
"use strict";
env.ddg_spice_<: $lia_name :> = function(api_result){
// Validate the response (customize for your Spice)
if (api_result.error) {
return Spice.failed('<: $lia_name :>');
}
// Render the response
Spice.add({
... | Add new placeholders to Example.js | Add new placeholders to Example.js | JavaScript | apache-2.0 | shyamalschandra/zeroclickinfo-spice,P71/zeroclickinfo-spice,soleo/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,imwally/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,TomBebbington/zeroclic... |
3febb3230f340f61103a3a93b8ca0623b57613d9 | .eslintrc.js | .eslintrc.js | const package = require('./package.json')
module.exports = {
parser: 'babel-eslint',
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:react/recommended',
'plugin:flowtype/recommended',... | const package = require('./package.json')
module.exports = {
parser: 'babel-eslint',
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:react/recommended',
'plugin:flowtype/recommended',... | Remove unnecessary plugin using declaration | :shower: Remove unnecessary plugin using declaration
| JavaScript | mit | keik/gh,keik/gh,keik/gh |
e5773320c3bd1b47c00388f9fda6d3ece8f0fb1c | .eslintrc.js | .eslintrc.js | module.exports = {
"env": {
"browser": true,
"node": true
},
"globals": {
"app": true,
"angular": true,
"_": true
},
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
2
],
"linebreak-style": ... | module.exports = {
"env": {
"browser": true,
"node": true
},
"globals": {
"app": true,
"angular": true,
"_": true
},
"extends": "eslint:recommended",
"rules": {
"no-console": [
"error", { allow: ["log", "warn", "error"] }
], ... | Allow console log warn error | Allow console log warn error
| JavaScript | mit | FreaKzero/gzdoom-launcher,FreaKzero/gzdoom-launcher |
7551cdf761228536485caaa838b106092050d300 | .eslintrc.js | .eslintrc.js | module.exports = {
"env": {
"browser": true
},
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"doubl... | module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes"... | Allow eslint to use node and es6 | Allow eslint to use node and es6
| JavaScript | mit | albertyw/gentle-alerts,albertyw/gentle-alerts |
6a0a7cf7e91b7d9e216d58230c3ef87b5a5af305 | static/js/logs-screen.js | static/js/logs-screen.js | /**
* Logs Screen
*
* Shows all logs
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
const Log = require('./logs/log');
const LogsScreen = {... | /**
* Logs Screen
*
* Shows all logs
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
const Log = require('./logs/log');
const LogsScreen = {... | Add graph of boolean property | Add graph of boolean property
| JavaScript | mpl-2.0 | moziot/gateway,mozilla-iot/gateway,mozilla-iot/gateway,moziot/gateway,mozilla-iot/gateway,moziot/gateway,mozilla-iot/gateway,mozilla-iot/gateway |
508f54ba5774bc2a3a6597cb709fa67ad0632a8b | lib/livereload.js | lib/livereload.js | 'use strict';
// socket.io-client requires the window object, and navigator.userAgent to be present.
var window = {},
navigator = {userAgent: 'tvos'};
var io = require('socket.io-client');
/*
import * as router from 'lib/router';
*/
function resume(lastLocation) {
if (!lastLocation) {
return;
}
//rou... | 'use strict';
// socket.io-client requires the window object, and navigator.userAgent to be present.
var window = global;
window.navigator = {userAgent: 'tvos'};
var io = require('socket.io-client');
function resume(lastLocation) {
if (!lastLocation) {
return;
}
}
function logDebug(msg) {
if (console && c... | Fix reload errors with latest tvOS | Fix reload errors with latest tvOS
| JavaScript | mit | hypery2k/tvml-kit-livereload |
a588182dfe07bee8c74ccf9c3ae9e3e6e572652a | lib/logFactory.js | lib/logFactory.js | var LogStream = require('./LogStream');
var lodash = require('lodash');
/**
* The LogFactory constructor.
* @constructor
*/
var LogFactory = function () {
var self = this;
self._streams = {};
self._filters = [];
};
/**
* Create a new LogStream.
* @param name The name of the component originating the logs.
* ... | var LogStream = require('./LogStream');
var lodash = require('lodash');
/**
* The LogFactory constructor.
* @constructor
*/
var LogFactory = function () {
var self = this;
self._inputs = {};
self._outputs = [];
};
/**
* Create a new LogStream.
* @param name The name of the component originating the logs.
* @... | Fix a race condition when adding output streams before all input streams are added. | Fix a race condition when adding output streams before all input streams are added.
| JavaScript | mit | ericrini/node-streamlogger |
f5bc7da306376fb34171ad2eb9f2869dbf68a35f | apps/baumeister_web/web/static/js/app.js | apps/baumeister_web/web/static/js/app.js | // Brunch automatically concatenates all files in your
// watched paths. Those paths can be configured at
// config.paths.watched in "brunch-config.js".
//
// However, those files will only be executed if
// explicitly imported. The only exception are files
// in vendor, which are never wrapped in imports and
// theref... | // Brunch automatically concatenates all files in your
// watched paths. Those paths can be configured at
// config.paths.watched in "brunch-config.js".
//
// However, those files will only be executed if
// explicitly imported. The only exception are files
// in vendor, which are never wrapped in imports and
// theref... | Enable the web socket for channel transports | Enable the web socket for channel transports
| JavaScript | apache-2.0 | alfert/baumeister,alfert/baumeister,alfert/baumeister |
1dd9f0bc886a501ce015dfcf3bcbc947566641b4 | src/mui/button/SaveButton.js | src/mui/button/SaveButton.js | import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import ContentSave from 'material-ui/svg-icons/content/save';
const SaveButton = () => <RaisedButton
type="submit"
label="Save"
icon={<ContentSave />}
primary
style={{
margin: '10px 24px',
position: 'rel... | import React, { Component } from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import ContentSave from 'material-ui/svg-icons/content/save';
import CircularProgress from 'material-ui/CircularProgress';
class SaveButton extends Component {
constructor(props) {
super(props);
this.stat... | Add double submission protection in Save button | Add double submission protection in Save button
| JavaScript | mit | marmelab/admin-on-rest,matteolc/admin-on-rest,matteolc/admin-on-rest,marmelab/admin-on-rest |
39d265f663f47793ad4ac91216b848ec4da9a73a | app/scripts/main.js | app/scripts/main.js | 'use strict';
var localforage = require('localforage');
var $body = $('body');
['theme', 'mode'].forEach(function (property) {
localforage.getItem(property, function (value) {
if (!value) {
value = 'default';
localforage.setItem(property, value);
} else {
// For non-first time users, we wa... | 'use strict';
var localforage = require('localforage');
var $body = $('body');
['theme', 'mode'].forEach(function (property) {
localforage.getItem(property, function (value) {
if (!value) {
value = 'default';
localforage.setItem(property, value);
} else {
// For non-first time users, we wa... | Set mode and theme custom dimensions instead of sending event | Set mode and theme custom dimensions instead of sending event
| JavaScript | mit | zhouyichen/nusmods,Yunheng/nusmods,nusmodifications/nusmods,nusmodifications/nusmods,nathanajah/nusmods,chunqi/nusmods,chunqi/nusmods,chunqi/nusmods,nathanajah/nusmods,mauris/nusmods,chunqi/nusmods,nathanajah/nusmods,nathanajah/nusmods,nusmodifications/nusmods,zhouyichen/nusmods,Yunheng/nusmods,Yunheng/nusmods,nusmodif... |
22ab2c05c83dc0855a878a34e45b08ebfe3c9f77 | blueprints/ember-cli-typescript/index.js | blueprints/ember-cli-typescript/index.js | /* eslint-env node */
const path = require('path');
module.exports = {
description: 'Initialize files needed for typescript compilation',
files() {
return [
path.join(this.path, 'files', 'tsconfig.json'),
path.join(this.path, 'files', 'app', 'config', 'environment.d.ts'),
];
},
mapFile()... | /* eslint-env node */
const path = require('path');
module.exports = {
description: 'Initialize files needed for typescript compilation',
files() {
return [
path.join(this.path, 'files', 'tsconfig.json'),
path.join(this.path, 'files', 'app', 'config', 'environment.d.ts'),
];
},
mapFile()... | Use 'latest' for typing versions. | Use 'latest' for typing versions.
| JavaScript | mit | emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript |
907620ba91313e95cabcc7104b0d52225cb77e28 | src/logger/steps/writing.js | src/logger/steps/writing.js | /**
* Step 5
* Where you write the generator specific files (routes, controllers, etc)
*/
const SOURCE_CONFIG = name => `${name}Config.js`;
const DESTINATION_CONFIG = `config/log.js`;
export default function () {
let logger = this['logger-name'];
this.template(SOURCE_CONFIG(logger), DESTINATION_CONFIG, {logg... | /**
* Step 5
* Where you write the generator specific files (routes, controllers, etc)
*/
const SOURCE_CONFIG = name => `${name}Config.js`;
const DESTINATION_CONFIG = `config/log.js`;
export default function () {
let logger = this['logger-name'].toLowerCase();
this.template(SOURCE_CONFIG(logger), DESTINATION... | Fix issue with lower-cased form of logger name | fix(logger): Fix issue with lower-cased form of logger name
| JavaScript | mit | ghaiklor/generator-sails-rest-api,konstantinzolotarev/generator-trails,italoag/generator-sails-rest-api,jaumard/generator-trails,ghaiklor/generator-sails-rest-api,tnunes/generator-trails,italoag/generator-sails-rest-api |
1c8c0e06f8b6f89c1a06958a58f5b5e55be63b2b | checkCoverage.js | checkCoverage.js | var data = '';
process.stdin.on('data', function(chunk) { data += chunk; });
process.stdin.on('end', function() {
var regExp = /[0-9]+([.][0-9]+)?%/g;
var match;
do {
match = regExp.exec(data);
if (match) {
var percent = parseFloat(match[0].substring(0, match[0].length - 1));
if (percent < 80)... | var MIN_METRIC_COVERAGE = 90.0;
var data = '';
process.stdin.on('data', function(chunk) { data += chunk; });
process.stdin.on('end', function() {
var regExp = /[0-9]+([.][0-9]+)?%/g;
var match;
do {
match = regExp.exec(data);
if (match) {
var percent = parseFloat(match[0].substring(0, match[0].leng... | Raise the bar on test coverage from 80% to 90% | Raise the bar on test coverage from 80% to 90%
| JavaScript | apache-2.0 | foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,TanayParikh/foam2,foam-framework/foam2,TanayParikh/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,TanayParikh/foam2,TanayParikh/foam2 |
50d3aeafe00053c798d4049a0eafa07edb7a42c2 | server/src/main/webui/app/components/contextItem.js | server/src/main/webui/app/components/contextItem.js | import React from "react"
import { Nav, NavItem, Collapse } from "react-bootstrap"
var threadNavStyle = {
backgroundColor: 'rgb(220, 220, 220)',
color: 'black'
};
export default React.createClass({
getInitialState: function() {
return {}
},
render: function() {
var { title, ...oth... | import React from "react"
import { Button, ButtonGroup, NavItem, Collapse } from "react-bootstrap"
export default React.createClass({
getInitialState: function() {
return {}
},
render: function() {
var { title, ...other } = this.props;
return (
<NavItem {...other}>
... | Switch to using a button group for the context selector. | Switch to using a button group for the context selector.
| JavaScript | mpl-2.0 | mcnulty/udidb,mcnulty/udidb,mcnulty/udidb,mcnulty/udidb,mcnulty/udidb |
ed29712fac2ec580c3e0030f96a5c77bf1e1ece2 | spec/arethusa.core/directives/lang_specific_spec.js | spec/arethusa.core/directives/lang_specific_spec.js | "use strict";
describe('lang-specific directive', function() {
var element;
var documentStore;
function createDocumentStore() {
return {
store: {
treebank: {
json: {
treebank: {}
}
}
}
};
}
beforeEach(module('arethusa.core'));
var create... | "use strict";
describe('lang-specific directive', function() {
var element;
var documentStore;
function createLanguageSettingsWith(settings) {
return {
getFor: function(doc) {
return settings;
}
};
}
beforeEach(module('arethusa.core'));
var createElement = function() {
inj... | Update lang-specific specs to stub languageSettings | Update lang-specific specs to stub languageSettings
| JavaScript | mit | alpheios-project/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa |
7691964f1a2afd88154514548145d760778b71c4 | packages/soya-next/config/default.js | packages/soya-next/config/default.js | const config = require("config");
let basePath;
if (config.basePath) {
if (typeof config.basePath === "string") {
basePath = {
test: config.basePath
};
}
basePath = config.basePath;
}
config.assetPrefix = config.assetPrefix || basePath || "";
config.configOrigin = config.configOrigin || "default";
c... | const config = require("config");
let basePath;
if (config.basePath) {
if (typeof config.basePath === "string") {
basePath = config.basePath;
} else {
basePath = config.basePath && config.basePath.test;
}
}
config.assetPrefix = config.assetPrefix || basePath || "";
config.configOrigin = config.configOrigi... | Fix wrong assetPrefix when using basePath as object | Fix wrong assetPrefix when using basePath as object
| JavaScript | mit | traveloka/soya-next |
41c4683e6b4c967aaeaa6a676dd252b6182dea52 | app/assets/javascripts/controllers/NavController.js | app/assets/javascripts/controllers/NavController.js | function NavController($scope, Auth) {
$scope.signedIn = Auth.isAuthenticated;
$scope.logout = Auth.logout;
Auth.currentUser().then(function (user) {
$scope.user = user;
});
$scope.$on('devise:new-registration', function (e, user) {
$scope.user = user;
});
$scope.$on('devise:login', function (e... | function NavController($scope, $state, Auth) {
$scope.signedIn = Auth.isAuthenticated;
$scope.logout = Auth.logout;
Auth.currentUser().then(function (user) {
$scope.user = user;
});
$scope.$on('devise:new-registration', function (e, user) {
$scope.user = user;
});
$scope.$on('devise:login', fun... | Load home page on logout | Load home page on logout
| JavaScript | mit | davdkm/whats-good,davdkm/whats-good,davdkm/whats-good |
2ddea6322f9f3a1522899c19903e49476346bac9 | js/components/developer/job-preview-screen/jobTypeCardPreview.js | js/components/developer/job-preview-screen/jobTypeCardPreview.js | import React, { Component } from 'react';
import { Card } from 'native-base';
import CardImageHeader from '../../common/card-image-header/cardImageHeader';
import SimpleCardBody from '../../common/simple-card-body/simpleCardBody';
export default class JobTypeCardPreview extends Component {
static propTypes = {
... | import React, { Component } from 'react';
import { Card } from 'native-base';
import CardImageHeader from '../../common/card-image-header/cardImageHeader';
import SimpleCardBody from '../../common/simple-card-body/simpleCardBody';
import { imageProp } from '../../common/propTypes';
export default class JobTypeCardPre... | Make JobTypeCardPreview use imageProp from propTypes | Make JobTypeCardPreview use imageProp from propTypes
| JavaScript | mit | justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client |
f283ed1c9df5b8daee0fe32d9670d23100733d33 | test/style-examples.test.js | test/style-examples.test.js | var test = require('tape');
var tm = require('../lib/tm');
var style = require('../lib/style');
var source = require('../lib/source');
var mockOauth = require('../lib/mapbox-mock')(require('express')());
var tmppath = tm.join(require('os').tmpdir(), 'Examples ШЖФ -' + (+new Date));
var server;
test('setup', function(t... | var test = require('tape');
var tm = require('../lib/tm');
var style = require('../lib/style');
var source = require('../lib/source');
var mockOauth = require('../lib/mapbox-mock')(require('express')());
var tmppath = tm.join(require('os').tmpdir(), 'Examples ШЖФ -' + (+new Date));
var server;
test('setup', function(t... | Test that no mapid is set on example styles. | Test that no mapid is set on example styles.
| JavaScript | bsd-3-clause | wakermahmud/mapbox-studio,tizzybec/mapbox-studio,wakermahmud/mapbox-studio,tizzybec/mapbox-studio,adozenlines/mapbox-studio,mapbox/mapbox-studio-classic,wakermahmud/mapbox-studio,crowdcover/mapbox-studio,danieljoppi/mapbox-studio,Zhao-Qi/mapbox-studio-classic,AbelSu131/mapbox-studio,Zhao-Qi/mapbox-studio-classic,ali/ma... |
68b3c1b5a93b20ffcbeffb051b3c4fdf6c1eab23 | client/desktop/app/components/Profile.js | client/desktop/app/components/Profile.js | import React from 'react'
import {Route, RouteHandler, Link, Button} from 'react-router'
class Profile extends React.Component {
constructor(props){
super(props);
this.state = {
teacherData: {
name: 'Teachy McTeacherton',
email: 'teachy@teach.er'
}
};
}
render(){
retu... | import React from 'react'
import {Route, RouteHandler, Link, Button} from 'react-router'
var auth = require('./../utils/auth');
class Profile extends React.Component {
constructor(props){
super(props);
this.state = {
teacherData: {
name: 'Teachy McTeacherton',
email: 'teachy@teach.er'
... | Add functionality to logout button | Add functionality to logout button
| JavaScript | mit | absurdSquid/thumbroll,Jakeyrob/thumbroll,Jakeyrob/thumbroll,shanemcgraw/thumbroll,Jakeyrob/thumbroll,shanemcgraw/thumbroll,shanemcgraw/thumbroll,absurdSquid/thumbroll |
459775e9dd3d8b0c0119315615d6a4583de43503 | test/test_dummy/test_api.js | test/test_dummy/test_api.js | var assert = require("assert");
var Q = require("q");
var api = require("../../lib/dummy/api");
var DummyApi = api.DummyApi;
var resources = require("../../lib/dummy/resources");
var DummyResource = resources.DummyResource;
var ToyResource = DummyResource.extend(function(self) {
DummyResource.call(self);
s... | var assert = require("assert");
var vumigo = require("../../lib");
var test_utils = vumigo.test_utils;
var DummyApi = vumigo.dummy.api.DummyApi;
var DummyResource = vumigo.dummy.resources.DummyResource;
var ToyResource = DummyResource.extend(function(self) {
DummyResource.call(self);
self.name = 'toy';
... | Remove old parts of DummyApi tests | Remove old parts of DummyApi tests
| JavaScript | bsd-3-clause | GeekFreaker/vumi-jssandbox-toolkit,GeekFreaker/vumi-jssandbox-toolkit |
583efbc9c4751605f63b5ec181e3328900c93b85 | app/javascript/src/componentLoader/index.js | app/javascript/src/componentLoader/index.js | import { createLoader } from 'react-hijack';
const componentLoader = createLoader((module) => import('' + module));
export default componentLoader;
| import { createLoader } from 'react-hijack';
const componentLoader = createLoader((module) => import('./components/' + module));
export default componentLoader;
| Add component path at module level | refactor(componentLoader): Add component path at module level
Instead of forcing this knowledge on the add-on, we inserted it here. The benefit is that we are able to point the core to whatever directory we choose, without modifying each addon in turn.
| JavaScript | mpl-2.0 | mlorb/scinote-web,Ducz0r/scinote-web,Ducz0r/scinote-web,Ducz0r/scinote-web,mlorb/scinote-web,mlorb/scinote-web |
d095feef61adc341ec526414997031849517928e | src/client/webpack.config.js | src/client/webpack.config.js | const path = require('path');
const webpackConfig = {
entry: path.join(__dirname, 'index.js'),
output: {
path: path.join(__dirname, '../server/static'),
filename: 'bundle.js'
},
devtool: 'source-map',
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',
exclude: ... | const path = require('path');
const webpackConfig = {
entry: path.join(__dirname, 'index.js'),
output: {
path: path.join(__dirname, '../server/static'),
filename: 'bundle.js'
},
devtool: 'source-map',
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',
exclude: ... | Bring back regular css loading | Bring back regular css loading
| JavaScript | mit | hkal/timeworthy,hkal/timeworthy |
44f0851bc77e3469da2bd00dbe8fcd5ac2341691 | input/composites/line.js | input/composites/line.js | 'use strict';
var sepItems = require('es5-ext/array/#/sep-items')
, d = require('d/d')
, DOMInput = require('./_observable')
, resolveTriggers = require('dbjs/_setup/utils/resolve-static-triggers')
, Input;
module.exports = Input = function (document, ns/*, options*/) {
DOMInput.... | 'use strict';
var sepItems = require('es5-ext/array/#/sep-items')
, d = require('d/d')
, memoize = require('memoizee/lib/primitive')
, DOMInput = require('./_observable')
, resolveProps = require('esniff/accessed-properties')('this')
, re = new RegExp('^\\s*function\\s*(?:[\\0-\'\\)-... | Update up to changes in dbjs | Update up to changes in dbjs
| JavaScript | mit | medikoo/dbjs-dom |
53ad668e0393db9f9aff42c86756a4dc8c5d21f4 | src/containers/search_bar.js | src/containers/search_bar.js | import React, { Component } from 'react';
export default class SearchBar extends Component {
render() {
return (
<form className='input-group'>
<input />
<span className='input-group-btn'>
<button type='submit' className='btn btn-secondary'>Submit</button>
</span>
</... | import React, { Component } from 'react';
export default class SearchBar extends Component {
constructor(props) {
super(props);
this.state = {term: ''}
this.onInputChange = this.onInputChange.bind(this);
}
onInputChange(event) {
this.setState({term: event.target.value});
}
onFormSubmit(eve... | Add Form submit handler to search bar | Add Form submit handler to search bar
| JavaScript | mit | StephanYu/modern_redux_weather_forecast,StephanYu/modern_redux_weather_forecast |
650881eeb7df87e5405fc964c17eea59f0d052af | public/javascripts/endless_scroll.js | public/javascripts/endless_scroll.js | var scroll_lock = false;
var last_page = false;
var current_page = 1;
function checkScroll()
{
if(!last_page && !scroll_lock && nearBottomOfPage())
{
scroll_lock = true;
current_page++;
var qs = $H(location.search.toQueryParams());
qs.each(function(pair)
{
qs.set(pair.key, pair.value.re... | var scroll_lock = false;
var last_page = false;
var current_page = 1;
function checkScroll()
{
if(!last_page && !scroll_lock && nearBottomOfPage())
{
scroll_lock = true;
current_page++;
var qs = $H(location.search.toQueryParams());
qs.each(function(pair)
{
qs.set(pair.key, pair.value.re... | Make lightwindow work after ajax load | Make lightwindow work after ajax load
| JavaScript | mit | bloopletech/mangar,bloopletech/pictures,bloopletech/mangar,bloopletech/pictures,bloopletech/mangar,bloopletech/mangar |
bee8d8033cd299ab8dea04168739bc09ee1bc17e | assets/javascript/controllers/chartsController.js | assets/javascript/controllers/chartsController.js | 'use strict';
var ChartsController = function($scope, $rootScope) {
$scope.drawChart = function() {
if ($scope.geoAggData && $scope.geoAggData.length > 0) {
console.log('$scope.geoAggData', $scope.geoAggData, 'length', $scope.geoAggData);
// instantiate d3plus
d3plus.viz()
.container('#... | 'use strict';
var ChartsController = function($scope, $rootScope) {
$scope.drawChart = function() {
if ($scope.geoAggData && $scope.geoAggData.length > 0) {
var length = $scope.geoAggData.length;
var height = 320;
var width = 370;
var margin = '-40px 10px 0px 0px';
if (length == 1)... | Reduce size of chart with query | Reduce size of chart with query
| JavaScript | apache-2.0 | gogeolbs/police-uk,gogeolbs/police-uk |
0739d7571aa85c9173486a4746579b660565c17e | assets/js/googlesitekit/widgets/util/constants.js | assets/js/googlesitekit/widgets/util/constants.js | /**
* Widgets layout constants.
*
* Site Kit by Google, Copyright 2021 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
... | /**
* Widgets layout constants.
*
* Site Kit by Google, Copyright 2021 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
... | Add RecoverableModules as special widget state. | Add RecoverableModules as special widget state.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
cc9217416427e9418c698ae61ff5366f148babc7 | src/stats/getChunkModules.js | src/stats/getChunkModules.js | /*
* @flow
*/
import type {RawStats, Module} from '../types/Stats';
import type {Child} from './getEntryHeirarchy';
import getModulesByChunk from './getModulesByChunk';
export default function getChunkModules(
stats: RawStats,
parentChunks: ?Array<Child>,
): ?Array<Module> {
if (!parentChunks) {
return ... | /*
* @flow
*/
import type {RawStats, Module} from '../types/Stats';
import type {Child} from './getEntryHeirarchy';
import getModulesByChunk from './getModulesByChunk';
export default function getChunkModules(
stats: RawStats,
parentChunks: ?Array<Child>,
): ?Array<Module> {
if (!parentChunks) {
return ... | Check for undefined when fetching a chunkWithModules by chunk.id | Check for undefined when fetching a chunkWithModules by chunk.id
| JavaScript | apache-2.0 | pinterest/bonsai,pinterest/bonsai,pinterest/bonsai |
71b03e948d5b28dd6f3b6fe5704682087e43d843 | scripts/webpack/webpack.dev.babel.js | scripts/webpack/webpack.dev.babel.js | /**
* In development we assume that the code generated is going to be consumed by
* webpack dev server and we are bundling into a single js file.
*/
import webpack from 'webpack';
import webpackConfigBase from './webpack.base.babel';
import HtmlWebpackPlugin from 'html-webpack-plugin';
const plugins = [
new Html... | /**
* In development we assume that the code generated is going to be consumed by
* webpack dev server and we are bundling into a single js file.
*/
import webpack from 'webpack';
import webpackConfigBase from './webpack.base.babel';
import HtmlWebpackPlugin from 'html-webpack-plugin';
const plugins = [
new Html... | Allow any host connection to local dev | feat(tooling): Allow any host connection to local dev
| JavaScript | mit | adamweeks/react-ciscospark-1,bzang/react-ciscospark,bzang/react-ciscospark,ciscospark/react-ciscospark,adamweeks/react-ciscospark-1,Altocloud/alto-react-ciscospark,ciscospark/react-ciscospark,ciscospark/react-ciscospark,bzang/react-ciscospark,adamweeks/react-ciscospark-1,Altocloud/alto-react-ciscospark,Altocloud/alto-r... |
7438f9092bff0b6098a27c67f8af33dee8e61d30 | public/js/views/sidebar_view.js | public/js/views/sidebar_view.js | chorus.views.Sidebar = chorus.views.Base.extend({
constructorName: "SidebarView",
preRender:function () {
this._super("preRender", arguments);
// We don't want to deal with having multiple declarations of `events`,
// so we unbind click in preRender and bind it in postRender.
$(... | chorus.views.Sidebar = chorus.views.Base.extend({
constructorName: "SidebarView",
preRender:function () {
this._super("preRender", arguments);
// We don't want to deal with having multiple declarations of `events`,
// so we unbind click in preRender and bind it in postRender.
$(... | Add data attr for sidebar template higher up in DOM | Add data attr for sidebar template higher up in DOM
| JavaScript | apache-2.0 | hewtest/chorus,hewtest/chorus,prakash-alpine/chorus,atul-alpine/chorus,jamesblunt/chorus,prakash-alpine/chorus,jamesblunt/chorus,atul-alpine/chorus,mpushpav/chorus,jamesblunt/chorus,atul-alpine/chorus,atul-alpine/chorus,mpushpav/chorus,atul-alpine/chorus,jamesblunt/chorus,mpushpav/chorus,hewtest/chorus,mpushpav/chorus,... |
6810534719c1d413d132c1bef1ec90d94db9f48e | lib/config/type/starts.js | lib/config/type/starts.js | 'use babel'
export default {
eslintrc: {
config: {
description: '.eslint',
icons: [ 'ESLint' ],
title: 'ESLint',
},
match: [ '.eslint' ],
},
git: {
config: {
description: '.git',
icons: [ 'Git', 'GitHub', 'GitHubAlt' ],
title: 'Git',
},
match: [ '.git' ... | 'use babel'
export default {
eslintrc: {
config: {
description: '.eslint',
icons: [ 'ESLint' ],
title: 'ESLint',
},
match: [ '.eslint' ],
},
git: {
config: {
description: '.git',
icons: [ 'Git', 'GitHub', 'GitHubAlt' ],
title: 'Git',
},
match: [ '.git' ... | Add icon for .npm files | Add icon for .npm files
Refs #1
| JavaScript | mit | wyze/atom-flexicons |
393c8b0632b71ed8f034f2f5bbc3e2d424eaf0e7 | src/components/BoardgameListItem/BoardgameListItem.js | src/components/BoardgameListItem/BoardgameListItem.js | import React, { Component, PropTypes } from 'react';
export default class BoardgameListItem extends Component {
static propTypes = {
name: PropTypes.string.isRequired,
year: PropTypes.string
}
render() {
const { name, year } = this.props;
return (
<div className="media">
<div class... | import React, { Component, PropTypes } from 'react';
export default class BoardgameListItem extends Component {
static propTypes = {
name: PropTypes.string.isRequired,
year: PropTypes.number,
thumbnail: PropTypes.string,
score: PropTypes.number
}
render() {
const { name, year, thumbnail, sco... | Update BoardgameListComponent to accept more input | Update BoardgameListComponent to accept more input
| JavaScript | mit | fuczak/pipsy |
bb75be39c8b74229f40d39c9a3c3ddf27dadc34e | shared/login/signup/success/index.js | shared/login/signup/success/index.js | /* @flow */
import React, {Component} from 'react'
import {connect} from 'react-redux'
import HiddenString from '../../../util/hidden-string'
import {sawPaperKey} from '../../../actions/signup'
import Render from './index.render'
class Success extends Component {
render () {
return (
<Render
titl... | /* @flow */
import React, {Component} from 'react'
import {connect} from 'react-redux'
import HiddenString from '../../../util/hidden-string'
import {sawPaperKey} from '../../../actions/signup'
import Render from './index.render'
class Success extends Component {
render () {
return (
<Render
titl... | Fix not waiting for paper key approval | Fix not waiting for paper key approval
| JavaScript | bsd-3-clause | keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client |
302e046fc864e88380efb390521bc1ed0dbe98d7 | lib/loaders/typescript.js | lib/loaders/typescript.js | 'use strict';
module.exports = isAngularProject => ({
test: /\.tsx?$/,
exclude: /(node_modules)/,
loaders: [...isAngularProject ? ['ng-annotate'] : [], 'ts'],
query: {
logInfoToStdOut: true
}
});
| 'use strict';
module.exports = isAngularProject => ({
test: /\.tsx?$/,
exclude: /(node_modules)/,
loaders: [...isAngularProject ? ['ng-annotate'] : [], 'ts']
});
| Revert Lod ts-loader info to stdout | Revert Lod ts-loader info to stdout | JavaScript | mit | kupriyanenko/wix-node-build,kupriyanenko/wix-node-build |
670b7abfd5edeea6359f4ff3f66adc0b91648e06 | rcmet/src/main/ui/config/karma.conf.js | rcmet/src/main/ui/config/karma.conf.js | basePath = '../';
files = [
JASMINE,
JASMINE_ADAPTER,
'app/js/jquery-1.9.1.min.js',
'app/js/bootstrap.js',
'app/lib/angular/angular.js',
'app/lib/angular/angular-*.js',
'test/lib/angular/angular-mocks.js',
'app/js/leaflet.js',
'app/js/**/*.js',
'test/unit/**/*.js'
];
autoWatch = true;
browsers = ... | basePath = '../';
files = [
JASMINE,
JASMINE_ADAPTER,
'app/lib/jquery/jquery-1.10.1.js',
'app/lib/jquery/jquery-ui/jquery-ui-1.10.3.min.js',
'app/lib/bootstrap/bootstrap.js',
'app/lib/angular/angular.js',
'app/lib/angular/angular-*.js',
'test/lib/angular/angular-mocks.js',
'app/lib/jquery/jquery-ui/d... | Resolve CLIMATE-112 - Unit tests don't run after refactoring | Resolve CLIMATE-112 - Unit tests don't run after refactoring
- The unit tests now run properly. That being said, they're still
outdated and useless. This will be addressed in a future issue.
git-svn-id: https://svn.apache.org/repos/asf/incubator/climate/trunk@1493995 13f79535-47bb-0310-9956-ffa450edef68
Former-com... | JavaScript | apache-2.0 | MBoustani/climate,kwhitehall/climate,apache/climate,lewismc/climate,pwcberry/climate,agoodm/climate,riverma/climate,huikyole/climate,MBoustani/climate,jarifibrahim/climate,huikyole/climate,jarifibrahim/climate,pwcberry/climate,kwhitehall/climate,apache/climate,kwhitehall/climate,riverma/climate,pwcberry/climate,agoodm/... |
8d0020a666b26cbc577a19d82d3ae16153602f6f | ui/EditInlineNodeCommand.js | ui/EditInlineNodeCommand.js | import Command from './Command'
class EditInlineNodeCommand extends Command {
constructor(...args) {
super(...args)
if (!this.config.nodeType) {
throw new Error('Every AnnotationCommand must have a nodeType')
}
}
getCommandState(params) {
let sel = params.selection
let newState = {
... | import Command from './Command'
class EditInlineNodeCommand extends Command {
constructor(...args) {
super(...args)
if (!this.config.nodeType) {
throw new Error('Every AnnotationCommand must have a nodeType')
}
}
getCommandState(params) {
let sel = params.selection
let newState = {
... | Use primitive command state for EditInlineCommand. | Use primitive command state for EditInlineCommand.
| JavaScript | mit | michael/substance-1,substance/substance,michael/substance-1,substance/substance |
27054c88376e37c69ef385346705f409adb5346b | source/assets/javascripts/enhance.js | source/assets/javascripts/enhance.js | import debug from 'debug';
const log = debug('app:enhance');
// ServiceWorker is a progressive technology. Ignore unsupported browsers
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then((registrations) => {
registrations.forEach(registration => registration.unregister());
});
... | import debug from 'debug'
const log = debug('app:enhance')
// ServiceWorker is a progressive technology. Ignore unsupported browsers
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then(registrations => {
registrations.forEach(registration => registration.unregister())
})
} else... | Change async form input type | Change async form input type
| JavaScript | mit | rossta/rossta.github.com,rossta/rossta.github.com,rossta/rossta.github.com |
4194e00f48567d7f4928e6d645ed2382791fad73 | bin/extension.js | bin/extension.js | const fs = require('fs');
const path = require('path');
const filePath = path.join(__dirname, '../dist/devpanel.tmpl.html');
const distPath = path.join(__dirname, '../dist/devpanel.html');
const startRemoteDev = require('remotedev-server');
const html = fs.readFileSync(filePath, 'utf-8');
module.exports = function(ar... | const fs = require('fs');
const path = require('path');
const filePath = path.join(__dirname, '../dist/devpanel.tmpl.html');
const distPath = path.join(__dirname, '../dist/devpanel.html');
const startRemoteDev = require('remotedev-server');
const html = fs.readFileSync(filePath, 'utf-8');
module.exports = argv => {
... | Apply runserver option will return socketcluster server | Apply runserver option will return socketcluster server
| JavaScript | mit | jhen0409/remotedev-extension,jhen0409/remotedev-extension |
97f57d91c2ee46e31dafe33eb4955261bb68fce3 | bin/pure-cjs.js | bin/pure-cjs.js | #!/usr/bin/env node
var program = require('commander'),
cjs = require(__dirname + '/../lib/');
program
.version(require(__dirname + '/../package.json').version)
.option('-i, --input <file>', 'input file (required)')
.option('-o, --output <file>', 'output file (defaults to <input>.out.js)')
.option('-x, --extensi... | #!/usr/bin/env node
var program = require('commander'),
cjs = require(__dirname + '/../lib/');
program
.version(require(__dirname + '/../package.json').version)
.option('-i, --input <file>', 'input file (required)')
.option('-o, --output <file>', 'output file (defaults to <input>.out.js)')
.option('-x, --extensi... | Fix support for specifying module-dir | Fix support for specifying module-dir
| JavaScript | mit | RReverser/pure-cjs |
6db20c4e950083fc9a91027f5d01e87b86d0a607 | test/app.js | test/app.js | var path = require('path'),
assert = require('yeoman-generator').assert,
helpers = require('yeoman-generator').test,
os = require('os');
describe('sails-rest-api:app', function () {
before(function (done) {
helpers.run(path.join(__dirname, '../app'))
.inDir(path.join(os.tmpdir(), '.... | var path = require('path'),
assert = require('yeoman-generator').assert,
helpers = require('yeoman-generator').test,
os = require('os');
describe('sails-rest-api:app', function () {
before(function (done) {
helpers.run(path.join(__dirname, '../app'))
.inDir(path.join(os.tmpdir(), '.... | Add todo in generator tests | Add todo in generator tests
| JavaScript | mit | ghaiklor/generator-sails-rest-api,italoag/generator-sails-rest-api,eithewliter5518/generator-sails-rest-api,mhipo1364/generator-sails-rest-api,jaumard/generator-trails,italoag/generator-sails-rest-api,synergycns/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,konstantinzolotarev/generator-trails,tnunes/gener... |
80bb4337e39162c72ad6bbd00493d24dc9381588 | script/lib/dependencies-fingerprint.js | script/lib/dependencies-fingerprint.js | const crypto = require('crypto')
const fs = require('fs')
const path = require('path')
const CONFIG = require('../config')
const FINGERPRINT_PATH = path.join(CONFIG.repositoryRootPath, 'node_modules', '.dependencies-fingerprint')
module.exports = {
write: function () {
const fingerprint = this.compute()
fs.... | const crypto = require('crypto')
const fs = require('fs')
const path = require('path')
const CONFIG = require('../config')
const FINGERPRINT_PATH = path.join(CONFIG.repositoryRootPath, 'node_modules', '.dependencies-fingerprint')
module.exports = {
write: function () {
const fingerprint = this.compute()
fs.... | Include arch in dependency cache key | Include arch in dependency cache key
| JavaScript | mit | liuderchi/atom,me-benni/atom,sotayamashita/atom,stinsonga/atom,liuderchi/atom,stinsonga/atom,bsmr-x-script/atom,t9md/atom,andrewleverette/atom,atom/atom,bsmr-x-script/atom,Mokolea/atom,brettle/atom,brettle/atom,Mokolea/atom,bsmr-x-script/atom,decaffeinate-examples/atom,PKRoma/atom,AdrianVovk/substance-ide,xream/atom,ke... |
91ece4ef4118eb2dc9dee0986bc046b73b86636e | server/auth/hawk/hawkAuth.js | server/auth/hawk/hawkAuth.js | /**
* Created by Omnius on 6/15/16.
*/
'use strict';
const Boom = require('boom');
exports.register = (server, options, next) => {
server.auth.strategy('hawk-login-auth-strategy', 'hawk', {
getCredentialsFunc: (sessionId, callback) => {
const redis = server.app.redis;
const met... | /**
* Created by Omnius on 6/15/16.
*/
'use strict';
const Boom = require('boom');
exports.register = (server, options, next) => {
server.auth.strategy('hawk-login-auth-strategy', 'hawk', {
getCredentialsFunc: (sessionId, callback) => {
const redis = server.app.redis;
const met... | Change to empty port in hapi-auth-hawk | Change to empty port in hapi-auth-hawk
| JavaScript | mit | identityclash/hapi-login-test,identityclash/hapi-login-test |
8667d03442552cc21eff51529d8d9860f3428ee8 | server/import/server_sync.js | server/import/server_sync.js | var Event = require('../models/Event.js');
exports.sync = function(events) {
events.map(function(evt) {
var query = {
'title': evt.title,
'startAt': evt.startAt
};
Event.findOne(
query,
function(err, doc) {
if(!doc){
... | var Event = require('../models/Event.js');
var Venue = require('../models/Venue.js');
exports.sync = function(events) {
events.map(function(evt) {
var eventquery = {
'title': evt.title,
'startAt': evt.startAt
};
Event.findOne(
eventquery,
func... | Add support for getting venues from scripts | Add support for getting venues from scripts
| JavaScript | apache-2.0 | Studentmediene/Barteguiden,Studentmediene/Barteguiden |
9cd1761826af0028568223343a58c34663c6c104 | main.js | main.js | const electron = require('electron')
const app = electron.app // Module to control application life.
const BrowserWindow = electron.BrowserWindow // Module to create native browser window.
let mainWindow
function createWindow () {
// Create the browser window.
mainWindow = new BrowserWindow({
width: 800,
... | const electron = require('electron')
const app = electron.app // Module to control application life.
const BrowserWindow = electron.BrowserWindow // Module to create native browser window.
let mainWindow
function createWindow () {
// Create the browser window.
mainWindow = new BrowserWindow({
width: 800,
... | Stop opening devtools on launch | Stop opening devtools on launch
| JavaScript | agpl-3.0 | briandk/transcriptase,briandk/transcriptase |
b560a5710ca240a499c1bcfaf643dfab458fe59c | server/routes/subscribers.js | server/routes/subscribers.js | var Joi = require("joi");
var DB = require("../db");
exports.list = {
handler: function(request, reply) {
DB.smembers("subscribers", function(err, members) {
reply({
subscribers: members
});
})
}
};
exports.add = {
validate: {
payload: {
email: Joi.string().email()
}
... | var Joi = require("joi");
var DB = require("../db");
var Hapi = require("hapi");
var Util = require("util");
exports.list = {
handler: function(request, reply) {
DB.smembers("subscribers", function(err, members) {
reply({
subscribers: members
});
})
}
};
exports.add = {
validate: {
... | Handle errors trying to add email for subscriber action. | Handle errors trying to add email for subscriber action.
- Add callback for sadd to check for error.
- Return a 500 error to client.
- Log to stderr when there is an issue.
| JavaScript | mit | borwahs/natalieandrob.com,borwahs/natalieandrob.com |
f4fd4985c77b5f24fc0e3db757376fd67a38c579 | main.js | main.js | if(!(/Android|iPhone|iPad|iPod|BlackBerry|Windows Phone/i).test(navigator.userAgent || navigator.vendor || window.opera)){
skrollr.init({
forceHeight: false,
smoothScrolling: false
});
}
$(function(){
var windowH = $(window).height();
$(window).on('resize', function(){
windowH = $(windo... | if(!(/Android|iPhone|iPad|iPod|BlackBerry|Windows Phone/i).test(navigator.userAgent || navigator.vendor || window.opera)){
skrollr.init({
forceHeight: false,
smoothScrolling: false
});
}
$(function(){
var windowH = $(window).height() - 60;
$(window).on('resize', function(){
windowH = $(... | Fix scroll transition for navbar | Fix scroll transition for navbar
| JavaScript | agpl-3.0 | BoilerCamp/site-F15,BoilerCamp/site-F15 |
d30cb455eb066c5711b903b682f00dd752bedaf7 | main.js | main.js | const accounts = {};
$('#go').click(function () {
const networkId = $('#networkId').val();
const accessToken = $('#accessToken').val();
const filter = '!0S2A5ipm(pczxWJLGNzYzyy4l';
const key = 'c8aSGAR0rp5RUK)dVriyCA((';
$.getJSON(`http://api.stackexchange.com/2.2/users/${networkId}/associated`, function (j... | function getPosts(user, site, page, cb) {
const accessToken = $('#accessToken').val();
const filter = '!0S2A5ipm(pczxWJLGNzYzyy4l';
const key = 'c8aSGAR0rp5RUK)dVriyCA((';
$.getJSON(`https://api.stackexchange.com/2.2/users/${user}/posts?filter=${filter}&key=${key}&access_token=${accessToken}&site=${site}&page=... | Use more modern JS; Add pagination to SE API calls | Use more modern JS; Add pagination to SE API calls
| JavaScript | mit | shu8/SE-PostUrlDump,shu8/SE-PostUrlDump |
359b2349389e48bac826c37594ef13ae9eba0c64 | app.js | app.js | var express = require('express');
var mysql = require('mysql');
var app = express();
app.use(express.static('public'));
var connection = mysql.createConnection({
host : process.env.MYSQL_HOST,
user : process.env.MYSQL_USER,
password : process.env.MYSQL_PASS,
database : process.env.MYSQL_DB
});
connec... | var express = require('express');
var mysql = require('mysql');
var app = express();
app.use(express.static('public'));
var connection = mysql.createConnection({
host : process.env.MYSQL_HOST ||,
user : process.env.MYSQL_USER ||,
password : process.env.MYSQL_PASS ||,
database : process.env.MYSQL_DB ||... | Correct code to match db scheme | Correct code to match db scheme
| JavaScript | mit | ProjectMOA/noTeRayesCo,ProjectMOA/noTeRayesCo |
074e9ebddbd392ee68c117c1d69fdecb7730dddb | src/DataTable/utils/convertSchema.js | src/DataTable/utils/convertSchema.js | import { startCase } from "lodash";
export default schema => {
let schemaToUse = schema;
if (!schemaToUse.fields && Array.isArray(schema)) {
schemaToUse = {
fields: schema
};
}
schemaToUse = {
...schemaToUse
};
schemaToUse.fields = schemaToUse.fields.map((field, i) => {
let fieldToUse... | import { startCase } from "lodash";
export default schema => {
let schemaToUse = schema;
if (!schemaToUse.fields && Array.isArray(schema)) {
schemaToUse = {
fields: schema
};
}
schemaToUse = {
...schemaToUse
};
schemaToUse.fields = schemaToUse.fields.map((field, i) => {
let fieldToUse... | Disable filtering and sorting if not providing path | Disable filtering and sorting if not providing path
| JavaScript | mit | TeselaGen/teselagen-react-components,TeselaGen/teselagen-react-components |
eb6c818767f671f02732267d7493c36749d5edf4 | config/models.js | config/models.js | /**
* Default model configuration
* (sails.config.models)
*
* Unless you override them, the following properties will be included
* in each of your models.
*
* For more info on Sails models, see:
* http://sailsjs.org/#!/documentation/concepts/ORM
*/
module.exports.models = {
/******************************... | /**
* Default model configuration
* (sails.config.models)
*
* Unless you override them, the following properties will be included
* in each of your models.
*
* For more info on Sails models, see:
* http://sailsjs.org/#!/documentation/concepts/ORM
*/
module.exports.models = {
/******************************... | Create missing tables when lifting sails | Create missing tables when lifting sails
| JavaScript | mit | joschaefer/online-shop-api |
eba8df01c6ed74e1be4a1e03bf1160b1c8a2bcd3 | apps/storage/main.js | apps/storage/main.js | var handleRequest = loadModule('helma.simpleweb').handleRequest;
var render = loadModule('helma.skin').render;
var webapp = loadModule('helma.webapp');
// db model
var model = loadModule('model');
// the main action is invoked for http://localhost:8080/
// this also shows simple skin rendering
function main_action() ... | var webapp = loadModule('helma.webapp');
var handleRequest = loadModule('helma.webapp.handler').handleRequest;
// db model
var model = loadModule('model');
// the main action is invoked for http://localhost:8080/
// this also shows simple skin rendering
function main_action(req, res) {
if (req.data.save) {
... | Update to new webapp and skin rendering (I like it better than before!) | Update to new webapp and skin rendering (I like it better than before!)
git-svn-id: fac99be8204c57f0935f741ea919b5bf0077cdf6@9248 688a9155-6ab5-4160-a077-9df41f55a9e9
| JavaScript | apache-2.0 | ringo/ringojs,ringo/ringojs,ringo/ringojs,oberhamsi/ringojs,Transcordia/ringojs,oberhamsi/ringojs,Transcordia/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs |
350cf06afe2d841fa309bf60155cb831235ae757 | landing/utils/auth/login/login.controller.js | landing/utils/auth/login/login.controller.js | (() => {
'use strict';
angular
.module('app')
.controller('LoginController', LoginController);
LoginController.$inject = ['growl', '$window', '$http', '$routeSegment', 'TokenService', 'Endpoints'];
function LoginController(growl, $window, $http, $routeSegment, TokenService, Endpoints)... | (() => {
'use strict';
angular
.module('app')
.controller('LoginController', LoginController);
LoginController.$inject = ['growl', '$window', '$http', '$routeSegment', 'TokenService', 'Endpoints', '$localStorage'];
function LoginController(growl, $window, $http, $routeSegment, TokenSe... | Add simple test for token on landig with redirect on app | Add simple test for token on landig with redirect on app
| JavaScript | mit | royalrangers-ck/rr-web-app,royalrangers-ck/rr-web-app,royalrangers-ck/rr-web-app,royalrangers-ck/rr-web-app |
acc5692d93fb34fcb134165e966f0e18ab9d436b | lumify-web-war/src/main/webapp/js/service/config.js | lumify-web-war/src/main/webapp/js/service/config.js | define([
'service/serviceBase'
], function(ServiceBase) {
'use strict';
// Override in configuration.properties with `web.ui` prefix
var DEFAULTS = {
'vertex.loadRelatedMaxBeforePrompt': 50,
'vertex.loadRelatedMaxForceSearch': 250,
'ontology.iri.artifactHasEntity': 'http://lumif... | define([
'service/serviceBase'
], function(ServiceBase) {
'use strict';
// Override in configuration.properties with `web.ui` prefix
var DEFAULTS = {
'vertex.loadRelatedMaxBeforePrompt': 50,
'vertex.loadRelatedMaxForceSearch': 250,
'ontology.iri.artifactHasEntity': 'http://lumif... | Use service base get method | Use service base get method
| JavaScript | apache-2.0 | lumifyio/lumify,RavenB/lumify,bings/lumify,RavenB/lumify,dvdnglnd/lumify,dvdnglnd/lumify,Steimel/lumify,Steimel/lumify,lumifyio/lumify,Steimel/lumify,RavenB/lumify,RavenB/lumify,dvdnglnd/lumify,TeamUDS/lumify,bings/lumify,j-bernardo/lumify,bings/lumify,Steimel/lumify,j-bernardo/lumify,RavenB/lumify,lumifyio/lumify,bing... |
99bdf00e945acc12c110fe2cd1fa941907153b54 | website/app/index/navbar.js | website/app/index/navbar.js | Application.Directives.directive("navbar", navbarDirective);
function navbarDirective() {
return {
scope: true,
restrict: "AE",
replace: true,
templateUrl: "index/navbar.html",
controller: "navbarDirectiveController"
};
}
Application.Controllers.controller("navbarDirect... | Application.Directives.directive("navbar", navbarDirective);
function navbarDirective() {
return {
scope: true,
restrict: "AE",
replace: true,
templateUrl: "index/navbar.html",
controller: "navbarDirectiveController"
};
}
Application.Controllers.controller("navbarDirect... | Fix New menu to work with state. | Fix New menu to work with state.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
759c0af7d313740b52da4e0fedf200b542e5b905 | bin/iterm-colors.js | bin/iterm-colors.js | #!/usr/bin/env node
// Requires
var _ = require('underscore');
var fs = require('fs');
// Comannder
var prog = require('commander');
// etcd-dump's package.json file
var pkg = require('../package.json');
// Dumper class
var parser = require('../');
// General options
prog
.version(pkg.version);
// Parse and fall... | #!/usr/bin/env node
// Requires
var _ = require('underscore');
var fs = require('fs');
var path = require('path');
// Comannder
var prog = require('commander');
// etcd-dump's package.json file
var pkg = require('../package.json');
// Dumper class
var parser = require('../');
// General options
prog
.version(pkg.... | Add bundle and compile commands to binary | Add bundle and compile commands to binary
| JavaScript | apache-2.0 | AaronO/iterm-colors,AaronO/iterm-colors |
6fe802feb9386289c62f13f1aef64bd5d5d866ad | test.js | test.js | var isArray = require('./');
var test = require('tape');
test('is array', function(t){
t.ok(isArray([]));
t.notOk(isArray({}));
t.notOk(isArray(null));
t.notOk(isArray(false));
t.notOk(isArray(""));
var obj = {};
obj[0] = true;
t.notOk(isArray(obj));
var arr = [];
arr.foo = 'bar';
t.ok(isArray(... | var isArray = require('./');
var test = require('tape');
var nativeIsArray = Array.isArray;
test('is array (only polyfill)', function(t){
delete Array.isArray;
t.ok(isArray([]));
t.notOk(isArray({}));
t.notOk(isArray(null));
t.notOk(isArray(false));
t.notOk(isArray(""));
var obj = {};
obj[0] = true;
... | Test the package with explicitly removed Array.isArray | Test the package with explicitly removed Array.isArray
try at making #3 mergeable | JavaScript | mit | juliangruber/isarray |
b630c298f89b51bd8319f9452548ab811232cdd3 | src/js/vendor/jquery.onfontresize.js | src/js/vendor/jquery.onfontresize.js | 'use strict';
(function($, window, document, undefined) {
$.onFontResize = {
delay: 250,
timer: null,
on: true,
box: null,
boxHeight: 0,
init: function() {
this.box = document.createElement('DIV');
$(this.box).html('Détection du zoom').css({
... | 'use strict';
(function($, window, document, undefined) {
$.onFontResize = {
delay: 250,
timer: null,
on: true,
box: null,
boxHeight: 0,
init: function() {
this.box = document.createElement('DIV');
$(this.box).html('Détection du zoom').css({
... | Add aria-hidden to zoom detection div | Add aria-hidden to zoom detection div | JavaScript | agpl-3.0 | libeo-vtt/vtt,libeo-vtt/vtt |
9bd3040d14d5be10b9d32d017fb93b6ee31b5af1 | build/connect.js | build/connect.js | const rewrite = require('connect-modrewrite');
const serveIndex = require('serve-index');
const serveStatic = require('serve-static');
module.exports = function (grunt) {
return {
livereload: {
options: {
hostname : '127.0.0.1',
port : 443,
... | const rewrite = require('connect-modrewrite');
const serveIndex = require('serve-index');
const serveStatic = require('serve-static');
module.exports = function (grunt) {
return {
livereload: {
options: {
hostname : '127.0.0.1',
port : 443,
... | Handle 404 on local server | Handle 404 on local server
| JavaScript | apache-2.0 | 4p00rv/binary-static,negar-binary/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,ashkanx/binary-static,raunakkathuria/binary-static,negar-binary/binary-static,binary-com/binary-static,4p00rv/binary-static,raunakkathuria/binary-static,kellybinary/binary-static,binary-co... |
17d1f4b4fed07f5a0025041d68e9bfaf661aa495 | locales/en_US/company.js | locales/en_US/company.js | module.exports = {
whoshiring: {
title: "Who's Hiring?",
subtitle: "These companies are looking for JavaScript and Node.js developers",
addCompany: "To add your company to this list, email <a href='mailto:whoshiring@npmjs.org'>whoshiring@npmjs.org</a> for pricing options."
}
}
| module.exports = {
whoshiring: {
title: "Who's Hiring?",
subtitle: "These companies are looking for JavaScript and Node.js developers",
addCompany: "To add your company to this list, email <a href='mailto:whoshiring@npmjs.com'>whoshiring@npmjs.com</a> for pricing options."
}
}
| Update whoshiring email address to .com | Update whoshiring email address to .com | JavaScript | isc | kemitchell/newww,DanielBarnes/newww,marcellodesales/newww,AgtLucas/newww,tiandavis/newww,Constructor-io/newww,jonathanmarvens/npm-newww,AgtLucas/newww,rutaihwa/newww,rutaihwa/newww,Constructor-io/newww,imshivs/newww,nexdrew/newww,nexdrew/newww,whitneyit/newww,ChALkeR/newww,psalaets/newww,jonathanmarvens/npm-newww,zeusd... |
1b076fbce5ef391fcbbe813c7cde0906cc3278fd | src/Input/LevelController.js | src/Input/LevelController.js | function LevelController(onComplete, level) {
this.onComplete = onComplete;
this.level = level;
};
LevelController.prototype.left = function() {
if( this.index === 0 ) {
return;
}
this.level.index -= 1;
};
LevelController.prototype.right = function() {
if(this.index === this.level.puzzle.board.columns... | function LevelController(onComplete, level) {
this.onComplete = onComplete;
this.level = level;
};
LevelController.prototype.left = function() {
if(this.level.index === 0) {
return;
}
this.level.index -= 1;
};
LevelController.prototype.right = function() {
if(this.level.index === this.level.puzzle.boa... | Fix number going outside of level issue | Fix number going outside of level issue
| JavaScript | mit | mnito/factors-game,mnito/factors-game |
af9ed6b7826b218d353b216517294f98549d5e0f | lib/themes/dosomething/paraneue_dosomething/tasks/options/copy.js | lib/themes/dosomething/paraneue_dosomething/tasks/options/copy.js | module.exports = {
assets: {
files: [
{expand: true, src: ["images/**"], dest: "dist/"},
{expand: true, src: ["bower_components/**"], dest: "dist/"},
]
}
}
| module.exports = {
assets: {
files: [
{expand: true, src: ["images/**"], dest: "dist/"},
{expand: true, src: ["bower_components/**"], dest: "dist/"},
]
},
source: {
files: [
{expand: true, src: ["scss/**"], dest: "dist/"},
{expand: true, src: ["js/**"], dest: "dist/"},
]
... | Copy assets into dist build so they can be used for source maps. | Copy assets into dist build so they can be used for source maps.
| JavaScript | mit | chloealee/dosomething,jonuy/dosomething,DoSomething/dosomething,chloealee/dosomething,sergii-tkachenko/phoenix,chloealee/dosomething,angaither/dosomething,deadlybutter/phoenix,DoSomething/phoenix,jonuy/dosomething,DoSomething/phoenix,chloealee/dosomething,jonuy/dosomething,angaither/dosomething,sergii-tkachenko/phoenix... |
9b7b848544f84c19169098e503ae0f4779887d7d | src/reducers/initialState.js | src/reducers/initialState.js | export default {
oauths: {
oauthReturnedTempCode: "",
oauthReturnedToken: "",
authenticatedUser: {}
},
commitStatuses: [],
repos: null
};
| export default {
oauths: {
oauthReturnedTempCode: "",
oauthReturnedToken: "",
authenticatedUser: {}
},
commitStatuses: null,
repos: null
};
| Modify initial state for commitStatuses to be 'null' | Modify initial state for commitStatuses to be 'null'
| JavaScript | mit | compumike08/GitHub_Status_API_GUI,compumike08/GitHub_Status_API_GUI |
2f07ce896e1d3d8d20ddd627c10b3e42ba0bac1a | src/actions/startup/win32.js | src/actions/startup/win32.js | let fs = require('fs')
let mkdirp = require('mkdirp')
let untildify = require('untildify')
let spawn = require('./spawn')
let dir = untildify('~\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup')
export function getFile (name) {
return `${dir}\\${name}.vbs`
}
export function create (name, cmd, ... | let fs = require('fs')
let cp = require('child_process')
let mkdirp = require('mkdirp')
let untildify = require('untildify')
let dir = untildify('~\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup')
export function getFile (name) {
return `${dir}\\${name}.vbs`
}
export function create (name, cm... | Fix hotel start on Windows | Fix hotel start on Windows
| JavaScript | mit | typicode/hotel,jhliberty/hotel,typicode/hotel,jhliberty/hotel,typicode/hotel |
cca155e68433c146291343511d32e2002d7ef72b | js/app.js | js/app.js | (function (root, $) {
var $button = $('button.nav'),
$nav = $('.side ul');
$('.js').show();
$('.no-js').hide();
$button.on('click', function () {
$nav.slideToggle();
});
}(window, jQuery));
| (function (root, $) {
var $button = $('button.nav'),
$nav = $('.side ul');
$('.js-mobile').show();
$('.no-js-mobile').hide();
$button.on('click', function () {
$nav.slideToggle();
});
}(window, jQuery));
| Switch JS to use mobile class for hiding | Switch JS to use mobile class for hiding
| JavaScript | mit | jdavis/jdavis.github.com,jdavis/jdavis.github.com,jdavis/jdavis.github.com |
ec978cd0dd5da0019ce646a0654f072fbfe95d24 | wct.conf.js | wct.conf.js | var args = require('yargs').argv;
module.exports = {
extraScripts: args.dom === 'shadow' ? ['test/enable-shadow-dom.js'] : [],
registerHooks: function(context) {
// The Good
var crossPlatforms = [
'Windows 10/chrome@55',
'Windows 10/firefox@50'
];
// The Bad
var otherPlatforms = [
... | var args = require('yargs').argv;
module.exports = {
extraScripts: args.dom === 'shadow' ? ['test/enable-shadow-dom.js'] : [],
registerHooks: function(context) {
// The Good
var crossPlatforms = [
'Windows 10/chrome@55',
'Windows 10/firefox@50'
];
// The Bad
var otherPlatforms = [
... | Remove Linux/android@5.1 from automated tests | Remove Linux/android@5.1 from automated tests | JavaScript | apache-2.0 | vaadin/vaadin-combo-box,vaadin/vaadin-combo-box |
c1fa71a64f4a14bb918c3e21aee32877f917f138 | namuhub/static/namuhub.js | namuhub/static/namuhub.js | var SearchBox = React.createClass({
getInitialState: function() {
return {
user: this.props.user
};
},
render: function() {
return (
<form className="ui">
<div className="ui action center aligned input">
<input type="text" ... | var ContribBox = React.createClass({
render: function() {
return <div />;
}
});
var SearchBox = React.createClass({
getInitialState: function () {
console.log(this.props);
return {
user: this.props.user || ''
};
},
submit: function(e) {
var uri =... | Add form submit event that replaces current page's uri | Add form submit event that replaces current page's uri
| JavaScript | apache-2.0 | ssut/namuhub,ssut/namuhub,ssut/namuhub |
bdb66b3483aaaffefa61eaa1a52c886a08dc28ef | Gruntfile.js | Gruntfile.js | /* eslint-disable camelcase, global-require */
'use strict';
module.exports = function(grunt) {
require('jit-grunt')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jsonlint: {
all: ['*.json'],
},
eslint: {
all: {
src: ['*.js', 'test/*.js'],
igno... | /* eslint-disable camelcase, global-require */
'use strict';
module.exports = function(grunt) {
require('jit-grunt')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jsonlint: {
all: ['*.json'],
},
eslint: {
all: {
src: '**/*.js',
ignore: '**/node... | Update glob for files to lint with ESLint | grunt: Update glob for files to lint with ESLint
Now linting .js files in benchmark/
| JavaScript | mit | woollybogger/string-natural-compare,nwoltman/string-natural-compare |
b1cd0b8560f5a64e806d6ae7bdc0d1c5f278b5dd | config/index.js | config/index.js | // see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPat... | // see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsPublicPath: '/',
productionSourceMap: true,
// Gzip off by default as many popular static hos... | Remove static folder from configs | :fire: Remove static folder from configs
| JavaScript | mit | kimuraz/vue-rest |
e5467aed56658fc1e929226f3f8015efae213e59 | src/scripts/app/cms/concepts/directives/conceptForm.controller.js | src/scripts/app/cms/concepts/directives/conceptForm.controller.js | 'use strict';
module.exports =
/*
* This directive expects concept and processConceptForm
* to be set in scope.
*/
/*@ngInject*/
function ConceptsFormCtrl (
$scope, _, ConceptService
) {
if (_.isUndefined($scope.concept) || !_.isObject($scope.concept)) {
throw new Error('Please define concept obje... | 'use strict';
module.exports =
/*
* This directive expects concept and processConceptForm
* to be set in scope.
*/
/*@ngInject*/
function ConceptsFormCtrl (
$scope, _, ConceptService, StandardService,
StandardLevelService
) {
if (_.isUndefined($scope.concept) || !_.isObject($scope.concept)) {
th... | Add standards and standard levels to concepts create | Add standards and standard levels to concepts create
| JavaScript | agpl-3.0 | ddmck/Quill-Grammar,ddmck/Quill-Grammar,empirical-org/Quill-Grammar,empirical-org/Quill-Grammar,ddmck/Quill-Grammar,empirical-org/Quill-Grammar |
6b14d5f10c1550c43530484a73508ea87691d47e | src/dicebluff-client/app/main.js | src/dicebluff-client/app/main.js | ;(function(windowReference, documentReference) {
'use strict';
//
})(window, document);
| ;(function(windowReference, documentReference) {
'use strict';
var consoleNode = documentReference.querySelector('.console'),
console = new Console(consoleNode, 72, 18, (18 * 10)),
localPlayer = new LocalPlayer(console);
localPlayer.evaluateClaim(40, [ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4... | Add testing code for the local player evaluation method | Add testing code for the local player evaluation method
| JavaScript | mit | doubtingreality/dicebluff,doubtingreality/dicebluff |
5d09ecba94778245f2f59514786c58fbf4e406e1 | client/hubub.js | client/hubub.js | // HubBub client code
// From: https://github.com/almost/hubbub/
(function () {
// Just a very rough demo, needs a lot more work
var form = document.querySelector('form[data-hubbub]');
form.addEventListener('submit', function (evt) {
evt.preventDefault();
var comment = form.querySelector('[name=comment]... | // HubBub client code
// From: https://github.com/almost/hubbub/
(function () {
// Just a very rough demo, needs a lot more work
var form = document.querySelector('form[data-hubbub]');
form.addEventListener('submit', function (evt) {
evt.preventDefault();
var comment = form.querySelector('[name=comment]... | Add comment to special pendingcomments bit after its sent | Add comment to special pendingcomments bit after its sent
| JavaScript | mit | milessabin/hubbub,almost/hubbub |
a67b9d72030639923820c9a74636e360d27fe778 | .eslintrc.js | .eslintrc.js | module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
]... | module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
]... | Update eslint globals to include mocha functions | Update eslint globals to include mocha functions
| JavaScript | mit | albertyw/base-flask,albertyw/base-flask,albertyw/base-flask,albertyw/base-flask |
6e277b764fffcdbe17867409e6b3efded6e94662 | src/workers/ingress/index.js | src/workers/ingress/index.js | import BaseWorker from '../base'
import utils from 'async'
import uuid from 'uuid'
import redis from 'redis'
export class IngressWorker extends BaseWorker {
constructor (rsmq) {
super('ingress', rsmq)
this.rsmq = rsmq
this.redisClient = redis.createClient({
host: 'redis'
})
}
store (sessi... | import BaseWorker from '../base'
import redis from 'redis'
export class IngressWorker extends BaseWorker {
constructor (rsmq) {
super('ingress', rsmq)
this.rsmq = rsmq
this.redisClient = redis.createClient({
host: 'redis'
})
}
store (session, body) {
return new Promise((resolve, rejec... | Update ingress to use new async render | Update ingress to use new async render
| JavaScript | mit | craftship/phonebox,craftship/phonebox,craftship/phonebox |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.