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 |
|---|---|---|---|---|---|---|---|---|---|
a2a86fb46d2d170675dbab2145835871933bad01 | common/models/user.js | common/models/user.js | 'use strict';
module.exports = function(User) {
if (process.env.NODE_ENV !== 'testing') {
User.afterRemote('create', async (context, user) => {
const options = {
type: 'email',
protocol: process.env.PROTOCOL || 'http',
port: process.env.DISPLAY_PORT || 3000,
host: process.en... | 'use strict';
class StubMailer {
static send(options, context, cb) {
cb(null, null);
}
}
module.exports = function(User) {
User.afterRemote('create', async (context, user) => {
let options = null;
if (process.env.NODE_ENV === 'testing') {
options = {
type: 'email',
from: 'test... | Use fake mailer on tests | :sparkes: Use fake mailer on tests
| JavaScript | agpl-3.0 | redBorder/license-manager-api |
18c04888ea69acaa86bf43246a1aa135c50c03df | app/utils/query-converter.js | app/utils/query-converter.js | /* global URI */
/**
* QueryConverter stores a list of string to string pairs
* as a hash (Embereño for POJO) and can export that list as a JSON string,
* a URL query string, or a hash.
* We will use the JSON string representation as an ID for Ember Data.
* To ensure a 1-1 mapping from queries to IDs,
* ID repre... | /* global URI */
/**
* QueryConverter stores a list of string to string pairs
* as a hash (Embereño for POJO) and can export that list as a JSON string,
* a URL query string, or a hash.
* We will use the JSON string representation as an ID for Ember Data.
* To ensure a 1-1 mapping from queries to IDs,
* ID repre... | Allow method chaining in QueryConverter | Allow method chaining in QueryConverter
| JavaScript | mit | UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer |
5554134cd1b7f4170a8f100672969ed856a3a929 | src/sprites/Common/index.js | src/sprites/Common/index.js | import Phaser from 'phaser';
import { tile, nextTile, alignToGrid, pixelToTile } from '../../tiles';
import { clone } from '../../utils';
import objectPool from '../../object-pool';
import tween from './tween';
export default class extends Phaser.Image {
constructor(game, x, y, sprite, frame, id, objectType) {
... | import Phaser from 'phaser';
import { tile, nextTile, alignToGrid, pixelToTile } from '../../tiles';
import { clone } from '../../utils';
import objectPool from '../../object-pool';
import tween from './tween';
export default class extends Phaser.Image {
constructor(game, x, y, sprite, frame, id, objectType) {
... | Reset destroyed flag on reset | Reset destroyed flag on reset
| JavaScript | mit | ThomasMays/incremental-forest,ThomasMays/incremental-forest |
f0c283b2c50c8bc43798efa188feef58c61f0415 | src/store/configureStore.js | src/store/configureStore.js | import {createStore, applyMiddleware, compose} from 'redux';
import { routerMiddleware } from 'react-router-redux';
import throttle from 'lodash/throttle';
import recipes from './data/recipes';
import { loadState, saveState } from './localStorage';
import rootReducer from './reducers';
const devtools = window.devTools... | import {createStore, applyMiddleware, compose} from 'redux';
import { routerMiddleware } from 'react-router-redux';
import throttle from 'lodash/throttle';
import recipes from './data/recipes';
import { loadState, saveState } from './localStorage';
import rootReducer from './reducers';
const devtools = window.devTools... | Fix issue when redux dev tool extension is not available | Fix issue when redux dev tool extension is not available
| JavaScript | mit | blitze/fcc-react-recipebox,blitze/fcc-react-recipebox |
a896071d4c282a23662e6aa3cfcaaf4a69cb901a | test/tzset.js | test/tzset.js | var should = require('should')
, time = require('../')
describe('tzset()', function () {
beforeEach(function () {
process.env.TZ = 'UTC'
})
it('should work with no arguments', function () {
process.env.TZ = 'US/Pacific'
time.tzset()
time.currentTimezone.should.equal('US/Pacific')
})
it('... | var should = require('should')
, time = require('../')
describe('tzset()', function () {
beforeEach(function () {
process.env.TZ = 'UTC'
})
it('should work with no arguments', function () {
process.env.TZ = 'US/Pacific'
time.tzset()
time.currentTimezone.should.equal('US/Pacific')
})
it('... | Add a test testing some known timezone values. | Add a test testing some known timezone values.
| JavaScript | mit | TooTallNate/node-time,TooTallNate/node-time,santigimeno/node-time,santigimeno/node-time,santigimeno/node-time,TooTallNate/node-time |
60d2770c762811bcd21ab9324d683ea9daedb27c | _src-js/home.js | _src-js/home.js | import window from 'global/window';
import document from 'global/document';
import $ from 'jquery';
import videojs from 'video.js';
const player = window.player = videojs('preview-player', {
fluid: true,
plugins: {
mux: {
data: {
property_key: 'VJSISBEST',
video_title: 'The Boids!',
... | import window from 'global/window';
import document from 'global/document';
import $ from 'jquery';
import videojs from 'video.js';
const player = window.player = videojs('preview-player', {
fluid: true,
plugins: {
mux: {
data: {
property_key: 'VJSISBEST',
video_title: 'Disney\'s Oceans',... | Fix the title of the main video | Fix the title of the main video
| JavaScript | mit | videojs/videojs.com |
0268292f245fe5f46119fb24384af1b5a529070f | slack-events-api-router/src/respond-on-error.js | slack-events-api-router/src/respond-on-error.js | const invokeLambdaFunction = require('../src/lambda-invoke-function');
function respondOnError(error) {
const payload = {
message: error.message,
};
return invokeLambdaFunction(payload, 'need-to-write-this');
}
module.exports = respondOnError;
| const invokeLambdaFunction = require('../src/lambda-invoke-function');
function respondOnError(error) {
const payload = {
message: error.message,
};
console.error(`Responding to user with error: ${error.message}`);
// @todo Write the Lambda function that responds if there is an error.
// return invokeL... | Mark response bot as @todo. | Mark response bot as @todo.
| JavaScript | mit | Quartz/quackbot |
b6c8c4c49aa05e66504efbae37a2838ddf046564 | public_records_portal/static/js/all_requests.js | public_records_portal/static/js/all_requests.js | $(document).ready(function(){
Modernizr.load({
test: Modernizr.inputtypes.date,
nope: ['http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js', 'jquery-ui.css'],
complete: function () {
$('input[type=... | $(document).ready(function(){
Modernizr.load({
test: Modernizr.inputtypes.date,
nope: ['http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js','http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/base/jquery-ui.... | Update to use correct jquery-ui.css file | Update to use correct jquery-ui.css file
| JavaScript | apache-2.0 | CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords |
e35487c6fb979c0931cd2a3505f4c9063705c702 | lib/prefork.js | lib/prefork.js |
var prefork = require('../build/Release/prefork').prefork,
fs = require('fs');
module.exports = function (options) {
options = options || {};
var outfd, errfd;
if (Array.isArray(options.customFds) && options.customFds.length < 3) {
options.customFds.unshift(-1);
}
if (options.stdout && typeof opti... |
var prefork = require('../build/Release/prefork').prefork,
fs = require('fs');
module.exports = function (options) {
options = options || {};
var infd = -1, outfd = -1, errfd = -1,
customFds;
if (options.stdin && typeof options.stdin === 'string') {
infd = fs.openSync(options.stdin, 'r');
}
i... | Add options.stdin, clean up options logic. | [api] Add options.stdin, clean up options logic.
| JavaScript | mit | AvianFlu/node-prefork,AvianFlu/node-prefork,AvianFlu/node-prefork |
9b34ee7d9ab3d2cacedcf549273fbca9c6465cb3 | api/test/api.js | api/test/api.js | var chai = require('chai');
var chaiHttp = require('chai-http');
var server = require('../app');
var should = chai.should();
// var expect = chai.expect;
// var request = require("request");
describe("Date-a-Dog Server", function() {
describe("Rest API tests", function() {
it('Should return user profile for tes... | var chai = require('chai');
var chaiHttp = require('chai-http');
var server = require('../app');
var should = chai.should();
// var expect = chai.expect;
// var request = require("request");
chai.use(chaiHttp);
describe("Date-a-Dog Server", function() {
describe("Rest API tests", function() {
it('Should return... | Update to first Rest API test | Update to first Rest API test
| JavaScript | mit | Date-a-Dog/Date-a-Dog,Date-a-Dog/Date-a-Dog,jammua/dog-dating-app,Date-a-Dog/Date-a-Dog |
51167144a5be785042ff15a9435f6ea8c75d6c53 | pages/_app.js | pages/_app.js | import '@/css/tailwind.css'
import '@/css/prism.css'
import { ThemeProvider } from 'next-themes'
import Head from 'next/head'
import siteMetadata from '@/data/siteMetadata'
import Analytics from '@/components/analytics'
import LayoutWrapper from '@/components/LayoutWrapper'
import { ClientReload } from '@/components/... | import '@/css/tailwind.css'
import '@/css/prism.css'
import { ThemeProvider } from 'next-themes'
import Head from 'next/head'
import moment from 'moment'
import siteMetadata from '@/data/siteMetadata'
import Analytics from '@/components/analytics'
import LayoutWrapper from '@/components/LayoutWrapper'
import { Client... | Add meta version for build version | Add meta version for build version
| JavaScript | mit | ravuthz/ravuthz.github.io,ravuthz/ravuthz.github.io |
3eaf3d248b0118353260a4c9b2f8ecdc23fff359 | test/suites/080-dataview.js | test/suites/080-dataview.js | describe('Dataview', function () {
this.bail(true)
this.timeout(20 * 1000)
it('Switch to "Dataview" tab', function (done) {
eTT().tab('Dataview').click(done)
})
it('Click on second "customDataviewReference" dataview item', function (done) {
eTT().dataview('customDataviewReference')... | describe('Dataview', function () {
this.bail(true)
this.timeout(20 * 1000)
it('Switch to "Dataview" tab', function (done) {
eTT().tab('Dataview').click(done)
})
it('Click on second "customDataviewReference" dataview item', function (done) {
eTT().dataview('customDataviewReference')... | Remove cls and swap args | Remove cls and swap args
| JavaScript | mit | antonfisher/extjs-testing-tool,antonfisher/extjs-testing-tool,antonfisher/node-mocha-extjs,antonfisher/node-mocha-extjs,antonfisher/mocha-extjs,antonfisher/node-mocha-extjs,antonfisher/extjs-testing-tool,antonfisher/mocha-extjs,antonfisher/mocha-extjs |
a1f68d943eed3335fc3620dbb6088186b2b05a29 | logic/subcampaign/writeSubcampainModelLogic.js | logic/subcampaign/writeSubcampainModelLogic.js | var configuration = require('../../config/configuration.json')
var utility = require('../../public/method/utility')
module.exports = {
setSubcampaignModel: function (redisClient, accountHashID, payload, callback) {
var tableName, tempTable
var subcampaignHashID = utility.generateUniqueHashID()
var score ... | Implement Set SubcampaignModel Function (Create) | Implement Set SubcampaignModel Function (Create)
| JavaScript | mit | Flieral/Announcer-Service,Flieral/Announcer-Service | |
e44aba0a81f3eaef631290c10776d94d033c74d9 | src/templates/interactions/interaction-list.js | src/templates/interactions/interaction-list.js | import { bindable, inject } from 'aurelia-framework';
import imagesLoaded from 'imagesloaded';
import Masonry from 'masonry-layout';
import { EventAggregator } from 'aurelia-event-aggregator';
import { RefreshView } from 'resources/messages';
@inject(EventAggregator)
export class InteractionListCustomElement {
@bind... | import { bindable, inject } from 'aurelia-framework';
import Masonry from 'masonry-layout';
import { EventAggregator } from 'aurelia-event-aggregator';
import { RefreshedView } from 'resources/messages';
import { Router } from 'aurelia-router';
@inject(EventAggregator, Router)
export class InteractionListCustomElement... | Update interactions, removed image and added in the correct event | Update interactions, removed image and added in the correct event
| JavaScript | mit | mttmccb/dark_social,mttmccb/dark_social,mttmccb/dark_social |
fee15f1ba4479c2cbfa2005cea0f46bf53b9604c | src/article/TableCellNode.js | src/article/TableCellNode.js | import { XMLTextElement } from 'substance'
import { TEXT } from '../kit'
export default class TableCellNode extends XMLTextElement {
constructor (...args) {
super(...args)
this.rowIdx = -1
this.colIdx = -1
}
get rowspan () {
return _parseSpan(this.getAttribute('rowspan'))
}
get colspan () ... | import { XMLTextElement } from 'substance'
import { TEXT } from '../kit'
export default class TableCellNode extends XMLTextElement {
constructor (...args) {
super(...args)
this.rowIdx = -1
this.colIdx = -1
}
get rowspan () {
return _parseSpan(this.getAttribute('rowspan'))
}
get colspan () ... | Allow for inline-graphic in table cell. | Allow for inline-graphic in table cell.
| JavaScript | mit | substance/texture,substance/texture |
9163d9dbc4f58aefbc620934c3db961f0bbf0477 | mocks/index.js | mocks/index.js | var config = require('../lib/config'),
cors = require('../lib/cors'),
fs = require('fs');
var paths = [],
len = 0;
exports.init = function() {
if (config.mocksEnabled) {
console.log("Mock server enabled");
var pathSource = require('./paths');
for (var name in pathSource) {
... | var config = require('../lib/config'),
cors = require('../lib/cors'),
fs = require('fs');
var paths = [],
len = 0;
exports.init = function() {
if (config.mocksEnabled) {
console.log("Mock server enabled");
}
var pathSource = require('./paths');
for (var name in pathSource) {
paths.push({... | Allow runtime toggling of mocks | Allow runtime toggling of mocks | JavaScript | mit | walmartlabs/mock-server,walmartlabs/mock-server |
41e38cf5affb703233b4aa0097af8e7d10e4e817 | config/deprecation-workflow.js | config/deprecation-workflow.js | /* global window */
window.deprecationWorkflow = window.deprecationWorkflow || {};
window.deprecationWorkflow.config = {
workflow: [
{ handler: 'silence', matchId: 'ember-metal.get-with-default' },
{ handler: 'silence', matchId: 'manager-capabilities.modifiers-3-13' }, //https://github.com/emberjs/ember-rend... | /* global window */
window.deprecationWorkflow = window.deprecationWorkflow || {};
window.deprecationWorkflow.config = {
workflow: [
{ handler: 'silence', matchId: 'manager-capabilities.modifiers-3-13' }, //https://github.com/emberjs/ember-render-modifiers/issues/32
{ handler: 'silence', matchId: 'this-prope... | Remove get with default deprecation | Remove get with default deprecation
This is cleared in our app, we don't need to silence it anymore.
| JavaScript | mit | jrjohnson/frontend,dartajax/frontend,ilios/frontend,ilios/frontend,dartajax/frontend,jrjohnson/frontend |
af6cdec03b5ff9934466b7625e887d76f0a862ce | script.js | script.js | (() => {
'use strict';
var player = "O";
var moves = [];
var winningCombos = [
["1", "2", "3"],
["4", "5", "6"],
["7", "8", "9"],
["1", "5", "9"],
["3", "5", "7"],
["1", "4", "7"],
["2", "5", "8"],
["3", "6", "9"]];
window.play = (sq)... | (() => {
'use strict';
var player = "O";
var moves = [];
var winningCombos = [
["1", "2", "3"],
["4", "5", "6"],
["7", "8", "9"],
["1", "5", "9"],
["3", "5", "7"],
["1", "4", "7"],
["2", "5", "8"],
["3", "6", "9"]];
window.play = (sq)... | Change from map to forEach. | Change from map to forEach.
| JavaScript | mit | olillevik/olillevik.github.io,olillevik/olillevik.github.io |
6d0b782f76d6c05a5a2bb6c085de8a8767cf3b06 | app/assets/javascripts/tenon/tenon_manifest.js | app/assets/javascripts/tenon/tenon_manifest.js | //= require jquery
//= require jquery_ujs
// -- Plugins, in alphabetical order
//= require backstretch
//= require bootstrap
//= require bootstrap.collapse
//= require bootstrap.modal
//= require bootstrap.tabs
//= require canvasjs.min
//= require cocoon
//= require imagesloaded
//= require jquery-fileupload/basic
//=... | //= require jquery
//= require jquery_ujs
// -- Plugins, in alphabetical order
//= require backstretch
//= require bootstrap
//= require bootstrap.collapse
//= require bootstrap.modal
//= require bootstrap.tabs
//= require canvasjs.min
//= require cocoon
//= require imagesloaded
//= require jquery-fileupload/basic
//=... | Call the custom tenon files | Call the custom tenon files
| JavaScript | mit | factore/tenon,factore/tenon,factore/tenon,factore/tenon |
0df84d28c5767cfd17c54d3eff5d338ad5c31768 | src/components/status-tag.js | src/components/status-tag.js | import React from 'react';
import PropTypes from 'prop-types';
import {css} from 'react-emotion';
const wipStyle = css`
background-color: tomato;
color: ivory;
font-variant: small-caps;
line-height: 1.1;
padding: 0 2px;
`;
const expStyle = css`
background-color: deepskyblue;
color: ivory;
font-variant... | import React from 'react';
import PropTypes from 'prop-types';
import {css} from 'react-emotion';
const wipStyle = css`
background-color: tomato;
color: ivory;
font-variant: small-caps;
line-height: 1.1;
padding: 0 2px;
font-size: 12px;
border-bottom: none;
`;
const expStyle = css`
background-color: d... | Use abbr for status tags | style: Use abbr for status tags
Signed-off-by: Arnau Siches <3ce1c0b0b7032cdfdae7820ed353835a9a8f94c3@digital.cabinet-office.gov.uk>
| JavaScript | mit | openregister/specification |
90d29f9b4968cb4b3f2175847954cb76bee9825b | app/selectors/containers/searchPageSelector.js | app/selectors/containers/searchPageSelector.js | import { createSelector } from 'reselect';
import ActionTypes from 'constants/ActionTypes';
import searchFiltersSelector from 'selectors/searchFiltersSelector';
import searchResultsSelector from 'selectors/searchResultsSelector';
import requestIsActiveSelectorFactory from 'selectors/factories/requestIsActiveSelectorFa... | import { createSelector } from 'reselect';
import ActionTypes from 'constants/ActionTypes';
import searchFiltersSelector from 'selectors/searchFiltersSelector';
import searchResultsSelector from 'selectors/searchResultsSelector';
import requestIsActiveSelectorFactory from 'selectors/factories/requestIsActiveSelectorFa... | Fix search page loading spinner | Fix search page loading spinner
| JavaScript | mit | fastmonkeys/respa-ui |
94a36fed0967ce47563c8b7b0dd31261bc4253e4 | data/bouquets-data.js | data/bouquets-data.js | const Basedata = require('./base-data');
const BouquetModel = require('./models/bouquete-model');
class BouquetsData extends Basedata {
constructor(db) {
super(db, BouquetModel, BouquetModel);
}
}
module.exports = BouquetsData;
| const Basedata = require('./base-data');
const BouquetModel = require('./models/bouquete-model');
class BouquetsData extends Basedata {
constructor(db) {
super(db, BouquetModel, BouquetModel);
}
// override base
create(bouqueteModel) {
bouqueteModel.dateCreated = new Date();
bo... | Set new properties on bouquets | Set new properties on bouquets
| JavaScript | mit | viktoria-flowers/ViktoriaFlowers,viktoria-flowers/ViktoriaFlowers |
b3972a05472f510278dbd5d94e95bde4ae14e6cc | packages/vulcan-admin/lib/modules/fragments.js | packages/vulcan-admin/lib/modules/fragments.js | import { registerFragment } from 'meteor/vulcan:lib';
// ------------------------------ Vote ------------------------------ //
// note: fragment used by default on the UsersProfile fragment
registerFragment(`
fragment UsersAdmin on User {
_id
username
createdAt
isAdmin
displayName
email
... | import { registerFragment } from 'meteor/vulcan:lib';
// ------------------------------ Vote ------------------------------ //
// note: fragment used by default on the UsersProfile fragment
registerFragment(`
fragment UsersAdmin on User {
_id
username
createdAt
isAdmin
displayName
email
... | Add pageUrl and pagePath to user fragment; | Add pageUrl and pagePath to user fragment;
| JavaScript | mit | VulcanJS/Vulcan,VulcanJS/Vulcan |
3b2be9fe350de22a5a4e466287dade2ab983c9ac | lib/component.js | lib/component.js | !function(exports) {
'use strict';
var RunQueue = exports.RunQueue;
function Component() {
this.next = new RunQueue;
this.end = new RunQueue;
}
Component.extend = function(constructorFn) {
var scope = this;
if(!constructorFn) constructorFn = function() { scope.call(this); };
constructo... | !function(exports) {
'use strict';
var RunQueue = exports.RunQueue;
function Component() {
this.next = new RunQueue;
this.end = new RunQueue;
}
Component.extend = function(constructorFn) {
var prop, scope = this;
if(!constructorFn) constructorFn = function() { scope.call(this); };
cons... | Include class methods in extend() | [FIX] Include class methods in extend()
| JavaScript | mit | reissbaker/gamekernel,reissbaker/gamekernel |
7bca0c33e145e79e368f0a2dd216ea424130c312 | installer/app/src/router.js | installer/app/src/router.js | import Router from 'marbles/router';
import WizardComponent from './views/wizard';
import Dispatcher from './dispatcher';
var MainRouter = Router.createClass({
routes: [
{ path: '', handler: 'landingPage' },
{ path: '/install/:install_id', handler: 'landingPage' }
],
willInitialize: function () {
Dispatcher.... | import Router from 'marbles/router';
import WizardComponent from './views/wizard';
import Dispatcher from './dispatcher';
var MainRouter = Router.createClass({
routes: [
{ path: '', handler: 'landingPage' },
{ path: '/install/:install_id', handler: 'landingPage' }
],
willInitialize: function () {
Dispatcher.... | Use replaceState for updating the URL | installer: Use replaceState for updating the URL
Disables back button. The other option is to allow navigating between
steps using the browser's back/forward, but that overlaps with the
current behaviour of picking up an existing install process using the
base URL. This is a temporary fix and will be revisited soon.
... | JavaScript | bsd-3-clause | Brandywine2161/flynn,felixrieseberg/flynn,benbjohnson/flynn,whouses/flynn,shads196770/flynn,lmars/flynn,ozum/flynn,rikur/flynn,tonicbupt/flynn,josephglanville/flynn,arekkas/flynn,josephglanville/flynn,ozum/flynn,benbjohnson/flynn,jzila/flynn,rikur/flynn,schatt/flynn,kgrz/flynn,shads196770/flynn,GrimDerp/flynn,justintun... |
406332aa98abddd4ce4d910c23cd596cf7912dab | src/main/webapp/js/objEntrySetup.js | src/main/webapp/js/objEntrySetup.js | /*
Copyright 2009 University of Toronto
Licensed under the Educational Community License (ECL), Version 2.0.
ou may not use this file except in compliance with this License.
You may obtain a copy of the ECL 2.0 License at
https://source.collectionspace.org/collection-space/LICENSE.txt
*/
/*global jQuery, window, cs... | /*
Copyright 2009 University of Toronto
Licensed under the Educational Community License (ECL), Version 2.0.
ou may not use this file except in compliance with this License.
You may obtain a copy of the ECL 2.0 License at
https://source.collectionspace.org/collection-space/LICENSE.txt
*/
/*global jQuery, window, cs... | Remove an extra comma that was causing IE to fail to load the page. | CSPACE-649: Remove an extra comma that was causing IE to fail to load the page.
| JavaScript | apache-2.0 | cspace-deployment/ui,cspace-deployment/ui,cherryhill/collectionspace-ui,cspace-deployment/ui,cspace-deployment/ui,cherryhill/collectionspace-ui,cspace-deployment/ui,cherryhill/collectionspace-ui,cherryhill/collectionspace-ui |
48c27bbb46634c75d02bcfb60f89b327232fc913 | client/app/models/package.js | client/app/models/package.js | (function () {
app.models.Package = Backbone.Model.extend({
initialize : function () {
}
});
})();
| (function () {
app.models.Package = Backbone.Model.extend({
initialize : function () {
},
// TODO super inefficient search -- probably should cut down
// on search scope
matches : function ( query ) {
var
params = query.split(' '),
valid = false,
pkg = this;
... | Use client-side browsing for modules | Use client-side browsing for modules
| JavaScript | mit | web-audio-components/component.fm-old |
413d998e9a23cf6dea7653a87fef26e52773a622 | client/core/collaborators.js | client/core/collaborators.js | define([
'hr/utils',
'hr/hr',
'collections/users'
], function (_, hr, Users) {
// Collection for all current collaborators
var collaborators = new Users();
return collaborators;
}); | define([
'hr/utils',
'hr/hr',
'collections/users',
'utils/alerts'
], function (_, hr, Users, alerts) {
// Collection for all current collaborators
var collaborators = new Users();
collaborators.on("add", function(user) {
alerts.show(user.get("name")+" just joined the workspace", 500... | Add alert message when users joined and left the workspace | Add alert message when users joined and left the workspace
| JavaScript | apache-2.0 | nobutakaoshiro/codebox,CodeboxIDE/codebox,nobutakaoshiro/codebox,Ckai1991/codebox,rodrigues-daniel/codebox,rajthilakmca/codebox,lcamilo15/codebox,code-box/codebox,etopian/codebox,kustomzone/codebox,smallbal/codebox,kustomzone/codebox,quietdog/codebox,ahmadassaf/Codebox,ronoaldo/codebox,rodrigues-daniel/codebox,Ckai1991... |
39a25f48ec2728f756ae65836d51f15ff7c0f866 | examples/public/examples.js | examples/public/examples.js |
$(function () {
(function fixControlsLength () {
$('.form-group').each(function (index) {
$('.control-label', this)
.addClass('col-xs-4').css({'text-align':'right'})
.next().addClass('col-xs-5')
.next().addClass('col-xs-3');
});
... |
$(function () {
(function disableLinks () {
$('.navbar-brand, .breadcrumb a, #controls .btn, footer .text-muted').on('click', function (e) {
return false;
});
}());
if (!(window.location != window.parent.location)) return;
(function fixControlsLength () {
$('.... | Disable bootstrap responsive only inside an iframe | Disable bootstrap responsive only inside an iframe
| JavaScript | mit | simov/express-admin-site |
54f3ce25289725244ff7945559223c7d9cd12cca | src/app/lobby/lobby.controller.js | src/app/lobby/lobby.controller.js | class LobbyController {
constructor($scope, $log, $location, GameService, SocketService) {
'ngInject';
this.$log = $log;
this.$scope = $scope;
this.GameService = GameService;
this.SocketService = SocketService;
this.game_id = GameService.game_id;
this.password = GameService.roomName;
... | class LobbyController {
constructor(_, $scope, toastr, $log, $location, GameService, SocketService) {
'ngInject';
this._ = _;
this.$log = $log;
this.$scope = $scope;
this.toastr = toastr;
this.GameService = GameService;
this.SocketService = SocketService;
this.game_id = GameService.g... | Modify players list when player disconnects | Modify players list when player disconnects
| JavaScript | mit | hendryl/Famous-Places-Web,hendryl/Famous-Places-Web |
ba53cf9d780c86286ae53b38fbd28fd904ad8273 | app/app.js | app/app.js | require('http').createServer(function(req, res) {
res.end(require('package.json').version);
}).listen(process.env.PORT || 3000); | require('http').createServer(function(req, res) {
res.end(require('./package.json').version);
}).listen(process.env.PORT || 3000); | Correct path to package file | Correct path to package file
| JavaScript | mit | proofme/grunt-awsebtdeploy,endrec/grunt-awsebtdeploy,metacommunications/grunt-awsebtdeploy,nathanwelch/grunt-awsebtdeploy,simoneb/grunt-awsebtdeploy |
36d6a9c69feb8b13289c8f15ab517a0667b60fdb | addons/storyshots/storyshots-core/src/index.js | addons/storyshots/storyshots-core/src/index.js | import Stories2SnapsConverter from './Stories2SnapsConverter';
import api from './api';
export * from './test-bodies';
export { Stories2SnapsConverter };
export default api;
| import Stories2SnapsConverter from './Stories2SnapsConverter';
import api from './api';
import {
snapshotWithOptions,
multiSnapshotWithOptions,
renderOnly,
renderWithOptions,
shallowSnapshot,
snapshot,
} from './test-bodies';
export {
Stories2SnapsConverter,
snapshotWithOptions,
multiSnapshotWithOpti... | Change "export * from x" to manually importing and exporting named exports. | Change "export * from x" to manually importing and exporting named exports.
| JavaScript | mit | storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook |
118261e590c58a5c69daced92aae03144a98500b | frappe/public/js/frappe/form/controls/html.js | frappe/public/js/frappe/form/controls/html.js | frappe.ui.form.ControlHTML = frappe.ui.form.Control.extend({
make: function() {
this._super();
this.disp_area = this.wrapper;
},
refresh_input: function() {
var content = this.get_content();
if(content) this.$wrapper.html(content);
},
get_content: function() {
return this.df.options || "";
},
html: fun... | frappe.ui.form.ControlHTML = frappe.ui.form.Control.extend({
make: function() {
this._super();
this.disp_area = this.wrapper;
this.frm.$wrapper.on('blur change', () => {
setTimeout(() => this.refresh_input(), 500);
});
},
refresh_input: function() {
var content = this.get_content();
if(content) this.$... | Enable using templates inside ControlHTML | Enable using templates inside ControlHTML
This change would enable showing computed data based on other fields in the same doc, without storing the computed data (which avoid unnecessary redundancy).
| JavaScript | mit | yashodhank/frappe,manassolanki/frappe,paurosello/frappe,frappe/frappe,neilLasrado/frappe,tmimori/frappe,vjFaLk/frappe,RicardoJohann/frappe,saurabh6790/frappe,ESS-LLP/frappe,mhbu50/frappe,ESS-LLP/frappe,mhbu50/frappe,almeidapaulopt/frappe,almeidapaulopt/frappe,mbauskar/frappe,tundebabzy/frappe,yashodhank/frappe,yashodha... |
85b2d4790c23204545d0c12d145b6aea1e0f408d | server/app.js | server/app.js |
/**
* Module dependencies.
*/
var express = require('express');
var path = require('path');
var api = require('./lib/api');
var app = module.exports = express();
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.use(express.logger('dev'));
app.use(express.bod... |
/**
* Module dependencies.
*/
var express = require('express');
var path = require('path');
var api = require('./lib/api');
var app = module.exports = express();
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.use(express.logger('dev'));
app.use(express.bod... | Add a catch-all route to the server, which converts non-hash routes into hashed routes. | Add a catch-all route to the server, which converts non-hash routes into hashed routes.
| JavaScript | mit | brettshollenberger/rootstrikers,brettshollenberger/rootstrikers |
93664c46cc6d4c98ba1143016df5915d685a1c5a | web_external/views/widgets/DatasetInfoWidget.js | web_external/views/widgets/DatasetInfoWidget.js | import View from '../view';
import template from '../../templates/widgets/datasetInfoWidget.pug';
import '../../stylesheets/widgets/datasetInfoWidget.styl';
/**
* This widget is used to diplay minerva metadata for a dataset.
*/
const DatasetInfoWidget = View.extend({
initialize: function (settings) {
this.d... | import View from '../view';
import template from '../../templates/widgets/datasetInfoWidget.pug';
import '../../stylesheets/widgets/datasetInfoWidget.styl';
/**
* This widget is used to diplay minerva metadata for a dataset.
*/
const DatasetInfoWidget = View.extend({
initialize: function (settings) {
this.d... | Make the query of dataset name more reliable on different kind datasets | Make the query of dataset name more reliable on different kind datasets
Some datasets are created at runtime, so it could be missing fields
Also prepare for dataset rename feature
| JavaScript | apache-2.0 | Kitware/minerva,Kitware/minerva,Kitware/minerva |
91faa0f9e1e9d211b7be72b254b18578d2bdb3b3 | www/timelines.js | www/timelines.js | function load_timelines() {
$.getJSON('/time_series.json',function(data) {
var options = {
xaxis: {
mode: "time"
},
series: {
points: {
show: "true"
},
lines: {
show: "true"
}
},
grid: {
},
yaxis: {
min: ... | var wd;
function load_timelines() {
load_timelines_watermark();
}
function load_timelines_watermark() {
$.getJSON('/watermark.json', function(data) {
wd = data;
load_time_series();
}
}
function load_time_series() {
$.getJSON('/time_series.json',function(data) {
var options = {
xaxis: {
... | Refactor timeline support to load watermarks from json file | Refactor timeline support to load watermarks from json file
| JavaScript | mit | tdaede/awcy,tdaede/awcy,mdinger/awcy,tdaede/awcy,mdinger/awcy,tdaede/awcy,mdinger/awcy,tdaede/awcy,tdaede/awcy,mdinger/awcy,mdinger/awcy |
fe5bd0dedb1d5dba919bfe9f7b9aaa721e1598f9 | instance_introspection/static/src/js/tests.js | instance_introspection/static/src/js/tests.js | (function() {
'use strict';
openerp.Tour.register({
id: 'test_instance_introspection',
name: 'Complete a basic order trough the Front-End',
path: '/instance_introspection',
mode: 'test',
steps: [
{
title: 'Wait for the main screen',
... | (function() {
'use strict';
openerp.Tour.register({
id: 'test_instance_introspection',
name: 'Complete a basic order trough the Front-End',
path: '/instance_introspection',
mode: 'test',
steps: [
{
title: 'Wait for the main screen',
... | Test expecting results also since the begining | [IMP] Test expecting results also since the begining
| JavaScript | agpl-3.0 | vauxoo-dev/server-tools,vauxoo-dev/server-tools,vauxoo-dev/server-tools |
535e980c271e6e39514857c54189339a2cb7f70d | weckan/static/js/dataset.js | weckan/static/js/dataset.js | /**
* Dataset page specific features
*/
(function($, swig){
"use strict";
var COW_URL = $('link[rel="cow"]').attr('href'),
COW_API_URL = COW_URL + '/api/1/datasets/{name}/ranking';
$(function() {
var name = $('meta[name="dataset-name"]').attr('content'),
url = COW_API_URL.re... | /**
* Dataset page specific features
*/
(function($, swig){
"use strict";
var QUALITY_PRECISION = 2,
COW_URL = $('link[rel="cow"]').attr('href'),
COW_API_URL = COW_URL + '/api/1/datasets/{name}/ranking';
$(function() {
var name = $('meta[name="dataset-name"]').attr('content'),
... | Set quality precision at 2 digits and handle no weight case | Set quality precision at 2 digits and handle no weight case
| JavaScript | agpl-3.0 | etalab/weckan,etalab/weckan |
4b5444a909d064ec2b8fb1e237001152816b3403 | imports/api/collections/posts/publications.js | imports/api/collections/posts/publications.js | import { Meteor } from 'meteor/meteor';
import { Posts } from '../';
Meteor.publish('posts', () => Posts.find({}, { limit: 10 }));
| import { Meteor } from 'meteor/meteor';
import { Posts, Comments } from '../';
Meteor.publishComposite('posts', (limit = 10) => {
return {
find() {
return Posts.find({}, {
limit,
sort: {
createdAt: -1,
},
});
},
children: [
{
find(post) {
... | Join comments on posts publication | Join comments on posts publication
| JavaScript | apache-2.0 | evancorl/portfolio,evancorl/skate-scenes,evancorl/skate-scenes,evancorl/skate-scenes,evancorl/portfolio,evancorl/portfolio |
ae1cbbc68890a64279ba3a17ba61d8b24cdb0d2d | src/components/HomePage.js | src/components/HomePage.js | /**
* Created by farid on 8/16/2017.
*/
import React, {Component} from "react";
import Category from "./Category";
import {getCategories} from "../actions/Category";
import {connect} from "react-redux";
export class HomePage extends Component {
componentDidMount() {
this.props.getCategories();
}
... | /**
* Created by farid on 8/16/2017.
*/
import React, {Component} from "react";
import Category from "./Category";
import {getCategories} from "../actions/Category";
import {connect} from "react-redux";
export class HomePage extends Component {
componentDidMount() {
this.props.getCategories();
}
... | Add key iterator for categories map | fix: Add key iterator for categories map
| JavaScript | mit | faridsaud/udacity-readable-project,faridsaud/udacity-readable-project |
0a6a8623a2ba76e88718fb733b6f87fffca58dda | src/components/HomeView.js | src/components/HomeView.js | import React, { Component } from 'react';
import { Link } from 'react-router';
class HomeView extends Component {
render() {
return (
<div>
<Link to={"v/1"}>Video Link</Link>
</div>
);
}
}
export default HomeView;
| import React, { Component } from 'react';
import { Link } from 'react-router';
class HomeView extends Component {
constructor() {
super();
this.state = {
videos: ["hello", "world"]
};
}
render() {
return (
<div>
{this.state.videos.map((video, index) => (
<Link to=... | Work on Home view links | Work on Home view links
| JavaScript | mit | mg4tv/mg4tv-web,mg4tv/mg4tv-web |
fba75bcb6bd371d42a22bbe09a34c11631233b21 | modules/roles.js | modules/roles.js | "use strict";
/*Their structure is different because
of how the commands to use them are invoked.*/
module.exports = {
"elevated": {
"80773161284538368": "Admins",
"80773196516700160": "Mods"
},
"user_assignable": {
"Coders" : "229748381159915520",
"Techies": "229748333114163... | "use strict";
/*Their structure is different because
of how the commands to use them are invoked.*/
module.exports = {
"elevated": {
"80773161284538368": "Admins",
"80773196516700160": "Mods"
},
"user_assignable": {
"Coders" : "229748381159915520",
"Techies": "229748333114163... | Add support for WoW assigning guild | Add support for WoW assigning guild | JavaScript | mit | izy521/Sera-PCMR |
47034634668b0baea5cb0b13a88d2172e7e5a8ac | public/main.js | public/main.js | define(['jquery', 'underscore', 'pullManager', 'appearanceManager', 'module', 'PullFilter', 'ElementFilter', 'Column', 'ConnectionManager'],
function($, _, pullManager, appearanceManager, module, PullFilter, ElementFilter, Column, ConnectionManager) {
var spec = View;
var globalPullFilter = new PullFilter(spec... | define(['jquery', 'underscore', 'pullManager', 'PullFilter', 'ElementFilter', 'Column', 'ConnectionManager', 'bootstrap'],
// Note that not all of the required items above are represented in the function argument list. Some just need to be loaded, but that's all.
function($, _, pullManager, PullFilter, ElementFilter, ... | Change requirements to reflect reality | Change requirements to reflect reality
* Add `bootstrap` so the scripts get loaded
* Remove `module` and `appearanceManager` because they aren't used any more
* Stop providing variables in function with modules that are only loaded
for side effects
| JavaScript | mit | iFixit/pulldasher,iFixit/pulldasher,iFixit/pulldasher,iFixit/pulldasher |
0fdd418274a18fa954510053fd34c4730d2c7267 | lib/preload/redir-stdout.js | lib/preload/redir-stdout.js | 'use strict'
const fs = require('fs')
process.stdout.write = ((write) => (chunk, encoding, cb) => {
if (typeof chunk !== 'string' && !(chunk instanceof Buffer)) {
throw new TypeError(
'Invalid data, chunk must be a string or buffer, not ' + typeof chunk);
}
if (typeof encoding === 'function') {
cb =... | 'use strict'
const net = require('net')
const socket = new net.Socket({
fd: 3,
readable: false,
writable: true
})
Object.defineProperty(process, 'stdout', {
configurable: true,
enumerable: true,
get: () => socket
})
| Change process.stdout switcharoo to a full net.Socket instance | Change process.stdout switcharoo to a full net.Socket instance
No matter how you write to stdout, this should catch it!
The `defineProperty` call uses the same options as the default `process.stdout`.
| JavaScript | mit | davidmarkclements/0x |
a4f4dd98a2b78ed66af02761d33ebbc8dd5e516d | src/shared/components/libs/ExperimentImages.js | src/shared/components/libs/ExperimentImages.js | import React from "react";
class ExperimentImages extends React.Component {
constructor() {
super();
}
render() {
let imageDiv = this.props.images.map(url => {
return (<a href={url} target="_blank"><img src={url} alt="experiment image"/></a>)
});
return (
... | import React from "react";
class ExperimentImages extends React.Component {
constructor() {
super();
}
render() {
let imageDiv = null;
if(this.props.images) {
imageDiv = this.props.images.map(url => {
return (<a href={url} target="_blank"><img src={url... | Fix undefined this.props.images. Change between experiments will be smoother | Fix undefined this.props.images.
Change between experiments will be smoother
| JavaScript | mit | olavvatne/ml-monitor |
763e473a5fc126fdbb5d0cf666683c8d9d869e7c | lib/model/classes/StyleSheetExtension.js | lib/model/classes/StyleSheetExtension.js | var props = require("../properties/all.js");
var BaseObj = require("../BaseObj");
var obj = BaseObj.create("XWiki.StyleSheetExtension");
obj.addProp("name", props.XString.create({
"prettyName": "Name",
"size": "30"
}));
obj.addProp("code", props.TextArea.create({
"prettyName": "Code"
}));
obj.addProp("use", prop... | var props = require("../properties/all.js");
var BaseObj = require("../BaseObj");
var obj = BaseObj.create("XWiki.StyleSheetExtension");
obj.addProp("cache", props.StaticList.create({
"prettyName": "Caching policy",
"values": "long|short|default|forbid"
}));
obj.addProp("code", props.TextArea.create({
"prettyNam... | Reorder property to keep XWiki order | Reorder property to keep XWiki order
| JavaScript | agpl-3.0 | xwiki-contrib/node-xwikimodel |
32a7a99b61968f88f1d62c98275b755f3990d1a9 | src/styles/Images/assets/index.js | src/styles/Images/assets/index.js | export default {
BackgroundsPlus: require("./backgrounds-plus.jpg")
};
| import React from "react";
import Image from "../../../components/Image"
export const BackgroundsPlus = p => <Image {...p} src={require("./backgrounds-plus.jpg")} /> | Deploy to GitHub pages | Deploy to GitHub pages [ci skip]
| JavaScript | mit | tutti-ch/react-styleguide,tutti-ch/react-styleguide |
23d59b4908f2b48934207b711221026859797820 | src/components/RespondToPetitionForm/fields.js | src/components/RespondToPetitionForm/fields.js | import settings from 'settings';
export default [
{
element: 'input',
name: 'petitionId',
hidden: true,
html: {
type: 'hidden'
}
},
{
element: 'input',
name: 'token',
hidden: true,
html: {
type: 'hidden'
}
},
{
element: 'textarea',
name: 'answer.tex... | import settings from 'settings';
export default [
{
element: 'input',
name: 'petitionId',
hidden: true,
html: {
type: 'hidden'
}
},
{
element: 'input',
name: 'token',
hidden: true,
html: {
type: 'hidden'
}
},
{
element: 'textarea',
name: 'answer.tex... | Increase max length of petition answer text | Increase max length of petition answer text
| JavaScript | apache-2.0 | iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend |
5590ae2a489a339abf3e3694d3ba31ea0d31fa36 | src/ol/source/topojsonsource.js | src/ol/source/topojsonsource.js | goog.provide('ol.source.TopoJSON');
goog.require('ol.format.TopoJSON');
goog.require('ol.source.VectorFile');
/**
* @constructor
* @extends {ol.source.VectorFile}
* @param {olx.source.TopoJSONOptions=} opt_options Options.
*/
ol.source.TopoJSON = function(opt_options) {
var options = goog.isDef(opt_options) ... | goog.provide('ol.source.TopoJSON');
goog.require('ol.format.TopoJSON');
goog.require('ol.source.VectorFile');
/**
* @constructor
* @extends {ol.source.VectorFile}
* @param {olx.source.TopoJSONOptions=} opt_options Options.
* @todo stability experimental
*/
ol.source.TopoJSON = function(opt_options) {
var op... | Add stability annotation to ol.source.TopoJSON | Add stability annotation to ol.source.TopoJSON
| JavaScript | bsd-2-clause | oterral/ol3,tschaub/ol3,denilsonsa/ol3,openlayers/openlayers,bogdanvaduva/ol3,ahocevar/ol3,geekdenz/ol3,gingerik/ol3,alexbrault/ol3,alvinlindstam/ol3,thhomas/ol3,jmiller-boundless/ol3,CandoImage/ol3,fblackburn/ol3,jacmendt/ol3,bartvde/ol3,mechdrew/ol3,geekdenz/ol3,bill-chadwick/ol3,pmlrsg/ol3,antonio83moura/ol3,kkuunnd... |
b8b145fee10b51f99deefc86001fa745cc2e96da | test/resourceful-webhooks-test.js | test/resourceful-webhooks-test.js | var http = require('http'),
assert = require('assert'),
cb = require('assert-called'),
resourceful = require('resourceful');
require('../');
var PORT = 8123,
gotCallbacks = 0;
function maybeEnd() {
if (++gotCallbacks === 2) {
server.close();
}
}
var server = http.createServer(function (req, ... | var http = require('http'),
assert = require('assert'),
cb = require('assert-called'),
resourceful = require('resourceful');
require('../');
var PORT = 8123,
gotCallbacks = 0;
function maybeEnd() {
if (++gotCallbacks === 2) {
server.close();
}
}
var server = http.createServer(function (req, ... | Add a failing test for `content-type` header | [test] Add a failing test for `content-type` header
| JavaScript | mit | mmalecki/resourceful-webhooks,mmalecki/resourceful-webhooks |
3a1f44610586e3a984b2a5a468132be81038fca1 | packages/server-render/package.js | packages/server-render/package.js | Package.describe({
name: "server-render",
version: "0.1.0",
summary: "Generic support for server-side rendering in Meteor apps",
documentation: "README.md"
});
Npm.depends({
"magic-string": "0.21.3",
"parse5": "3.0.2"
});
Package.onUse(function(api) {
api.use("ecmascript");
api.use("webapp@1.3.17");
... | Package.describe({
name: "server-render",
version: "0.1.0",
summary: "Generic support for server-side rendering in Meteor apps",
documentation: "README.md"
});
Npm.depends({
"magic-string": "0.21.3",
"parse5": "3.0.2"
});
Package.onUse(function(api) {
api.use("ecmascript");
api.use("webapp");
api.ma... | Remove webapp version constraint for now. | Remove webapp version constraint for now.
The server-render package requires webapp@1.3.17 or later, but using a
non-prerelease version contraint for a package involved in the release
(i.e., webapp) is tricky during the prerelease phase, since the -beta.n
version is strictly enforced.
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor |
b8424424ae7e46f2b0fbc36d16a8a1d41f6e66c5 | src/scripts/scanRepliesAndNotify.js | src/scripts/scanRepliesAndNotify.js | import lib from './lib';
import redis from 'src/lib/redisClient';
import addTime from 'date-fns/add';
import Client from 'src/database/mongoClient';
export default async function scanRepliesAndNotify() {
const timeOffset = JSON.parse(process.env.REVIEW_REPLY_BUFFER) || {};
const lastScannedAt =
(await redis.ge... | import lib from './lib';
import redis from 'src/lib/redisClient';
import rollbar from 'src/lib/rollbar';
import addTime from 'date-fns/add';
import Client from 'src/database/mongoClient';
export default async function scanRepliesAndNotify() {
const timeOffset = JSON.parse(process.env.REVIEW_REPLY_BUFFER) || {};
co... | Add error handler and send error to rollbar | Add error handler and send error to rollbar
| JavaScript | mit | cofacts/rumors-line-bot,cofacts/rumors-line-bot,cofacts/rumors-line-bot |
660dc74cef1a6a3f7da701b57e9f3f71ccd6bb57 | app/js/arethusa.core/directives/sentence_list.js | app/js/arethusa.core/directives/sentence_list.js | "use strict";
angular.module('arethusa.core').directive('sentenceList', [
'$compile',
'navigator',
function($compile, navigator) {
return {
restrict: 'A',
scope: true,
link: function(scope, element, attrs) {
scope.n = navigator;
function createList() {
// We want ... | "use strict";
angular.module('arethusa.core').directive('sentenceList', [
'$compile',
'navigator',
function($compile, navigator) {
return {
restrict: 'A',
scope: true,
link: function(scope, element, attrs) {
scope.n = navigator;
function createList() {
// We want ... | Make sentenceList scrollable at all times | Make sentenceList scrollable at all times
| JavaScript | mit | alpheios-project/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa |
dddad05c90b4772a3f4b8c73b5223e044aa65872 | app/views/emailConfirmation/emailConfirmation.js | app/views/emailConfirmation/emailConfirmation.js | angular.module("ccj16reg.view.emailConfirmation", ["ngRoute", "ngMaterial", "ccj16reg.registration"])
.config(function($routeProvider) {
"use strict";
$routeProvider.when("/confirmpreregistration", {
templateUrl: "views/emailConfirmation/emailConfirmation.html",
controller: "EmailConfirmationCtrl",
});
})
.con... | angular.module("ccj16reg.view.emailConfirmation", ["ngRoute", "ngMaterial", "ccj16reg.registration"])
.config(function($routeProvider) {
"use strict";
$routeProvider.when("/confirmpreregistration", {
templateUrl: "views/emailConfirmation/emailConfirmation.html",
controller: "EmailConfirmationCtrl",
});
})
.con... | Remove unnecessary $mdDialog from the EmailConfirmationCtrl. | Remove unnecessary $mdDialog from the EmailConfirmationCtrl.
| JavaScript | agpl-3.0 | CCJ16/registration,CCJ16/registration,CCJ16/registration |
a0ec4aae2d9b4e07f281d49235d11543ffb9066f | cli.js | cli.js | #! /usr/bin/env node
const args = process.argv
const command = args[2]
const config = {
app_dir: process.env.HOME + '/.stay'
}
if (!command) {
require('./cli/help')(args, config)
process.exit(1)
}
try {
require('./cli/' + command)(args, config)
} catch (err) {
console.log(err)
if (err.code === 'MODULE_N... | #! /usr/bin/env node
const fs = require('fs')
const args = process.argv
const command = args[2]
const config = {
app_dir: process.env.HOME + '/.stay'
}
try {
fs.accessSync(config.app_dir, fs.F_OK)
} catch (e) {
const mkdirp = require('mkdirp')
mkdirp.sync(config.app_dir)
}
if (!command) {
require('./cli/h... | Initialize config only if not exists | Initialize config only if not exists
| JavaScript | mit | EverythingStays/stay-cli,EverythingStays/stay-cli |
ae645ad9f0173639dfaf642928684849e4a16ec1 | src/logger.js | src/logger.js | /*
Copyright 2018 André Jaenisch
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
... | /*
Copyright 2018 André Jaenisch
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
... | Use Node.js module export, since ES6 export breaks build. | Use Node.js module export, since ES6 export breaks build.
Signed-off-by: André Jaenisch <2c685275bd32aff3e28a84de6a3e3ac9f1b2b901@posteo.de>
| JavaScript | apache-2.0 | krombel/matrix-js-sdk,krombel/matrix-js-sdk,matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk,krombel/matrix-js-sdk,matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk |
b9835c9a26829fd36917d16a1a6813f9d54e9d3f | client/app/scripts/services/googleMapsService.js | client/app/scripts/services/googleMapsService.js | angular
.module('app')
.factory('googleMapsService', ['$rootScope', '$q',
function($rootScope, $q) {
/*
// Load the Google Maps scripts Asynchronously
(function(d){
var js, id = 'google-maps', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
... | angular
.module('app')
.factory('googleMapsService', ['$rootScope', '$q',
function($rootScope, $q) {
var methods = {};
methods.geo = function(address, type) {
var geocoder = new google.maps.Geocoder();
var geoData = {};
var han... | Make the digestion of the google geo result standardized | Make the digestion of the google geo result standardized
| JavaScript | mit | brettshollenberger/mrl001,brettshollenberger/mrl001 |
2d3954d279f686187369dfeb673f49f6dd050988 | lib/server/server_router.js | lib/server/server_router.js | var connect = Npm.require('connect');
var Fiber = Npm.require('fibers');
var root = global;
var connectHandlers
, connect;
if (typeof __meteor_bootstrap__.app !== 'undefined') {
connectHandlers = __meteor_bootstrap__.app;
} else {
connectHandlers = WebApp.connectHandlers;
}
ServerRouter = RouterUtils.extend(I... | var connect = Npm.require('connect');
var Fiber = Npm.require('fibers');
var root = global;
var connectHandlers
, connect;
if (typeof __meteor_bootstrap__.app !== 'undefined') {
connectHandlers = __meteor_bootstrap__.app;
} else {
connectHandlers = WebApp.connectHandlers;
}
ServerRouter = RouterUtils.extend(I... | Allow apps to kill the server router. | Allow apps to kill the server router. | JavaScript | mit | Aaron1992/iron-router,Sombressoul/iron-router,leoetlino/iron-router,abhiaiyer91/iron-router,Aaron1992/iron-router,assets1975/iron-router,TechplexEngineer/iron-router,Hyparman/iron-router,jg3526/iron-router,tianzhihen/iron-router,jg3526/iron-router,firdausramlan/iron-router,iron-meteor/iron-router,DanielDornhardt/iron-r... |
d58e398584d35be2ff852d241dbdd0af439f5716 | packages/truffle-core/index.js | packages/truffle-core/index.js | var pkg = require("./package.json");
module.exports = {
build: require("./lib/build"),
create: require("./lib/create"),
compiler: require("truffle-compile"),
config: require("./lib/config"),
console: require("./lib/repl"),
contracts: require("./lib/contracts"),
require: require("truffle-require"),
init... | var pkg = require("./package.json");
module.exports = {
build: require("./lib/build"),
create: require("./lib/create"),
config: require("./lib/config"),
console: require("./lib/repl"),
contracts: require("./lib/contracts"),
init: require("./lib/init"),
package: require("./lib/package"),
serve: require(... | Remove references to items that have been pulled out into their own modules. | Remove references to items that have been pulled out into their own
modules.
| JavaScript | mit | ConsenSys/truffle |
326466c2a866cd27749d6d5561f23b674840fd67 | packages/jest-environment-enzyme/src/setup.js | packages/jest-environment-enzyme/src/setup.js | /* eslint-disable global-require */
export const exposeGlobals = () => {
let dep;
switch (global.enzymedepDescriptor) {
case 'react13':
dep = 'enzyme-adapter-react-13';
break;
case 'react14':
dep = 'enzyme-adapter-react-14';
break;
case 'react15':
dep = 'enzyme-adapter-rea... | /* eslint-disable global-require */
// eslint-disable-next-line import/prefer-default-export
export const exposeGlobals = () => {
let dep;
switch (global.enzymeAdapterDescriptor) {
case 'react13':
dep = 'enzyme-adapter-react-13';
break;
case 'react14':
dep = 'enzyme-adapter-react-14';
... | Use correct global when resolving enzymeAdapter | fix: Use correct global when resolving enzymeAdapter
| JavaScript | mit | blainekasten/enzyme-matchers |
7d8efe71af7abf4bc21f400fd06bc3f2247be4c1 | centreon-frontend/centreon-ui/src/Title/index.js | centreon-frontend/centreon-ui/src/Title/index.js | import React from "react";
import classnames from 'classnames';
import styles from './custom-title.scss';
const Title = ({ icon, label, titleColor, customTitleStyles, onClick, style, labelStyle, children }) => (
<div className={classnames(styles["custom-title"], customTitleStyles ? styles["custom-title-styles"] : ''... | import React from "react";
import classnames from 'classnames';
import styles from './custom-title.scss';
const Title = ({ icon, label, titleColor, customTitleStyles, onClick, style, labelStyle, children }) => (
<div className={classnames(styles["custom-title"], customTitleStyles ? styles["custom-title-styles"] : ''... | Add label to the title component. | fix(extensions): Add label to the title component.
| JavaScript | apache-2.0 | centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon |
776ee9c3d3dd199f5c3ef746cf948bd7c06e162b | test-projects/multi-page-test-project/gulpfile.js | test-projects/multi-page-test-project/gulpfile.js |
var gulp = require('gulp');
var defs = [
{
title: 'Test Index Title',
path: '',
description: 'Test index description',
twitterImage: '20euro.png',
openGraphImage: '50euro.png',
schemaImage: '100euro.png'
},
{
path: '/subpage',
title: 'Test Subpage Title',
description: 'Test s... |
var gulp = require('gulp');
var path = require('path');
var defs = [
{
title: 'Test Index Title',
path: '',
description: 'Test index description',
twitterImage: '20euro.png',
openGraphImage: '50euro.png',
schemaImage: '100euro.png'
},
{
path: '/subpage',
title: 'Test Subpage Titl... | Add missing require to test project | Add missing require to test project
| JavaScript | mit | lucified/lucify-component-builder,lucified/lucify-component-builder,lucified/lucify-component-builder |
d9e92fb56f73f8415f4ca9ed791a27e511faee36 | root/include/news_look_up.js | root/include/news_look_up.js |
function yql_lookup(query, cb_function) {
var url = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent(query) + '&format=json&diagnostics=true';
//alert(url);
$.getJSON(url, cb_function);
}
function look_up_news() {
var feed_url = 'http://mediacloud.org/blog/feed/';
//alert(goo... |
function yql_lookup(query, cb_function) {
var url = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent(query) + '&format=json&diagnostics=true';
//alert(url);
$.getJSON(url, cb_function);
}
function look_up_news() {
// TEMPORARY HACK
//mediacloud.org is password protected so we ... | Add work around for the mediacloud.org/blog page being password protected so we can still display the news dynamically on the front page. | Add work around for the mediacloud.org/blog page being password protected so we can still display the news dynamically on the front page.
| JavaScript | agpl-3.0 | berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter... |
f6259eb662610e8d140028661d41e223d619293d | frontend/src/SubmitButton.js | frontend/src/SubmitButton.js | import React, { Component } from "react";
import styled from "styled-components";
class SubmitButton extends Component {
render() {
const {
isShowingPositive,
onNegativeClick,
onPositiveClick,
disabled,
positiveText,
negativeText
} = this.props;
return (
<Styled... | import React, { Component } from "react";
import styled from "styled-components";
class SubmitButton extends Component {
render() {
const {
isShowingPositive,
onNegativeClick,
onPositiveClick,
disabled,
positiveText,
negativeText
} = this.props;
return (
<Styled... | Set webkit-appearance to none on submit button. | Set webkit-appearance to none on submit button.
| JavaScript | mit | Tejpbit/talarlista,Tejpbit/talarlista,Tejpbit/talarlista |
6fec68f130beffcc842ad79efa94f85eba1009fc | schema/groupofuniquenames.js | schema/groupofuniquenames.js | // Copyright 2012 Joyent, Inc. All rights reserved.
var util = require('util');
var ldap = require('ldapjs');
var Validator = require('../lib/schema/validator');
///--- Globals
var ConstraintViolationError = ldap.ConstraintViolationError;
///--- API
function GroupOfUniqueNames() {
Validator.call(this, {... | // Copyright 2013 Joyent, Inc. All rights reserved.
var util = require('util');
var ldap = require('ldapjs');
var Validator = require('../lib/schema/validator');
///--- Globals
var ConstraintViolationError = ldap.ConstraintViolationError;
///--- API
function GroupOfUniqueNames() {
Validator.call(this, {... | Allow creation of empty user groups | CAPI-219: Allow creation of empty user groups
| JavaScript | mpl-2.0 | joyent/sdc-ufds,arekinath/sdc-ufds,arekinath/sdc-ufds,joyent/sdc-ufds |
df2cf92d8667a3a598aecb37c86c45c82804d089 | app/assets/javascripts/active_admin_pro/components/link.js | app/assets/javascripts/active_admin_pro/components/link.js | App.ready(function() {
"use strict";
var body = $('body');
var links = $('a:not([data-method="delete"]):not(.has_many_add):not(.dropdown_menu_button):not([target="_blank"])');
// Add active class on click to style while loading via turbolinks
// and add loading class to the body element.
links.click(functi... | App.ready(function() {
"use strict";
var body = $('body');
var links = $('a:not([data-method="delete"]):not(.has_many_add):not(.dropdown_menu_button):not([target="_blank"])');
// Add active class on click to style while loading via turbolinks
// and add loading class to the body element.
links.click(functi... | Fix issue with back button and loading indicators | Fix issue with back button and loading indicators
| JavaScript | mit | codelation/active_admin_pro,codelation/active_admin_pro,codelation/activeadmin_pro,codelation/activeadmin_pro |
39da1bcb08c1ea479ae980513bc23e92be2fd52f | handlers/regex/runCustomCmd.js | handlers/regex/runCustomCmd.js | 'use strict';
const { hears } = require('telegraf');
const R = require('ramda');
// DB
const { getCommand } = require('../../stores/command');
const capitalize = R.replace(/^./, R.toUpper);
const getRepliedToId = R.path([ 'reply_to_message', 'message_id' ]);
const typeToMethod = type =>
type === 'text'
? 'reply... | 'use strict';
const { hears } = require('telegraf');
const R = require('ramda');
// DB
const { getCommand } = require('../../stores/command');
const capitalize = R.replace(/^./, R.toUpper);
const getRepliedToId = R.path([ 'reply_to_message', 'message_id' ]);
const typeToMethod = type =>
type === 'text'
? 'reply... | Allow space before custom command name | Allow space before custom command name
| JavaScript | agpl-3.0 | TheDevs-Network/the-guard-bot |
8d8ba7bf3358f5a42f4c2fe377ec20a78d05478a | public/js/app.js | public/js/app.js | var timeDisplay = document.querySelector('#timeDisplay');
var startButton = document.querySelector('#startButton');
var abandonButton = document.querySelector('#abandonButton');
var completeButton = document.querySelector('#completeButton');
var restartButton = document.querySelector('#restartButton');
var buttons = d... | Add basic code for timer with commented lines where requests will go | Add basic code for timer with commented lines where requests will go
| JavaScript | mit | The-Authenticators/gitpom,The-Authenticators/gitpom | |
012a8df1ee01e08b0da47d75b13e32ff4f98f6d4 | js/forum/src/components/NewPostNotification.js | js/forum/src/components/NewPostNotification.js | import Notification from 'flarum/components/Notification';
import username from 'flarum/helpers/username';
export default class NewPostNotification extends Notification {
icon() {
return 'star';
}
href() {
const notification = this.props.notification;
const discussion = notification.subject();
c... | import Notification from 'flarum/components/Notification';
import username from 'flarum/helpers/username';
export default class NewPostNotification extends Notification {
icon() {
return 'star';
}
href() {
const notification = this.props.notification;
const discussion = notification.subject();
c... | Fix typo in new post notification translation key | Fix typo in new post notification translation key
| JavaScript | mit | flarum/flarum-ext-subscriptions,flarum/flarum-ext-subscriptions,flarum/flarum-ext-subscriptions |
07688d877058ed228ffb776b927138fc2ad1ed8d | addon/index.js | addon/index.js | import Ember from 'ember';
const { RSVP } = Ember;
function preloadRecord(record, toPreload) {
return preloadAll([record], toPreload).then(() => {
return record;
});
}
function preloadAll(records, toPreload) {
switch(Ember.typeOf(toPreload)) {
case 'object':
const properties = Object.keys(t... | import Ember from 'ember';
const { RSVP } = Ember;
function getPromise(object, property) {
return RSVP.resolve(Ember.get(object, property));
}
function preloadRecord(record, toPreload) {
if (!record) {
return RSVP.resolve(record);
}
switch(Ember.typeOf(toPreload)) {
case 'string':
return getPr... | Refactor preload to handle more cases | Refactor preload to handle more cases
| JavaScript | mit | levanto-financial/ember-data-preload,levanto-financial/ember-data-preload |
30c117968a90baa7ffe14927147498e0c10bb418 | web/src/js/lib/models/LayerModel.js | web/src/js/lib/models/LayerModel.js | cinema.models.LayerModel = Backbone.Model.extend({
constructor: function (defaults, options) {
Backbone.Model.call(this, {}, options);
if (typeof defaults === 'string') {
this.setFromString(defaults);
} else if (defaults) {
this.set('state', defaults);
}
... | cinema.models.LayerModel = Backbone.Model.extend({
constructor: function (defaults, options) {
Backbone.Model.call(this, {}, options);
if (typeof defaults === 'string') {
this.setFromString(defaults);
} else if (defaults) {
this.set('state', defaults);
}
... | Fix layer model serialize method to use new organization | Fix layer model serialize method to use new organization
| JavaScript | bsd-3-clause | Kitware/cinema,Kitware/cinema,Kitware/cinema,Kitware/cinema |
7d81ece0291bb469f1bea3bcf2c9225f74eab7d6 | server/game/cards/events/01/puttothetorch.js | server/game/cards/events/01/puttothetorch.js | const DrawCard = require('../../../drawcard.js');
class PutToTheTorch extends DrawCard {
canPlay(player, card) {
if(player !== this.controller || this !== card) {
return false;
}
var currentChallenge = this.game.currentChallenge;
if(!currentChallenge || currentChalleng... | const DrawCard = require('../../../drawcard.js');
class PutToTheTorch extends DrawCard {
canPlay(player, card) {
if(player !== this.controller || this !== card) {
return false;
}
var currentChallenge = this.game.currentChallenge;
if(!currentChallenge || currentChalleng... | Fix put to the torch and allow it to use saves | Fix put to the torch and allow it to use saves
| JavaScript | mit | Antaiseito/throneteki_for_doomtown,jeremylarner/ringteki,jeremylarner/ringteki,samuellinde/throneteki,cavnak/throneteki,cryogen/gameteki,jbrz/throneteki,cryogen/throneteki,gryffon/ringteki,cryogen/throneteki,Antaiseito/throneteki_for_doomtown,cryogen/gameteki,jeremylarner/ringteki,ystros/throneteki,gryffon/ringteki,Duk... |
9cb2f8d9efef1d47ddaec2266bcc203baa1990bc | test/index.js | test/index.js | var readFile = require('fs').readFile;
var assert = require('assert');
var exec = require('child_process').exec;
var join = require('path').join;
// Test the expected output.
exec('node .', function(err, stdout, stderr) {
if (err) {
throw err;
}
readFile(join(__dirname, 'expected.txt'), 'UTF-8', f... | var readFile = require('fs').readFile;
var assert = require('assert');
var exec = require('child_process').exec;
var join = require('path').join;
var platform = require('os').platform;
// Test the expected output.
exec('node .', function(err, stdout, stderr) {
if (err) {
throw err;
}
readFile(join... | Add test support for Windows | Add test support for Windows
| JavaScript | isc | unioncollege-webtech/fizzbuzz |
427c79e42267e4f326e8ed0048914a9e2feb3a4a | test/index.js | test/index.js | // Native
import path from 'path'
// Packages
import test from 'ava'
import {transformFile} from 'babel-core'
// Ours
import plugin from '../babel'
import read from './_read'
const transform = file => (
new Promise((resolve, reject) => {
transformFile(path.resolve(__dirname, file), {
plugins: [
p... | // Native
import path from 'path'
// Packages
import test from 'ava'
import {transformFile} from 'babel-core'
// Ours
import plugin from '../dist/babel'
import read from './_read'
const transform = file => (
new Promise((resolve, reject) => {
transformFile(path.resolve(__dirname, file), {
plugins: [
... | Make tests read from the right dir | Make tests read from the right dir
| JavaScript | mit | zeit/styled-jsx |
7e355008d3bc810b84ca4818e4aeecf494a89d20 | assets/components/checkblock/js/inputs/checkblock.js | assets/components/checkblock/js/inputs/checkblock.js | // Wrap your stuff in this module pattern for dependency injection
(function ($, ContentBlocks) {
// Add your custom input to the fieldTypes object as a function
// The dom variable contains the injected field (from the template)
// and the data variable contains field information, properties etc.
Conte... | // Wrap your stuff in this module pattern for dependency injection
(function ($, ContentBlocks) {
// Add your custom input to the fieldTypes object as a function
// The dom variable contains the injected field (from the template)
// and the data variable contains field information, properties etc.
Conte... | Fix checkboxes not ticking themselves | Fix checkboxes not ticking themselves
Closes #1
| JavaScript | mit | jpdevries/checkblock,jpdevries/checkblock |
53db7bd5313293b436d9664d90080eee18315165 | sample/core.js | sample/core.js | enchant();
window.onload = function () {
var core = new Core(320, 320);
core.onload = function () {
core.rootScene.backgroundColor = '#eee';
var field = new TextField(160, 24);
field.x = (core.width - field.width) / 2;
field.y = 64;
field.placeholder = 'what is your name ?';
field.style.... | enchant();
window.onload = function () {
var core = new Core(320, 320);
core.onload = function () {
core.rootScene.backgroundColor = '#eee';
// Create an instance of enchant.TextField
var textField = new TextField(160, 24);
// Set position
textField.x = (core.width - textField.width) / 2;
... | Add some comments and rename TextField instance | Add some comments and rename TextField instance
| JavaScript | mit | 131e55/textField.enchant.js |
3b9af3bf12b4ec3790caf898900b94d3d49aee00 | elemental-ca.js | elemental-ca.js | var w = 300,
gens = 10;
var c = document.getElementById('cs');
var ctx = c.getContext('2d');
var ruleset = [0,1,0,1,1,0,1,0].reverse();
var cells = [];
for (var i=0; i<w; i++) {
cells[i] = 0;
}
cells[Math.ceil(w/2)] = 1;
function rules(l,c,r) {
var rule = '' + l + c + r;
return ruleset[parseInt(rule, 2)];... | var w = 600,
gens = 800;
var c = document.getElementById('cs');
var ctx = c.getContext('2d');
var ruleset = [0,1,0,1,1,0,1,0].reverse();
var cells = [];
for (var i=0; i<w; i++) {
cells[i] = 0;
}
cells[Math.ceil(w/2)] = 1;
function rules(l,c,r) {
var rule = '' + l + c + r;
return ruleset[parseInt(rule, 2)]... | Tweak the color and size a bit | Tweak the color and size a bit
| JavaScript | mit | mmcfarland/canvas-renderings |
4c1987b918d353f849ad1aaad174db797525ee10 | scripts/app.js | scripts/app.js | var ko = require('knockout-client'),
vm = require('./viewModel');
vm.wtf();
ko.applyBindings(vm);
| var ko = require('knockout-client'),
vm = require('./viewModel');
ko.applyBindings(vm);
| Remove increment on refresh / initial visit | Remove increment on refresh / initial visit
| JavaScript | mit | joshka/countw.tf,joshka/countw.tf,joshka/countw.tf,joshka/countw.tf |
c70bb59f3a7357f7d2711f0de20c1cd1717fec70 | react/gameday2/components/EmbedTwitch.js | react/gameday2/components/EmbedTwitch.js | import React from 'react'
import { webcastPropType } from '../utils/webcastUtils'
const EmbedTwitch = (props) => {
const channel = props.webcast.channel
const iframeSrc = `https://player.twitch.tv/?channel=${channel}`
return (
<iframe
src={iframeSrc}
frameBorder="0"
scrolling="no"
hei... | import React from 'react'
import { webcastPropType } from '../utils/webcastUtils'
const EmbedTwitch = (props) => {
const channel = props.webcast.channel
const iframeSrc = `https://player.twitch.tv/?channel=${channel}`
return (
<iframe
src={iframeSrc}
frameBorder="0"
scrolling="no"
hei... | Fix gameday2 not allowing fullscreen Twitch | Fix gameday2 not allowing fullscreen Twitch
| JavaScript | mit | nwalters512/the-blue-alliance,bdaroz/the-blue-alliance,jaredhasenklein/the-blue-alliance,nwalters512/the-blue-alliance,fangeugene/the-blue-alliance,fangeugene/the-blue-alliance,jaredhasenklein/the-blue-alliance,verycumbersome/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,bdaroz/the-bl... |
66e5f23ae0283fd89d313b802c3ed20ea52137ed | app/public/app.js | app/public/app.js | $(function () {
$(document).on({
ajaxStart: function() { $('body').addClass("loading"); },
ajaxStop: function() { $('body').removeClass("loading"); }
})
$( "#request_form" ).submit(function( event ) {
event.preventDefault();
$('.results_container').slideUp( "slow");
$.post( "/call", { ch... | $(function () {
$(document).on({
ajaxStart: function() { $('body').addClass("loading"); },
ajaxStop: function() { $('body').removeClass("loading"); }
})
$( "#request_form" ).submit(function( event ) {
event.preventDefault();
$('.results_container').slideUp( "slow");
$.post( "/call", { ch... | Fix view for empty response | Fix view for empty response
| JavaScript | mit | nezhar/PictureChallenge,nezhar/PictureChallenge |
4be53761875922cc8d27e54363624cd1ae34bc16 | app/containers/Main/index.js | app/containers/Main/index.js | import React, { Component, PropTypes } from 'react';
import fetchData from '../../actions/fetchData';
import Toast from '../../components/Toast';
import Modals from '../Modals';
import types from '../../utils/types';
import SocketEvents from '../../utils/socketEvents';
import './Main.scss';
import MainNav from '../Mai... | import React, { Component, PropTypes } from 'react';
import fetchData from '../../actions/fetchData';
import Toast from '../../components/Toast';
import Modals from '../Modals';
import types from '../../utils/types';
import SocketEvents from '../../utils/socketEvents';
import './Main.scss';
import MainNav from '../Mai... | Check for isFetching with .some | :wrench: Check for isFetching with .some
| JavaScript | mit | JasonEtco/flintcms,JasonEtco/flintcms |
0c91dac30e3bf9a0fb06e315c3ab52489d703a5e | lib/getReactNativeExternals.js | lib/getReactNativeExternals.js | 'use strict';
var fs = require('fs');
var path = require('path');
/**
* Extract the React Native module paths for a given directory
*
* @param {String} rootDir
* @return {Object}
*/
function getReactNativeExternals(rootDir) {
var externals = {};
var file;
var walk = function(dir) {
fs.readdirSync(dir)... | 'use strict';
var fs = require('fs');
var path = require('path');
/**
* Extract the React Native module paths for a given directory
*
* @param {String} rootDir
* @return {Object}
*/
function getReactNativeExternals(rootDir) {
var externals = {};
var file;
var walk = function(dir) {
fs.readdirSync(dir)... | Fix for requiring `*.ios.js` modules | Fix for requiring `*.ios.js` modules
Also temporary workaround for `require('StaticContainer.react')`.
Fixes #22 | JavaScript | mit | hammerandchisel/react-native-webpack-server,Owenzh/react-native-webpack-server,pascience/react-native-webpack-server,patrickomeara/react-native-webpack-server,jeffreywescott/react-native-webpack-server,refinery29/react-native-webpack-server,nevir/react-native-webpack-server,carcer/react-native-webpack-server,prathamesh... |
779157a8fb6076e35fce4edcb2eb7a7a55ccdade | js/characters-list.js | js/characters-list.js | var Character = require('./character');
var React = require('react');
var _ = require('underscore')
var CharactersList = React.createClass({
render: function () {
return (
<div>
{
this.props.items.map(function(item, index) {
var name = item.name;
var image = item.image;
... | var Character = require('./character');
var React = require('react');
var _ = require('underscore')
var CharactersList = React.createClass({
render: function () {
return (
<div>
{
this.props.items.map(function(item, index) {
var name = item.name;
var image = item.thumbnail... | Fix for the image prop of the character | Fix for the image prop of the character
| JavaScript | mit | adrrian17/excelsior |
a942d28c315f59428a80d2fd0b268cd99bbe3b66 | common/src/configureStore.js | common/src/configureStore.js | import appReducer from './app/reducer';
import createLogger from 'redux-logger';
import fetch from 'isomorphic-fetch';
import injectDependencies from './lib/injectDependencies';
import promiseMiddleware from 'redux-promise-middleware';
import stateToJS from './lib/stateToJS';
import validate from './validate';
import {... | import appReducer from './app/reducer';
import createLogger from 'redux-logger';
import fetch from 'isomorphic-fetch';
import injectDependencies from './lib/injectDependencies';
import promiseMiddleware from 'redux-promise-middleware';
import stateToJS from './lib/stateToJS';
import validate from './validate';
import {... | Enable Flux logger only for dev | Enable Flux logger only for dev
| JavaScript | mit | puzzfuzz/othello-redux,christophediprima/este,XeeD/este,abelaska/este,skyuplam/debt_mgmt,AugustinLF/este,TheoMer/Gyms-Of-The-World,skyuplam/debt_mgmt,langpavel/este,XeeD/test,robinpokorny/este,aindre/este-example,christophediprima/este,SidhNor/este-cordova-starter-kit,robinpokorny/este,glaserp/Maturita-Project,christop... |
43f0a5cefb43be20ae8f48deb2fa886540528b2d | lib/indie-registry.js | lib/indie-registry.js | 'use babel'
import {Emitter, CompositeDisposable} from 'atom'
import Validate from './validate'
import Indie from './indie'
export default class IndieRegistry {
constructor() {
this.subscriptions = new CompositeDisposable()
this.emitter = new Emitter()
this.indieLinters = new Set()
this.subscriptio... | 'use babel'
import {Emitter, CompositeDisposable} from 'atom'
import Validate from './validate'
import Indie from './indie'
export default class IndieRegistry {
constructor() {
this.subscriptions = new CompositeDisposable()
this.emitter = new Emitter()
this.indieLinters = new Set()
this.subscriptio... | Add a new has method | :new: Add a new has method
| JavaScript | mit | Arcanemagus/linter,e-jigsaw/Linter,atom-community/linter,AtomLinter/Linter,steelbrain/linter |
dcf5dde3cb5833fde7430a0238e3c9436e796dc0 | lib/score-combiner.js | lib/score-combiner.js | /**
* checks if there are scores which can be combined
*/
function checkValidity (scores) {
if (scores == null) {
throw new Error('There must be a scores object parameter')
}
if (Object.keys(scores).length <= 0) {
throw new Error('At least one score must be passed')
}
}
/**
* Score canidate based on... | /**
* checks if there are scores which can be combined
*/
function checkValidity (scores) {
if (scores == null) {
throw new Error('There must be a scores object parameter')
}
if (Object.keys(scores).length <= 0) {
throw new Error('At least one score must be passed')
}
}
/**
* Score canidate based on... | Refactor LargestQ.combine() to use built-ins. | Refactor LargestQ.combine() to use built-ins.
| JavaScript | agpl-3.0 | amos-ws16/amos-ws16-arrowjs-server,amos-ws16/amos-ws16-arrowjs,amos-ws16/amos-ws16-arrowjs,amos-ws16/amos-ws16-arrowjs,amos-ws16/amos-ws16-arrowjs-server |
73b274515279466e125e658e539b1863301c5759 | lib/windshaft/models/dummy_mapconfig_provider.js | lib/windshaft/models/dummy_mapconfig_provider.js | var util = require('util');
var MapStoreMapConfigProvider = require('./mapstore_mapconfig_provider');
function DummyMapConfigProvider(mapConfig, params) {
if (!(this instanceof DummyMapConfigProvider)) {
return new DummyMapConfigProvider(mapConfig, params);
}
MapStoreMapConfigProvider.call(this, u... | var util = require('util');
var MapStoreMapConfigProvider = require('./mapstore_mapconfig_provider');
function DummyMapConfigProvider(mapConfig, params) {
MapStoreMapConfigProvider.call(this, undefined, params);
this.mapConfig = mapConfig;
}
util.inherits(DummyMapConfigProvider, MapStoreMapConfigProvider);
... | Remove instance check as it's an internal class and have full control | Remove instance check as it's an internal class and have full control
| JavaScript | bsd-3-clause | CartoDB/Windshaft,wsw0108/Windshaft,CartoDB/Windshaft,CartoDB/Windshaft,wsw0108/Windshaft,wsw0108/Windshaft |
969cc51155d7be88f97e27f305bf678836fa9220 | packages/server/src/__tests__/jestSetup.js | packages/server/src/__tests__/jestSetup.js | const root = __dirname + '/../../../..';
require('@babel/register')({
root,
cwd: root,
configFile: root + '/packages/server/babel.config.js',
extensions: ['.js', '.jsx', '.ts', '.tsx']
});
require.extensions['.scss'] = () => {};
require.extensions['.css'] = () => {};
require.extensions['.less'] = () => {};
O... | const root = __dirname + '/../../../..';
require('@babel/register')({
root,
cwd: root,
configFile: root + '/packages/server/babel.config.js',
extensions: ['.js', '.jsx', '.ts', '.tsx'],
cache: false
});
require.extensions['.scss'] = () => {};
require.extensions['.css'] = () => {};
require.extensions['.less'... | Work around babel-plugin-import-graphql caching intolerance | Work around babel-plugin-import-graphql caching intolerance
| JavaScript | mit | sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit |
36ae9ccc7f43445485a6baacc4dc18834d61cda2 | pretty-seconds.js | pretty-seconds.js | function quantify(data, unit, value) {
if (value) {
if (value > 1 || value < -1)
unit += 's';
data.push(value + ' ' + unit);
}
return data;
}
module.exports = function prettySeconds(seconds) {
var prettyString = '',
data = [];
if (typeof seconds === 'number')... | function quantify(data, unit, value) {
if (value) {
if (value > 1 || value < -1)
unit += 's';
data.push(value + ' ' + unit);
}
return data;
}
module.exports = function prettySeconds(seconds) {
var prettyString = '',
data = [];
if (typeof seconds === 'number')... | Trim decimal places off seconds | Trim decimal places off seconds | JavaScript | mit | binarykitchen/pretty-seconds |
438e6b49e171e8db87e1982677861b6c61dfcdad | scripts/nummer.js | scripts/nummer.js | // Description:
// Pick and tag a random user that has to do shitty work, replies when the bot
// hears @noen. This script also supports mentions of @aktive and @nye.
const _ = require('lodash');
const members = require('../lib/members');
const prefixes = [
'Time to shine',
"The work doesn't do itself",
'Ge... | // Description:
// Get all phone numbers for active members
const _ = require('lodash');
const members = require('../lib/members');
module.exports = robot => {
robot.respond(/nummer/i, msg => {
members('?active=true')
.then(members => {
if (members.length === 0) {
return;
}
... | Remove duplicate posts by ababot | Remove duplicate posts by ababot
| JavaScript | mit | webkom/ababot,webkom/ababot |
1aef53ef94e4031cb23e9c79c1b677299307284b | app/renderer/js/utils/domain-util.js | app/renderer/js/utils/domain-util.js | 'use strict';
const {app} = require('electron').remote;
const JsonDB = require('node-json-db');
class DomainUtil {
constructor() {
this.db = new JsonDB(app.getPath('userData') + '/domain.json', true, true);
}
getDomains() {
return this.db.getData('/domains');
}
addDomain() {
... | 'use strict';
const {app} = require('electron').remote;
const JsonDB = require('node-json-db');
class DomainUtil {
constructor() {
this.db = new JsonDB(app.getPath('userData') + '/domain.json', true, true);
}
getDomains() {
return this.db.getData('/domains');
}
addDomain() {
... | Change domain config schema and update DomainUtil. | Change domain config schema and update DomainUtil.
| JavaScript | apache-2.0 | zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-electron,zulip/zulip-desktop,zulip/zulip-electron,zulip/zulip-electron,zulip/zulip-desktop |
e91e43feeddafb7d674f67f18cb2c0748a395006 | packages/fela-bindings/src/extractUsedProps.js | packages/fela-bindings/src/extractUsedProps.js | /* @flow */
export default function extractUsedProps(
rule: Function,
theme: Object = {}
): Array<string> {
const usedProps = []
// if the browser doesn't support proxies
// we simply return an empty props object
// see https://github.com/rofrischmann/fela/issues/468
if (typeof Proxy === 'undefined') {
... | /* @flow */
export default function extractUsedProps(
rule: Function,
theme: Object = {}
): Array<string> {
const usedProps = []
// if the browser doesn't support proxies
// we simply return an empty props object
// see https://github.com/rofrischmann/fela/issues/468
if (typeof Proxy === 'undefined') {
... | Handle exception extracting used props | Handle exception extracting used props
Fix #595
| JavaScript | mit | risetechnologies/fela,rofrischmann/fela,risetechnologies/fela,rofrischmann/fela,risetechnologies/fela,rofrischmann/fela |
8bc778f740fa3fa77a49328739265e5d4edd9e54 | modules/slider/Gruntfile.js | modules/slider/Gruntfile.js | module.exports = function(grunt) {
grunt.config.merge({
imagemin: {
slider: {
files: [{
expand: true,
cwd: 'cacao/modules/slider/images',
src: ['**/*.{png,jpg,gif}'],
dest: '<%= global.dest %>/layout... | module.exports = function(grunt) {
grunt.config.merge({
imagemin: {
slider: {
files: [{
expand: true,
cwd: 'bower_components/cacao/modules/slider/images',
src: ['**/*.{png,jpg,gif}'],
dest: '<%= glob... | Update path of slider images. | Update path of slider images.
| JavaScript | mit | aptuitiv/cacao |
ad80b2068cdb6804ffe22f9d98b19ee1a19ea6c3 | packages/non-core/bundle-visualizer/package.js | packages/non-core/bundle-visualizer/package.js | Package.describe({
version: '1.1.1',
summary: 'Meteor bundle analysis and visualization.',
documentation: 'README.md',
});
Npm.depends({
"d3-selection": "1.0.5",
"d3-shape": "1.0.6",
"d3-hierarchy": "1.1.4",
"d3-transition": "1.0.4",
"d3-collection": "1.0.4",
"pretty-bytes": "4.0.2",
});
Package.onU... | Package.describe({
version: '1.1.2',
summary: 'Meteor bundle analysis and visualization.',
documentation: 'README.md',
});
Npm.depends({
"d3-selection": "1.0.5",
"d3-shape": "1.0.6",
"d3-hierarchy": "1.1.4",
"d3-transition": "1.0.4",
"d3-collection": "1.0.4",
"pretty-bytes": "4.0.2",
});
Package.onU... | Bump bundle-visualizer patch version to 1.1.2. | Bump bundle-visualizer patch version to 1.1.2.
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor |
49965cc87d2f9ebf8ce7b0601845533b4721ecff | test/spec/sanity-checks.js | test/spec/sanity-checks.js | /* global describe, it, before */
var request = require('supertest')
var assert = require('assert')
var path = require('path')
var fs = require('fs')
/**
* Basic sanity checks on the dev server
*/
describe('The prototype kit', function () {
var app
before(function (done) {
app = require('../../server')
... | /* eslint-env mocha */
var request = require('supertest')
var app = require('../../server.js')
var path = require('path')
var fs = require('fs')
var assert = require('assert')
/**
* Basic sanity checks on the dev server
*/
describe('The prototype kit', function () {
it('should generate assets into the /public fold... | Simplify the sanity test check | Simplify the sanity test check
App doesn't need to listen in the test script as supertest accepts the
app variable and handles the listening and un-listening itself.
This also removes the needs for the after block to stop the server.
| JavaScript | mit | hannalaakso/accessible-timeout-warning,alphagov/govuk_prototype_kit,nhsbsa/ppc-prototype,joelanman/govuk_prototype_kit,davedark/proto-timeline,companieshouse/ch-accounts-prototype,Demwunz/esif-prototype,danblundell/verify-local-patterns,Demwunz/esif-prototype,abbott567/govuk_prototype_kit,dwpdigitaltech/ejs-prototype,c... |
f4ef68a267821b41409b60d1f3efe51e7a8cd588 | tests/dujs/modelfactory.js | tests/dujs/modelfactory.js | /**
* Created by ChengFuLin on 2015/6/10.
*/
var factoryAnalyzedCFG = require('../../lib/dujs').factoryAnalyzedCFG,
should = require('should');
describe('ModelFactory', function () {
"use strict";
describe('Factory Method', function () {
it('should support to create empty Model', function () {
... | /*
* Test cases for ModelFactory
* @lastmodifiedBy ChengFuLin(chengfulin0806@gmail.com)
* @lastmodifiedDate 2015-08-14
*/
var factoryModel = require('../../lib/dujs/modelfactory');
var should = require('should');
describe('ModelFactory', function () {
"use strict";
describe('public methods', function () {
... | Refactor test cases for ModelFactory | Refactor test cases for ModelFactory
| JavaScript | mit | chengfulin/dujs,chengfulin/dujs |
1a71a91e9b143625d5863c21dc9de039e38541a2 | src/user/components/online_payments.js | src/user/components/online_payments.js | import React from 'react'
import CreaditCardPayment from './credit_card_payment.js'
import Paypal from './paypal.js'
export default (props) => {
return props.user_payments.payment_sent
? SuccessfulPayment(props)
: (props.user_payments.braintree_error ? Error() : PaymentOptions(props))
}
const Error = () ... | import React from 'react'
import CreaditCardPayment from './credit_card_payment.js'
import Paypal from './paypal.js'
export default (props) => {
return props.user_payments.payment_sent
? SuccessfulPayment(props)
: (props.user_payments.braintree_error ? Error() : PaymentOptions(props))
}
const Error = () ... | Add paypal component to online payments. | Add paypal component to online payments.
| JavaScript | mit | foundersandcoders/sail-back,foundersandcoders/sail-back |
d23aed5fd0e19b5a6612211810ebce796af3db58 | sieve-of-eratosthenes.js | sieve-of-eratosthenes.js | // Sieve of Eratosthenes
/*RULES:
Function takes one parameter
Return an array of all prime numbers from 0-parameter
*/
/*PSEUDOCODE:
1) Find square root of parameter
2) Create an array of numbers from 0-parameter
3) Loop through numbers, but stop until square root (if a float, stop after number rounded up?... | // Sieve of Eratosthenes
/*RULES:
Function takes one parameter
Return an array of all prime numbers from 0-parameter
*/
/*PSEUDOCODE:
1) Find square root of parameter
2) Create an array of numbers from 0-parameter
3) Loop through numbers, but stop until square root (if a float, stop after number rounded up?... | Create var arr that creates the needed array depending on the given param | Create var arr that creates the needed array depending on the given param
| JavaScript | mit | benjaminhyw/javascript_algorithms |
2b5f19052395fd6364bd488b85e37f15b9a9bda9 | cmds/create.js | cmds/create.js | 'use strict';
/*
* /create [name] - Creates a voice-chat channel. Optionally names it, otherwise names it Username-[current game]
*
*/
class Create{
constructor (bot, config) {
this.bot = bot;
this.config = config;
}
get command () { return 'create' }
// Message input, user id <sn... | 'use strict';
/*
* /create [name] - Creates a voice-chat channel. Optionally names it, otherwise names it Username-[current game]
*
*/
class Create{
constructor (bot, config) {
this.bot = bot;
this.config = config;
}
get command () { return 'create' }
// Message input, user id <sn... | Add temp channel init with game name | Add temp channel init with game name
| JavaScript | mit | Just-Fans-Of/Impromp2 |
9d7c0cf74c1f7c1791cfe9ec8a36edca7a2b646d | sms-notifier/LambdaFunction.js | sms-notifier/LambdaFunction.js | // Sample Lambda Function to send notifications via text when an AWS Health event happens
var AWS = require('aws-sdk');
var sns = new AWS.SNS();
// define configuration
const phoneNumber =''; // Insert phone number here. For example, a U.S. phone number in E.164 format would appear as +1XXX5550100
//main function wh... | // Sample Lambda Function to send notifications via text when an AWS Health event happens
var AWS = require('aws-sdk');
var sns = new AWS.SNS();
//main function which gets AWS Health data from Cloudwatch event
exports.handler = (event, context, callback) => {
//get phone number from Env Variable
var phoneNumb... | Switch phone number to Environment Variable (instead of const) | Switch phone number to Environment Variable (instead of const)
| JavaScript | apache-2.0 | chetankrishna08/aws-health-tools,robperc/aws-health-tools,robperc/aws-health-tools,chetankrishna08/aws-health-tools |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.