commit stringlengths 40 40 | old_file stringlengths 4 236 | new_file stringlengths 4 236 | old_contents stringlengths 1 3.26k | new_contents stringlengths 16 4.43k | subject stringlengths 16 624 | message stringlengths 17 3.29k | lang stringclasses 5
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
e9d96c7a4af0c8a973dfed0a009da39cd30d06a9 | resources/frontend/app/pods/tournament/matches/route.js | resources/frontend/app/pods/tournament/matches/route.js | import Ember from 'ember';
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';
export default Ember.Route.extend(ApplicationRouteMixin, {
model() {
const tournamentId = this.modelFor('tournament').get('id');
return this.store.query('match', {tournamentId});
},
setupControlle... | import Ember from 'ember';
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';
const { Route, RSVP } = Ember;
export default Route.extend(ApplicationRouteMixin, {
model() {
const tournamentId = this.modelFor('tournament').get('id');
let rsvpHash = {
matches: this.get('stor... | Load teams on the first load of the tournament matches page | Load teams on the first load of the tournament matches page
| JavaScript | mit | nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf |
1113d8d922fca15167d897decb5383569dff5c73 | js/participantFilter/datasetView.directive.js | js/participantFilter/datasetView.directive.js | 'use strict';
module.exports = DatasetView;
/** @ngInject **/
function DatasetView() {
return {
scope: {
participant: '=',
dataset: '=',
onEdit: '&'
},
template: require('./datasetView.directive.html'),
controllerAs: 'vm',
bindToController: true,
/** @ngInject **/
cont... | 'use strict';
module.exports = DatasetView;
/** @ngInject **/
function DatasetView() {
return {
scope: {
participant: '=',
dataset: '=',
onEdit: '&'
},
template: require('./datasetView.directive.html'),
controllerAs: 'vm',
bindToController: true,
/** @ngInject **/
cont... | Fix labels using lookups (introduced in 0.0.4) | Fix labels using lookups (introduced in 0.0.4)
| JavaScript | mit | spikeheap/labking,spikeheap/labking |
a64fccdeb92494b9d500571c242969c2dada93bb | src/dataviews/category-dataview/category-model-range.js | src/dataviews/category-dataview/category-model-range.js | var _ = require('underscore');
var Model = require('../../core/model');
/**
* This model is used for getting the total amount of values
* from the category.
*
*/
module.exports = Model.extend({
defaults: {
url: '',
totalCount: 0,
categoriesCount: 0
},
url: function () {
var url = this.get... | var _ = require('underscore');
var Model = require('../../core/model');
/**
* This model is used for getting the total amount of values
* from the category.
*
*/
module.exports = Model.extend({
defaults: {
url: '',
totalCount: 0,
categoriesCount: 0
},
url: function () {
var url = this.get... | Fix widget url generation when missing apikey and authtoken | Fix widget url generation when missing apikey and authtoken
| JavaScript | bsd-3-clause | splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js |
8921a630e7b036cc6be4fa048ed493c98f44a776 | extend.js | extend.js | /*
Example usage:
var A = Class(function() {
var defaults = {
foo: 'cat',
bar: 'dum'
}
this.init = function(opts) {
opts = std.extend(opts, defaults)
this._foo = opts.foo
this._bar = opts.bar
}
this.getFoo = function() {
return this._foo
}
this.getBar = function() {
return th... | /*
Example usage:
var A = Class(function() {
var defaults = {
foo: 'cat',
bar: 'dum'
}
this.init = function(opts) {
opts = std.extend(opts, defaults)
this._foo = opts.foo
this._bar = opts.bar
}
this.getFoo = function() {
return this._foo
}
this.getBar = function() {
return th... | Use copy instead of create for easier debugging | Use copy instead of create for easier debugging
| JavaScript | mit | ASAPPinc/std.js,marcuswestin/std.js |
f53acc88c6a492c4c50c779157f66882df8440f8 | src/routes.js | src/routes.js | 'use strict';
let Games = require('./games.js');
let uuid = require('node-uuid');
let games = new Games(uuid.v4);
exports.registerRoutes = app => {
app.get('/api/stats', (request, response) => {
response.send(games.getAllPlayerStats());
});
app.post('/api/player', (request, response) => {
... | 'use strict';
let Games = require('./games.js');
let uuid = require('node-uuid');
let games = new Games(uuid.v4);
exports.registerRoutes = app => {
app.get('/api', (request, response) => {
response.send({
name: "REST Mastermind server",
endpoints: [
{ endpoint: '/api/stats', met... | Create base api endpoint and adjust player stats path | Create base api endpoint and adjust player stats path
| JavaScript | mit | allan-stewart/rest-mastermind,allan-stewart/rest-mastermind |
0b23fe3209f1f2fbdbfff533b512729902b58561 | modules/utils/EnterLeaveCounter.js | modules/utils/EnterLeaveCounter.js | import union from 'lodash/array/union';
import without from 'lodash/array/without';
export default class EnterLeaveCounter {
constructor() {
this.entered = [];
}
enter(enteringNode) {
this.entered = union(
this.entered.filter(node =>
document.body.contains(node) &&
(!node.contains ... | import union from 'lodash/array/union';
import without from 'lodash/array/without';
export default class EnterLeaveCounter {
constructor() {
this.entered = [];
}
enter(enteringNode) {
this.entered = union(
this.entered.filter(node =>
document.documentElement.contains(node) &&
(!nod... | Fix an edge case when a file is dropped outside <body> | Fix an edge case when a file is dropped outside <body>
| JavaScript | mit | cesarandreu/react-dnd,zetkin/react-dnd,jgable/react-dnd,konce/react-dnd,randrianov/react-dnd,ntdb/react-dnd,hiddentao/react-dnd,craigklem/react-dnd,globexdesigns/react-dnd,nagaozen/react-dnd,Reggino/react-dnd,zetkin/react-dnd,srajko/react-dnd,jowcy/react-dnd,colbyr/react-dnd,tylercollier/react-dnd-demo,pairyo/react-dnd... |
a76f3e4211a34579e7e74a98643f39b2eba53196 | entity.js | entity.js | const createTransform = require('./transform')
const assert = require('assert')
let entityId = 0
function Entity (components, tags, renderer) {
assert(!tags || Array.isArray(tags), 'Entity tags must be an array or null')
this.id = entityId++
this.tags = tags || []
this.renderer = renderer
this.components =... | const createTransform = require('./transform')
const assert = require('assert')
let entityId = 0
function Entity (components, tags, renderer) {
assert(!tags || Array.isArray(tags), 'Entity tags must be an array or null')
this.id = entityId++
this.tags = tags || []
this.renderer = renderer
this.components =... | Add hashmap for fast components lookups | Add hashmap for fast components lookups | JavaScript | mit | pex-gl/pex-renderer,pex-gl/pex-renderer |
110063b2d89c89317f6a11ae045627ddaa58391e | backend/server/db/model/processes.spec.js | backend/server/db/model/processes.spec.js | describe('Processes', function() {
'use strict';
let atf = require('../../specs/atf');
let ropts = {
db: 'mctest',
port: 30815
};
let r = require('rethinkdbdash')(ropts);
let p = require('./processes')(r);
describe('#create', function() {
it('should do something', f... | describe('Processes', function() {
'use strict';
let atf = require('../../specs/atf');
let ropts = {
db: 'mctest',
port: 30815
};
let r = require('rethinkdbdash')(ropts);
let p = require('./processes')(r);
describe('#create', function() {
it('should create a process... | Set up a valid process to begin testing against. | Set up a valid process to begin testing against.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
788d1d26a052fdbf2a6d5be5653c0cf0e2e7b2c1 | server.js | server.js | // Copyright (c) Martin Costello, 2017. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
var AlexaAppServer = require("alexa-app-server");
var env = require("node-env-file");
env(__dirname + "/.env");
console.log("TfL App Id :", pro... | // Copyright (c) Martin Costello, 2017. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
var AlexaAppServer = require("alexa-app-server");
var env = require("node-env-file");
var path = require("path");
env(path.join(__dirname, ".env... | Use path instead of concatenation | Use path instead of concatenation
Use path.join() instead of string concatenation.
| JavaScript | apache-2.0 | martincostello/alexa-london-travel |
479582c83b164ef8802401b3bb1cde1beb75b44e | src/lib/lint.js | src/lib/lint.js | "use strict"
import Context from "./context"
import ShadowTree from "./shadowtree"
class Lint {
constructor(tree, filename = null, namespace = []) {
Object.assign(
this,
{
filename: filename,
namespace: namespace,
tree: tree,
... | "use strict"
import Context from "./context"
import ShadowTree from "./shadowtree"
import PHPStrictError from "./phpstricterror"
class Lint {
static get PHPStrictError() {
return PHPStrictError
}
static get ShadowTree() {
return ShadowTree
}
constructor(tree, filename = null, names... | Use static properties for the sub-items | Use static properties for the sub-items
| JavaScript | bsd-2-clause | jj101k/php-lint,jj101k/php-lint |
4a07b40ee7010a4cff5d1d1a092cd657dfa0efa1 | src/App.js | src/App.js | import React from 'react';
import axios from 'axios';
class App extends React.Component {
render() {
return (
<Abc/>
)
}
}
class Abc extends React.Component {
render() {
return (
<div>
<button onClick={this.getList}>get List</button>
</div>
)
}
getList() {
axio... | import React from 'react';
import axios from 'axios';
class App extends React.Component {
render() {
return (
<SiteList/>
)
}
}
class SiteInfo extends React.Component {
render() {
return(
<li>{this.props.rId} - {this.props.url}, {this.props.count}, {this.props.creation}, {th... | Add get list ui and feature | Add get list ui and feature
| JavaScript | mit | junorouse/valid-xss-checker,junorouse/valid-xss-checker |
ad7fe2e1971062b92355463655e4032df4f5590d | shared/docs.js | shared/docs.js | // Scans your stylesheet for pseudo classes and adds a class with the same name.
// Thanks to Knyle Style Sheets for the idea.
(function () {
'use strict';
var toArray = function(arr) {
return Array.prototype.slice.call(arr, 0);
};
var add = function(a, b) { return a + b; };
// Compile regular expression.
var pse... | // Scans your stylesheet for pseudo classes and adds a class with the same name.
// Thanks to Knyle Style Sheets for the idea.
(function () {
'use strict';
var toArray = function(arr) { return Array.prototype.slice.call(arr, 0); };
var add = function(a, b) { return a + b; };
// Compile regular expression.
var pseudo... | Remove bonzo and qwery dependencies | Remove bonzo and qwery dependencies
| JavaScript | mit | trungnghia112/styledocco,paulwellnerbou/styledocco,paulwellnerbou/styledocco,jacobrask/styledocco,ooooooo-q/styledocco,ooooooo-q/styledocco,trungnghia112/styledocco |
a8374d7bc31e55ca865952e96087860ba7c08cf3 | test/spec/spec-smoothScroll.js | test/spec/spec-smoothScroll.js | describe('Smooth Scroll', function () {
describe('init', function () {
it('should include the smoothScroll module', function () {
expect(!!smoothScroll).toBe(true);
});
});
});
| describe('Smooth Scroll', function () {
describe('API', function () {
it('should export the smoothScroll module', function () {
expect(smoothScroll).toBeDefined();
});
it('should expose public functions', function () {
expect(smoothScroll.init).toEqual(jasmine.any(F... | Add simple public API tests | Add simple public API tests
| JavaScript | mit | iksi/smooth-scroll,krrg/smooth-scroll,outsourceage/smooth-scroll,fussinatto/smooth-scroll,cferdinandi/smooth-scroll,krrg/smooth-scroll,iksi/smooth-scroll,hadrienl/smooth-scroll,SevInf/smooth-scroll,zonayedpca/smooth-scroll,mig1098/smooth-scroll,fussinatto/smooth-scroll,SevInf/smooth-scroll,outsourceage/smooth-scroll,cf... |
0a9a3389c33e82b39c5ac19b132eef8fcbe1aee7 | Gulpfile.js | Gulpfile.js | const gulp = require('gulp');
const config = require('config');
const runner = require('punchcard-runner');
const options = runner.config({
application: {
library: {
src: [
'lib',
'config',
'content-types',
'input-plugins'
],
}
},
tasks: {
nodemon: {
... | const gulp = require('gulp');
const config = require('config');
const runner = require('punchcard-runner');
const concat = require('gulp-concat');
const uglify = require('gulp-uglify');
const imagemin = require('gulp-imagemin');
const path = require('path');
const options = runner.config({
application: {
library... | Fix Punchcard JS and images compilation | :bug: Fix Punchcard JS and images compilation
| JavaScript | apache-2.0 | punchcard-cms/demo,punchcard-cms/demo |
00123a872cc25c1b697811346ff1ec864d02cf73 | Gulpfile.js | Gulpfile.js | var gulp = require('gulp'),
less = require('gulp-less'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
notify = require('gulp-notify'),
rename = require('gulp-rename');
gulp.task('less', function() {
return gulp.src('less/caffeine.less')
.pipe(less())
.pipe(autoprefixer... | var gulp = require('gulp'),
less = require('gulp-less'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
notify = require('gulp-notify'),
rename = require('gulp-rename');
gulp.task('less', function() {
return gulp.src('less/caffeine.less')
.pipe(less())
.pipe(autoprefixer... | Set gulp autoprefixer cascade to true | Set gulp autoprefixer cascade to true
| JavaScript | mit | olumby/caffeine,olumby/caffeine |
96ed95da89b7dca4669e0f837a55baa362d064ae | frontend/src/plugins/vuetify.js | frontend/src/plugins/vuetify.js | // You still need to register Vuetify itself
// src/plugins/vuetify.js
import Vuetify from 'vuetify/lib'
import PbsLogo from '@/assets/PbsLogo.svg'
import GoogleLogo from '@/assets/GoogleLogo.svg'
import eCampLogo from '@/assets/eCampLogo.svg'
import i18n from '@/plugins/i18n'
class VuetifyLoaderPlugin {
install (V... | // You still need to register Vuetify itself
// src/plugins/vuetify.js
import Vuetify from 'vuetify/lib'
import PbsLogo from '@/assets/PbsLogo.svg'
import GoogleLogo from '@/assets/GoogleLogo.svg'
import eCampLogo from '@/assets/eCampLogo.svg'
import i18n from '@/plugins/i18n'
import colors from 'vuetify/lib/util/colo... | Adjust error color to be darker | Adjust error color to be darker
| JavaScript | agpl-3.0 | usu/ecamp3,pmattmann/ecamp3,pmattmann/ecamp3,ecamp/ecamp3,usu/ecamp3,pmattmann/ecamp3,usu/ecamp3,ecamp/ecamp3,pmattmann/ecamp3,ecamp/ecamp3,ecamp/ecamp3,usu/ecamp3 |
ea51980646b7f719f0717fb6fcc24273b78642dc | backend/timestamp-microservice/src/dateChecker.js | backend/timestamp-microservice/src/dateChecker.js | const checkDate = () => {
return;
}
module.exports = checkDate;
| const checkDate = (dateString) => {
if (isNaN(Date.parse(dateString))) {
return false;
}
return true;
}
module.exports = checkDate;
| Implement checkDate function for date string arguments | Implement checkDate function for date string arguments
| JavaScript | mit | mkermani144/freecodecamp-projects,mkermani144/freecodecamp-projects |
f07bb14d90525ed304d072ea8e8017ece05f94ef | dripBot-css.js | dripBot-css.js | $('#dripbot-title').css({
"display": "inline-block",
"margin-right": "20px"
});
$('#dripbot').css({
"text-align": "left"
});
$('#dripbot-toggle.stop').css({
"background-color": "#e9656d",
"color": "white",
"margin-top": "-10px"
});
$('#dripbot ul li p').css({
"margin-bottom":"5px",
"margin-right": "... | $('#dripbot-title').css({
"display": "inline-block",
"margin-right": "20px"
});
$('#dripbot').css({
"text-align": "left"
});
$('#dripbot-toggle.stop').css({
"background-color": "#e9656d",
"color": "white",
"margin-top": "-10px"
});
$('#dripbot ul li p').css({
"margin-bottom":"5px",
"margin-right": "... | Remove css to apply each time. | Remove css to apply each time.
| JavaScript | mit | catofclysm/testing,catofclysm/testing,kyotie/bot,kyotie/bot,apottere/DripBot,apottere/DripBot |
7406b87053003b9a23f8e12dbbc65735d7c079ce | agar-mass-ejector.user.js | agar-mass-ejector.user.js | // ==UserScript==
// @name agar-mass-ejector
// @namespace http://github.com/dimotsai/
// @version 0.02
// @description A faster, continuous mass ejector for agar.
// @author dimotsai
// @license MIT
// @match http://agar.io/
// @grant none
// @run-at document-end
// ==/U... | // ==UserScript==
// @name agar-mass-ejector
// @namespace http://github.com/dimotsai/
// @version 0.03
// @description A faster, continuous mass ejector for agar.
// @author dimotsai
// @license MIT
// @match http://agar.io/*
// @grant none
// @run-at document-end
// ==/... | Increase compatibility with other plugins | Increase compatibility with other plugins
Plugins such as viptool+ or 大虫
| JavaScript | mit | dimotsai/agar-mass-ejector |
132ed270e82dac02cc555b6e78ef959487f85182 | scholar.js | scholar.js | window.onload = initialize;
var DATAFILE = "research.json";
var DONE_READYSTATE = 4;
var DONE_STATUS = 200;
var OFFICIAL_URL = "http://www.ecst.csuchico.edu/~kbuffardi/";
var OFFICIAL_HOST = "www.ecst.csuchico.edu"
var references = {};
function initialize()
{
validateHost();
//loadExternalData();
}
function val... | window.onload = initialize;
var DATAFILE = "research.json";
var DONE_READYSTATE = 4;
var DONE_STATUS = 200;
var OFFICIAL_URL = "https://kbuffardi.github.io/ScholarWebsite/";
var OFFICIAL_HOST = "kbuffardi.github.io"
var references = {};
function initialize()
{
validateHost();
//loadExternalData();
}
function va... | Switch to GitHub Pages as Host | Switch to GitHub Pages as Host
| JavaScript | mit | kbuffardi/ScholarWebsite,kbuffardi/ScholarWebsite |
460be4e2357ee15ab2a08fa078015d9989a07c5f | server/handlers.js | server/handlers.js | 'use strict';
var request = require('request');
var randomstring = require('randomstring');
var db = require('./database');
var handlers = {
showIntro: function(req, res) {
res.render('intro');
},
createGame: function(req, res) {
var gameKey = randomstring.generate(5);
db.getOrCr... | 'use strict';
var request = require('request');
var randomstring = require('randomstring');
var db = require('./database');
var handlers = {
showIntro: function(req, res) {
res.render('intro');
},
createGame: function(req, res) {
var gameKey = randomstring.generate(5);
db.getOrCr... | Determine protocol when generating game links | Determine protocol when generating game links
| JavaScript | mit | njmcode/ggj-2016,njmcode/ggj-2016 |
4ecc2a2db9476648cb4dc34ee31d00a0109340ff | chrome/browser/resources/chromeos/login/demo_user_login.js | chrome/browser/resources/chromeos/login/demo_user_login.js | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @fileoverview Demo login UI.
*/
/**
* Handles a user clicking anywhere on the screen. This will log the demo user
* in. Yes, this actually ... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @fileoverview Demo login UI.
*/
/**
* Handles a user clicking anywhere on the screen. This will log the demo user
* in. Yes, this actually ... | Fix possible issue with multiple clicks on demo login screen. Though this doesn't currently repro, there is a possibility that if the demo login flow takes too long, a user clicking really fast on the login screen may see unexpected behavior due to multiple login attempts being kicked off. This CL will ensure that that... | Fix possible issue with multiple clicks on demo login screen.
Though this doesn't currently repro, there is a possibility that if the demo login flow takes too long, a user clicking really fast on the login screen may see unexpected behavior due to multiple login attempts being kicked off.
This CL will ensure that that... | JavaScript | bsd-3-clause | crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,markYoungH/chromium.src,chuan9/chromium-crosswalk,markYoungH/chromium.src,timopulkkinen/BubbleFish,jaruba/chromium.src,hujiajie... |
76feb621911c334ec424f56f9fce2d1630c1c1f6 | client/templates/registerWizard/wizard.js | client/templates/registerWizard/wizard.js | Template.registerWizard.helpers({
'steps': function () {
return [
{
id: 'registrant',
title: 'Registrant',
schema: WizardSchemas.registrant
},
{
id: 'contact',
title: 'Contact',
schema: WizardSchemas.contact
}
]
}
});
| Template.registerWizard.helpers({
'steps': function () {
return [
{
id: 'registrant',
title: 'Registrant',
schema: WizardSchemas.registrant,
template: "wizardRegistrant",
formId: "wizard-registrant"
},
{
id: 'contact',
title: 'Contact',
... | Use custom template for registrant step | Use custom template for registrant step
| JavaScript | agpl-3.0 | quaker-io/pym-online-registration,quaker-io/pym-online-registration,quaker-io/pym-2015,quaker-io/pym-2015 |
3d742285efddba5b71e6d59af1dd8d4a5ca90fe4 | webpack/base.js | webpack/base.js | const path = require('path')
const webpack = require('webpack')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
module.exports = {
entry: [path.resolve(__dirname, '../client/index.js')],
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loaders: ['bab... | const path = require('path')
const webpack = require('webpack')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
module.exports = {
entry: [path.resolve(__dirname, '../client/index.js')],
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loaders: ['bab... | Configure bundling for images and fonts | Configure bundling for images and fonts
| JavaScript | mit | CodingZeal/react-boilerplate,CodingZeal/react-boilerplate |
1de51f5756c91effc7054f879acc7cd239796659 | entry_points/harmonic.js | entry_points/harmonic.js | 'use strict';
require('./lib/polyfill');
module.exports = require('../dist/bin/cli/harmonic');
| #!/usr/bin/env node
'use strict';
require('./lib/polyfill');
module.exports = require('../dist/bin/cli/harmonic');
| Fix bin entry point for Unix-based OS's | Fix bin entry point for Unix-based OS's
| JavaScript | mit | thotty/harmonic,JSRocksHQ/harmonic,joaopauloti/harmonic,robsongajunior/harmonic,viniciusdacal/harmonic,mauricionr/harmonic |
4d1dbddf920975ea1dd6e652c78f4cbe78284240 | routes/users.js | routes/users.js | var express = require('express');
var router = express.Router();
var usersController = require('../controllers/users');
/**
* Get all
*/
router.get('/', usersController.all);
/**
* Get by id
*/
router.get('/:userId', usersController.user);
/**
* Create
*/
router.post('/', usersController.create);
/**
* Updat... | var express = require('express');
var router = express.Router();
var usersController = require('../controllers/users');
/**
* Get all
*/
router.get('/', usersController.all);
/**
* Get by id
*/
router.get('/:userId', usersController.user);
/**
* Create
*/
router.post('/', usersController.create);
/**
* Updat... | Add login and logout route | Add login and logout route
| JavaScript | mit | 99999989/sample-manager-server,99999989/sample-manager-server,99999989/sample-manager-server |
e920daf053c68538c3103e7d4b8bad1e7bb4678f | app/views/language-switch.js | app/views/language-switch.js | import Ember from "ember";
import translations from "croodle/lang/translations";
/* global Croodle */
export default Ember.View.extend({
templateName: 'language-switch',
languages: function() {
var languages = [];
for(var lang in translations) {
languages.push(lang);
}
return languages;
... | import Ember from "ember";
import translations from "croodle/lang/translations";
/* global Croodle */
export default Ember.View.extend({
templateName: 'language-switch',
languages: function() {
var languages = [];
for(var lang in translations) {
languages.push(lang);
}
return languages;
... | Fix not working language switch in production environment | Fix not working language switch in production environment
Fixes #64
| JavaScript | mit | jelhan/croodle,jelhan/croodle,jelhan/croodle |
296fe1c24a982ffe1d7fa6f8b056f5f0a0d2a908 | connected_components/javascript/adjacency_list.js | connected_components/javascript/adjacency_list.js | export class AdjacencyList {
constructor(graph) {
this.a = constructAdjacencyList(graph);
}
depthFirstSearch(start, earlyCallback) {
depthFirstSearch(this.a, start, earlyCallback);
}
}
function constructAdjacencyList(graph) {
// new Array(vertexCount).fill([]) does not work because ... | export class AdjacencyList {
constructor(graph) {
this.a = constructAdjacencyList(graph);
}
depthFirstSearch(start, earlyCallback) {
depthFirstSearch(this.a, start, earlyCallback);
}
}
function constructAdjacencyList(graph) {
// new Array(vertexCount).fill([]) does not work because ... | Replace fat arrow by traditional function for clarity | [connected_components/javascript] Replace fat arrow by traditional function for clarity
| JavaScript | mit | peferron/algo,peferron/algo,peferron/algo,peferron/algo,peferron/algo,peferron/algo |
d3890708919d4c6a7f403a104ea5774f7130eb77 | src/components/MediaList/LoadingRow.js | src/components/MediaList/LoadingRow.js | import cx from 'clsx';
import React from 'react';
import PropTypes from 'prop-types';
import MediaLoadingIndicator from './MediaLoadingIndicator';
const LoadingRow = ({
className,
selected = false,
...attrs
}) => (
<div
className={cx('MediaListRow', 'is-loading', className, selected && 'is-selected')}
... | import cx from 'clsx';
import React from 'react';
import PropTypes from 'prop-types';
import MediaLoadingIndicator from './MediaLoadingIndicator';
const LoadingRow = ({
className,
selected = false,
...attrs
}) => (
<div
className={cx('MediaListRow', 'is-loading', className, selected && 'is-selected')}
... | Fix loading media list row layout | Fix loading media list row layout
| JavaScript | mit | u-wave/web,u-wave/web |
903c8677deeb379cf8f3881fe1e46c43f0d2dc17 | example/app.js | example/app.js | 'use strict'
const sitemap = require('./../index')
const express = require('express')
const app = express()
const core = new express.Router()
const other = new express.Router()
app.use('/core', core)
app.use(other)
// express routing
core.get('/', function(req, res) {
res.send('hello /')
}).get('/admin', functio... | 'use strict'
const sitemap = require('./../index')
const express = require('express')
const app = express()
const core = new express.Router()
const other = new express.Router()
app.use(express.urlencoded({extended: false}))
app.use(express.json())
app.use('/core', core)
app.use(other)
// express routing
core.get('/'... | Update example to check for query and body parameters. | Update example to check for query and body parameters.
| JavaScript | mit | fmcarvalho/express-sitemap-html |
596b298eb0e18bc3a8ce4cd90656e21f77e962b9 | app/geocoders/mapquest.js | app/geocoders/mapquest.js | var request = require('request');
var {processAddress, prefetchAddress} = require('./utils');
const GEOCODE_BASE_URL = 'http://open.mapquestapi.com/geocoding/v1/address';
function MapQuest(apiKey) {
this.key = apiKey;
return this;
}
MapQuest.prototype.geocode = function (address, location) {
return new Promis... | var request = require('request');
var {processAddress, prefetchAddress} = require('./utils');
const GEOCODE_BASE_URL = 'http://open.mapquestapi.com/geocoding/v1/address';
function MapQuest(apiKey) {
this.key = apiKey;
return this;
}
MapQuest.prototype.geocode = function (address, location) {
return new Promis... | Fix bug that was crashing worker. | Fix bug that was crashing worker.
| JavaScript | mit | keokilee/hitraffic-worker,hitraffic/worker |
922f03384944e0c3e6664ffae4ed476efbfccc67 | web/src/components/ConfigEditor.js | web/src/components/ConfigEditor.js | import React from 'react'
import AceEditor from 'react-ace'
import 'brace/mode/yaml'
import 'brace/theme/github'
import './ConfigEditor.scss'
export default function ConfigEditor(props) {
return (
<AceEditor mode="yaml" theme="github" name="config-editor" {...props} />
)
}
| import React from 'react'
import AceEditor from 'react-ace'
import 'brace/mode/yaml'
import 'brace/theme/dawn'
import './ConfigEditor.scss'
export default function ConfigEditor(props) {
return <AceEditor mode="yaml" theme="dawn" name="config-editor" {...props} />
}
| Change config editor theme to dawn | Change config editor theme to dawn
| JavaScript | mit | slice/dogbot,sliceofcode/dogbot,slice/dogbot,slice/dogbot,sliceofcode/dogbot |
0714797f65ce689f5bad2066e82ebd162dc598a7 | app/public/sa-tracking.js | app/public/sa-tracking.js | 'use strict';
var events = [];
var requestInterval = 5000;
window.addEventListener('click', function(e) {
e = event || window.event;
events.push(processEvent(e));
});
var processEvent = function(e) {
// Event attributes
var eventProps = ['type', 'timeStamp'];
// Event target attributes
var targetP... | 'use strict';
var events = [];
var requestInterval = 5000;
window.addEventListener('click', function(e) {
e = event || window.event;
events.push(processEvent(e));
});
var processEvent = function(e) {
// Event attributes
var eventProps = ['type', 'timeStamp'];
// Event target attributes
var targetP... | Refactor xhr functionality into ajax object | Refactor xhr functionality into ajax object
| JavaScript | mit | Sextant-WDB/sextant-ng |
ab4c92508eefce6ed440c18a0cbaebd5aa29b731 | app/routes/raids/index.js | app/routes/raids/index.js | import Ember from 'ember';
/* global moment */
export default Ember.Route.extend({
model: function() {
return this.store.filter('raid', { 'current': true }, function(raid) {
return moment(raid.get('date')).subtract(6, 'hours').isAfter();
});
},
setupController: function (controller, model) {
c... | import Ember from 'ember';
/* global moment */
export default Ember.Route.extend({
model: function() {
return this.store.filter('raid', {}, function(raid) {
return moment(raid.get('date')).subtract(6, 'hours').isAfter();
});
},
setupController: function (controller, model) {
controller.set('mo... | Use an empty query when grabbing filtered raids | Use an empty query when grabbing filtered raids
| JavaScript | mit | kelsin/coretheloothound,kelsin/coretheloothound |
0724d01d034a3eb3ea8e0158058d366d87b1fbc7 | test/index.js | test/index.js | var chai = require('chai');
chai.should();
// var expect = chai.expect;
// var should = chai.should();
var jetconfig = require('../index.js');
describe('#get()', function (){
it("should return a default value", function () {
jetconfig.get('foo', true).should.equal(true);
});
});
| var chai = require('chai');
chai.should();
// var expect = chai.expect;
// var should = chai.should();
var jetconfig = require('../index.js');
before(function (done) {
console.dir(process.env);
done(new Error("Does this work?"));
});
describe('#get()', function (){
it("should return a default value", f... | Create a failing before-all hook. | Create a failing before-all hook.
| JavaScript | apache-2.0 | shakefu/jetconfig |
ec512a22188219c4538b39b46def0eb1e14fcbb9 | src/app.js | src/app.js | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Board } from './containers';
import './styles/app.scss';
class App extends Component {
render() {
return <Board />;
}
}
ReactDOM.render(<App />, document.getElementById('app'));
| import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import ReactDOM from 'react-dom';
import { Board } from './containers';
import './styles/app.scss';
const store = createStore(() => { return {}; });
class App extends Component {
render() {
re... | Add basic Redux Provider with store | Add basic Redux Provider with store
| JavaScript | mit | inooid/react-redux-card-game,inooid/react-redux-card-game |
5f5ebcfc868e1c3690890a11cc16be94c41e9919 | test/setup.js | test/setup.js | // Copyright (c) Rotorz Limited. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root.
import given from "mocha-testdata";
import should from "should";
import webreed from "../src";
describe("#setup(options)", function () {
it("is a function", function () {
webreed
... | // Copyright (c) Rotorz Limited. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root.
// Packages
import given from "mocha-testdata";
import should from "should";
// Project
import webreed from "../src";
describe("#setup(options)", function () {
it("is a function", funct... | Add header comments to keep system, package and project imports separate. | Add header comments to keep system, package and project imports separate.
| JavaScript | mit | webreed/webreed,webreed/webreed |
9811418bc7619f10522342b8eb0c7b360f1cb7c2 | src/cli.js | src/cli.js | import {dest} from 'vinyl-fs';
import drFrankenstyle from './dr-frankenstyle';
const argv = require('yargs')
.usage('Usage: dr-frankenstyle <output-dir>')
.example('dr-frankenstyle my_assets_dir')
.demand(1, 'Please provide an output directory')
.boolean('rails')
.argv;
const output = argv._[0];
let stream... | import {dest} from 'vinyl-fs';
import drFrankenstyle from './dr-frankenstyle';
const argv = require('yargs')
.usage('Usage: dr-frankenstyle [options] <output-dir>')
.example('dr-frankenstyle my_assets_dir')
.demand(1, 'Please provide an output directory')
.boolean('rails')
.describe('rails', "Use Rails' asse... | Document rails option in CLI tool | Document rails option in CLI tool
Signed-off-by: Vinson Chuong <6df075c17c17de53656cfe2eb11616735a18bb18@pivotal.io>
| JavaScript | mit | bartvde/dr-frankenstyle,pivotal-cf/dr-frankenstyle |
db269537a14f6c3be00d681d9e8c5666cf5806af | src/reducers/index.js | src/reducers/index.js | export function stub(state = {}, action) {
return state;
}
| // Tentative schema for the overall app store:
//
//
// interface Media {
// id: string;
// kind: 'audio' | 'video';
// owner: string;
// stream: Object;
// audioState: 'active' | 'muted' | 'not-available' | 'error';
// videoState: 'active' | 'muted' | 'not-available' | 'error';
/... | Add the tentative schema for the redux store | Add the tentative schema for the redux store
| JavaScript | apache-2.0 | jitsi/jitsi-meet-react,jitsi/jitsi-meet-react,jitsi/jitsi-meet-react,jitsi/jitsi-meet-react |
87a28a1e8466e46129a746691763a2e2642e3fa8 | src/routing/router.js | src/routing/router.js | import url from "url";
import mixin from "merge-descriptors";
import wildcard from "wildcard-named";
export default {
callbacks : {},
when( uri ) {
return new Promise( resolve => {
this.callbacks[ url.resolve( this.base, uri ) ] = resolve;
} );
},
check( uri, req, ... | import url from "url";
import request from "retry-request";
import mixin from "merge-descriptors";
import wildcard from "wildcard-named";
export default {
callbacks : {},
when( uri ) {
return new Promise( resolve => {
this.callbacks[ url.resolve( this.base, uri ) ] = resolve;
... | Add get method to request a single resource | Add get method to request a single resource
| JavaScript | mit | Bartozzz/crawlerr |
ddedb7d7f88553dfbfcbd494996c2b451997fac2 | app/lagniappe/dependencies/Composer.js | app/lagniappe/dependencies/Composer.js | import Dependency from './Dependency'
export default class Composer extends Dependency {
default()
{
this.dependencyName = 'PHP Composer'
this.required = true
}
mac() {
this.dependencyLink = 'https://github.com/laravel/valet'
this.dependencyDocumentation = 'https://la... | import Dependency from './Dependency'
export default class Composer extends Dependency {
default()
{
this.dependencyName = 'PHP Composer'
this.required = true
}
mac() {
this.dependencyLink = 'https://getcomposer.org/'
this.dependencyDocumentation = 'https://getcompose... | Add proper composer link and docs | Add proper composer link and docs
| JavaScript | mit | baublet/lagniappe,baublet/lagniappe |
35ca195d9e207577f92e128a70f835949023b29c | test/unit/controllersSpec.js | test/unit/controllersSpec.js | 'use strict';
/* jasmine specs for controllers go here */
describe('RootCtrl', function(){
var scope;
beforeEach(module('swiftBrowser.controllers'));
beforeEach(inject(function($controller) {
scope = {};
$controller('RootCtrl', {$scope: scope});
}));
it('should list containers',... | 'use strict';
/* jasmine specs for controllers go here */
describe('RootCtrl', function(){
var scope;
beforeEach(module('swiftBrowser.controllers'));
beforeEach(inject(function($controller) {
scope = {};
$controller('RootCtrl', {$scope: scope});
}));
it('should list containers',... | Add unit test for ContainerCtrl | Add unit test for ContainerCtrl
| JavaScript | apache-2.0 | mindware/swift-browser,mgeisler/swift-browser,mindware/swift-browser,zerovm/swift-browser,zerovm/swift-browser,mgeisler/swift-browser |
c6650cbf672b4c5fc2e646e48ced5a0179b0292a | jest.config.js | jest.config.js | module.exports = {
testURL: 'http://localhost/',
moduleFileExtensions: ['js', 'jsx', 'json', 'styl'],
setupFiles: ['<rootDir>/test/jestLib/setup.js'],
moduleDirectories: ['src', 'node_modules'],
moduleNameMapper: {
'^redux-cozy-client$': '<rootDir>/src/lib/redux-cozy-client',
'\\.(png|gif|jpe?g|svg)$'... | module.exports = {
testURL: 'http://localhost/',
moduleFileExtensions: ['js', 'jsx', 'json', 'styl'],
setupFiles: ['<rootDir>/test/jestLib/setup.js'],
moduleDirectories: ['src', 'node_modules'],
moduleNameMapper: {
'^redux-cozy-client$': '<rootDir>/src/lib/redux-cozy-client',
'\\.(png|gif|jpe?g|svg)$'... | Add cozy-keys-lib exception to transformIgnorePatterns | test: Add cozy-keys-lib exception to transformIgnorePatterns
| JavaScript | agpl-3.0 | cozy/cozy-home,cozy/cozy-home,cozy/cozy-home |
243696b8ca118b29a2af95070b613800738b9cc2 | app/stores/RendererStore.js | app/stores/RendererStore.js | import EventEmitter from 'events';
import { RESIZE } from '../constants/AppConstants';
class RendererStore extends EventEmitter {
constructor(...args) {
super(...args);
this.data = {
width: 0,
height: 0,
stageWidth: 0,
stageHeight: 0,
stageCenter: {x: 0,y: 0},
resolution... | import EventEmitter from 'events';
import { RESIZE } from '../constants/AppConstants';
class RendererStore extends EventEmitter {
constructor(...args) {
super(...args);
this.data = {
width: 0,
height: 0,
stageWidth: 0,
stageHeight: 0,
stageCenter: {x: 0,y: 0},
resolution... | Add data to resize callback | Add data to resize callback
| JavaScript | mit | edwinwebb/pixi-seed,edwinwebb/pixi-seed,edwinwebb/three-seed |
68b599377c3906ea90c14957a5601cd57d6276a5 | app/templates/_bootstrap.js | app/templates/_bootstrap.js | 'use strict';
var sdk = require('flowxo-sdk'),
service = require('../');
var credentials = {};
try {
credentials = require('../credentials');
} catch(e) {}
beforeEach(function() {
this.service = service;
this.credentials = credentials;
this.runner = new sdk.ScriptRunner(service, {
credentials: credentia... | 'use strict';
var sdk = require('flowxo-sdk'),
service = require('../');
var credentials = {};
try {
credentials = require('../credentials');
} catch(e) {}
beforeEach(function() {
this.service = service;
// Clone the credentials so they can't be globally
// overwritten by a test spec
this.credentials ... | Clone credentials on each test run | Clone credentials on each test run
| JavaScript | mit | flowxo/generator-flowxo |
8ab80e4c485ae19ad63704e3096492dc9426457f | blueprints/route/index.js | blueprints/route/index.js | var ancestralBlueprint = require('../../lib/ancestral-blueprint');
module.exports = {
description: 'Generates a route and registers it with the router',
availableOptions: [
{
name: 'type',
type: String,
values: ['route', 'resource'],
default: 'route',
aliases:[
{'route': ... | var ancestralBlueprint = require('../../lib/ancestral-blueprint');
module.exports = {
description: 'Generates a route and registers it with the router',
availableOptions: [
{
name: 'type',
type: String,
values: ['route', 'resource'],
default: 'route',
aliases:[
{'route': ... | Correct route blueprint mistakenly looking up wrong blueprint | Correct route blueprint mistakenly looking up wrong blueprint
| JavaScript | mit | ntippie/ember-cli-emblem,Vestorly/ember-cli-emblem,Vestorly/ember-cli-emblem,ntippie/ember-cli-emblem |
953a4fff7b28fb74e3ce862b480d89a675c32e12 | js/reducers.js | js/reducers.js | import { SET_SEARCH_TERM } from './actions'
const DEFAULT_STATE = {
searchTerm: ''
}
const setSearchTerm = (state, action) => {
const newState = {}
Object.assign(newState, state, {searchTerm: action.searchTerm})
}
const rootReducer = (state = DEFAULT_STATE, action) => {
switch (action.type) {
case SET_SE... | import { SET_SEARCH_TERM } from './actions'
const DEFAULT_STATE = {
searchTerm: ''
}
const setSearchTerm = (state, action) => {
const newState = {}
Object.assign(newState, state, {searchTerm: action.searchTerm})
return newState
}
const rootReducer = (state = DEFAULT_STATE, action) => {
switch (action.type)... | Add missing return statement in setSearchTerm | Add missing return statement in setSearchTerm
| JavaScript | mit | galaxode/ubiquitous-eureka,galaxode/ubiquitous-eureka |
66cc7304305fc034074b0c63a64437af2c9e3c0d | grunt/buildcontrol.js | grunt/buildcontrol.js | module.exports = {
options: {
dir: 'dist',
commit: true,
push: true,
message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
},
pages: {
options: {
remote: 'https://github.com/lewisnyman/lewisnyman.github.io.git',
branch: 'master'
}
},
local: {
... | module.exports = {
options: {
dir: 'dist',
commit: true,
push: true,
message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
},
pages: {
options: {
remote: 'https://github.com/lewisnyman/lewisnyman.github.io.git',
branch: 'master',
config: {
... | Add username to deploy config | Add username to deploy config
| JavaScript | mit | lewisnyman/lewisnyman.co.uk-source,lewisnyman/lewisnyman.co.uk-source,lewisnyman/lewisnyman.co.uk-source |
54599eb33226086a80b233fc896785a55b16fa40 | src/api/__tests__/Killmail.spec.js | src/api/__tests__/Killmail.spec.js | jest.mock('../../internal/ESIAgent');
const Api = require('../../Api');
let api = new Api();
let agent = api._esiAgent;
afterEach(() => {
agent.__reset();
});
test('Killmail.get', () => {
agent.__expectRoute('get_killmails_killmail_id_killmail_hash', {'killmail_id': 1, 'killmail_hash': 'hash'});
return api.ki... | jest.mock('../../internal/ESIAgent');
const Api = require('../../Api');
let api = new Api();
let agent = api._esiAgent;
afterEach(() => {
agent.__reset();
});
test('Killmail.get', () => {
agent.__expectRoute('get_killmails_killmail_id_killmail_hash', {
'killmail_id': 1,
'killmail_hash': 'hash'
});
r... | Fix formatting in Killmail test | Fix formatting in Killmail test
| JavaScript | bsd-3-clause | lhkbob/eve-swagger-js,lhkbob/eve-swagger-js |
dcfd13351222b68e3647657ed3874ce189c45676 | namuhub/static/namuhub.js | namuhub/static/namuhub.js | var ContribBox = React.createClass({
render: function() {
return <div />;
}
});
var SearchBox = React.createClass({
getInitialState: function () {
console.log(this.props);
return {
user: this.props.user || ''
};
},
handleSubmit: function() {
},
... | var ContribBox = React.createClass({
handleLoad: function(user) {
alert(user);
},
render: function() {
return <div>asdf</div>;
}
});
var SearchBox = React.createClass({
getInitialState: function() {
return {
user: this.props.user || ''
};
},
s... | Make codes being close to React style | Make codes being close to React style
| JavaScript | apache-2.0 | ssut/namuhub,ssut/namuhub,ssut/namuhub |
ce6c6d06b71fad04f7909ddf0d5a3fc7f13318cb | app/views/shuttle/ShuttleCard.js | app/views/shuttle/ShuttleCard.js | import React from 'react'
import { Text } from 'react-native'
import { withNavigation } from 'react-navigation'
import ShuttleOverview from './ShuttleOverview'
import ScrollCard from '../common/ScrollCard'
import Touchable from '../common/Touchable'
import css from '../../styles/css'
export const ShuttleCard = ({
na... | import React from 'react'
import { Text } from 'react-native'
import { withNavigation } from 'react-navigation'
import ShuttleOverview from './ShuttleOverview'
import ScrollCard from '../common/ScrollCard'
import Touchable from '../common/Touchable'
import css from '../../styles/css'
export const ShuttleCard = ({
na... | Add extra check in keyExtractor to prevent dublicate keys | Add extra check in keyExtractor to prevent dublicate keys
| JavaScript | mit | UCSD/campus-mobile,UCSD/campus-mobile,UCSD/now-mobile,UCSD/now-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/now-mobile |
0fce5bee89ea2a81a295a80531d42fef675dd02b | components/Footer.js | components/Footer.js | import React from 'react'
function Footer() {
return (
<div className="fix-bottom">
<p className="tc">All rigths reserved</p>
<style jsx>{`
.fix-bottom {
position: relative;
bottom: 0;
width: 100%;
height: auto;
color: #094E62;
}
... | import React from 'react'
function Footer() {
return (
<div className="fix-bottom">
<p className="tc f7">© 2017 All rigths reserved</p>
<style jsx>{`
.fix-bottom {
position: absolute;
bottom: 0;
width: 100%;
height: auto;
color: #094E62;
... | Replace all rights reserved at the bottom of the screen | Replace all rights reserved at the bottom of the screen
| JavaScript | mit | efleurine/alumnus |
7074918dbe7a713898a670b5e3f67441a89ac11a | topcube.js | topcube.js | var spawn = require('child_process').spawn;
var path = require('path');
module.exports = function (options) {
options = options || {};
options.url = options.url || 'http://nodejs.org';
options.name = options.name || 'nodejs';
var client;
switch (process.platform) {
case 'win32':
client... | var spawn = require('child_process').spawn;
var path = require('path');
module.exports = function (options) {
options = options || {};
options.url = options.url || 'http://nodejs.org';
options.name = options.name || 'nodejs';
var client;
switch (process.platform) {
case 'win32':
client... | Revert "Allow only name, url keys for win32." | Revert "Allow only name, url keys for win32."
This reverts commit 9ea03c29ffc1dac7f04f094433c9e47c2ba1c5ad.
| JavaScript | mit | creationix/topcube,creationix/topcube,creationix/topcube |
70ecffab32fb4106bbe8b1056ec864bbf5faf4e2 | src/styles/Illustrations/assets/tuttolino/index.js | src/styles/Illustrations/assets/tuttolino/index.js | export Tuttolino404 from "./tuttolino-404.png"
export TuttolinoCompetitor from "./tuttolino-competitor.svg"
export TuttolinoErrorMobile from "./tuttolino-error-mobile.png"
export TuttolinoError from "./tuttolino-error.svg"
export TuttolinoFamilySofa from "./tuttolino-family-sofa.svg"
export TuttolinoFamily from "./tutt... | export Tuttolino404 from "./tuttolino-404.png"
export TuttolinoCompetitor from "./tuttolino-competitor.svg"
export TuttolinoErrorMobile from "./tuttolino-error-mobile.png"
export TuttolinoError from "./tuttolino-error.svg"
export TuttolinoFamilySofa from "./tuttolino-family-sofa.svg"
export TuttolinoFamily from "./tutt... | Deploy to GitHub pages | Deploy to GitHub pages [ci skip]
| JavaScript | mit | tutti-ch/react-styleguide,tutti-ch/react-styleguide |
88fcafc8839304ca8bc3a77f74f25d5542cec342 | src/MessageStore.js | src/MessageStore.js | var Reflux = require('reflux');
var objectAssign = require('object-assign');
var MessageActions = require('./MessageActions');
var _stack = []; // Container for the each object of message
var _counter = 0;
/**
* Registry of all messages, mixin to manage all drawers.
* Contains add, flush, and remove to do the menti... | var Reflux = require('reflux');
var objectAssign = require('object-assign');
var MessageActions = require('./MessageActions');
var _stack = []; // Container for the each object of message
var _counter = 0;
/**
* Registry of all messages, mixin to manage all drawers.
* Contains add, flush, and remove to do the menti... | Clear instead of Flush. Clearing now allows for a certain type to be filtered out. | Clear instead of Flush. Clearing now allows for a certain type to be filtered out. | JavaScript | mit | srph/reflux-flash |
60a48a5a5cd959efccc3dfcbed735a1e8fc5e47a | server.js | server.js | var http = require('http')
, url = require('url')
, express = require('express')
, rest = express()
, path = require('path')
, server = http.createServer(rest)
, ap = require('argparse').ArgumentParser
, colors = require('colors')
, appium = require('./app/appium')
, parser = require('./app/parser');
... | var http = require('http')
, url = require('url')
, express = require('express')
, rest = express()
, path = require('path')
, server = http.createServer(rest)
, ap = require('argparse').ArgumentParser
, colors = require('colors')
, appium = require('./app/appium')
, parser = require('./app/parser');
... | Deal with invalid http POST more gracefully. | Deal with invalid http POST more gracefully.
| JavaScript | apache-2.0 | appium/appium,appium/appium,appium/appium,appium/appium,appium/appium,Sw0rdstream/appium,appium/appium |
681dc926bcc021550d8b4fc13fc0136652a43c2c | src/extras/index.js | src/extras/index.js | export * from './controls/FirstPersonControls';
export * from './controls/OrbitControlsModule';
export * from './VirtualMouse';
| export * from './controls/FirstPersonControls';
export * from './controls/OrbitControlsModule';
export * from './pass/index';
export * from './shader/index';
export * from './VirtualMouse';
| Fix exporting pass & shaders | Fix exporting pass & shaders
| JavaScript | mit | WhitestormJS/whitestorm.js,WhitestormJS/whitestorm.js |
3bf56355eee5d7091f1596f10efa404af28bbeb9 | src/handleGitHub.js | src/handleGitHub.js | String.prototype.replaceAll = function(search, replace)
{
//if replace is not sent, return original string otherwise it will
//replace search string with 'undefined'.
if (replace === undefined) {
return this.toString();
}
return this.replace(new RegExp('[' + search + ']', 'g'), replace);
};... | String.prototype.replaceAll = function(search, replace)
{
//if replace is not sent, return original string otherwise it will
//replace search string with 'undefined'.
if (replace === undefined) {
return this.toString();
}
return this.replace(new RegExp('[' + search + ']', 'g'), replace);
};... | Add support for multiple issue keywords in the same repo | Add support for multiple issue keywords in the same repo
| JavaScript | mit | NunoPinheiro/commitissuelinker,NunoPinheiro/commitissuelinker |
22b0f1d407cceb44c7736dea7f42c9aa88d72f74 | components/date/fields.js | components/date/fields.js | 'use strict';
module.exports = key => ({
[`${key}-day`]: {
label: 'Day'
},
[`${key}-month`]: {
label: 'Month'
},
[`${key}-year`]: {
label: 'Year'
}
});
| 'use strict';
module.exports = key => ({
[`${key}-day`]: {
label: 'Day',
autocomplete: 'bday-day'
},
[`${key}-month`]: {
label: 'Month',
autocomplete: 'bday-month'
},
[`${key}-year`]: {
label: 'Year',
autocomplete: 'bday-year'
}
});
| Add autocomplete to date component to assist with accessibility | Add autocomplete to date component to assist with accessibility
| JavaScript | mit | UKHomeOfficeForms/hof-bootstrap,UKHomeOfficeForms/hof,UKHomeOfficeForms/hof-bootstrap,UKHomeOfficeForms/hof |
72d15313741b7c06721c9f5638674e43a9a52cb6 | src/graphql.js | src/graphql.js | import Item from "./graphql/types/item"
import Update from "./graphql/types/update"
import { makeExecutableSchema } from "graphql-tools"
const RuneScapeQuery = `
type RuneScapeQuery {
items: [Item]
item(id: Int!): Item
updates: [Update]
}
`
const SchemaDefinition = `
schema {
query: RuneScapeQuery
... | import Item from "./graphql/types/item"
import Update from "./graphql/types/update"
import { makeExecutableSchema } from "graphql-tools"
const RuneScapeQuery = `
type RuneScapeQuery {
items: [Item]
item(id: Int!): Item
updates: [Update]
}
`
const SchemaDefinition = `
schema {
query: RuneScapeQuery
... | Fix issue in retrieval of transactions | Fix issue in retrieval of transactions
| JavaScript | mit | DevNebulae/ads-pt-api |
af23ebea023e24437457d534c58f45e8ceffaeba | src/js/veturilo.js | src/js/veturilo.js | function findStations(callback) {
$.ajax({
type: 'GET',
url: 'http://localhost:8765/mockdata/veturilo.xml',
dataType: 'xml',
success: function (xml) {
var stations = [];
$(xml).find('place').each(function () {
var place = $(this);
... | function findStations(callback) {
$.ajax({
type: 'GET',
url: 'mockdata/veturilo.xml',
dataType: 'xml',
success: function (xml) {
var stations = [];
$(xml).find('place').each(function () {
var place = $(this);
var station = {
... | Use relative path to mock data | Use relative path to mock data
| JavaScript | mit | janisz/bikeday,janisz/bikeday,Freeport-Metrics/bikeday |
93f5f27fd4c56ffc69be517f0fed021e9fcaefd8 | static/index.js | static/index.js | $(function(){
var url = 'https://storage.googleapis.com/rutracker-rss.appspot.com/category_map.json';
var url = 'https://dl.dropboxusercontent.com/u/660127/category_map.json'; // TODO
$.getJSON(url, {}, function(data, textStatus){
var tree = $('#ctree').treeview({
data: JSON.stringify... | $(function(){
var url = 'https://storage.googleapis.com/rutracker-rss.appspot.com/category_map.json';
$.getJSON(url, {}, function(data, textStatus){
var tree = $('#ctree').treeview({
data: JSON.stringify(data)
});
});
});
| Set correct JSON for production | Set correct JSON for production
| JavaScript | apache-2.0 | notapresent/rutracker_rss,notapresent/rutracker_rss,notapresent/rutracker_rss |
7492a1890a216e2cc72a57d7736932c490c21461 | src/redux/state/fakeEvents.test.js | src/redux/state/fakeEvents.test.js | /* global test, expect */
import fakeEvents from './fakeEvents';
test('calling fakeEvents should generate an array containing btw. 60 and 120 objects', () => {
expect(fakeEvents.length)
.toBeGreaterThanOrEqual(60);
expect(fakeEvents.length)
.toBeLessThanOrEqual(120);
});
| /* global test, expect */
import fakeEvents from './fakeEvents';
test('calling fakeEvents should generate an array containing btw. 60 and 120 objects', () => {
expect(fakeEvents.length)
.toBeGreaterThanOrEqual(60);
expect(fakeEvents.length)
.toBeLessThanOrEqual(120);
});
test('events generated with fakeEvents s... | Make sure events have the right keys and an id | Make sure events have the right keys and an id
| JavaScript | mit | vogelino/design-timeline,vogelino/design-timeline |
feb0ecd14c35c5694803db38e0d1f5644a5b7d3d | src/node/server.js | src/node/server.js | var http = require("http");
function onRequest(request, response) {
console.log("Request received.");
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World");
response.end();
}
http.createServer(onRequest).listen(8888);
console.log("Server has started.");
| var http = require("http");
function start() {
function onRequest(request, response) {
console.log("Request received.");
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World");
response.end();
}
http.createServer(onRequest).listen(8888);
console.log("Server has started.");
... | Package the script with a `start` function | Package the script with a `start` function | JavaScript | apache-2.0 | Rholais/txfs,Rholais/txfs,Rholais/txfs |
fdc725c500c0fe63a930dcee19d87bfc2831933a | Chapter-2-Exercises/jjhampton-ch2-ex3-chessboard.js | Chapter-2-Exercises/jjhampton-ch2-ex3-chessboard.js | 'use strict'
// Chess board
// Write a program that creates a string that represents an 8×8 grid, using newline characters to separate lines. At each position of the grid there is either a space or a “#” character. The characters should form a chess board.
// Passing this string to console.log should show something l... | 'use strict'
// Chess board
// Write a program that creates a string that represents an 8×8 grid, using newline characters to separate lines. At each position of the grid there is either a space or a “#” character. The characters should form a chess board.
// Passing this string to console.log should show something l... | Rename variable to avoid using reserved word `string` | Rename variable to avoid using reserved word `string`
| JavaScript | mit | OperationCode/eloquent-js |
077e0ac53af3506f4d11d8bd157bf9de89761a9e | lib/adapter.js | lib/adapter.js | (function(karma, window) {
var createClojureScriptTest = function (tc, runnerPassedIn) {
return function () {
if (goog && goog.dependencies_ && goog.dependencies_.nameToPath) {
for(var namespace in goog.dependencies_.nameToPath)
goog.require(namespace);
}
circle.karma.run_test... | (function(karma, window) {
var createClojureScriptTest = function (tc, runnerPassedIn) {
return function () {
if ('undefined' !== typeof goog && goog.dependencies_ && goog.dependencies_.nameToPath) {
for(var namespace in goog.dependencies_.nameToPath)
goog.require(namespace);
}
... | Fix missing goog issue for real | Fix missing goog issue for real
| JavaScript | mit | circleci/karma-cljs.test |
85d62a542b153523eba52ccf0b869b7c8fd64c87 | app/_reducers/marketsReducers.js | app/_reducers/marketsReducers.js | import { Map } from 'immutable';
import { FILTER_MARKETS, UPDATE_MARKETS, SERVER_DATA_ACTIVE_SYMBOLS } from '../_constants/ActionTypes';
const initialState = new Map({
active: [],
query: '',
shownMarkets: [],
});
export default (state = initialState, action) => {
const doFilter = (markets = state.allM... | import { Map } from 'immutable';
import { FILTER_MARKETS, UPDATE_MARKETS, SERVER_DATA_ACTIVE_SYMBOLS } from '../_constants/ActionTypes';
const initialState = new Map({
active: [],
tree: {},
query: '',
shownMarkets: [],
});
const generateTree = (symbols) => {
const tree = {};
symbols.forEach((s... | Add market tree built from active symbols | Add market tree built from active symbols
| JavaScript | mit | nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-n... |
58366dc23b55c0256633d1d9abb4fba7e475a13c | resource/js/components/UserList.js | resource/js/components/UserList.js | import React from 'react';
import UserPicture from './User/UserPicture';
export default class UserList extends React.Component {
render() {
const users = this.props.users.map((user) => {
return (
<a data-user-id={user._id} href={'/user/' + user.username} title={user.name}>
<UserPicture u... | import React from 'react';
import UserPicture from './User/UserPicture';
export default class UserList extends React.Component {
render() {
const users = this.props.users.map((user) => {
return (
<a key={user._id} data-user-id={user._id} href={'/user/' + user.username} title={user.name}>
... | Add unique key to items | Add unique key to items
| JavaScript | mit | crow-misia/crowi,crowi/crowi,crowi/crowi,crow-misia/crowi,crowi/crowi |
3c5cf643d11d44ede31f212a5af683b4785d13bc | app/scenes/SearchScreen/index.js | app/scenes/SearchScreen/index.js | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
export default class SearchScreen extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<... | import React, { Component } from 'react';
import RepoSearchBar from './components/RepoSearchBar';
export default class SearchScreen extends Component {
render() {
return (
<RepoSearchBar />
);
}
}
| Remove boilerplate and render the search bar | Remove boilerplate and render the search bar
| JavaScript | mit | msanatan/GitHubProjects,msanatan/GitHubProjects,msanatan/GitHubProjects |
f030906e54e9e569b7a12a05d369746a5fc7024f | app/scripts/hocs/with-pub-sub.js | app/scripts/hocs/with-pub-sub.js | import React from 'react';
import toVoid from '../utils/to-void';
const fake = {
__fake__: true,
publish: toVoid,
subscribe: toVoid,
unsubscribe: toVoid
};
const { Provider, Consumer } = React.createContext(fake);
// Higher order component
const withPubSub = Component => props => (
<Consumer>
{pubSub ... | import React from 'react';
import toVoid from '../utils/to-void';
const fake = {
__fake__: true,
publish: toVoid,
subscribe: toVoid,
unsubscribe: toVoid
};
const { Provider, Consumer } = React.createContext(fake);
// Higher order component
const withPubSub = Component => React.forwardRef((props, ref) => (
... | Fix regression (i.e., forward `key`) | Fix regression (i.e., forward `key`)
| JavaScript | mit | hms-dbmi/higlass,hms-dbmi/higlass,hms-dbmi/higlass,hms-dbmi/4DN_matrix-viewer,hms-dbmi/4DN_matrix-viewer,hms-dbmi/higlass,hms-dbmi/4DN_matrix-viewer |
f320562f84d8e23d8d78d7a01ab8464f69b135fc | apps-builtin/wifi-setup/index.js | apps-builtin/wifi-setup/index.js | var wifiManager = require('../../lib/WifiManager');
var hb = require('handlebars');
var fs = require('fs');
const path = require('path');
var subApp = function(){
this.staticFolder = "assets";
this.setup = function(router, express){
router.get('/', function(req, res) {
fs.readFile(path.join(__dirname, ... | var wifiManager = require('../../lib/WifiManager');
var hb = require('handlebars');
var fs = require('fs');
const path = require('path');
var subApp = function(){
this.staticFolder = "assets";
this.setup = function(router, express){
router.get('/', function(req, res) {
fs.readFile(path.join(__dirname, ... | Add check for wifi details | Add check for wifi details
| JavaScript | isc | headlessPi/headlessPi,headlessPi/headlessPi,headlessPi/headlessPi |
f7c280b693f36b1a797bec51eea6eb139d5f1bc1 | lib/dashboard/repl.js | lib/dashboard/repl.js | const repl = require("repl");
class REPL {
constructor(options) {
this.env = options.env;
this.plugins = options.plugins;
}
start(done) {
this.replServer = repl.start({
prompt: "Embark (" + this.env + ") > ",
useGlobal: true
});
this.replServer.on("exit", () => {
process.e... | const repl = require("repl");
const Console = require('./console.js');
class REPL {
constructor(options) {
this.env = options.env;
this.plugins = options.plugins;
this.events = options.events;
this.console = new Console({
events: this.events,
plugins: this.plugins,
version: options... | Use console and override evaluator | Use console and override evaluator
| JavaScript | mit | iurimatias/embark-framework,iurimatias/embark-framework |
c136fb4191a5e9e5052ef778dce1fb0bad785b2a | test/createMockRaf.js | test/createMockRaf.js | /* @flow */
type Callback = (now: number) => void;
export default function(): Object {
let allCallbacks = [];
let prevTime = 0;
const now = () => prevTime;
const raf = (cb: Callback) => {
allCallbacks.push(cb);
};
const defaultTimeInterval = 1000 / 60;
const _step = ms => {
const allCallbacks... | /* @flow */
type Callback = (now: number) => void;
export default function(): Object {
let allCallbacks = [];
let prevTime = 0;
let id = 0;
const now = () => prevTime;
const raf = (cb: Callback) => {
allCallbacks.push(cb);
return id++;
};
const defaultTimeInterval = 1000 / 60;
const _step =... | Implement rAF mock return correctly | Implement rAF mock return correctly
rAF should return a uuid. Components check the assigned id non-null-ness
for some purposes.
cc @bsansouci
| JavaScript | mit | keyanzhang/react-motion,threepointone/react-motion,chenglou/react-motion,BenoitZugmeyer/preact-motion,BenoitZugmeyer/preact-motion,chenglou/react-motion,threepointone/react-motion,keyanzhang/react-motion |
812910a3916d73e4728bc483312bebe900b1d99c | lib/wrapper.js | lib/wrapper.js | 'use strict';
var through = require('through')
, loader = require('./loader')
, async = require('async');
function angularify() {
var buf = '';
return through(function(chunk) {
buf += chunk.toString();
}, function () {
var rexSingle = new RegExp(/require\('angula[^']+'\)[,;]/g)
, rexDouble = ... | 'use strict';
var through = require('through')
, loader = require('./loader')
, async = require('async');
function angularify() {
var buf = '';
return through(function(chunk) {
buf += chunk.toString();
}, function () {
var rexSingle = new RegExp(/require\('angula[^']+'\)[,;]/g)
, rexDouble = ... | Fix dollar sign issue in angular injection | Fix dollar sign issue in angular injection
| JavaScript | mit | evanshortiss/angularify |
790c99ea4cca145835d067ffe7c4052122c596fd | lib/composition/parsers/flow-component.js | lib/composition/parsers/flow-component.js | // Dependencies
var ParseMethod = require("./method")
, Enny = require("enny")
, Ul = require("ul")
, Typpy = require("typpy")
;
module.exports = function (_input, instName) {
var input = Ul.clone(_input);
if (Typpy(input, String)) {
input = [input];
}
var output = {}
, eP = nul... | // Dependencies
var ParseMethod = require("./method")
, Enny = require("enny")
, Ul = require("ul")
, Typpy = require("typpy")
;
module.exports = function (_input, instName) {
var input = Ul.clone(_input);
if (Typpy(input, String)) {
input = [input];
}
var output = {}
, eP = nul... | Append the event name in case of server methods too | Append the event name in case of server methods too
| JavaScript | mit | jillix/engine-builder |
062daaef9cbe78a5f37874237c4f2e36dd43d3e4 | lib/EnvironmentPlugin.js | lib/EnvironmentPlugin.js | /*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Simen Brekken @simenbrekken
*/
var DefinePlugin = require("./DefinePlugin");
this.keys = Array.isArray(keys) ? keys : Object.keys(keys);
this.defaultValues = Array.isArray(keys) ? {} : keys;
}
EnvironmentPlugin.prototype.apply = function(co... | /*
MIT License http://www.opensource.org/licenses/mit-license.php
Authors Simen Brekken @simenbrekken, Einar Löve @einarlove
*/
var DefinePlugin = require("./DefinePlugin");
function EnvironmentPlugin(keys) {
if (typeof keys === 'string') {
throw new Error(
"Deprecation notice: EnvironmentPlugin now only takes... | Add drepecation notice for multiple arguments of strings | Add drepecation notice for multiple arguments of strings
| JavaScript | mit | SimenB/webpack,webpack/webpack,SimenB/webpack,ts-webpack/webpack,SimenB/webpack,webpack/webpack,NekR/webpack,rlugojr/webpack,ts-webpack/webpack,webpack/webpack,webpack/webpack,g0ddish/webpack,jescalan/webpack,ts-webpack/webpack,jescalan/webpack,jescalan/webpack,NekR/webpack,g0ddish/webpack,SimenB/webpack,g0ddish/webpac... |
8edfdd9a267d30f667348f4806b330bb9b038b5b | app/assets/javascripts/renalware/behaviours.js | app/assets/javascripts/renalware/behaviours.js | $(document).ready(function() {
$("[data-behaviour='highlight'] tbody tr a").click(function(){
$(this).closest("tr").addClass("is-selected").siblings().removeClass("is-selected");
});
$("[data-behaviour='submit']").click(function(e) {
e.preventDefault();
$(this).closest('form').submit();
});
});
| $(document).ready(function() {
$("[data-behaviour='highlight'] tbody tr a").click(function(){
$(this).closest("tr").addClass("is-selected").siblings().removeClass("is-selected");
});
$("[data-behaviour='submit']").click(function(e) {
e.preventDefault();
$(this).closest('form').submit();
});
$(... | Add auto submit on change js behaviour | Add auto submit on change js behaviour
For submitting forms via ajax when eg dropdown changes
| JavaScript | mit | airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core |
4c0fbae213ddc64943b361ab000c63866a4c4863 | app/assets/javascripts/utilities/circular_buffer.js | app/assets/javascripts/utilities/circular_buffer.js | class CircularBuffer {
constructor(length){
this.buffer = new Int32Array(length);
this.maxSize = length;
this.currentSize = 0;
this.openIndex = 0;
this.lastFilledIndex = -1;
}
get(index){
return this.buffer[(this.lastFilledIndex+index)%this.maxSize];
}
size(){
return this.curren... | class CircularBuffer {
constructor(length){
this.buffer = new Int32Array(length);
this.maxSize = length;
this.currentSize = 0;
this.openIndex = 0;
this.lastFilledIndex = -1;
}
get(index){
return this.buffer[(this.lastFilledIndex+index)%this.maxSize];
}
size(){
return this.curren... | Add custom forEach function to Circular Buffer class | Add custom forEach function to Circular Buffer class
| JavaScript | mit | krauzer/canvas-sandbox,krauzer/canvas-sandbox |
e9dc82402fac6e17478f00fff1259b0b3bfe5197 | web/config.js | web/config.js | var config = {
// For internal server or proxying webserver.
url : {
configuration : 'up/configuration',
update : 'up/world/{world}/{timestamp}',
sendmessage : 'up/sendmessage'
},
// For proxying webserver through php.
// url: {
// configuration: 'up.php?path=configuration',
// update: 'up.php?path=world/... | var config = {
// For internal server or proxying webserver.
url : {
configuration : 'up/configuration',
update : 'up/world/{world}/{timestamp}',
sendmessage : 'up/sendmessage'
},
// For proxying webserver through php.
// url: {
// configuration: 'up.php?path=configuration',
// update: 'up.php?path=world/... | Fix caching issue in standalone | Fix caching issue in standalone | JavaScript | apache-2.0 | webbukkit/dynmap,webbukkit/dynmap,mg-1999/dynmap,KovuTheHusky/dynmap,webbukkit/dynmap,webbukkit/dynmap |
e9483a99ec4ff2b46df813cb3425cc2ef11d07ef | web/g-live.js | web/g-live.js | /**
* Keep live updates from service.
* @constructor
*/
g.live = function() {
var socket;
/**
* Open the websocket connection.
*/
var open = function() {
if (g.isEncrypted()) {
socket = new WebSocket('wss://' + g.getHost() + '/api/live');
} else {
socket... | /**
* Keep live updates from service.
* @constructor
*/
g.live = function() {
var socket;
/**
* Open the websocket connection.
*/
var open = function() {
if (g.isEncrypted()) {
socket = new WebSocket('wss://' + g.getHost() + '/api/live');
} else {
socket... | Support multiple subscribers in g.Live. | Support multiple subscribers in g.Live.
| JavaScript | mit | gansoi/gansoi,gansoi/gansoi,gansoi/gansoi,gansoi/gansoi |
a24950265ff87515da7bc6a0b306f8569707cabc | lib/experiments/index.js | lib/experiments/index.js | 'use strict';
let experiments = {
BUILD_INSTRUMENTATION: symbol('build-instrumentation'),
INSTRUMENTATION: symbol('instrumentation'),
ADDON_TREE_CACHING: symbol('addon-tree-caching'),
};
Object.freeze(experiments);
module.exports = experiments;
| 'use strict';
const symbol = require('../utilities/symbol');
let experiments = {
BUILD_INSTRUMENTATION: symbol('build-instrumentation'),
INSTRUMENTATION: symbol('instrumentation'),
ADDON_TREE_CACHING: symbol('addon-tree-caching'),
};
Object.freeze(experiments);
module.exports = experiments;
| Revert "Fix linting issue with beta branch." | Revert "Fix linting issue with beta branch."
This reverts commit 8122805c34524ac9ac98bfd5cb17380d9765cbb4.
| JavaScript | mit | gfvcastro/ember-cli,rtablada/ember-cli,calderas/ember-cli,elwayman02/ember-cli,thoov/ember-cli,asakusuma/ember-cli,HeroicEric/ember-cli,ef4/ember-cli,kanongil/ember-cli,twokul/ember-cli,kategengler/ember-cli,kanongil/ember-cli,Turbo87/ember-cli,twokul/ember-cli,buschtoens/ember-cli,akatov/ember-cli,mike-north/ember-cli... |
27029f760791efd65c0008a9bdc4e13830d4cc1d | app/models/widgets/ticker_widget.js | app/models/widgets/ticker_widget.js | Dashboard.TickerWidget = Dashboard.Widget.extend({
sourceData: "",
templateName: 'ticker_widget',
classNames: ['widget', 'widget-ticker'],
widgetView: function() {
var widget = this;
return this._super().reopen({
didInsertElement: function() {
var scaleFactor = 0.5;
var scaleSourc... | Dashboard.TickerWidget = Dashboard.Widget.extend({
sourceData: "",
templateName: 'ticker_widget',
classNames: ['widget', 'widget-ticker'],
widgetView: function() {
var widget = this;
return this._super().reopen({
didInsertElement: function() {
var scaleFactor = 0.7;
var widgetHeig... | Change ticker font scale factor to 0.7 | Change ticker font scale factor to 0.7
| JavaScript | mit | ShiftForward/mucuchies,kloudsio/mucuchies,ShiftForward/mucuchies,kloudsio/mucuchies |
729e714347790520e0543d144704113f64aa167e | app/scripts/controllers/contract.js | app/scripts/controllers/contract.js | 'use strict';
angular.module('scratchApp')
.controller('ContractCtrl', function ($scope, $http, $location) {
var serversPublicKey,
wallet,
paymentTx,
refundTx,
signedTx;
$scope.generate = function () {
getServersPublicKey($scope.walet_pub... | 'use strict';
angular.module('scratchApp')
.controller('ContractCtrl', function ($scope, $http, $location) {
var serversPublicKey,
wallet,
paymentTx,
refundTx,
signedTx;
$scope.generate = function () {
getServersPublicKey($scope.walet_pub... | Modify request to add necessary header | Modify request to add necessary header
| JavaScript | mit | baleato/bitcoin-hackathon |
412466f9d11f229d5a118028292c69c2b1b3814f | commands/say.js | commands/say.js | var l10n_file = __dirname + '/../l10n/commands/say.yml';
var l10n = require('../src/l10n')(l10n_file);
var CommandUtil = require('../src/command_util').CommandUtil;
exports.command = function(rooms, items, players, npcs, Commands) {
return function(args, player) {
if (args) {
player.sayL10n(l10n, 'YOU_SAY',... | var l10n_file = __dirname + '/../l10n/commands/say.yml';
var l10n = require('../src/l10n')(l10n_file);
var CommandUtil = require('../src/command_util').CommandUtil;
exports.command = function(rooms, items, players, npcs, Commands) {
return function(args, player) {
if (args) {
player.sayL10n(l10n, 'YOU_SAY',... | Add conditional to avoid duplicate messages, fix EachIf block. | Add conditional to avoid duplicate messages, fix EachIf block.
| JavaScript | mit | seanohue/ranviermud,seanohue/ranviermud,shawncplus/ranviermud |
cfd13a2df960ac6421d27651688b6dbd5f5f1030 | server/config/environment/index.js | server/config/environment/index.js | var _ = require('lodash');
var all = {
// define nodejs runtime environment
server: {
port : process.env.NODE_IP || 8080, //OPENSHIFT_NODEJS_PORT
host : process.env.NODE_PORT || '127.0.0.1', //OPENSHIFT_NODEJS_IP
staticDir : '/../../dist'
},
//secret encrypti... | var _ = require('lodash');
var all = {
// define nodejs runtime environment
server: {
port : process.env.OPENSHIFT_NODEJS_PORT || 8080, //OPENSHIFT_NODEJS_PORT //NODE_IP
host : process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1', //OPENSHIFT_NODEJS_IP //NODE_PORT
stati... | Change port and host var | Change port and host var
| JavaScript | mit | markoch/dev-news-os,markoch/dev-news-os |
4adeb41a333ad6218fc8450b765c2afa33b20238 | babel.server.js | babel.server.js | require("babel-polyfill");
/**
* Configure babel using the require hook
* More details here: https://babeljs.io/docs/setup/#babel_register
*/
require("babel-core/register")({
only: /src/,
presets: ["es2015", "react", "stage-0"]
});
require('dotenv').load();
/**
* Define isomorphic constants.
*/
global.__... | require("babel-polyfill");
/**
* Configure babel using the require hook
* More details here: https://babeljs.io/docs/setup/#babel_register
*/
require("babel-core/register")({
only: /src/,
presets: ["es2015", "react", "stage-0"]
});
require('dotenv').load({path: process.env.NODE_ENV === "production" ? `.env... | Load production vars from .env.production | Load production vars from .env.production
| JavaScript | mit | alexchiri/minimalistic-blog,alexchiri/minimalistic-blog,alexchiri/minimalistic-blog |
491dce4e0a8e839ef375017ff77669fb06e482f4 | samples/electron/start.js | samples/electron/start.js | var app = require('app');
var BrowserWindow = require('browser-window');
var mainWindow = null;
app.on('window-all-closed', function() {
if (process.platform != 'darwin')
app.quit();
});
app.on('ready', function() {
mainWindow = new BrowserWindow({width: 800, height: 600});
mainWindow.loadUrl('file://' + _... | const electron = require('electron')
// Module to control application life.
const app = electron.app
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow;
var mainWindow = null;
app.on('window-all-closed', function() {
if (process.platform != 'darwin')
app.quit();
});
app.on(... | Upgrade to Electron 1.0 API | Upgrade to Electron 1.0 API
| JavaScript | mit | greenheartgames/greenworks,greenheartgames/greenworks,greenheartgames/greenworks,greenheartgames/greenworks,greenheartgames/greenworks |
0f1db78ce5ed9370482331b8668aa7057384935c | packages/ember-utils/tests/assign_test.js | packages/ember-utils/tests/assign_test.js | import { assignPolyfill as assign } from '..';
QUnit.module('Ember.assign');
QUnit.test('Ember.assign', function() {
let a = { a: 1 };
let b = { b: 2 };
let c = { c: 3 };
let a2 = { a: 4 };
assign(a, b, c, a2);
deepEqual(a, { a: 4, b: 2, c: 3 });
deepEqual(b, { b: 2 });
deepEqual(c, { c: 3 });
dee... | import { assignPolyfill as assign } from '..';
QUnit.module('Ember.assign');
QUnit.test('merging objects', function() {
let trgt = { a: 1 };
let src1 = { b: 2 };
let src2 = { c: 3 };
assign(trgt, src1, src2);
deepEqual(trgt, { a: 1, b: 2, c: 3 }, 'assign copies values from one or more source objects to a ... | Add test coverage to Object.assign polyfill | Add test coverage to Object.assign polyfill
| JavaScript | mit | amk221/ember.js,qaiken/ember.js,nickiaconis/ember.js,patricksrobertson/ember.js,tildeio/ember.js,thoov/ember.js,amk221/ember.js,bantic/ember.js,nickiaconis/ember.js,jherdman/ember.js,mixonic/ember.js,xiujunma/ember.js,jasonmit/ember.js,thoov/ember.js,mfeckie/ember.js,csantero/ember.js,jherdman/ember.js,sandstrom/ember.... |
1c2e692e5770bdf66f6801f90a6f7cbcaf048969 | client/assets/js/services/LandingPageService.js | client/assets/js/services/LandingPageService.js | (function () {
'use strict';
angular
.module('fusionSeedApp.services.landingPage', [])
.factory('LandingPageService', LandingPageService);
function LandingPageService($log, Orwell, $window, ConfigService) {
'ngInject';
activate();
var service = {
getLandingPagesFromData: getLandingPa... | (function () {
'use strict';
angular
.module('fusionSeedApp.services.landingPage', [])
.factory('LandingPageService', LandingPageService);
function LandingPageService($log, Orwell, $window, ConfigService) {
'ngInject';
activate();
var service = {
getLandingPagesFromData: getLandingPa... | Remove other landing pages service | Remove other landing pages service
| JavaScript | apache-2.0 | AlexKolonitsky/lucidworks-view,AlexKolonitsky/lucidworks-view,lucidworks/lucidworks-view,lucidworks/lucidworks-view,lucidworks/lucidworks-view,AlexKolonitsky/lucidworks-view |
4886982fa7108c0cc5aa68c43f75e8cbc3b1903e | getPlannedWork/crawler.js | getPlannedWork/crawler.js | const moment = require('moment');
const plannedWork = require('./plannedWork');
const { baseURL, routes, imgMap } = require('./constants.js');
function buildLink({ route, datetime }) {
const date = moment(datetime);
return `${baseURL}?tag=${route}&date=${date.format('MM/DD/YYYY')}&time=&method=getstatus4`;
}
fun... | const moment = require('moment');
const plannedWork = require('./plannedWork');
const DateRange = require('./DateRange');
const { baseURL, routes, imgMap } = require('./constants.js');
function buildLink({ route, datetime }) {
const date = moment(datetime);
return `${baseURL}?tag=${route}&date=${date.format('MM/D... | Implement crawling by date range | Implement crawling by date range
The website will display Service Advisories first by date range, then by
train route. Previous commits added methods for scraping all routes for
a particular date. This commit adds a method to invoke that method for
multiple date ranges.
| JavaScript | mit | geoffreyyip/mta-dashboard,geoffreyyip/mta-dashboard |
5953b9dc1aeb7edc6b8b524870e70b6af83fb776 | test/support/assert-paranoid-equal/utilities.js | test/support/assert-paranoid-equal/utilities.js | 'use strict';
function isNothing(subject) {
return (undefined === subject) || (null === subject);
}
function isObject(subject) {
return ('object' === typeof subject) && (null !== subject);
}
function isNaNConstant(subject) {
// There is not Number.isNaN in Node 0.6.x
return ('number' === typeof subject) &... | 'use strict';
function isNothing(subject) {
return (undefined === subject) || (null === subject);
}
function isObject(subject) {
return ('object' === typeof subject) && (null !== subject);
}
function isNaNConstant(subject) {
if (undefined !== Number.isNaN) {
return Number.isNaN(subject);
} else {
... | Update the paranoid equal to the lastest version | Update the paranoid equal to the lastest version
| JavaScript | mit | cesarmarinhorj/js-yaml,doowb/js-yaml,djchie/js-yaml,jonnor/js-yaml,pombredanne/js-yaml,jonnor/js-yaml,jonnor/js-yaml,deltreey/js-yaml,nodeca/js-yaml,prose/js-yaml,denji/js-yaml,vogelsgesang/js-yaml,vogelsgesang/js-yaml,bjlxj2008/js-yaml,minj/js-yaml,bjlxj2008/js-yaml,denji/js-yaml,djchie/js-yaml,nodeca/js-yaml,doowb/js... |
c3907ccc5aa74b7186f020fa3671a2e66f2ef683 | nin/dasBoot/THREENode.js | nin/dasBoot/THREENode.js | class THREENode extends NIN.Node {
constructor(id, options) {
if(!('render' in options.outputs)) {
options.outputs.render = new NIN.TextureOutput();
}
super(id, {
inputs: options.inputs,
outputs: options.outputs,
});
this.options = options;
this.scene = new THREE.Scene();
... | class THREENode extends NIN.Node {
constructor(id, options) {
if(!('outputs' in options)) {
options.outputs = {};
}
if(!('render' in options.outputs)) {
options.outputs.render = new NIN.TextureOutput();
}
super(id, {
inputs: options.inputs,
outputs: options.outputs,
});... | Make sure nodes always have an output property | Make sure nodes always have an output property
4545fcdc1808618723a4f5cd8a228b5c0b121ab7 broke nodes that did not have
an output property specified at all, and that relied on NIN.Node to
provide the whole output setup for them. This made ninjadev/re stop
working, so here's a fix for that.
| JavaScript | apache-2.0 | ninjadev/nin,ninjadev/nin,ninjadev/nin |
92aed6c12583ca9f56dd4bc703193beffed84da5 | feature-detects/css/transformstylepreserve3d.js | feature-detects/css/transformstylepreserve3d.js | /*!
{
"name": "CSS Transform Style preserve-3d",
"property": "preserve3d",
"authors": ["denyskoch", "aFarkas"],
"tags": ["css"],
"notes": [{
"name": "MDN Docs",
"href": "https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style"
},{
"name": "Related Github Issue",
"href": "https://git... | /*!
{
"name": "CSS Transform Style preserve-3d",
"property": "preserve3d",
"authors": ["denyskoch", "aFarkas"],
"tags": ["css"],
"notes": [{
"name": "MDN Docs",
"href": "https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style"
},{
"name": "Related Github Issue",
"href": "https://git... | Fix preserve3d's IE11/Win10 false positive | Fix preserve3d's IE11/Win10 false positive
| JavaScript | mit | Modernizr/Modernizr,Modernizr/Modernizr |
0270da4122605fafc067c72091dc5836f5211f95 | src/app/templates.spec.js | src/app/templates.spec.js | describe('templates', function () {
beforeEach(module('prx', 'templates', function ($provide) {
$provide.decorator('$templateCache', function ($delegate) {
var put = $delegate.put;
$delegate.toTest = [];
$delegate.put = function (uri) {
this.toTest.push(uri);
return put.apply(thi... | describe('templates', function () {
var $scope, $compile;
beforeEach(module('prx', 'templates', function ($provide, $stateProvider) {
$stateProvider.state('fakeState', {});
$provide.decorator('$templateCache', function ($delegate) {
var put = $delegate.put;
$delegate.toTest = [];
$delega... | Set state context in test for template compilability with infinite lineage. | Set state context in test for template compilability with infinite lineage.
| JavaScript | agpl-3.0 | PRX/www.prx.org,PRX/www.prx.org,PRX/www.prx.org |
ff334dfa7d1687a923f476db1166acd47e7ee059 | src/javascripts/frigging_bootstrap/components/timepicker.js | src/javascripts/frigging_bootstrap/components/timepicker.js | let React = require("react")
let cx = require("classnames")
let {errorList, sizeClassNames, formGroupCx, label} = require("../util.js")
let {div, input} = React.DOM
export default class extends React.Component {
static displayName = "Frig.friggingBootstrap.TimePicker"
static defaultProps = Object.assign(require(... | let React = require("react")
let cx = require("classnames")
let {errorList, sizeClassNames, formGroupCx, label} = require("../util.js")
let {div, input} = React.DOM
export default class extends React.Component {
static displayName = "Frig.friggingBootstrap.TimePicker"
static defaultProps = Object.assign(require(... | Add ValueLink To On Change For Timepicker | Add ValueLink To On Change For Timepicker
| JavaScript | mit | frig-js/frig,TouchBistro/frig,frig-js/frig,TouchBistro/frig |
16d9bbe0e294d817a6cc6ce8b9db64049b317f75 | src/commands/dockerize.js | src/commands/dockerize.js | import { spawn } from "cross-spawn";
import path from "path";
import process from "process";
import commandExists from "command-exists";
module.exports = function (name) {
// Check if docker is installed first
commandExists("docker", function(err, commandExists) {
if(commandExists) {
spawn("docker", ["bu... | import { spawn } from "cross-spawn";
import path from "path";
import process from "process";
import commandExists from "command-exists";
import logger from "../lib/logger.js";
module.exports = function (name) {
// Check if docker is installed first
commandExists("docker", function(err, commandExists) {
if(comm... | Add logger for docker warning | Add logger for docker warning
| JavaScript | mit | TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick |
f6793e5fb331d1091702aa2055cb801e133c387f | js/directives/textarea.js | js/directives/textarea.js | webui.directive("textarea", function() {
return {
restrict: "E",
link: function(scope, element) {
element.attr(
"placeholder",
element.attr("placeholder").replace(/\\n/g, "\n")
).bind("keydown keypress", function(event) {
if (event.ctrlKey && event.which === 13) {
... | webui.directive("textarea", function() {
return {
restrict: "E",
link: function(scope, element) {
element.attr(
"placeholder",
function(index, placeholder) {
if (placeholder !== undefined) {
return placeholder.replace(/\\n/g, "\n");
} else {
re... | Fix "Cannot read property 'replace' of undefined" | Fix "Cannot read property 'replace' of undefined"
Signed-off-by: kuoruan <2b8c98b0b69c0b74bfe03cced5a9f738a15f1468@gmail.com>
| JavaScript | mit | ziahamza/webui-aria2,ghostry/webui-aria2,ghostry/webui-aria2,kuoruan/webui-aria2,kuoruan/webui-aria2,ziahamza/webui-aria2 |
ebeeb1a8a0871467b9b7597c3bd82b8b67829364 | src/javascript/binary/components/trackjs_onerror.js | src/javascript/binary/components/trackjs_onerror.js | window._trackJs = {
onError: function(payload, error) {
function itemExistInList(item, list) {
for (var i = 0; i < list.length; i++) {
if (item.indexOf(list[i]) > -1) {
return true;
}
}
return false;
}
... | window._trackJs = {
onError: function(payload, error) {
function itemExistInList(item, list) {
for (var i = 0; i < list.length; i++) {
if (item.indexOf(list[i]) > -1) {
return true;
}
}
return false;
}
... | Add a general 'loading script' to ignore list | Add a general 'loading script' to ignore list
| JavaScript | apache-2.0 | borisyankov/binary-static,borisyankov/binary-static,einhverfr/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,einhverfr/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,tfoertsch/binary-static,tfoertsch/binary-static,massihx/binary-static,massihx/binary-static,brodiecapel16/bi... |
3bd270f245b5e98a4784548d40959337dd050625 | src/javascript/binary/components/trackjs_onerror.js | src/javascript/binary/components/trackjs_onerror.js | window._trackJs = {
onError: function(payload, error) {
function itemExistInList(item, list) {
for (var i = 0; i < list.length; i++) {
if (item.indexOf(list[i]) > -1) {
return true;
}
}
return false;
}
... | window._trackJs = {
onError: function(payload, error) {
function itemExistInList(item, list) {
for (var i = 0; i < list.length; i++) {
if (item.indexOf(list[i]) > -1) {
return true;
}
}
return false;
}
... | Check for TrackJs already loaded and if yes, reinitialize it. Fixed version. | Check for TrackJs already loaded and if yes, reinitialize it. Fixed version.
| JavaScript | apache-2.0 | animeshsaxena/binary-static,tfoertsch/binary-static,einhverfr/binary-static,einhverfr/binary-static,tfoertsch/binary-static,borisyankov/binary-static,einhverfr/binary-static,massihx/binary-static,animeshsaxena/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,brodiecapel16/binary-static,borisyankov/... |
ee0a0699a9804c485e464f521e5c95d506d0fa29 | app/components/audit_log/Export.js | app/components/audit_log/Export.js | import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
const exampleQuery = (slug) => `query {
organization(slug: "${slug}") {
auditEvents(first: 500) {
edges {
node {
type
occurredAt
actor {
name
}... | import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
const exampleQuery = (slug) => `query {
organization(slug: "${slug}") {
auditEvents(first: 500) {
edges {
node {
type
occurredAt
actor {
name
}... | Tweak layout of export component | Tweak layout of export component
| JavaScript | mit | buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.