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 |
|---|---|---|---|---|---|---|---|---|---|
57153e83cc810e5bb5f4c9a6774cc8a9163acddd | addon/helpers/elem.js | addon/helpers/elem.js | import Ember from 'ember';
import { elem, mod } from 'ember-cli-bem/mixins/bem';
const {
HTMLBars: { makeBoundHelper },
} = Ember;
const BLOCK_KEY = 'blockName';
export default makeBoundHelper(function(params, hash) {
const blockName = hash[BLOCK_KEY];
const [ elemName ] = params;
if (!blockName) {
thro... | import Ember from 'ember';
import { elem, mod } from 'ember-cli-bem/mixins/bem';
const {
Helper: { helper }
} = Ember;
const BLOCK_KEY = 'blockName';
export default helper(function(params, hash) {
const blockName = hash[BLOCK_KEY];
const [ elemName ] = params;
if (!blockName) {
throw Error(`${BLOCK_KEY}... | Remove makeBoundHelper in favor of helper. | Remove makeBoundHelper in favor of helper.
| JavaScript | mit | nikityy/ember-cli-bem,nikityy/ember-cli-bem |
57103d1f7e4eee6f4405de13c9650663395b0007 | src/storage-queue/index.js | src/storage-queue/index.js | var azure = require("azure-storage");
//
var nconf = require("nconf");
nconf.env()
.file({
file: "config.json",
search: true
});
var storageName = nconf.get("StorageName");
var storageKey = nconf.get("StorageKey");
var dev = nconf.get("NODE_ENV");
| var azure = require("azure-storage");
//
var nconf = require("nconf");
nconf.env()
.file({
file: "config.json",
search: true
});
var QueueName = "my-queue";
var storageName = nconf.get("StorageName");
var storageKey = nconf.get("StorageKey");
var dev = nconf.get("NODE_ENV");
//
var retryOperations = new azu... | Add couple of simple queue access methods | Add couple of simple queue access methods
| JavaScript | mit | peterblazejewicz/azure-aspnet5-examples,peterblazejewicz/azure-aspnet5-examples |
7772afb9c69d5c6e4ffc0bbe6507eaf1df257293 | app/js/arethusa.core/routes/main.constant.js | app/js/arethusa.core/routes/main.constant.js | "use strict";
angular.module('arethusa.core').constant('MAIN_ROUTE', {
controller: 'MainCtrl',
template: '<div ng-include="template"></div>',
resolve: {
loadConfiguration: function($http, confUrl, configurator) {
return $http.get(confUrl(true)).then(function(res) {
configurator.defineConfigurat... | "use strict";
angular.module('arethusa.core').constant('MAIN_ROUTE', {
controller: 'MainCtrl',
template: '<div ng-include="template"></div>',
resolve: {
loadConfiguration: function($http, confUrl, configurator) {
var url = confUrl(true);
return $http.get(url).then(function(res) {
configur... | Add the location of a conf file in main route | Add the location of a conf file in main route
| JavaScript | mit | Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa |
dd1adfab80874c850279a5bd29f1d41c340455c6 | jet/static/jet/js/src/layout-updaters/user-tools.js | jet/static/jet/js/src/layout-updaters/user-tools.js | var $ = require('jquery');
var UserToolsUpdater = function($usertools) {
this.$usertools = $usertools;
};
UserToolsUpdater.prototype = {
updateUserTools: function($usertools) {
var $list = $('<ul>');
var user = $usertools.find('strong').first().text();
$('<li>').addClass('user-tools-w... | var $ = require('jquery');
require('browsernizr/test/touchevents');
require('browsernizr');
var UserToolsUpdater = function($usertools) {
this.$usertools = $usertools;
};
UserToolsUpdater.prototype = {
updateUserTools: function($usertools) {
var $list = $('<ul>');
var user = $usertools.find('... | Add user tools closing by click | Add user tools closing by click
| JavaScript | agpl-3.0 | rcotrina94/django-jet,geex-arts/django-jet,pombredanne/django-jet,SalahAdDin/django-jet,geex-arts/django-jet,pombredanne/django-jet,SalahAdDin/django-jet,SalahAdDin/django-jet,rcotrina94/django-jet,rcotrina94/django-jet,geex-arts/django-jet,pombredanne/django-jet |
f5f6841d299d4bcfcde428130d48ef7266b36747 | dev/staticRss.js | dev/staticRss.js | 'use strict';
var moment = require('moment');
var _ = require('lodash');
var config = require('../config');
var paths = require('../elements/PathsMixin');
module.exports = function(page) {
return t('feed', {xmlns: 'http://www.w3.org/2005/Atom'}, [
t('title', {}, config.title),
t('link', {href: "#{config.ba... | 'use strict';
var moment = require('moment');
var _ = require('lodash');
var config = require('../config');
var paths = require('../elements/PathsMixin');
module.exports = function() {
return t('feed', {xmlns: 'http://www.w3.org/2005/Atom'}, [
t('title', {}, config.title),
t('link', {href: 'config.baseUrl'... | Fix typo at RSS bit | Fix typo at RSS bit
| JavaScript | mit | antwarjs/antwar,RamonGebben/antwar,RamonGebben/antwar |
a51e96883d8fcc394ac1e2b4744c5634fb16184b | reviewboard/static/rb/js/resources/models/apiTokenModel.js | reviewboard/static/rb/js/resources/models/apiTokenModel.js | RB.APIToken = RB.BaseResource.extend({
defaults: _.defaults({
tokenValue: null,
note: null,
policy: {},
userName: null
}, RB.BaseResource.prototype.defaults),
rspNamespace: 'api_token',
url: function() {
var url = SITE_ROOT + (this.get('localSitePrefix') || '') ... | RB.APIToken = RB.BaseResource.extend({
defaults: function() {
return _.defaults({
tokenValue: null,
note: null,
policy: {},
userName: null
}, RB.BaseResource.prototype.defaults());
},
rspNamespace: 'api_token',
url: function() {
v... | Update the RB.APIToken resource to use a defaults function | Update the RB.APIToken resource to use a defaults function
This change updates the `RB.APIToken` resource to use the new
`defaults` function that all other resources are using.
Testing Done:
Ran JS tests.
Reviewed at https://reviews.reviewboard.org/r/7394/
| JavaScript | mit | KnowNo/reviewboard,chipx86/reviewboard,brennie/reviewboard,beol/reviewboard,davidt/reviewboard,chipx86/reviewboard,KnowNo/reviewboard,sgallagher/reviewboard,sgallagher/reviewboard,KnowNo/reviewboard,sgallagher/reviewboard,brennie/reviewboard,beol/reviewboard,custode/reviewboard,bkochendorfer/reviewboard,brennie/reviewb... |
c5caa31810a39e69ddb281143ecac063d0a9e3d5 | app/services/data/get-individual-overview.js | app/services/data/get-individual-overview.js | const knex = require('../../../knex').web
module.exports = function (id) {
return knex('individual_case_overview')
.first('grade_code AS grade',
'team_id AS teamId',
'team_name AS teamName',
'available_points AS availablePoints',
'total_points AS totalPoints',
... | const knex = require('../../../knex').web
module.exports = function (id) {
var table = 'individual_case_overview'
var whereClause = ''
if (id !== undefined) {
whereClause = ' WHERE workload_owner_id = ' + id
}
var selectColumns = [
'grade_code AS grade',
'team_id AS teamId',
'team_name AS t... | Add noexpand to individual overview | Add noexpand to individual overview
| JavaScript | mit | ministryofjustice/wmt-web,ministryofjustice/wmt-web |
0da039bab055f1c5c90f6424b67159bcb13b3577 | app/assets/javascripts/lib/analytics/travel_insurance_omniture.js | app/assets/javascripts/lib/analytics/travel_insurance_omniture.js | require([ "jquery", "lib/analytics/analytics" ], function($, Analytics) {
"use strict";
var analytics = new Analytics();
analytics.trackView();
// Set up Omniture event handlers
var windowUnloadedFromSubmitClick = false;
// If the user clicks anywhere else on the page, reset the click tracker
$(docu... | require([ "jquery", "lib/analytics/analytics" ], function($, Analytics) {
"use strict";
var analytics = new Analytics();
if (window.lp.hasOwnProperty("tracking") && window.lp.tracking.hasOwnProperty("eVar12") && window.lp.tracking.eVar12 !== "dest essential information") {
analytics.trackView();
}
// S... | Make sure Essential information is not double tracked | Make sure Essential information is not double tracked
| JavaScript | mit | Lostmyname/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo |
ed824d747a12b85c662e9451c69857d20c14ae90 | app/assets/javascripts/dialogs/tabular_data/tabular_data_preview.js | app/assets/javascripts/dialogs/tabular_data/tabular_data_preview.js | chorus.dialogs.TabularDataPreview = chorus.dialogs.Base.extend({
constructorName: "TabularDataPreview",
templateName: 'tabular_data_preview',
title: function() {return t("dataset.data_preview_title", {name: this.model.get("objectName")}); },
events: {
"click button.cancel": "cancelTask"
},... | chorus.dialogs.TabularDataPreview = chorus.dialogs.Base.extend({
constructorName: "TabularDataPreview",
templateName: 'tabular_data_preview',
title: function() {return t("dataset.data_preview_title", {name: this.model.get("objectName")}); },
events: {
"click button.cancel": "cancelTask"
},... | Fix missing comma in tabular data preview | Fix missing comma in tabular data preview
| JavaScript | apache-2.0 | hewtest/chorus,mpushpav/chorus,lukepolo/chorus,jamesblunt/chorus,hewtest/chorus,mpushpav/chorus,atul-alpine/chorus,prakash-alpine/chorus,hewtest/chorus,mpushpav/chorus,mpushpav/chorus,lukepolo/chorus,lukepolo/chorus,prakash-alpine/chorus,prakash-alpine/chorus,jamesblunt/chorus,atul-alpine/chorus,hewtest/chorus,jamesblu... |
a49429c4737888bc3e43b50a221d966422841fb2 | test/integration/server.js | test/integration/server.js | import nock from 'nock'
import req from 'supertest'
import test from 'tape'
import server from '../../server'
nock('http://www.newyorker.com')
.get('/')
.replyWithFile(200, './test/fixtures/homepage.html')
test('server', t => {
req(server)
.get('/')
.expect(200)
.expect('Content-Type', /html/)
.... | import nock from 'nock'
import req from 'supertest'
import test from 'tape'
import server from '../../server'
nock('http://www.newyorker.com')
.get('/')
.replyWithFile(200, './test/fixtures/homepage.html')
test('server', t => {
req(server)
.get('/')
.expect(200)
.expect('Content-Type', /html/)
.... | Update test to match new markup | Update test to match new markup
| JavaScript | mit | mmwtsn/borowitz-index,mmwtsn/borowitz-index |
a76a96c708c5e6b111bbfff14415b794065d28ee | examples/links/webpack.config.js | examples/links/webpack.config.js | var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/st... | var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/st... | Use React from root project to avoid duplicate React problem | Use React from root project to avoid duplicate React problem
| JavaScript | mit | rackt/redux-router,acdlite/redux-router,mjrussell/redux-router |
8fadc42c9711d08efb182eb0d865c51fd39645af | src/chunkify.js | src/chunkify.js | function* chunkify(start, final, chunk, delay) {
for (let index = start; index < final; index++) {
if ((index > start) && (index % (start + chunk) === 0)) {
yield new Promise(resolve => setTimeout(resolve, delay))
}
yield index
}
}
export default {
interval: ({start, final, chunk, delay}) => {
... | let pending_delay_error = (index) => {
let pending_delay = `pending delay at index: ${index}; `;
pending_delay += `wait ${delay} milliseconds before `;
pending_delay += `further invocations of .next()`;
throw new Error(pending_delay)
};
// Return values from the range `start` to `final` synchronously when betw... | Throw error if iterator advances if delay is pending | Throw error if iterator advances if delay is pending
| JavaScript | mit | yangmillstheory/chunkify,yangmillstheory/chunkify |
b5b5aa719f9e28fa73af44179cf2c8648728a646 | src/demo/js/ephox/snooker/demo/DemoTranslations.js | src/demo/js/ephox/snooker/demo/DemoTranslations.js | define(
'ephox.snooker.demo.DemoTranslations',
[
'global!Array'
],
function (Array) {
var keys = {
'table.picker.rows': '{0} high',
'table.picker.cols': '{0} wide'
};
return function (key) {
if (keys[key] === undefined) throw 'key ' + key + ' not found';
var r = keys[k... | define(
'ephox.snooker.demo.DemoTranslations',
[
],
function () {
return {
row: function (row) { return row + ' high'; },
col: function (col) { return col + ' wide'; }
};
}
); | Update Demo Translations for echo change | Update Demo Translations for echo change
| JavaScript | lgpl-2.1 | FernCreek/tinymce,tinymce/tinymce,FernCreek/tinymce,FernCreek/tinymce,tinymce/tinymce,TeamupCom/tinymce,tinymce/tinymce,TeamupCom/tinymce |
900e6845b52ba6389914f85c06d0d09cf07dc342 | test/renderer/path-spec.js | test/renderer/path-spec.js | import { expect } from 'chai';
import { remote } from 'electron';
import {
defaultPathFallback,
cwdKernelFallback
} from '../../src/notebook/path';
describe('defaultPathFallback', () => {
it('returns a object with the defaultPath', () => {
const path = defaultPathFallback('dummy-path');
expect(path).to.d... | import { expect } from 'chai';
import { remote } from 'electron';
import {
defaultPathFallback,
cwdKernelFallback
} from '../../src/notebook/path';
describe('defaultPathFallback', () => {
it('returns a object with the defaultPath', () => {
const path = defaultPathFallback('dummy-path');
expect(path).to.d... | Disable path fallback test on windows | chore(tests): Disable path fallback test on windows
| JavaScript | bsd-3-clause | jdfreder/nteract,nteract/composition,rgbkrk/nteract,rgbkrk/nteract,captainsafia/nteract,0u812/nteract,nteract/composition,0u812/nteract,jdetle/nteract,0u812/nteract,jdetle/nteract,nteract/nteract,jdetle/nteract,rgbkrk/nteract,jdfreder/nteract,nteract/nteract,rgbkrk/nteract,nteract/nteract,temogen/nteract,nteract/nterac... |
a97533599023613ad8c99a8ab2e2b55e3224f291 | app/reducers/index.js | app/reducers/index.js | import {
TAP_ASSERT_DONE,
TAP_PLAN
} from '../actions'
const initialState = {
assertions: {},
currentCount: 0,
nextEstimatedCount: 0,
plan: undefined
}
export default (state = initialState, action) => {
switch (action.type) {
case TAP_ASSERT_DONE:
return {
...state,
assertions:... | import {
TAP_ASSERT_DONE,
TAP_COMMENT,
TAP_PLAN
} from '../actions'
const initialState = {
assertions: {},
currentCount: 0,
lastComment: null,
nextEstimatedCount: 0,
plan: undefined
}
const assertName = (name, lastComment) => (
lastComment
? `[ ${lastComment.replace(/^#\s+/, '')} ] ${name}`
... | Use comments to build the assertion name | Use comments to build the assertion name
| JavaScript | mit | cskeppstedt/electron-tap-view,cskeppstedt/electron-tap-view |
8807d8e4b4e1583cff1b389b3d1d6354395fdff7 | test/test_with_nodeunit.js | test/test_with_nodeunit.js | var utils = require("bolt-internal-utils");
module.exports = {
testStringStartsWith: function(test) {
test.equal(utils.String.startsWith("characters", "c"), true, "Expecting \"characters\" to start with \"c\"");
test.done();
}
} | var utils = require("../utils");
module.exports = {
testStringStartsWith: function(test) {
test.equal(utils.String.startsWith("characters", "c"), true, "Expecting \"characters\" to start with \"c\"");
test.done();
}
} | Put right relative path to 'utils.js' | Put right relative path to 'utils.js'
| JavaScript | mit | Chieze-Franklin/bolt-internal-utils |
79d95c34c3b3b132d95ed47140328298458dad53 | table/static/js/saveAsFile.js | table/static/js/saveAsFile.js | $("#saveAsFile").click(function() {
html2canvas($("#course-table")).then(function(canvas) {
var bgcanvas = document.createElement("canvas");
bgcanvas.width = canvas.width;
bgcanvas.height = canvas.height;
var ctx = bgcanvas.getContext("2d");
var gradient = ctx.createLinearGradient(0, 0, canvas.wid... | $("#saveAsFile").click(function() {
var tmp_attr = $("#course-table").attr("class");
$("#course-table").removeAttr("class");
$("#course-table").css("width", "200%");
$("#course-table").css("height", "auto");
$("#course-table td, th").css("padding", "5px");
$("#course-table").css("font-size", "180%");
html... | Add scale to 200% table output | Add scale to 200% table output
| JavaScript | mit | henryyang42/NTHU_Course,henryyang42/NTHU_Course,leVirve/NTHU_Course,sonicyang/NCKU_Course,leVirve/NTHU_Course,sonicyang/NCKU_Course,henryyang42/NTHU_Course,henryyang42/NTHU_Course,sonicyang/NCKU_Course,sonicyang/NCKU_Course,leVirve/NTHU_Course,leVirve/NTHU_Course |
3d40e7e6a469a59bed25f6f19e3b9595e164ab55 | tests/helpers/start-app.js | tests/helpers/start-app.js | import Ember from 'ember';
import Application from '../../app';
import config from '../../config/environment';
export default function startApp(attrs) {
let application;
// use defaults, but you can override
let attributes = Ember.assign({}, config.APP, attrs);
Ember.run(() => {
application = Application... | import Ember from 'ember';
import Application from '../../app';
import config from '../../config/environment';
export default function startApp() {
let application;
Ember.run(() => {
application = Application.create(config.APP);
application.setupForTesting();
application.injectTestHelpers();
});
... | Make tests run in all versions of Ember from 2.4 LTS onwards | Make tests run in all versions of Ember from 2.4 LTS onwards | JavaScript | mit | minutebase/ember-portal,minutebase/ember-portal |
b10951fb48b5afb916213f44482e657bfee4b17e | tests/integration/links.js | tests/integration/links.js | import {assert} from 'chai'
import {uniq} from 'lodash'
import URI from 'urijs'
import request from 'request'
import events from 'utils/eventsDirectoryToSlideArray'
describe('Event Links', function() {
describe('are valid', function() {
const timeout = 15000
this.timeout(timeout*4)
this.slow(1200)
const even... | import {assert} from 'chai'
import {uniq} from 'lodash'
import URI from 'urijs'
import request from 'request'
import events from 'utils/eventsDirectoryToSlideArray'
describe('Event Links', function() {
describe('are valid', function() {
const maxRedirects = 20
const timeout = 10000
this.timeout(timeout*4)
thi... | Fix possible EventEmitter memory leak console statement | Fix possible EventEmitter memory leak console statement
| JavaScript | mit | L4GG/timeline,L4GG/timeline,L4GG/timeline |
20797136cd834312a2418b0698021413f63a7366 | raw/assets/js/layout/admin/auth/login/admin_auth_login_common_layout.js | raw/assets/js/layout/admin/auth/login/admin_auth_login_common_layout.js | /**
* This <server-gardu-reporter> project created by :
* Name : syafiq
* Date / Time : 28 June 2017, 11:03 PM.
* Email : syafiq.rezpector@gmail.com
* Github : syafiqq
*/
(function ($)
{
$(function ()
{
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
... | /**
* This <server-gardu-reporter> project created by :
* Name : syafiq
* Date / Time : 28 June 2017, 11:03 PM.
* Email : syafiq.rezpector@gmail.com
* Github : syafiqq
*/
(function ($)
{
$(function ()
{
$('form#login').on('submit', function (event)
{
even... | Add initial form submit function | Add initial form submit function
| JavaScript | mit | Syafiqq/server-gardu-reporter,Syafiqq/server-gardu-reporter,Syafiqq/server-gardu-reporter,Syafiqq/server-gardu-reporter |
376f2ccff34e733f01caca72b12f0e4e613429b9 | packages/lesswrong/lib/modules/utils/schemaUtils.js | packages/lesswrong/lib/modules/utils/schemaUtils.js | import Users from 'meteor/vulcan:users';
export const generateIdResolverSingle = ({collectionName, fieldName}) => {
return async (doc, args, context) => {
if (!doc[fieldName]) return null
const { currentUser } = context
const collection = context[collectionName]
const { checkAccess } = collection
... | import Users from 'meteor/vulcan:users';
export const generateIdResolverSingle = ({collectionName, fieldName}) => {
return async (doc, args, context) => {
if (!doc[fieldName]) return null
const { currentUser } = context
const collection = context[collectionName]
const { checkAccess } = collection
... | Add all at once so multi-part fields work | addFieldsDict: Add all at once so multi-part fields work
| JavaScript | mit | Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2 |
4b0beda4f602f48870cb77d6c825e95367105d02 | test/e2e/pages/classesPage.js | test/e2e/pages/classesPage.js | export default {
elements: {
classTableRows: {
selector: '//div[@class="classes-list"]/div[2]/div',
locateStrategy: 'xpath'
}
}
};
| import utils from '../utils';
export default {
elements: {
classesListMenu: {
selector: '//div[@class="classes-list"]/div[1]/div[@class="col-menu"]//button',
locateStrategy: 'xpath'
},
createModalNameInput: {
selector: 'input[name=class]'
},
createModalFieldNameInput: {
se... | Add some selectors in order to not crash other tests | [DASH-2376] Add some selectors in order to not crash other tests
| JavaScript | mit | Syncano/syncano-dashboard,Syncano/syncano-dashboard,Syncano/syncano-dashboard |
6a7350757520d1577a1751041355fa0b1eb9662d | migrations/0002-create-dns-record.js | migrations/0002-create-dns-record.js | 'use strict';
module.exports = {
up: function(queryInterface, Sequelize) {
return queryInterface.createTable('dns_records', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
type: {
type: Sequelize.STRING(4),
... | 'use strict';
module.exports = {
up: function(queryInterface, Sequelize) {
return queryInterface.createTable('dns_records', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
type: {
type: Sequelize.ENUM('A', 'CNAME... | Fix some curious issue on SQL Record insertion | Fix some curious issue on SQL Record insertion
| JavaScript | mit | nowhere-cloud/node-api-gate |
be2ea1d95b5e4764ec9255c1ec3c09db1ab92c14 | src/lib/GoogleApi.js | src/lib/GoogleApi.js | export const GoogleApi = function(opts) {
opts = opts || {};
if (!opts.hasOwnProperty('apiKey')) {
throw new Error('You must pass an apiKey to use GoogleApi');
}
const apiKey = opts.apiKey;
const libraries = opts.libraries || ['places'];
const client = opts.client;
const URL = opts.url || 'https://m... | export const GoogleApi = function(opts) {
opts = opts || {};
if (!opts.hasOwnProperty('apiKey')) {
throw new Error('You must pass an apiKey to use GoogleApi');
}
const apiKey = opts.apiKey;
const libraries = opts.libraries || ['places'];
const client = opts.client;
const URL = opts.url || 'https://m... | Add an error call back param | Add an error call back param
This allows you to set an onError callback function in case the map doesn't load correctly. | JavaScript | mit | fullstackreact/google-maps-react,fullstackreact/google-maps-react |
1ee8f0447a3cee59c695276256ff1d67f6d465ad | plugins/livedesk-embed/gui-resources/scripts/js/core/utils/str.js | plugins/livedesk-embed/gui-resources/scripts/js/core/utils/str.js | define(['utils/utf8'],function(utf8){
str = function(str){
this.init(str);
}
str.prototype = {
init: function(str) {
this.str = str;
},
format: function() {
var arg = arguments, idx = 0;
if (arg.length == 1 && typeof arg[0] == 'object')
arg = arg[0];
return this.str.replace(/%?%(?:\(([^\)]+)... | define(['utils/utf8'],function(utf8){
str = function(str){
this.init(str);
}
str.prototype = {
init: function(str) {
this.str = str;
},
format: function() {
var arg = arguments, idx = 0;
if (arg.length == 1 && typeof arg[0] == 'object')
arg = arg[0];
return utf8.decode(this.str.replace(/%?%(... | Create embed theme for STT | LB-421: Create embed theme for STT
fixed dust utf decode.
| JavaScript | agpl-3.0 | superdesk/Live-Blog,vladnicoara/SDLive-Blog,vladnicoara/SDLive-Blog,superdesk/Live-Blog,vladnicoara/SDLive-Blog,superdesk/Live-Blog,superdesk/Live-Blog |
23367bd69f3b293ec5a338914937c2ae81f11bf5 | web/tailwind.config.js | web/tailwind.config.js | module.exports = {
purge: [],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}
| module.exports = {
purge: [],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
prefix: 'tw-',
}
| Add prefix setting to Tailwind | chore(web): Add prefix setting to Tailwind
| JavaScript | mit | ruedap/nekostagram,ruedap/nekostagram,ruedap/nekostagram,ruedap/nekostagram |
79a3444d39b69a341f4ac9ecc41147bee51b89df | src/common/fermenter/fermenterEnv.js | src/common/fermenter/fermenterEnv.js | import { Record } from 'immutable';
export default Record({
createdAt: null,
temperature: null,
humidity: null,
isValid: false,
errors: 0,
});
| import { Record } from 'immutable';
export default Record({
createdAt: null,
temperature: null,
humidity: null,
isValid: false,
errors: 0,
iterations: 0
});
| Add support for fermenter-iteration attribute. | Add support for fermenter-iteration attribute.
| JavaScript | mit | cjk/smart-home-app |
d967a3c6647697a8e3af70bc9e508843cc534f02 | src/apps/DataObjects/DataObjectsTable/DataObjectsTableDateCell.js | src/apps/DataObjects/DataObjectsTable/DataObjectsTableDateCell.js | import React from 'react';
import Moment from 'moment';
const DataObjectsTableDateCell = ({ content }) => {
const dateValue = content.value;
const date = Moment(dateValue).format('DD/MM/YYYY');
const time = Moment(dateValue).format('LTS');
const title = `${date} ${time}`;
return (
<div title={title}>
... | import React from 'react';
import Moment from 'moment';
const DataObjectsTableDateCell = ({ content }) => {
const date = Moment(content).format('DD/MM/YYYY');
const time = Moment(content).format('LTS');
const title = `${date} ${time}`;
return (
<div title={title}>
{date}
</div>
);
};
export d... | Fix ‘created_at’ and ‘updated_at’ values in data objects table | Fix ‘created_at’ and ‘updated_at’ values in data objects table
| JavaScript | mit | Syncano/syncano-dashboard,Syncano/syncano-dashboard,Syncano/syncano-dashboard |
cd5afa980aa07571f2a094d1243500c3f9d80308 | eventFactory.js | eventFactory.js | var assert = require('assert');
var uuid = require('uuid');
module.exports = {
NewEvent: function(eventType, data, metadata) {
assert(eventType);
assert(data);
var event = {
eventId: uuid.v4(),
eventType: eventType,
data: data
}
if (meta... | var assert = require('assert');
var uuid = require('uuid');
module.exports = {
NewEvent: function(eventType, data, metadata, eventId) {
assert(eventType);
assert(data);
var event = {
eventId: eventId || uuid.v4(),
eventType: eventType,
data: data
... | Add support for custom eventId | Add support for custom eventId
| JavaScript | mit | RemoteMetering/geteventstore-promise,RemoteMetering/geteventstore-promise |
3a1ad0c467e02854c8b8cceda133c698a63fcaca | fateOfAllFools.dev.user.js | fateOfAllFools.dev.user.js | // ==UserScript==
// @author Robert Slifka (GitHub @rslifka)
// @connect docs.google.com
// @connect rslifka.github.io
// @copyright 2017-2018, Robert Slifka (https://github.com/rslifka/fate_of_all_fools)
// @description (DEVELOPMENT) Enhancements to the Destiny Item Manager
// @grant GM_addStyle
/... | // ==UserScript==
// @author Robert Slifka (GitHub @rslifka)
// @connect docs.google.com
// @connect rslifka.github.io
// @copyright 2017-2018, Robert Slifka (https://github.com/rslifka/fate_of_all_fools)
// @description (DEVELOPMENT) Enhancements to the Destiny Item Manager
// @grant GM_addStyle
/... | Update path for local development | Update path for local development
| JavaScript | mit | rslifka/fate_of_all_fools,rslifka/fate_of_all_fools |
1cc390262adb5c03968aee1753bcd1e8aad3b604 | webpack.config.base.js | webpack.config.base.js | /**
* Base webpack config used across other specific configs
*/
const path = require('path');
const validate = require('webpack-validator');
const config = validate({
entry: [
'babel-polyfill',
'./views/components/App.jsx'
],
module: {
loaders: [{
test: /\.jsx?$/,
loaders: ['babel-loa... | /**
* Base webpack config used across other specific configs
*/
const path = require('path');
const validate = require('webpack-validator');
const config = validate({
entry: [
'babel-polyfill',
'./views/App.jsx'
],
module: {
loaders: [{
test: /\.jsx?$/,
loaders: ['babel-loader'],
... | Fix problem launching app with webpack | Fix problem launching app with webpack
| JavaScript | mit | amoshydra/nus-notify,amoshydra/nus-notify |
4c3fa5fa31e24f4633f65060ba3a4e5ee278d6ac | test/multidevice/selectAny.js | test/multidevice/selectAny.js | "use strict";
var assert = require('chai').assert;
var xdTesting = require('../../lib/index')
var templates = require('../../lib/templates');
var q = require('q');
describe('MultiDevice - selectAny', function () {
var test = this;
test.baseUrl = "http://localhost:8090/";
it('should select a single devic... | "use strict";
var assert = require('chai').assert;
var xdTesting = require('../../lib/index')
var templates = require('../../lib/templates');
var q = require('q');
describe('MultiDevice - selectAny', function () {
var test = this;
test.baseUrl = "http://localhost:8090/";
it('should select a single devic... | Update test, fix test size | Update test, fix test size
| JavaScript | mit | spiegelm/xd-testing,spiegelm/xd-testing,spiegelm/xd-testing |
769520bf1ac90987d942cec4e08bd78b34480c5c | app/assets/javascripts/views/experiences/add_image_to_experience_form.js | app/assets/javascripts/views/experiences/add_image_to_experience_form.js | function addImageToExperienceForm(experienceID) {
var assetURL = "/users/" + getCurrentUser() + "/assets/new"
$.ajax({
method: "get",
url: assetURL,
})
.done(function(response){
var postURL = "/users/" + getCurrentUser() + "/assets"
clearMainFrame()
hideMainMenu()
var $experienceID = $("... | function addImageToExperienceForm(experienceID) {
var assetURL = "/users/" + getCurrentUser() + "/assets/new"
$.ajax({
method: "get",
url: assetURL,
})
.done(function(response){
var postURL = "/users/" + getCurrentUser() + "/assets"
clearMainFrame()
hideMainMenu()
var $experienceID = $("... | Add submit button to upload images dialog | Add submit button to upload images dialog
| JavaScript | mit | dma315/ambrosia,dma315/ambrosia,dma315/ambrosia |
df46bb81776cba0723fa09a686bd13a2bb9ccd7d | public/js/app/controllers/ApplicationController.js | public/js/app/controllers/ApplicationController.js | define(["app/app",
"ember"], function(App, Ember) {
"use strict";
App.ApplicationController = Ember.Controller.extend({
hasMessage: function() {
var message = this.get('session.message')
return message && message.length > 0
}.property('session.message'),
displayError: function(erro... | define(["app/app",
"ember"], function(App, Ember) {
"use strict";
App.ApplicationController = Ember.Controller.extend({
hasMessage: function() {
var message = this.get('session.message')
return message && message.length > 0
}.property('session.message'),
displayError: function(erro... | Remove info message after 5sec. | Remove info message after 5sec.
| JavaScript | mit | pepyatka/pepyatka-html,dsumin/freefeed-html,pepyatka/pepyatka-html,FreeFeed/freefeed-html,SiTLar/pepyatka-html,FreeFeed/freefeed-html,dsumin/freefeed-html,epicmonkey/pepyatka-html,SiTLar/pepyatka-html,epicmonkey/pepyatka-html |
4022f0ad98948a27db464f2f11e84c811c3a1165 | lib/emitters/custom-event-emitter.js | lib/emitters/custom-event-emitter.js | var util = require("util")
, EventEmitter = require("events").EventEmitter
module.exports = (function() {
var CustomEventEmitter = function(fct) {
this.fct = fct;
var self = this;
process.nextTick(function() {
if (self.fct) {
self.fct.call(self, self)
}
}.bind(this));
... | var util = require("util")
, EventEmitter = require("events").EventEmitter
module.exports = (function() {
var CustomEventEmitter = function(fct) {
this.fct = fct;
var self = this;
}
util.inherits(CustomEventEmitter, EventEmitter)
CustomEventEmitter.prototype.run = function() {
var self =... | Move process.nextTick() to run() method | Move process.nextTick() to run() method
Hope this fixes the tests. Thanks @janmeier
| JavaScript | mit | IrfanBaqui/sequelize |
d968fe324bddd13c645d75aa874c811cfcc98056 | server/helpers/encrypt.js | server/helpers/encrypt.js | import bcrypt from 'bcrypt';
module.exports = {
encryptPassword(password) {
const passwordHash = bcrypt.hashSync(password, 10);
return passwordHash;
},
};
| import bcrypt from 'bcrypt';
module.exports = {
encryptPassword(password) {
// const passwordHash = bcrypt.hashSync(password, 10);
// return passwordHash;
const salt = bcrypt.genSaltSync(10);
const hash = bcrypt.hashSync(password, salt);
return {
hash,
salt
};
},
};
| Edit function for password validation | Edit function for password validation
| JavaScript | mit | 3m3kalionel/PostIt,3m3kalionel/PostIt |
5993e26d58c3bc099bdc01b71166fe8814289667 | server/migrations/20170625133452-create-message.js | server/migrations/20170625133452-create-message.js | module.exports = {
up: (queryInterface, Sequelize) => queryInterface.createTable('Messages', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
content: {
type: Sequelize.STRING
},
createdAt: {
allowNull: false,
typ... | module.exports = {
up: (queryInterface, Sequelize) => queryInterface.createTable('Messages', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
content: {
type: Sequelize.STRING
},
createdAt: {
allowNull: false,
typ... | Delete references field to fix userId and groupId bugs | Delete references field to fix userId and groupId bugs
| JavaScript | mit | 3m3kalionel/PostIt,3m3kalionel/PostIt |
23d7bce1eab8f6b770ab2c527c23c3c0908ce907 | function/_define-length.js | function/_define-length.js | 'use strict';
var test = function (a, b) {}, desc, defineProperty
, generate, mixin;
try {
Object.defineProperty(test, 'length', { configurable: true, writable: false,
enumerable: false, value: 1 });
} catch (ignore) {}
if (test.length === 1) {
// ES6
desc = { configurable: true, writable: false, enumerable: ... | 'use strict';
var toUint = require('../number/to-uint')
, test = function (a, b) {}, desc, defineProperty
, generate, mixin;
try {
Object.defineProperty(test, 'length', { configurable: true, writable: false,
enumerable: false, value: 1 });
} catch (ignore) {}
if (test.length === 1) {
// ES6
desc = { configu... | Return same function if length doesn't differ | Return same function if length doesn't differ
| JavaScript | isc | medikoo/es5-ext |
bba2cfe90230b4b4d8120c61b90ede8cc8febb0a | frontend/reducers/index.js | frontend/reducers/index.js | import Shogi from '../src/shogi';
import * as CONST from '../constants/actionTypes';
const InitialState = {
board: Shogi.Board,
isHoldingPiece: undefined
};
const ShogiReducer = (state = InitialState, action) => {
switch (action.type) {
case CONST.HOLD_PIECE:
if (action.piece.type == '*') {
return s... | import Shogi from '../src/shogi';
import * as CONST from '../constants/actionTypes';
const InitialState = {
board: Shogi.Board,
isHoldingPiece: undefined
};
const ShogiReducer = (state = InitialState, action) => {
switch (action.type) {
case CONST.HOLD_PIECE:
if (action.piece.type == '*') {
return s... | Use let instead of var | Use let instead of var
| JavaScript | mit | mgi166/usi-front,mgi166/usi-front |
9efb161d405226438d27a73c628f49b445e01aa6 | gatsby-browser.js | gatsby-browser.js | import React from 'react'
import ComponentRenderer from './src/templates/component-renderer-with-pagination'
exports.replaceComponentRenderer = ({ props, loader }) => {
if (props.layout) {
return null
}
return <ComponentRenderer {...props} loader={loader} />
}
| import React from 'react'
import ComponentRenderer from './src/templates/component-renderer-with-pagination'
export default {
replaceComponentRenderer: ({ props, loader }) => {
if (props.layout) {
return null
}
return <ComponentRenderer {...props} loader={loader} />
}
}
| Convert to either pure CommonJS or pure ES6 (ES6, in this case) | Convert to either pure CommonJS or pure ES6 (ES6, in this case)
| JavaScript | mit | LuisLoureiro/placard-wrapper |
15c6f23ff43b1dcc1056c9d63bd7df10b79e65be | Gruntfile.js | Gruntfile.js | module.exports = function (grunt) {
// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
igv: {
src: [
'js/**/*.js',
'vendor/inflate.js',
'vendor/zlib_and... | module.exports = function (grunt) {
// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
igv: {
src: [
'js/**/*.js',
'vendor/inflate.js',
'vendor/zlib_and... | Create sourceMap for minified js | Create sourceMap for minified js
| JavaScript | mit | igvteam/igv.js,NabaviLab/CNV-Visualizer,NabaviLab/CNV-Visualizer,NabaviLab/CNV-Visualizer,NabaviLab/CNV-Visualizer,NabaviLab/CNV-Visualizer,igvteam/igv.js |
2a5c56794ba90d34efff284e4771b5922f70c1e4 | app/assets/javascripts/solidus_paypal_braintree/frontend.js | app/assets/javascripts/solidus_paypal_braintree/frontend.js | // This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directl... | // This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directl... | Add braintree_error script into manifest | Add braintree_error script into manifest
| JavaScript | bsd-3-clause | solidusio/solidus_paypal_braintree,solidusio/solidus_paypal_braintree,solidusio/solidus_paypal_braintree,solidusio/solidus_paypal_braintree |
35fdaf00c8e11976b9bcc1dc03b661d4281ff012 | teamcity-reporter.js | teamcity-reporter.js | 'use strict';
var util = require('util');
/**
* @param {Errors[]} errorsCollection
*/
module.exports = function(errorsCollection) {
var errorCount = 0;
/**
* Formatting every error set.
*/
errorsCollection.forEach(function(errors) {
var file = errors.getFilename();
console.log(u... | "use strict";
var util = require("util");
/**
* @param {Errors[]} errorsCollection
*/
module.exports = function(errorsCollection) {
var errorCount = 0;
console.log(util.format("##teamcity[testSuiteStarted name='JSCS']"));
/**
* Formatting every error set.
*/
errorsCollection.forEach(funct... | Fix format of messages for teamcity: 1. Replace " by ' - because Teamcity can't process messages with " 2. Change messages structrure | Fix format of messages for teamcity:
1. Replace " by ' - because Teamcity can't process messages with "
2. Change messages structrure
| JavaScript | mit | wurmr/jscs-teamcity-reporter |
63d22bfa615b999e0601da71acae794af3ee4865 | component.js | component.js | // This is a function that decorates React's createClass.
// It's used only internally in this library,
// but could be used externally eventually.
// See the mixins for more information on what this does.
var UI = require('reapp-ui');
var Component = require('reapp-component')();
var React = require('react');
var Id... | // This is a function that decorates React's createClass.
// It's used only internally in this library,
// but could be used externally eventually.
// See the mixins for more information on what this does.
var UI = require('reapp-ui');
var Component = require('reapp-component')();
var React = require('react');
var Id... | Remove tappable by default mixin | Remove tappable by default mixin
| JavaScript | mit | Lupino/reapp-ui,oToUC/reapp-ui,jhopper28/reapp-ui,zackp30/reapp-ui,srounce/reapp-ui,zenlambda/reapp-ui,reapp/reapp-ui |
0ec851372caa9309df9651126d71361d8163f889 | app/components/crate-toml-copy.js | app/components/crate-toml-copy.js | import { action } from '@ember/object';
import { later } from '@ember/runloop';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
export default class CrateTomlCopy extends Component {
@tracked showSuccess = false;
@tracked showNotification = false;
toggleClipboardProps(is... | import { action } from '@ember/object';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { rawTimeout, task } from 'ember-concurrency';
export default class CrateTomlCopy extends Component {
@tracked showSuccess = false;
@tracked showNotification = false;
@(task(f... | Convert `toggleClipboardProps()` to ember-concurrency task | CrateTomlCopy: Convert `toggleClipboardProps()` to ember-concurrency task
| JavaScript | apache-2.0 | rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io |
896a87b740c5e228a81f23a11a26845aa849e346 | constants.js | constants.js | // URLs grom telegram
const TELEGRAM_BASE_URL = 'https://api.telegram.org';
const TELEGRAM_MESSAGE_PHOTO_ENDPOINT = '/sendPhoto';
const DEFAULT_PHOTO_URL = 'http://media.salemwebnetwork.com/cms/CROSSCARDS/17343-im-sorry-pug.jpg';
// URLs from giphy
const {GIPHY_PUBLIC_API_KEY} = require('./variables');
const GIPHY_BA... | // URLs grom telegram
const TELEGRAM_BASE_URL = 'https://api.telegram.org';
const TELEGRAM_MESSAGE_GIF_ENDPOINT = '/sendVideo';
const DEFAULT_GIF_URL = 'http://gph.is/1KuNTVa';
// URLs from giphy
const {GIPHY_PUBLIC_API_KEY} = require('./variables');
const GIPHY_BASE_URL = 'http://api.giphy.com';
const GIPHY_API_KEY_... | Rename parameters from photo to gif to get more meaningful names | Rename parameters from photo to gif to get more meaningful names
| JavaScript | apache-2.0 | bserh/giphify_bot |
461281865ccd7521f25b2d4e893eb55c036f56dc | static/js/crowdsource.interceptor.js | static/js/crowdsource.interceptor.js | /**
* Date: 1/9/15
* Author: Shirish Goyal
*/
(function () {
'use strict';
angular
.module('crowdsource.interceptor', [])
.factory('AuthHttpResponseInterceptor', AuthHttpResponseInterceptor);
AuthHttpResponseInterceptor.$inject = ['$location', '$log', '$injector', '$q'];
function AuthHttpResponseInterc... | /**
* Date: 1/9/15
* Author: Shirish Goyal
*/
(function () {
'use strict';
angular
.module('crowdsource.interceptor', [])
.factory('AuthHttpResponseInterceptor', AuthHttpResponseInterceptor);
AuthHttpResponseInterceptor.$inject = ['$location', '$log', '$injector', '$q'];
function AuthHttpResponseInterc... | Remove deferred as not needed | Remove deferred as not needed
| JavaScript | mit | crowdresearch/crowdsource-platform,crowdresearch/crowdsource-platform,crowdresearch/daemo,rakshit-agrawal/crowdsource-platform,Milstein/crowdsource-platform,DESHRAJ/crowdsource-platform,Macbull/crowdsource-platform,crowdresearch/daemo,xasos/crowdsource-platform,crowdresearch/crowdsource-platform,shirishgoyal/crowdsourc... |
d19a0feb10b945a14e5bc0da69d3b47eea6fd47a | packages/mastic-node-server/start.js | packages/mastic-node-server/start.js | const mastic = require('./server.js');
const { promise } = require('mastic-polyfills/bundles');
const server = mastic({
polyfills: [promise]
});
server.listen();
| const mastic = require('./server.js');
const bundles = require('mastic-polyfills/bundles');
const server = mastic({
polyfills: Object.keys(bundles).map(bundleName => bundles[bundleName])
});
server.listen();
| Load all default mastic polyfills in server | Load all default mastic polyfills in server
| JavaScript | mit | thibthib/mastic |
a441848f22a460a462280c885e4cf53b8eed672b | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
// load all tasks from package.json
require('load-grunt-config')(grunt);
require('time-grunt')(grunt);
/**
* TASKS
*/
// build everything ready for a commit
grunt.registerTask('build', ['img', 'css', 'js']);
// just CSS
grunt.registerTask('css', ['sass', 'cssmi... | module.exports = function(grunt) {
// load all tasks from package.json
require('load-grunt-config')(grunt);
require('time-grunt')(grunt);
/**
* TASKS
*/
// build everything ready for a commit
grunt.registerTask('build', ['css', 'js']);
// just CSS
grunt.registerTask('css', ['sass', 'cssmin']);
... | Remove img task from grunt build | Remove img task from grunt build
As it takes ages, and it always seems to change the images every time someone else runs it. Probably no one else will ever need to update the images, or very rarely, in which case they can manually run the build img task.
| JavaScript | mit | jackocnr/intl-tel-input,jackocnr/intl-tel-input,Bluefieldscom/intl-tel-input,Bluefieldscom/intl-tel-input |
874886cda57b80b5f06a9e3003bd9e20c6601feb | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
"babel": {
options: {
sourceMap: false
},
dist: {
files: [
{
"expand": true,
"cwd": "modules/",
"src": ["**/*.js"],
"dest": "dist",
"ext": ".js"
}]
}
... | module.exports = function(grunt) {
grunt.initConfig({
"babel": {
options: {
sourceMap: false,
presets: ['es2015']
},
dist: {
files: [
{
"expand": true,
"cwd": "modules/",
"src": ["**/*.js"],
"dest": "dist",
"ext": ... | Add es2015 preset to babel | Add es2015 preset to babel
| JavaScript | mit | simonlovesyou/file-wipe |
fc0bcc9db1e93a520706d21e8766ad38ac1fe00f | public/src/bacon-0.0.1.js | public/src/bacon-0.0.1.js |
(function() {
var metaKeyword = '';
var src = window.location.href;
var metas = document.getElementsByTagName('meta');
for (i in metas) {
console.log(metas[i]);
if (metas[i].name && metas[i].name.indexOf('keyword') > -1) {
metaKeyword += metas[i].content;
}
}
console.log(metaKeyword, s... |
(function() {
var metaKeyword = '';
var baconServerUrl = "http://127.0.0.1";
var src = window.location.href;
var metas = document.getElementsByTagName('meta');
for (i in metas) {
if (metas[i].name && metas[i].name.indexOf('keyword') > -1) {
metaKeyword += metas[i].content;
}
}
var divs =... | Add front end ajax call | Add front end ajax call
| JavaScript | mit | codingtwinky/itchy-octo-fibula |
bd42878d39a42486565548f0c4cc69fcf4e7ce69 | test/web-platform.js | test/web-platform.js | "use strict";
/*global describe */
/*global it */
const assert = require("assert");
const fs = require("fs");
const URL = require("../lib/url").URL;
const uRLTestParser = require("./web-platform-tests/urltestparser");
const testCases = fs.readFileSync(__dirname + "/web-platform-tests/urltestdata.txt", { encoding: "ut... | "use strict";
/*global describe */
/*global it */
const assert = require("assert");
const fs = require("fs");
const URL = require("../lib/url").URL;
const uRLTestParser = require("./web-platform-tests/urltestparser");
const testCases = fs.readFileSync(__dirname + "/web-platform-tests/urltestdata.txt", { encoding: "ut... | Move function creation out of loop | Move function creation out of loop
Linter complained (it's not actually moved out of it though, function creation still occurs within the loop)
| JavaScript | mit | jsdom/whatwg-url,jsdom/whatwg-url,aaronshaf/whatwg-url,tilgovi/whatwg-url,jsdom/whatwg-url |
c606a7d8c4bd008098e6bda631b13cefe96cc82f | lib/collections/notifications.js | lib/collections/notifications.js | Notifications = new Mongo.Collection('notifications');
// TODO add allow/deny rules
// user is owner of project - deny
// user is not logged in - deny
createRequestNotification = function(request) {
check(request, {
user: Object,
project: Object,
createdAt: Date,
status: String
});
Notification... | Notifications = new Mongo.Collection('notifications');
// TODO add allow/deny rules
// user is owner of project - deny
// user is not logged in - deny
createRequestNotification = function(request) {
check(request, {
user: Object,
project: Object,
createdAt: Date,
status: String,
_id: String
})... | Add new fields and add method to set notification as read | Add new fields and add method to set notification as read
| JavaScript | mit | PUMATeam/puma,PUMATeam/puma |
d2bfa4fc9abb6b47cd5c2c64652d315e9a0d1699 | app/assets/javascripts/pageflow/slideshow/hidden_text_indicator_widget.js | app/assets/javascripts/pageflow/slideshow/hidden_text_indicator_widget.js | (function($) {
$.widget('pageflow.hiddenTextIndicator', {
_create: function() {
var parent = this.options.parent,
that = this;
parent.on('pageactivate', function(event) {
that.element.toggleClass('invert', $(event.target).hasClass('invert'));
that.element.toggleClass('hidden... | (function($) {
$.widget('pageflow.hiddenTextIndicator', {
_create: function() {
var parent = this.options.parent,
that = this;
parent.on('pageactivate', function(event) {
var pageOrPageWrapper = $(event.target).add('.content_and_background', event.target);
that.element.togg... | Allow setting hide text related css classes on wrapper | Allow setting hide text related css classes on wrapper
So far the css classes `hide_content_with_text` and
`no_hidden_text_indicator` had to be present on the page's `section`
element. Allowing them also on the `.content_and_background` wrapper
element makes things much easer to control for page types since that
eleme... | JavaScript | mit | tf/pageflow,tf/pageflow-dependabot-test,codevise/pageflow,Modularfield/pageflow,tf/pageflow-dependabot-test,tf/pageflow,Modularfield/pageflow,codevise/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow,Modularfield/pageflow,tf/pageflow-dependabot-test,tf/pageflow-dependabot-test,codevise/pageflow,Modularfield/pageflow,... |
bf2c1b5f09c348f172846087db10344f53bd3c44 | js/MidiInput.js | js/MidiInput.js | var MidiInput = function() {
this.init = function(visualizer) {
this.visualizer = visualizer;
if (navigator.requestMIDIAccess) {
navigator.requestMIDIAccess().then(onMidiSuccess, onMidiReject);
} else {
console.log('No MIDI support: navigator.requestMIDIAccess is not defined');
}
};
... | var MidiInput = function() {
this.init = function(visualizer) {
this.visualizer = visualizer;
if (navigator.requestMIDIAccess) {
navigator.requestMIDIAccess().then(onMidiSuccess.bind(this), onMidiReject);
} else {
console.log('No MIDI support: navigator.requestMIDIAccess is not defined');
... | Read note on and control change events from MIDI input | Read note on and control change events from MIDI input
| JavaScript | mit | jakate/AudioViz,jakate/AudioViz,jakate/AudioViz |
102e8120046d6a39aa0db05961288fec320eb3f3 | tests/unit/helpers/upload-validation-active-test.js | tests/unit/helpers/upload-validation-active-test.js |
import { uploadValidationActive } from 'preprint-service/helpers/upload-validation-active';
import { module, test } from 'qunit';
module('Unit | Helper | upload validation active');
// Replace this with your real tests.
test('it works', function(assert) {
var editMode = true;
var nodeLocked = true;
var h... |
import { uploadValidationActive } from 'preprint-service/helpers/upload-validation-active';
import { module, test } from 'qunit';
module('Unit | Helper | upload validation active');
test('edit mode upload validation active', function(assert) {
var editMode = true;
var nodeLocked = true;
var hasOpened = t... | Add tests for upload-validation-active helper. | Add tests for upload-validation-active helper.
| JavaScript | apache-2.0 | caneruguz/ember-preprints,caneruguz/ember-preprints,laurenrevere/ember-preprints,CenterForOpenScience/ember-preprints,baylee-d/ember-preprints,laurenrevere/ember-preprints,baylee-d/ember-preprints,CenterForOpenScience/ember-preprints |
d8a312185800fd7ee32f7a1bbe590cca63beb32e | lib/modules/apostrophe-search/public/js/always.js | lib/modules/apostrophe-search/public/js/always.js | $(function() {
$('body').on('click', '[data-apos-search-filter]', function() {
$(this).closest('form').submit();
});
$('body').on('keyup', '[data-apos-search-field]').keyup(function (e) {
if (e.keyCode == 13) {
$(this).closest('form').submit();
return false;
}
});
});
| $(function() {
$('body').on('click', '[data-apos-search-filter]', function() {
$(this).closest('form').submit();
});
$('body').on('keyup', '[data-apos-search-field]', function (e) {
if (e.keyCode == 13) {
$(this).closest('form').submit();
return false;
}
});
});
| Fix typo on a keyup handler that was causing chrome to throw errors on every key press | Fix typo on a keyup handler that was causing chrome to throw errors on every key press
| JavaScript | mit | punkave/apostrophe,punkave/apostrophe |
fbf1c83e2fce602a7c7d19ac78372309b6b86be7 | script.js | script.js | /**
* Script for AutoTabber
* Handles Tab Keypress
* @author MarcosBL <soy@marcosbl.com>
*/
/* DOKUWIKI:include taboverride.js */
/* DOKUWIKI:include taboverride.escape.js */
jQuery(window).load(function(){
var textareas = document.getElementsByTagName('textarea');
tabOverride.set(textareas).tabSiz... | /**
* Script for AutoTabber
* Handles Tab Keypress
* @author MarcosBL <soy@marcosbl.com>
*/
/* DOKUWIKI:include taboverride.js */
/* DOKUWIKI:include taboverride.escape.js */
jQuery(window).on('load', function(){
var textareas = document.getElementsByTagName('textarea');
tabOverride.set(textareas).... | Fix exception for 'load' on jQuery 1.8 and above | Fix exception for 'load' on jQuery 1.8 and above
The 'load' event has been deprecated for a couple of years, and thus broke the plugin. | JavaScript | apache-2.0 | MarcosBL/dokuwiki-plugin-autotabber |
396a996b4c49e3230fea28590bcebeeb461b4622 | backend/app/assets/javascripts/spree/backend/translation.js | backend/app/assets/javascripts/spree/backend/translation.js | (function() {
// Resolves string keys with dots in a deeply nested object
// http://stackoverflow.com/a/22129960/4405214
var resolveObject = function(path, obj) {
return path
.split('.')
.reduce(function(prev, curr) {
return prev && prev[curr];
}, obj || self);
}
Spree.t = funct... | (function() {
// Resolves string keys with dots in a deeply nested object
// http://stackoverflow.com/a/22129960/4405214
var resolveObject = function(path, obj) {
return path
.split('.')
.reduce(function(prev, curr) {
return prev && prev[curr];
}, obj || self);
}
Spree.t = funct... | Use console.warn instead of console.error | Use console.warn instead of console.error
| JavaScript | bsd-3-clause | pervino/solidus,pervino/solidus,pervino/solidus,pervino/solidus |
6034574f1299343c7df07cfbb65b889fd8b526fd | src/actions/appActions.js | src/actions/appActions.js | export function changeLocation(location) {
return {
type: 'CHANGE_LOCATION',
location
};
}
export function changeUnitType(unitType) {
return {
type: 'CHANGE_UNIT_TYPE',
unitType
};
}
export function setAlert({type, message}) {
return {
type: 'SET_ALERT',
alert: {
type,
me... | export function changeLocation(location) {
return {
type: 'CHANGE_LOCATION',
location
};
}
export function changeUnitType(unitType) {
return {
type: 'CHANGE_UNIT_TYPE',
unitType
};
}
export function setAlert({type, message}) {
return {
type: 'SET_ALERT',
alert: {
type,
me... | Add hide alert action creator | Add hide alert action creator
| JavaScript | mit | JavierPDev/Weather-D3,JavierPDev/Weather-D3 |
3ee7ed2698db579ec2d8b4cb6c6c4afc509993c2 | lib/core/abstract-component.js | lib/core/abstract-component.js | /** @babel */
import etch from 'etch'
import {CompositeDisposable} from 'atom'
export default class AbstractComponent {
constructor(properties, children, callback) {
if (properties) this.properties = properties
else this.properties = {}
if (children) this.children = children
else this.children = []... | /** @babel */
import etch from 'etch'
import {Emitter, CompositeDisposable} from 'atom'
export default class AbstractComponent {
constructor(properties, children, callback) {
if (properties) this.properties = properties
else this.properties = {}
if (children) this.children = children
else this.chil... | Add an emitter to AbstractComponent | Add an emitter to AbstractComponent
| JavaScript | unlicense | berenm/xoreos-editor,berenm/game-data-explorer |
12ed1dbfd2cfa2d9c5ef9dd93b1ede0e28c32fdf | bin/ballz-repl.js | bin/ballz-repl.js | #!/usr/bin/env node
/*!
* BALLZ repl module
*
* @author pfleidi
*/
var Readline = require('readline');
var Util = require('util');
var Parser = require('../lib/parser');
var Environment = require('../lib/environment');
var interpreter = require('../lib/interpreter').createInterpreter(
Environment.createEnviron... | #!/usr/bin/env node
/*!
* BALLZ repl module
*
* @author pfleidi
*/
var Readline = require('readline');
var Eyes = require('eyes');
var Parser = require('../lib/parser');
var Environment = require('../lib/environment');
var interpreter = require('../lib/interpreter').createInterpreter(
Environment.createEnviron... | Add colored output to repl | Add colored output to repl
| JavaScript | mit | pfleidi/ballz.js |
d7e2221203de3f69a952ae02562d8e6556ae1087 | test/functional/cucumber/step_definitions/commonSteps.js | test/functional/cucumber/step_definitions/commonSteps.js | var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
var expect = chai.expect;
module.exports = function() {
disclaimer = element(by.css('div.disclaimer'));
this.Given(/^that I am at the HMDA homepage$/, function(next) {
browser.get('http://dev.hmda... | var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
var expect = chai.expect;
module.exports = function() {
disclaimer = element(by.css('div.disclaimer'));
this.Given(/^that I am at the HMDA homepage$/, function(next) {
passwordBox = element.all(by... | Set up tests to log in on first getting to the site | Set up tests to log in on first getting to the site
| JavaScript | cc0-1.0 | LinuxBozo/hmda-pilot,LinuxBozo/hmda-pilot,cfpb/hmda-pilot,cfpb/hmda-pilot,LinuxBozo/hmda-pilot,cfpb/hmda-pilot |
c596901ffce073b75635fe86000b5911e2d98cf7 | packages/app/source/client/controllers/layout-controller.js | packages/app/source/client/controllers/layout-controller.js | Space.Object.extend('Todos.LayoutController', {
mixin: [
Space.messaging.EventSubscribing
],
dependencies: {
layout: 'Layout',
_: 'underscore'
},
Constructor() {
this._currentLayout = null;
this._currentSections = {};
},
eventSubscriptions() {
return [{
'Todos.RouteTrigge... | Space.Object.extend('Todos.LayoutController', {
mixin: [
Space.messaging.EventSubscribing
],
dependencies: {
layout: 'Layout',
_: 'underscore'
},
_currentLayout: null,
_currentSections: {},
eventSubscriptions() {
return [{
'Todos.RouteTriggered': function(event) {
switch... | Refactor layout controllers layout attributes to static members | Refactor layout controllers layout attributes to static members
| JavaScript | mit | meteor-space/todos,meteor-space/todos,meteor-space/todos |
6b3ad70d9bd6c0559adc067fc432174689e3012b | angular-web-applications/src/scripts/app.js | angular-web-applications/src/scripts/app.js | (function () {
// Set to true to show console.log for debugging
var DEBUG_MODE = true;
'use strict';
var Slide = function (title) {
// Constructor
this.title = title;
this.eleRef = null;
};
Slide.prototype.SetReference = function (dom) {
this.eleRef = dom;
... | (function () {
// Set to true to show console.log for debugging
var DEBUG_MODE = true;
'use strict';
var Slide = function (title) {
// Constructor
this.title = title;
this.eleRef = null;
};
Slide.prototype.SetReference = function (dom) {
this.eleRef = dom;
... | Set each slide to have it's own z-index. | Set each slide to have it's own z-index.
| JavaScript | mit | renesansz/presentations,renesansz/presentations |
8e23e794a17df6638f060284b272d6b99691f269 | src/App/Body/Display/Summary/SummaryBody/summaryFunctions/isEnterprise.js | src/App/Body/Display/Summary/SummaryBody/summaryFunctions/isEnterprise.js | import { withName } from './shared';
import { FEATURES } from 'data/columns';
export default function isEnterprise(modules) {
const serverModule = modules.find(withName('SERVER'));
const hasFeatures = /[CDEFSW]/.test(serverModule[FEATURES]);
const hasModules = ['WSINPUT', 'WSOUTPUT', 'ECOPY'].some(name => (
... | import { withName } from './shared';
export default function isEnterprise(modules) {
const hasModules = ['WSINPUT', 'WSOUTPUT', 'ECOPY'].some(name => (
modules.some(withName(name))
));
return hasModules;
}
| Stop checking server features to determine enterprise vs. standard | Stop checking server features to determine enterprise vs. standard
| JavaScript | cc0-1.0 | ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer |
5cf04bb912fc64d119a5c0c2693e9e2fa0823e4f | src/geom/Vector2.js | src/geom/Vector2.js | export default class Vector2 {
constructor(x = 0, y = 0) {
this.x = x;
this.y = y;
}
set(x, y) {
this.x = x;
this.y = y;
return this;
}
add(vec2) {
this.x = vec2.x;
this.y = vec2.y;
return this;
}
subtract(vec2) {
th... | export default class Vector2 {
constructor(x = 0, y = 0) {
this.x = x;
this.y = y;
}
set(x, y) {
this.x = x;
this.y = y;
return this;
}
add(vec2) {
this.x = vec2.x;
this.y = vec2.y;
return this;
}
subtract(vec2) {
th... | Implement scalar/vector multiply and divide | Implement scalar/vector multiply and divide
| JavaScript | mit | lucidfext/light2d-es6 |
2c067908d8fae5425e2568c43f0501021caf172b | src/components/Nav/Nav.js | src/components/Nav/Nav.js | import React from 'react';
import classnames from 'classnames';
import { GridContainer, GridRow, GridCol } from '../Grid';
const Nav = props => (
<div
className={classnames('ui-nav', {
'ui-nav-fixed': props.fixed,
'ui-nav-inverse': props.inverse,
})}
>
<GridContainer fluid>
<GridRow>
... | import React from 'react';
import classnames from 'classnames';
function Nav({ inverse, children, fixed, prefix }) {
const className = classnames('ui-nav', {
'ui-nav-fixed': fixed,
'ui-nav-inverse': inverse,
});
return (
<div className={className}>
{prefix && <div className="ui-nav-prefix">{pr... | Enhance nav component and introduce prefix prop | Enhance nav component and introduce prefix prop
| JavaScript | mit | wundery/wundery-ui-react,wundery/wundery-ui-react |
7d162867c86ae3c2952b167245898d78ee0f1468 | server.js | server.js | var express = require('express');
var app = express();
var config = require('./config');
var bodyParser = require('body-parser');
var morgan = require('morgan')
var mongoose = require('mongoose');
var Recording = require('./models/measurement');
var Station = require('./models/station');
var measurements = require... | var express = require('express');
var app = express();
var config = require('./config');
var bodyParser = require('body-parser');
var morgan = require('morgan')
var mongoose = require('mongoose');
var Recording = require('./models/measurement');
var Station = require('./models/station');
var measurements = require... | Change URLs so they can live aside eachother. | Change URLs so they can live aside eachother.
Exception: /wrm.aspx for saving... | JavaScript | apache-2.0 | vindsiden/vindsiden-server |
0f077bd8eaf30107a691b60c9500fe0c71d0dad0 | src/docs/ComponentPage.js | src/docs/ComponentPage.js | import React from 'react';
import PropTypes from 'prop-types';
import Example from './Example';
import Props from './Props';
const ComponentPage = ({component}) => {
const {name, description, props, examples} = component;
return (
<div className="componentpage">
<h2>{name}</h2>
<p>{description}</p... | import React from 'react';
import PropTypes from 'prop-types';
import Example from './Example';
import Props from './Props';
const ComponentPage = ({component}) => {
const {name, description, props, examples} = component;
return (
<div className="componentpage">
<h2>{name}</h2>
<p>{description}</p... | Switch to a truly unique key | Switch to a truly unique key
| JavaScript | mit | coryhouse/ps-react,coryhouse/ps-react |
9bc6041852edacb2eb85bf31b5aa5a2e0a67dc28 | server/trello-microservice/src/utils/passportMiddleweare.js | server/trello-microservice/src/utils/passportMiddleweare.js | import fetch from 'node-fetch';
import { userModel } from '../models/index';
export const authenticatedWithToken = (req, res, next) => {
let csrf;
let jwt;
if (req && req.cookies && req.headers){
csrf = req.headers.csrf;
jwt = req.cookies.jwt;
const opts = {
headers: {
csrf,
... | import fetch from 'node-fetch';
import { userModel } from '../models/index';
export const authenticatedWithToken = async (req, res, next) => {
if (req && req.cookies && req.cookies.jwt && req.headers && req.headers.csrf) {
let csrf = req.headers.csrf;
let jwt = req.cookies.jwt;
const opts = {
hea... | Replace promise with async await and handle error cases | Replace promise with async await and handle error cases
| JavaScript | mit | Madmous/madClones,Madmous/madClones,Madmous/madClones,Madmous/Trello-Clone,Madmous/Trello-Clone,Madmous/madClones,Madmous/Trello-Clone |
46924430441a011b105a6874f72061ddd2c9fe02 | spec/readFile.spec.js | spec/readFile.spec.js | var path = require('path'),
fs = require('fs'),
crypto = require('crypto');
describe("readFile functionality", function() {
var _this = this;
require('./harness.js')(_this);
it("creates a directory", function(done) {
var fname = "testDir";
var resolved = path.resolve(_this.tempdir, ... | var path = require('path'),
fs = require('fs'),
crypto = require('crypto');
describe("readFile functionality", function() {
var _this = this;
require('./harness.js')(_this);
it("reads a file", function(done) {
var fname = "testDir";
var resolved = path.resolve(_this.tempdir, fname);... | Fix name of readFile test | Fix name of readFile test
| JavaScript | bsd-2-clause | terribleplan/WorkingDirectory |
d0b0423b2d4ef343d09bb27063d8b8162fb7d466 | day10/10.js | day10/10.js | // look for groups of matching characters
// pass each group to say() and concatenate returns
var look = function(lookString) {
var i = 0;
var j = 1;
var sayString = '';
while (i < lookString.length) {
while (lookString[i] === lookString[j]) {
j++;
}
sayString += say(lookString.slice(i,j));
... | // Look for groups of matching characters.
// Map the conversion function to each.
// Join & return the new string.
var convert = function(input) {
var groups = input.match(/(\d)\1*/g);
return groups.map(s => s.length + s[0]).join('');
}
// run look-and-say on a given input n times and
// print the result's length... | Refactor solution to use regex and map | Refactor solution to use regex and map
| JavaScript | mit | ptmccarthy/advent-of-code |
f1edda2564b4ee70bbd151ed79b26991d575e4e4 | src/ErrorReporting.js | src/ErrorReporting.js | import React, { Component } from 'react';
import { connect } from 'react-redux';
import Snackbar from 'material-ui/Snackbar';
import { red900, grey50 } from 'material-ui/styles/colors';
class ErrorReporting extends Component {
static defaultProps = {
open: false,
action: '',
error: null,
... | import React, { Component } from 'react';
import { connect } from 'react-redux';
import Snackbar from 'material-ui/Snackbar';
import { red900, grey50 } from 'material-ui/styles/colors';
class ErrorReporting extends Component {
static defaultProps = {
open: false,
action: '',
error: null,
... | Set default contentStyle prop to make message more readable | Set default contentStyle prop to make message more readable
| JavaScript | mit | corpix/material-ui-error-reporting,corpix/material-ui-error-reporting |
22ffe9c0158a27314ae24163592752d392ec3b7c | tests/e2e/utils/setup-site-kit.js | tests/e2e/utils/setup-site-kit.js | /**
* setupSiteKit utility.
*
* Site Kit by Google, Copyright 2020 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/LICENSE-2.0
*
... | /**
* setupSiteKit utility.
*
* Site Kit by Google, Copyright 2020 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/LICENSE-2.0
*
... | Update helper to set auth type. | Update helper to set auth type.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
cae745eee63931ce361e1f235c6c135ec973f8cb | src/Presenters/Controls/Text/TextBox/TextBoxViewBridge.js | src/Presenters/Controls/Text/TextBox/TextBoxViewBridge.js | var bridge = function (presenterPath) {
window.rhubarb.viewBridgeClasses.HtmlViewBridge.apply(this, arguments);
};
bridge.prototype = new window.rhubarb.viewBridgeClasses.HtmlViewBridge();
bridge.prototype.constructor = bridge;
bridge.spawn = function (spawnData, index, parentPresenterPath) {
var textBox = do... | var bridge = function (presenterPath) {
window.rhubarb.viewBridgeClasses.HtmlViewBridge.apply(this, arguments);
};
bridge.prototype = new window.rhubarb.viewBridgeClasses.HtmlViewBridge();
bridge.prototype.constructor = bridge;
bridge.spawn = function (spawnData, index, parentPresenterPath) {
var textBox = do... | Fix for textbox view bridge causing recursion | Fix for textbox view bridge causing recursion
| JavaScript | apache-2.0 | RhubarbPHP/Module.Leaf,RhubarbPHP/Module.Leaf |
a74850c23873f3f6ac4033e1632262d43bf56689 | server/configuration/environment_configuration.js | server/configuration/environment_configuration.js | "use strict";
var config = require("12factor-config");
var appConfig = config({
apiUrl: {
env: "AGFAPHD_WEBAPP_API_URL",
type: "string",
default: "http://localhost:8089"
},
emailApiKey: {
env: "AGFAPHD_WEBAPP_EMAIL_API_KEY",
type: "string",
required: true
},
emailApiUrl: {
env: "... | "use strict";
var config = require("12factor-config");
var appConfig = config({
apiUrl: {
env: "AGFAPHD_WEBAPP_API_URL",
type: "string",
default: "http://localhost:8089"
},
emailApiKey: {
env: "AGFAPHD_WEBAPP_EMAIL_API_KEY",
type: "string",
required: true
},
emailApiUrl: {
env: "... | Add email api url requirement | Add email api url requirement
| JavaScript | mit | agoodfriendalwayspayshisdebts/agoodfriendalwayspayshisdebts-webapp,Yuyuu/agoodfriendalwayspayshisdebts-webapp,Yuyuu/agoodfriendalwayspayshisdebts-webapp,agoodfriendalwayspayshisdebts/agoodfriendalwayspayshisdebts-webapp,agoodfriendalwayspayshisdebts/agoodfriendalwayspayshisdebts-webapp,Yuyuu/agoodfriendalwayspayshisdeb... |
0a6844c2d9ac4c4c67cee668f25db1ce742a8951 | packages/plugin-avatar/test/unit/spec/avatar-url-batcher.js | packages/plugin-avatar/test/unit/spec/avatar-url-batcher.js | /**!
*
* Copyright (c) 2015-2016 Cisco Systems, Inc. See LICENSE file.
*/
import {assert} from '@ciscospark/test-helper-chai';
import Avatar, {config} from '../../';
// import '@ciscospark/test-helper-sinon';
import {MockSpark} from '@ciscospark/test-helper-mock-spark';
describe(`Services`, () => {
describe(`Avat... | /**!
*
* Copyright (c) 2015-2016 Cisco Systems, Inc. See LICENSE file.
*/
import {assert} from '@ciscospark/test-helper-chai';
import Avatar from '../../';
import MockSpark from '@ciscospark/test-helper-mock-spark';
describe(`Services`, () => {
describe(`Avatar`, () => {
describe(`AvatarUrlBatcher`, () => {
... | Refactor ciscospark Migrate Avatar to packages | Refactor ciscospark Migrate Avatar to packages
use default SparkMock
issue #62 Migrate Avatar
| JavaScript | mit | CiscoHRIT/spark-js-sdk,glhewett/spark-js-sdk,tran2/spark-js-sdk,CiscoHRIT/spark-js-sdk,aimeex3/spark-js-sdk,mwegman/spark-js-sdk,mwegman/spark-js-sdk,adamweeks/spark-js-sdk,ciscospark/spark-js-sdk,tran2/spark-js-sdk,aimeex3/spark-js-sdk,bbender/spark-js-sdk,ianwremmel/spark-js-sdk,mwegman/spark-js-sdk,adamweeks/spark-j... |
21f294d4aa2364cca03642e71e4872e945e64904 | client/views/hosts/hostCreate/hostCreate.js | client/views/hosts/hostCreate/hostCreate.js | Template.HostCreate.events({
'submit form' : function (event, template) {
event.preventDefault();
// Define form field variables.
var hostname = event.target.hostname.value,
type = event.target.type.value,
version = event.target.version.value;
// Need more validation here.
if (hostna... | Template.HostCreate.events({
'submit form' : function (event, template) {
event.preventDefault();
// Define form field variables.
var hostname = event.target.hostname.value,
type = event.target.type.value,
version = event.target.version.value;
// Need more validation here.
if (hostna... | Use route names instead of paths. | 54: Use route names instead of paths.
| JavaScript | mit | steyep/syrinx,bfodeke/syrinx,steyep/syrinx,bfodeke/syrinx,shrop/syrinx,shrop/syrinx,hb5co/syrinx,hb5co/syrinx |
d956307fb81bc0b6561ec13a0cf1655c4d6ffc6c | lib/middleware.js | lib/middleware.js | const assert = require('assert');
'use strict';
/**
* Once middleware will block an event if there is already a scheduled event
* @param {Event} event the event to check
* @param {DBWrkr} wrkr wrkr instance to work with
* @param {function} done callback
*/
function once(event, wrkr, done) {
assert(typeof event... | 'use strict';
/**
* Once middleware will block an event if there is already a scheduled event
* @param {Event} event the event to check
* @param {DBWrkr} wrkr wrkr instance to work with
* @param {function} done callback
*/
function once(event, wrkr, done) {
const findSpec = {
name: event.name
};
if (e... | Remove assert on event.name (handled somewhere else) | Once: Remove assert on event.name (handled somewhere else)
| JavaScript | mit | whyhankee/dbwrkr |
8e10d4221b8231f4de72130a8014bb79c9b277d0 | src/assets/js/main.js | src/assets/js/main.js | (function () {
function initTwinklingStars() {
particlesJS('stars', {
particles: {
number: {
value: 180,
density: {
enable: true,
value_area: 600
}
},
... | (function () {
function initTwinklingStars(devicePixelRatio) {
particlesJS('stars', {
particles: {
number: {
value: 180,
density: {
enable: true,
value_area: 600
}
... | Tweak stars size on retina devices | Tweak stars size on retina devices
| JavaScript | mit | rfgamaral/ricardoamaral.net,rfgamaral/ricardoamaral.net |
2e4f0c043868c764fa2719ab11964a929d74bf01 | app/domain/ebmeds/System.js | app/domain/ebmeds/System.js | var moment = require('moment');
var System = {
create: function(activityInstance, user, language, nation) {
var now = moment();
return {
"User": {
"HealthCareRole": user.startsWith("Patient") ? "Citizen" : "Physician",
"HealthCareOrganization": {
... | var moment = require('moment');
var System = {
create: function(activityInstance, user, language, nation) {
var now = moment();
return {
"User": {
"HealthCareRole": user.startsWith("Patient") ? "Citizen" : "Physician",
"HealthCareOrganization": {
... | Set organization code to fhirdemo | Set organization code to fhirdemo
| JavaScript | mit | ebmeds/ebmeds-fhir,ebmeds/ebmeds-fhir |
e5374eca0b7f8eb61de6fc0ce27085a6be01c519 | assets/buttons.js | assets/buttons.js | require(['gitbook'], function(gitbook) {
gitbook.events.bind('start', function(e, config) {
var opts = config.toolbar;
if (!opts || !opts.buttons) return;
var buttons = opts.buttons.slice(0);
buttons.reverse();
buttons.forEach(function(button) {
... | require(['gitbook'], function(gitbook) {
gitbook.events.bind('start', function(e, config) {
var opts = config.toolbar;
if (!opts || !opts.buttons) return;
var buttons = opts.buttons.slice(0);
buttons.reverse();
buttons.forEach(function(button) {
... | Allow to set link target (_self to change current window's location) | Allow to set link target (_self to change current window's location)
| JavaScript | apache-2.0 | Simran-B/gitbook-plugin-toolbar |
f65229875c39b09eab54526b11738c8cc6097247 | src/components/RecipeModal/ReadModeModal/index.js | src/components/RecipeModal/ReadModeModal/index.js | import React, { PropTypes } from 'react';
import { Modal } from 'react-bootstrap';
const ReadModeModal = props => (
<div>
<Modal.Header>
<Modal.Title>{props.recipe.name}</Modal.Title>
</Modal.Header>
<Modal.Body>
<div id='description'>
{props.recipe.description}
</div>
<u... | import React, { PropTypes } from 'react';
import { Modal } from 'react-bootstrap';
const ReadModeModal = props => (
<div>
<Modal.Header>
<Modal.Title>{props.recipe.name}</Modal.Title>
</Modal.Header>
<Modal.Body>
<div id='description'>
{props.recipe.description}
</div>
<u... | Update PropTypes of ReadModeModal component | Update PropTypes of ReadModeModal component
| JavaScript | mit | ibleedfilm/recipe-box,ibleedfilm/recipe-box |
b82800fc66b5744a962217b7a0d529dd1c9b2dee | src/models/Token.js | src/models/Token.js | 'use strict'
const mongoose = require('mongoose')
const uuid = require('uuid').v4
const schema = new mongoose.Schema({
id: {
type: String,
required: true,
unique: true,
default: uuid
},
created: {
type: Date,
required: true,
default: Date.now
},
updated: {
type: Date,
required: true,
default:... | 'use strict'
const mongoose = require('mongoose')
const uuid = require('uuid').v4
const schema = new mongoose.Schema({
id: {
type: String,
required: true,
unique: true,
default: uuid
},
title: {
type: String
},
permanent: {
type: Boolean,
default: false
},
created: {
type: Date,
required: tru... | Add title and permanent flag to token model | Add title and permanent flag to token model
| JavaScript | mit | electerious/Ackee |
765444e800cd10f7a6347c82f1b272d64875e835 | middleware/ensure-found.js | middleware/ensure-found.js | /*
* Ensures something has been found during the request. Returns 404 if
* res.template is unset, res.locals is empty and statusCode has not been set
* to 204.
*
* Should be placed at the very end of the middleware pipeline,
* after all project specific routes but before the error handler & responder.
*
* @mod... | /*
* Ensures something has been found during the request. Returns 404 if
* res.template is unset, res.locals is empty and statusCode has not been set
* to 204.
*
* Should be placed at the very end of the middleware pipeline,
* after all project specific routes but before the error handler & responder.
*
* @mod... | Optimize and classify only res.locals.scripts as not found | Optimize and classify only res.locals.scripts as not found
| JavaScript | mit | thebitmill/midwest |
3b95b1734cdfa3b7bb5cb38990265dc1db683ab1 | lib/unexpectedMockCouchdb.js | lib/unexpectedMockCouchdb.js | var BufferedStream = require('bufferedstream');
var createMockCouchAdapter = require('./createMockCouchAdapter');
var http = require('http');
var mockCouch = require('mock-couch-alexjeffburke');
var url = require('url');
function generateCouchdbResponse(databases, req, res) {
var responseObject = null;
var co... | var BufferedStream = require('bufferedstream');
var createMockCouchAdapter = require('./createMockCouchAdapter');
var http = require('http');
var mockCouch = require('mock-couch-alexjeffburke');
var url = require('url');
function generateCouchdbResponse(databases, req, res) {
var responseObject = null;
var co... | Use expect.shift instead of building an array of arguments for expect when delegating to the next assertion. | Use expect.shift instead of building an array of arguments for expect when delegating to the next assertion.
| JavaScript | bsd-3-clause | alexjeffburke/unexpected-couchdb |
9a4358f6f1726f7834fa009b18ef57c781a5937b | fis-conf.js | fis-conf.js | // default settings. fis3 release
// Global start
fis.match('src/ui-p2p-lending.less', {
parser: fis.plugin('less'),
rExt: '.css'
})
fis.match('src/*.less', {
packTo: 'dist/ui-p2p-lending.css'
})
// Global end
// default media is `dev`
// extends GLOBAL config
| fis.match('src/ui-p2p-lending.less', {
parser: fis.plugin('less'),
rExt: '.css',
release: 'dist/ui-p2p-lending.css'
})
| Modify the configuration of fis to remove the useless configurations | Modify the configuration of fis to remove the useless configurations
| JavaScript | mit | PeachScript/ui-p2p-lending,Hellocyy/ui-p2p-lending,Hellocyy/ui-p2p-lending,PeachScript/ui-p2p-lending |
dcf3b88a466c82c06715badb541e09f3c9d64f1b | src/singlePlayer.js | src/singlePlayer.js | import React, { Component } from 'react'
import { propTypes, defaultProps } from './props'
import Player from './Player'
import { isEqual, getConfig } from './utils'
export default function createSinglePlayer (activePlayer) {
return class SinglePlayer extends Component {
static displayName = `${activePlayer.dis... | import React, { Component } from 'react'
import { propTypes, defaultProps, DEPRECATED_CONFIG_PROPS } from './props'
import { getConfig, omit, isEqual } from './utils'
import Player from './Player'
const SUPPORTED_PROPS = Object.keys(propTypes)
export default function createSinglePlayer (activePlayer) {
return clas... | Add single player wrapper div | Add single player wrapper div
Keeps structure consistent with the full player, and enable props like `className` and `wrapper`
Fixes https://github.com/CookPete/react-player/issues/346
| JavaScript | mit | CookPete/react-player,CookPete/react-player |
bb03359cfccfa8a1300435339ef91911e4b611af | lib/fs-watch-tree.js | lib/fs-watch-tree.js | module.exports = process.platform === "linux" ?
require("./watch-tree-unix") :
require("./watch-tree-generic");
| module.exports = process.platform === "linux" || process.platform === "darwin" ?
require("./watch-tree-unix") :
require("./watch-tree-generic");
| Use unix fs-watch for OSX because of problems with OSX Lion | Use unix fs-watch for OSX because of problems with OSX Lion
| JavaScript | bsd-3-clause | busterjs/fs-watch-tree |
01c3baa8c43e976267c47934b99f7f4b210d36b6 | tests/unit/core/randomGeneration.spec.js | tests/unit/core/randomGeneration.spec.js | import { expect } from 'chai';
import jsf from '../../../src';
/* global describe, it */
describe('Random Generation', () => {
it('should generate all the fields with alwaysFakeOptionals option and additionalProperties: true', async () => {
jsf.option({
alwaysFakeOptionals: true,
});
const schema... | import { expect } from 'chai';
import jsf from '../../../src';
/* global describe, it */
describe('Random Generation', () => {
it('should generate all the fields with alwaysFakeOptionals option and additionalProperties: true', () => {
jsf.option({
alwaysFakeOptionals: true,
});
const schema = {
... | Disable async/await to run on v6 | Disable async/await to run on v6
| JavaScript | mit | json-schema-faker/json-schema-faker,pateketrueke/json-schema-faker,json-schema-faker/json-schema-faker |
842bfdc503c25008027025fa1ba4f64f11b8300c | src/devtools/model.js | src/devtools/model.js | // @flow
import type {Snapshot, SnapshotItem} from 'redux-ship';
export type State = {
logs: {action: mixed, snapshot: Snapshot<mixed, mixed>}[],
selectedLog: ?number,
selectedSnapshotItem: ?SnapshotItem<mixed, mixed>,
};
export const initialState: State = {
logs: [],
selectedLog: null,
selectedSnapshotIt... | // @flow
import type {Snapshot, SnapshotItem} from 'redux-ship';
export type State = {
logs: {action: mixed, snapshot: Snapshot<mixed, mixed>}[],
selectedLog: ?number,
selectedSnapshotItem: ?SnapshotItem<mixed, mixed>,
};
export const initialState: State = {
logs: [],
selectedLog: null,
selectedSnapshotIt... | Hide the selected state when already on it | Hide the selected state when already on it
| JavaScript | mit | clarus/redux-ship-devtools,clarus/redux-ship-devtools |
e1275063a762e4748aae86bfcf9a9e60deb40e70 | app/assets/javascripts/ember-bootstrap-rails/all.js | app/assets/javascripts/ember-bootstrap-rails/all.js | //= require ./core
//= require ./mixins
//= require ./forms
//= require_tree ./forms
//= require_tree ./views | //= require ./core
//= require ./mixins
//= require ./forms
//= require ./forms/field
//= require_tree ./forms
//= require_tree ./views | Fix dependency loading order for checkbox | Fix dependency loading order for checkbox
| JavaScript | mit | kristianmandrup/ember-bootstrap-rails,kristianmandrup/ember-bootstrap-rails |
70459cb61f753ce11bc85a801442de85879f716e | modules/chartDataController.js | modules/chartDataController.js | var express = require('express');
var DataStore = require('./regard-data-store.js');
var Chart = require('../schemas/chart.js');
var router = express.Router();
var dataStore = new DataStore('Adobe', 'Brackets');
router.get('/chartdata', function (req, res, next) {
var id = req.query.ids[0];
dataStore.runQuery(id... | var express = require('express');
var DataStore = require('./regard-data-store.js');
var Chart = require('../schemas/chart.js');
var router = express.Router();
var dataStore = new DataStore('Adobe', 'Brackets');
router.get('/chartdata', function (req, res, next) {
var id = req.query.ids[0];
dataStore.runQuery(id... | Revert "Register query on create." | Revert "Register query on create."
This reverts commit 9b1d857a288861a8a93acb242c05d1830e61a7e5.
| JavaScript | apache-2.0 | with-regard/regard-website-api |
e790505df6398acdcd2dbe81f353cbf7a3cafaf9 | mantis_feeder_contextMenu.js | mantis_feeder_contextMenu.js | function hook_menu(){
$.contextMenu({
selector: '.feeder_entry',
callback: function(key, options) {
if(key == 'gallery'){
var id = $(this).attr('specie_id');
var folder = '';
$.each(collection_data.species,function(){
i... | function hook_menu(){
$.contextMenu('destroy','.feeder_entry');
$.contextMenu({
selector: '.feeder_entry',
callback: function(key, options) {
if(key == 'gallery'){
var id = $(this).attr('specie_id');
var folder = '';
$.each(collection_... | Destroy any old bind, makes this function repeat-callable | Destroy any old bind, makes this function repeat-callable
| JavaScript | mit | soundspawn/mantis_feeder,soundspawn/mantis_feeder |
13975ebc0b8253e12b746d88f97d2a2d7f4c91ea | ui/app/controllers/application.js | ui/app/controllers/application.js | import Ember from 'ember';
const { Controller, computed } = Ember;
export default Controller.extend({
error: null,
errorStr: computed('error', function() {
return this.get('error').toString();
}),
errorCodes: computed('error', function() {
const error = this.get('error');
const codes = [error.co... | import Ember from 'ember';
const { Controller, computed, inject, run, observer } = Ember;
export default Controller.extend({
config: inject.service(),
error: null,
errorStr: computed('error', function() {
return this.get('error').toString();
}),
errorCodes: computed('error', function() {
const er... | Throw errors that cause a redirect to make debugging easier | Throw errors that cause a redirect to make debugging easier
| JavaScript | mpl-2.0 | Ashald/nomad,Ashald/nomad,nak3/nomad,dvusboy/nomad,dvusboy/nomad,burdandrei/nomad,nak3/nomad,Ashald/nomad,burdandrei/nomad,Ashald/nomad,dvusboy/nomad,nak3/nomad,dvusboy/nomad,hashicorp/nomad,Ashald/nomad,hashicorp/nomad,nak3/nomad,burdandrei/nomad,burdandrei/nomad,Ashald/nomad,dvusboy/nomad,nak3/nomad,hashicorp/nomad,d... |
da4c52e2ba3dfc46f6523616df9ecad489266835 | js/background.js | js/background.js | var txt_cache='604800';chrome.webRequest.onHeadersReceived.addListener(function(object){'use strict';var object_type=object.type.toLowerCase();if((object_type!=='main_frame')&&(object_type!=='sub_frame')&&(object_type!=='xmlhttprequest')){var headers=object.responseHeaders,len=headers.length-1,f=false,elem=null;do{elem... | var txt_cache='604800';chrome.webRequest.onHeadersReceived.addListener(function(object){'use strict';if(object){var object_type=object.type.toLowerCase();if((object_type!=='main_frame')&&(object_type!=='sub_frame')&&(object_type!=='xmlhttprequest')){var headers=object.responseHeaders,len=headers.length-1,f=false,elem=n... | Make sure there actually is an object | Make sure there actually is an object | JavaScript | mit | mubaidr/Speed-up-Browsing,mubaidr/Speed-up-Browsing |
b2a6fa1a1e6771a662029d3f52b6d57dcabc6ae2 | src/icarus/station.js | src/icarus/station.js | import { EventEmitter } from 'events'
import PouchDB from 'pouchdb'
import Serial from '../serial'
import Classifier from './classifier'
import { parser, dataHandler } from './data-handler'
/**
* Handles everything a Station should.
* Brings Serial, data parsing and database saving together.
*/
export default class... | import { EventEmitter } from 'events'
import PouchDB from 'pouchdb'
import Serial from '../serial'
import Classifier from './classifier'
import { parser, dataHandler } from './data-handler'
/**
* Handles everything a Station should.
* Brings Serial, data parsing and database saving together.
*/
export default class... | Add missing Station super() call | Add missing Station super() call
| JavaScript | mit | cansat-icarus/capture-lib |
5b0f2e638a1ca645f000f0bd23bde42b7a90f334 | js/page/watch.js | js/page/watch.js | var videoStyle = {
width: '100%',
height: '100%',
backgroundColor: '#000'
};
var WatchPage = React.createClass({
propTypes: {
name: React.PropTypes.string,
},
render: function() {
return (
<main>
<video style={videoStyle} src={"/view?name=" + this.props.name} controls />
</main... | var videoStyle = {
width: '100%',
height: '100%',
backgroundColor: '#000'
};
var WatchPage = React.createClass({
propTypes: {
name: React.PropTypes.string,
},
getInitialState: function() {
return {
readyToPlay: false,
loadStatusMessage: "Requesting stream",
};
},
componentDidMou... | Hide video until it's playable and show loading message | Hide video until it's playable and show loading message
| JavaScript | mit | lbryio/lbry-electron,jsigwart/lbry-app,jsigwart/lbry-app,akinwale/lbry-app,jsigwart/lbry-app,lbryio/lbry-app,MaxiBoether/lbry-app,akinwale/lbry-app,lbryio/lbry-electron,MaxiBoether/lbry-app,lbryio/lbry-electron,jsigwart/lbry-app,MaxiBoether/lbry-app,akinwale/lbry-app,lbryio/lbry-app,MaxiBoether/lbry-app,akinwale/lbry-a... |
d65379f168c569209d073f3473ffcdb859f430b7 | src/js/clock/clock.js | src/js/clock/clock.js | var Clock = module.exports;
Clock.weekday = function(weekday, hour, minute, seconds) {
return moment({ hour: hour, minute: minute, seconds: seconds }).day(weekday).unix();
};
| var Clock = module.exports;
Clock.weekday = function(weekday, hour, minute, seconds) {
var now = moment();
var target = moment({ hour: hour, minute: minute, seconds: seconds }).day(weekday);
if (moment.max(now, target) === now) {
target.add(1, 'week');
}
return target.unix();
};
| Fix Clock weekday to always return a time in the future | Fix Clock weekday to always return a time in the future
| JavaScript | mit | ishepard/TransmissionTorrent,carlo-colombo/dublin-bus-pebble,pebble/pebblejs,demophoon/Trimet-Tracker,daduke/LMSController,Scoutski/pebblejs,carlo-colombo/dublin-bus-pebble,jiangege/pebblejs-project,frizzr/CatchOneBus,bkbilly/Tvheadend-EPG,Scoutski/pebblejs,stephanpavlovic/pebble-kicker-app,pebble/pebblejs,dhpark/pebbl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.