commit stringlengths 40 40 | old_file stringlengths 4 236 | new_file stringlengths 4 236 | old_contents stringlengths 1 3.26k | new_contents stringlengths 16 4.43k | subject stringlengths 16 624 | message stringlengths 17 3.29k | lang stringclasses 5
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
2f480c9ec2ece63a7b9eaf5b658183fd8422a0e7 | lib/mp4/atoms/atom-avc1.js | lib/mp4/atoms/atom-avc1.js | 'use strict';
const Atom = require('../atom');
const Utils = require('../utils');
class AtomAVC1 extends Atom {
constructor() {
super();
this.width = null;
this.height = null;
this.extraData = null;
}
type() {
return Utils.ATOM_AVC1;
}
parse(buffer) {
... | 'use strict';
const Atom = require('../atom');
const Utils = require('../utils');
class AtomAVC1 extends Atom {
constructor() {
super();
this.width = null;
this.height = null;
this.extraData = null;
}
type() {
return Utils.ATOM_AVC1;
}
parse(buffer) {
... | Fix extracting a video extra data | Fix extracting a video extra data
| JavaScript | mit | pipll/node-video-lib,pipll/node-media-lib |
6bd9b7ef6e4815c204464857cbbcda4012bbbc3d | src/eventListeners/windowResizeHandler.js | src/eventListeners/windowResizeHandler.js | import { state } from './../store/index.js';
import external from './../externalModules.js';
const enable = function () {
disable(); // Clean up any lingering listeners
window.addEventListener('resize', resizeThrottler, false);
};
const disable = function () {
window.removeEventListener('resize', resizeThrottle... | import { state } from './../store/index.js';
import external from './../externalModules.js';
const enable = function () {
disable(); // Clean up any lingering listeners
window.addEventListener('resize', resizeThrottler, false);
};
const disable = function () {
window.removeEventListener('resize', resizeThrottle... | Fix export of force resize method | Fix export of force resize method
| JavaScript | mit | chafey/cornerstoneTools,cornerstonejs/cornerstoneTools,cornerstonejs/cornerstoneTools,cornerstonejs/cornerstoneTools |
7de86b26fa6e31a08500d4b4c2420787649ec020 | js/index.js | js/index.js | 'use strict';
var Alexa = require('alexa-sdk');
var constants = require('./constants');
var audioEventHandlers = require('./handlers/audioEventHandlers');
var startModeHandlers = require('./handlers/startModeHandlers');
var playModeHandlers = require('./handlers/playModeHandlers');
var remoteControlHandlers = require(... | 'use strict';
var Alexa = require('alexa-sdk');
var constants = require('./constants');
var audioEventHandlers = require('./handlers/audioEventHandlers');
var startModeHandlers = require('./handlers/startModeHandlers');
var playModeHandlers = require('./handlers/playModeHandlers');
var remoteControlHandlers = require(... | Fix For Testing from Dev Console | Fix For Testing from Dev Console
| JavaScript | mit | justinpecott/somafm-alexa |
1c38d20e2431a1365e0539e19824a349223722b5 | Specs/karma-main.js | Specs/karma-main.js | (function() {
/*global __karma__,require*/
"use strict";
var included = __karma__.config.args[0];
var excluded = __karma__.config.args[1];
var webglValidation = __karma__.config.args[2];
var release = __karma__.config.args[3];
var toRequire = ['Cesium'];
if (release) {
require... | (function() {
/*global __karma__,require*/
"use strict";
var included = '';
var excluded = '';
var webglValidation = false;
var release = false;
if(__karma__.config.args){
included = __karma__.config.args[0];
excluded = __karma__.config.args[1];
webglValidation = __... | Make tests runnable in WebStorm. | Make tests runnable in WebStorm.
| JavaScript | apache-2.0 | CesiumGS/cesium,YonatanKra/cesium,wallw-bits/cesium,oterral/cesium,soceur/cesium,ggetz/cesium,jason-crow/cesium,AnimatedRNG/cesium,NaderCHASER/cesium,AnimatedRNG/cesium,likangning93/cesium,likangning93/cesium,YonatanKra/cesium,esraerik/cesium,aelatgt/cesium,jason-crow/cesium,omh1280/cesium,hodbauer/cesium,aelatgt/cesiu... |
90885ba795c978b849acfb148ef5bc88d5f3fdce | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | Add necessary bootstrap asset to fix alerts | Add necessary bootstrap asset to fix alerts
| JavaScript | mit | user890104/fauna,initLab/fauna,initLab/fauna,user890104/fauna,user890104/fauna,initLab/fauna |
feecfc2a0707d4d5dd8feedcc0595fa939d6ae69 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | Add autotap on document ready | Add autotap on document ready
| JavaScript | mit | drodriguez56/lotifyMe,drodriguez56/lotifyMe,drodriguez56/lotifyMe |
ad8f186f33f687dc0183a8bcac299f47e2a868f2 | lib/conf.js | lib/conf.js | module.exports = {
path: process.env.POD_CONF || (process.env.HOME + '/.podrc'),
webId: 'pod-web-service'
} | const os = require('os');
module.exports = {
path: process.env.POD_CONF || ((process.env.HOME || os.homedir()) + '/.podrc'),
webId: 'pod-web-service'
} | Use user home dir via os module | Use user home dir via os module
| JavaScript | mit | yyx990803/pod,yyx990803/pod,yyx990803/pod |
09f58f1962f2f9afa68e148bacd81e39af973e59 | templates/meteor/package.mustache.js | templates/meteor/package.mustache.js | Package.describe({
name: '{{#meteorUser}}{{.}}:{{/meteorUser}}{{destPkgPrefix}}{{pkg.name}}',
summary: 'Bootstrap: {{pkg.name}}',
version: '{{bootstrap.version}}'
});
Package.onUse(function (api) {
api.versionsFrom('1.1.0.2');
api.use(['jquery', 'less'], 'client');
{{#pkg.deps}}
api.use('{{#meteorUser}}{{.}}:... | Package.describe({
name: '{{#meteorUser}}{{.}}:{{/meteorUser}}{{destPkgPrefix}}{{pkg.name}}',
summary: 'Bootstrap: {{pkg.name}}',
version: '{{bootstrap.version}}'
});
Package.onUse(function (api) {
api.versionsFrom('1.1.0.2');
api.use(['jquery', 'less'], 'client');
{{#pkg.deps}}
api.use('{{#meteorUser}}{... | Convert tabs to spaces in package.js template | Convert tabs to spaces in package.js template
| JavaScript | mit | dschnare/meteor-bootstrap-gen |
043b2a9dff87b641078c0a89c3c0ba31f57bc929 | test/assert-votes.js | test/assert-votes.js | var conf = rs.conf();
var ret = 0;
for (var i = 0; i < conf["members"].length; i++) {
member = conf["members"][i];
// In Mongo 2.6, priority and votes aren't returned when
// they are default (1), so we check for undefined as well.
if (
(member.priority !== 1 && typeof member.priority !== 'undefined') ||... | var conf = rs.conf();
var ret = 0;
for (var i = 0; i < conf["members"].length; i++) {
member = conf["members"][i];
if (
(member.priority !== 1) || (member.votes !== 1)
) {
print("MISCONFIGURED: " + member.host);
printjson(member);
ret = 1;
} else {
print("OK: " + member.host);
}
}
quit... | Simplify logic now that 2.6 is deprecated. | Simplify logic now that 2.6 is deprecated.
| JavaScript | mit | aptible/docker-mongodb,aptible/docker-mongodb,aptible/docker-mongodb,aptible/docker-mongodb |
4a2e4380cbea06f643adf90333a9edd55edf28e3 | index.js | index.js | // allow modules import syntax
import run, * as cli from './src/index'
// Run from CLI or as Node module
if (module.parent) {
module.exports = cli
/* istanbul ignore next */
} else run(process.argv)
| // allow modules import syntax
require = require('esm')(module, { // eslint-disable-line
cache: false
})
import run, * as cli from './src/index'
// Run from CLI or as Node module
if (module.parent) {
module.exports = cli
/* istanbul ignore next */
} else run(process.argv)
| Revert "updated: remove esm from the cli bundle" | Revert "updated: remove esm from the cli bundle"
This reverts commit e75f8fa6ac98969c8d65ede6c7d9a614d7f54b5d.
| JavaScript | mit | riot/cli |
9bbe40bc1b24b74b3a7833290484ab82d33fb5ce | server/middlewares.js | server/middlewares.js | import Cookies from 'cookies'
export function checkSession (req, res, next) {
const cookies = new Cookies(req, res)
const userId = cookies.get('user_id')
if (!userId) {
return res.redirect('/login')
}
return req
.core.users.show(userId)
.then(user => {
req.currentUser = user
next()
... | import Cookies from 'cookies'
export function checkSession (req, res, next) {
const cookies = new Cookies(req, res)
const userId = cookies.get('user_id')
if (!userId) {
return res.redirect('/login')
}
return req
.core.users.show(userId)
.then(user => {
req.currentUser = user
next()
... | Make cookies readable from frontend | Make cookies readable from frontend
| JavaScript | mit | exacs/liqen-face,CommonActionForum/liqen-face,exacs/liqen-face,CommonActionForum/liqen-face |
71350691286647da41f69224c2c8ed68d55adde2 | index.js | index.js | module.exports = {
name: 'ember-mixpanel'
};
| module.exports = {
name: 'ember-mixpanel',
contentFor: function(type, config) {
if (type === 'mixpanel') {
return '<script type="text/javascript">(function(f,b){if(!b.__SV){var a,e,i,g;window.mixpanel=b;b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]... | Include the Mixpanel snippet using content-for | Include the Mixpanel snippet using content-for
| JavaScript | mit | minichate/ember-mixpanel |
171f82bea7710fa0c1f86298ec8761c08c05104c | app/ssr.js | app/ssr.js | const React = require('react')
const { renderToString, renderToStaticMarkup } = require('react-dom/server')
const App = require('./components/app')
const Page = require('./components/page')
module.exports = function ssr ({ webpackStats, content }) {
const assets = Object.keys(webpackStats.compilation.assets)
const... | const React = require('react')
const { renderToString, renderToStaticMarkup } = require('react-dom/server')
const App = require('./components/app')
const Page = require('./components/page')
module.exports = function ssr ({ webpackStats, content, path }) {
const assets = Object.keys(webpackStats.compilation.assets)
... | Attach file path to page props | Attach file path to page props
| JavaScript | mit | dereklieu/formation |
47b901fe1d837cb17ca0b68f7d0e733a1ecc30f9 | index.js | index.js | var robotjs = require('./build/Release/robotjs.node');
module.exports = robotjs;
module.exports.screen = {};
function bitmap (width, height, byteWidth, bitsPerPixel, bytesPerPixel, image)
{
this.width = width;
this.height = height;
this.byteWidth = byteWidth;
this.bitsPerPixel = bitsPerPixel;
this.bytesP... | var robotjs = require('./build/Release/robotjs.node');
module.exports = robotjs;
module.exports.screen = {};
function bitmap (width, height, byteWidth, bitsPerPixel, bytesPerPixel, image)
{
this.width = width;
this.height = height;
this.byteWidth = byteWidth;
this.bitsPerPixel = bitsPerPixel;
th... | Use tabs instead of spaces. | Use tabs instead of spaces.
| JavaScript | mit | hristoterezov/robotjs,octalmage/robotjs,BHamrick1/robotjs,BHamrick1/robotjs,BHamrick1/robotjs,octalmage/robotjs,hristoterezov/robotjs,octalmage/robotjs,hristoterezov/robotjs,BHamrick1/robotjs,octalmage/robotjs,hristoterezov/robotjs |
4e7cd79272a987acec4e43e5bb1ce4ae39412c21 | schema/ping.js | schema/ping.js | import gravity from '../lib/apis/gravity'; // Uncached
import {
GraphQLObjectType,
GraphQLString,
} from 'graphql';
const PingType = new GraphQLObjectType({
name: 'Ping',
description: 'System ping',
fields: {
ping: {
type: GraphQLString,
description: 'Is the system up or down?',
},
},
}... | import gravity from '../lib/apis/gravity'; // Uncached
import {
GraphQLObjectType,
GraphQLString,
} from 'graphql';
const PingType = new GraphQLObjectType({
name: 'Ping',
description: 'System ping',
fields: {
ping: {
type: GraphQLString,
description: 'Is the system up or down?',
},
},
}... | Update to pull out `body` | Update to pull out `body`
| JavaScript | mit | mzikherman/metaphysics-1,mzikherman/metaphysics-1,craigspaeth/metaphysics,craigspaeth/metaphysics,artsy/metaphysics,1aurabrown/metaphysics,mzikherman/metaphysics-1,artsy/metaphysics,artsy/metaphysics,mzikherman/metaphysics-1,broskoski/metaphysics |
281e036462cb79b443ee971ca42692b8f5633a6f | index.js | index.js | /*
Name: planetos - index.js
Source & docs: https://github.com/fvdm/nodejs-planetos
Feedback: https://github.com/fvdm/nodejs-planetos/issues
License: Unlicense (public domain)
*/
var httpreq = require ('httpreq');
var config = {};
/**
* Get dataset endpoints
*
* @callback callback
* @para... | /*
Name: planetos - index.js
Source & docs: https://github.com/fvdm/nodejs-planetos
Feedback: https://github.com/fvdm/nodejs-planetos/issues
License: Unlicense (public domain)
*/
var httpreq = require ('httpreq');
var config = {};
/**
* Get dataset endpoints
*
* @callback callback
* @para... | Set default API endpoint in config | Set default API endpoint in config | JavaScript | unlicense | fvdm/nodejs-planetos |
e2ae8242e093eee29c5babecb9dfeab61ca40ebf | index.js | index.js | require('./env');
var mount = require('koa-mount');
var koa = require('koa');
var app = koa();
app.use(require('koa-logger')());
app.use(require('koa-bodyparser')());
app.use(function *(next) {
if (typeof this.request.body === 'undefined' || this.request.body === null) {
this.request.body = {};
}
yield next;... | require('./env');
var mount = require('koa-mount');
var koa = require('koa');
var app = koa();
app.use(require('koa-logger')());
app.use(require('koa-bodyparser')());
app.use(function *(next) {
if (typeof this.request.body === 'undefined' || this.request.body === null) {
this.request.body = {};
}
yield next;... | Move static to the front | Move static to the front
| JavaScript | mit | luin/doclab,luin/doclab |
b3adf6960a4590f4ac2743fd4cdb72dce188e090 | index.js | index.js | const { TouchBar } = require('electron');
const { TouchBarButton } = TouchBar;
if (TouchBar) {
const buttons = [new TouchBarButton({
label: `Click me`.toUpperCase(),
click: () => {
console.log('clicked')
}
})]
exports.onWindow = (win) => {
win.setTouchBar(new TouchBar(buttons));
}
}
| const { TouchBar } = require('electron').remote;
const { TouchBarButton } = TouchBar;
const button = new TouchBarButton({
label: `🦄 Click me`,
click: () => {
console.log('TouchBarButton was clicked');
}
});
exports.onWindow = (win) => {
win.setTouchBar(new TouchBar([button]));
}
| Change API for Hyper with Electron v1.6.3 | Change API for Hyper with Electron v1.6.3
| JavaScript | mit | paulgrock/hyper-touch |
52a17d77f79212b4cdefda0fea37d8a6a79a47d4 | index.js | index.js | 'use strict';
function getFileExtension(path) {
return path.split('.').pop();
}
module.exports = function base64ImageLoader(content) {
this.cacheable && this.cacheable();
return `module.exports = "data:image/${getFileExtension(this.resourcePath)};base64,${content.toString('base64')}"`;
};
module.expor... | 'use strict';
function getMime(path) {
var extension = path.split('.').pop();
if (['svg', 'jpg', 'jpeg', 'webp', 'gif', 'png'].indexOf(extension) === -1) {
throw new Error('Unsupported type of image');
}
if (extension == 'svg') {
return 'image/svg+xml';
}
if (extension == 'jpg') {... | Fix jpeg and svg mime types | Fix jpeg and svg mime types | JavaScript | mit | jahredhope/base64-image-loader |
2d5da05152d4106d386da3953c2797811d5a30b8 | index.js | index.js | 'use strict';
var micromatch = require('micromatch');
var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) {
if (!Array.isArray(criteria)) { criteria = [criteria]; }
if (arguments.length === 1) { return anymatch.bind(null, criteria); }
var string = Array.isArray(value) ? value[0] : value;... | 'use strict';
var micromatch = require('micromatch');
var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) {
if (!Array.isArray(criteria)) { criteria = [criteria]; }
if (arguments.length === 1) {
return criteria.length === 1 ?
micromatch.matcher(criteria[0]) : anymatch.bind(null, ... | Optimize with micromatch.matcher when possible | Optimize with micromatch.matcher when possible
| JavaScript | isc | es128/anymatch,floatdrop/anymatch |
2bd414f061998c48a5725ca899e16d484157410f | index.js | index.js | /**
* Returns a function, that, when invoked, will only be triggered at most once during a given window of time.
*
* @param {Number} wait milliseconds to wait before allowing another invokation.
* @param {Number} fn target function to invoke.
* @return {Function} Throttled function.
* @api public
*/
module.expor... | /**
* Module exports
*/
module.exports = throttle
module.exports.debounce = debounce
/**
* Returns a function, that, when invoked, will only be triggered at most once during a given window of time.
*
* @param {Number} func target function to invoke.
* @param {Number} wait milliseconds to wait before allowing ano... | Clone underscore implementation for now. | Clone underscore implementation for now.
| JavaScript | mit | npmcomponent/timoxley-throttle,timoxley/throttle |
6b868ff71a11f19b928e18fa8437fdd3dfe3691f | rules/enum.casing.js | rules/enum.casing.js | const { visit, getLocation } = require('graphql/language');
const { upperCase } = require('lodash');
const getMessage = (text, node) => {
const message = `Property '${node.name
.value}' has invalidly cased values. Please uppercase them.`;
const location = getLocation({ body: text }, node.name.loc.start);
re... | const { visit, getLocation } = require('graphql/language');
const { toUpper } = require('lodash');
const getMessage = (text, node) => {
const message = `Property '${node.name
.value}' has invalidly cased values. Please uppercase them.`;
const location = getLocation({ body: text }, node.name.loc.start);
retu... | Allow underscores in enum values | Proposal: Allow underscores in enum values
Lodash's `upperCase` method will convert all underscores to spaces. So, an enum value of "NOT_CERTIFIED" will get changed to "NOT CERTIFIED" which will not match and cause the lint check to fail. Alternatively, if we use the `toUpper` method, the underscores will be preserved... | JavaScript | mit | happylinks/gqlint |
0853a6baeb91b2c3f602058fd7ab6b5ba9219f36 | script/build-data.js | script/build-data.js | 'use strict';
/* Dependencies. */
var fs = require('fs');
var path = require('path');
var gemoji = require('gemoji').name;
var toJSON = require('plain-text-data-to-json');
/* Read. */
var faces = toJSON(fs.readFileSync('faces.txt', 'utf8'));
/* Manipulate. */
faces = Object.keys(faces).sort().map(function (name) {
... | 'use strict';
/* Dependencies. */
var fs = require('fs');
var path = require('path');
var gemoji = require('gemoji').name;
var toJSON = require('plain-text-data-to-json');
/* Read. */
var faces = toJSON(fs.readFileSync('faces.txt', 'utf8'));
var all = [];
var unclassified = ['🤖'];
/* Manipulate. */
faces = Object.k... | Add build check to ensure all faces are included in lib | Add build check to ensure all faces are included in lib
| JavaScript | mit | wooorm/emoji-emotion |
ee5782012a7c70911e3e3a691a9fe860b969b08c | frontend/interfaces/icepick.js | frontend/interfaces/icepick.js | type Key = string | number;
type Value = any;
declare module icepick {
declare function getIn<O:Object, K:Key, V:Value>(object: ?O, path: Array<K>): ?V;
declare function setIn<O:Object, K:Key, V:Value>(object: O, path: Array<K>, value: V): O;
declare function updateIn<O:Object, K:Key, V:Value>(object: O, p... | type Key = string | number;
type Value = any;
declare module icepick {
declare function getIn<O:Object, K:Key, V:Value>(object: ?O, path: Array<K>): ?V;
declare function setIn<O:Object, K:Key, V:Value>(object: O, path: Array<K>, value: V): O;
declare function updateIn<O:Object, K:Key, V:Value>(object: O, p... | Remove extra Underscore flow declaration | Remove extra Underscore flow declaration | JavaScript | agpl-3.0 | blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase |
60001c03353d9558783f121ed762b68a33c906b5 | src/main/webapp/components/BuilderGrid.js | src/main/webapp/components/BuilderGrid.js | import * as React from "react";
/**
* Component used as an indicator for build status.
* Statuses are differentiated by alternative
* styling rules.
* @param props.status the build status. Partially determines
* the styling of the rules.
*/
const StatusIndicator = (props) => {
const className = 'indicator #'.r... | import * as React from "react";
import {getField} from "./utils/getField";
/**
* Component used as an indicator for build status.
* Statuses are differentiated by alternative
* styling rules.
* @param props.status the build status. Partially determines
* the styling of the rules.
*/
const StatusIndicator = (props... | Replace direct use of props.builders with indirect variable for type security | Replace direct use of props.builders with indirect variable for type security
| JavaScript | apache-2.0 | googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020 |
fec9bc801a70d10d71d3acdb412b5fbe1072f5fd | gdbase-client/gdbase-client.js | gdbase-client/gdbase-client.js | //GDBase client tool
//Usage: node gdbase-client.js command --specie <SPECIE> --assembly <ASSEMBLY> --dataset <DATASET>
//Import dependencies
var getArgs = require('get-args');
//Source datasets
var source = require('./source.json');
//Get the command line args
var args = getArgs();
//Check the command
if(args.comm... | //GDBase client tool
//Usage: node gdbase-client.js command --specie <SPECIE> --assembly <ASSEMBLY> --dataset <DATASET>
//Import dependencies
var getArgs = require('get-args');
//Get the command line args
var args = getArgs();
//Check the command
if(args.command === ''){ return console.error('No command provided...'... | Update gdbase client main script | Update gdbase client main script
| JavaScript | mit | nodebio/gdbase |
a6fe0e2349d8a555c986e0bd0222b67117419a0a | app.js | app.js | var express = require("express");
var app = express();
app.use(express.static(__dirname + '/views'));
//Store all HTML files in view folder.
app.use(express.static(__dirname + '/scripts'));
//Store all JS and CSS in Scripts folder.
app.get('/',function(req,res){
res.sendFile('index.html');
//It will find and l... | // var express = require("express");
// var app = express();
// app.use(express.static(__dirname + '/views'));
// //Store all HTML files in view folder.
// app.use(express.static(__dirname + '/scripts'));
// //Store all JS and CSS in Scripts folder.
// app.get('/',function(req,res){
// res.sendFile('index.html')... | Create routes file to contain all routes | Create routes file to contain all routes
| JavaScript | mit | amyhliao/photoApp,amyhliao/photoApp |
f18e11af3b5c59c476b0a355789c4eaf5f262ef6 | webpack.config.production.js | webpack.config.production.js | var Clean = require('clean-webpack-plugin'),
webpack = require('webpack'),
webpackConfig = require('webpack-config');
var config = webpackConfig.fromCwd().merge({
output: {
filename: 'videojs.concurrency.min.js'
}
});
config.plugins = [
new Clean([
'build'... | var Clean = require('clean-webpack-plugin'),
webpack = require('webpack'),
webpackConfig = require('webpack-config');
var config = webpackConfig.fromCwd().merge({
output: {
filename: 'videojs.concurrency.min.js'
}
});
config.plugins = [
new Clean([
'build'... | Remove comments from minified version. | chore(webpack): Remove comments from minified version.
| JavaScript | mit | chemoish/videojs-concurrency,chemoish/videojs-concurrency |
e6abeb89b33fd968b802c0d2833a2517b1898355 | webpack.production.config.js | webpack.production.config.js | const config = require('./webpack.config.js');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
config.devtool = 'cheap-module-source-map';
// Set environment to production
config.plugins.push(new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringi... | const config = require('./webpack.config.js');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
config.devtool = 'cheap-module-source-map';
// Set environment to production
config.plugins.push(new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringi... | Enable source maps in production | Enable source maps in production
| JavaScript | mit | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 |
ea1e7148f51c23552458ecd2b281265f8b7f9418 | backend/src/models/User.js | backend/src/models/User.js | const mongo = require('../db')
const utils = require('../utils')
const crypto = require('crypto')
/**
* User :: {
* id: String,
* username: String,
* password: String,
* createdAt: String
* }
*/
/** String -> String -> User */
function createUser(username, password) {
return {
"id": uti... | const mongo = require('../db')
const utils = require('../utils')
const crypto = require('crypto')
/**
* User :: {
* id: String,
* username: String,
* password: String,
* createdAt: String
* }
*/
/** String -> String -> User */
function createUser(username, password) {
return {
"id": uti... | Add missing return statement to model user | Add missing return statement to model user
| JavaScript | mit | 14Plumes/Hexode,14Plumes/Hexode,KtorZ/Hexode,KtorZ/Hexode,KtorZ/Hexode,14Plumes/Hexode |
d9af09e5ae6bf1aed5240cf79af602965bfe7dd1 | yubiadmin/static/js/table.js | yubiadmin/static/js/table.js | $(document).ready(function() {
$('#delete_btn').attr('disabled', 'disabled');
$('#toggle_all').change(function() {
$('tbody :checkbox').prop('checked', $(this).is(':checked'));
});
$(':checkbox').change(function() {
if($('tbody :checkbox:checked').length > 0) {
console.log('enable');
$('#delete_btn').re... | $(document).ready(function() {
$('#delete_btn').attr('disabled', 'disabled');
$('#toggle_all').change(function() {
$('tbody :checkbox').prop('checked', $(this).is(':checked'));
});
$(':checkbox').change(function() {
if($('tbody :checkbox:checked').length > 0) {
$('#delete_btn').removeAttr('disabled');
} ... | Check for checked boxes on load. | Check for checked boxes on load.
| JavaScript | bsd-2-clause | Yubico/yubiadmin,Yubico/yubiadmin,Yubico/yubiadmin |
0956845b4fe689165e4eae45a2f96c428ae02f05 | src/components/video_list_item.js | src/components/video_list_item.js | import React from 'react';
const VideoListItem = (props) => {
return <li>Video</li>
};
export default VideoListItem;
| import React from 'react';
const VideoListItem = ({video}) => {
const imageUrl = video.snippet.thumbnails.default.url;
return (
<li className="list-group-item">
<div className="video-list media">
<div className="media-left">
<img className="media-object" src={imageUrl} />
</div>... | Add code to video list item component to display videos properly | Add code to video list item component to display videos properly
| JavaScript | mit | izabelka/redux-simple-starter,izabelka/redux-simple-starter |
0f7330ac11cfde892780e837c70842c820e7f32a | routers/download/constants.js | routers/download/constants.js | const ALLOWED_CSV_FIELD_PATHS = [
'ids.GB-CHC',
'ids.charityId',
'name',
'contact.email',
'contact.person',
'contact.postcode',
'contact.address',
'contact.geo.longitude',
'contact.geo.latitude',
]
module.exports = { ALLOWED_CSV_FIELD_PATHS }
| const ALLOWED_CSV_FIELD_PATHS = [
'ids.GB-CHC',
'ids.charityId',
'name',
'contact.email',
'contact.person',
'contact.postcode',
'contact.address',
'contact.geo.longitude',
'contact.geo.latitude',
'people.volunteers',
'people.employees',
'people.trustees',
'activities',
'website',
'income.l... | Add to allowed fields for download | Add to allowed fields for download
| JavaScript | mit | tythe-org/charity-base-api,tithebarn/charity-base,tithebarn/open-charities |
510d2538b0c957b280fd10c8d1fbb269f6b7feb4 | public/javascripts/app/views/projectsView.js | public/javascripts/app/views/projectsView.js | define([
'Backbone',
//Collection
'app/collections/projects',
//Views
'app/views/projectsController',
//Templates
'text!templates/home/loginTemplate.html',
], function(
Backbone,
//Collection
Projects,
//views
projectsController,
//Template
loginTemplate
){
var ProjectsView = Back... | define([
'Backbone',
//Collection
'app/collections/projects',
//Views
'app/views/projectsController',
//Templates
'text!templates/home/loginTemplate.html',
], function(
Backbone,
//Collection
Projects,
//views
projectsController,
//Template
loginTemplate
){
var ProjectsView = Back... | Send router to projects view | Send router to projects view
| JavaScript | mit | tangosource/pokerestimate,tangosource/pokerestimate |
03b80870ab4b27f32898babf1e8dfc70f61031d2 | bin.js | bin.js | #!/usr/bin/env node
'use strict'
const Repl = require('./index.js')
const printPrompt = () => process.stdout.write('> ')
console.log('Welcome to the Solidity REPL!')
printPrompt()
let repl = Repl()
process.stdin.resume()
process.stdin.setEncoding('utf8')
process.stdin.on('data', command => {
if (command === 'qu... | #!/usr/bin/env node
'use strict'
const Repl = require('./index.js')
const printPrompt = () => process.stdout.write('> ')
/** Remove line numbers from error messages.*/
const cleanError = message => message.match(/:\d+:\d+: (.*)/)[1]
console.log('Welcome to the Solidity REPL!')
printPrompt()
let repl = Repl()
proc... | Remove line numbers from error messages. | Remove line numbers from error messages.
| JavaScript | isc | raineorshine/solidity-repl,raineorshine/solidity-repl |
e544189ad398c515301fc6583baa339bf185876a | site/loadMetadata.js | site/loadMetadata.js | import { setMetadata } from './actions/metadata'
function _loadMetadata(store) {
const songRequire = require.context('../songs/', true, /(info|song|package)\.json$/)
const metaData = songRequire('./info.json')
metaData.songs = {}
songRequire.keys().forEach(name => {
const parts = name.split('/')
const ... | import { setMetadata } from './actions/metadata'
function _loadMetadata(store) {
const songRequire = require.context('../songs/', true, /(info|song|package)\.json$/)
const metaData = songRequire('./info.json')
metaData.songs = {}
songRequire.keys().forEach(name => {
const parts = name.split('/')
const ... | Fix location of song info metadata | Fix location of song info metadata
| JavaScript | mit | hacktunes/hacktunes,hacktunes/hacktunes |
553394e4b756626a93facd867ef99e06a44405ff | api-server/index.js | api-server/index.js | 'use strict';
const express = require('express');
const MsgQueueClient = require('msgqueue-client');
const mqServerConfig = require('../common/config/mqserver.js');
const config = require('./config.js');
const app = express();
const mq = new MsgQueueClient(`${mqServerConfig.url}:${mqServerConfig.port}`, { log: true ... | 'use strict';
const express = require('express');
const MsgQueueClient = require('msgqueue-client');
const mqServerConfig = require('../common/config/mqserver.js');
const config = require('./config.js');
const app = express();
const mq = new MsgQueueClient(`${mqServerConfig.url}:${mqServerConfig.port}`, { log: true ... | Change images REST get route | Change images REST get route
| JavaScript | mit | jaredscheib/tagasauris,jaredscheib/tagasauris |
c7580d9f518aa4e4d851543a13e30d48e0ed90c9 | server/ai-request.js | server/ai-request.js | // API.AI REQUST
// =============================================================================
var request = require('request')
function aiRequest(postURL, accessToken, sessionId, message) {
request
.post({
url: postURL,
headers: {
'Content-Type': 'application/jso... | // API.AI REQUST
// =============================================================================
var request = require('request')
function aiRequest(postURL, accessToken, sessionId, message) {
request
.post({
url: postURL,
headers: {
'Content-Type': 'application/jso... | Clean up console log message | Clean up console log message
| JavaScript | mit | andersberg/the-butler,andersberg/the-butler |
e49b8a461110f1001c3c6a4de78a551c08980c5f | javascripts/plus_extension.js | javascripts/plus_extension.js | function getParams() {
var raw_params = document.URL.replace(document.baseURI + '?', ''),
params = {};
$.each(raw_params.split(/&/g), function() {
var slice = this.split(/=/);
params[slice[0]] = slice[1];
});
return params;
}
$(function() {
var params = getParams();
$(".n-Nd").trigger('cli... | function getParams() {
var raw_params = document.URL.replace(document.baseURI + '?', ''),
params = {};
$.each(raw_params.split(/&/g), function() {
var slice = this.split(/=/);
params[slice[0]] = slice[1];
});
return params;
}
$(function() {
var params = getParams();
$(".n-Nd").trigger('cli... | Fix div id. Google makes it dinamic | Fix div id. Google makes it dinamic
| JavaScript | mit | felipeelias/reader_to_plus |
170812bc0b944f3e260e6c38419daf7c06edddf1 | web/root/js/main.js | web/root/js/main.js | var ws = new WebSocket("ws://localhost:8081/"),
messageList = document.getElementById("messageList");
ws.onopen = function(ev) {
console.log('Connection opened.');
}
ws.onclose = function(ev) {
console.log('Connection closed.');
}
ws.onerror = function(ev) {
console.log('Error: '+ev);
}
ws.onmessage = function(ev... | var ws = new WebSocket("ws://localhost:8081/"),
messageList = document.getElementById("messageList");
ws.onopen = function(ev) {
console.log('Connection opened.');
}
ws.onclose = function(ev) {
console.log('Connection closed.');
}
ws.onerror = function(ev) {
console.log('Error: '+ev);
}
ws.onmessage = function(ev... | Remove paragraph for less space | Remove paragraph for less space
| JavaScript | mit | louismerlin/discugo,louismerlin/discugo,louismerlin/discugo |
740cb24c36a8100f599b657d8244294f00e3bbbd | src/rules/color-hex-notation/index.js | src/rules/color-hex-notation/index.js | import {
report,
ruleMessages,
styleSearch
} from "../../utils"
export const ruleName = "color-hex-notation"
export const messages = ruleMessages(ruleName, {
expected: (c, h) => `Expected ${c} hex color ${h}`,
})
/**
* @param {"single"|"double"} expectation
*/
export default function (expectation) {
retu... | import {
report,
ruleMessages,
styleSearch
} from "../../utils"
export const ruleName = "color-hex-notation"
export const messages = ruleMessages(ruleName, {
expected: (c, h) => `Expected ${c} hex color ${h}`,
})
/**
* @param {"lowercase"|"uppercase"} expectation
*/
export default function (expectation) {
... | Use correct params in jsdoc | Use correct params in jsdoc
| JavaScript | mit | heatwaveo8/stylelint,m-allanson/stylelint,stylelint/stylelint,stylelint/stylelint,gucong3000/stylelint,heatwaveo8/stylelint,hudochenkov/stylelint,teryaew/stylelint,stylelint/stylelint,stylelint/stylelint,heatwaveo8/stylelint,MadLittleMods/stylelint,mahtd/stylelint,evilebottnawi/stylelint,gaidarenko/stylelint,gucong3000... |
8a2556751885e5f917f23dbb76987d81ceeee4a3 | src/Stripes.js | src/Stripes.js | import { isVersionCompatible } from './discoverServices';
class Stripes {
constructor(properties) {
const logger = properties.logger;
Object.assign(this, properties);
this.hasPerm = (perm) => {
if (this.config && this.config.hasAllPerms) {
logger.log('perm', `assuming perm '${perm}': hasAl... | import { isVersionCompatible } from './discoverServices';
class Stripes {
constructor(properties) {
console.log('new stripes');
Object.assign(this, properties);
}
hasPerm(perm) {
const logger = this.logger;
if (this.config && this.config.hasAllPerms) {
logger.log('perm', `assuming perm '${... | Move hasPerm and hasInterfce out of constructor into own methods | Move hasPerm and hasInterfce out of constructor into own methods
| JavaScript | apache-2.0 | folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core |
46f9f3a6dc25a381c0d1d6ad2512b7f6b69e645d | gulp/tasks/scripts.js | gulp/tasks/scripts.js | const browserify = require('browserify');
const watchify = require('watchify');
const gulp = require('gulp');
const $ = require('gulp-load-plugins')();
const config = require('../config');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
let bundler = browserify(config.scripts.sou... | const browserify = require('browserify');
const watchify = require('watchify');
const gulp = require('gulp');
const $ = require('gulp-load-plugins')();
const config = require('../config');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
let bundler = browserify(config.scripts.sou... | Add gulp status on script build | Add gulp status on script build
| JavaScript | mit | Dramloc/angular-material-boilerplate,Dramloc/angular-material-boilerplate |
5e7a4de68f2e2f2f944c096783c57bd256218309 | src/getAdminLayers.js | src/getAdminLayers.js | /* Look up which admin fields should be populated for a record in a given layer.
*
* The logic is: look up eveything above in the WOF heirarchy, ignoring things like
* 'dependency'
*
* Note: this filtering really only matters for geonames currently, since OSM and OA
* consist entirely of venue and address records... | /* Look up which admin fields should be populated for a record in a given layer.
*
* The logic is: look up eveything above in the WOF heirarchy, ignoring things like
* 'dependency'
*
* Note: this filtering really only matters for geonames currently, since OSM and OA
* consist entirely of venue and address records... | Remove borough from locality lookup | Remove borough from locality lookup
We may have gotten overeager adding borough everywhere, it's definitely
below locality in the heirarchy.
| JavaScript | mit | tadjik1/wof-admin-lookup,tadjik1/wof-admin-lookup |
b9a76051f9654166083af2224a589900df86ed4e | lib/accounts-config.js | lib/accounts-config.js | orion.users.configure({
// Allow users to create accounts, but don't give them any admin permissions
forbidClientAccountCreation: false,
defaultPermissions: ['files.upload', 'entity.dreams.personal', 'entity.recipes.personal', 'entity.activities.personal'],
// Set home route path to root (user is redirected he... | orion.users.configure({
// Allow users to create accounts, but don't give them any admin permissions
forbidClientAccountCreation: false,
defaultPermissions: ['files.upload', 'entity.dreams.personal', 'entity.recipes.personal', 'entity.activities.personal'],
// Enable password reset
showForgotPasswordLink: tr... | Enable email verification and password reset | Enable email verification and password reset
| JavaScript | apache-2.0 | GeoMakers/geomakers.org,GeoMakers/geomakers.org |
411c61d51d022d0a0c3c7a7e193be07417ee9b67 | src/db/connection.js | src/db/connection.js | /**
* Created by javascript on 24/09/2016.
*/
const mongoose = require('mongoose');
// Create the database connection
mongoose.connect(process.env.MONGO_DB_URL);
// CONNECTION EVENTS
// When successfully connected
mongoose.connection.on('connected', function () {
console.log('Mongoose connection open to ' + pr... | /**
* Created by javascript on 24/09/2016.
*/
const mongoose = require('mongoose');
mongoose.Promise = global.Promise;
// Create the database connection
mongoose.connect(process.env.MONGO_DB_URL, { useMongoClient: true });
// CONNECTION EVENTS
// When successfully connected
mongoose.connection.on('connected', () ... | FIX - MongoDB warning msgs | FIX - MongoDB warning msgs
| JavaScript | apache-2.0 | fkanout/NotifyDrive-API |
e5ed628534255f6ea3dc473a51d7b3556dcf8cf1 | source/js/txt.wav.js | source/js/txt.wav.js | (function() {
var textWaveElements = document.getElementsByClassName('txtwav');
for (var i = 0, length = textWaveElements.length; i < length; i++) {
var el = textWaveElements[i];
var text = el.textContent.trim();
el.innerHTML = null;
spanWrapHelper(el, text);
}
function spanWrapHelper(el, tex... | (function() {
var textWaveElements = document.getElementsByClassName('txtwav');
for (var i = 0, length = textWaveElements.length; i < length; i++) {
var el = textWaveElements[i],
text = el.textContent.trim();
el.innerHTML = null;
spanWrapHelper(el, text);
}
function spanWrapHelper(el, text)... | Remove repetition in helper function | Remove repetition in helper function | JavaScript | mit | still-life-studio/txt.wav |
e01286d25a0448e9b31dedb473c77afa889a41d5 | server/handlers/logoutUserHandler.js | server/handlers/logoutUserHandler.js | /**
* Created by Omnius on 6/26/16.
*/
'use strict';
const retrieveFromToken = require(process.cwd() + '/server/helpers/hkdfTokenGenerator').retrieveFromToken;
module.exports = () => {
return (request, reply) => {
const server = request.server;
const redis = request.redis;
const dao = ... | /**
* Created by Omnius on 6/26/16.
*/
'use strict';
const retrieveFromToken = require(process.cwd() + '/server/helpers/hkdfTokenGenerator').retrieveFromToken;
module.exports = () => {
return (request, reply) => {
const server = request.server;
const redis = request.redis;
const dao = ... | Add redirect to login page for when cookie is not found on logout | Add redirect to login page for when cookie is not found on logout
| JavaScript | mit | identityclash/hapi-login-test,identityclash/hapi-login-test |
34370bb0875ed9e13b7f4510a606eee898f0007e | src/js/game.js | src/js/game.js | (function() {
'use strict';
function Game() {
this.player = null;
}
Game.prototype = {
create: function () {
var x = this.game.width / 2
, y = this.game.height / 2;
this.player = this.add.sprite(x, y, 'player');
this.player.anchor.setTo(0.5, 0.5);
},
update: functi... | (function() {
'use strict';
function Game() {
this.player = null;
this.cursors = null;
}
Game.prototype = {
create: function () {
this.game.world.setBounds(0,0, 1280, 940);
this.background = this.add.sprite(0,0, 'background');
var x = this.game.width / 2
, y = this.game... | Add controls for moving player and make camera follow | Add controls for moving player and make camera follow
| JavaScript | mit | werme/DATX02 |
8a6b5a67ac4d9662f9aed8e2e47ee3bb95aa5795 | lib/helpers/helpers.js | lib/helpers/helpers.js | /**
* Created by JiaHao on 5/10/15.
*/
var os = require('os');
var sift = require('sift-string');
function platformIsWindows() {
var platform = os.platform();
return platform.indexOf('win') > -1;
}
// String difference threshold while checking if two DOM is similiar
const DOM_DIFFERENCE_THRESHOLD = 5;
/**... | /**
* Created by JiaHao on 5/10/15.
*/
var os = require('os');
var sift = require('sift-string');
function platformIsWindows() {
var platform = os.platform();
return platform.indexOf('win') > -1;
}
// String difference threshold while checking if two DOM is similiar
const DOM_DIFFERENCE_THRESHOLD = 5;
/**... | Add helper to change array of cookie objects into a header string | Add helper to change array of cookie objects into a header string
| JavaScript | mit | jiahaog/Revenant |
4066892bbe34205fcf0a92dd86096fe849ea017a | app/models/account.js | app/models/account.js | import DS from 'ember-data';
export default DS.Model.extend({
email: DS.attr(),
following: DS.attr(),
favorites: DS.attr(),
pins: DS.attr()
});
| import DS from 'ember-data';
export default DS.Model.extend({
email: DS.attr(),
following: DS.attr('array', {defaultValue: []}),
favorites: DS.attr('array', {defaultValue: []}),
pins: DS.attr('array', {defaultValue: []})
});
| Set default values for Account | Set default values for Account
| JavaScript | mit | stevenwu/hacker-news |
4dd9c045f531b6b8678d2b612646f68e62877fb0 | src/js/core/async.js | src/js/core/async.js | define('summernote/core/async', function () {
/**
* Async functions which returns `Promise`
*/
var async = (function () {
/**
* read contents of file as representing URL
*
* @param {File} file
* @return {Promise} - then: sDataUrl
*/
var readFileAsDataURL = function (file) {
... | define('summernote/core/async', function () {
/**
* Async functions which returns `Promise`
*/
var async = (function () {
/**
* read contents of file as representing URL
*
* @param {File} file
* @return {Promise} - then: sDataUrl
*/
var readFileAsDataURL = function (file) {
... | Remove the opposite event when image loading completes or fails . | Remove the opposite event when image loading completes or fails .
| JavaScript | mit | summernote/summernote,bebeeteam/summernote,summernote/summernote,AshDevFr/winternote,summernote/summernote,AshDevFr/winternote,bebeeteam/summernote,bebeeteam/summernote,AshDevFr/winternote |
3cc8f7edd3221353211098768e51e030046a2866 | test/reducers/example-reducer.test.js | test/reducers/example-reducer.test.js | import exampleReducer from "../../src/reducers/example-reducer";
describe("exampleReducer", () => {
test("initial state", () => {
expect(exampleReducer(undefined, {})).toEqual({example: ""});
});
});
| import * as actionTypes from "../../src/actions/types";
import exampleReducer from "../../src/reducers/example-reducer";
describe("exampleReducer", () => {
test("initial state", () => {
expect(exampleReducer(undefined, {})).toEqual({example: ""});
});
test ("when action type is EXAMPLE_ACTION", () => {
... | Test exampleReducer when action type is EXAMPLE_ACTION | Test exampleReducer when action type is EXAMPLE_ACTION
| JavaScript | mit | tiere/react-starter,tiere/react-starter |
1699faaa312324f4df8033164d5814515e5817c6 | test/test_alexa_app_initialization.js | test/test_alexa_app_initialization.js | /*jshint expr: true*/
"use strict";
var fs = require("fs");
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
var expect = chai.expect;
chai.config.includeStack = true;
import * as Alexa from '..'
describe("Alexa", function() {
describe("app", function() {
v... | /*jshint expr: true*/
"use strict";
var fs = require("fs");
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
var expect = chai.expect;
chai.config.includeStack = true;
import * as Alexa from '..'
describe("Alexa", function() {
describe("app", function() {
v... | Test - apps without a name are allowed too! | Test - apps without a name are allowed too!
| JavaScript | mit | fremail/alexa-app,fremail/alexa-app,alexa-js/alexa-app,alexa-js/alexa-app,matt-kruse/alexa-app,alexa-js/alexa-app,matt-kruse/alexa-app,matt-kruse/alexa-app,fremail/alexa-app |
fac9c672af279e862a84e3360a19ce739f205590 | src/expire/expire.js | src/expire/expire.js | window.onload = () => setTimeout(async () => await load());
async function load() {
chrome.windows.getCurrent({}, thisWindow => {
chrome.windows.update(thisWindow.id, { focused: true });
});
let phase = await BackgroundClient.getPhase();
let settings = await BackgroundClient.getSettings();
let start = ... | window.onload = () => setTimeout(async () => await load());
async function load() {
chrome.windows.getCurrent({}, thisWindow => {
chrome.windows.update(thisWindow.id, { focused: true });
});
let phase = await BackgroundClient.getPhase();
let settings = await BackgroundClient.getSettings();
let start = ... | Add short/long designation to expiration page subtitle. | Add short/long designation to expiration page subtitle.
| JavaScript | mit | schmich/marinara,schmich/marinara,schmich/marinara |
74f6fcf053c7dd27c87b7af2186244bd7742d68b | app/lib/RelayPreloader.js | app/lib/RelayPreloader.js | import Relay from 'react-relay';
import fromGraphQL from 'react-relay/lib/fromGraphQL';
const QUERIES = {
"organization/show": Relay.QL`
query PipelinesList($organization: ID!, $teamsCount: Int!) {
organization(slug: $organization) {
id
slug
name
teams(first: $teamsCount) {
... | import Relay from 'react-relay';
import fromGraphQL from 'react-relay/lib/fromGraphQL';
const QUERIES = {
"organization/show": Relay.QL`
query PipelinesList($organization: ID!, $teamsCount: Int!) {
organization(slug: $organization) {
id
slug
name
teams(first: $teamsCount) {
... | Add preloader queries for navigation | Add preloader queries for navigation
| JavaScript | mit | buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend |
f6d9b6a89de32030177d51c07824a611d4b4455c | src/reducers/index.js | src/reducers/index.js | import { combineReducers } from 'redux';
import NavigationReducer from './NavigationReducer';
import SyncReducer from './SyncReducer';
import { PagesReducer } from './PagesReducer';
import { ModulesReducer } from './ModulesReducer';
import { UserReducer } from './UserReducer';
import { PrescriptionReducer } from './Pre... | import { combineReducers } from 'redux';
import NavigationReducer from './NavigationReducer';
import SyncReducer from './SyncReducer';
import { PagesReducer } from './PagesReducer';
import { ModulesReducer } from './ModulesReducer';
import { UserReducer } from './UserReducer';
import { PrescriptionReducer } from './Pre... | Add FormReducer to redux reducers | Add FormReducer to redux reducers
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile |
2e942706da440899b2c03d419ea02f9aac66a4af | truffle.js | truffle.js | module.exports = {
build: "webpack",
deploy: [
"Conference"
],
rpc: {
host: "localhost",
port: 8545
}
};
| module.exports = {
build: "webpack",
// networks: {
// "live": {
// network_id: 1 // Ethereum public network
// },
// "morden": {
// network_id: 2 // Official Ethereum test network
// },
// "development": {
// network_id: "default"
// }
// },
rpc: {
host: "localho... | Disable networks (not working for testnet) | Disable networks (not working for testnet) | JavaScript | mit | makoto/blockparty,makoto/blockparty |
12c6e4c8957b3314438d5e8fde74674ca1031d8e | app/templates/src/name.js | app/templates/src/name.js | (function(bespoke) {
bespoke.plugins.<%= pluginNameCamelized %> = function(deck) {
/*
Interact with the deck
https://github.com/markdalgleish/bespoke.js#deck-instances
*/
deck.next();
deck.prev();
deck.slide(0);
/*
Handle events
https://github.com/markdalgleish/bes... | bespoke.plugins.<%= pluginNameCamelized %> = function(deck) {
/*
Interact with the deck
https://github.com/markdalgleish/bespoke.js#deck-instances
*/
deck.next();
deck.prev();
deck.slide(0);
/*
Slide events
https://github.com/markdalgleish/bespoke.js#events
*/
deck.on('activate', fun... | Remove redundant IIFE, clean up comments | Remove redundant IIFE, clean up comments
| JavaScript | mit | bespokejs/generator-bespokeplugin,markdalgleish/generator-bespokeplugin,mbasanta/generator-bespokeplugin,mbasanta/generator-bespokeplugin |
8e9fb037c73057e0bd3693858fc1854f0525f6cf | lib/ext/promise/_array.js | lib/ext/promise/_array.js | // Used by promise extensions that are based on array extensions.
'use strict';
var callable = require('es5-ext/lib/Object/valid-callable')
, deferred = require('../../deferred')
module.exports = function (name, ext) {
deferred.extend(name, function (cb) {
var def;
(cb == null) || callable(cb);
if (!this.pe... | // Used by promise extensions that are based on array extensions.
'use strict';
var callable = require('es5-ext/lib/Object/valid-callable')
, deferred = require('../../deferred')
module.exports = function (name, ext) {
deferred.extend(name, function (cb) {
var def;
(cb == null) || callable(cb);
if (!this.pe... | Fix length of arguments in promise extensions | Fix length of arguments in promise extensions
| JavaScript | isc | medikoo/deferred |
a755f483a9dc3f0b6a04637be0550646b6e05f94 | src/helpers.js | src/helpers.js | const jsonic = require('jsonic');
const qs = require('qs');
/**
* Start a timer.
*
* @return {Array}
*/
exports.startTimer = function() {
return process.hrtime();
};
/**
* Stop the given timer and return elapsed time in milliseconds.
*
* @return {Number}
*/
exports.endTimer = function(start) {
const end =... | const jsonic = require('jsonic');
const qs = require('qs');
const trim = require('lodash/trim');
/**
* Start a timer.
*
* @return {Array}
*/
exports.startTimer = function() {
return process.hrtime();
};
/**
* Stop the given timer and return elapsed time in milliseconds.
*
* @return {Number}
*/
exports.endTi... | Trim quotes around the CLI argument. | Trim quotes around the CLI argument.
| JavaScript | mit | DFurnes/hey |
bb17f6833fbf6c77d02e8b09216d45194af1ea91 | src/model/clients.js | src/model/clients.js | import { Schema } from 'mongoose'
import { connectionAPI, connectionDefault } from '../config'
const ClientSchema = new Schema({
clientID: {
type: String, required: true, unique: true, index: true
},
clientDomain: {
type: String, unqiue: true, index: true
},
name: {
type: String, required: true
... | import { Schema } from 'mongoose'
import { connectionAPI, connectionDefault } from '../config'
const ClientSchema = new Schema({
clientID: {
type: String, required: true, unique: true, index: true
},
clientDomain: {
type: String, index: true
},
name: {
type: String, required: true
},
roles: ... | Remove misspelled field in Client Schema | Remove misspelled field in Client Schema
The client Domain field was intended to be unique, due to the misspelled
`unique` field this was not the case. The Client Domain field also does
not make sense to be unique as it's not required and multiple clients
could stem from one domain.
TRACE-126
| JavaScript | mpl-2.0 | jembi/openhim-core-js,jembi/openhim-core-js |
26f256596f5987844d45f070532cf4a6749c2c9b | src/auto-dist-tag.js | src/auto-dist-tag.js | 'use strict';
const fs = require('fs-extra');
const pkgUp = require('pkg-up');
const getDistTags = require('./fetch-dist-tags');
const calcDistTag = require('./calc-dist-tag');
module.exports = function autoDistTag(cwd, options) {
let pkgPath, pkg, tags, tag;
return pkgUp(cwd)
.then(_pkgPath => (pkgPath = _p... | 'use strict';
const fs = require('fs-extra');
const pkgUp = require('pkg-up');
const getDistTags = require('./fetch-dist-tags');
const calcDistTag = require('./calc-dist-tag');
module.exports = async function autoDistTag(cwd, options) {
let pkgPath = await pkgUp(cwd);
let pkg = await fs.readJson(pkgPath);
let t... | Use async/await instead of Promise chains | Use async/await instead of Promise chains
| JavaScript | apache-2.0 | Turbo87/auto-dist-tag |
0b0432212ce06ad2797c2a6e67e4a249541c2be1 | src/scenescroller.js | src/scenescroller.js | /* global window */
'use strict';
var SceneScroller =
{ Entity : require("./entity")
}
module.exports = SceneScroller
if(window) {
window.SceneScroller = SceneScroller
}
| /* global window */
'use strict';
var SceneScroller =
{ EventEmitter : require('./eventemitter')
, Entity : require('./entity')
}
module.exports = SceneScroller
if(window) {
window.SceneScroller = SceneScroller
}
| Add EventEmitter to SS object | Add EventEmitter to SS object
| JavaScript | mit | leftees/scene-scroller,leftees/scene-scroller |
c6e84084c629ea6d32945df220d3bfb09a84481c | lib/transform/transformers.js | lib/transform/transformers.js | import { omit, pick } from 'lodash/object'
import { find, reduce } from 'lodash/collection'
/**
* Default transformer methods for each kind of entity.
*
* In the case of assets it also changes the asset url to the upload property
* as the whole upload process needs to be followed again.
*/
export function conten... | import { omit, pick } from 'lodash/object'
import { find, reduce } from 'lodash/collection'
/**
* Default transformer methods for each kind of entity.
*
* In the case of assets it also changes the asset url to the upload property
* as the whole upload process needs to be followed again.
*/
export function content... | Fix the problem where the file field is empty after asset transformation | fix(transformation): Fix the problem where the file field is empty after asset transformation
the sync tool was not able to process assets correctly due to a wrong transformation done the asset
closes #68
| JavaScript | mit | msalpietro/contentful-batch-libs,contentful/contentful-batch-libs |
1ffc4612871d7f0da71f61eafd15c42566124396 | src/transition/on.js | src/transition/on.js | import {get, init} from "./schedule";
function onFunction(key, id, name, listener) {
if (typeof listener !== "function") throw new Error;
var on0, on1;
return function() {
var schedule = init(this, key, id),
on = schedule.on;
// If this node shared a dispatch with the previous node,
// just ... | import {get, set, init} from "./schedule";
function start(name) {
return (name + "").trim().split(/^|\s+/).every(function(t) {
var i = t.indexOf(".");
if (i >= 0) t = t.slice(0, i);
return !t || t === "start";
});
}
function onFunction(key, id, name, listener) {
if (typeof listener !== "function") t... | Allow some listener changes after init. | Allow some listener changes after init.
You’re not allowed to modify start event listeners after the transition is
scheduled, so as to avoid changes during a start event (due to changes being
copy-on-write). However, you should still be allowed to change the OTHER event
listeners (interrupt and end) before the transit... | JavaScript | isc | d3/d3-transition |
6144e75d98f8e2446203f032feeb5bf72e000672 | src/js/model/Slide.js | src/js/model/Slide.js | /**
* Created by tc on 4/Mar/2014.
*/
var currentId = 1;
export class Slide {
constructor (title = `Slide $currentId`, text = `Default text $currentId`,
thumbnail = `[thumbnail ${currentId}]`) {
this.title = title;
this._text = text;
this.thumbnail = thumbnail;
this.id = c... | /**
* Created by tc on 4/Mar/2014.
*/
var currentId = 1;
export class Slide {
constructor (title = `Slide ${currentId}`,
text = `Default text ${currentId}`,
thumbnail = `[thumbnail ${currentId}]`) {
this.title = title;
this._text = text;
this.thumbnail = thumbnai... | Fix bug in string interpolation | Fix bug in string interpolation
| JavaScript | mit | hoelzl/JsCast |
ae972baaf7bbfcce9decf082651f250851cf6648 | src/main/web/app/FeatureContainer.js | src/main/web/app/FeatureContainer.js | import Ui from "./Ui";
export default class FeatureContainer {
static displayFeatures(features) {
let categoryMap = FeatureContainer._createCategoryMap(features);
categoryMap.forEach((features, key) => {
let container = $("<div class='ui segment'>");
$("<h3>").text(key).app... | import Ui from "./Ui";
export default class FeatureContainer {
static displayFeatures(features) {
let categoryMap = FeatureContainer._createCategoryMap(features);
categoryMap.forEach((features, key) => {
let container = $("<div class='ui segment'>");
$("<h3>").text(key).app... | Use equal heights in feature segment rows | Use equal heights in feature segment rows
| JavaScript | mit | VisualDataWeb/OntoBench,VisualDataWeb/OntoBench,VisualDataWeb/OntoBench |
150ce02371bd293f985b418f6cc48254d9734b45 | src/example/index.js | src/example/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import NotificationCenter from '../component/notification-center';
console.log('Exemple Notification center');
const mockNotifs = [
{title: 'TITRE', content: 'CONTENT ...', date: new Date().toISOString(), type: 'info', author: 'joe.lopez@gmail.com'},
... |
import React from 'react';
import ReactDOM from 'react-dom';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import NotificationCenter from '../component/notification-center';
import notificationReducers from '../reducers';
const store = createStore(notificationReducers);
const rootElem... | Update example to use provider. | [example] Update example to use provider.
| JavaScript | mit | KleeGroup/focus-notifications,pierr/notif,pierr/notif,KleeGroup/focus-notifications |
fd51a5f373ce737ee3f7d430af5a7d4e52daac8b | src/util/transform-head.js | src/util/transform-head.js | import R from 'ramda';
import curry from './curry.js';
import compose from './compose.js';
import head from './head.js';
import tail from './tail.js';
// (a -> a) -> a
const transformHead = curry((f, s) => {
return R.concat(
compose(f, head)(s),
tail(s)
);
});
export default transformHead;
| import curry from './curry.js';
import compose from './compose.js';
import head from './head.js';
import tail from './tail.js';
import concat from './concat.js';
// (a -> a) -> a
const transformHead = curry((f, s) => concat(compose(f, head)(s), tail(s)));
export default transformHead;
| Refactor the transformHead function to use the custom concat function | Refactor the transformHead function to use the custom concat function
| JavaScript | mit | restrung/restrung-js |
47e54c242422086f7308ddda6dcfb1404a480b7d | extension/WebBlocks.Blocks.js/WebBlocks.Blocks.Message.js | extension/WebBlocks.Blocks.js/WebBlocks.Blocks.Message.js | WebBlocks.Blocks.addBlock({
'name': 'Message',
'test': function(element){
return $(element).hasClass('message');
},
'definition': function(){
var COLOR_CLASSES = $.merge($.merge([],WebBlocks.Blocks.Color.COLORS),WebBlocks.Blocks.Color.FLAVORS);
this.initi... | WebBlocks.Blocks.addBlock({
'name': 'Message',
'test': function(element){
return $(element).hasClass('message');
},
'definition': function(){
var COLOR_CLASSES = $.merge($.merge([],WebBlocks.Blocks.Color.COLORS),WebBlocks.Blocks.Color.FLAVORS);
th... | Use aside rather than div for element | Use aside rather than div for element
| JavaScript | bsd-3-clause | ucla/WebBlocks-kit-core,ucla/WebBlocks-kit-core |
f0864152136d2d49c9b7992e1200d753bdeae737 | src/ws/connection.js | src/ws/connection.js | exports = module.exports = class Connection {
constructor(socket, handler) {
this.sock = socket;
socket.on('join', room => {
socket.join(room);
const { route: { method: Channel }, params } = handler.getHandler({ url: room, method: 'ws' });
// eslint-disable-next-line no-new
new Channel... | exports = module.exports = class Connection {
constructor(socket, handler) {
this.sock = socket;
socket.on('join', room => {
socket.join(room);
const val = handler.getHandler({ url: room, method: 'ws' });
if (!val) {
throw new Error('no match found');
}
const { route: { m... | Throw a nice error if no match is found | Throw a nice error if no match is found
| JavaScript | mit | ArtOfCode-/nails,ArtOfCode-/nails |
3bf38be0ad1ece2ece2fdc6f87ab7b7b4e8e4b5d | src/music-collection/index.js | src/music-collection/index.js | export const OFFICIAL_SERVER_URL = '/music'
export function load (url) {
return fetch(url + '/index.json').then(response => response.json())
}
| export const OFFICIAL_SERVER_URL = 'https://music.bemuse.ninja/live'
export function load (url) {
return fetch(url + '/index.json').then(response => response.json())
}
| Move official music server out of gh-pages | :truck: Move official music server out of gh-pages
| JavaScript | agpl-3.0 | bemusic/bemuse,bemusic/bemuse,bemusic/bemuse,bemusic/bemuse,bemusic/bemuse |
c66e57e693ae92be6f7c3f634eeb1b392b0b7603 | webpack-base-config.js | webpack-base-config.js | var path = require('path');
var webpack = require('webpack');
module.exports = {
plugins: [
new webpack.DefinePlugin({
VERSION: JSON.stringify(require('./package.json').version)
})
],
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
query: { presets: ['es2015... | var path = require('path');
var webpack = require('webpack');
module.exports = {
plugins: [
new webpack.DefinePlugin({
VERSION: JSON.stringify(require('./package.json').version)
})
],
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
query: {
... | Add "add-module-exports' babel plugin to plugins array | Add "add-module-exports' babel plugin to plugins array
Previously it was not actually being used.
Fixes "TypeError: Super expression must either be null or a function,
not object" error when building master on windows.
| JavaScript | bsd-3-clause | flavioribeiro/clappr,clappr/clappr,clappr/clappr,flavioribeiro/clappr,clappr/clappr,flavioribeiro/clappr |
d3a026de2585a050ad949e68a148547911ee4400 | public/js/application.js | public/js/application.js | $(document).ready(function() {
// This is called after the document has loaded in its entirety
// This guarantees that any elements we bind to will exist on the page
// when we try to bind to them
// See: http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
});
| $(document).ready(function() {
// This is called after the document has loaded in its entirety
// This guarantees that any elements we bind to will exist on the page
// when we try to bind to them
$("#go").leanModal({ top : 200, overlay : 0.4, closeButton: ".modal_close" })
// See: http://docs.jquery.com/T... | Add leanModal to JS file | Add leanModal to JS file
| JavaScript | mit | Ricky-Thomas/LUV-ME,mxngyn/luv-me,mxngyn/luv-me,Ricky-Thomas/LUV-ME |
20fda89dbc774fdb930f6c2387b8599c76a2778c | client/js/hah-app/team.js | client/js/hah-app/team.js | import React from 'react'
import injectSheet from 'react-jss'
import { Phone, Desktop } from '../components/breakpoints'
const Team = ({ classes }) => <div>THE TEAM</div>
const styles = {}
export default injectSheet(styles)(Team)
| import React from 'react'
import injectSheet from 'react-jss'
import { Phone, Desktop } from '../components/breakpoints'
const NAME_AND_TITLE_TEXT = 'Karen Rose | Executive Director'
const Team = ({ classes }) => (
<div className={classes.team}>
<Phone>
<div className={classes.nameAndTitleTextPhone}>{NAME_AND_... | Add name and title text | Add name and title text
| JavaScript | mit | HelpAssistHer/help-assist-her,HelpAssistHer/help-assist-her,HelpAssistHer/help-assist-her,HelpAssistHer/help-assist-her |
b873d12a9b1b1d2e1ddb9a0792203e359ec305fd | app/client/components/ConsoleOutput.js | app/client/components/ConsoleOutput.js | import React from 'react';
import { Panel, Accordion, Button, ButtonGroup, ButtonToolbar } from 'react-bootstrap';
import RemoteRobotStore from '../stores/RemoteRobotStore';
import RobotActions from '../actions/RobotActions';
var ConsoleOutput = React.createClass({
getInitialState() {
return {output: []}
},
... | import React from 'react';
import { Panel, Accordion, Button, ButtonGroup, ButtonToolbar } from 'react-bootstrap';
import RemoteRobotStore from '../stores/RemoteRobotStore';
import RobotActions from '../actions/RobotActions';
var ConsoleOutput = React.createClass({
getInitialState() {
return {output: []}
},
... | Put console output into one pre block. Align console output to bottom of block | Put console output into one pre block. Align console output to bottom of block
| JavaScript | apache-2.0 | pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral |
299a44e0842f27565d340fda5092ac6926f173c9 | app/components/notification-message.js | app/components/notification-message.js | import NotificationMessage from 'ember-cli-notifications/components/notification-message';
import ENV from '../config/environment';
var config = ENV['ember-cli-notifications'] || {};
export default NotificationMessage.extend({
icons: config.icons
});
| import NotificationMessage from 'ember-cli-notifications/components/notification-message';
import ENV from '../config/environment';
var config = ENV['ember-cli-notifications'] || {};
export default NotificationMessage.extend({
icons: config.icons || 'font-awesome'
});
| Set a default icon style | Set a default icon style
| JavaScript | mit | marcemira/ember-cli-notifications,cesarizu/ember-cli-notifications,stonecircle/ember-cli-notifications,cesarizu/ember-cli-notifications,Blooie/ember-cli-notifications,stonecircle/ember-cli-notifications,Blooie/ember-cli-notifications,aupac/ember-cli-notifications,aupac/ember-cli-notifications,marcemira/ember-cli-notifi... |
a1dedac6643a583783dc43bc7f09f672cbd3d35a | app/js/controllers/sharedController.js | app/js/controllers/sharedController.js | 'use strict';
function sharedCtrl($scope, ghAPI, gistData, $routeParams, $location, notificationService, $window) {
$scope.author = $routeParams.user;
$scope.gist = ghAPI.gist($routeParams.id);
$scope.fork = function() {
ghAPI.fork($routeParams.id).then(function(data) {
notificationS... | 'use strict';
function sharedCtrl($scope, ghAPI, gistData, $routeParams, $location, notificationService, $window) {
$scope.author = $routeParams.user;
ghAPI.gist($routeParams.id).then(function(gist) {
$scope.gist = gist;
});
console.log($scope.gist);
$scope.fork = function() {
g... | FIX (sharing gists): Fix shared gist not being loaded properly and now displays gist files. | FIX (sharing gists): Fix shared gist not being loaded properly and now displays gist files.
| JavaScript | mit | Gisto/Gisto,Gisto/Gisto,shmool/Gisto,shmool/Gisto,shmool/Gisto,Gisto/Gisto,Gisto/Gisto |
dd71b841587a989ef1a4c8baab640dea68ca50f8 | src/scripts/content/gitlab.js | src/scripts/content/gitlab.js | /*jslint indent: 2, unparam: true*/
/*global $: false, document: false, togglbutton: false*/
'use strict';
togglbutton.render('.issue .detail-page-description .title:not(.toggl)', {observe: true}, function (elem) {
var link, description,
titleElem = $(".issue .detail-page-description .title"),
projectElem =... | /*jslint indent: 2, unparam: true*/
/*global $: false, document: false, togglbutton: false*/
'use strict';
togglbutton.render('.issue .detail-page-description .title:not(.toggl)', {observe: true}, function (elem) {
var link, description,
numElem = $(".identifier"),
titleElem = $(".issue .detail-page-descrip... | Include issue number in description, remove " · Issues" from projectName | Gitlab: Include issue number in description, remove " · Issues" from projectName | JavaScript | bsd-3-clause | kretel/toggl-button,bitbull-team/toggl-button,eatskolnikov/toggl-button,bitbull-team/toggl-button,glensc/toggl-button,kretel/toggl-button,andreimoldo/toggl-button,andreimoldo/toggl-button,topdown/toggl-button,glensc/toggl-button,glensc/toggl-button,eatskolnikov/toggl-button,topdown/toggl-button |
5a7fbfb6f7d5654d14ef392920b4f9677b5eb796 | src/firebaseConfig.js | src/firebaseConfig.js | // Change it to your own database
export default {
apiKey: "AIzaSyDes5f-3Rskw0dbPBbw1IhY68GoP-8dLpY",
authDomain: "quictionary-c7eff.firebaseapp.com",
databaseURL: "https://quictionary-c7eff.firebaseio.com",
storageBucket: "quictionary-c7eff.appspot.com"
};
| // Change it to your own database
export default {
apiKey: "AIzaSyBP4jQh_7jL2uSVAlZOQjWDjXPBJ4jEWP4",
authDomain: "dev-db-c0079.firebaseapp.com",
databaseURL: "https://dev-db-c0079.firebaseio.com",
storageBucket: "",
};
| Update firebase config with dev db | Update firebase config with dev db
| JavaScript | mit | agnivade/quictionary,agnivade/quictionary |
f037e03c7dd48fa0458054fb3816c59c4aa2e424 | app/routes/participate/survey/index.js | app/routes/participate/survey/index.js | import Ember from 'ember';
export default Ember.Route.extend({
setupController(controller, session) {
this._super(controller, session);
controller.set('experiment', this.controllerFor('participate.survey').get('experiment'));
controller.set('session', session);
controller.set('pastSessions', []);
}... | import Ember from 'ember';
export default Ember.Route.extend({
setupController(controller, session) {
this._super(controller, session);
controller.set('experiment', this.controllerFor('participate.survey').get('experiment'));
controller.set('session', session);
controller.set('pastSessions', []);
}... | Allow transition to exit route | Allow transition to exit route
Fixes issue where clicking the "Exit"
button on the exp-thank-you frame would
redirect to the 'participate.survey.index'
route, where the beforeModel hook would
then redirect to the consent form.
| JavaScript | apache-2.0 | CenterForOpenScience/isp,CenterForOpenScience/isp,CenterForOpenScience/isp |
3b1efa24934c83cf505f2cd40d3118b95ed28611 | client/src/components/Connections/dataWrappers/ConnectionWrapper.js | client/src/components/Connections/dataWrappers/ConnectionWrapper.js | // @flow
import React from 'react'
import {compose} from 'redux'
import {connect} from 'react-redux'
import {withDataProviders} from 'data-provider'
import {isNil} from 'lodash'
import type {ComponentType} from 'react'
import {connectionDetailProvider} from '../../../dataProviders/connectionsDataProviders'
const Conne... | // @flow
import React from 'react'
import {compose} from 'redux'
import {connect} from 'react-redux'
import {branch} from 'recompose'
import {withDataProviders} from 'data-provider'
import {isNil} from 'lodash'
import type {ComponentType} from 'react'
import {connectionDetailProvider} from '../../../dataProviders/conne... | Fix Connections loading when no entity eids found | Fix Connections loading when no entity eids found
| JavaScript | apache-2.0 | verejnedigital/verejne.digital,verejnedigital/verejne.digital,verejnedigital/verejne.digital,verejnedigital/verejne.digital,verejnedigital/verejne.digital |
b6d7c10ea727c1c2f59758603729b04df2d500a3 | custom-scripting.js | custom-scripting.js | /* JQuery Mobile Infrastructure settings and customizations. */
/* ** Alternative settings format:
$(document).bind("mobileinit", function(){
$.mobile.defaultPageTransition = "fade";
});
*/
$(document).bind("mobileinit", function(){
$.extend($.mobile, {
"pushStateEnabled": false,
"defaultPageTr... | /* JQuery Mobile Infrastructure settings and customizations. */
/* ** Alternative settings format:
$(document).bind("mobileinit", function(){
$.mobile.defaultPageTransition = "fade";
});
*/
$(document).bind("mobileinit", function(){
$.extend($.mobile, {
"pushStateEnabled": false,
"defaultPageTr... | Rectify problem with the page-loading signal disappearing much too soon on storage login by removing the automatic clearing of the signal on ajax completion. We already had sufficient explicit provisions for hiding the signal. | Rectify problem with the page-loading signal disappearing much too soon on
storage login by removing the automatic clearing of the signal on ajax
completion. We already had sufficient explicit provisions for hiding the
signal.
| JavaScript | apache-2.0 | SpiderOak/so_client_html5,SpiderOak/so_client_html5 |
83b6c7dec2fe9c25c787ac0c55eac9869e1eb1df | src/js/nb-throbber.js | src/js/nb-throbber.js | /**
* AngularJS throbber directive
*
* @author Hein Bekker <hein@netbek.co.za>
* @copyright (c) 2015 Hein Bekker
* @license http://www.gnu.org/licenses/agpl-3.0.txt AGPLv3
*/
(function (window, angular, undefined) {
'use strict';
angular
.module('nb.throbber', [])
.directive('nbThrobber', nbThrobberDirect... | /**
* AngularJS throbber directive
*
* @author Hein Bekker <hein@netbek.co.za>
* @copyright (c) 2015 Hein Bekker
* @license http://www.gnu.org/licenses/agpl-3.0.txt AGPLv3
*/
(function (window, angular, undefined) {
'use strict';
angular
.module('nb.throbber', [])
.directive('nbThrobber', nbThrobberDirect... | Add `replace` flag to directive | Add `replace` flag to directive | JavaScript | agpl-3.0 | netbek/nb-throbber |
0ce7396be46f3bc4a82a634b8b8f35ce8c7b7758 | src/js/utils/utils.js | src/js/utils/utils.js | /*
|--------------------------------------------------------------------------
| Utils
|--------------------------------------------------------------------------
*/
export default {
/**
* Parse an int to a more readable string
*
* @param int duration
* @return string
*/
parseDuration:... | /*
|--------------------------------------------------------------------------
| Utils
|--------------------------------------------------------------------------
*/
export default {
/**
* Parse an int to a more readable string
*
* @param int duration
* @return string
*/
parseDuration:... | Check if duration is null or undefined | Check if duration is null or undefined
| JavaScript | mit | KeitIG/museeks,MrBlenny/museeks,KeitIG/museeks,KeitIG/museeks,MrBlenny/museeks |
e1c2c2376a75083265ecea73839414e90cbc571e | GWServer.js | GWServer.js | /**
* GitLab CE Webhook Server v0.1.0
* GitLab CE local Webhook Server based on NodeJS to
* trigger some tasks when repo is updated.
* start this server by running `node GWServer.js`
*
*
* Author: Kushal Pandya <kushalspandya@gmail.com> (https://doublslash.com)
* Date: 23 May, 2016
* License: MIT
*
* Main Se... | /**
* GitLab CE Webhook Server v0.1.0
* GitLab CE local Webhook Server based on NodeJS to
* trigger some tasks when repo is updated.
* start this server by running `node GWServer.js`
*
*
* Author: Kushal Pandya <kushalspandya@gmail.com> (https://doublslash.com)
* Date: 23 May, 2016
* License: MIT
*
* Main Se... | Make sure only supported hooks are given status 200 | Make sure only supported hooks are given status 200
| JavaScript | mit | kushalpandya/gitlabce-webhook-server,kushalpandya/gitlabce-webhook-server |
2bb088f18d0358794ad7b0d1af86350061273d80 | src/views/controls.js | src/views/controls.js | var Controls = Datagrid.Controls = Backbone.View.extend({
initialize: function() {
this.pager = this.options.pager;
this.left = this._resolveView(this.options.left);
this.middle = this._resolveView(this.options.middle);
this.right = this._resolveView(this.options.right);
},
render: function()... | var Controls = Datagrid.Controls = Backbone.View.extend({
initialize: function() {
this.pager = this.options.pager;
this.left = this._resolveView(this.options.left);
this.middle = this._resolveView(this.options.middle);
this.right = this._resolveView(this.options.right);
},
render: function()... | Add a wrapping div around control as a placeholder. | Add a wrapping div around control as a placeholder.
| JavaScript | mit | loicfrering/backbone.datagrid |
384c352293e97c61d284b0f03a557fa417044d4d | web/js/main.js | web/js/main.js | $(document).ready(function() {
"use strict";
console.log("main.js loaded");
myoTest();
});
function myoTest() {
Myo.connect('com.myojs.main');
//Start talking with Myo Connect
//Myo.connect('com.stolksdorf.myAwesomeApp');
console.log('Hello Myo!');
//this.vibrate();
Myo.on('fist', function(){
con... | $(document).ready(function() {
"use strict";
console.log("main.js loaded");
myoTest();
});
function myoTest() {
Myo.connect('com.myojs.main');
//Start talking with Myo Connect
//Myo.connect('com.stolksdorf.myAwesomeApp');
console.log('Hello Myo!');
//this.vibrate();
Myo.on('fist', function(){
con... | Add up and down myo code | Add up and down myo code
| JavaScript | mit | jayendrajog/LA-Hacks-2016,jayendrajog/LA-Hacks-2016,jayendrajog/LA-Hacks-2016,jayendrajog/LA-Hacks-2016 |
4a2c7b5fab40327e8390fddabba71bd4264914df | tools/es2015Preset.js | tools/es2015Preset.js | const { buildPreset } = require('babel-preset-es2015')
const { BABEL_ENV } = process.env
module.exports = {
presets: [
[ buildPreset, {
loose: true,
modules: BABEL_ENV === 'es' ? false : 'commonjs'
} ]
]
}
| const buildPreset = require('babel-preset-es2015').buildPreset
const BABEL_ENV = process.env.BABEL_ENV
module.exports = {
presets: [
[ buildPreset, {
loose: true,
modules: BABEL_ENV === 'es' ? false : 'commonjs'
} ]
]
}
| Make code work on Node 4 | Make code work on Node 4
| JavaScript | mit | shunitoh/react-router,ReactTraining/react-router,goblortikus/react-router,DelvarWorld/react-router,djkirby/react-router,reactjs/react-router,d-oliveros/react-router,d-oliveros/react-router,ReactTraining/react-router,shunitoh/react-router,rafrex/react-router,asaf/react-router,goblortikus/react-router,goblortikus/react-r... |
bbbe874c9f224edebdfe7fe5260d13dc9004dcff | client/templates/meetingSeriesList.js | client/templates/meetingSeriesList.js | import { MeetingSeries } from '/imports/meetingseries'
import { Minutes } from '/imports/minutes'
Template.meetingSeriesList.onRendered(function () {
});
Template.meetingSeriesList.onCreated(function () {
});
Template.meetingSeriesList.helpers({
meetingSeriesRow: function () {
return MeetingSeries.find({}... | import { MeetingSeries } from '/imports/meetingseries'
import { Minutes } from '/imports/minutes'
Template.meetingSeriesList.onRendered(function () {
});
Template.meetingSeriesList.onCreated(function () {
});
Template.meetingSeriesList.helpers({
meetingSeriesRow: function () {
return MeetingSeries.find({}... | Sort the list of meeting series by last change descending | Sort the list of meeting series by last change descending
| JavaScript | mit | Huggle77/4minitz,4minitz/4minitz,4minitz/4minitz,Huggle77/4minitz,RobNeXX/4minitz,RobNeXX/4minitz,4minitz/4minitz,RobNeXX/4minitz,Huggle77/4minitz |
02138deccb6cf369ec6bfb80012c59c0c71ccd90 | src/terminal/index.js | src/terminal/index.js | 'use strict';
var util = require('util');
function Terminal() {
this.subLevel = 1;
}
/**
* Display received data in format on terminal
* @param {Object|string} data
*/
Terminal.prototype.show = function (data) {
if (data['type'] === 'notify') {
if (data['tag'] === 'START_FLAG_UP') { this.subLevel+... | 'use strict';
var util = require('util');
function Terminal() {
this.subLevel = 1;
}
/**
* Display received data in format on terminal
* @param {Object|string} data
*/
Terminal.prototype.show = function (data) {
if (data['type'] === 'notify') {
if (data['tag'] === 'START_FLAG_UP') { this.subLevel+... | Print output directly on console with no formatting | fix(terminal): Print output directly on console with no formatting
| JavaScript | mit | farmer-project/farmer-cli |
266fcfdb6cd3f9815c44edfc9f9c79b43b486f84 | addon/utils/serialize-and-push.js | addon/utils/serialize-and-push.js | import { isArray } from '@ember/array';
export default function(options, response) {
let modelName = this.constructor.modelName || this.constructor.typeKey;
let modelClass = this.store.modelFor(modelName);
let serializer = this.store.serializerFor(modelName);
let normalized = isArray(response.data) ? serialize... | import { isArray } from '@ember/array';
import { _getModelClass, _getModelName, _getStoreFromRecord } from './build-url';
export default function serializeAndPush(options, response) {
const recordClass = _getModelClass(this);
const modelName = _getModelName(recordClass);
const store = _getStoreFromRecord(this)... | Use buildUrl helpers in serializer-and-push | chore: Use buildUrl helpers in serializer-and-push
| JavaScript | mit | truenorth/ember-api-actions,mike-north/ember-api-actions,mike-north/ember-api-actions,mike-north/ember-api-actions,truenorth/ember-api-actions,mike-north/ember-api-actions |
25b15ba80025a90bf96592fc6df236b897e4babd | tasks/browserSync.js | tasks/browserSync.js | var task = function(gulp, config) {
'use strict';
gulp.task('browserSync', function() {
var path = require('path');
var fs = require('fs');
var browserSync = require('browser-sync').create();
var html5Regex = new RegExp('\/'+config.name+'\/(.*)$');
browserSync.init({
server: {
//... | var task = function(gulp, config) {
'use strict';
gulp.task('browserSync', function() {
var path = require('path');
var fs = require('fs');
var browserSync = require('browser-sync').create();
var html5Regex = new RegExp('\/(.*?)\/(.*)$');
browserSync.init({
server: {
// Serve bot... | Enable symlinked apps in dist | Enable symlinked apps in dist
| JavaScript | mit | npolar/npdc-gulp |
ca2c479a67773ccf305afc89017b2cf7eb620291 | test/reducer.spec.js | test/reducer.spec.js | import { reducer } from '../src'
import { INVALIDATE_SESSION } from '../src/actionTypes'
describe('session reducer', () => {
it('returns default state when initialized', () => {
const expected = { isAuthenticated: false, data: {}}
const state = reducer(undefined, {})
expect(state).toEqual(expected)
})... | import { reducer } from '../src'
import { INVALIDATE_SESSION } from '../src/actionTypes'
describe('session reducer', () => {
it('returns default state when initialized', () => {
const expected = { isAuthenticated: false, data: {}}
const state = reducer(undefined, {})
expect(state).toEqual(expected)
})... | Change name of test in reducer | Change name of test in reducer
| JavaScript | mit | jerelmiller/redux-simple-auth |
b7919316aa813e0de5172cbaa1efe978a3a98f39 | src/sources/PopcornTime/index.js | src/sources/PopcornTime/index.js | // @flow
const Rx = require('rxjs/Rx')
const axios = require('axios')
const _ = require('lodash')
const event = require('../event')
// const INTERVAL: number = 1000 * 60 * 60 * 1// 1 hour TODO: Move to config
// const INTERVAL: number = 1000 * 60 * 2 // 2 minutes
const INTERVAL: number = 1000 * 1 // 3 seconds
const... | // @flow
const Rx = require('rxjs/Rx')
const axios = require('axios')
const _ = require('lodash')
const event = require('../event')
const INTERVAL = process.env.NODE_ENV == "production" ? 1000 * 60 * 60 : 1000 * 1 // 1 hour or 1 second
const Source$ = Rx.Observable
.interval(INTERVAL)
.exhaustMap(() => Promise.a... | Set scraping interval vased on NODE_ENV | Set scraping interval vased on NODE_ENV
| JavaScript | mit | pranaygp/ls-it |
acab6589425d41f7cdcb848b6ad3fc33d8555cac | tests/emoji-strip.js | tests/emoji-strip.js | var tape = require('tape'),
emojiStrip = require('..'),
emoji
;
tape('strip emoji', function (t) {
emoji = 'thumbs-up👍 for staying strong💪 without emoji please🙏';
t.equal(emojiStrip(emoji), 'thumbs-up for staying strong without emoji please');
emoji = 'dealing with emoji😡 makes me feel like po... | var tape = require('tape'),
emojiStrip = require('..'),
emoji
;
tape('strip emoji', function (t) {
emoji = 'thumbs-up👍 for staying strong💪 without emoji please🙏';
t.equal(emojiStrip(emoji), 'thumbs-up for staying strong without emoji please');
emoji = 'dealing with emoji😡 makes me feel like po... | Add failing test for digit removal bug | Add failing test for digit removal bug
Digits are unintentionally removed from strings.
| JavaScript | isc | khalifenizar/emoji-strip,khalifenizar/emoji-strip,PeterCxy/emoji-strip |
6833b42c0bef7d2824f3d52d4d26b6c333a4a6a0 | blueprints/ember-cli-octicons/index.js | blueprints/ember-cli-octicons/index.js | module.exports = {
normalizeEntityName: function() {
// this prevents an error when the entityName is
// not specified (since that doesn't actually matter
// to us
},
afterInstall: function(options) {
return this.addBowerPackageToProject('octicons', '3.3.0');
}
};
| module.exports = {
normalizeEntityName: function() {}, // no-op since we're just adding dependencies
afterInstall: function(options) {
return this.addBowerPackageToProject('octicons', '3.3.0');
}
};
| Update blueprint to match addon guides | Update blueprint to match addon guides
| JavaScript | mit | kpfefferle/ember-cli-octicons,kpfefferle/ember-octicons,kpfefferle/ember-octicons,kpfefferle/ember-cli-octicons |
5cdc4dbb1920ed0124981f037ee6d99ae15511d0 | src/util/window_onerror.js | src/util/window_onerror.js | var Notifier = require("../notifier");
window.onerror = function (message, file, line) {
setTimeout(function () {
new Notifier().notify({
message: message,
stack: '()@' + file + ':' + line
});
}, 0);
return true;
};
| // We have to rely on the magic locals provided by header.js right now
// Once we're decoupled we'll be able to require notifier directly
var Notifier = require("../concat-dist");
window.onerror = function (message, file, line) {
setTimeout(function () {
new Notifier().notify({
message: message,
stac... | Comment about where notifier comes from | Comment about where notifier comes from | JavaScript | mit | airbrake/airbrake-js,airbrake/airbrake-js,airbrake/airbrake-js |
300d4b2996f15535fa41d2145b41173bae718a00 | app/initializers/load-fixtures.js | app/initializers/load-fixtures.js | export default {
name: 'load-fixtures',
initialize: function() {
Object.keys(require._eak_seen).forEach(function(module) {
if (!module.match(/^\w[\w\d\-]+\/models/)) {
return;
}
var model = require(module)['default'];
var fixtureModule = module.replace('/models/', '/fixtures/');... | export default {
name: 'load-fixtures',
initialize: function(container, app) {
Object.keys(require._eak_seen).forEach(function(module) {
if (module.indexOf(app.modulePrefix + '/models/') !== 0) {
return;
}
var model = require(module)['default'];
var fixtureModule = module.replac... | Use app modulePrefix instead of regexp | Use app modulePrefix instead of regexp
| JavaScript | mit | lacides/ember-cli-fixture-loader |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.