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 |
|---|---|---|---|---|---|---|---|---|---|
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 |
cdad548abcbc49e10001febaa08b17300035413a | app/adapters/node.js | app/adapters/node.js | import Ember from 'ember';
import DS from 'ember-data';
import ENV from '../config/environment';
function getToken() {
var token;
var session = window.localStorage['ember_simple_auth:session'];
if (session) {
token = JSON.parse(session)['authenticated'];
if ('attributes' in token) {
... | import Ember from 'ember';
import DS from 'ember-data';
import ENV from '../config/environment';
function getToken() {
var token;
var session = window.localStorage['ember_simple_auth-session'];
if (session) {
token = JSON.parse(session)['authenticated'];
if ('attributes' in token) {
... | Fix property name for ember-simple-auth | Fix property name for ember-simple-auth
| JavaScript | apache-2.0 | caneruguz/osfpages,caneruguz/osfpages,Rytiggy/osfpages,Rytiggy/osfpages |
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 |
925c4b35ebacea747c490c0b3ed054b0b4739bf8 | js/InventoryController.js | js/InventoryController.js | myApp.controller('InventoryController', function($scope, $window, $location, $routeParams, inventoryService) {
inventoryService.loadInventories()
.then(function(inventories) {
console.log("Loaded stored inventories: ", inventories);
$scope.inventories = inventories;
});
$... | myApp.controller('InventoryController', function($scope, $window, $location, $routeParams, inventoryService) {
inventoryService.loadInventories()
.then(function(inventories) {
console.log("Loaded stored inventories: ", inventories);
$scope.inventories = inventories;
$scop... | Add .apply() to inventory loading to refresh ng-repeat | Add .apply() to inventory loading to refresh ng-repeat
| JavaScript | cc0-1.0 | zcdunn/inventory,zcdunn/inventory |
28c4434b7ceb86492f1e5448e47b6672889e33e6 | app/scripts/timetable_builder/views/ExamView.js | app/scripts/timetable_builder/views/ExamView.js | define(['backbone.marionette', 'app', 'hbs!../templates/exam'],
function (Marionette, App, template) {
'use strict';
return Marionette.ItemView.extend({
tagName: 'tr',
template: template,
events: {
'click .remove': function () {
App.execute('removeModule', this.model.id);... | define(['backbone.marionette', 'app', 'hbs!../templates/exam'],
function (Marionette, App, template) {
'use strict';
return Marionette.ItemView.extend({
tagName: 'tr',
template: template,
events: {
'click .remove': function () {
App.request('removeModule', this.model.id);... | Fix removing module from exam timetable | Fix removing module from exam timetable
| JavaScript | mit | mauris/nusmods,Yunheng/nusmods,chunqi/nusmods,Yunheng/nusmods,Yunheng/nusmods,zhouyichen/nusmods,Yunheng/nusmods,Yunheng/nusmods,nusmodifications/nusmods,zhouyichen/nusmods,nathanajah/nusmods,chunqi/nusmods,mauris/nusmods,nusmodifications/nusmods,zhouyichen/nusmods,mauris/nusmods,mauris/nusmods,nusmodifications/nusmods... |
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 |
909fa7e69ed9cd01d08c65a2ba04b0499f4c454c | bin/etcd-dump.js | bin/etcd-dump.js | #!/usr/bin/env node
// Requires
var _ = require('underscore');
var fs = require('fs');
// Comannder
var prog = require('commander');
// etcd-dump's package.json file
var pkg = require('../package.json');
// Dumper class
var dumper = require('../')();
// General options
prog
.version(pkg.version)
.option('-f, --fi... | #!/usr/bin/env node
// Requires
var _ = require('underscore');
var fs = require('fs');
// Comannder
var prog = require('commander');
// etcd-dump's package.json file
var pkg = require('../package.json');
// Dumper class
var dumper = require('../')();
// General options
prog
.version(pkg.version)
.option('-f, --fi... | Fix typo "dump" => "dumper" | Fix typo "dump" => "dumper"
| JavaScript | apache-2.0 | AaronO/etcd-dump |
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 |
9d10a9713b0adb5c93d7e1eacc6c67230ab9fbac | app/transforms/isodate.js | app/transforms/isodate.js | import DS from 'ember-data';
export default DS.Transform.extend({
deserialize(serialized) {
const date = moment(serialized).format('DD MMMM YYYY');
return date;
},
serialize(deserialized) {
const date = moment(deserialized).format('YYYY/MM/DD');
return date;
}
});
| import DS from 'ember-data';
export default DS.Transform.extend({
deserialize(serialized) {
const date = moment(serialized).format('DD MMMM');
return date;
},
serialize(deserialized) {
const date = moment(deserialized).format('YYYY/MM/DD');
return date;
}
});
| Hide year of birth in notification component | Hide year of birth in notification component
| JavaScript | mit | msm-app-devs/intranet-app,msm-app-devs/intranet-app |
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 |
49f1853be6835fd0a4ec8d8689141723b608c21c | src/article/converter/util/createEmptyJATS.js | src/article/converter/util/createEmptyJATS.js | import { DefaultDOMElement } from 'substance'
const EMPTY_JATS = `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving DTD v1.0 20120330//EN" "JATS-journalarchiving.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ali="http://www.niso.org/schemas/a... | import { DefaultDOMElement } from 'substance'
import { DEFAULT_JATS_SCHEMA_ID, DEFAULT_JATS_DTD } from '../../ArticleConstants'
// TODO: we need a way to specify which namespaces should be declared
const EMPTY_JATS = `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "${DEFAULT_JATS_SCHEMA_ID}" "${DEFAU... | Use default schema id for empty articles. | Use default schema id for empty articles.
| JavaScript | mit | substance/texture,substance/texture |
d84f0a56b4c0827e1fc296b400e5170b98518496 | www/autotest/tests/bridge.tests.js | www/autotest/tests/bridge.tests.js | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); y... | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); y... | Fix bridge test failure due to "" vs null | android: Fix bridge test failure due to "" vs null
| JavaScript | apache-2.0 | corimf/cordova-mobile-spec,ollie314/cordova-mobile-spec,apache/cordova-mobile-spec,apache/cordova-mobile-spec,apache/cordova-mobile-spec,ollie314/cordova-mobile-spec,ollie314/cordova-mobile-spec,corimf/cordova-mobile-spec,ollie314/cordova-mobile-spec,apache/cordova-mobile-spec,corimf/cordova-mobile-spec,ollie314/cordov... |
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 |
5a5973935137f7b666f87b56d45922a20f5b9915 | test/index.js | test/index.js | import test from 'ava';
import { search, searchContinuously } from '..';
test('it makes a request', t =>
search()
.then(items => {
t.true(Array.isArray(items));
})
);
test('it subscribes to a stream', t =>
searchContinuously()
.take(1)
.toPromise()
.then(items => {
t.true(Array.isA... | import test from 'ava';
import { search, searchContinuously } from '..';
test('it makes a request', t =>
search()
.then(items => {
t.true(Array.isArray(items));
}),
);
test('it subscribes to a stream', t =>
searchContinuously()
.take(1)
.toPromise()
.then(items => {
t.true(Array.is... | Add trailing commas where appropriate | Add trailing commas where appropriate
| JavaScript | mit | maxdavidson/apartmentor |
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 |
f6b99704f6a48eabc2622cf020813023413a7fa3 | autocompleteme.js | autocompleteme.js | /**
* autocompleteme.js
* Chrome extension to remove autocomplete=off attributes from all elements on the page.
*
* https://github.com/martone/autocompleteme
* Andy Martone (amartone@gmail.com)
*/
(function() {
var elements = document.querySelectorAll('input[autocomplete=off]');
if (elements.length) {
con... | /**
* autocompleteme.js
* Chrome extension to remove autocomplete=off attributes from all elements on the page.
*
* https://github.com/martone/autocompleteme
* Andy Martone (amartone@gmail.com)
*/
(function() {
var elements = document.querySelectorAll('[autocomplete=off]');
if (elements.length) {
console.... | Apply to all elements, not just input. | Apply to all elements, not just input.
| JavaScript | mit | martone/autocompleteme |
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 |
40e9232ec550c322153e4212344b9d35722cd2e7 | blueocean-web/gulpfile.js | blueocean-web/gulpfile.js | //
// See https://github.com/jenkinsci/js-builder
//
var builder = require('@jenkins-cd/js-builder');
// Disable js-builder based linting for now.
// Will get fixed with https://github.com/cloudbees/blueocean/pull/55
builder.lint('none');
// Explicitly setting the src paths in order to allow the rebundle task to
// w... | //
// See https://github.com/jenkinsci/js-builder
//
var builder = require('@jenkins-cd/js-builder');
// Disable js-builder based linting for now.
// Will get fixed with https://github.com/cloudbees/blueocean/pull/55
builder.lint('none');
// Explicitly setting the src paths in order to allow the rebundle task to
// w... | Watch for changes in the JDL package (rebundle) | Watch for changes in the JDL package (rebundle)
| JavaScript | mit | jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,ModuloM/blueocean-plugin,kzantow/blueocean-plugin,kzantow/blueocean-plugin,tfennelly/blueocean-plugin,alvarolobato/blueocean-plugin,alvarolobato/blueocean-plugin,kzantow/blueocean-plugin,tfennelly/blueocean-plugin,tfennelly/blueocean-plugi... |
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 |
5313eb7bce2ebb1b8dae3c2359cc6520465e01c1 | ghost/admin/router.js | ghost/admin/router.js | /*global Ember */
// ensure we don't share routes between all Router instances
var Router = Ember.Router.extend();
Router.reopen({
//location: 'history', // use HTML5 History API instead of hash-tag based URLs
rootURL: '/ghost/ember/' // admin interface lives under sub-directory /ghost
});
Router.map(functio... | /*global Ember */
// ensure we don't share routes between all Router instances
var Router = Ember.Router.extend();
Router.reopen({
location: 'history', // use HTML5 History API instead of hash-tag based URLs
rootURL: '/ghost/ember/' // admin interface lives under sub-directory /ghost
});
Router.map(function ... | Add HTML5 pushState support for Ember | Add HTML5 pushState support for Ember
- also updates associated route
| JavaScript | mit | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost |
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 |
046d25e5a18444acc9f745054b772ab5c316717d | server.js | server.js | var AlexaAppServer = require('alexa-app-server');
var MpdInterface = require('./apps/alexa-mpd-control/mpd_interface');
var mpd = new MpdInterface();
AlexaAppServer.start({
// server_root:__dirname, // Path to root
// public_html:"public_html", // Static content
// app_dir:"apps", // Where ... | var AlexaAppServer = require('alexa-app-server');
var MpdInterface = require('./apps/alexa-mpd-control/mpd_interface');
var mpd = new MpdInterface();
AlexaAppServer.start({
// server_root:__dirname, // Path to root
// public_html:"public_html", // Static content
// app_dir:"apps", // Where ... | Fix bad function name call | Fix bad function name call
| JavaScript | mit | guikubivan/alexa-mpd-control,guikubivan/alexa-mpd-control |
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 |
d419673a07062390431dd7ff4f5ac526b1c252bd | tests/content/script/breakpoints/5525/issue5525.js | tests/content/script/breakpoints/5525/issue5525.js | function runTest()
{
FBTest.sysout("issue5525.START");
FBTest.openNewTab(basePath + "script/breakpoints/5525/issue5525.html", function(win)
{
FBTest.openFirebug();
FBTest.enableScriptPanel()
FBTest.enableConsolePanel()
FBTest.selectPanel("console");
var config = {tag... | function runTest()
{
FBTest.sysout("issue5525.START");
FBTest.openNewTab(basePath + "script/breakpoints/5525/issue5525.html", function(win)
{
FBTest.openFirebug();
FBTest.enableScriptPanel()
FBTest.enableConsolePanel()
FBTest.selectPanel("console");
var config = {tag... | Fix test to pass also with Firefox 13 | Fix test to pass also with Firefox 13
| JavaScript | bsd-3-clause | firebug/tracing-console,firebug/tracing-console |
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 |
d9cc719e8c1eeb1290ba5df986d1b89050a3b12e | src/ie.js | src/ie.js | // Zepto.js
// (c) 2010-2013 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
;(function(){
// __proto__ doesn't exist on IE<11, so redefine
// the Z function to use object extension instead
if (!('__proto__' in {})) {
$.extend($.zepto, {
Z: function(dom, selector){... | // Zepto.js
// (c) 2010-2013 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
;(function($){
// __proto__ doesn't exist on IE<11, so redefine
// the Z function to use object extension instead
if (!('__proto__' in {})) {
$.extend($.zepto, {
Z: function(dom, selector)... | Make sure to properly patch the Zepto object in IE, not any global $ object. | Make sure to properly patch the Zepto object in IE, not any global $ object.
| JavaScript | mit | xuechunL/zepto,chenruixuan/zepto,zhengdai/zepto,SallyRice/zepto,JimmyVV/zepto,huaziHear/zepto,wyfyyy818818/zepto,yinchuandong/zepto,wanglam/zepto,nerdgore/zepto,zhangbg/zepto,mmcai/zepto,Genie77998/zepto,rayrc/zepto,wubian0517/zepto,alatvanas9/zepto,mscienski/zepto,webcoding/zepto,wubian0517/zepto,GerHobbelt/zepto,huaz... |
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 |
32f9c800025440756fa63211fc4c0e89c1ae4506 | src/store/index.js | src/store/index.js | import Vue from 'vue'
import Vuex from 'vuex'
import * as actions from './actions'
import * as mutations from './mutations'
import * as getters from './getters'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
// Authentication state
token: sessionStorage.getItem('token') || '',
status: '',
//... | import Vue from 'vue'
import Vuex from 'vuex'
import * as actions from './actions'
import * as mutations from './mutations'
import * as getters from './getters'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
// Authentication state
token: sessionStorage.getItem('token') || '',
status: '',
//... | Change thinsList type to array | Change thinsList type to array
| JavaScript | agpl-3.0 | freedomotic/fd-vue-webapp,freedomotic/fd-vue-webapp |
65e00c407ad40f279ca25aa0f54b1a753a5f593f | test/buster.js | test/buster.js | var config = module.exports;
config["Browser tests"] = {
rootPath: "../",
environment: "browser",
extensions: [require("buster-coffee")],
sources: [
"test/ext/*.js",
"dist/caman.full.js"
],
tests: ["test/browser/*.coffee"]
};
config["Node tests"] = {
rootPath: "../",
environment: "node",
ext... | var config = module.exports;
config["Browser tests"] = {
rootPath: "../",
environment: "browser",
extensions: [require("buster-coffee")],
sources: [
"test/ext/*.js",
"dist/caman.full.js"
],
tests: ["test/browser/*.coffee"]
};
// For some reason, Buster doesn't quit when you define two
// different... | Disable node tests for now | Disable node tests for now
| JavaScript | bsd-3-clause | prashen/CamanJS,purposeindustries/CamanJS,mcanthony/CamanJS,mcanthony/CamanJS,arschmitz/caman-dist-only,meltingice/CamanJS,ckfinder/CamanJS,rn2dy/CamanJS,rn2dy/CamanJS,purposeindustries/CamanJS,mcanthony/CamanJS,meltingice/CamanJS,prashen/CamanJS,rn2dy/CamanJS,meltingice/CamanJS,ckfinder/CamanJS,prashen/CamanJS,ckfinde... |
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 |
7069dd332481662adc09252ce65c9796c2d6abed | app/src/services/user.service.js | app/src/services/user.service.js | const logger = require('logger');
const ctRegisterMicroservice = require('ct-register-microservice-node');
class UserService {
static async getEmailById(userId) {
logger.info('Get user by user id', userId);
try {
const user = await ctRegisterMicroservice.requestToMicroservice({
uri: '/user/' + ... | const logger = require('logger');
const ctRegisterMicroservice = require('ct-register-microservice-node');
class UserService {
static async getEmailById(userId) {
logger.info('Get user by user id', userId);
try {
const user = await ctRegisterMicroservice.requestToMicroservice({
uri: '/user/' + ... | Fix the fix to fix the error | Fix the fix to fix the error
| JavaScript | mit | gfw-api/fw-teams,gfw-api/fw-teams |
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... |
afcbd88b545b285128ac7f8d4a8cff605edfb3d2 | docs/assets/js/docs.ad.js | docs/assets/js/docs.ad.js | var _kmq = _kmq || [];
$(function() {
// No need to do a timeout for default case, if KM times out just don't show ad.
_kmq.push(function(){
// Set up the experiment (this is the meat and potatoes)
var type = KM.ab("Foundation Docs Upsell Type", ["question", "directive"]);
// TODO: Add alternate bet... | $(function() {
// TODO: Add alternate between advanced and intro
var topic = $('h1.docs-page-title').text();
var header = 'Master ' + topic;
var body = 'Get up to speed FAST, learn straight from the experts who built Foundation.';
var link = 'http://zurb.com/university/foundation-intro?utm_source=Foundation%... | Update language to directive form | Update language to directive form
| JavaScript | mit | jeromelebleu/foundation-sites,Owlbertz/foundation,BerndtGroup/TBG-foundation-sites,IamManchanda/foundation-sites,DaSchTour/foundation-sites,jaylensoeur/foundation-sites-6,colin-marshall/foundation-sites,Owlbertz/foundation,zurb/foundation,abdullahsalem/foundation-sites,aoimedia/foundation,dragthor/foundation-sites,zurb... |
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 |
616e06a8e1adacc5738f3ce67c234af20e87e4c0 | lib/connection-status.js | lib/connection-status.js | 'use strict';
const has = require('has');
function collectPoolStatus(stats, { type, host, pool }) {
const poolStats = [
['_allConnections', 'open'],
['_freeConnections', 'sleeping'],
['_acquiringConnections', 'waiting']
]
.filter(([mysqljsProp]) => has(pool, mysqljsProp) && Arr... | 'use strict';
const has = require('has');
function collectPoolStatus(stats, { type, host, pool }) {
const poolStats = [
['_allConnections', 'open'],
['_freeConnections', 'sleeping'],
['_acquiringConnections', 'waiting']
]
.filter(([mysqljsProp]) => has(pool, mysqljsProp) && Arr... | Rename master -> masters and slave -> slaves in server status | Rename master -> masters and slave -> slaves in server status
| JavaScript | mit | godmodelabs/flora-mysql,godmodelabs/flora-mysql |
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 |
0ddb22881705535445aec6258da604278cac75e1 | src/modules/ngSharepoint/services/spProvider.js | src/modules/ngSharepoint/services/spProvider.js | angular
.module('ngSharepoint')
.provider('$sp', function() {
var siteUrl = '';
var connMode = 'JSOM'; //possible values: JSOM, REST
var token = '';
var autoload = true;
return {
setSiteUrl: function (newUrl) {
siteUrl = newUrl;
},
setConnectionMode: function(connMode) { //Only JSOM Supported ... | angular
.module('ngSharepoint')
.provider('$sp', function() {
var siteUrl = '';
var connMode = 'JSOM'; //possible values: JSOM, REST
var token = false;
var autoload = true;
return {
setSiteUrl: function (newUrl) {
siteUrl = newUrl;
},
setConnectionMode: function(connMode) { //Only JSOM Support... | Set token to false by default | Set token to false by default
| JavaScript | apache-2.0 | maxjoehnk/ngSharepoint |
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 |
e35d2be4041b62ede59bbfd3ff9ea4016fc3582e | src/client/app/components/header/header.template.js | src/client/app/components/header/header.template.js | import { HeaderService } from "./header.service.js";
export class HeaderTemplate {
static update(render) {
const start = Date.now();
/* eslint-disable indent */
render`
<nav class="flex flex-row bt bb tc mw9 center shadow-2">
<div class="flex flex-wrap flex-row... | import { HeaderService } from "./header.service.js";
export class HeaderTemplate {
static update(render) {
const start = Date.now();
/* eslint-disable indent */
render`
<nav class="flex flex-row bt bb mw9 center shadow-2">
<div class="flex flex-wrap flex-row ju... | Remove text align center from status and toasts in the header. | Remove text align center from status and toasts in the header.
| JavaScript | mit | albertosantini/node-conpa,albertosantini/node-conpa |
9bdf5459f7001353f779980ffabc24c470179cdc | example/webpack.config.js | example/webpack.config.js | var path = require('path');
var loader = path.join(__dirname, '..', '..', 'index.js');
var __DEV__ = process.env.NODE_ENV !== 'production';
module.exports = {
entry: path.join(__dirname, 'index.js'),
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js',
publicPath: __DEV__ ? '/public/'... | var path = require('path');
var loader = path.join(__dirname, '..', 'index.js');
var __DEV__ = process.env.NODE_ENV !== 'production';
module.exports = {
entry: path.join(__dirname, 'index.js'),
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js',
publicPath: __DEV__ ? '/public/' : 'ht... | Fix example path which occured as a consequence of rename | Fix example path which occured as a consequence of rename
| JavaScript | apache-2.0 | boopathi/image-size-loader |
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... |
e8b67dea98931e469a1b1d741abbfbed73b2ec23 | app/js/arethusa.core/directives/arethusa_navbar.js | app/js/arethusa.core/directives/arethusa_navbar.js | 'use strict';
/* Configurable navbar
*
* The following variables can be declared in a conf file
* disable - Boolean
* search - Boolean
* navigation - Boolean
* notifier - Boolean
* template - String
*
* Example;
*
* {
* "navbar" : {
* "search" : true,
* "navigation" : true,
* "tem... | 'use strict';
/* Configurable navbar
*
* The following variables can be declared in a conf file
* disable - Boolean
* search - Boolean
* navigation - Boolean
* notifier - Boolean
* template - String
*
* Example;
*
* {
* "navbar" : {
* "search" : true,
* "navigation" : true,
* "tem... | Delete an empty line again... | Delete an empty line again...
| JavaScript | mit | fbaumgardt/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.