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
636863f5b8fcff8e7cfc000349f5167b51b9544c
public/app/routes/application.js
public/app/routes/application.js
/* Copyright, 2013, by Tomas Korcak. <korczis@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modif...
/* Copyright, 2013, by Tomas Korcak. <korczis@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modif...
Remove empty route and controller
Remove empty route and controller
JavaScript
mit
pavelbinar/craftsmen,zadr007/BLUEjs,pavelbinar/craftsmen,zadr007/BLUEjs
dfeb8dba44275fc6ac317a862376e8ab0c2f5a8c
lib/routes/admin/index.js
lib/routes/admin/index.js
'use strict'; var express = require('express'); module.exports = function buildAdminRouter(mediator) { var router = express.Router(); // TODO: Remove this endpoint when not needed if (process.env.NODE_ENV !== 'production') { /** * Asks for data to be reset to the default list of users * This is in...
'use strict'; var express = require('express'); module.exports = function buildAdminRouter(mediator) { var router = express.Router(); /** * Asks for data to be reset to the default list of users * This is intended only for demonstration/debugging purposes. * TODO: Remove this endpoint in production or wh...
Remove check for environment to add data reset endpoint
Remove check for environment to add data reset endpoint
JavaScript
mit
feedhenry-raincatcher/raincatcher-demo-auth
3844217c602b329d9a98a620de6576124f94c21b
test/init.js
test/init.js
global.assert = require('assert'); global.chai = require("chai"); global.chaiAsPromised = require("chai-as-promised"); global.jsf = require('json-schema-faker'); global.should = require('should'); global.sinon = require('sinon'); // Load schemas global.mocks = require('./mocks'); // Run the tests require('./unit');
global.assert = require('assert'); global.chai = require("chai"); global.chaiAsPromised = require("chai-as-promised"); global.jsf = require('json-schema-faker'); global.should = require('should'); global.sinon = require('sinon'); global._ = require('lodash'); // Load schemas global.mocks = require('./mocks'); // Run ...
Add lodash access in global scope
Add lodash access in global scope
JavaScript
mit
facundovictor/mocha-testing
945adf03719a67d7fe65b9dafcd6a1aa1fe31dcb
app/assets/javascripts/roots/application.js
app/assets/javascripts/roots/application.js
function clearAndHideResultTable() { var header = $('table.matching-term .header'); $('table.matching-term').html(header); $('table.matching-term').hide(); } function hideNoResults() { $('.no-results').hide(); } function showNoResults() { $('.no-results').show(); } function showResultTable() { hideNoResu...
DomElements = { matchingTerm: 'table.matching-term' }; function clearAndHideResultTable() { var header = $('table.matching-term .header'); $(DomElements.matchingTerm).html(header); $(DomElements.matchingTerm).hide(); } function hideNoResults() { $('.no-results').hide(); } function showNoResults() { $('.n...
Add JS lookup to object
Add JS lookup to object
JavaScript
mit
yez/roots,yez/passages,yez/roots,yez/passages,yez/passages,yez/roots
4d685b2ffe124c2b3e5b3a8187c4b31a56518c13
packages/mendel-config/src/variation-config.js
packages/mendel-config/src/variation-config.js
const parseVariations = require('../variations'); const createValidator = require('./validator'); const validate = createValidator({ variations: {type: 'array', minLen: 1}, // There can be a user of Mendel who does not want variation but faster build. allVariationDirs: {type: 'array', minLen: 0}, allDir...
const parseVariations = require('../variations'); const createValidator = require('./validator'); const validate = createValidator({ variations: {type: 'array', minLen: 1}, // There can be a user of Mendel who does not want variation but faster build. allVariationDirs: {type: 'array', minLen: 0}, allDir...
Fix base files identified as wrong variation
Fix base files identified as wrong variation
JavaScript
mit
stephanwlee/mendel,yahoo/mendel,stephanwlee/mendel,yahoo/mendel
0032944eb5893cc732dac3df20a7617f75a027c5
test/data/sizzle-jquery.js
test/data/sizzle-jquery.js
jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.filters; jQuery.unique = Sizzle.uniqueSort; jQuery.getText = getText; jQuery.isXMLDoc = isXML; jQuery.contains = contains;
jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.filters; jQuery.unique = Sizzle.uniqueSort;
Make sure that we're not trying to pull in things that don't exist, durr.
Make sure that we're not trying to pull in things that don't exist, durr.
JavaScript
mit
npmcomponent/cristiandouce-sizzle,mzgol/sizzle
7d59ca5060f2904df9dcecfccaa6aef53a4137e4
tests/acceptance/create-new-object-test.js
tests/acceptance/create-new-object-test.js
import { test } from 'qunit'; import moduleForAcceptance from 'dw-collections-manager/tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance | create new object'); test('visiting /create-new-object', function(assert) { visit('/collectionobject/new'); andThen(function() { assert.equal(currentUR...
import { test } from 'qunit'; import moduleForAcceptance from 'dw-collections-manager/tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance | create new object'); test('visiting /create-new-object', function(assert) { /*visit('/collectionobject/new'); andThen(function() { assert.equal(current...
Update acceptance test to dummy test
Update acceptance test to dummy test See if it solves issue on Travis
JavaScript
agpl-3.0
DINA-Web/collections-ui,DINA-Web/collections-ui,DINA-Web/collections-ui
abebd9262957895a20c96fb83c322b7f5988a4ec
assets/js/components/autocomplete-email.js
assets/js/components/autocomplete-email.js
KB.onClick('.js-autocomplete-email', function (e) { var email = KB.dom(e.target).data('email'); var emailField = KB.find('.js-mail-form input[type="email"]'); if (email && emailField) { emailField.build().value = email; } _KB.controllers['Dropdown'].close(); }); KB.onClick('.js-autocomple...
KB.onClick('.js-autocomplete-email', function (e) { var email = KB.dom(e.target).data('email'); var emailField = KB.find('.js-mail-form input[type="email"]'); if (email && emailField) { emailField.build().value = email; } _KB.controllers.Dropdown.close(); }); KB.onClick('.js-autocomplete-...
Use dot notation in Javascript component
Use dot notation in Javascript component
JavaScript
mit
libin/kanboard,fguillot/kanboard,stinnux/kanboard,kanboard/kanboard,filhocf/kanboard,renothing/kanboard,BlueTeck/kanboard,stinnux/kanboard,oliviermaridat/kanboard,oliviermaridat/kanboard,thylo/kanboard,Busfreak/kanboard,Busfreak/kanboard,BlueTeck/kanboard,kanboard/kanboard,fguillot/kanboard,renothing/kanboard,thylo/kan...
4aa5e42ee2e6ce50489f03eb057021ec4087e1ad
packages/easysearch:elasticsearch/package.js
packages/easysearch:elasticsearch/package.js
Package.describe({ name: 'easysearch:elasticsearch', summary: "Elasticsearch Engine for EasySearch", version: "2.1.1", git: "https://github.com/matteodem/meteor-easy-search.git", documentation: 'README.md' }); Npm.depends({ 'elasticsearch': '8.2.0' }); Package.onUse(function(api) { api.versionsFrom('1.4...
Package.describe({ name: 'easysearch:elasticsearch', summary: "Elasticsearch Engine for EasySearch", version: "2.1.1", git: "https://github.com/matteodem/meteor-easy-search.git", documentation: 'README.md' }); Npm.depends({ 'elasticsearch': '13.0.0' }); Package.onUse(function(api) { api.versionsFrom('1....
Update ES client to support ES 5.x
Update ES client to support ES 5.x
JavaScript
mit
bompi88/meteor-easy-search,matteodem/meteor-easy-search,bompi88/meteor-easy-search,matteodem/meteor-easy-search,bompi88/meteor-easy-search,matteodem/meteor-easy-search
5900f04399c512ff05eb5eb81fa026ce67e32371
packages/ember-testing/lib/adapters/qunit.js
packages/ember-testing/lib/adapters/qunit.js
import Adapter from './adapter'; import { inspect } from 'ember-metal'; /** This class implements the methods defined by Ember.Test.Adapter for the QUnit testing framework. @class QUnitAdapter @namespace Ember.Test @extends Ember.Test.Adapter @public */ export default Adapter.extend({ asyncStart() { ...
import { inspect } from 'ember-utils'; import Adapter from './adapter'; /** This class implements the methods defined by Ember.Test.Adapter for the QUnit testing framework. @class QUnitAdapter @namespace Ember.Test @extends Ember.Test.Adapter @public */ export default Adapter.extend({ asyncStart() { ...
Refactor ember-utils imports in ember-testing package.
Refactor ember-utils imports in ember-testing package.
JavaScript
mit
fpauser/ember.js,qaiken/ember.js,rlugojr/ember.js,miguelcobain/ember.js,miguelcobain/ember.js,jasonmit/ember.js,bekzod/ember.js,tsing80/ember.js,karthiick/ember.js,Leooo/ember.js,givanse/ember.js,pixelhandler/ember.js,sivakumar-kailasam/ember.js,jaswilli/ember.js,Turbo87/ember.js,xiujunma/ember.js,cibernox/ember.js,san...
07028ebddcd609b2f468cbd9a3cded102e33204c
client/apis.js
client/apis.js
const API_URL = process.env.API_URL export default { GET_TOP_GAMES : () => `${API_URL}/gamess`, GET_PRICES : appIds => `${API_URL}/games/prices?appIds=${appIds}`, GET_SUGGESTIONS: name => `${API_URL}/games/suggestions?name=${name}`, SEARCH_GAMES : name => `${API_URL}/games/search?name=${name}`, GET_RA...
const API_URL = process.env.API_URL export default { GET_TOP_GAMES : () => `${API_URL}/games`, GET_PRICES : appIds => `${API_URL}/games/prices?appIds=${appIds}`, GET_SUGGESTIONS: name => `${API_URL}/games/suggestions?name=${name}`, SEARCH_GAMES : name => `${API_URL}/games/search?name=${name}`, GET_RAT...
Fix wrong api for games list
Fix wrong api for games list
JavaScript
mit
hckhanh/games-searcher,hckhanh/games-searcher
24add3a270d101903a573ccd08b70112502c5eea
test/js/properties-test.js
test/js/properties-test.js
module("Text Descendant", { }); test("Find text descendants in an iframe.", function() { // Setup fixture var fixture = document.getElementById('qunit-fixture'); var iframe = document.createElement('iframe'); var html = '<body><div id="foo">bar</div></body>'; fixture.appendChild(iframe); ifram...
module("Text Descendant", { }); test("Find text descendants in an iframe.", function() { // Setup fixture var fixture = document.getElementById('qunit-fixture'); var iframe = document.createElement('iframe'); var html = '<body><div id="foo">bar</div></body>'; fixture.appendChild(iframe); ifram...
Test that findTextAlternatives does not raise errors
Test that findTextAlternatives does not raise errors
JavaScript
apache-2.0
kristapsmelderis/accessibility-developer-tools,garcialo/accessibility-developer-tools,ckundo/accessibility-developer-tools,japacible/accessibility-developer-tools,GabrielDuque/accessibility-developer-tools,GoogleChrome/accessibility-developer-tools,ckundo/accessibility-developer-tools,t9nf/accessibility-developer-tools...
4a2f24d114a0239092d705ba96fdc7b9094e8753
client/main.js
client/main.js
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import 'reflect-metadata'; // here location matters: has to be before import of AppModule import { AppModule } from './imports/components/app.module'; import 'zone.js'; // here location matters: has to be after import of AppModule ...
import 'reflect-metadata'; // here location matters: has to be before import of AppModule // and even before other imports under Windows import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './imports/components/app.module'; import 'z...
Move import 'reflect-metadata' before other ones.
Move import 'reflect-metadata' before other ones.
JavaScript
mit
atao60/meteor-angular4-scss,atao60/meteor-angular4-scss
bc62204ebf9a5c584210d354c78ddae1b9384c73
demo/UserDAO.js
demo/UserDAO.js
"use strict"; var loki = require('lokijs'); var _ = require('lodash'); var Q = require('q'); // variable to hold the singleton instance, if used in that manner var userDAOInstance = undefined; // // User Data Access Object // // Constructor function UserDAO(dbName) { // Define database name dbName = (dbName != '...
"use strict"; var loki = require('lokijs'); var _ = require('lodash'); var Promise = require('bluebird'); // variable to hold the singleton instance, if used in that manner var userDAOInstance = undefined; // // User Data Access Object // // Constructor function UserDAO(dbName) { // Define database name dbName ...
Implement bluebird instead of Q inside demo userDAO
Implement bluebird instead of Q inside demo userDAO
JavaScript
mit
janux/janux-people.js,janux/janux-people.js
b230495ada24758b67134011385c47fb9e33cec2
public/js/cookie-message.js
public/js/cookie-message.js
/* global document */ function setCookie(name, value, options = {}) { let cookieString = `${name}=${value}; path=/`; if (options.days) { const date = new Date(); date.setTime(date.getTime() + (options.days * 24 * 60 * 60 * 1000)); cookieString = `${cookieString}; expires=${date.toGMTString()}`; } ...
(function(global) { 'use strict' var $ = global.jQuery; var document = global.document; function setCookie(name, value, options) { options = options || {}; var cookieString = name + '=' + value + '; path=/'; if (options.days) { var date = new Date(); date.setTime(date.getTime() + (opti...
Update script to be IE7+ compatible
:cookie: Update script to be IE7+ compatible
JavaScript
mit
nhsuk/gp-finder,nhsuk/gp-finder
86341bb10069eab5f014200d541e03cedf3226bb
__tests__/transform.spec.js
__tests__/transform.spec.js
/* global describe, it, expect */ import { filterByKeys, transform } from '../src/transform' import * as mocks from './mocks' describe('Transform suite', () => { it('should filter by keys two objects', () => { const keys = Object.keys(mocks.defs.simple) expect(filterByKeys(keys, mocks.defs.complex)).toEqual(...
/* global describe, it, expect */ import { filterByKeys, transform } from '../src/transform' import * as mocks from './mocks' describe('Transform suite', () => { const keys = Object.keys(mocks.defs.simple) it('should filter by keys two objects', () => { expect(filterByKeys(keys, mocks.defs.complex)).toEqual(m...
Check transform definitions are well set
test: Check transform definitions are well set
JavaScript
mit
sospedra/schemative
afb5fb554cc50ac5bece3d1a56877fc2606f9d81
app/app.js
app/app.js
var app = require('app'); var BrowserWindow = require('browser-window'); var mainWindow = null; app.on('window-all-closed', function() { app.quit(); }); app.on('ready', function() { mainWindow = new BrowserWindow({ "width": 225, "height": 225, "transparent": true, "frame": false, "always-on-...
var {app} = require('electron'); var {BrowserWindow} = require('electron'); var mainWindow = null; app.on('window-all-closed', function() { app.quit(); }); app.on('ready', function() { mainWindow = new BrowserWindow({ "width": 225, "height": 225, "transparent": true, "frame": false, "always-...
Fix problems on the latest electron
Fix problems on the latest electron
JavaScript
mit
yasuyuky/elmtrn,yasuyuky/elmtrn
6763b2ff8f16681698fc7182d44a512cedf39837
client/app/scripts/controllers/changelog.js
client/app/scripts/controllers/changelog.js
angular .module('app') .controller('changelogController', [ '$rootScope', '$scope', 'apiService', function($rootScope, $scope, api) { api.changelog.then(function(response) { $scope.changelog = response.data; }); } ]);
angular .module('app') .controller('changelogController', [ '$rootScope', '$scope', 'apiService', function($rootScope, $scope, api) { api.changelog().then(function(response) { $scope.changelog = response.data; }); } ...
Fix for change log error
Fix for change log error
JavaScript
mit
brettshollenberger/mrl001,brettshollenberger/mrl001
cd040ba9f8170ed92f073ff6805476313d2030a5
fixture/test/open.js
fixture/test/open.js
// Thests for the open method for fs module. This opens a file for reading only. // var fs=newFS(); var fileName="hello.txt"; var content="hello"; function testOpen(){ try{ f=fs.open(fileName); message=f.read(); if(message!=content){ throw "expected "+content+" got "+message; } f.close(); }catch(...
// Thests for the open method for fs module. This opens a file for reading only. // var fs=newFS(); var fileName="hello.txt"; var content="hello"; function testOpen(){ console.log("-- Testing fs.open"); try{ f=fs.open(fileName); message=f.read(); if(message!=content){ throw "expected "+content+" got "...
Add logging information to a test script
Add logging information to a test script
JavaScript
mit
gernest/wuxia,gernest/wuxia,gernest/wuxia,gernest/wuxia
d277de83db62f68419b7ef93e97ccd9d5f2e8fec
lib/contract/resultMapper/index.js
lib/contract/resultMapper/index.js
'use strict' const mapResult = result => { return { name: result.contract.name, consumer: result.contract.consumer, status: result.err ? 'Fail' : 'Pass', error: result.err } } module.exports = mapResult
'use strict' const Joi = require('joi') const mapResult = result => { return { name: result.contract.name, consumer: result.contract.consumer, status: result.err ? 'Fail' : 'Pass', error: result.err ? result.err.toString() : null } } module.exports = mapResult
Tweak to result mapper. Fixed example contract to use new syntax
Tweak to result mapper. Fixed example contract to use new syntax
JavaScript
apache-2.0
findmypast-oss/jackal,findmypast-oss/jackal
0467fa7d24391157ab28d6ba61a14b1a61095c72
lib/core/public/cleanup-plugins.js
lib/core/public/cleanup-plugins.js
function cleanupPlugins(resolve, reject) { 'use strict'; if (!axe._audit) { throw new Error('No audit configured'); } var q = axe.utils.queue(); // If a plugin fails it's cleanup, we still want the others to run var cleanupErrors = []; Object.keys(axe.plugins).forEach(function (key) { ...
function cleanupPlugins(resolve, reject) { 'use strict'; if (!axe._audit) { throw new Error('No audit configured'); } var q = axe.utils.queue(); // If a plugin fails it's cleanup, we still want the others to run var cleanupErrors = []; Object.keys(axe.plugins).forEach(function (key) { ...
Fix lint problem in cleanup-plugin
chore: Fix lint problem in cleanup-plugin
JavaScript
mpl-2.0
dequelabs/axe-core,dequelabs/axe-core,dequelabs/axe-core,dequelabs/axe-core
93efa549cdfdd5cad1ffc4528b594075dba2df23
src/main/webapp/scripts/app/app.constants.js
src/main/webapp/scripts/app/app.constants.js
"use strict"; // DO NOT EDIT THIS FILE, EDIT THE GRUNT TASK NGCONSTANT SETTINGS INSTEAD WHICH GENERATES THIS FILE angular.module('publisherApp') .constant('ENV', 'dev') .constant('VERSION', '1.2.1-SNAPSHOT') ;
"use strict"; // DO NOT EDIT THIS FILE, EDIT THE GRUNT TASK NGCONSTANT SETTINGS INSTEAD WHICH GENERATES THIS FILE angular.module('publisherApp') .constant('ENV', 'dev') .constant('VERSION', '1.2.2-SNAPSHOT') ;
Update ngconstant version after releasing
Update ngconstant version after releasing
JavaScript
apache-2.0
GIP-RECIA/esup-publisher-ui,GIP-RECIA/esup-publisher-ui,EsupPortail/esup-publisher,GIP-RECIA/esup-publisher-ui,EsupPortail/esup-publisher,EsupPortail/esup-publisher,EsupPortail/esup-publisher
fd2f91ad644f34e8ee06283fe15a1155b0fee1ea
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; let attributes = Ember.assign({}, config.APP); attributes = Ember.assign(attributes, attrs); // use defaults, but you can override; Ember.r...
import Ember from 'ember'; import Application from '../../app'; import config from '../../config/environment'; export default function startApp(attrs) { let application; let attributes = (Ember.assign || Ember.merge)({}, config.APP); attributes = (Ember.assign || Ember.merge)(attributes, attrs); // use defaults...
Allow for versions of ember that don't have Ember.assign yet
Allow for versions of ember that don't have Ember.assign yet
JavaScript
mit
mike-north/ember-anchor,mike-north/ember-anchor,mike-north/ember-anchor,truenorth/ember-anchor,truenorth/ember-anchor,truenorth/ember-anchor
e60a1487795d94d2b211c33899b43bb915ad9422
tests/pkgs/nodejs/index.js
tests/pkgs/nodejs/index.js
var nijs = require('nijs'); exports.pkg = function(args) { return args.stdenv().mkDerivation({ name : "node-0.10.26", src : args.fetchurl()({ url : new nijs.NixURL("http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz"), sha256 : "1ahx9cf2irp8injh826sk417wd528awi4l1mh7vxg7k8yak4wppg" }), ...
var nijs = require('nijs'); exports.pkg = function(args) { return args.stdenv().mkDerivation({ name : "node-0.10.26", src : args.fetchurl()({ url : new nijs.NixURL("http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz"), sha256 : "1ahx9cf2irp8injh826sk417wd528awi4l1mh7vxg7k8yak4wppg" }), ...
Fix path to python interpreter to make it work with chroot builds
Fix path to python interpreter to make it work with chroot builds
JavaScript
mit
svanderburg/nijs,svanderburg/nijs
1a2d79f4ea21b2fc32461e037ac4882dc7b540d6
src/components/Gen/GenResults/GenResults.js
src/components/Gen/GenResults/GenResults.js
import React from 'react' import injectSheet from 'react-jss' import styles from './styles' const GenResults = ({ classes, newLine, results, stats }) => { let joinedResults = Array.prototype.join.call(results, `${newLine ? '\n' : ' '}`).trim() let words = stats.words let maxWords = stats.maxWords let filtered...
import React from 'react' import injectSheet from 'react-jss' import styles from './styles' const GenResults = ({ classes, newLine, results, stats }) => { let joinedResults = Array.prototype.join.call(results, `${newLine ? '\n' : ' '}`).trim() let words = stats.words let maxWords = stats.maxWords let filtered...
Add locale formatting to stats numbers
Add locale formatting to stats numbers This addresses issue #10.
JavaScript
agpl-3.0
nai888/langua,nai888/langua
5a3e4ca6a95b7dc43fc527929284015cd739628e
logic/subcampaign/readSubcampainModelLogic.js
logic/subcampaign/readSubcampainModelLogic.js
var configuration = require('../../config/configuration.json') var utility = require('../../public/method/utility') module.exports = { getSubcampaignModel: function (redisClient, subcampaignHashID, callback) { var tableName = configuration.TableMASubcampaignModel + subcampaignHashID redisClient.hmget(tableNa...
var configuration = require('../../config/configuration.json') var utility = require('../../public/method/utility') module.exports = { getSubcampaignModel: function (redisClient, subcampaignHashID, callback) { var tableName = configuration.TableMASubcampaignModel + subcampaignHashID redisClient.hmget(tableNa...
Implement Get List of Subcampaign HashIDs (By Filter)
Implement Get List of Subcampaign HashIDs (By Filter)
JavaScript
mit
Flieral/Announcer-Service,Flieral/Announcer-Service
f520c193a2653abe667d4e4ddf23961fbe6b3593
config.js
config.js
var config = {} module.exports = config; config.listen = {} config.listen.address = '0.0.0.0' config.listen.port = 3080; // Margan is used to be logger, visit here to get more info: // https://github.com/expressjs/morgan config.logType = 'combined'; config.trust_proxy = 'loopback, 163.13.128.112';
var config = {} module.exports = config; config.listen = {} config.listen.address = '0.0.0.0' config.listen.port = 3080; // Margan is used to be logger, visit here to get more info: // https://github.com/expressjs/morgan config.logType = 'combined'; config.trust_proxy = 'loopback, uniquelocal';
Edit trust_proxy setting of express.
Edit trust_proxy setting of express.
JavaScript
mit
tom19960222/C-FAR-Website,tom19960222/C-FAR-Website,tom19960222/C-FAR-Website,tom19960222/C-FAR-Website
0f9db6601aecc7b01061ec94ba7b8819d38c4473
src/config.js
src/config.js
import _ from 'lodash' import mergeDefaults from 'merge-defaults' _.mergeDefaults = mergeDefaults class ConfigManager { constructor() { this.Riak = { nodes: ["localhost:8098"] } this.GremlinServer = { port: 8182, host: "localhost", options: {} } } setRiakCluster(nodes) { if(arguments.length ...
import _ from 'lodash' import mergeDefaults from 'merge-defaults' import is from 'is_js' _.mergeDefaults = mergeDefaults class ConfigManager { constructor() { this.Riak = { nodes: ["localhost:8098"] } this.GremlinServer = { port: 8182, host: "localhost", options: {} } } setRiakCluster(nodes) {...
Use is instead of instanceof to determine if it is an array
Use is instead of instanceof to determine if it is an array
JavaScript
mit
celrenheit/topmodel,celrenheit/topmodel
891f49bcf60006b3862a48f01b52130655f015ea
config/webpack.dev.conf.js
config/webpack.dev.conf.js
const webpack = require('webpack'); const merge = require('webpack-merge'); const webpackConfig = require('./webpack.base.conf'); const config = require('./index'); const HtmlWebpackPlugin = require('html-webpack-plugin'); // so that everything is absolute webpackConfig.output.publicPath = `${config.domain}:${config....
const webpack = require('webpack'); const merge = require('webpack-merge'); const webpackConfig = require('./webpack.base.conf'); const config = require('./index'); const HtmlWebpackPlugin = require('html-webpack-plugin'); // so that everything is absolute webpackConfig.output.publicPath = `${config.domain}:${config....
Add sass sourcemaps to dev env
Add sass sourcemaps to dev env
JavaScript
mit
DynamoMTL/shopify-pipeline
9829d65352cfb5d72c251fc99c601255788327ae
src/gelato.js
src/gelato.js
'use strict'; if ($ === undefined) { throw 'Gelato requires jQuery as a dependency.' } else { window.jQuery = window.$ = $; } if (_ === undefined) { throw 'Gelato requires Lodash as a dependency.' } else { window._ = _; } if (Backbone === undefined) { throw 'Gelato requires Backbone as a dependency.' } els...
'use strict'; if ($ === undefined) { throw 'Gelato requires jQuery as a dependency.' } else { window.jQuery = window.$ = $; } if (_ === undefined) { throw 'Gelato requires Lodash as a dependency.' } else { window._ = _; } if (Backbone === undefined) { throw 'Gelato requires Backbone as a dependency.' } els...
Add method for checking if cordova is being used
Add method for checking if cordova is being used
JavaScript
mit
mcfarljw/gelato-framework,mcfarljw/gelato-framework,jernung/gelato,mcfarljw/backbone-gelato,mcfarljw/backbone-gelato,jernung/gelato
75a3af9b6209060cd245f8b2ac37866ba88d4e3b
lib/rules/placeholder-in-extend.js
lib/rules/placeholder-in-extend.js
'use strict'; var helpers = require('../helpers'); module.exports = { 'name': 'placeholder-in-extend', 'defaults': {}, 'detect': function (ast, parser) { var result = []; ast.traverseByType('atkeyword', function (keyword, i, parent) { keyword.forEach(function (item) { if (item.content ===...
'use strict'; var helpers = require('../helpers'); module.exports = { 'name': 'placeholder-in-extend', 'defaults': {}, 'detect': function (ast, parser) { var result = []; ast.traverseByType('atkeyword', function (keyword, i, parent) { keyword.forEach(function (item) { if (item.content ===...
Replace deprecated node type simpleSelector with selector
:bug: Replace deprecated node type simpleSelector with selector
JavaScript
mit
flacerdk/sass-lint,DanPurdy/sass-lint,bgriffith/sass-lint,sktt/sass-lint,srowhani/sass-lint,sasstools/sass-lint,srowhani/sass-lint,sasstools/sass-lint
036946a7ebdc2d4f5628c3e3a446faffe410132e
examples/async-redux/actions/PostsActions.js
examples/async-redux/actions/PostsActions.js
import fetch from 'isomorphic-fetch'; export function invalidateReddit({ reddit }) {} export function requestPosts({ reddit }) {} export function receivePosts({ reddit, json }) { return { reddit, posts: json.data.children.map(child => child.data), receivedAt: Date.now() }; } function fetchPosts({ r...
import fetch from 'isomorphic-fetch'; export function invalidateReddit({ reddit }) {} export function requestPosts({ reddit }) {} export function receivePosts({ reddit, json }) { return { reddit, posts: json.data.children.map(child => child.data), receivedAt: Date.now() }; } function fetchPosts({ r...
Update async-redux example to getConsensus -> consensus
Update async-redux example to getConsensus -> consensus
JavaScript
apache-2.0
BurntCaramel/flambeau
249a886a7cf4c5583ab31e8ca94b2b1ae169c0a2
lib/utilities/validate-config.js
lib/utilities/validate-config.js
var Promise = require('ember-cli/lib/ext/promise'); var chalk = require('chalk'); var yellow = chalk.yellow; var blue = chalk.blue; function applyDefaultConfigIfNecessary(config, prop, defaultConfig, ui){ if (!config[prop]) { var value = defaultConfig[prop]; config[prop] = value; ui.write(blue('| ...
var Promise = require('ember-cli/lib/ext/promise'); var chalk = require('chalk'); var yellow = chalk.yellow; var blue = chalk.blue; function applyDefaultConfigIfNecessary(config, prop, defaultConfig, ui){ if (!config[prop]) { var value = defaultConfig[prop]; config[prop] = value; ui.write(blue('| ...
Include webfont extensions in default filePatterns
Include webfont extensions in default filePatterns
JavaScript
mit
lukemelia/ember-cli-deploy-gzip,achambers/ember-cli-deploy-gzip,achambers/ember-cli-deploy-gzip,lukemelia/ember-cli-deploy-gzip,ember-cli-deploy/ember-cli-deploy-gzip
559f6eb262569aaa1ebf4a626dcf549ce997369e
src/app/components/game/gameModel.service.js
src/app/components/game/gameModel.service.js
export default class GameModelService { constructor($log, $http, $localStorage, _, websocket) { 'ngInject'; this.$log = $log; this.$http = $http; this.$localStorage = $localStorage; this._ = _; this.ws = websocket; this.model = { game: null }; } update(data) { this.model.game = data; } }
export default class GameModelService { constructor($log, $http, $localStorage, _, websocket) { 'ngInject'; this.$log = $log; this.$http = $http; this.$localStorage = $localStorage; this._ = _; this.ws = websocket; this.model = { game: {} }; } isGameStarted() { return !this._.isEmpty(this.mo...
Add 'isGameStarted' property to GameModelService
Add 'isGameStarted' property to GameModelService
JavaScript
unlicense
ejwaibel/squarrels,ejwaibel/squarrels
be7eb150654a27ac04d7bf6746f91f3d01834911
lib/test-runner/mocha/separate/acceptance.js
lib/test-runner/mocha/separate/acceptance.js
function testFeature(feature) { if (feature.annotations.ignore) { describe.skip(`Feature: ${feature.title}`, () => {}); } else { describe(`Feature: ${feature.title}`, function() { feature.scenarios.forEach(function(scenario) { if (scenario.annotations.ignore) { describe.skip(`Scenari...
function testFeature(feature) { if (feature.annotations.ignore) { describe.skip(`Feature: ${feature.title}`, () => {}); } else { describe(`Feature: ${feature.title}`, function() { feature.scenarios.forEach(function(scenario) { if (scenario.annotations.ignore) { describe.skip(`Scenari...
Fix hanging promise in mocha
Fix hanging promise in mocha
JavaScript
mit
curit/ember-cli-yadda,adamjmcgrath/ember-cli-yadda,curit/ember-cli-yadda,adamjmcgrath/ember-cli-yadda
8252b5e3a7e68621762720975707a9f160f530b6
src/parser.js
src/parser.js
'use strict' const nearley = require('nearley') const grammar = require('./grammar') function byLevel(a, b) { return a.level < b.level ? -1 : a.level > b.level ? 1 : 0 } function limit(results, { level, types }) { if (!results.length) return results if (typeof level !== 'number') level = 2 return results.fi...
'use strict' const nearley = require('nearley') const grammar = require('./grammar') function byLevel(a, b) { return a.level < b.level ? -1 : a.level > b.level ? 1 : 0 } function limit(results, { level, types }) { if (!results.length) return results if (typeof level !== 'number') level = 2 return results.fi...
Add input to error messages
Add input to error messages
JavaScript
bsd-2-clause
inukshuk/edtf.js
04efbd29d2a96d0506c5b83629d51eff3c10833e
src/js/components/Admin/ArticleImages/Row.js
src/js/components/Admin/ArticleImages/Row.js
import React from 'react' import { inject, observer } from 'mobx-react' import { IMAGE_BASE_URL } from '../../../constants' import RedButton from '../../Buttons/Red' @inject('articleImagesStore') @observer export default class Row extends React.Component { handleDelete() { let articleImageID = this.props.ima...
import React from 'react' import { inject, observer } from 'mobx-react' import { IMAGE_BASE_URL } from '../../../constants' import RedButton from '../../Buttons/Red' @inject('articleImagesStore') @observer export default class Row extends React.Component { handleDelete() { let articleImageID = this.props.ima...
Add original ArticleImage URL to admin panel
Add original ArticleImage URL to admin panel
JavaScript
mit
appdev-academy/appdev.academy-react,appdev-academy/appdev.academy-react,appdev-academy/appdev.academy-react
fe9b46d748539bb5823f66b09374e63374ff2c20
gulp/index.js
gulp/index.js
var drFrankenstyle = require('dr-frankenstyle'); var through2 = require('through2'); var File = require('vinyl'); var namespaceAssets = require('dr-frankenstyle/lib/strategies').namespaceAssets; module.exports = function() { var assetsStream = through2.obj(); drFrankenstyle(function(file, callback) { namespace...
var drFrankenstyle = require('dr-frankenstyle'); var through2 = require('through2'); var File = require('vinyl'); var namespaceAssets = require('dr-frankenstyle/dist/strategies').namespaceAssets; module.exports = function() { var assetsStream = through2.obj(); drFrankenstyle(function(file, callback) { namespac...
Fix bad require path in gulp plugin
Fix bad require path in gulp plugin Signed-off-by: Vinson Chuong <6df075c17c17de53656cfe2eb11616735a18bb18@pivotal.io>
JavaScript
mit
bartvde/dr-frankenstyle,pivotal-cf/dr-frankenstyle
0272b400beb9bb2ddcba648ea52242b83ab993fd
src/mist/io/static/js/app/views/user_menu.js
src/mist/io/static/js/app/views/user_menu.js
define('app/views/user_menu', ['app/views/templated', 'md5'], /** * User Menu View * * @returns Class */ function (TemplatedView) { 'user strict'; return TemplatedView.extend({ /** * Properties */ isNotCore: !IS_CORE, ...
define('app/views/user_menu', ['app/views/templated', 'md5'], /** * User Menu View * * @returns Class */ function (TemplatedView) { 'user strict'; return TemplatedView.extend({ /** * Properties */ isNotCore: !IS_CORE, ...
Fix url for default user image
Fix url for default user image
JavaScript
agpl-3.0
DimensionDataCBUSydney/mist.io,Lao-liu/mist.io,johnnyWalnut/mist.io,DimensionDataCBUSydney/mist.io,afivos/mist.io,johnnyWalnut/mist.io,munkiat/mist.io,kelonye/mist.io,kelonye/mist.io,Lao-liu/mist.io,Lao-liu/mist.io,munkiat/mist.io,zBMNForks/mist.io,zBMNForks/mist.io,Lao-liu/mist.io,munkiat/mist.io,zBMNForks/mist.io,mun...
dd762de321b41aaea4bac2b57b28cc50241a70fa
test.js
test.js
'use strict' var test = require('tape') var mito = require('./') test('basic templating', function (t) { t.plan(3) t.equal('foo', mito('foo')()) t.equal('<h1>Foo</h1>', mito('<h1><%= title %></h1>')({title: 'Foo'})) t.equal('<p class="bar">Baz!</p>', mito('<p class="<%= cls %>">Baz!</p>')({cls: 'bar'...
'use strict' var test = require('tape') var mito = require('./') test('basic templating', function (t) { t.plan(3) t.equal(mito('foo')(), 'foo') t.equal(mito('<h1><%= title %></h1>')({title: 'Foo'}), '<h1>Foo</h1>') t.equal(mito('<p class="<%= cls %>">Baz!</p>')({cls: 'bar'}), '<p class="bar">Baz!</p...
Fix the position of expected and actual
Fix the position of expected and actual
JavaScript
mit
kt3k/mito
17595865fd2a5688fe86269365f209a32a438dc5
logic/campaign/campaignModelCheckerLogic.js
logic/campaign/campaignModelCheckerLogic.js
module.exports = { checkCampaignModel: function (redisClient, accountHashID, campaignHashID, callback) { } }
var configuration = require('../../config/configuration.json') var utility = require('../../public/method/utility') module.exports = { checkCampaignModel: function (redisClient, accountHashID, payload, callback) { var begTime = utility.getUnixTimeStamp() - configuration.MinimumDelay var endTime = utility.get...
Implement checkCampaignModel for Update Purposes
Implement checkCampaignModel for Update Purposes
JavaScript
mit
Flieral/Announcer-Service,Flieral/Announcer-Service
cf748be9d8c2e921a5b23b5637425de17e0150f5
Web/public/js/app/services/apiService.js
Web/public/js/app/services/apiService.js
angular.module('app').factory('api', function($http, $q, config){ return { single: function(sexe){ sexe = sexe || 'mal'; var deferred = $q.defer(); $http({ method: 'GET', url: config.apiUrl+'/blind/generate/single/'+sexe }) ...
angular.module('app').factory('api', function ($http, $q, config) { return { /* Generate Single questions (20) $param : sexe */ single: function (sexe) { sexe = sexe || 'mal'; var deferred = $q.defer(); $http({ method...
Add on ApiService functions for generate multi questions
Add on ApiService functions for generate multi questions
JavaScript
mit
Mathew78540/way,Mathew78540/way,Mathew78540/way,Mathew78540/way,Mathew78540/way
927f0010cb2a211b2e1309e06bd175807e308973
extension/options.js
extension/options.js
const DEFAULT_WHITELISTED_URL_REGEXPS = [ 'abcnews.go.com\/.+', 'arstechnica.com\/.+', 'bbc.co.uk\/.+', 'bbc.com\/.+', 'business-standard.com\/.+', 'cnn.com\/.+', 'economist.com\/.+', 'guardian.co.uk\/.+', 'theguardian.com\/.+', 'hollywoodreporter.com\/.+', 'huffingtonpost.com\/.+', 'irishtimes....
const DEFAULT_WHITELISTED_URL_REGEXPS = [ 'abcnews.go.com\/.+', 'arstechnica.com\/.+', 'bbc.co.uk\/.+', 'bbc.com\/.+', 'business-standard.com\/.+', 'cnn.com\/.+', 'economist.com\/.+', 'forbes.com\/.+', 'guardian.co.uk\/.+', 'hollywoodreporter.com\/.+', 'huffingtonpost.com\/.+', 'independent.co.u...
Add a couple more items to the default whitelist.
Add a couple more items to the default whitelist.
JavaScript
mit
eggpi/similarity,eggpi/similarity,eggpi/similarity
2a262132c97687818265305d401bb689bf0825ca
app/components/tracking-bar/component.js
app/components/tracking-bar/component.js
/** * @module timed * @submodule timed-components * @public */ import Component from 'ember-component' import service from 'ember-service/inject' import { observes } from 'ember-computed-decorators' import { later } from 'ember-runloop' const ENTER_CHAR_CODE = 13 /** * The tracking bar component * * @class Tra...
/** * @module timed * @submodule timed-components * @public */ import Component from 'ember-component' import service from 'ember-service/inject' import { observes } from 'ember-computed-decorators' import { later } from 'ember-runloop' const ENTER_CHAR_CODE = 13 /** * The tracking bar component * * @class Tra...
Fix focus jumping to comment after cleaning the customer
Fix focus jumping to comment after cleaning the customer
JavaScript
agpl-3.0
adfinis-sygroup/timed-frontend,adfinis-sygroup/timed-frontend,anehx/timed-frontend,adfinis-sygroup/timed-frontend,anehx/timed-frontend
9cc0eed9bbd264ee998e9dfec61c1d7f90815ae2
vestibule.js
vestibule.js
var slice = [].slice function Vestibule () { this._waiting = [] this.waiting = 0 this.open = null } Vestibule.prototype.enter = function (callback) { if (this.open == null) { var cookie = {} this.waiting++ this._waiting.push({ cookie: cookie, callback: c...
var slice = [].slice function Vestibule () { this._waiting = [] this.occupied = false this.open = null } Vestibule.prototype.enter = function (callback) { if (this.open == null) { var cookie = {} this.occupied = true this._waiting.push({ cookie: cookie, ...
Use `occupied` instead of `waiting`.
Use `occupied` instead of `waiting`.
JavaScript
mit
bigeasy/signal,bigeasy/vestibule,bigeasy/vestibule
c0d51e2b538e11b395d77dce8929243d26901a30
routes/edit/screens/App/screens/Project/components/ProjectPreview.js
routes/edit/screens/App/screens/Project/components/ProjectPreview.js
import React, { Component } from 'react'; import { getProjectViewUrl } from 'utils/urlUtil'; import marked from 'marked'; import styles from './ProjectPreview.styl'; class ProjectPreview extends Component { render () { const { project, params } = this.props; if (!project) return <div />; const viewU...
import React from 'react'; import { getProjectViewUrl } from 'utils/urlUtil'; import styles from './ProjectPreview.styl'; export default ({ project, params }) => { if (!project) return <div />; return ( <div className={styles.container}> <div className={styles.previewWrapper}> <iframe ...
Convert to a functional stateless component
Convert to a functional stateless component
JavaScript
mit
Literasee/literasee,Literasee/literasee
8279a202707d10f62b9e405fecacefa32510761f
test/setup.js
test/setup.js
require('babel-register')({ // ignore node_modules except node_modules/react-native-gifted-spinner and node_modules/react-native-lock // because they need to be transpiled // syntax: /node_modules\/(?!(library1|library2))/ ignore: /node_modules\/(?!(react-native-gifted-spinner|react-native-lock))/ });
global.__DEV__ = true; require('babel-register')({ // ignore node_modules except node_modules/react-native-lock, // because it needs to be transpiled // syntax: /node_modules\/(?!(library1|library2))/ ignore: /node_modules\/(?!(react-native-lock))/ });
Define __DEV__ flag for tests
Define __DEV__ flag for tests
JavaScript
mit
Florenz23/sangoo_04,yogakurniawan/phoney-mobile,ming-cho/react-native-demo,ericmasiello/TrailReporter,mandlamag/ESXApp,chriswohlfarth/mojifi-app,dominictracey/hangboard,yogakurniawan/phoney-mobile,ming-cho/react-native-demo,Florenz23/sangoo_04,yogakurniawan/phoney-mobile,fabriziomoscon/pepperoni-app-kit,dominictracey/h...
0de1409574a00e22b055504040ba11e5b8755cf7
app/store/configureStore.js
app/store/configureStore.js
import { createStore, applyMiddleware, compose } from 'redux'; import { autoRehydrate, persistStore } from 'redux-persist'; import persist from 'remotedev-app/lib/middlewares/persist'; import reduxAPI from '../middlewares/redux-api'; import reducer from '../reducers'; const middlewares = applyMiddleware(reduxAPI, pers...
import { createStore, applyMiddleware, compose } from 'redux'; import { autoRehydrate, persistStore } from 'redux-persist'; import reduxAPI from '../middlewares/redux-api'; import reducer from '../reducers'; const middlewares = applyMiddleware(reduxAPI); // If Redux DevTools Extension is installed use it, otherwise u...
Remove persist middleware of remotedev-app & Add monitor, test to persist whitelist
Remove persist middleware of remotedev-app & Add monitor, test to persist whitelist
JavaScript
mit
jhen0409/react-native-debugger,jhen0409/react-native-debugger,jhen0409/react-native-debugger
dd5de21dc79b27890b0fa1208accdd51b22878ef
lib/node_modules/@stdlib/utils/constructor-name/lib/index.js
lib/node_modules/@stdlib/utils/constructor-name/lib/index.js
'use strict'; // MODULES // var specificationClass = require( '@stdlib/utils/specification-class' ); var RE = require( '@stdlib/regex/function-name' ); var isBuffer = require( '@stdlib/utils/is-buffer' ); // CONSTRUCTOR NAME // /** * FUNCTION: constructorName( v ) * Determines the name of a value's constructor. * ...
'use strict'; // MODULES // var nativeClass = require( '@stdlib/utils/native-class' ); var RE = require( '@stdlib/regex/function-name' ); var isBuffer = require( '@stdlib/utils/is-buffer' ); // CONSTRUCTOR NAME // /** * FUNCTION: constructorName( v ) * Determines the name of a value's constructor. * * @param {*} v...
Update fcn to get an object's native class
Update fcn to get an object's native class
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
768efc2203e9666c3758af15c93dcb79cab7b61b
lib/node_modules/@stdlib/utils/is-binary-string/lib/index.js
lib/node_modules/@stdlib/utils/is-binary-string/lib/index.js
'use strict'; // MODULES // var isString = require( '@stlib/utils/is-string' )[ 'primitive' ]; // BINARY STRING // /** * FUNCTION: isBinaryString( value ) * Tests if a value is a binary string. * * @param {*} value - value to test * @returns {Boolean} boolean indicating if an input value is a binary string */ func...
'use strict'; // MODULES // var isString = require( '@stdlib/utils/is-string' )[ 'primitive' ]; // BINARY STRING // /** * FUNCTION: isBinaryString( value ) * Tests if a value is a binary string. * * @param {*} value - value to test * @returns {Boolean} boolean indicating if an input value is a binary string */ fun...
Fix typo in require statement of is-binary-string
Fix typo in require statement of is-binary-string
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
7b9e9d5ea12e7f263543bb7136d2b6fde12f37a5
app/js/app.js
app/js/app.js
// ========================================================================== // Application JavaScript for IMTD? // ========================================================================== document.addEventListener('DOMContentLoaded', init); function init() { var trainInfo = document.querySelector('.train-info');...
// ========================================================================== // Application JavaScript for IMTD? // ========================================================================== document.addEventListener('DOMContentLoaded', init); function init() { var trainInfo = document.querySelector('.train-info');...
Comment out missed curly brace
Comment out missed curly brace
JavaScript
mit
danieldafoe/is-my-train-delayed,danieldafoe/is-my-train-delayed,danieldafoe/is-my-train-delayed
bb8ee3f8b56e94d5db8348dce4697ec0dd650985
migrations/20170416013136_saldo_precision.js
migrations/20170416013136_saldo_precision.js
exports.up = (knex, Promise) => { return Promise.all([ knex.schema.raw('ALTER TABLE transactions ALTER COLUMN new_saldo decimal(8,2) not null;'), knex.schema.raw('ALTER TABLE transactions ALTER COLUMN old_saldo decimal(8,2) not null;'), knex.schema.raw('ALTER TABLE user_saldos ALTER COLUMN saldo decimal(8...
exports.up = (knex, Promise) => { return Promise.all([ knex.schema.raw('ALTER TABLE transactions ALTER COLUMN new_saldo decimal(8,2) not null;'), knex.schema.raw('ALTER TABLE transactions ALTER COLUMN old_saldo decimal(8,2) not null;'), knex.schema.raw('ALTER TABLE user_saldos ALTER COLUMN saldo decimal(8...
Discard rollback commands because we don't want get back to decimal(18,0) datatype
Discard rollback commands because we don't want get back to decimal(18,0) datatype
JavaScript
mit
majori/piikki
66c2a6c0764f106e312bcc8c04ba00c9e5044ea1
packages/gitbook-plugin-theme-default/src/components/Body.js
packages/gitbook-plugin-theme-default/src/components/Body.js
const GitBook = require('gitbook-core'); const { React } = GitBook; const Page = require('./Page'); const Toolbar = require('./Toolbar'); const Body = React.createClass({ propTypes: { page: GitBook.PropTypes.Page, readme: GitBook.PropTypes.Readme }, render() { const { page, read...
const GitBook = require('gitbook-core'); const { React } = GitBook; const Page = require('./Page'); const Toolbar = require('./Toolbar'); const Body = React.createClass({ propTypes: { page: GitBook.PropTypes.Page, readme: GitBook.PropTypes.Readme }, render() { const { page, read...
Add roles "body:wrapper", "toolbar:wrapper", "page:wrapper"
Add roles "body:wrapper", "toolbar:wrapper", "page:wrapper"
JavaScript
apache-2.0
tshoper/gitbook,tshoper/gitbook
8cc4a14515d3349a3ed3c2145eacb6af526e51a0
packages/redux-simple-auth/src/authenticators/credentials.js
packages/redux-simple-auth/src/authenticators/credentials.js
import createAuthenticator from '../createAuthenticator' import identity from '../utils/identity' import invariant from 'invariant' export default ({ endpoint, contentType = 'application/json', headers = {}, method = 'POST', transformRequest = JSON.stringify, transformResponse = identity }) => { invarian...
import createAuthenticator from '../createAuthenticator' import identity from '../utils/identity' import invariant from 'invariant' const defaultRestore = data => { if (Object.keys(data).length > 0) { return Promise.resolve(data) } return Promise.reject() } export default ({ endpoint, contentType = 'ap...
Allow restore to be overridden
Allow restore to be overridden
JavaScript
mit
jerelmiller/redux-simple-auth
db4966566ebd73caff8575ba6ac3c55906e267c4
tests/helpers/start-app.js
tests/helpers/start-app.js
import Ember from 'ember'; import Application from '../../app'; import Router from '../../router'; import config from '../../config/environment'; export default function startApp(attrs) { var application; var attributes = Ember.merge({}, config.APP); attributes = Ember.merge(attributes, attrs); // use defaults,...
import Ember from 'ember'; import Application from '../../app'; import Router from '../../router'; import config from '../../config/environment'; export default function startApp(attrs) { var application; let attributes = Ember.assign({}, config.APP, attrs); // use defaults, but you can override; Ember.run(fun...
Remove Ember.merge deprecation warnings. Dummy app requires Ember.assign.
Remove Ember.merge deprecation warnings. Dummy app requires Ember.assign.
JavaScript
mit
DanChadwick/ember-paper-cuts,DanChadwick/ember-paper-cuts
4c89275e73ee5a02a45812080904f3ab1b35d38b
public/js/views/registration-social-worker.js
public/js/views/registration-social-worker.js
(function () { 'use strict'; mare.views.SocialWorkerRegistration = Backbone.View.extend({ el: '.registration-form--social-worker', initialize: function() { // Initialize parsley validation on the form this.form = this.$el.parsley(); this.form.on('field:validated', this.validateForm); }, validateFo...
(function () { 'use strict'; mare.views.SocialWorkerRegistration = Backbone.View.extend({ el: '.registration-form--social-worker', events: { 'change .social-worker-title-checkbox': 'toggleSocialWorkerTitleTextField' }, initialize: function() { // DOM cache any commonly used elements to improve perfor...
Add data validation to custom title field in the social worker registration form.
Add data validation to custom title field in the social worker registration form.
JavaScript
mit
autoboxer/MARE,autoboxer/MARE
e7b594c3f3e434589f160ff349e28ee6fa75ad6d
src/Textarea.js
src/Textarea.js
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import idgen from './idgen'; import Icon from './Icon'; import cx from 'classnames'; class Textarea extends Component { componentDidUpdate() { M.textareaAutoResize(this._textarea); } renderIcon(icon) { return <Icon className="...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import idgen from './idgen'; import Icon from './Icon'; import cx from 'classnames'; class Textarea extends Component { componentDidUpdate() { M.textareaAutoResize(this._textarea); } renderIcon(icon) { return <Icon className="...
Change TextArea overwrite props order
Change TextArea overwrite props order
JavaScript
mit
react-materialize/react-materialize,react-materialize/react-materialize,react-materialize/react-materialize
e957f70dfd08f43a0f6c302b016a1f36bca304c7
assets/toggle/js/dosamigos-toggle.column.js
assets/toggle/js/dosamigos-toggle.column.js
/** * @copyright Copyright (c) 2014 2amigOS! Consulting Group LLC * @link http://2amigos.us * @license http://www.opensource.org/licenses/bsd-license.php New BSD License */ if (typeof dosamigos == "undefined" || !dosamigos) { var dosamigos = {}; } dosamigos.toggleColumn = (function ($) { var pub = { ...
/** * @copyright Copyright (c) 2014 2amigOS! Consulting Group LLC * @link http://2amigos.us * @license http://www.opensource.org/licenses/bsd-license.php New BSD License */ if (typeof dosamigos == "undefined" || !dosamigos) { var dosamigos = {}; } dosamigos.toggleColumn = (function ($) { var pub = { ...
Fix for duplicated event triggered when using ajax.
Fix for duplicated event triggered when using ajax.
JavaScript
bsd-3-clause
cBackup/yii2-grid-view-library
403cbad446f3f41ce0d937e5e1e5f03eb8537020
karma.conf.js
karma.conf.js
const base = require('skatejs-build/karma.conf'); module.exports = function (config) { base(config); config.files.push('node_modules/webcomponents.js/MutationObserver.js'); };
const base = require('skatejs-build/karma.conf'); module.exports = function (config) { base(config); config.files = [ 'node_modules/skatejs-named-slots/dist/index.js', 'node_modules/webcomponents.js/webcomponents.js' ].concat(config.files); };
Include all of webcomponentsjs because it only checks for browser support there instead of in the individual files. Included named slots so we can integration test everything together.
Include all of webcomponentsjs because it only checks for browser support there instead of in the individual files. Included named slots so we can integration test everything together.
JavaScript
mit
skatejs/skatejs,chrisdarroch/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs
47dac69104f61063d1e1888904c858857b1194c7
config/production.france.js
config/production.france.js
// App config the for production environment. // Do not require this directly. Use ./src/config instead. const HOST = process.env.HOST || "api.openfisca.fr", apiBaseUrl = process.env.API_URL || `https://${HOST}`, gitHubProject = "openfisca/openfisca-france", gitWebpageUrl = "https://github.com/openfisca/legislat...
// App config the for production environment. // Do not require this directly. Use ./src/config instead. const HOST = process.env.HOST || "api.openfisca.fr", apiBaseUrl = process.env.API_URL || `https://${HOST}`, gitHubProject = "openfisca/openfisca-france", gitWebpageUrl = "https://github.com/openfisca/legislat...
Add explicit https url in piwik config
Add explicit https url in piwik config
JavaScript
agpl-3.0
openfisca/legislation-explorer
1a6c22049cb44781d2046a8862d76626334d24dc
background.js
background.js
if (!localStorage['saved']){ localStorage['letA'] = '#800000'; //maroon localStorage['letE'] = '#008000'; //green localStorage['letI'] = '#0000ff'; //blue localStorage['letO'] = '#008080'; //teal localStorage['letU'] = '#800080'; //purple localStorage['saved'] = 'Y'; } // Converts an integer (unicode ...
if (!localStorage['saved']){ localStorage['letA'] = '#800000'; //maroon localStorage['letE'] = '#008000'; //green localStorage['letI'] = '#0000ff'; //blue localStorage['letO'] = '#008080'; //teal localStorage['letU'] = '#800080'; //purple localStorage['saved'] = 'Y'; } // Converts an integer (unicode ...
Fix bad indexing in array
Fix bad indexing in array
JavaScript
mit
gsavvas/Synesthete,gsavvas/Synesthete
56996ce32a59ea879951145a0350a33c8033575d
backend/server/resources/projects-routes.js
backend/server/resources/projects-routes.js
module.exports = function(model) { 'use strict'; let validateProjectAccess = require('./project-access')(model.access); let schema = require('.././schema')(model); let router = require('koa-router')(); let projects = require('./projects')(model.projects); let samples = require('./samples')(mode...
module.exports = function(model) { 'use strict'; let validateProjectAccess = require('./project-access')(model.access); let schema = require('.././schema')(model); let router = require('koa-router')(); let projects = require('./projects')(model.projects); let samples = require('./samples')(mode...
Add REST call for files.
Add REST call for files.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
0d845687d055c9626825c9cf01f274dc97829a65
server/models/game-info.js
server/models/game-info.js
var mongoose = require('mongoose'); mongoose.connect('mongodb://localhost:8080/my_database'); var Schema = mongoose.Schema; // create a schema var gameInfoSchema = new Schema({ title: { type: String, required: true }, descrption: { type: String }, pictures: [ { type: String } ], videos: [ { type: String } ]...
var mongoose = require('mongoose'); mongoose.connect('mongodb://localhost:8080/my_database'); var Schema = mongoose.Schema; // create a schema var gameInfoSchema = new Schema({ title: { type: String, required: true }, descrption: { type: String }, pictures: [ { type: String } ], videos: [ { type: String } ]...
Correct spelling of downloand to download.
Correct spelling of downloand to download.
JavaScript
mit
BerniceChua/landr,BerniceChua/landr,BerniceChua/landr
5967940b83c14f5047863f1a6529c40f20af676b
jquery.sameheight.js
jquery.sameheight.js
(function($) { $.fn.sameHeight = function() { var these = this; function setHeight() { var max = 0; these.height('auto').each(function() { max = Math.max(max, $(this).height()); }).height(max); }; $(window).resize(setHeight); setHeight(); return this; }; })(jQuery);...
/* * sameHeight jQuery plugin * http://github.com/sidewaysmilk/jquery-sameheight * * Copyright 2011, Justin Force * Licensed under the MIT license */ jQuery.fn.sameHeight = function() { var these = this; function setHeight() { var max = 0; these.height('auto').each(function() { max = Math.max(max, jQu...
Add header and don't use $ for jQuery
Add header and don't use $ for jQuery
JavaScript
bsd-3-clause
justinforce/jquery-sameheight
b3d855654d066be412b59e92f12c7409ab7b1e96
public/script.js
public/script.js
var PhotoRenderer = function(container, photo) { bindEvents(); this.render = function() { startProgress() renderImage(photo) return this } function bindEvents() { $("a").click(renderNewImage) $(window).on("popstate", renderImageFromHistory) } function renderImage(photo) { var df...
var PhotoRenderer = function(container, photo) { bindEvents(); this.render = function() { startProgress() renderImage(photo) return this } function bindEvents() { $("a").click(renderNewImage) $(window).on("popstate", renderImageFromHistory) } function renderImage(photo) { var df...
Add transition between changing images.
Add transition between changing images.
JavaScript
mit
jarmo/rand-flickr,jarmo/rand-flickr,jarmo/rand-flickr
98ffb7d832d81fc14ef60730f58db9ae437a00ec
js/michishiki_api.js
js/michishiki_api.js
michishiki.api = {}; michishiki.api.uri = 'http://amateras.wsd.kutc.kansai-u.ac.jp/~otsuka/michishiki_api_server/'; michishiki.api.getPost = function(options) { var dfd = $.Deferred(); var api_uri = michishiki.api.uri + 'get_post.py'; var query_string = michishiki.api.utils.optionsToQueryString(options); ...
michishiki.api = {}; michishiki.api.uri = 'http://amateras.wsd.kutc.kansai-u.ac.jp/~otsuka/michishiki_api_server/'; michishiki.api.getPost = function(options) { var dfd = $.Deferred(); var api_uri = michishiki.api.uri + 'get_post.py'; var query_string = michishiki.api.utils.optionsToQueryString(options); ...
Implement function to post by using michishiki API
Implement function to post by using michishiki API
JavaScript
mit
otknoy/michishiki
c15f46285754a84f0431d695c398d3641102ecf6
lib/formatters/where-raw.js
lib/formatters/where-raw.js
'use strict'; var _ = require('lodash'); /** * Format where expression. * * @param {string[]|string} keys Array of keys to omit in query * @param {string[]|string} query Array of parameter to use in where * @param {string[]|string} jsonkeys Array of keys json to use in query */ module.exports = function (keys, query...
'use strict'; var _ = require('lodash'); /** * Format where expression. * * @param {string[]|string} keys Array of keys to omit in query * @param {string[]|string} query Array of parameter to use in where * @param {string[]|string} jsonkeys Array of json keys to use in query */ module.exports = function (keys, query...
Change comment to json key
Change comment to json key
JavaScript
mit
lemonde/middlebot-bookshelf
550014b369a1f4a0e3d5c93fce7725db74b3e70b
src/reporter.js
src/reporter.js
import fmt from "./fmt" import { log } from "fly-util" export default function () { this.on("fly_run", ({ path }) => log(`Flying with ${fmt.path}...`, path)) .on("flyfile_not_found", ({ error }) => log(`No Flyfile Error: ${fmt.error}`, error)) .on("fly_watch", () => log(`${fmt.warn}`, "Watching fil...
import fmt from "./fmt" import { log } from "fly-util" export default function () { this.on("fly_run", ({ path }) => log(`Flying with ${fmt.path}...`, path)) .on("flyfile_not_found", ({ error }) => log(`No Flyfile Error: ${fmt.error}`, error)) .on("fly_watch", () => log(`${fmt.warn}`, "Watching fil...
Add timeInfo() for conditional scales
Add timeInfo() for conditional scales Fix quotes and remove whitespace
JavaScript
mit
Aweary/fly,yang-wei/fly,dieface/fly,dieface/fly,silverbux/fly,JimChenAnother/fly,alandipert/fly,iamstarkov/fly,alandipert/fly,iamstarkov/fly,DigitalCoder/fly,DigitalCoder/fly,DigitalCoder/fly,elton0895/fly,SerkanSipahi/fly,Aweary/fly,elton0895/fly,Aweary/fly,halhenke/fly,kesne/fly,kashiro/fly,JimChenAnother/fly,andrews...
90646a3727f48999272374ec6116595eb79f314c
assets/static/__mocks__/isInViewportMock.js
assets/static/__mocks__/isInViewportMock.js
const $ = require("jquery"); function isInViewport() {} $.extend($.expr[":"], { "in-viewport": $.expr.createPseudo ? $.expr.createPseudo(argsString => currElement => isInViewport(currElement, argsString)) : (currObj, index, meta) => isInViewport(currObj, meta) }) function run() {} $.fn.run = run
const $ = require("jquery"); // always returns true, indicating that every tested element is in viewport function isInViewport() { return true; } $.extend($.expr[":"], { "in-viewport": $.expr.createPseudo ? $.expr.createPseudo(argsString => currElement => isInViewport(currElement, argsString)) ...
Fix is-in-viewport mock to return true
Fix is-in-viewport mock to return true
JavaScript
apache-2.0
cloudflare/unsee,cloudflare/unsee,cloudflare/unsee,cloudflare/unsee,cloudflare/unsee
57dfea7f34a35df5c84f870688946381da87b167
karma.config.js
karma.config.js
var path = require('path'); module.exports = function(config) { config.set({ browsers: ['Chrome'], coverageReporter: { reporters: [ { type: 'html', subdir: 'html' }, { type: 'lcovonly', ...
var path = require('path'); module.exports = function(config) { config.set({ browsers: ['PhantomJS'], coverageReporter: { reporters: [ { type: 'html', subdir: 'html' }, { type: 'lcovonly', ...
Change karma browser for tests from Chrome to PhantomJS
Change karma browser for tests from Chrome to PhantomJS
JavaScript
mit
forrana/callstats-test-task,forrana/callstats-test-task
cbd95e2bd2705d0583354d945f881aac18d28eef
lib/processNested.js
lib/processNested.js
module.exports = function(data){ let d = {}, keys = Object.keys(data); for (let i = 0; i < keys.length; i++) { let key = keys[i], value = data[key], current = d, keyParts = key .replace(new RegExp(/\[/g), '.') .replace(new RegExp(/\]/g), '') .split('.'); for...
module.exports = function(data){ if (!data || data.length < 1) return {}; let d = {}, keys = Object.keys(data); for (let i = 0; i < keys.length; i++) { let key = keys[i], value = data[key], current = d, keyParts = key .replace(new RegExp(/\[/g), '.') .replace(new RegE...
Return empty when data is empty
Return empty when data is empty Fix for unit tests
JavaScript
mit
richardgirges/express-fileupload,richardgirges/express-fileupload
eb0e21b0b232d7fe453d07a3ba88560e91121b3b
build-config/RequireJS_config_browser.js
build-config/RequireJS_config_browser.js
// Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // 1. Redistributions of source code must retain the above copyright notice, thi...
// Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // 1. Redistributions of source code must retain the above copyright notice, thi...
Set a flag when config is loaded on a browser
Set a flag when config is loaded on a browser
JavaScript
bsd-3-clause
bibliolabs/readium-cfi-js,bibliolabs/readium-cfi-js
f11e02afce4056734ec7ebb994a8860200cb384c
packages/ember-views/tests/system/ext_test.js
packages/ember-views/tests/system/ext_test.js
import run from "ember-metal/run_loop"; import View from "ember-views/views/view"; QUnit.module("Ember.View additions to run queue"); QUnit.skip("View hierarchy is done rendering to DOM when functions queued in afterRender execute", function() { var didInsert = 0; var childView = View.create({ elementId: 'chi...
import run from "ember-metal/run_loop"; import View from "ember-views/views/view"; import { compile } from "ember-template-compiler"; QUnit.module("Ember.View additions to run queue"); QUnit.test("View hierarchy is done rendering to DOM when functions queued in afterRender execute", function() { var didInsert = 0; ...
Use template instead of render buffer
Use template instead of render buffer
JavaScript
mit
femi-saliu/ember.js,cesarizu/ember.js,danielgynn/ember.js,KevinTCoughlin/ember.js,howtolearntocode/ember.js,Leooo/ember.js,kennethdavidbuck/ember.js,duggiefresh/ember.js,Turbo87/ember.js,toddjordan/ember.js,asakusuma/ember.js,nipunas/ember.js,cyjia/ember.js,HeroicEric/ember.js,blimmer/ember.js,pangratz/ember.js,kublaj/...
ed4adf58eef5f3c4fccb4df493f942c74af67c4f
packages/userscript/vite.config.userscript.js
packages/userscript/vite.config.userscript.js
import { defineConfig } from "vite"; import { metablock } from "vite-plugin-userscript"; import manifest from "./package.json" assert { type: "json" }; const isDevBuild = process.env.NODE_ENV === "development"; function getDateString() { const date = new Date(); const year = date.getFullYear(); const month = `$...
import { defineConfig } from "vite"; import { metablock } from "vite-plugin-userscript"; import manifest from "./package.json" assert { type: "json" }; const isDevBuild = process.env.NODE_ENV === "development"; function getDateString() { const date = new Date(); const year = date.getFullYear(); const month = `$...
Put baseline version in filename
ci: Put baseline version in filename
JavaScript
mit
oliversalzburg/cbc-kitten-scientists,oliversalzburg/cbc-kitten-scientists,oliversalzburg/cbc-kitten-scientists
987aa105b940ef9ec0abdab326afbe16d99e116f
packages/components/hooks/useSubscription.js
packages/components/hooks/useSubscription.js
import { FREE_SUBSCRIPTION } from 'proton-shared/lib/constants'; import { SubscriptionModel } from 'proton-shared/lib/models/subscriptionModel'; import { UserModel } from 'proton-shared/lib/models/userModel'; import useCachedModelResult from './useCachedModelResult'; import useApi from '../containers/api/useApi'; impo...
import { FREE_SUBSCRIPTION } from 'proton-shared/lib/constants'; import { SubscriptionModel } from 'proton-shared/lib/models/subscriptionModel'; import { UserModel } from 'proton-shared/lib/models/userModel'; import useCachedModelResult from './useCachedModelResult'; import useApi from '../containers/api/useApi'; impo...
Fix special case for admin
Fix special case for admin
JavaScript
mit
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
9d310a0b5b6f737f90292b58a9209a97efaca376
ui/src/data_explorer/components/VisHeader.js
ui/src/data_explorer/components/VisHeader.js
import React, {PropTypes} from 'react' import classNames from 'classnames' const VisHeader = ({views, view, onToggleView, name}) => ( <div className="graph-heading"> <div className="graph-actions"> {views.length ? <ul className="toggle toggle-sm"> {views.map(v => ( <li ...
import React, {PropTypes} from 'react' import classNames from 'classnames' const VisHeader = ({views, view, onToggleView, name}) => ( <div className="graph-heading"> {views.length ? <ul className="toggle toggle-sm"> {views.map(v => ( <li key={v} onClick={()...
Remove unused div and style
Remove unused div and style
JavaScript
agpl-3.0
brianbaker/chronograf,brianbaker/chronograf,brianbaker/chronograf,brianbaker/chronograf,brianbaker/chronograf
be1a598e21ebac0f97f28aa6a26f4df53270c185
client/desktop/app/index.js
client/desktop/app/index.js
import React from 'react'; import ReactDOM from 'react-dom'; import {Router, Route, browserHistory, IndexRoute} from 'react-router' import App from './components/app'; import Login from './components/login' import Signup from './components/signup' import Classes from './components/teacher/classes/Classes' import Lesson...
import React from 'react'; import ReactDOM from 'react-dom'; import {Router, Route, browserHistory, IndexRoute} from 'react-router' import App from './components/app'; import Login from './components/login' import Signup from './components/signup' import Classes from './components/teacher/classes/Classes' import Lesson...
Remove starting and trailing slashes
Remove starting and trailing slashes
JavaScript
mit
Jakeyrob/thumbroll,shanemcgraw/thumbroll,Jakeyrob/thumbroll,Jakeyrob/thumbroll,absurdSquid/thumbroll,shanemcgraw/thumbroll,absurdSquid/thumbroll,shanemcgraw/thumbroll
a81404f524095b29288303070e73b554af09c2a2
src/hyperdeck/hyperdeck.js
src/hyperdeck/hyperdeck.js
var HyperdeckCore = require("./hyperdeck-core.js"); var Hyperdeck = function(ip) { //Start by connecting to Hyperdeck via HypderdeckCore var Core = new HyperdeckCore(ip); //Publicise functions from Core this.getNotifier = Core.getNotifier(); this.makeRequest = Core.makeRequest(); this.onConnected = Core...
var HyperdeckCore = require("./hyperdeck-core.js"); var Hyperdeck = function(ip) { //Start by connecting to Hyperdeck via HypderdeckCore var Core = new HyperdeckCore(ip); Core.makeRequest("notify: remote: true"); Core.makeRequest("notify: transport: true"); Core.makeRequest("notify: slot: true"); Core.mak...
Enable asynchronous notifications from Hyperdeck
Enable asynchronous notifications from Hyperdeck
JavaScript
mit
LA1TV/Hyperdeck-JS-Lib
7451a9cde1a485fc374082e3a072c2674fb304f5
js/app.js
js/app.js
angular .module('zibble', ['angular-jwt', 'ngResource', 'ui.router']) .constant('API', 'http://localhost:3000') .config(function($httpProvider){ $httpProvider.interceptors.push('AuthInterceptor'); }) .config(MainRouter); function MainRouter($stateProvider, $urlRouterProvider, $locationProvider){ $state...
angular .module('zibble', ['angular-jwt', 'ngResource', 'ui.router']) .constant('API', 'https://zibble-back-end.herokuapp.com') .config(function($httpProvider){ $httpProvider.interceptors.push('AuthInterceptor'); }) .config(MainRouter); function MainRouter($stateProvider, $urlRouterProvider, $locationPro...
Set API to Heroku address.
Set API to Heroku address.
JavaScript
mit
ninebelowzero/Zibble_front_end,ninebelowzero/Zibble_front_end,ninebelowzero/Zibble_front_end
4a456f44141ae2d5aed8cb32a82063356dcc318f
lib/sailsCacheman.js
lib/sailsCacheman.js
/** * Simple wrapper to wrap around the Cacheman nodejs package to integrate easily with SailsJS for caching. * @param {[string]} name Name the Cache Instance. */ var Cache = function (name) { var Cacheman = require('cacheman'); var _ = require('underscore'); var options = {}; // Get configuration co...
/** * Simple wrapper to wrap around the Cacheman nodejs package to integrate easily with SailsJS for caching. * @param {[string]} name Name the Cache Instance. */ var Cache = function (name) { var Cacheman = require('cacheman'); var _ = require('underscore'); var options = {}; // Get configuration va...
Fix config variable exposing to global scope
Fix config variable exposing to global scope
JavaScript
mit
gayanhewa/sailsjs-cacheman
93735a6a2f3c3bff37ac1ab1c09ffb37a53c833c
packages/rocketchat-livechat/server/models/LivechatExternalMessage.js
packages/rocketchat-livechat/server/models/LivechatExternalMessage.js
class LivechatExternalMessage extends RocketChat.models._Base { constructor() { super('livechat_external_message'); } // FIND findByRoomId(roomId, sort = { ts: -1 }) { const query = { rid: roomId }; return this.find(query, { sort: sort }); } } RocketChat.models.LivechatExternalMessage = new LivechatExtern...
class LivechatExternalMessage extends RocketChat.models._Base { constructor() { super('livechat_external_message'); if (Meteor.isClient) { this._initModel('livechat_external_message'); } } // FIND findByRoomId(roomId, sort = { ts: -1 }) { const query = { rid: roomId }; return this.find(query, { sort...
Fix livechat knowledge base by properly initiating it's model
Fix livechat knowledge base by properly initiating it's model Closes #6101
JavaScript
mit
mwharrison/Rocket.Chat,danielbressan/Rocket.Chat,cnash/Rocket.Chat,inoxth/Rocket.Chat,Movile/Rocket.Chat,Kiran-Rao/Rocket.Chat,pachox/Rocket.Chat,cnash/Rocket.Chat,inoxth/Rocket.Chat,flaviogrossi/Rocket.Chat,intelradoux/Rocket.Chat,inoxth/Rocket.Chat,mrinaldhar/Rocket.Chat,mwharrison/Rocket.Chat,mwharrison/Rocket.Chat,...
f8e313830e6cd09ab8ec39e4b0603f80afa83e2d
components/avatar/Avatar.js
components/avatar/Avatar.js
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Box from '../box'; import cx from 'classnames'; import theme from './theme.css'; class Avatar extends PureComponent { static propTypes = { /** Component that will be placed top right of the avatar image. */ children: Pro...
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Box from '../box'; import cx from 'classnames'; import theme from './theme.css'; class Avatar extends PureComponent { render() { const { children, className, image, imageAlt, imageClassName, size, ...others } = this.props; ...
Move static propTypes & defaultProps outside of the component class
Move static propTypes & defaultProps outside of the component class
JavaScript
mit
teamleadercrm/teamleader-ui
44e19e3cb2496fae6a2d037908b8c716549a9b87
frontend/app/modules/video-editor/editor/directive.js
frontend/app/modules/video-editor/editor/directive.js
module.exports = ['$sce', $sce => { return { restrict: 'E', template: require('./template.html'), controller: ['$scope', $scope => { $scope.video = {src: undefined}; $scope.receivedPaste = $event => { console.log($event, $event.clipboardData.getData('text/plain')); }; $sc...
module.exports = ['$sce', $sce => { return { restrict: 'E', template: require('./template.html'), controller: ['$scope', $scope => { $scope.video = {src: undefined}; $scope.receivedPaste = $event => { console.log($event, $event.clipboardData.getData('text/plain')); }; $sc...
Reset loaded flag on new video. (Must be a better way to do this)
Reset loaded flag on new video. (Must be a better way to do this)
JavaScript
mit
blakelapierre/video-editor,blakelapierre/video-editor
329505a9a0e0de08fa9d0c64d0ef693c417804b0
example/examples/BasicExample.react.js
example/examples/BasicExample.react.js
/* eslint-disable import/no-extraneous-dependencies */ import React, { Fragment } from 'react'; import { FormGroup } from 'react-bootstrap'; import Control from '../components/Control.react'; import { Typeahead } from '../../src'; import options from '../exampleData'; /* example-start */ class BasicExample extends R...
/* eslint-disable import/no-extraneous-dependencies */ import React, { Fragment } from 'react'; import { FormGroup } from 'react-bootstrap'; import Control from '../components/Control.react'; import { Typeahead } from '../../src'; import options from '../exampleData'; /* example-start */ class BasicExample extends R...
Convert basic example to be controlled
Convert basic example to be controlled
JavaScript
mit
ericgio/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead
0a15a0d0746f114fdb64f9bfc239689b345ec242
app/assets/javascripts/sorting/controller.js
app/assets/javascripts/sorting/controller.js
function SortingController(){ } SortingController.prototype = { getFormData: function(form){ var formData = {}; formData.type = $(form).attr("method"); formData.url = $(form).attr("action"); formData.data = $(form).serialize(); return formData; }, };
function SortingController(){ this.view = new RiverView(); } SortingController.prototype = { orderRiver: function(eventTarget){ var that = this; $.ajax($(eventTarget).attr("href")).done(function(newRiverDiv){ that.view.refreshRiver(newRiverDiv); }).fail(function(error){ alert(error.responseT...
Add orderRiver method to SortingController
Add orderRiver method to SortingController
JavaScript
mit
JamesAnthonyLow/whopperflow,nyc-fireflies-2015/whopperflow,JamesAnthonyLow/whopperflow,JamesAnthonyLow/whopperflow,nyc-fireflies-2015/whopperflow,nyc-fireflies-2015/whopperflow
6045e33ea092d97f1ad354fbeb7ab55b8d9dfe09
app/imports/ui/layouts/if-admin-logged-in.js
app/imports/ui/layouts/if-admin-logged-in.js
import { Meteor } from 'meteor/meteor'; import { Template } from 'meteor/templating'; /* eslint-disable object-shorthand */ Template.If_Admin_Logged_In.helpers({ /** * @returns {*} True if Meteor is in the process of logging in. */ authInProcess: function authInProcess() { return Meteor.loggingIn(); }...
import { Meteor } from 'meteor/meteor'; import { Template } from 'meteor/templating'; Template.If_Admin_Logged_In.helpers({ // @returns {*} True if Meteor is in the process of logging in. // authInProcess: function authInProcess() { return Meteor.loggingIn(); }, //@returns {boolean} True if there is...
Modify settings.json to allow deploy
Modify settings.json to allow deploy
JavaScript
apache-2.0
adventure-portal/adventure-portal,adventure-portal/adventure-portal
a95ca90883cf420c11641d8376f6ce0a25f4691e
app/scripts/common/views/BookmarkItemView.js
app/scripts/common/views/BookmarkItemView.js
'use strict'; var App = require('../../app'); var Marionette = require('backbone.marionette'); var template = require('../templates/bookmark_item.hbs'); module.exports = Marionette.ItemView.extend({ tagName: 'li', template: template, events: { 'click .js-remove-bookmark': function(event) { App.request...
'use strict'; var App = require('../../app'); var Marionette = require('backbone.marionette'); var template = require('../templates/bookmark_item.hbs'); module.exports = Marionette.ItemView.extend({ tagName: 'li', template: template, events: { 'click .js-remove-bookmark': function (event) { App.reques...
Hide bookmarks qtip after navigating to a module
Hide bookmarks qtip after navigating to a module
JavaScript
mit
nathanajah/nusmods,Yunheng/nusmods,mauris/nusmods,mauris/nusmods,nathanajah/nusmods,nusmodifications/nusmods,chunqi/nusmods,nusmodifications/nusmods,Yunheng/nusmods,chunqi/nusmods,nathanajah/nusmods,zhouyichen/nusmods,mauris/nusmods,Yunheng/nusmods,Yunheng/nusmods,mauris/nusmods,Yunheng/nusmods,zhouyichen/nusmods,zhouy...
384e8fa158bdf3620dffcdc3b42c4eaf798ea656
node_modules/dice-js/expression.js
node_modules/dice-js/expression.js
var Proteus = require("proteus"); module.exports = Proteus.Class.derive(Object.defineProperties({ init: function () { Object.defineProperties(this, { members: { value: [], enumerable: true } }); Proteus.slice(arguments).forEach(this.add, this); }, add...
var Proteus = require("proteus"); module.exports = Proteus.Class.derive(Object.defineProperties({ init: function () { this.members = []; Proteus.slice(arguments).forEach(this.add, this); }, get: function (idx) { return this.members[idx]; }, add: function (exp...
Use basic properties and make public properties consistent with other interfaces.
Use basic properties and make public properties consistent with other interfaces.
JavaScript
mit
jhamlet/dice-js
54ae6dc35acc55a9888c66eebb304019189b19a9
dist_chrome/content-script.js
dist_chrome/content-script.js
(function() { "use strict"; window.addEventListener('message', function(event) { if (event.data === 'debugger-client') { var port = event.ports[0]; listenToPort(port); } else if (event.data.type) { chrome.extension.sendMessage(event.data); } }); function listenToPort(port) { ...
(function() { "use strict"; window.addEventListener('message', function(event) { if (event.data === 'debugger-client') { var port = event.ports[0]; listenToPort(port); } else if (event.data.type) { chrome.extension.sendMessage(event.data); } }); function listenToPort(port) { ...
Remove tomster script after injection
Remove tomster script after injection Fixes #194
JavaScript
mit
cibernox/ember-inspector,Patsy-issa/ember-inspector,chrisgame/ember-inspector,jryans/ember-inspector,sivakumar-kailasam/ember-inspector,emberjs/ember-inspector,aceofspades/ember-inspector,knownasilya/ember-inspector,sivakumar-kailasam/ember-inspector,karthiick/ember-inspector,karthiick/ember-inspector,dsturley/ember-in...
10d2b08ab13452ff3fa6e8426c83bd0104116ace
assets/javascripts/modules/cookie-message.js
assets/javascripts/modules/cookie-message.js
function setCookie(name, value, options = {}) { let cookieString = `${name}=${value}; path=/`; if (options.days) { const date = new Date(); date.setTime(date.getTime() + (options.days * 24 * 60 * 60 * 1000)); cookieString = `${cookieString}; expires=${date.toGMTString()}`; } if (document.location....
function setCookie(name, value, options = {}) { let cookieString = `${name}=${value}; path=/`; if (options.days) { const date = new Date(); date.setTime(date.getTime() + (options.days * 24 * 60 * 60 * 1000)); cookieString = `${cookieString}; expires=${date.toGMTString()}`; } if (document.location....
Rename cookie message cookie name It currently clashes with GOV.UK cookie name so if the user has previously visited GOV.UK they won't see our cookie message.
Rename cookie message cookie name It currently clashes with GOV.UK cookie name so if the user has previously visited GOV.UK they won't see our cookie message.
JavaScript
mit
nhsuk/betahealth,nhsalpha/betahealth,nhsuk/betahealth,nhsalpha/betahealth,nhsalpha/betahealth,nhsuk/betahealth
cd169317083d6f4d9892ec2140ae6a4c18629b9a
Source/server/config/environment/development.js
Source/server/config/environment/development.js
'use strict'; // Development specific configuration // ================================== module.exports = { // MongoDB connection options mongo: { uri: 'mongodb://127.0.0.1/medcheck-dev' }, seedDB: true };
'use strict'; // Development specific configuration // ================================== module.exports = { // MongoDB connection options mongo: { uri: "mongodb://" + process.env.DB_PORT_27017_TCP_ADDR + ":" + process.env.DB_PORT_27017_TCP_PORT + "/test" }, seedDB: true };
Add correct mongo connection string (pull from docker env)
Add correct mongo connection string (pull from docker env)
JavaScript
apache-2.0
inforeliance/MedCheck,inforeliance/MedCheck,inforeliance/MedCheck
c5ff8e77c877ca00463ac7760c2b242ea8055fb4
mods/gen3/scripts.js
mods/gen3/scripts.js
exports.BattleScripts = { inherit: 'gen5', gen: 3, init: function () { for (var i in this.data.Pokedex) { delete this.data.Pokedex[i].abilities['H']; } var specialTypes = {Fire:1, Water:1, Grass:1, Ice:1, Electric:1, Dark:1, Psychic:1, Dragon:1}; var newCategory = ''; for (var i in this.data.Movedex) { ...
exports.BattleScripts = { inherit: 'gen5', gen: 3, init: function () { for (var i in this.data.Pokedex) { delete this.data.Pokedex[i].abilities['H']; } var specialTypes = {Fire:1, Water:1, Grass:1, Ice:1, Electric:1, Dark:1, Psychic:1, Dragon:1}; var newCategory = ''; for (var i in this.data.Movedex) { ...
Revert "Gen 3: A faint ends the turn just like in gens 1 and 2"
Revert "Gen 3: A faint ends the turn just like in gens 1 and 2" This reverts commit ebfaf1e8340db1187b9daabcb6414ee3329d882b.
JavaScript
mit
Pikachuun/Joimmon-Showdown,Pikachuun/Joimmon-Showdown
9a724dfb3ba3349db6ae5c64e5453a630bf13a27
server/config/routes.js
server/config/routes.js
module.exports = function(app, express) { app.get('/test', function(req, res) { res.send('Testing123'); }); };
module.exports = function(app, express) { app.get('/auth/facebook', function(req, res) { res.send('Facebook OAuth'); }); app.get('auth/facebook/callback', function(req, res) { res.send('Callback for Facebook OAuth'); }); app.route('/api/users') .post(function(req, res) { res.send('Create ...
Add endpoints for Facebook OAuth and User Creation
Add endpoints for Facebook OAuth and User Creation
JavaScript
mit
derektliu/Picky-Notes,derektliu/Picky-Notes,inspiredtolive/Picky-Notes,folksy-squid/Picky-Notes,derektliu/Picky-Notes,folksy-squid/Picky-Notes,folksy-squid/Picky-Notes,inspiredtolive/Picky-Notes,inspiredtolive/Picky-Notes
7ec17f7e686423f8253e70f4bb179989c0cdac0b
cypress/support/commands.js
cypress/support/commands.js
// *********************************************** // This example commands.js shows you how to // create various custom commands and overwrite // existing commands. // // For more comprehensive examples of custom // commands please read more here: // https://on.cypress.io/custom-commands // ***************************...
// *********************************************** // This example commands.js shows you how to // create various custom commands and overwrite // existing commands. // // For more comprehensive examples of custom // commands please read more here: // https://on.cypress.io/custom-commands // ***************************...
Create helper functions for selectively answering form questions
Create helper functions for selectively answering form questions
JavaScript
mit
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
fb09ede424c11ca519a2e5b822c02d105386e9e6
functions/math/dechex.js
functions/math/dechex.js
function dechex(number) { // http://kevin.vanzonneveld.net // + original by: Philippe Baumann // + bugfixed by: Onno Marsman // * example 1: dechex(10); // * returns 1: 'a' // * example 2: dechex(47); // * returns 2: '2f' return parseInt(number, 10).toString(16);...
function dechex(number) { // http://kevin.vanzonneveld.net // + original by: Philippe Baumann // + bugfixed by: Onno Marsman // + improved by: pilus // * example 1: dechex(10); // * returns 1: 'a' // * example 2: dechex(47); // * returns 2: '2f' if (number < 0) { ...
Fix to handle negative numbers in PHP way--thanks pilus!
Fix to handle negative numbers in PHP way--thanks pilus!
JavaScript
mit
VicAMMON/phpjs,cigraphics/phpjs,hirak/phpjs,kvz/phpjs,kvz/phpjs,ajenkul/phpjs,MartinReidy/phpjs,janschoenherr/phpjs,hirak/phpjs,revanthpobala/phpjs,VicAMMON/phpjs,revanthpobala/phpjs,ajenkul/phpjs,FlorinDragotaExpertvision/phpjs,janschoenherr/phpjs,chand3040/phpjs,hirak/phpjs,Mazbaul/phpjs,hirak/phpjs,J2TeaM/phpjs,VicA...
125735720e43f9722f491236836d0854d3f6fb72
evird/static/app/js/app.js
evird/static/app/js/app.js
/** @jsx React.DOM */ var GoogleApiAuthForm = React.createClass({ getInitialState: function() { return {apiKey: null, clientId: null}; }, render: function () { return ( <form role="form" onSubmit={this.handleSubmit}> <div className="form-group"> ...
/** @jsx React.DOM */ var GoogleApiAuthForm = React.createClass({ render: function () { return ( <form role="form" onSubmit={this.handleSubmit}> <div className="form-group"> <label for="client_id">Client Id</label> <input ...
Load the gapi client drive library and change when promise is resolved
Load the gapi client drive library and change when promise is resolved
JavaScript
apache-2.0
pgollakota/evird
f949f9b4e12bfcf3093d9ddd00281f92488ab9cd
packages/main-nav/src/js/jquery.js
packages/main-nav/src/js/jquery.js
/*! [replace-name] v[replace-version] */ /*************************************************************************************************************************************************************** * * mainNav function * * Horizontal list of links to key areas on the website. Usually located in the header. * ...
/*! [replace-name] v[replace-version] */ /*************************************************************************************************************************************************************** * * mainNav function * * Horizontal list of links to key areas on the website. Usually located in the header. * ...
Fix up callbacks in jQuery
Fix up callbacks in jQuery
JavaScript
mit
govau/uikit,govau/uikit
66050161e0ef3abd6d00a079c484d806b32c8219
src/trix/config/browser.js
src/trix/config/browser.js
export default { // Android emits composition events when moving the cursor through existing text // Introduced in Chrome 65: https://bugs.chromium.org/p/chromium/issues/detail?id=764439#c9 composesExistingText: /Android.*Chrome/.test(navigator.userAgent), // On Android 13 Samsung keyboards emit a composition ...
export default { // Android emits composition events when moving the cursor through existing text // Introduced in Chrome 65: https://bugs.chromium.org/p/chromium/issues/detail?id=764439#c9 composesExistingText: /Android.*Chrome/.test(navigator.userAgent), // On Android 13 Samsung keyboards emit a composition ...
Apply change to all Android 13 devices
Apply change to all Android 13 devices
JavaScript
mit
basecamp/trix,basecamp/trix,basecamp/trix,basecamp/trix
e20256ec981ad6a4dad22255bf534691de9c8975
imports/startup/server/accounts-configuration.js
imports/startup/server/accounts-configuration.js
import { Meteor } from 'meteor/meteor'; import { Accounts } from 'meteor/accounts-base'; import { ServiceConfiguration } from 'meteor/service-configuration'; import { _ } from 'lodash'; const services = Meteor.settings.private.oAuth; (() => { if (services) { _.forOwn(services, (data, service) => { Service...
import { Meteor } from 'meteor/meteor'; import { Accounts } from 'meteor/accounts-base'; import { ServiceConfiguration } from 'meteor/service-configuration'; import { _ } from 'lodash'; const services = Meteor.settings.private.oAuth; (() => { if (services) { _.forOwn(services, (data, service) => { Service...
Fix a bug where new users couldn't access settings page
Fix a bug where new users couldn't access settings page Signed-off-by: Felipe Milani <6def120dcec8fcb28aed4723fac713cfff66d853@gmail.com>
JavaScript
mit
fmilani/contatempo,fmilani/contatempo
20cdc5c2f3f2f481b0042229ab5339e17b6acde9
app/assets/javascripts/lentil/imageerrors.js
app/assets/javascripts/lentil/imageerrors.js
function addimageerrors() { $(".instagram-img, .battle-img, .fancybox-img, .fancybox-video").off("error").on("error", function () { $(this).parents("div.image-tile, li.image-animate-tile").remove(); }); }
function addimageerrors() { $("a[target=_blank]").attr("rel", "noopener noreferrer"); $(".instagram-img, .battle-img, .fancybox-img, .fancybox-video").off("error").on("error", function () { $(this).parents("div.image-tile, li.image-animate-tile").remove(); }); }
Set rel noopener roreferrer on links
Set rel noopener roreferrer on links
JavaScript
mit
NCSU-Libraries/lentil,NCSU-Libraries/lentil,NCSU-Libraries/lentil