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 |
|---|---|---|---|---|---|---|---|---|---|
5116c1dd1c7a9e993d0c4b86a67d58520386fb56 | test/detect/index.js | test/detect/index.js | 'use strict';
var bluebird = require('bluebird');
var fs = bluebird.promisifyAll(require('fs'));
var hljs = require('../../build');
var path = require('path');
var utility = require('../utility');
function testAutoDetection(language) {
var languagePath = utility.buildPath('detect', language);
it(`... | 'use strict';
let bluebird = require('bluebird');
let fs = bluebird.promisifyAll(require('fs'));
let hljs = require('../../build');
let path = require('path');
let utility = require('../utility');
function testAutoDetection(language) {
let languagePath = utility.buildPath('detect', language);
it(`... | Use let in the detect test suite | Use let in the detect test suite
| JavaScript | bsd-3-clause | bluepichu/highlight.js,bluepichu/highlight.js,MakeNowJust/highlight.js,isagalaev/highlight.js,highlightjs/highlight.js,highlightjs/highlight.js,teambition/highlight.js,Sannis/highlight.js,carlokok/highlight.js,MakeNowJust/highlight.js,palmin/highlight.js,sourrust/highlight.js,bluepichu/highlight.js,StanislawSwierc/high... |
78f8be18c8042305c401f1ac47e4ba5a3c2105f8 | ui/protractor.conf.js | ui/protractor.conf.js | const protractor = require('protractor')
const phantomjs = require('phantomjs-prebuilt')
exports.config = {
framework: 'mocha',
plugins: [{
package: 'aurelia-protractor-plugin'
}, {
package: 'protractor-console',
logLevels: ['debug', 'info', 'warning', 'severe']
}],
capabilities: {
'browserN... | const phantomjs = require('phantomjs-prebuilt')
exports.config = {
framework: 'mocha',
plugins: [{
package: 'aurelia-protractor-plugin'
}, {
package: 'protractor-console',
logLevels: ['debug', 'info', 'warning', 'severe']
}],
capabilities: {
'browserName': 'phantomjs',
'phantomjs.binary.... | Remove not-needed option. The aurelia plugin already takes care of this. | Remove not-needed option.
The aurelia plugin already takes care of this.
| JavaScript | mit | jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr |
880c178a446d61d77ba512e027e2cd076d412df8 | api/lib/log/logger.js | api/lib/log/logger.js | // TODO: To decide and adopt to some logging utility like winston
var util = require('util');
module.exports = {
info: function(message,context) {
if(context) {
console.log(message, util.format('%j', context));
}
else {
console.log(message);
}
},
error: function(message, error) {... | // TODO: To decide and adopt to some logging utility like winston
var util = require('util');
module.exports = {
info: function(message,context) {
var logItem = {
timestamp: new Date(),
source: 'autoscaler:apiserver',
text: message,
log_level: 'info',
data: context === null ? {} : ... | Prepare log output as parseable JSON data | Prepare log output as parseable JSON data
| JavaScript | apache-2.0 | cloudfoundry-incubator/app-autoscaler,pradyutsarma/app-autoscaler,qibobo/app-autoscaler,pradyutsarma/app-autoscaler,qibobo/app-autoscaler,pradyutsarma/app-autoscaler,cloudfoundry-incubator/app-autoscaler,cloudfoundry-incubator/app-autoscaler,qibobo/app-autoscaler,qibobo/app-autoscaler,cloudfoundry-incubator/app-autosca... |
cb192f3b98bcfc5d8363924c5be1f2be37a2dbb5 | admin/scripts/default.js | admin/scripts/default.js | $(document).ready(function () {
/*Navigation initialization*/
var navigation = $('#navigation');
var navShown = false;
$('#nav-controller').on('click', function () {
if (navShown) {
navigation.removeClass('show-nav');
navigation.addClass('hide-nav');
navShown... | $(document).ready(function () {
/*Navigation initialization*/
var navigation = $('#navigation');
var navShown = false;
var navController = $('#nav-controller');
if (navController) {
navController.on('click', function () {
if (navShown) {
navigation.removeClass('s... | Resolve all the JS errors | Resolve all the JS errors
| JavaScript | mit | UoG-Libraries/Adshow,UoG-Libraries/Adshow,UoG-Libraries/Adshow |
10be5cde2d00aee7a8aaf248f978476d92f73581 | app/js/service/router.js | app/js/service/router.js | define([
'flight/lib/component',
'director'
], function(defineComponent, Router) {
'use strict';
function RouterService() {
this.gotoPost = function(id) {
this.trigger(document, 'service.fetchPost', {
"id": id
});
};
this.gotoPosts = func... | define([
'flight/lib/component',
'director'
], function(defineComponent, Router) {
'use strict';
function RouterService() {
this.gotoPost = function(id) {
this.trigger(document, 'service.fetchPost', {
"id": id
});
};
this.gotoPosts = func... | Set post page as the default page | Set post page as the default page
| JavaScript | mit | unitedstackfront/ued,unitedstackfront/ued |
d76797c3ac220189e303670312bb6571ef096b22 | packages/create-graphql/src/utils.js | packages/create-graphql/src/utils.js | import shell from 'shelljs';
import chalk from 'chalk';
import ora from 'ora';
import spawn from 'cross-spawn-promise';
const tic = chalk.green('✓');
const tac = chalk.red('✗');
const installYeoman = async () => {
const spinner = ora('Installing Yeoman...');
spinner.start();
let command = 'yarn';
let args =... | import shell from 'shelljs';
import chalk from 'chalk';
import ora from 'ora';
import spawn from 'cross-spawn-promise';
const tic = chalk.green('✓');
const tac = chalk.red('✗');
const installYeoman = async () => {
const spinner = ora('Installing Yeoman...');
spinner.start();
const command = 'npm';
const arg... | Remove the yarn checking, as yarn itself is not stable yet and a lot of people are using old versions. | Remove the yarn checking, as yarn itself is not stable yet and a lot of people are using old versions.
| JavaScript | mit | graphql-community/create-graphql,lucasbento/create-graphql |
cd0c283d607b5ac4af377d9a05a99218c5ae7091 | assets/js/modules/idea-hub/datastore/base.js | assets/js/modules/idea-hub/datastore/base.js | /**
* `modules/idea-hub` base data store
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LIC... | /**
* `modules/idea-hub` base data store
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LIC... | Add ownerID in settingSlugs for idea hub. | Add ownerID in settingSlugs for idea hub.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
eb530d7da6d372703d54f6648cdf5000949d71a9 | Ship/CommandSource.js | Ship/CommandSource.js | class CommandSource {
constructor(messageSource,botUsername){
this.botUsername = botUsername;
this.bindings = {};
messageSource.on("text",this.handle.bind(this));
}
addCommand(name,command){
if(name in this.bindings){
throw `Error: A command is already bound to ${name}`;
}
this.bind... | class CommandSource {
constructor(messageSource,botUsername){
this.botUsername = botUsername;
this.bindings = {};
messageSource.on("text",this.handle.bind(this));
}
addCommand(name,command){
if(name in this.bindings){
throw `Error: A command is already bound to ${name}`;
}
this.bind... | Fix bot failing to respond to command with it's username | Fix bot failing to respond to command with it's username
Fix #5
| JavaScript | mit | severnbronies/Sail |
7c014584f848d9f7df9470ee796aaa32317a82de | db/users.js | db/users.js | var records = [
{ id: 1, username: 'jack', password: 'secret', displayName: 'Jack', emails: [ { value: 'jack@example.com' } ] }
, { id: 2, username: 'jill', password: 'birthday', displayName: 'Jill', emails: [ { value: 'jill@example.com' } ] }
];
exports.findByUsername = function(username, cb) {
process.nextTi... | require('dotenv').load()
var records = [
{ id: 1, username: 'jack', password: 'secret', displayName: 'Jack', emails: [ { value: 'jack@example.com' } ] }
, { id: 2, username: 'jill', password: 'birthday', displayName: 'Jill', emails: [ { value: 'jill@example.com' } ] }
];
if (process.env.shared_secret != null &&... | Support for shared secrets for authentication. | Support for shared secrets for authentication.
Provide an enviroment variable "shared_secret" and you will
be able to authenticate with any username that is not matched
in the "database." Optionally, provide "shared_username" to
set the username explicitly; otherwise, "community" will be
used.
| JavaScript | unlicense | community-lands/community-lands-monitoring-station,rfc2616/community-lands-monitoring-station,rfc2616/community-lands-monitoring-station,community-lands/community-lands-monitoring-station,community-lands/community-lands-monitoring-station,rfc2616/community-lands-monitoring-station |
297c33b3f790fdbdec51891451703724ca1a2614 | core/client/components/gh-activating-list-item.js | core/client/components/gh-activating-list-item.js | var ActivatingListItem = Ember.Component.extend({
tagName: 'li',
classNameBindings: ['active'],
active: false
});
export default ActivatingListItem;
| var ActivatingListItem = Ember.Component.extend({
tagName: 'li',
classNameBindings: ['active'],
active: false,
unfocusLink: function () {
this.$('a').blur();
}.on('click')
});
export default ActivatingListItem;
| Fix active menu state on settings navigation | Fix active menu state on settings navigation
closes #4622
- unfocus ActivatingListItem link when clicked
| JavaScript | mit | panezhang/Ghost,beautyOfProgram/Ghost,jaswilli/Ghost,qdk0901/Ghost,rchrd2/Ghost,schematical/Ghost,icowan/Ghost,singular78/Ghost,NamedGod/Ghost,GroupxDev/javaPress,Bunk/Ghost,jomahoney/Ghost,SachaG/bjjbot-blog,bisoe/Ghost,kwangkim/Ghost,daihuaye/Ghost,ngosinafrica/SiteForNGOs,ASwitlyk/Ghost,prosenjit-itobuz/Ghost,BayPhi... |
7c4fb497c6ce67bc80b989e9ce386563d2809ac8 | diogenes.js | diogenes.js | (function(window, Object) {
var diogenes = {};
diogenes.Game = function(canvas, width, height, screen, items, characters, player) {
// Canvas context
this.ctx = canvas.getContext('2d');
// Dimension
this.width = width;
this.height = height;
// Objects
this.screen = screen;
this.... | Implement some constructors and animation loop | Implement some constructors and animation loop
Implement Game, Screen and Item constructors. Implement DrawableEntity
and InteractiveEntity prototypes. Implement the animation loop.
| JavaScript | mit | jghinestrosa/diogenes | |
8df9abb705e05391a592a379b9ddbc6d27b3d1cf | packages/react-jsx-highcharts/src/components/PlotBandLine/usePlotBandLineLifecycle.js | packages/react-jsx-highcharts/src/components/PlotBandLine/usePlotBandLineLifecycle.js | import React, { useRef, useEffect, useState } from 'react';
import uuid from 'uuid/v4';
import { attempt } from 'lodash-es';
import useModifiedProps from '../UseModifiedProps';
import useAxis from '../UseAxis';
export default function usePlotBandLine(props, plotType) {
const { id = uuid, children, ...rest } = props;... | import React, { useRef, useEffect, useState } from 'react';
import uuid from 'uuid/v4';
import { attempt } from 'lodash-es';
import useModifiedProps from '../UseModifiedProps';
import useAxis from '../UseAxis';
export default function usePlotBandLine(props, plotType) {
const { id = uuid, children, ...rest } = props;... | Revert "Fix plotline getting removed when children present" | Revert "Fix plotline getting removed when children present"
This reverts commit d8dd4d977c3dcec578e083a2cd5beca4b9873e5c.
| JavaScript | mit | whawker/react-jsx-highcharts,whawker/react-jsx-highcharts |
8bc84bd260f674c6707db51f961056847e332e5e | core/client/components/gh-upload-modal.js | core/client/components/gh-upload-modal.js | import ModalDialog from 'ghost/components/gh-modal-dialog';
import upload from 'ghost/assets/lib/uploader';
var UploadModal = ModalDialog.extend({
layoutName: 'components/gh-modal-dialog',
didInsertElement: function () {
this._super();
upload.call(this.$('.js-drop-zone'), {fileStorage: this.ge... | import ModalDialog from 'ghost/components/gh-modal-dialog';
import upload from 'ghost/assets/lib/uploader';
var UploadModal = ModalDialog.extend({
layoutName: 'components/gh-modal-dialog',
didInsertElement: function () {
this._super();
upload.call(this.$('.js-drop-zone'), {fileStorage: this.ge... | Fix button class on upload modal | Fix button class on upload modal
no issue
- this makes sure that the cancel button on the upload modal gets the
correct class
| JavaScript | mit | johnnymitch/Ghost,ManRueda/Ghost,r14r/fork_nodejs_ghost,ckousik/Ghost,thomasalrin/Ghost,singular78/Ghost,ballPointPenguin/Ghost,tanbo800/Ghost,JohnONolan/Ghost,carlyledavis/Ghost,laispace/laiblog,schneidmaster/theventriloquist.us,hyokosdeveloper/Ghost,achimos/ghost_as,achimos/ghost_as,etdev/blog,epicmiller/pages,nmukh/... |
69420c72b6f9adabc6bbe027c24d4313efea534c | protractor.conf.js | protractor.conf.js | require("./server")
exports.config = {
directConnect: true,
specs: 'tests/e2e/*.js',
baseUrl: 'http://localhost:1234',
framework: 'jasmine2',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
}
};
| ci = process.env.CI !== undefined
if (!ci)
require("./server")
exports.config = {
directConnect: !ci,
specs: 'tests/e2e/*.js',
baseUrl: (ci ? 'http://pollsapiclient.herokuapp.com' : 'http://localhost:1234'),
framework: 'jasmine2',
sauceUser: 'vincenzchianese',
sauceKey : 'ebcc4534-bdcc-4ad5-8fd2-31ea2a1... | Set up data for saucelabs | Set up data for saucelabs
| JavaScript | mit | XVincentX/pollsApiClient,XVincentX/pollsApiClient |
7162d926443cc62dd0f4a93691de5f7a08d47d11 | eln/libs.js | eln/libs.js |
export {default as OCLE} from 'https://www.lactame.com/lib/openchemlib-extended/1.13.0/openchemlib-extended.js';
export {default as SD} from 'https://www.lactame.com/lib/spectra-data/3.1.0/spectra-data.min.js';
export {default as CCE} from 'https://www.lactame.com/lib/chemcalc-extended/1.27.0/chemcalc-extended.js';
ex... |
export {default as OCLE} from 'https://www.lactame.com/lib/openchemlib-extended/1.13.0/openchemlib-extended.js';
export {default as SD} from 'https://www.lactame.com/lib/spectra-data/3.1.0/spectra-data.min.js';
export {default as CCE} from 'https://www.lactame.com/lib/chemcalc-extended/1.27.0/chemcalc-extended.js';
ex... | Update elnPlugin to version to 0.1.2 | Update elnPlugin to version to 0.1.2
| JavaScript | mit | cheminfo-js/visualizer-helper,cheminfo-js/visualizer-helper |
258e9170038e3c55481447c1460413af710c21a8 | public/js/app/fields/CreateAttachmentView.js | public/js/app/fields/CreateAttachmentView.js | define(["app/app"], function(App) {
"use strict";
App.CreateAttachmentView = Ember.View.extend({
tagName: 'input',
type: 'file',
attributeBindings: ['type'],
change: function(event) {
if (event.target.files.length > 0) {
// Send the file object to controller
var newFile = eve... | define(["app/app"], function(App) {
"use strict";
App.CreateAttachmentView = Ember.View.extend({
tagName: 'input',
type: 'file',
multiple: true,
attributeBindings: ['type', 'multiple'],
change: function(event) {
if (event.target.files.length > 0) {
// Send the file object(s) to c... | Enable multiple file upload for attachments | Enable multiple file upload for attachments
Fixes #130.
| JavaScript | mit | davidmz/pepyatka-html,SiTLar/pepyatka-html,pepyatka/pepyatka-html,dsumin/freefeed-html,FreeFeed/freefeed-html,dsumin/freefeed-html,davidmz/pepyatka-html,FreeFeed/freefeed-html,epicmonkey/pepyatka-html,SiTLar/pepyatka-html,pepyatka/pepyatka-html,epicmonkey/pepyatka-html |
b56c5ecd849d23519a063bc2396f8e7811d0f2ad | data/settings.js | data/settings.js | var settings = {
"endpoints": [
{
"name": "World Cup",
"url": "https://worldcup-graphql.now.sh/",
"auth": '',
"verb": 'POST',
"accept": '*/*',
"contentType": 'application/json',
"useIntrospectionQuery": true,
"re... | var settings = {
"endpoints": [
{
"name": "Space X",
"url": "https://api.spacex.land/graphql/",
"auth": '',
"verb": 'POST',
"accept": '*/*',
"contentType": 'application/json',
"useIntrospectionQuery": true,
"requ... | Change endpoint to Space X | fix: Change endpoint to Space X
| JavaScript | mit | Brbb/graphql-rover,Brbb/graphql-rover |
26a1d68fe2dec24e18f4cad4db176ab0d849fb2a | src/SourceBrowser.Site/Scripts/search.js | src/SourceBrowser.Site/Scripts/search.js | $("#search-form").submit(function (event) {
var query = $("#search-box").val();
var path = window.location.pathname;
//Split path, removing empty entries
var splitPath = path.split('/');
splitPath = splitPath.filter(function (v) { return v !== '' });
if (splitPath.length <= 1) {
search... | $("#search-form").submit(function (event) {
var query = $("#search-box").val();
var path = window.location.pathname;
//Split path, removing empty entries
var splitPath = path.split('/');
splitPath = splitPath.filter(function (v) { return v !== '' });
if (splitPath.length <= 1) {
search... | Remove old logging statements. Set up structure to build HTML | Remove old logging statements. Set up structure to build HTML
| JavaScript | mit | AmadeusW/SourceBrowser,AmadeusW/SourceBrowser,AmadeusW/SourceBrowser,CodeConnect/SourceBrowser,CodeConnect/SourceBrowser |
05300b58009a287abd2e30747d43b052da2c0695 | e2e/conf.js | e2e/conf.js | 'use strict';
exports.config = {
seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar',
capabilities: {
'browserName': 'phantomjs'
},
framework: 'jasmine2',
onPrepare: function() {
var SpecReporter = require('jasmine-spec-reporter');
jasmine.getEnv().addRep... | 'use strict';
exports.config = {
seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar',
capabilities: {
'browserName': 'chrome'
},
framework: 'jasmine2',
onPrepare: function() {
var SpecReporter = require('jasmine-spec-reporter');
jasmine.getEnv().addReport... | Switch back to chrome for tests, as phantomjs is not reliable | [e2e] Switch back to chrome for tests, as phantomjs is not reliable
| JavaScript | mit | solarnz/ec2pric.es,solarnz/ec2pric.es,solarnz/ec2pric.es |
9ff4d5ee986e9a821d910c13e78e39623b2fe7b1 | web_external/model.js | web_external/model.js | isic.Model = girder.Model.extend({
urlRoot: function () {
return this.resourceName;
}
});
| isic.Model = girder.Model.extend({
urlRoot: function () {
return this.resourceName;
},
// "girder.Model.destroy" doesn't trigger many of the proper Backbone events
destroy: Backbone.Model.prototype.destroy
});
| Use Backbone destroy, instead of Girder's method | Use Backbone destroy, instead of Girder's method
| JavaScript | apache-2.0 | ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive |
3e9c692ef04e33826b4ed31d63651aa6f6aa6516 | server/controllers/sampleCtrl.js | server/controllers/sampleCtrl.js | 'use strict'
/**
* Sample API controller. Can safely be removed.
*/
const Sample = require('../models').sample.Sample
const co = require('co')
module.exports = {
getData: co.wrap(getData),
postData: co.wrap(postData)
}
function * getData (req, res, next) {
try {
const doc = yield Sample.findById(req.par... | 'use strict'
/**
* Sample API controller. Can safely be removed.
*/
const Sample = require('../models').sample.Sample
const co = require('co')
module.exports = {
getData: co.wrap(getData),
postData: co.wrap(postData)
}
function * getData (req, res, next) {
try {
let doc = {}
if (process.env.NODE_MOC... | Support for startMock mode in getData | Support for startMock mode in getData
| JavaScript | mit | KTH/lms-export-results |
2848d099199c841f64c7c66ce33775e0bc25bc59 | test/torpedo-build-test.js | test/torpedo-build-test.js | var fs = require('fs')
, path = require('path')
, expect = require('chai').expect
, shell = require('shelljs')
, glob = require('glob')
, _ = require('lodash')
function read(filename) {
return fs.readFileSync(filename, 'utf8')
}
function fixture(name) {
return read('test/fixtures/' + name + '.html')
}
... | var fs = require('fs')
, path = require('path')
, expect = require('chai').expect
, shell = require('shelljs')
, glob = require('glob')
, _ = require('lodash')
function read(filename) {
return fs.readFileSync(filename, 'utf8')
}
function fixture(name) {
return read('test/fixtures/' + name + '.html')
}
... | Fix tests to delete the _site directory after running. | Fix tests to delete the _site directory after running.
| JavaScript | mit | philipwalton/ingen |
20d900a89125cf0141e31b14f43ff65265aab505 | js/utils.js | js/utils.js | function numberToString(number) {
var r = Math.round(number * 1000) / 1000;
return ""+r;
}
function addCommas(nStr)
{
nStr += '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 ... | function numberToString(number) {
var r = Math.round(number * 1000) / 1000;
return ""+r;
}
/**
* There are some difficulties with locales with this script's number
* output (when number > 1e21) and Clicker Heroes' input formatting.
* This function makes sure there are no decimal points in the output.
*/
f... | Make sure there are no decimal points in the (pasteable) level change output. | Make sure there are no decimal points in the (pasteable) level change output.
| JavaScript | mit | Beskhue/ClickerHeroesCalculator,Beskhue/ClickerHeroesCalculator |
be3aac36283d562d94f358e81de722e1854f56b7 | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('default', ['sass'], function () {
//gulp.src('./node_modules/font-awesome/fonts/**/*.{eot,svg,ttf,woff,woff2}')
// .pipe(gulp.dest('./styles/warriormachines_2016/theme/gulp-generated/fonts'));
});
gulp.task('sass', funct... | 'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('default', ['sass', 'fonts'], function () {
});
gulp.task('sass', function () {
return gulp.src('./styles/warriormachines_2016/theme/sass/app.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./st... | Use gulp to generate one app.css, and separate 'fonts' task | Use gulp to generate one app.css, and separate 'fonts' task
| JavaScript | mit | WarriorMachines/warriormachines-phpbb,WarriorMachines/warriormachines-phpbb,WarriorMachines/warriormachines-phpbb |
e1be3b7fdd59ba71c3e2d5ffd626fd7877431401 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var gutil = require('gulp-util');
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var webpackConfig = require('./webpack.config.js');
var open = require('gulp-open');
var mocha = require('gulp-mocha');
// default task is browser test
gulp.task('defaul... | var gulp = require('gulp');
var gutil = require('gulp-util');
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var webpackConfig = require('./webpack.config.js');
var open = require('gulp-open');
var mocha = require('gulp-mocha');
// default task is browser test
gulp.task('defaul... | Enable automatic browser reload in browser-test task | Enable automatic browser reload in browser-test task
| JavaScript | mit | hnakamur/solve-quadratic-equation.js,hnakamur/solve-quadratic-equation.js |
7513968732441a2bd3ecd720d821e12a1311a38b | installer/js/setup/repositories/RepositoryList.js | installer/js/setup/repositories/RepositoryList.js | import React, { Component, PropTypes } from 'react';
import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow } from 'material-ui/Table';
import { getRepositories } from '../../installer/github';
import Repository from './Repository';
import Pagination from './Pagination';
const accessToken = window.local... | import React, { Component, PropTypes } from 'react';
import Progress from 'material-ui/CircularProgress';
import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow } from 'material-ui/Table';
import { getRepositories } from '../../installer/github';
import Repository from './Repository';
import Pagination f... | Add a loader while loading repositories | Add a loader while loading repositories
| JavaScript | mit | marmelab/sedbot.js |
2664f207be053a02a4c9866c8794b95901fe4aaa | lib/main.js | lib/main.js | /* See license.txt for terms of usage */
"use strict";
const { Cu, Ci } = require("chrome");
const { Firebug } = require("./firebug.js");
const { Trace } = require("./trace.js");
const { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
// Entry points of the extension. Both 'main' and 'onUn... | /* See license.txt for terms of usage */
"use strict";
const { Cu, Ci } = require("chrome");
const { Firebug } = require("./firebug.js");
const { Trace } = require("./trace.js");
const { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
// The application (singleton)
var firebug;
// Entry p... | Fix undefined variable in onUnload | Fix undefined variable in onUnload
| JavaScript | bsd-3-clause | firebug/firebug.next,bmdeveloper/firebug.next,bmdeveloper/firebug.next,vlajos/firebug.next,vlajos/firebug.next,firebug/firebug.next |
7930c5a16744f6464a126ebe739704dadeca9382 | lib/main.js | lib/main.js | "use babel";
export default {
config: {
executable: {
type: "string",
default: "gfortran"
},
gfortran_flags: {
type: "string",
default: "-Wall -Wextra"
},
},
activate: () => {
require("atom-package-deps").install("lint... | "use babel";
export default {
config: {
executable: {
type: "string",
default: "gfortran"
},
gfortran_flags: {
type: "string",
default: "-Wall -Wextra"
},
},
activate: () => {
require("atom-package-deps").install("lint... | Support all the fortran grammars | Support all the fortran grammars
| JavaScript | mit | Luthaf/linter-gfortran |
27ad5450c62de6fee222e6298901b3101a097930 | src/transform-data.js | src/transform-data.js | "use strict"
/**
* Inverts the data from the deepstream structure to reduce nesting.
*
* { _v: 1, _d: { name: 'elasticsearch' } } -> { name: 'elasticsearch', __ds = { _v: 1 } }
*
* @param {String} value The data to save
*
* @private
* @returns {Object} data
*/
module.exports.transformValueForStorage = functi... | "use strict"
/**
* Inverts the data from the deepstream structure to reduce nesting.
*
* { _v: 1, _d: { name: 'elasticsearch' } } -> { name: 'elasticsearch', __ds = { _v: 1 } }
*
* @param {String} value The data to save
*
* @private
* @returns {Object} data
*/
module.exports.transformValueForStorage = functi... | Clone data to avoid mutations to effect rest of workflow | Clone data to avoid mutations to effect rest of workflow
| JavaScript | mit | hoxton-one/deepstream.io-storage-rethinkdb |
0b8d55b196164dc7dfdef644ee95806f2d5dac59 | packages/kolibri-tools/jest.conf/setup.js | packages/kolibri-tools/jest.conf/setup.js | import 'intl';
import 'intl/locale-data/jsonp/en.js';
import * as Aphrodite from 'aphrodite';
import * as AphroditeNoImportant from 'aphrodite/no-important';
import Vue from 'vue';
import VueMeta from 'vue-meta';
import VueRouter from 'vue-router';
import Vuex from 'vuex';
import { i18nSetup } from 'kolibri.utils.i18n... | import 'intl';
import 'intl/locale-data/jsonp/en.js';
import * as Aphrodite from 'aphrodite';
import * as AphroditeNoImportant from 'aphrodite/no-important';
import Vue from 'vue';
import VueMeta from 'vue-meta';
import VueRouter from 'vue-router';
import Vuex from 'vuex';
import { i18nSetup } from 'kolibri.utils.i18n... | Add extra logging for node promises | Add extra logging for node promises
| JavaScript | mit | indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri,learningequality/kolibri |
1242956b0fc4ef7300c78c50c087d30a60b963d4 | source/configuration.js | source/configuration.js | const fs = require("fs");
const path = require("path");
function getValue(obj, pathArr, def) {
let nextPath = pathArr.shift();
if (nextPath) {
return (pathArr.length > 0) ?
(obj.hasOwnProperty(nextPath) ? getValue(obj[nextPath], pathArr, def) : def) :
obj[nextPath] || def;
}... | const fs = require("fs");
const path = require("path");
const fileExists = require("file-exists");
function getValue(obj, pathArr, def) {
let nextPath = pathArr.shift();
if (nextPath) {
return (pathArr.length > 0) ?
(obj.hasOwnProperty(nextPath) ? getValue(obj[nextPath], pathArr, def) : de... | Create config.json if not exists | Create config.json if not exists
| JavaScript | mit | buttercup-pw/buttercup-server |
1da816b0cbe307f3cb8ea74dc368e460d7eb16c2 | packages/workflow/tests/dummy/config/environment.js | packages/workflow/tests/dummy/config/environment.js | /* eslint-env node */
'use strict';
module.exports = function(environment) {
let ENV = {
modulePrefix: 'dummy',
environment,
rootURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-contro... | /* eslint-env node */
'use strict';
module.exports = function(environment) {
let ENV = {
modulePrefix: 'dummy',
environment,
rootURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-contro... | Remove empty block for eslint happiness | Remove empty block for eslint happiness
| JavaScript | mit | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack |
ade9f35525d169ada126e66ced7be3e51ba5a4ef | src/helpers.js | src/helpers.js | "use strict";
// Bind event listeners to target.
export function on (target, eventName, listener, capture = false) {
return target.addEventListener(eventName, listener, capture);
}
// Unbind event listeners
export function off (target, eventName, listener, capture = false) {
target.removeEventListener(eventName, ... | "use strict";
// Bind event listeners to target.
export function on (el, events, cb, capture = false) {
events.split(' ').map(event => {
if (event) el.addEventListener(event, cb, capture);
});
}
// Unbind event listeners
export function off (el, events, cb, capture = false) {
events.split(' ').map(event => ... | Add support to bind to multiple events in one call. | Add support to bind to multiple events in one call.
| JavaScript | mit | Andreyco/react-video,Andreyco/react-video |
ccfc6e5850fa6de5b821a292eab02c9755bd2062 | src/number.js | src/number.js | 'use strict';
var card = require('creditcards').card;
module.exports = function ($parse) {
return {
restrict: 'A',
require: ['ngModel', 'ccNumber'],
controller: function () {
var expectedType;
this.expect = function (type) {
expectedType = type;
};
},
compile: function ... | 'use strict';
var card = require('creditcards').card;
module.exports = function ($parse) {
return {
restrict: 'A',
require: ['ngModel', 'ccNumber'],
controller: function () {
this.type = null;
},
compile: function (element, attributes) {
attributes.$set('pattern', '[0-9]*');
r... | Remove dead code from ccNumber controller | Remove dead code from ccNumber controller
| JavaScript | mit | SimeonC/angular-credit-cards,matiasarayac/angular-credit-cards,Noxwille/angular-credit-cards,bendrucker/angular-credit-cards,antoinepairet/angular-credit-cards,dingels35/angular-credit-cards,dribehance/angular-credit-cards,aspone/angular-credit-cards,robertbaker/angular-credit-cards |
ad45bd67ba40b86954e5649f04ef5c42258bf6d4 | packages/ember-runtime/tests/array/invoke-test.js | packages/ember-runtime/tests/array/invoke-test.js | import EmberObject from '../../lib/system/object';
import { AbstractTestCase } from 'internal-test-helpers';
import { runArrayTests } from '../helpers/array';
class InvokeTests extends AbstractTestCase {
'@test invoke should call on each object that implements'() {
let cnt, ary, obj;
function F(amt) {
... | import { Object as EmberObject, NativeArray } from '../../index';
import { AbstractTestCase } from 'internal-test-helpers';
import { runArrayTests } from '../helpers/array';
class InvokeTests extends AbstractTestCase {
'@test invoke should call on each object that implements'() {
let cnt, ary, obj;
function... | Add failing tests for `A().invoke()` not returning an `A`. | Add failing tests for `A().invoke()` not returning an `A`.
| JavaScript | mit | bekzod/ember.js,knownasilya/ember.js,GavinJoyce/ember.js,kellyselden/ember.js,Turbo87/ember.js,elwayman02/ember.js,jaswilli/ember.js,cibernox/ember.js,kellyselden/ember.js,qaiken/ember.js,twokul/ember.js,qaiken/ember.js,mike-north/ember.js,stefanpenner/ember.js,asakusuma/ember.js,emberjs/ember.js,xiujunma/ember.js,twok... |
8ea3fe598997e04b102d50bc31c6c579b5591679 | src/js/main.js | src/js/main.js | require('../css/style.css');
(function(window, document, requirejs, define){
'use strict';
// config
try {
var config = JSON.parse(
document.getElementById('data-config').getAttribute('data-config')
);
var versions = config.versions;
} catch (error) {
// con... | require('../css/style.css');
(function(window, document, requirejs, define){
'use strict';
// config
try {
var config = JSON.parse(
document.getElementById('data-config').getAttribute('data-config')
);
var versions = config.versions;
} catch (error) {
// con... | Refactor `react-engine` client-side mounting to use Require.js | Refactor `react-engine` client-side mounting to use Require.js
Replace event listener `DOMContentLoaded` with `requirejs` now
that the scripts will run after they are loaded.
Make sure to load `react` and `react-dom` before `react-router`.
Also, attach the modules to `window` for it to work in production.
| JavaScript | mit | remarkablemark/react-engine-template,remarkablemark/react-engine-template |
9c90a3a6e2f4e5e6e8028e63936daa28ef51f294 | build/configs/replace.js | build/configs/replace.js | module.exports = function (grunt) {
var semver = require('semver');
var version = grunt.option('version');
function bump () {
//console.log(arguments[0][0]);
}
function file (path) {
return {
dest: path,
src: path
};
}
function pattern (find) {
return {
match: find,
... | module.exports = function (grunt) {
var curver = require('../../package.json').version;
var semver = require('semver');
var version = grunt.option('version');
function bump () {
return version ? version : semver.inc(curver);
}
function file (path) {
return {
dest: path,
src: path
}... | Use specified version or increment current version. | Use specified version or increment current version.
| JavaScript | mit | skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs,antitoxic/skatejs,chrisdarroch/skatejs,skatejs/skatejs |
5ae3053a5eee1c0e2f8b214fc4174d7dacaf91f6 | src/server.js | src/server.js | import express from "express"
import graphqlHTTP from "express-graphql"
import { graphqlExpress, graphiqlExpress } from "graphql-server-express"
import bodyParser from "body-parser"
import mongoose, { Schema } from "mongoose"
import schema from "./graphql"
import Item from "./db/item"
// Constants
const HTTP_PORT = 77... | import express from "express"
import graphqlHTTP from "express-graphql"
import { graphqlExpress, graphiqlExpress } from "graphql-server-express"
import bodyParser from "body-parser"
import mongoose, { Schema } from "mongoose"
import schema from "./graphql"
import Item from "./db/item"
// Constants
const HTTP_PORT = 80... | Change port from 7700 to 80 | Change port from 7700 to 80
| JavaScript | mit | DevNebulae/ads-pt-api |
948dd454a231de83b3f7ef522f99588dbcb109de | server/fixtures.js | server/fixtures.js | defaultFeedIds = [];
defaultFeeds = [{
name: 'Sneakers',
icon: 'money'
}, {
name: 'Electronics',
icon: 'laptop'
}, {
name: 'Clothing (Men)',
icon: 'male'
}, {
name: 'Clothing (Women)',
icon: 'female'
}, {
name: 'Books',
icon: 'book'
}, {
name: 'Others',
icon: 'random'
}];
if (!Feeds.findOne()) {
defaultF... | Meteor.startup(function() {
defaultFeedIds = [];
defaultFeeds = [{
name: 'Sneakers',
icon: 'money'
}, {
name: 'Electronics',
icon: 'laptop'
}, {
name: 'Clothing (Men)',
icon: 'male'
}, {
name: 'Clothing (Women)',
icon: 'female'
}, {
name: 'Books',
icon: 'book'
}, {
name: 'Others',
icon: '... | Put feed fixture in startup | Put feed fixture in startup
| JavaScript | mit | BaseNY/base,BaseNY/base,BaseNY/base |
68312d1d3e9a2f4f3211c0ba91105e11270b6f3d | src/app/common/interceptors.js | src/app/common/interceptors.js | (function (angular) {
"use strict";
angular.module("mfl.gis.interceptor", [])
.factory("mfl.gis.interceptor.headers", [function () {
var etag_header = null;
var last_modified_header = null;
return {
"request" : function(config) {
if (etag_header) {
... | (function (angular) {
"use strict";
angular.module("mfl.gis.interceptor", [])
.factory("mfl.gis.interceptor.headers", [function () {
var cache_headers = {};
var request_fxn = function(config) {
var headers = cache_headers[config.url];
if (_.isUndefined(headers)) {
... | Make cache headers sentitive to urls | Make cache headers sentitive to urls
| JavaScript | mit | MasterFacilityList/mfl_web,urandu/mfl_web,MasterFacilityList/mfl_web,urandu/mfl_web,MasterFacilityList/mfl_web,MasterFacilityList/mfl_web |
5c63c358a2aa8ea74aa13088f18dfe0e786ef6f4 | lib/socket/handler.js | lib/socket/handler.js | "use strict";
class SocketHandler {
constructor(socket) {
this.socket = socket;
socket.on(this.eventName, this.preEvent);
}
preEvent() {
if (this.requiresAuthentication) {
// TODO
return false;
}
return handleEvent.apply({}, arguments);
}
handleEvent() {
throw "Abstract... | "use strict";
class SocketHandler {
constructor(socket) {
this.socket = socket;
socket.on(this.eventName, this.preEvent.bind(this));
}
preEvent() {
if (this.requiresAuthentication) {
// TODO
return false;
}
return this.handleEvent.apply(this, arguments);
}
handleEvent() {
... | Fix scope for preEvent and handleEvent calls | Fix scope for preEvent and handleEvent calls
| JavaScript | mit | Sxw1212/ReDash,Sxw1212/ReDash |
23a2c12b26d128c6b9cda4764d5b0487eba8671b | gulpfile.js | gulpfile.js | var gulp = require( 'gulp' );
var browserify = require( 'browserify' );
var source = require( 'vinyl-source-stream' );
var uglify = require( 'gulp-uglify' );
var streamify = require( 'gulp-streamify' );
gulp.task( 'browserify', function() {
return browserify( './index.js' )
.bundle()
... | var gulp = require( 'gulp' );
var browserify = require( 'browserify' );
var source = require( 'vinyl-source-stream' );
var uglify = require('gulp-uglify-es').default;;
var streamify = require( 'gulp-streamify' );
gulp.task( 'browserify', function() {
return browserify( './index.js' )
.b... | Use gulp-uglify-es instead of gulp-uglify | Use gulp-uglify-es instead of gulp-uglify
To properly build the project - has ES in spots
| JavaScript | mit | Automattic/vip-js-sdk |
1e0ef500de5b3bdaa857b091176b8cae3e2a330f | src/rx-glob.js | src/rx-glob.js | import Rx from 'rx';
import glob from 'glob';
var rxGlobArray = Rx.Observable.fromNodeCallback(glob);
export
default
function rxGlob(...args) {
console.log(...args);
return rxGlobArray(...args).flatMap(Rx.Observable.from)
.tapOnNext(console.log);
}
rxGlob.hasMagic = glob.hasMagic;
| import Rx from 'rx';
import glob from 'glob';
var rxGlobArray = Rx.Observable.fromNodeCallback(glob);
export
default
function rxGlob(...args) {
return rxGlobArray(...args).flatMap(Rx.Observable.from)
.tapOnNext(console.log);
}
rxGlob.hasMagic = glob.hasMagic;
| Fix stray console.log that messed up output | Fix stray console.log that messed up output
| JavaScript | mit | motiz88/sqin |
989073056f890097c74d78634f75b360a8fbf715 | config/passport.js | config/passport.js | import passport from 'koa-passport';
import User from '../src/models/users'
import { Strategy } from 'passport-local'
passport.serializeUser((user, done) => {
done(null, user.id)
})
passport.deserializeUser(async (id, done) => {
try {
const user = await User.findById(id, '-password')
done(null, user)
} ... | import passport from 'koa-passport';
import User from '../src/models/users'
import { Strategy } from 'passport-local'
passport.serializeUser((user, done) => {
done(null, user.id)
})
passport.deserializeUser(async (id, done) => {
try {
const user = await User.findById(id, '-password -salt')
done(null, user... | Remove user salt from deserialize | Remove user salt from deserialize
| JavaScript | mit | adrianObel/koa2-api-boilerplate |
bfcc3af922c0cf0fba0a5614be4d400d79a6eaee | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var shell = require('gulp-shell');
gulp.task('js', function() {
return gulp.src(['js/*.js', 'gen/*.js'])
.pipe(concat('rapidframe.js'))
//.pipe(concat('rapidframe.min.js'))
//.pipe(uglify())
.pipe(gulp.dest('... | var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var shell = require('gulp-shell');
gulp.task('js', function() {
return gulp.src(['js/*.js', 'gen/*.js'])
//.pipe(concat('rapidframe.js'))
.pipe(concat('rapidframe.min.js'))
.pipe(uglify())
.pipe(gulp.dest('.'... | Build with uglify as default | chore: Build with uglify as default
| JavaScript | mit | carlmartus/rapidframe.js,carlmartus/rapidframe.js |
d28d419833b093b4f6d0da409d91f67637f341a8 | migrations/v1.0_v1.1.js | migrations/v1.0_v1.1.js | var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/dds');
require('../lib/config/mongoose').init(mongoose);
require('../lib/models/acceptanceTest');
var AcceptanceTest = mongoose.model('AcceptanceTest');
var AcceptanceTestActivity = mongoose.model('AcceptanceTestActivity');
var stream =... | var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/dds');
require('../lib/config/mongoose').init(mongoose);
require('../lib/models/acceptanceTest');
var AcceptanceTest = mongoose.model('AcceptanceTest');
var AcceptanceTestActivity = mongoose.model('AcceptanceTestActivity');
var stream =... | Delete tests that only wrongly tested uncomputable | Delete tests that only wrongly tested uncomputable
| JavaScript | agpl-3.0 | sgmap/ludwig-api |
db48e742bdea3a3b9b0de459019f74f632b6ceef | verify-package-settings.js | verify-package-settings.js | "use strict";
const expect = require('chai').expect
const packageSettings = require('./package.json')
const Up = require('./' + packageSettings.main)
describe('The `main` field in package.json', () => {
it('points to the entry point of the library', () => {
expect(Up.parseAndRender('It *actually* worked?')).t... | "use strict";
const path = require('path');
const expect = require('chai').expect
const packageSettings = require('./package.json')
const Up = require('./' + packageSettings.main)
describe('The `main` field in package.json', () => {
it('points to the entry point of the library', () => {
expect(Up.parseAndRend... | Verify `typings` field in package.json | Verify `typings` field in package.json
| JavaScript | mit | start/up,start/up |
6280fc97dba8773a6833014f0cd5f6ae71012c7d | resources/assets/build/webpack.config.optimize.js | resources/assets/build/webpack.config.optimize.js | 'use strict'; // eslint-disable-line
const { default: ImageminPlugin } = require('imagemin-webpack-plugin');
const imageminMozjpeg = require('imagemin-mozjpeg');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const config = require('./config');
module.exports = {
plugins: [
new ImageminPlugin({
... | 'use strict'; // eslint-disable-line
const { default: ImageminPlugin } = require('imagemin-webpack-plugin');
const imageminMozjpeg = require('imagemin-mozjpeg');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const config = require('./config');
module.exports = {
plugins: [
new ImageminPlugin({
... | Change the ecma option from 8 to 5 | UglifyJs: Change the ecma option from 8 to 5
| JavaScript | mit | c50/c50_roots,ptrckvzn/sage,roots/sage,NicBeltramelli/sage,NicBeltramelli/sage,ptrckvzn/sage,c50/c50_roots,roots/sage,c50/c50_roots,NicBeltramelli/sage,ptrckvzn/sage |
f545a0e2137b4864a242416b1af5d429faad405d | build-supported-words.js | build-supported-words.js | var fs = require('fs'),
words = require('./data/buzzwords.json');
fs.writeFileSync('Supported-buzzwords.md',
'Supported Buzzwords\n' +
'=================\n' +
'\n' +
words.map(function (word) {
return '* “' + word + '”';
}).join(';\n') +
'.\n'
);
| 'use strict';
var fs = require('fs'),
words = require('./data/buzzwords.json');
fs.writeFileSync('Supported-buzzwords.md',
'Supported Buzzwords\n' +
'=================\n' +
'\n' +
words.map(function (word) {
return '* “' + word + '”';
}).join(';\n') +
'.\n'
);
| Add strict mode to support generation | Add strict mode to support generation
| JavaScript | mit | wooorm/buzzwords |
9a6369ffcae9f46945ad94840806d5b08099bae0 | gulpfile.js | gulpfile.js | var gulp = require("gulp");
var uglify = require("gulp-uglify");
var rename = require("gulp-rename");
var cleanCSS = require("gulp-clean-css");
var config = {};
config.srcPath = "./src/";
config.distPath = "./dist/";
config.cssSrcPath = config.srcPath + "css/*.css";
config.jsSrcPath = config.srcPath + "js/*... | var gulp = require("gulp");
var uglify = require("gulp-uglify");
var rename = require("gulp-rename");
var cleanCSS = require("gulp-clean-css");
var config = {};
config.srcPath = "./src/";
config.distPath = "./dist/";
config.cssSrcPath = config.srcPath + "css/*.css";
config.jsSrcPath = config.srcPath + "js/*... | Use short function like above | Standards: Use short function like above
| JavaScript | agpl-3.0 | nirmankarta/eddyst.one,nirmankarta/eddyst.one |
2ebb6791a94db6e84c7811aa69d2a1542e6d18f4 | lib/commands/migrate.js | lib/commands/migrate.js | var OS = require("os");
var Config = require("truffle-config");
var Contracts = require("../contracts");
var Resolver = require("truffle-resolver");
var Artifactor = require("truffle-artifactor");
var Migrate = require("truffle-migrate");
var Environment = require("../environment");
var command = {
command: 'migrate... | var OS = require("os");
var Config = require("truffle-config");
var Contracts = require("../contracts");
var Resolver = require("truffle-resolver");
var Artifactor = require("truffle-artifactor");
var Migrate = require("truffle-migrate");
var Environment = require("../environment");
var command = {
command: 'migrate... | Add the -f option to run from a specific migration. | Add the -f option to run from a specific migration.
| JavaScript | mit | DigixGlobal/truffle,prashantpawar/truffle |
44676a86b28fdee89ccc2ced929a68f0f9c86329 | gulpfile.js | gulpfile.js | "use strict"
var gulp = require("gulp");
var eslint = require("gulp-eslint");
var babel = require("gulp-babel");
var SOURCE_PATH = ["./src/**/*.js", "./src/**/*.jsx"];
gulp.task("build", function () {
return gulp.src(SOURCE_PATH)
.pipe(babel())
.pipe(gulp.dest("lib"));
});
gulp.task("watch", function(callba... | "use strict"
var gulp = require("gulp");
var eslint = require("gulp-eslint");
var babel = require("gulp-babel");
var SOURCE_PATH = ["./src/**/*.js", "./src/**/*.jsx"];
// gulp.task("build", function () {
// return gulp.src(SOURCE_PATH)
// .pipe(babel())
// .pipe(gulp.dest("lib"));
// });
// gulp.task("watch... | Comment out build step (gulp). | Comment out build step (gulp).
| JavaScript | mit | philcockfield/ui-harness,philcockfield/ui-harness,philcockfield/ui-harness |
601ea6b5155bd81e007bd8bad583e50e9f1ba42c | gulpfile.js | gulpfile.js | "use strict";
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
filter = require('gulp-filter'),
mocha = require('gulp-mocha');
gulp.task('default', ['test']);
gulp.task('watch', function () {
gulp.watch('test/*.js', ['test']);
});
gulp.task('test', ['lint'], function () {
gulp.src('test/*.js', {r... | "use strict";
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
filter = require('gulp-filter'),
mocha = require('gulp-mocha');
gulp.task('default', ['test']);
gulp.task('watch', function () {
gulp.watch(['**/*.js', '!node_modules/**/*.js'], ['test']);
});
gulp.task('test', ['lint'], function () {
... | Add all .js files to gulp.watch instead of just the files under 'test/' | Add all .js files to gulp.watch instead of just the files under 'test/'
| JavaScript | mit | keithmorris/gulp-nunit-runner |
577baf7c652130a0677c74419c736ddc304d735c | lib/ruche/util/error.js | lib/ruche/util/error.js | // Module dependencies.
var debug = require('debug')('ruche:error');
/**
* Handle errors
* @param {Error} error
* @return {Error}
*/
var handle = function (err) {
debug(err);
process.exit(1)
return err;
};
var exception = function () {
process.on('uncaughtException', function (err) {
handle(err);
}... | // Module dependencies.
var debug = require('debug')('ruche:error');
/**
* Handle errors
* @param {Error} error
* @return {Error}
*/
var handle = function (err) {
debug(err);
process.exit(1)
return err;
};
/**
* The uncaughtException handler. Stops the process on Error
* @return {Boolean} Returns the sta... | Add documentation to uncaughtException handler. | Add documentation to uncaughtException handler.
| JavaScript | mit | quentinrossetti/ruche,quentinrossetti/ruche,quentinrossetti/ruche |
4d476004060dfdd7c6c124fe53d077f4e9bdd859 | test/Login.js | test/Login.js | 'use strict';
import Login from '../src/Login';
describe('Login', function() {
it('should be tested', function() {
assert.fail('No tests for this module yet.');
});
});
| 'use strict';
import Login from '../src/Login';
describe('Login', function() {
beforeEach(function () {
this.xhr = sinon.useFakeXMLHttpRequest();
var requests = this.requests = [];
this.xhr.onCreate = function (xhr) {
requests.push(xhr);
};
});
afterEach(function () {
this.xhr.restore();
});
it(... | Add test for login component | Add test for login component
| JavaScript | bsd-3-clause | nhpatt/metal-login,nhpatt/metal-login |
856cc359223a4acc2c8ba9ccebe965fa37a86e04 | sli/config/indexes/ingestion_batch_job_indexes.js | sli/config/indexes/ingestion_batch_job_indexes.js | //
// Copyright 2012 Shared Learning Collaborative, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... | //
// Copyright 2012 Shared Learning Collaborative, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... | Revert "DE2347 - Remove tenantId index from recordHash as intended" | Revert "DE2347 - Remove tenantId index from recordHash as intended"
This reverts commit 6718f6f8388ca42d85c6403129be29d2c36852e8.
Need to keep the index because purging the data in recordHash,
which remains shared across tenants in ingestion_batch_job,
requires a full-table-table scan when the index is absent.
That i... | JavaScript | apache-2.0 | inbloom/secure-data-service,inbloom/secure-data-service,inbloom/secure-data-service,inbloom/secure-data-service,inbloom/secure-data-service |
e53946933a575fa13682b538186828a90e4d9101 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var ts = require('gulp-typescript');
var tslint = require('gulp-tslint');
var jade = require('gulp-jade');
gulp.task('jade', function() {
gulp.src('./src/views/*.jade')
.pipe(jade())
.pipe(gulp.dest('./dist/'))
});
gulp.task('typescript', function() {
gulp.src('src/... | var gulp = require('gulp');
var ts = require('gulp-typescript');
var tslint = require('gulp-tslint');
var jade = require('gulp-jade');
gulp.task('jade', function() {
gulp.src('./src/views/*.jade')
.pipe(jade())
.pipe(gulp.dest('./dist/'))
});
gulp.task('typescript', function() {
gulp.src('src/... | Set JavaScript file destination directory, after TypeScript compile | Set JavaScript file destination directory, after TypeScript compile
| JavaScript | mit | kubosho/simple-music-player |
4ceb847fa6340bb869d9c8cb3e55701124d0b92b | app/assets/javascripts/views/navbar.js | app/assets/javascripts/views/navbar.js | $(document).ready(function() {
$(".welcome").on("click", function() {
console.log("YES");
$(this).slideUp(1500);
// $(this).parent().slideUp(1500);
$(this).parent().animate({ height: 'toggle', opacity: 0.5 }, 1500);
});
$("#about").on("click", function() {
var popupBox = $(".popup-about");
... | $(document).ready(function() {
$(".welcome").on("click", function() {
console.log("YES");
$(this).fadeOut(1400);
$(this).parent().slideUp(1800);
// $(this).slideUp(1200);
// $(this).parent().animate({ height: 'toggle', opacity: 0.5 }, 1500);
});
$("#about").on("click", function() {
var p... | Modify slide and fade features | Modify slide and fade features
| JavaScript | mit | chi-bobolinks-2015/TheGoldenRecord,chi-bobolinks-2015/TheGoldenRecord,chi-bobolinks-2015/TheGoldenRecord |
37704ec24635ab7f256706e6c929733ab2b64e7d | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var eslint = require('gulp-eslint');
var coveralls = require('gulp-coveralls');
gulp.task('pre-test', function () {
return gulp.src(['lib/**/*.js', '!lib/micro-whalla.js'])
.pipe(istanbul({ includeUntested: tr... | var gulp = require('gulp');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var eslint = require('gulp-eslint');
var coveralls = require('gulp-coveralls');
gulp.task('pre-test', function () {
return gulp.src(['lib/**/*.js', '!lib/micro-whalla.js', '!lib/helpers.js'])
.pipe(istanbul({ ... | Add helpers.js to ignore from tests | Add helpers.js to ignore from tests
| JavaScript | mit | czerwonkabartosz/Micro-Whalla |
52ee49be8d61da1b6accf3b05967e961ab240b77 | src/watcher.js | src/watcher.js | 'use strict'
const log = require('./log.js')
const mm = require('micromatch')
const chalk = require('chalk')
const watcher = require('simple-watcher')
class Watcher {
watch ({workingDir, exclude, callback}) {
log.info(`Scanning: ${chalk.yellow(workingDir)} ...`)
watcher(workingDir, (localPath) =... | 'use strict'
const log = require('./log.js')
const mm = require('micromatch')
const chalk = require('chalk')
const watcher = require('simple-watcher')
class Watcher {
watch ({workingDir, exclude, callback}) {
log.info(`Scanning: ${chalk.yellow(workingDir)} ...`)
watcher(workingDir, (localPath) =... | Fix order of micromatch parameters | Fix order of micromatch parameters
| JavaScript | mit | gavoja/aemsync |
7cb6aab651c603f0d0d3a2159193b3cb8e62a97d | gulpfile.js | gulpfile.js | // Generated by CoffeeScript 1.6.2
(function() {
var coffee, concat, gulp, gutil, mocha, uglify, wrap;
gulp = require('gulp');
coffee = require('gulp-coffee');
concat = require('gulp-concat');
gutil = require('gulp-util');
mocha = require('gulp-mocha');
uglify = require('gulp-uglify');
wrap = req... | //the build instructions are in gulpfile.coffee
//this file is a simple bridge since gulp doesn't support
//coffeescript files natively.
require('coffee-script');
require('./gulpfile.coffee');
| Use bridge gulp file instead of having to re-generate. | Use bridge gulp file instead of having to re-generate.
| JavaScript | mit | resin-io/validateSSHjs |
5deca95ccf4351038cb84eae9b6223d60f3f68cb | gulpfile.js | gulpfile.js | var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Larave... | var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Larave... | Change comment to reflect the change of the default css preprocessor. | Change comment to reflect the change of the default css preprocessor. | JavaScript | mit | kerick-jeff/iPub,lcp0578/Wiki,superdol/Wiki,superdol/Wiki,remxcode/laravel-base,thosakwe/rGuard,tkc/laravel-unit-test-sample,farwish/laravel-pro,kerick-jeff/istore,hackel/laravel,Stolz/Wiki,farwish/laravel-pro,orckid-lab/dashboard,superdol/Wiki,slimkit/thinksns-plus,hackel/laravel,tkc/laravel-unit-test-sample,hackel/la... |
864f02426a0fceca05a597d46a7e61210497b9a3 | gui/editor/src/command/TableCommand.js | gui/editor/src/command/TableCommand.js | import Command from './Command.js';
/**
* Table Command
*/
export default class TableCommand extends Command {
/**
* @inheritDoc
*/
execute() {
const figure = this.editor.document.createElement('figure');
const table = this.editor.document.createElement('table');
const figca... | import Command from './Command.js';
/**
* Table Command
*/
export default class TableCommand extends Command {
/**
* @inheritDoc
*/
execute() {
const figure = this.editor.document.createElement('figure');
const table = this.editor.document.createElement('table');
const figca... | Rename param to be consistent | Rename param to be consistent
| JavaScript | mit | akilli/cms,akilli/cms,akilli/cms |
1836576ba5045392f9af0473f48cbfac27ccd8ef | src/components/document/authors/authorsDirective.js | src/components/document/authors/authorsDirective.js | 'use strict';
// @ngInject
var authorsDirective = function() {
return {
scope: {
authors: '='
},
template: require('./authorstemplate.html'),
//@ngInject
controller: function($scope) {
$scope.fullnames = function (authors) {
return authors.reduce((m, a, i) => m + a.first_name ... | 'use strict';
// @ngInject
var authorsDirective = function() {
return {
scope: {
authors: '='
},
template: require('./authorstemplate.html'),
//@ngInject
controller: function($scope) {
$scope.fullnames = function (authors) {
return authors.reduce((m, a, i) => {
retur... | Support first_name, last_name and name | Support first_name, last_name and name
| JavaScript | mit | npolar/npdc-common,npolar/npdc-common |
28d94abe7b927ddb8edfe50e1641d0614cc5c01b | src/build/minionette.js | src/build/minionette.js | var Minionette = (function(global, _, $, Backbone) {
'use strict';
// Define and export the Minionette namespace
var Minionette = {};
Backbone.Minionette = Minionette;
// @include ../jquery.cleanData.js
// @include ../view.js
// @include ../region.js
// @include ../model_view.js
/... | var Minionette = (function(global, _, $, Backbone) {
'use strict';
// Define and export the Minionette namespace
var Minionette = {};
Backbone.Minionette = Minionette;
// @include ../jquery.cleanData.js
// @include ../region.js
// @include ../view.js
// @include ../model_view.js
/... | Make sure Region is included before View | Make sure Region is included before View
View depends on Region
| JavaScript | mit | thejameskyle/minionette,jridgewell/minionette |
c710b5a7f3293c280483ae25655b0144076da984 | gulpfile.js | gulpfile.js | var gulp = require('gulp')
var shell = require('./')
var paths = {
js: ['*.js', 'test/*.js']
}
gulp.task('test', shell.task('mocha -R spec -r should'))
gulp.task('coverage', ['test'], shell.task('istanbul cover _mocha -- -R spec'))
gulp.task('coveralls', ['coverage'], shell.task('cat coverage/lcov.info | coveral... | var gulp = require('gulp')
var shell = require('./')
var paths = {
js: ['*.js', 'test/*.js']
}
gulp.task('test', shell.task('mocha -R spec -r should'))
gulp.task('coverage', ['test'], shell.task('istanbul cover _mocha -- -R spec'))
gulp.task('coveralls', ['coverage'], shell.task('cat coverage/lcov.info | coveral... | Remove dirty hack for keeping watch running on errors | Remove dirty hack for keeping watch running on errors
| JavaScript | mit | realtymaps/gulp-shell,Xerkus/gulp-shell,AcklenAvenue/gulp-shell,alfonso-presa/gulp-shell |
5ade2739a47f3fb2a3a8ee5bc5c62619f1c78e74 | src/client/etherscan.js | src/client/etherscan.js | /**
* @file Etherscan API client.
* @module client/etherscan
*/
'use strict'
/**
* Etherscan API client.
* @static
*/
class Client {
}
// Expose
module.exports = Client
| /**
* @file Etherscan API client.
* @module client/etherscan
*/
'use strict'
/**
* Private members store.
* @private
*/
const privs = new WeakMap()
/**
* Etherscan API client.
* @static
*/
class Client {
/**
* No parameters.
*/
constructor () {
const priv = {}
privs.set(this, priv)
}
}
... | Add private members store to Etherscan client | Add private members store to Etherscan client
| JavaScript | unlicense | jestcrows/ethtaint,jestcrows/ethtaint |
a635b7b9f5b6b49ce079f3ea15e62df089f39452 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var $ = require('gulp-load-plugins')({
camelize: true
});
var config = {
source: {
scripts: {
path: 'app/',
files: './app/**/*.js'
}
},
build: {
scripts: 'build/scrips/'
}
}
gulp.task('build-scripts', function() {
return gulp.src(config.source.scripts.fi... | var gulp = require('gulp');
var $ = require('gulp-load-plugins')({
camelize: true
});
var config = {
source: {
scripts: {
path: 'app/',
files: './app/**/*.js'
},
markup: {
path: 'app/',
files: './app/**/*.html'
}
},
build: {
scripts: 'build/scrips/',
markup: 'bui... | Add gulp task build markup | Add gulp task build markup | JavaScript | mit | letanure/gulp-demo,letanure/gulp-demo |
3c7218c4e42017c4c602fb4fe86dd5641ff93cde | gulpfile.js | gulpfile.js | var gulp = require('gulp')
var sass = require('gulp-sass')
var browserSync = require('browser-sync').create()
gulp.task('sass', function () {
return gulp.src('./scss/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./css'))
})
gulp.task('browser-sync', function() {
browserSync.init({
... | var gulp = require('gulp')
var sass = require('gulp-sass')
var browserSync = require('browser-sync').create()
gulp.task('sass', function () {
return gulp.src('./scss/**/*.scss')
.pipe(sass())
.pipe(gulp.dest('./css'))
.pipe(browserSync.stream())
})
gulp.task('browser-sync', function() {
browserSync.in... | Fix gulfile not watching Sass changes | Fix gulfile not watching Sass changes
| JavaScript | mit | ellsclytn/AirCalc,ellsclytn/AirCalc |
9cffc665772326208a446bc203ff127f877aa318 | src/data/mutations/addRanking.js | src/data/mutations/addRanking.js | import StoriesItemType from '../types/StoriesItemType'
import RankingInputItemType from '../types/RankingInputItemType'
import {Story, User, Ranking} from '../models'
const addRanking = {
name: 'addRanking',
type: StoriesItemType,
args: {
story: {type: RankingInputItemType}
},
async resolve (value, {stor... | import StoriesItemType from '../types/StoriesItemType'
import RankingInputItemType from '../types/RankingInputItemType'
import {Story, User, Ranking} from '../models'
const addRanking = {
name: 'addRanking',
type: StoriesItemType,
args: {
story: {type: RankingInputItemType}
},
async resolve (value, {stor... | Add user check to add ranking | Add user check to add ranking
| JavaScript | mit | DominikePessoa/rateissuesfront,DominikePessoa/rateissuesfront,cassioscabral/rateissuesfront,cassioscabral/rateissuesfront |
4017470f2f16cb62ab89ad2b181e9338188c3fdb | lib/user-credentials.js | lib/user-credentials.js | var md5= require('./md5');
/*
* Hide the password. Uses the password to form authorization strings,
* but provides no interface for exporting it.
*/
function user_credentials(username,password) {
if (username.is_user_credentials &&
typeof username.basic === 'function' &&
typeof username.digest === 'functi... | var md5= require('./md5');
/*
* Hide the password. Uses the password to form authorization strings,
* but provides no interface for exporting it.
*/
function user_credentials(username,password) {
if (username.is_user_credentials &&
typeof username.basic === 'function' &&
typeof username.digest === 'functi... | Refactor user credentials as a prototyped object. | Refactor user credentials as a prototyped object.
| JavaScript | mit | randymized/www-authenticate |
3748b6e2d9d97238a3ee9580a3d62dd60380edb7 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var nodemon = require('nodemon');
var webpack = require('webpack');
var clientConfig = require('./webpack.config');
var path = require('path');
function onBuild(cb) {
return function(err, stats) {
if (err)
console.log('Error', err);
else
console.log(stats.toString());
... | var gulp = require('gulp');
var nodemon = require('nodemon');
var webpack = require('webpack');
var clientConfig = require('./webpack.config');
var path = require('path');
var wpCompiler = webpack(clientConfig);
function onBuild(cb) {
return function(err, stats) {
if (err)
console.log('Error', err);
e... | Fix onBuild callback for webpack watch mode, now it properly outputs what it should to the log (screen). Also microrefactor the webpack calling code. | Fix onBuild callback for webpack watch mode, now it properly outputs what it should to the log (screen). Also microrefactor the webpack calling code.
| JavaScript | mit | bragin/ublog,bragin/ublog |
d2652f66c5cd09730a789373fe1cc0f51d357b7d | gulpfile.js | gulpfile.js | /*
Copyright 2014 Spotify AB
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | /*
Copyright 2014 Spotify AB
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | Fix headless unit test running | Fix headless unit test running
Now "npm install && npm test" works locally again.
| JavaScript | apache-2.0 | spotify/threaddump-analyzer,rprabhat/threaddump-analyzer,rprabhat/threaddump-analyzer,spotify/threaddump-analyzer |
533cee40b8fa8d6ec9066b13f2b094881dee9b9c | gulpfile.js | gulpfile.js | const fs = require("fs");
const path = require("path");
const { src, dest, task, watch, series } = require('gulp');
const Gitdown = require('@gnd/gitdown');
const rename = require("gulp-rename");
const debug = require("gulp-debug");
const pandoc = require("gulp-pandoc");
task('gitdown', async () => {
if (!fs.existsS... | const fs = require("fs");
const path = require("path");
const { src, dest, task, watch, series } = require('gulp');
const Gitdown = require('@gnd/gitdown');
const rename = require("gulp-rename");
const debug = require("gulp-debug");
const pandoc = require("gulp-pandoc");
task('gitdown', async () => {
if (!fs.existsS... | Make scroll-up thingy support scroll-down thingy | Make scroll-up thingy support scroll-down thingy
| JavaScript | mit | ConsenSys/truffle |
4fcee02539bddc4c2b0079fa6f4e5707a6f887c6 | gulpfile.js | gulpfile.js | var gulp = require("gulp");
var sass = require("gulp-sass");
gulp.task('sass', function () {
gulp.src('src/hipster-grid-system.scss')
.pipe(sass())
.pipe(gulp.dest('dist'));
});
| var gulp = require("gulp");
var sass = require("gulp-sass");
var rename = require("gulp-rename");
var autoprefixer = require("gulp-autoprefixer");
gulp.task('sass', function () {
gulp.src('src/hipster-grid-system.scss')
.pipe(sass())
.pipe(autoprefixer())
.pipe(gulp.dest('dist'));
gulp.... | Add support autoprefixer for cross-browser. Add support minify dist file. | Add support autoprefixer for cross-browser.
Add support minify dist file.
| JavaScript | mit | erdoganbulut/hipster-grid-system |
c13fa02042618b63c416983cb749e0ba8f1db8cc | _temp/hud/src/index.js | _temp/hud/src/index.js | 'use strict';
// DEV TIME CODE
if (FAKE_SERVER) {
require('fake');
}
// DEV TIME CODE
require('./index.scss');
var $ = require('$jquery');
var util = require('lib/util');
var state = require('./state');
var repository = require('./repository');
var sections = require('./sections/section');
//var details = args.... | 'use strict';
// DEV TIME CODE
if (FAKE_SERVER) {
require('fake');
}
// DEV TIME CODE
require('./index.scss');
var $ = require('$jquery');
var util = require('lib/util');
var state = require('./state');
var repository = require('./repository');
var sections = require('./sections/section');
//var details = args.... | Fix bug where Navigation Timing info could be accessed to quickly and hence produce weird values | Fix bug where Navigation Timing info could be accessed to quickly and hence produce weird values
| JavaScript | unknown | Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype |
767e66816b18085e0ab553eb0368b34fa94e6547 | packages/redis/index.js | packages/redis/index.js | const Redis = require('ioredis');
module.exports = url => {
const redis = new Redis(url);
redis.setJSON = async (...arguments) => {
arguments[1] = JSON.stringify(arguments[1]);
if (typeof arguments[2] === 'object' && arguments[2].asSeconds) {
arguments[2] = parseInt(arguments[2].asSeconds());
}
... | const Redis = require('ioredis');
module.exports = url => {
const redis = new Redis(url);
redis.setJSON = async (...arguments) => {
arguments[1] = JSON.stringify(arguments[1]);
if (typeof arguments[2] === 'object' && arguments[2].asSeconds) {
arguments[2] = parseInt(arguments[2].asSeconds());
}
... | Fix redis syntax error if third argument is undefined | Fix redis syntax error if third argument is undefined
| JavaScript | mit | sharaal/dnode,sharaal/dnode |
b361f2ca2d51038f00b64fba0cb96d1cf635dd55 | commands/togethertube.js | commands/togethertube.js | const Command = require('../structures/command.js');
const request = require('request');
module.exports = class TogetherTube extends Command {
constructor(client) {
super(client);
this.name = "togethertube";
this.aliases ["ttube", "ttb"];
}
run(message, args, commandLang) {
let embed = this.cli... | const Command = require('../structures/command.js');
const request = require('request');
module.exports = class TogetherTube extends Command {
constructor(client) {
super(client);
this.name = "togethertube";
this.aliases = ["ttube", "ttb"];
}
run(message, args, commandLang) {
let embed = thi... | Fix aliases and error message.g | Fix aliases and error message.g
| JavaScript | mit | pedrofracassi/deku |
be788cdbacab391543739cf651f2c5562cc04a85 | app/models/taxonomy.js | app/models/taxonomy.js | import DS from 'ember-data';
import OsfModel from 'ember-osf/models/osf-model';
/**
* @module ember-preprints
* @submodule models
*/
/**
* Model for OSF APIv2 preprints. This model may be used with one of several API endpoints. It may be queried directly. In the future, there will be multiple taxonomy endpoints u... | import DS from 'ember-data';
import OsfModel from 'ember-osf/models/osf-model';
/**
* @module ember-preprints
* @submodule models
*/
/**
* Model for OSF APIv2 preprints. This model may be used with one of several API endpoints. It may be queried directly. In the future, there will be multiple taxonomy endpoints u... | Update field name -remove TODO | Update field name
-remove TODO
| JavaScript | apache-2.0 | pattisdr/ember-preprints,baylee-d/ember-preprints,caneruguz/ember-preprints,CenterForOpenScience/ember-preprints,CenterForOpenScience/ember-preprints,laurenrevere/ember-preprints,baylee-d/ember-preprints,pattisdr/ember-preprints,laurenrevere/ember-preprints,caneruguz/ember-preprints,hmoco/ember-preprints,hmoco/ember-pr... |
0dab4acbf0b8c8c14bce3518cf47fb566a7e839d | static/js/main.js | static/js/main.js | /**
* Created by jonathan on 3/7/15.
*/
var CameraApp = function() {};
CameraApp.prototype = {
framesPerSecond: 1,
setup: function() {
this.image = document.getElementById('CameraImage');
this.imageSource = 'http://104.206.193.11:49709/dcnvr/video/live/image/2?w=320&h=240';
this.loa... | /**
* Created by jonathan on 3/7/15.
*/
var CameraApp = function() {};
CameraApp.prototype = {
framesPerSecond: 1,
timeoutInMinutes: 1,
setup: function() {
this.startTime = new Date().getTime();
this.image = document.getElementById('CameraImage');
this.imageSource = 'http://104.... | Add live video feed timeout | Add live video feed timeout
| JavaScript | mit | bytedreamer/LollypopCatToy,bytedreamer/LollypopCatToy,bytedreamer/LollypopCatToy |
0688a80f86e0fcc36d861ccc53e347e5822f119c | packages/diffhtml/lib/tasks/patch-node.js | packages/diffhtml/lib/tasks/patch-node.js | import patchNode from '../node/patch';
import Transaction from '../transaction';
import { CreateNodeHookCache, VTree } from '../util/types';
import globalThis from '../util/global';
/**
* Processes a set of patches onto a tracked DOM Node.
*
* @param {Transaction} transaction
* @return {void}
*/
export default fu... | import patch from '../node/patch';
import Transaction from '../transaction';
import { CreateNodeHookCache, VTree } from '../util/types';
import globalThis from '../util/global';
/**
* Processes a set of patches onto a tracked DOM Node.
*
* @param {Transaction} transaction
* @return {void}
*/
export default functi... | Rename public function to match task name | Rename public function to match task name
| JavaScript | mit | tbranyen/diffhtml,tbranyen/diffhtml,tbranyen/diffhtml,tbranyen/diffhtml |
5bf7329fdb2f67aceafc0f0b3e7265f0082d76e1 | lib/util.js | lib/util.js | var url = require("url");
var qs = require("qs");
/**
* getNextLink
* @function
* @param {Object} response A response object returned from calling 'client.makeRequest'
* @returns A parsed version of the link to the subsequent page, or null if no such page exists.
*/
var getNextLink = function (response) {
if (re... | var url = require("url");
var qs = require("qs");
/**
* getNextLink
* @function
* @param {Object} response A response object returned from calling 'client.makeRequest'
* @returns A parsed version of the link to the subsequent page, or null if no such page exists.
*/
var getNextLink = function (response) {
if (re... | Switch string.incluldes() to string.indexOf() for compatibility reasons | Switch string.incluldes() to string.indexOf() for compatibility reasons
| JavaScript | mit | bandwidthcom/node-bandwidth,bandwidthcom/node-bandwidth |
a6509c1044bc53b22234ee3f935084989c59ea73 | src/remove-duplicate-elements.js | src/remove-duplicate-elements.js | // Remove duplicate elements from array
function removeDups(arr){
var dupes ={},
returnArray = [],
el;
for(var i =0; i<arr.length; i++){
el = arr[i];
if(!dupes[el]){
returnArray.push(el);
dupes[el] = true;
}
}
return returnArray;
}
removeDups([1,3,3,3,1,5,6,7,8,1]); | // Remove duplicate elements from array
function removeDups(arr){
var dupes ={},
returnArray = [],
el;
for(var i =0; i<arr.length; i++){
el = arr[i];
if(!dupes[el]){
returnArray.push(el);
dupes[el] = true;
}
}
return returnArray;
}
removeDups([10,30,3,30,3,10,5,6,7,8,1,1, ... | Remove duplicate elements in an array (FIX) | Remove duplicate elements in an array (FIX)
| JavaScript | mit | dedurus/js-algos |
bd13289c96e95952696b392ff232c5e27333750c | tools/analyzeBundle.js | tools/analyzeBundle.js | import webpack from 'webpack';
import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer';
import config from '../webpack.config.prod';
config.plugins.push(new BundleAnalyzerPlugin());
const compiler = webpack(config);
compiler.run((error, stats) => {
if (error) {
throw new Error(error);
}
console.log(s... | import webpack from 'webpack';
import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer';
import config from '../webpack.config.prod';
config.plugins.push(new BundleAnalyzerPlugin());
process.env.NODE_ENV = 'production';
const compiler = webpack(config);
compiler.run((error, stats) => {
if (error) {
throw ... | Set prod env when analyzing bundle | Set prod env when analyzing bundle
| JavaScript | mit | coryhouse/react-slingshot,flibertigibet/react-redux-starter-kit-custom,flibertigibet/react-redux-starter-kit-custom,danpersa/remindmetolive-react,coryhouse/react-slingshot,danpersa/remindmetolive-react,danpersa/remindmetolive-react |
91363795e88b13f13bd15842039e2cf94e1e357f | assets/scripts/main.js | assets/scripts/main.js | import $ from 'jquery';
import Router from './util/router';
import common from './routes/Common';
import home from './routes/Home';
import about_us from './routes/About';
// Import Bootstrap
import 'bootstrap/dist/js/umd/util.js';
import 'bootstrap/dist/js/umd/alert.js';
import 'bootstrap/dist/js/umd/button.js';
impor... | import $ from 'jquery';
import Router from './util/router';
import common from './routes/Common';
import home from './routes/Home';
import about_us from './routes/About';
// Import npm dependencies
import 'bootstrap/dist/js/umd/util.js';
import 'bootstrap/dist/js/umd/alert.js';
import 'bootstrap/dist/js/umd/button.js'... | Update comment for importing deps | Update comment for importing deps | JavaScript | mit | agusgarcia/sage9,JulienMelissas/sage,mckelvey/sage,levito/kleineweile-wp-theme,ChrisLTD/sage,ChrisLTD/sage,skemantix/sage,PCHC/pharmacyresidency2017,generoi/sage,teaguecnelson/tn-tellis-bds,gkmurray/sage,NicBeltramelli/sage,skemantix/sage,ptrckvzn/sage,agusgarcia/sage9,sacredwebsite/sage,sacredwebsite/sage,c50/c50_root... |
4f0e80b7dc2744c9527cebc5b9c99605f1f92f0a | geocoder.js | geocoder.js | var geocoder = require('node-geocoder') ("google", "https", {
apiKey: '<YOUR-KEY>'
});
var csv = require('csv');
process.stdin
.pipe(csv.parse())
.pipe(csv.transform(function(data, callback){
setImmediate(function(){
geocoder.geocode(data[1])
.then(function(res) {
data.push(res[0].latitude);
data... | var apiKey = "<YOUR-KEY>";
var geocoder = require('node-geocoder') ("google", "https", { apiKey: apiKey });
var csv = require('csv');
process.stdin
.pipe(csv.parse())
.pipe(csv.transform(function(data, callback){
setImmediate(function(){
geocoder.geocode(data[1])
.then(function(res) {
data.push(res[0]... | Relocate the key to be able to find it eaven easier | Relocate the key to be able to find it eaven easier
| JavaScript | mit | jpenninkhof/geocoder |
33f2a8f4c1dec243db8f33098174ab6bdf201aa9 | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp');
var files = ['manifest.json', 'background.js'];
var xpiName = 'catgifs.xpi';
gulp.task('default', function () {
console.log(files, xpiName)
});
| 'use strict';
var gulp = require('gulp');
var zip = require('gulp-zip');
var files = ['manifest.json', 'background.js'];
var xpiName = 'catgifs.xpi';
gulp.task('default', function () {
gulp.src(files)
.pipe(zip(xpiName))
.pipe(gulp.dest('.'));
});
| Use gulp to create the xpi. | Use gulp to create the xpi. | JavaScript | mpl-2.0 | bwinton/catgif-extension |
46d0b833d4bce66dd7f4a717cab9968bf113551c | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var shell = require('gulp-shell');
var tsc = require('gulp-tsc');
gulp.task('build', function () {
return gulp.src([
'./**/*.ts',
'!./node_modules/**/*.ts'
])
.pipe(tsc({
target: 'ES5',
removeComments: true,
sourceMap: true
}))
.pipe(gulp.dest... | var gulp = require('gulp');
var shell = require('gulp-shell');
var tsc = require('gulp-tsc');
gulp.task('build', function () {
return gulp.src([
'./**/*.ts',
'!./node_modules/**/*.ts'
])
.pipe(tsc({
target: 'ES5',
removeComments: true,
sourceMap: true
}))
.pipe(gulp.dest... | Add lib to NODE_PATH when running the app. | Add lib to NODE_PATH when running the app.
| JavaScript | apache-2.0 | SollmoStudio/beyond.ts,sgkim126/beyond.ts,SollmoStudio/beyond.ts,murmur76/beyond.js,noraesae/beyond.ts,sgkim126/beyond.ts,murmur76/beyond.ts,murmur76/beyond.js,murmur76/beyond.ts,noraesae/beyond.ts |
e6233ddf0d44b1d1086790e084ba2937e31b7480 | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp');
var options = {
name: 'ec2prices',
dependantFiles: ['node_modules/babel/browser-polyfill.js'],
mainFiles: [
'app/scripts/app.es6',
'app/scripts/**/!(*.spec|*.mock).{js,es6}'
],
templateFiles: ['app/scripts/**/*.htm{,l}'],
specFiles: ['app/scripts/**/*.{spe... | 'use strict';
var gulp = require('gulp');
var options = {
name: 'ec2prices',
dependantFiles: ['node_modules/babel/browser-polyfill.js'],
mainFiles: [
'app/scripts/app.es6',
'app/scripts/**/!(*.spec|*.mock).{js,es6}'
],
templateFiles: ['app/scripts/**/*.htm{,l}'],
specFiles: ['app/scripts/**/*.{spe... | Add the test task dependency back to the default gulp task | Add the test task dependency back to the default gulp task
| JavaScript | mit | solarnz/ec2pric.es,solarnz/ec2pric.es,solarnz/ec2pric.es |
4ded0d94d560d9793af9b9d1e2cb17495aa5c111 | optimize/node/engine.js | optimize/node/engine.js | var parse = require('./parse');
var clean = require('./clean');
module.exports = Engine = {};
var pythons = [];
var outputs = [];
var pythonNum = 0;
Engine.runPython = function(operation, a, b, cb) {
if (operation === 'local' || operation === 'global') {
var cleanup = clean.cleanMin(operation, a, b, cb);
a... | var parse = require('./parse');
var clean = require('./clean');
module.exports = Engine = {};
var pythons = [];
var outputs = [];
var pythonNum = 0;
Engine.runPython = function(operation, a, b, cb, xData, yData) {
if (operation === 'local' || operation === 'global') {
var cleanup = clean.cleanMin(operation, a,... | Add specification for fit operation | Add specification for fit operation
| JavaScript | mit | acjones617/scipy-node,acjones617/scipy-node |
39e7bfe0a481f598d9405081e6a7db0a375ba8ca | imports/api/database-controller/module-fulfilment/moduleFulfilment.js | imports/api/database-controller/module-fulfilment/moduleFulfilment.js | import { Mongo } from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
class ModuleFulfilmentCollection extends Mongo.Collection {
insert(fulfilmentData, callBack){
const fulfilmentDoc = fulfilmentData;
let result;
//validate document
return super.insert( fulfilmentDoc, cal... | import { Mongo } from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
class ModuleFulfilmentCollection extends Mongo.Collection {
insert(fulfilmentData, callBack){
const fulfilmentDoc = fulfilmentData;
let result;
//validate document
return super.insert( fulfilmentDoc, cal... | FIX wrong db schema declaration | FIX wrong db schema declaration
| JavaScript | mit | nus-mtp/nus-oracle,nus-mtp/nus-oracle |
c395a70e473936bb0a4719d0b5d1cc03b8acf218 | Resources/app/config/app.js | Resources/app/config/app.js | var config = {
/** app mode **/
mode: 'DEV',
/** db name **/
db: 'tiapp-exercise',
/** android tablet minimum form factor **/
tablet: {
width: 899,
height: 899
},
/** Actions **/
action: [
{module: 'Try', name: 'doSave', path: 'Como.Controller.T... | var config = {
/** app mode **/
mode: 'DEV',
/** db name **/
db: 'tiapp-como',
/** android tablet minimum form factor **/
tablet: {
width: 899,
height: 899
},
/** Actions **/
action: [
{module: 'Try', name: 'doSave', path: 'Como.Controller.Try.d... | Update to change db name on config | Update to change db name on config
| JavaScript | apache-2.0 | geekzy/tiapp-como |
912dcf904aac4e8730e3c45b2282d39e1c75170b | test/autoprefixer_test.js | test/autoprefixer_test.js | 'use strict';
var grunt = require('grunt');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actual, expected, [messa... | 'use strict';
var grunt = require('grunt');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actual, expected, [messa... | Remove test for default options | Remove test for default options
| JavaScript | mit | yuhualingfeng/grunt-autoprefixer,nqdy666/grunt-autoprefixer,nDmitry/grunt-autoprefixer |
af9adbb32651ae83dba7522211e540a20d0fe01b | blueprints/local-config/files/__config__/__name__.local.js | blueprints/local-config/files/__config__/__name__.local.js | /* jshint node: true */
module.exports = function(environment) {
return {};
}; | /* jshint node: true */
/* ==================
* USAGE INSTRUCTIONS
* ==================
*
* If you'd like to make a local change to this file, you need
* to tell git to ignore any changes to this file. You can do
* this by running:
*
* git update-index --skip-worktree [file-path]
*
* If you want to undo the ... | Add usage instructions to config blueprint | Add usage instructions to config blueprint
| JavaScript | mit | asakusuma/ember-local-config,asakusuma/ember-local-config |
04a10e43de71a1f8ff19bf840ffc48dcf9e4e266 | wafer/static/js/scheduledatetime.js | wafer/static/js/scheduledatetime.js | // Basic idea from Bojan Mihelac -
// http://source.mihelac.org/2010/02/19/django-time-widget-custom-time-shortcuts/
// Django imports jQuery into the admin site using noConflict(True)
// We wrap this in an anonymous function to stick to jQuery's $ idiom
// and ensure we're using the admin version of jQuery, rather th... | // Override the default setting on the django admin DateTimeShortcut
// Django 2 nicely does make this overridable, but we need to
// set it up before the DateTimeShortcuts init is called by
// window.onload, so we attach it to DOMContentLoaded
//
// The names of the input fields are also a bit opaque, and
// unfornate... | Rework the scheduletime helper to work with later admintimewidget helper code | Rework the scheduletime helper to work with later admintimewidget helper code
| JavaScript | isc | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer |
7ac6877cc11671359f31439bfd32f4c79253c0ae | tests/generated-assets.js | tests/generated-assets.js | var expect = require('chai').expect,
request = require('superagent').agent(),
PrettyCSS = require('PrettyCSS'),
testhost = require('../src/server').testhost();
describe('fields.css', function() {
var res;
before(function (done) {
request.get(testhost + '/css/fields.css').end(function(r) {
... | var expect = require('chai').expect,
request = require('superagent').agent(),
PrettyCSS = require('PrettyCSS'),
Q = require('q'),
connect = Q.defer(),
environment = require('./lib/environment').default;
require('../src/server').harness(function (url) {
connect.resolve(url);
});
describe('fiel... | Use new harness in generated assets unit test | Use new harness in generated assets unit test
| JavaScript | agpl-3.0 | jcamins/biblionarrator,jcamins/biblionarrator |
72db9a234093081be4b48fb9a1af73a5c2c4f5c0 | test/server/process/normalizeArgs.spec.js | test/server/process/normalizeArgs.spec.js | import normalizeArgs, { __RewireAPI__ as rewireAPI } from '../../../src/server/process/normalizeArgs';
describe('normalizeArgs', () => {
afterEach(() => {
rewireAPI.__ResetDependency__('process');
});
it('should normalize for Windows with no COMSPEC', () => {
rewireAPI.__Rewire__('process'... | import normalizeArgs, { __RewireAPI__ as rewireAPI } from '../../../src/server/process/normalizeArgs';
describe('normalizeArgs', () => {
afterEach(() => {
rewireAPI.__ResetDependency__('process');
});
it('should normalize for Windows with no COMSPEC', () => {
rewireAPI.__Rewire__('process'... | Remove quotes from tests in normalizeArgs | Remove quotes from tests in normalizeArgs
| JavaScript | mit | danistefanovic/hooka |
6bba09d9f9946d3498d6b31112074cd07bc6fc86 | generators/app/templates/app/scripts/main.js | generators/app/templates/app/scripts/main.js | import App from './app';
import 'babel-polyfill';
common.app = new App(common);
common.app.start();
| import App from './app';
common.app = new App(common);
common.app.start();
| Remove babel-polyfill import in man.js | Remove babel-polyfill import in man.js
| JavaScript | mit | snphq/generator-sp,i-suhar/generator-sp,snphq/generator-sp,snphq/generator-sp,i-suhar/generator-sp,i-suhar/generator-sp |
7dffff7f5706c4816855a638a33dca5d271915f2 | app/test/token/store-token-generative.spec.js | app/test/token/store-token-generative.spec.js | "use strict";
const apiRequest = require( "../../src/token/api-request" );
const storeToken = require( "../../src/token/store-token" );
const Promise = require( "bluebird" );
const expect = require( "expect.js" );
const sinonSandbox = require( "sinon" ).sandbox.create();
describe.only( "Generative testing", function(... | "use strict";
const apiRequest = require( "../../src/token/api-request" );
const storeToken = require( "../../src/token/store-token" );
const Promise = require( "bluebird" );
const expect = require( "expect.js" );
const sinonSandbox = require( "sinon" ).sandbox.create();
describe( "Generative testing", function() {
... | Remove the .only from the generative test | Remove the .only from the generative test
| JavaScript | mit | FagnerMartinsBrack/talk-mocking-and-false-positives,FagnerMartinsBrack/talk-mocking-and-false-positives |
68a4152d6042284aed8db18f5f0403023d7938a0 | app/js/filters/titlecase.js | app/js/filters/titlecase.js | formsAngular.filter('titleCase',[function() {
return function(str, stripSpaces) {
var value = str.replace(/(_|\.)/g, ' ').replace(/[A-Z]/g, ' $&').replace(/\w\S*/g, function (txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});
if (stripSpaces) {
... | formsAngular.filter('titleCase',[function() {
return function(str, stripSpaces) {
var value = str.replace(/(_|\.)/g, ' ').replace(/[a-z][A-Z]/g, ' $&').replace(/\w\S*/g, function (txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});
if (stripSpaces) {
... | Stop titleCase introducing double spaces | Stop titleCase introducing double spaces
| JavaScript | mit | forms-angular/forms-angular,forms-angular/forms-angular,DerekDomino/forms-angular,DerekDomino/forms-angular,behzad88/forms-angular,forms-angular/forms-angular,b12consulting/forms-angular,b12consulting/forms-angular,DerekDomino/forms-angular,behzad88/forms-angular |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.