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
ff911f95e7a1b53be6c9e1a1685b6dcf5cc62f73
codebrag-ui/test/common/directives/savingStatus-spec.js
codebrag-ui/test/common/directives/savingStatus-spec.js
ddescribe('Dynamic favicon directive', function() { var $rootScope, $scope, el, $compile; var statusClasses = ['pending', 'success', 'failed']; beforeEach(module('codebrag.common.directives')); beforeEach(inject(function (_$rootScope_, _$compile_) { $compile = _$compile_; $rootScope =...
describe('Saving status indicator directive', function() { var $rootScope, $scope, el, $compile; var statusClasses = ['pending', 'success', 'failed']; beforeEach(module('codebrag.common.directives')); beforeEach(inject(function (_$rootScope_, _$compile_) { $compile = _$compile_; $root...
Fix - run all tests, not only those for saving status directive.
Fix - run all tests, not only those for saving status directive.
JavaScript
agpl-3.0
cazacugmihai/codebrag,cazacugmihai/codebrag,softwaremill/codebrag,softwaremill/codebrag,softwaremill/codebrag,softwaremill/codebrag,cazacugmihai/codebrag,cazacugmihai/codebrag,cazacugmihai/codebrag
0db4c9a76a63ac417004b0899f43902ffc9aebf0
lib/ribosome.js
lib/ribosome.js
var path = require('path') var tmp = require('tmp') var html = require('./html.js') var pdf = require('./pdf.js') module.exports = ribosome = {} ribosome.translate = function(url, success, error, license) { tmp.dir(function(err, dirPath) { if (err) { error(err) } else { var htmlPath = path.join(...
var path = require('path') var tmp = require('tmp') var html = require('./html.js') var pdf = require('./pdf.js') module.exports = ribosome = {} ribosome.translate = function(url, success, error, license) { tmp.dir(function(err, dirPath) { if (err) { error(err) } else { var htmlPath = path.join(...
Fix a bug not passing license properly
Fix a bug not passing license properly
JavaScript
apache-2.0
color/ribosome,ColorGenomics/ribosome
cdebb9acdc409af5f55a224f374bc3f25b04877f
app/containers/main/MainContainer.js
app/containers/main/MainContainer.js
import React from 'react' import { Navigation } from 'components' import { connect } from 'react-redux' import { container, innerContainer } from './styles.css' const MainContainer = React.createClass({ render () { // console.log('props', this.props); return ( <div className={container}> <Navig...
import React, { PropTypes } from 'react' import { Navigation } from 'components' import { connect } from 'react-redux' import { container, innerContainer } from './styles.css' const MainContainer = React.createClass({ propTypes: { isAuthed: PropTypes.bool.isRequired, }, render () { // console.log('props'...
Add proptypes, navbar changes on isAuthed true
Add proptypes, navbar changes on isAuthed true
JavaScript
mit
guilsa/ducker,guilsa/ducker
d4a4377e96babe1137e08b281aa774936655383b
fan/views/Checkbox.js
fan/views/Checkbox.js
jsio('from shared.javascript import Class, bind') jsio('import fan.views.Value') exports = Class(fan.views.Value, function(supr){ this._domTag = 'input' this._domType = 'checkbox' this._className += ' Checkbox' this._createContent = function() { supr(this, '_createContent') this._on('change', bind(this, '_...
jsio('from shared.javascript import Class, bind') jsio('import fan.views.Value') exports = Class(fan.views.Value, function(supr){ this._domTag = 'input' this._domType = 'checkbox' this._className += ' Checkbox' this._createContent = function() { supr(this, '_createContent') this._on('change', bind(this, '_...
Handle keyboard select for checkbox views
Handle keyboard select for checkbox views
JavaScript
mit
marcuswestin/Focus
a9dbed5c5a866bb48377e63b8cf1d8b6ac8af165
_site/js/controllers/AnalyzerCtrl.js
_site/js/controllers/AnalyzerCtrl.js
function AnalyzerCtrl($scope, $http, Analyzer, Data){ $scope.analyzer = Analyzer; $scope.data = Data; $scope.atext = {}; $scope.$watch('analyzer.query', function(value){ for (i in $scope.analyzer.analyzers){ $scope.analyze($scope.analyzer.analyzers[i]); } }); $sc...
function AnalyzerCtrl($scope, $http, Analyzer, Data){ $scope.analyzer = Analyzer; $scope.data = Data; $scope.$watch('analyzer.query', function(value){ for (i in $scope.analyzer.analyzers){ $scope.analyze($scope.analyzer.analyzers[i]); } }); $scope.analyze = function(a...
Remove unused variable in $scope
Remove unused variable in $scope
JavaScript
apache-2.0
polyfractal/elasticsearch-inquisitor,AlphaStaxLLC/elasticsearch-inquisitor,AlphaStaxLLC/elasticsearch-inquisitor,polyfractal/elasticsearch-inquisitor
3a344d3a91172115dca758974ee6608bb67549d3
spec/javascripts/lib/jasmine/conf/init_local_fixtures.js
spec/javascripts/lib/jasmine/conf/init_local_fixtures.js
if(typeof jasmine !== "undefined") { jasmine.getFixtures().fixturesPath = '/spec/javascripts/specs/fixtures'; }
if(typeof jasmine !== "undefined") { jasmine.getFixtures().fixturesPath = '/src/main/javascript/tetra/spec/javascripts/specs/fixtures'; }
Fix local conf for jasmine tests
Fix local conf for jasmine tests
JavaScript
mit
viadeo/tetra,viadeo/tetra
36216b3dc083b9ef0c6d9ce1d2c7cf01848cf120
public/js/url-formatter.js
public/js/url-formatter.js
(function (doc) { "use strict"; var REGEX_URL = /^(https?):\/\/(?:gist|raw)\.github(?:usercontent)?\.com\/([^\/]+\/[^\/]+\/[^\/]+|[0-9A-Za-z-]+\/[0-9a-f]+\/raw)\//i; var devEl = doc.getElementById('url-dev'), prodEl = doc.getElementById('url-prod'), urlEl = doc.getElementById('url'); urlEl.addEventListene...
(function (doc) { "use strict"; var REGEX_URL = /^(https?):\/\/(?:gist|raw\.)?github(?:usercontent)?\.com\/([^\/]+\/[^\/]+\/[^\/]+|[0-9A-Za-z-]+\/[0-9a-f]+\/raw)\/(.+)/i; var devEl = doc.getElementById('url-dev'), prodEl = doc.getElementById('url-prod'), urlEl = doc.getElementById('url'); urlEl.addEventLi...
Make the URL formatter friendlier.
Make the URL formatter friendlier.
JavaScript
mit
cnbin/rawgit,rgrove/rawgit,ssddi456/rawgit,rgrove/rawgit,cnbin/rawgit,ssddi456/rawgit,cnbin/rawgit,matsmith/rawgit,gnowxilef/rawgit,raimo/livegit,ddtxra/rawgit,matsmith/rawgit,gnowxilef/rawgit,ssddi456/rawgit,matsmith/rawgit,sereepap2029/rawgit,ddtxra/rawgit,sereepap2029/rawgit,gnowxilef/rawgit,sereepap2029/rawgit,ddtx...
fad95a6071d39e649916f534f8561bd1fadd8a4a
packages/fela-bindings/src/ThemeProviderFactory.js
packages/fela-bindings/src/ThemeProviderFactory.js
/* @flow */ import { shallowEqual } from 'recompose' import { objectEach } from 'fela-utils' import createTheme from './createTheme' export default function ThemeProviderFactory( BaseComponent: any, renderChildren: Function, statics?: Object ): any { class ThemeProvider extends BaseComponent { theme: Obje...
/* @flow */ import { shallowEqual } from 'recompose' import { objectEach } from 'fela-utils' import createTheme from './createTheme' export default function ThemeProviderFactory( BaseComponent: any, renderChildren: Function, statics?: Object ): any { class ThemeProvider extends BaseComponent { theme: Obje...
Use shallowEqual to prevent false-positive values
Use shallowEqual to prevent false-positive values
JavaScript
mit
derek-duncan/fela,rofrischmann/fela,risetechnologies/fela,risetechnologies/fela,derek-duncan/fela,derek-duncan/fela,derek-duncan/fela,derek-duncan/fela,derek-duncan/fela,risetechnologies/fela,rofrischmann/fela,rofrischmann/fela
ac4df0c99a4ccab30d8f3d242211c0155ebb619f
app/components/x-toggle.js
app/components/x-toggle.js
import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'span', theme: 'default', off: 'Off', on: 'On', toggled: false, inputClasses: Ember.observer('themeClass', 'inputCheckbox', function () { var themeClass = this.get('themeClass'); var input = this.get('inputCheckbox'); ...
import Ember from 'ember'; var observer = Ember.observer; var on = Ember.on; var computed = Ember.computed; export default Ember.Component.extend({ tagName: 'span', theme: 'default', off: 'Off', on: 'On', toggled: false, inputClasses: on('init', observer('themeClass', 'inputCheckbox', function () { v...
Use local variables to make methods parse easier.
Use local variables to make methods parse easier. * Stash local variables, and use them inline (seems to be easier to read to me). * Do not require function prototype extensions (`Function.prototype.on` was used before).
JavaScript
mit
knownasilya/ember-toggle,knownasilya/ember-toggle,lifegadget/ember-cli-toggle,paulkogel/ember-cli-toggle,lifegadget/ember-cli-toggle,knownasilya/ember-cli-toggle,paulkogel/ember-cli-toggle,knownasilya/ember-cli-toggle
7ff065c62c1d1a1ab0665e4f71967dc9ef5e2c0f
src/app/components/players/player/playerModel.service.js
src/app/components/players/player/playerModel.service.js
export class PlayerModelService { constructor($log, $http, $localStorage, $q, _, playersApi) { 'ngInject'; this.$log = $log; this.$http = $http; this.$localStorage = $localStorage; this.$q = $q; this._ = _; this.playersApi = playersApi; this.model = { player: null }; this.numDrawCards = 7; ...
export class PlayerModelService { constructor($log, $http, $localStorage, $q, _, playersApi) { 'ngInject'; this.$log = $log; this.$http = $http; this.$localStorage = $localStorage; this.$q = $q; this._ = _; this.playersApi = playersApi; this.model = { player: null }; this.numDrawCards = 7; ...
Add 'cardsSelected' property to the PlayerModelService
Add 'cardsSelected' property to the PlayerModelService
JavaScript
unlicense
ejwaibel/squarrels,ejwaibel/squarrels
932899a1363cc02acb113ea7dc2984e966a79d88
drupal-themes/nceas_adaptive/js/include.js
drupal-themes/nceas_adaptive/js/include.js
/************************************* * Include.js * A Javascript file that contains functions specific to the NCEAS website * This file will be included in every page on NCEAS * * Author: Lauren Walker laurennwalker@gmail.com * 2015 *************************************/ // Check if a slider/slideshow is on thi...
/************************************* * Include.js * A Javascript file that contains functions specific to the NCEAS website * This file will be included in every page on NCEAS * * Author: Lauren Walker laurennwalker@gmail.com * 2015 *************************************/ jQuery(window).load(function(){ //Make...
Use jQuery(window).load to avoid interference with other Drupal modules and libraries. Also use the flexslider API to start the Flexslider instead of manually starting it
Use jQuery(window).load to avoid interference with other Drupal modules and libraries. Also use the flexslider API to start the Flexslider instead of manually starting it
JavaScript
artistic-2.0
NCEAS/nceas-web,NCEAS/nceas-web,NCEAS/nceas-web
18f75fe27652ab3c1c9d8cbe53b28e6363ea23e7
api/db/rescue.js
api/db/rescue.js
'use strict' module.exports = function (sequelize, DataTypes) { let Rescue = sequelize.define('Rescue', { id: { type: DataTypes.UUID, primaryKey: true, defaultValue: DataTypes.UUIDV4 }, active: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: true }, ...
'use strict' module.exports = function (sequelize, DataTypes) { let Rescue = sequelize.define('Rescue', { id: { type: DataTypes.UUID, primaryKey: true, defaultValue: DataTypes.UUIDV4 }, active: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: true }, ...
Add back unknown platform type
Add back unknown platform type
JavaScript
bsd-3-clause
FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com
ad4a9ae6a9ab32e14ff45e532cf79b613e8e2b91
assets/script/test/ped2/onColided.js
assets/script/test/ped2/onColided.js
logger.println(text(translate("se.pop2")).color(GameColor.static.green)); // test(function(ch) { logger.println(text(new String(ch))); }); var c_1 = choice('a', "Demo", function(ch) { logger.println(text("You choiced " + ch)); player.getMessage().replace(message().println("You choiced [" + ch + "]\n ").println("...
logger.println(text(translate("se.pop2")).color(GameColor.static.green)); // test(function(ch) { logger.println(text(new String(ch))); }); var c_1 = choice('a', "Demo", function(ch) { logger.println(text("You choiced " + ch)); player.getMessage().replace(message().println("You choiced [" + ch + "]\n ").println("...
Fix text: not 'one' but 'two'
Fix text: not 'one' but 'two'
JavaScript
apache-2.0
kanomiya/Steward,kanomiya/Steward
4693d84d058bc1dc79842bbb11e0c9126c59bf4a
app/assets/js/component/Combobox.js
app/assets/js/component/Combobox.js
/** * Created by dungvn3000 on 2/18/14. */ Ext.define('sunerp.component.Combobox', { extend: 'Ext.form.field.ComboBox', alias: 'widget.comboboxx', triggerAction: 'all', forceSelection: true, queryMode: 'local', listeners: { afterRender: function() { this.store.reload(); ...
/** * Created by dungvn3000 on 2/18/14. */ Ext.define('sunerp.component.Combobox', { extend: 'Ext.form.field.ComboBox', alias: 'widget.comboboxx', triggerAction: 'all', forceSelection: true, queryMode: 'local', config: { modelName: null }, listeners: { afterRender: fun...
Rename method getSelect to getSelectData. Add config modelName.
Rename method getSelect to getSelectData. Add config modelName.
JavaScript
apache-2.0
SunriseSoftVN/sunerp,SunriseSoftVN/sunerp,SunriseSoftVN/sunerp
ef492df0704426dd6db760e76d1a3179a20cac3d
app/scripts/nuswhispers.js
app/scripts/nuswhispers.js
'use strict'; var App = require('./app'); App.request('addNavigationItem', { name: 'NUSWhispers', icon: 'heart', url: 'http://nuswhispers.com/', target: '_blank', newLabel: true });
'use strict'; var App = require('./app'); App.request('addNavigationItem', { name: 'NUSWhispers', icon: 'heart', url: 'https://nuswhispers.com/', target: '_blank', newLabel: true });
Update NUSWhispers URL for HTTPS
Update NUSWhispers URL for HTTPS
JavaScript
mit
mauris/nusmods,nusmodifications/nusmods,nusmodifications/nusmods,mauris/nusmods,mauris/nusmods,nusmodifications/nusmods,mauris/nusmods,nusmodifications/nusmods
6e910d50ad8929802dded0279037a436f60ba67a
src/menus/scaleDown.js
src/menus/scaleDown.js
'use strict'; import menuFactory from '../menuFactory'; const styles = { pageWrap(isOpen, width) { return { transform: isOpen ? 'translate3d(0, 0, 1px)' : `translate3d(0, 0, -${width}px)`, transformOrigin: '100%', transformStyle: 'preserve-3d', transition: 'all 0.5s' }; }, oute...
'use strict'; import menuFactory from '../menuFactory'; const styles = { pageWrap(isOpen, width) { return { transform: isOpen ? 'translate3d(0, 0, -1px)' : `translate3d(0, 0, -${width}px)`, transformOrigin: '100%', transformStyle: 'preserve-3d', transition: 'all 0.5s' }; }, out...
Fix icon disappearing bug in Safari
Fix icon disappearing bug in Safari
JavaScript
mit
negomi/react-burger-menu,hedgehog34/react-burger-menu,hedgehog34/react-burger-menu,negomi/react-burger-menu
304cbd60f2c06ed863ef06ce6bde79b7bb613889
server/src/seeders/20171202141325-existing-memberships.js
server/src/seeders/20171202141325-existing-memberships.js
module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.bulkInsert('Memberships', [ { id: new Sequelize.UUIDV1(), memberId: '75b936c0-ba72-11e7-84e1-058ffffd96c5', groupId: 'c46ebe90-bd68-11e7-922f-4d48c5331440', userRole: 'admin', ...
module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.bulkInsert('Memberships', [ { id: '047fbd50-2d5a-4800-86f0-05583673fd7f', memberId: '75b936c0-ba72-11e7-84e1-058ffffd96c5', groupId: 'c46ebe90-bd68-11e7-922f-4d48c5331440', userRole:...
Fix UUID column error in membership seeder
Fix UUID column error in membership seeder
JavaScript
mit
Philipeano/post-it,Philipeano/post-it
cca9a07602ed6ab2b534dfc3e4680d8c35dff142
packages/vega-parser/src/parsers/guides/legend-gradient-labels.js
packages/vega-parser/src/parsers/guides/legend-gradient-labels.js
import {Perc, Label} from './constants'; import guideMark from './guide-mark'; import {TextMark} from '../marks/marktypes'; import {LegendLabelRole} from '../marks/roles'; var alignExpr = 'datum.' + Perc + '<=0?"left"' + ':datum.' + Perc + '>=1?"right":"center"'; export default function(spec, config, userEncode, da...
import {Perc, Label} from './constants'; import guideMark from './guide-mark'; import {TextMark} from '../marks/marktypes'; import {LegendLabelRole} from '../marks/roles'; var alignExpr = 'datum.' + Perc + '<=0?"left"' + ':datum.' + Perc + '>=1?"right":"center"'; export default function(spec, config, userEncode, da...
Update gradient labels to use signal directive.
Update gradient labels to use signal directive.
JavaScript
bsd-3-clause
vega/vega,lgrammel/vega,vega/vega,vega/vega,vega/vega
4ef11b0788bcbd870df8da6283878f9e50f867cd
app/transforms/appearance-status.js
app/transforms/appearance-status.js
import DS from 'ember-data'; export default DS.Transform.extend({ deserialize: function(serialized) { var map = { 0: 'New', 7: 'Built', 10: 'Started', 20: 'Finished', 30: 'Verified', }; return map[serialized]; }, serialize: function(deserialized) { var map = { ...
import DS from 'ember-data'; export default DS.Transform.extend({ deserialize: function(serialized) { var map = { 0: 'New', 7: 'Built', 10: 'Started', 20: 'Finished', 25: 'Variance', 30: 'Verified', }; return map[serialized]; }, serialize: function(deserialized) {...
Add new `variance` state to appearance
Add new `variance` state to appearance
JavaScript
bsd-2-clause
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
e79ddb8d651e07fe0fc95ce297e60afc2546ec37
src/helpers.js
src/helpers.js
import { matchPath } from 'react-router' export const getRouteMatch = (routes, pathname) => !routes ? null : routes .map(r => matchPath(pathname, r.path, { exact: true })) .filter(r => r !== null)[0] || nulle
import { matchPath } from 'react-router' export const getRouteMatch = (routes, pathname) => !routes ? null : routes .map(r => matchPath(pathname, r.path, { exact: true })) .filter(r => r !== null)[0] || null
Fix type error in getRouteMatch
Fix type error in getRouteMatch
JavaScript
mit
MaxSvargal/react-router-redux-bind
00c8e59af411093c58f0673e1959a2edc59e2d24
src/scripts/app/cms/grammarActivities/edit.controller.js
src/scripts/app/cms/grammarActivities/edit.controller.js
'use strict'; module.exports = /*@ngInject*/ function GrammarActivitiesEditCmsCtrl ( $scope, GrammarActivity, $state, _ ) { $scope.grammarActivity = {}; $scope.grammarActivity.concepts = []; GrammarActivity.getOneByIdFromFB($state.params.id).then(function (ga) { $scope.grammarActivity = ga; $scope.gr...
'use strict'; module.exports = /*@ngInject*/ function GrammarActivitiesEditCmsCtrl ( $scope, GrammarActivity, $state, _, ConceptsFBService ) { $scope.grammarActivity = {}; $scope.grammarActivity.concepts = []; GrammarActivity.getOneByIdFromFB($state.params.id).then(function (ga) { $scope.grammarActivity ...
Load level 2,1,0 concepts into question model for qs
Load level 2,1,0 concepts into question model for qs
JavaScript
agpl-3.0
ddmck/Quill-Grammar,ddmck/Quill-Grammar,empirical-org/Quill-Grammar,ddmck/Quill-Grammar,empirical-org/Quill-Grammar,empirical-org/Quill-Grammar
ed208bea3775153854a3f614b9a31b73670a8d83
src/app/settings/settings.component.spec.js
src/app/settings/settings.component.spec.js
describe('Settings component', () => { let ctrl; let speechService; let stopwatchService; let timerService; beforeEach(angular.mock.module('app')); beforeEach(inject(($rootScope, $componentController, _speechService_, _stopwatchService_, _timerService_) => { let scope = $rootScope.$new(); ...
Add settings component unit tests
Add settings component unit tests
JavaScript
mit
JavierPDev/AudioTime,JavierPDev/AudioTime
16df59f1a7c8df7624fb084891ee2d00587ad489
test/javascripts/unit/double_click_protection_test.js
test/javascripts/unit/double_click_protection_test.js
module("Double click protection", { setup: function(){ this.$form = $('<form action="/go" method="POST"><input type="submit" name="input_name" value="Save" /></form>'); $('#qunit-fixture').append(this.$form); } }); test('clicking submit input disables the button', function() { GOVUK.doubleClickProtectio...
module("Double click protection", { setup: function(){ this.$form = $('<form action="/go" method="POST"><input type="submit" name="input_name" value="Save" /></form>'); $('#qunit-fixture').append(this.$form); } }); test('clicking submit input disables the button', function() { GOVUK.doubleClickProtectio...
Fix JS test causing navigation away from tests
Fix JS test causing navigation away from tests
JavaScript
mit
YOTOV-LIMITED/whitehall,alphagov/whitehall,hotvulcan/whitehall,alphagov/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,robinwhittleton/whitehall,ggoral/whitehall,robinwhittleton/whitehall,askl56/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,askl56/whitehall,ggoral/whitehall,askl56/whitehall,alphagov/whi...
02b36658cf08a87717860f7b7de3f08aad92d364
resources/assets/components/CampaignOverview/index.js
resources/assets/components/CampaignOverview/index.js
import React from 'react'; import { map } from 'lodash'; import CampaignTable from '../CampaignTable'; class CampaignOverview extends React.Component { render() { const causeData = this.props; const causeTables = map(causeData, (data, cause) => ( <CampaignTable key={cause} cause={caus...
import React from 'react'; import { map } from 'lodash'; import CampaignTable from '../CampaignTable'; class CampaignOverview extends React.Component { render() { const causeData = this.props; const causeTables = map(causeData, (data, cause) => ( <CampaignTable key={cause} cause={caus...
Fix missing heading for cause-less campaigns.
Fix missing heading for cause-less campaigns.
JavaScript
mit
DoSomething/rogue,DoSomething/rogue,DoSomething/rogue
136dd3ead528a087571bba104ffde9fe02de44ca
minimal-carousel.js
minimal-carousel.js
function Carousel(settings){ 'use strict'; this.carousel = document.querySelector(settings.carousel || '.carousel'); this.slides = this.carousel.querySelectorAll('ul li'); this.delay = settings.delay || 2.5; this.autoplay = settings.autoplay === undefined ? true : settings.autoplay; this.slides_total = thi...
function Carousel(settings){ 'use strict'; settings = settings || {}; this.carousel = document.querySelector(settings.carousel || '.carousel'); this.slides = this.carousel.querySelectorAll('ul li'); this.delay = settings.delay || 2.5; this.autoplay = settings.autoplay === undefined ? true : settings.autopla...
Allow no setting parameter at all.
Allow no setting parameter at all.
JavaScript
mit
jhderojasUVa/minimal-carousel,wecodeio/minimal-carousel,wecodeio/minimal-carousel,jhderojasUVa/minimal-carousel
844342dd5e458e3ac677e5491384526059b69577
models/userModel.js
models/userModel.js
var bcrypt = require('bcrypt'); var mongoose = require('mongoose'); const saltRounds = 10; var userSchema = new mongoose.Schema({ signupDate: { type: Date, default: Date.now }, username: { type: String, required: true }, password: { type: String, required: true }, email: { type: String, required: true }, nam...
var bcrypt = require('bcrypt'); var mongoose = require('mongoose'); const saltRounds = 10; var userSchema = new mongoose.Schema({ signupDate: { type: Date, default: Date.now }, username: { type: String, required: true, unique: true }, email: { type: String, required: true, unique: true }, password: { type: Str...
Add unique index to username and email for Users
Add unique index to username and email for Users
JavaScript
mit
heymanhn/journey-backend
4031aab3317a8932334b8c036517b2330701f06b
addon/-private/closure-action.js
addon/-private/closure-action.js
import Ember from 'ember'; const ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-action'); export default ClosureActionModule.ACTION;
import Ember from 'ember'; let ClosureActionModule; if ('ember-htmlbars/keywords/closure-action' in Ember.__loader.registry) { ClosureActionModule = Ember.__loader.require('ember-htmlbars/keywords/closure-action'); } else { ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-acti...
Fix loading ACTION symbol on canary
Fix loading ACTION symbol on canary
JavaScript
mit
DockYard/ember-functional-helpers,DockYard/ember-functional-helpers
d6e540590d07e6160f3544dafcb951e52a64eb5a
module/htdocs/js/bootstrap-tab-bookmark.js
module/htdocs/js/bootstrap-tab-bookmark.js
function bootstrap_tab_bookmark (selector) { if (selector == undefined) { selector = ""; } var bookmark_switch = function () { url = document.location.href.split('#'); if(url[1] != undefined) { $(selector + '[href=#'+url[1]+']').tab('show'); } } /* Autom...
function bootstrap_tab_bookmark (selector) { if (selector == undefined) { selector = ""; } var bookmark_switch = function () { url = document.location.href.split('#'); if(url[1] != undefined) { $(selector + '[href="#'+url[1]+'"]').tab('show'); } } /* Aut...
Fix Js error on tab refresh in element view
Fix Js error on tab refresh in element view
JavaScript
agpl-3.0
mohierf/mod-webui,mohierf/mod-webui,rednach/mod-webui,shinken-monitoring/mod-webui,shinken-monitoring/mod-webui,shinken-monitoring/mod-webui,mohierf/mod-webui,rednach/mod-webui,rednach/mod-webui
95acc8ea8150029259389d360be4aeeba143e045
blueprints/ember-cli-paint/index.js
blueprints/ember-cli-paint/index.js
'use strict'; module.exports = { normalizeEntityName: function() {}, afterInstall: function() { return this.addPackagesToProject([ { name: 'broccoli-sass', target: '0.6.6' } ]).then(function() { return this.addBowerPackagesToProject([ { name: 'paint', target: '0.7.22' }, { name...
'use strict'; module.exports = { normalizeEntityName: function() {}, afterInstall: function() { return this.addPackagesToProject([ { name: 'broccoli-sass', target: '0.6.6' } ]).then(function() { return this.addBowerPackagesToProject([ { name: 'paint', target: '0.9.0' }, { name:...
Update blueprints to include latest package versions
Update blueprints to include latest package versions
JavaScript
mit
alphasights/ember-cli-paint,alphasights/ember-cli-paint
4ba0fc51dfe71d37fd3ac7937f2d6438f3ce70a9
.eslintrc.js
.eslintrc.js
module.exports = { "env": { "browser": true, "commonjs": true, "es6": true }, "extends": "eslint:recommended", "parserOptions": { "ecmaFeatures": { "experimentalObjectRestSpread": true, "jsx": true }, "sourceType": "module" }, ...
module.exports = { "env": { "browser": true, "commonjs": true, "es6": true }, "extends": "eslint:recommended", "parserOptions": { "ecmaFeatures": { "experimentalObjectRestSpread": true, }, "sourceType": "module" }, "plugins": [ ...
Add support for JSX *within* .vue files
Add support for JSX *within* .vue files
JavaScript
mit
kepler-12/code-standards
a27f0313356287605e808957f20e6dd47b51a92e
client/components/RecipeListEntry.js
client/components/RecipeListEntry.js
import React from 'react'; import { Link } from 'react-router'; import moment from 'moment'; moment().format(); const RecipeListEntry = (props) => { const createdTime = moment(props.recipe.created_at).fromNow(); return ( <div className="recipe-list-entry"> <Link to={`/recipe/${props.recipe.recipe_id || ...
import React from 'react'; import { Link } from 'react-router'; import moment from 'moment'; moment().format(); const RecipeListEntry = (props) => { const createdTime = moment(props.recipe.created_at).fromNow(); return ( <div className="recipe-list-entry"> <Link to={`/recipe/${props.recipe.recipe_id || ...
Change class name for recipe entry title
Change class name for recipe entry title
JavaScript
mit
rompingstalactite/rompingstalactite,forkful/forkful,rompingstalactite/rompingstalactite,forkful/forkful,rompingstalactite/rompingstalactite,forkful/forkful
8e275a22aa419297eee0acc5ef65fc0cce4aa3cb
clients/web/test/spec/swaggerSpec.js
clients/web/test/spec/swaggerSpec.js
function jasmineTests() { var jasmineEnv = jasmine.getEnv(); var consoleReporter = new jasmine.ConsoleReporter(); window.jasmine_phantom_reporter = consoleReporter; jasmineEnv.addReporter(consoleReporter); function waitAndExecute() { if (!jasmineEnv.currentRunner().suites_.length) { ...
function jasmineTests() { var jasmineEnv = jasmine.getEnv(); var consoleReporter = new jasmine.ConsoleReporter(); window.jasmine_phantom_reporter = consoleReporter; jasmineEnv.addReporter(consoleReporter); function waitAndExecute() { if (!jasmineEnv.currentRunner().suites_.length) { ...
Update web client swagger test for swagger-ui 2.1.4
Update web client swagger test for swagger-ui 2.1.4
JavaScript
apache-2.0
adsorensen/girder,kotfic/girder,data-exp-lab/girder,jbeezley/girder,Kitware/girder,jbeezley/girder,adsorensen/girder,RafaelPalomar/girder,kotfic/girder,girder/girder,sutartmelson/girder,Xarthisius/girder,sutartmelson/girder,sutartmelson/girder,manthey/girder,data-exp-lab/girder,RafaelPalomar/girder,data-exp-lab/girder,...
899d3164f322abce2c287a4a315f82d7ad869cc0
test/num-test.js
test/num-test.js
const chai = require('chai'); const assert = chai.assert; // const stub = require('./support/stub') const Num = require("../lib/num") describe("Num", function(){ context("with calculated attributes", function(){ it("instantiates", function(){ assert.isObject(new Num(10)); }) it('has a decimal a...
const chai = require('chai'); const assert = chai.assert; // const stub = require('./support/stub') const Num = require("../lib/num") describe("Num", function(){ context("with calculated attributes", function(){ it("instantiates", function(){ assert.isObject(new Num(10)); }) it('has a decimal a...
Add test for Num method translating a decimal to binary
Add test for Num method translating a decimal to binary
JavaScript
mit
kjs222/gametime,kjs222/gametime
fcb643f589b4168405bfe6d6b85ee9ad0aa29682
tests/cleanup.js
tests/cleanup.js
/** * @author EmmanuelOlaojo * @since 8/13/16 */ module.exports = function(){ return Promise.all([ utils.dropCollection(TEST_COLLECTION_A) , utils.dropCollection(TEST_COLLECTION_B) ]); };
/** * @author EmmanuelOlaojo * @since 8/13/16 */ module.exports = function(){ return Promise.all([ utils.dropCollection(TEST_COLLECTION_A) , utils.dropCollection(TEST_COLLECTION_B) , utils.dropCollection("fs.files") , utils.dropCollection("fs.chunks") ]); };
Drop files collection after tests
Drop files collection after tests
JavaScript
mit
e-oj/Fawn
5143eb144f27717d152cefd32a3fc1f703d20a72
code/schritte/5-redux/src/Counter.js
code/schritte/5-redux/src/Counter.js
import React from 'react'; import {connect} from 'react-redux'; import {filterGreetings} from './selectors'; const Counter = ({greetings, filteredGreetings}) => ( <div className="Counter">Showing {filteredGreetings.length} of {greetings.length} Greetings</div> ); export default connect( state => ({ g...
import React from 'react'; import {connect} from 'react-redux'; import {filterGreetings} from './selectors'; const Counter = ({greetingCount, filteredGreetingsCount}) => ( <div className="Counter">Showing {filteredGreetingsCount} of {greetingCount} Greetings</div> ); export default connect( state => ({ ...
Determine counter numbers in connect
Determine counter numbers in connect
JavaScript
mit
st-he/react-workshop,st-he/react-workshop,DJCordhose/react-workshop,st-he/react-workshop,DJCordhose/react-workshop,DJCordhose/react-workshop,st-he/react-workshop,DJCordhose/react-workshop
6801efd2f61d99e55042e06984c17ccca921fea1
web/static/js/app.js
web/static/js/app.js
import "phoenix_html" import $ from "jquery"; import * as BS from "./battle_snake" const BattleSnake = Object.assign(window.BattleSnake, BS); window.BattleSnake = BattleSnake; if ($("#board-viewer")) { const gameId = window.BattleSnake.gameId; window.BattleSnake.BoardViewer.init(gameId); }
import "phoenix_html" import $ from "jquery"; import * as BS from "./battle_snake" const BattleSnake = Object.assign(window.BattleSnake, BS); window.BattleSnake = BattleSnake; if ($("#board-viewer").length) { const gameId = window.BattleSnake.gameId; window.BattleSnake.BoardViewer.init(gameId); }
Fix issue with js conditional
Fix issue with js conditional Was not properly testing if there was any results, causing the js to be evaluated on every page.
JavaScript
agpl-3.0
Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake
eb7727d2922f4eda310318b119fb435bfcfdc00c
common/modules/template100Handler.js
common/modules/template100Handler.js
module.exports = { inputValidator: function (fileInfo, callback) { }, mergeDataWithTemplate: function(data, template, callback) { } }
module.exports = { inputValidator: function (dataInput, callback) { if (dataInput) if (dataInput.header && dataInput.time && dataInput.holding && dataInput.subtitle) return callback(null) return callback(new Error('Input Validation for Dynamic Template Handler 100 Failed')) }, mergeDataWith...
Implement Input Validator and Merge Data for Template100 Handler
Implement Input Validator and Merge Data for Template100 Handler
JavaScript
mit
Flieral/Announcer-Service-LB,Flieral/Announcer-Service-LB
ccc000a58a8c25fdbc5566e7f4bb61b62269078c
lib/control/util/index.js
lib/control/util/index.js
'use strict'; const STATUS_CODES = require('./status-codes'); const Handlers = { allowed(methods) { return (req, res) => { res.set('Allow', methods); res.status(STATUS_CODES.METHOD_NOT_ALLOWED); res.end(); } } }; const Err = (err, req, res, next) => { res.status(500); res.json({error...
'use strict'; const STATUS_CODES = require('./status-codes'); const Handlers = { allowed(methods) { return (req, res) => { res.set('Allow', methods); res.status(STATUS_CODES.METHOD_NOT_ALLOWED); res.end(); } } }; const Err = (err, req, res, next) => { const error = { error: { ...
Add additional formatting to error handling.
Add additional formatting to error handling.
JavaScript
mit
rapid7/tokend,rapid7/tokend,rapid7/tokend
ee759f8b085a754b07f89e31f44a169cb5a23a03
src/framework/common/source-map-support/browser.js
src/framework/common/source-map-support/browser.js
// TODO remove this split between browser & node once the package does it on its own. import 'source-map-support/browser-source-map-support'; sourceMapSupport.install(); // eslint-disable-line no-undef
// TODO remove this split between browser & node once the package does it on its own. // TODO Current version is broken https://github.com/evanw/node-source-map-support/issues/173 // import 'source-map-support/browser-source-map-support'; // // sourceMapSupport.install(); // eslint-disable-line no-undef
Disable source-map-support until it is compatible with webpack again
fix: Disable source-map-support until it is compatible with webpack again
JavaScript
mit
foobarhq/reworkjs,reworkjs/reworkjs,reworkjs/reworkjs,reworkjs/reworkjs,foobarhq/reworkjs
2deaf95cde707b5b85616f9f3d0167f7af47eed4
src/js/components/single-response-format-editor.js
src/js/components/single-response-format-editor.js
import React, { PropTypes } from 'react' import CodeListSelector from './code-list-selector' import VisHintPicker from './vis-hint-picker' import { updateSingle, newCodeListSingle } from '../actions/response-format' import { connect } from 'react-redux' function SingleResponseFormatEditor( { id, qrId, format: { ...
import React, { PropTypes } from 'react' import CodeListSelector from './code-list-selector' import VisHintPicker from './vis-hint-picker' import { updateSingle, newCodeListSingle } from '../actions/response-format' import { connect } from 'react-redux' function SingleResponseFormatEditor( { id, qrId, format: { ...
Add title for code list selection within single response
Add title for code list selection within single response
JavaScript
mit
InseeFr/Pogues,InseeFr/Pogues,Zenika/Pogues,InseeFr/Pogues,Zenika/Pogues,Zenika/Pogues
f4b155043a40d690c95323821147b20ff8e007a1
src/moonstone-samples/lib/ScrollerHorizontalSample.js
src/moonstone-samples/lib/ScrollerHorizontalSample.js
var kind = require('enyo/kind'), Img = require('enyo/Image'), Repeater = require('enyo/Repeater'); var Divider = require('moonstone/Divider'), Item = require('moonstone/Item'), Scroller = require('moonstone/Scroller'); module.exports = kind({ name: 'moon.sample.ScrollerHorizontalSample', classes: 'moon enyo-u...
var kind = require('enyo/kind'), Img = require('enyo/Image'), Repeater = require('enyo/Repeater'); var Divider = require('moonstone/Divider'), Item = require('moonstone/Item'), Scroller = require('moonstone/Scroller'); module.exports = kind({ name: 'moon.sample.ScrollerHorizontalSample', classes: 'moon enyo-u...
Fix path to library image asset.
ENYO-1948: Fix path to library image asset. Enyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>
JavaScript
apache-2.0
enyojs/enyo-strawman
789de4ae409cd528c220fce54fab7adc8dae93c2
example/redux/src/modules/forms/index.js
example/redux/src/modules/forms/index.js
/* @flow */ import { Map, fromJS } from 'immutable'; const REGISTER_FORM = 'redux-example/forms/REGISTER_FORM'; const UNREGISTER_FORM = 'redux-example/forms/UNREGISTER_FORM'; const UPDATE_FORM = 'redux-example/forms/UPDATE_FORM'; const initialState = Map({}); /* ******************************************************...
/* @flow */ import { Map, fromJS } from 'immutable'; const REGISTER_FORM = 'redux-example/forms/REGISTER_FORM'; const UNREGISTER_FORM = 'redux-example/forms/UNREGISTER_FORM'; const UPDATE_FORM = 'redux-example/forms/UPDATE_FORM'; const initialState = Map({}); /* ******************************************************...
Add unregister form action creator
Add unregister form action creator
JavaScript
mit
iansinnott/react-static-webpack-plugin,iansinnott/react-static-webpack-plugin
ada2b9c9152edc91f6199c43b6d8838ba8026f98
server/models/locations.js
server/models/locations.js
const mongoose = require('mongoose') const { Schema } = mongoose const locationSchema = new Schema({ address: { type: String, unique: true, required: true }, rating: Number, reviews: [{rating: Number, content: String, userId: String}], photos: [], description: String, loc: { type: [Number], index: { type: ...
const mongoose = require('mongoose') const { Schema } = mongoose const locationSchema = new Schema({ address: { type: String, unique: true, required: true }, rating: { type: Number, default: 0 }, reviews: [{rating: Number, content: String, userId: String}], photos: [], description: String, loc: { type: [Nu...
Adjust location model to have default rating of 0
Adjust location model to have default rating of 0
JavaScript
mit
JabroniZambonis/pLot
528675ccbd0ea2cb182152c2efdd284c81c2b5ce
src/scripts/feature/dateTime/dateTimeController.js
src/scripts/feature/dateTime/dateTimeController.js
(function() { 'use strict'; angular.module('app.feature.dateTime').controller('DateTimeController', [ '$scope', '$interval', function($scope, $interval) { $interval(function() { $scope.dateTime = Date.now(); }, 1000); } ]); })();
(function() { 'use strict'; angular.module('app.feature.dateTime').controller('DateTimeController', [ '$scope', '$interval', function($scope, $interval) { // Set the current date and time on startup $scope.dateTime = Date.now(); // And afterwards every second in an endless loop $int...
Set current date and time before starting the interval service
Set current date and time before starting the interval service - The interval service does not start immediately, instead it waits the configured amount of time before it runs the code that is declared inside the callback function.
JavaScript
mit
molehillrocker/mm-website,molehillrocker/mm-website
eb4366ca475f12871ad6be067433aa8011704224
lib/libra2/app/assets/javascripts/remove_download_link.js
lib/libra2/app/assets/javascripts/remove_download_link.js
(function() { "use strict"; function initPage() { // The thumbnail images on the show page are links, but the links aren't correct, so remove the links. // The html looks something like the following, but it varies depending on the type of media it is: // <a target="_new" title="Download the full-sized PDF" hr...
(function() { "use strict"; function initPage() { // The thumbnail images on the show page are links, but the links aren't correct, so remove the links. // The html looks something like the following, but it varies depending on the type of media it is: // <a target="_new" title="Download the full-sized PDF" hr...
Remove the word "download" from the thumbnail alt text.
Remove the word "download" from the thumbnail alt text.
JavaScript
apache-2.0
uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2
093005bfd926fdae42706e0554ad1a985196d9d7
lib/template/fs-loader.js
lib/template/fs-loader.js
var _ = require('lodash'); var fs = require('fs'); var path = require('path'); var nunjucks = require('nunjucks'); /* Nunjucks loader similar to FileSystemLoader, but avoid infinite looping */ var Loader = nunjucks.Loader.extend({ init: function(searchPaths) { this.searchPaths = searchPaths.map(path.n...
var _ = require('lodash'); var fs = require('fs'); var path = require('path'); var nunjucks = require('nunjucks'); /* Nunjucks loader similar to FileSystemLoader, but avoid infinite looping */ function isRelative(filename) { return (filename.indexOf('./') === 0 || filename.indexOf('../') === 0); } var Loader...
Fix FSLoader for relative paths
Fix FSLoader for relative paths
JavaScript
apache-2.0
tshoper/gitbook,strawluffy/gitbook,gencer/gitbook,tshoper/gitbook,GitbookIO/gitbook,ryanswanson/gitbook,gencer/gitbook
28ea49920beb7ad6ed4e3c3a9552fa6dabf931e7
client/app/js/crypto/main.js
client/app/js/crypto/main.js
angular.module('GLBrowserCrypto', []) .factory('glbcProofOfWork', ['$q', function($q) { // proofOfWork return the answer to the proof of work // { [challenge string] -> [ answer index] } var str2Uint8Array = function(str) { var result = new Uint8Array(str.length); for (var i = 0; i < str.length; i++) { ...
angular.module('GLBrowserCrypto', []) .factory('glbcProofOfWork', ['$q', function($q) { // proofOfWork return the answer to the proof of work // { [challenge string] -> [ answer index] } var str2Uint8Array = function(str) { var result = new Uint8Array(str.length); for (var i = 0; i < str.length; i++) { ...
Remove function definition from proof of work recursion
Remove function definition from proof of work recursion
JavaScript
agpl-3.0
vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks
bb76872376d5b5c74b83035a054dbd479ad861a7
public/app/config.js
public/app/config.js
angular.module('config', []) .constant('API_URL', 'http://cloakmd.azurewebsites.net/api');
angular.module('config', []) .constant('API_URL', 'https://cloakmd.azurewebsites.net/api');
Set API endpoint to https
Set API endpoint to https
JavaScript
mit
ymukavozchyk/cloakmd,ymukavozchyk/cloakmd
376e79a26e4e3c3886168d6e7bf3f2b2653a0162
app/assets/javascripts/form.js
app/assets/javascripts/form.js
$(document).ready(function() { $('.search').on('click', function() { $.post( '/grant_gateway/search', $('#search-form').serialize(), function(data) { for (var i = 0; i < data.length; i++) { $('.results').append("<a href='" + data[i].link + "' class='media-links'><div class='media'><div class='media...
$(document).ready(function() { $('.search').on('click', function() { $.post( '/grant_gateway/search', $('#search-form').serialize(), function(data) { $('.results').empty() for (var i = 0; i < data.length; i++) { $('.results').append("<a href='" + data[i].link + "' class='media-links'><div cla...
Clear results before loading new results
Clear results before loading new results
JavaScript
mit
tonysuaus/projectz,tonysuaus/projectz
b55a6f35084d0291d004e64a2b6b2ae68f08f4ad
snippet.js
snippet.js
// MIT license, see: https://github.com/tjcrowder/simple-snippets-console/blob/master/LICENSE var snippet = { version: "1.0", // Writes out the given text in a monospaced paragraph tag, escaping // & and < so they aren't rendered as HTML. log: function(msg) { if (Object.prototype.toString.call(...
// MIT license, see: https://github.com/tjcrowder/simple-snippets-console/blob/master/LICENSE var snippet = { version: "1.1", // Writes out the given text in a monospaced paragraph tag, escaping // & and < so they aren't rendered as HTML. log: function(msg, tag) { var elm = document.createEleme...
Add the ability to specify a tag
Add the ability to specify a tag
JavaScript
mit
tjcrowder/simple-snippets-console,tjcrowder/simple-snippets-console
3ad0835f36c87cdbb6e66528177e1a1413d0c113
test/integration/test/integration-mocha-setup.js
test/integration/test/integration-mocha-setup.js
const chai = require('chai') const chaiAsPromised = require('chai-as-promised') const td = require('testdouble') const tdChai = require('testdouble-chai') chai.use(chaiAsPromised) chai.use(tdChai(td)) chai.config.includeStack = true chai.config.showDiff = false global.expect = chai.expect // if any unhandled rejecti...
const chai = require('chai') const chaiAsPromised = require('chai-as-promised') const td = require('testdouble') const tdChai = require('testdouble-chai') chai.use(chaiAsPromised) chai.use(tdChai(td)) chai.config.includeStack = true chai.config.showDiff = false global.expect = chai.expect // if any unhandled rejecti...
Fix build error on node v4
Fix build error on node v4
JavaScript
mit
mwolson/jazzdom
76c08bcda29127a7e06c41c979854930217d36af
config/webpack-dev-server.config.js
config/webpack-dev-server.config.js
const path = require('path'); module.exports = { entry: [ path.resolve(process.cwd(), 'src/theme/assets/main-critical.js'), path.resolve(process.cwd(), 'src/theme/assets/main.js') ], output: { publicPath: 'http://localhost:8080/_assets/', filename: '[name].js', chunk...
const path = require('path'); module.exports = { entry: [ path.resolve(process.cwd(), 'src/theme/assets/main-critical.js'), path.resolve(process.cwd(), 'src/theme/assets/main.js') ], output: { publicPath: 'http://localhost:8080/_assets/', filename: '[name].js', chunk...
Add cors headers to dev server responses
Add cors headers to dev server responses
JavaScript
mit
jsor-labs/website,jsor-labs/website
0c41049a189c2a69b6d9ecfa3f1e00470623efd4
packages/lingui-conf/src/index.js
packages/lingui-conf/src/index.js
const path = require('path') const pkgConf = require('pkg-conf') const { validate } = require('jest-validate') function replaceRootDir (conf, rootDir) { const replace = s => s.replace('<rootDir>', rootDir) ;['srcPathDirs', 'srcPathIgnorePatterns', 'localeDir'] .forEach(key => { const value = conf[key] ...
const path = require('path') const pkgConf = require('pkg-conf') const { validate } = require('jest-validate') function replaceRootDir (conf, rootDir) { const replace = s => s.replace('<rootDir>', rootDir) ;['srcPathDirs', 'srcPathIgnorePatterns', 'localeDir'] .forEach(key => { const value = conf[key] ...
Change the default value for format
feat: Change the default value for format
JavaScript
mit
lingui/js-lingui,lingui/js-lingui
16cb0348dab24ef26c98b4992aa2d04f73f4d525
components/ClickableImage.js
components/ClickableImage.js
import React, { Component } from 'react'; import { TouchableOpacity, Image, View } from 'react-native'; import styles from './styles/ClickableImageStyle'; import PropTypes from 'prop-types'; import { StackNagivator } from 'react-navigation'; import FadeInView from '../animations/FadeInView'; export default class Click...
import React, { Component } from 'react'; import { TouchableOpacity, Image, View } from 'react-native'; // import styles from './styles/ClickableImageStyle'; import PropTypes from 'prop-types'; import { StackNagivator } from 'react-navigation'; import FadeInView from '../animations/FadeInView'; export default class Cl...
Change clickableimage to allow it to take styles when a new component is called elsewhere
Change clickableimage to allow it to take styles when a new component is called elsewhere
JavaScript
mit
fridl8/cold-bacon-client,fridl8/cold-bacon-client,fridl8/cold-bacon-client
17b8376c523ea0e537abb91760fd25d866a3abfd
app/scripts/login.babel.js
app/scripts/login.babel.js
/** * * Meet-Up Event Planner * Copyright 2015 Justin Varghese John All rights reserved. * * 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...
/** * * Meet-Up Event Planner * Copyright 2015 Justin Varghese John All rights reserved. * * 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...
Add redirect after successful login
Add redirect after successful login
JavaScript
apache-2.0
johnjv/meet-up-event-planner,johnjv/meet-up-event-planner
fb5275af0191c5ec9532f21c19f400b9798fba2f
angular-stomp.js
angular-stomp.js
/* * Copyright: 2012, V. Glenn Tarcea * MIT License Applies */ angular.module('AngularStomp', []). factory('ngstomp', function($rootScope) { Stomp.WebSocketClass = SockJS; var stompClient = Stomp.client('http://localhost:15674/stomp'); return { subscribe: function(queue, cal...
/* * Copyright: 2012, V. Glenn Tarcea * MIT License Applies */ angular.module('AngularStomp', []). factory('ngstomp', function($rootScope) { Stomp.WebSocketClass = SockJS; var stompClient = {}; function NGStomp(url) { this.stompClient = Stomp.client(url); } ...
Update to allow the url to be passed into a constructor for the service (the service returns a constructor).
Update to allow the url to be passed into a constructor for the service (the service returns a constructor).
JavaScript
apache-2.0
davinkevin/AngularStompDK
cbc42df4304d209f788fb9edc2688ee538c7470e
assets/js/ads.js
assets/js/ads.js
/** * This file is intended to detect active ad blocker. * * Ad blockers block URLs containing the word "ads" including this file. * If the file does load, `googlesitekit.canAdsRun` is set to true. */ global.googlesitekit = global.googlesitekit || {}; global.googlesitekit.canAdsRun = true; // Ensure that this fl...
/** * This file is intended to detect active ad blocker. * * Ad blockers block URLs containing the word "ads" including this file. * If the file does load, `googlesitekit.canAdsRun` is set to true. */ if ( global.googlesitekit === undefined ) { global.googlesitekit = {}; } global.googlesitekit.canAdsRun = true;...
Tidy up check for Site Kit global.
Tidy up check for Site Kit global.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
aaaaa76705e996cad798ec0d964b78434a87e621
spec/dev/scheduler.spec.js
spec/dev/scheduler.spec.js
// Copyright (c) 2017 The Regents of the University of Michigan. // All Rights Reserved. Licensed according to the terms of the Revised // BSD License. See LICENSE.txt for details. const Scheduler = require("../../lib/scheduler"); const fsWatcher = require("../../lib/fs-watcher"); const MockInspector = require("../moc...
// Copyright (c) 2017 The Regents of the University of Michigan. // All Rights Reserved. Licensed according to the terms of the Revised // BSD License. See LICENSE.txt for details. const Scheduler = require("../../lib/scheduler"); const fsWatcher = require("../../lib/fs-watcher"); const MockInspector = require("../moc...
Create untested (so far) task spy
:art: Create untested (so far) task spy
JavaScript
bsd-3-clause
daaang/awful-mess
abfcaf9e91eb8ca9976d6c7055bbca4086a9c5b2
Gruntfile.js
Gruntfile.js
// Configuration module.exports = function(grunt) { // Initialize config grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), }); // Load required tasks from submodules grunt.loadTasks('grunt'); // Default grunt.registerTask('default', [ 'connect', 'localtun...
// Configuration module.exports = function(grunt) { // Initialize config grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), }); // Load required tasks from submodules grunt.loadTasks('grunt'); // Default task grunt.registerTask('default', ['dev']); // Development ...
Make it easier to change the default Grunt task
Make it easier to change the default Grunt task
JavaScript
mit
yellowled/yl-bp,yellowled/yl-bp
e5f5593a922593bf8333c4704e35546c4a57b1c2
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ movePackageTo: process.env["JOB_NAME"] ? "\\\\telerik.com\\Resources\\BlackDragon\\Builds\\appbuilder-sublime-package" : "build", jobName: process.env["JOB_NAME"] || "local", buildNumber: process.env["BUILD_NUMBER"] || "non-ci", d...
module.exports = function(grunt) { grunt.initConfig({ copyPackageTo: "\\\\telerik.com\\Resources\\BlackDragon\\Builds\\appbuilder-sublime-package", movePackageTo: process.env["JOB_NAME"] ? "\\\\telerik.com\\Resources\\BlackDragon\\Builds\\appbuilder-sublime-package" : "build", jobName: process....
Copy built package to QA Folder
Copy built package to QA Folder
JavaScript
apache-2.0
Icenium/appbuilder-sublime-package,dimitardanailov/appbuilder-sublime-package,dimitardanailov/appbuilder-sublime-package,Icenium/appbuilder-sublime-package
3c999cf0f30d4638f59e57be1be8c5bac38be989
api/getPlayer.js
api/getPlayer.js
//http://stats.nba.com/media/players/230x185/201939.png module.exports = (dispatch) => { dispatch({type: 'RECEIVE_PLAYER_INFO', payload: { name: "Klay Thompson", team: "Golden State Warriors", ppg: 21.9, apg: 3.5, rpg: 4.2, image: "http://stats.nba.com/media/players/230x185/201939.png" }}) ...
//http://stats.nba.com/media/players/230x185/201939.png module.exports = (dispatch) => { dispatch({type: 'RECEIVE_PLAYER_INFO', payload: { name: "Klay Thompson", team: "Golden State Warriors", ppg: 21.9, apg: 3.5, rpg: 4.2, image: "http://stats.nba.com/media/players/230x185/202691.png" }}) ...
Change sample url so image is actually Klay Thompson lol
Change sample url so image is actually Klay Thompson lol
JavaScript
mit
michael-lowe-nz/NBA-battles,michael-lowe-nz/NBA-battles
71ef5ba237e6fa75eca9b64877faba452fbcd973
Gruntfile.js
Gruntfile.js
/* * grunt-check-pages * https://github.com/DavidAnson/grunt-check-pages * * Copyright (c) 2014 David Anson * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { // Project configuration grunt.initConfig({ // Linting jshint: { all: [ 'Gruntfile.js', ...
/* * grunt-check-pages * https://github.com/DavidAnson/grunt-check-pages * * Copyright (c) 2014 David Anson * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { // Project configuration grunt.initConfig({ // Linting jshint: { all: [ 'Gruntfile.js', ...
Remove unnecessary call to loadTasks.
Remove unnecessary call to loadTasks.
JavaScript
mit
DavidAnson/grunt-check-pages,DavidAnson/grunt-check-pages,DavidAnson/check-pages,Flimm/check-pages,Flimm/check-pages,DavidAnson/check-pages
bcc29ed1011de5f00ea7728f7f2080c061c6fa1c
frontend/src/containers/new-project/new-project.js
frontend/src/containers/new-project/new-project.js
const React = require('react'); const ReactRedux = require('react-redux'); const ReduxForm = require('redux-form'); const selectors = require('@state/selectors'); const selectors = require('@state/selectors'); const PropTypes = require('@root/prop-types'); const CreateProject = require('@components/new-project'); con...
const React = require('react'); const ReactRedux = require('react-redux'); const ReduxForm = require('redux-form'); const selectors = require('@state/selectors'); const PropTypes = require('@root/prop-types'); const CreateProject = require('@components/new-project'); const { connect } = ReactRedux; const { reduxF...
Move form creation to containers for new project
Move form creation to containers for new project
JavaScript
mpl-2.0
yldio/joyent-portal,yldio/copilot,geek/joyent-portal,yldio/copilot,geek/joyent-portal,yldio/joyent-portal,yldio/copilot
3d605ebb4a693802b36a65264c588a51cd62dbc4
src/main/webapp/components/BuildSnapshotContainer.js
src/main/webapp/components/BuildSnapshotContainer.js
import * as React from "react"; import {BuildSnapshot} from "./BuildSnapshot"; /** * Container Component for BuildSnapshots. * * @param {*} props input property containing an array of build data to be * rendered through BuildSnapshot. */ export const BuildSnapshotContainer = React.memo((props) => { // Numb...
import * as React from "react"; import {BuildSnapshot} from "./BuildSnapshot"; /** * Container Component for BuildSnapshots. * * @param {*} props input property containing an array of build data to be * rendered through BuildSnapshot. */ export const BuildSnapshotContainer = React.memo((props) => { // Numb...
Change to id from className
Change to id from className
JavaScript
apache-2.0
googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020
27486485c9f5821d76090a75f05d5d27991cdf48
client/request.js
client/request.js
/* istanbul ignore file */ const http = require('http') module.exports = function httpRequest(body) { return new Promise((resolve, reject) => { const request = http.request( { hostname: 'server', port: 8653, path: '/graphql', method: 'POST', headers: { 'Con...
/* istanbul ignore file */ const http = require('http') function parseJSON(data) { try { return JSON.parse(data) } catch (e) { return data } } module.exports = function httpRequest(body) { return new Promise((resolve, reject) => { const request = http.request( { hostname: 'server', ...
Update to handle when response isnt json
Update to handle when response isnt json
JavaScript
apache-2.0
heiskr/sagefy,heiskr/sagefy,heiskr/sagefy,heiskr/sagefy
7b13a9fda936503e476fd9a5aa5ac92146fdb5ed
backbone-once.js
backbone-once.js
(function(Backbone) { _.extend(Backbone.Events, { // Bind an event only once. When executed for the first time, it would // remove itself from the callbacks list. once: function(events, callback, context) { var boundOff = _.bind(this.off, this); var oneOffCallback = function() { boun...
(function(Backbone) { _.extend(Backbone.Events, { // Bind an event only once. When executed for the first time, it would // remove itself from the callbacks list. once: function(events, callback, context) { var boundOff = _.bind(this.off, this); var oneOffCallback = _.once(function() { ...
Fix a multiple execution in event handlers
Fix a multiple execution in event handlers As a bonus, also bind to the context, even if not used, to allow the handler to be unbound using the context too.
JavaScript
mit
gsamokovarov/backbone-once
bda47cb62117f4f29a7e633abaa01e06b21a100e
src/TodoApp/AddTodoForm.js
src/TodoApp/AddTodoForm.js
import React from 'react'; export default class AddTodoForm extends React.Component { static propTypes = { onSubmit: React.PropTypes.func.isRequired } render() { return ( <form onSubmit={this.handleSubmit}> <input type="text" ref="newTodo"></input> <input type="submit" value="Add">...
import React from 'react'; export default class AddTodoForm extends React.Component { static propTypes = { onSubmit: React.PropTypes.func.isRequired } render() { return ( <form onSubmit={this.handleSubmit}> <input type="text" ref="newTodo" style={style}></input> <input type="submit...
Make input wider and spaced out more
Make input wider and spaced out more
JavaScript
cc0-1.0
ksmithbaylor/react-todo-list,ksmithbaylor/react-todo-list
16ad51fa278a7c6751b204d04c18a0e5357beea9
tests/unit/services/json-schema-draft4/required-test.js
tests/unit/services/json-schema-draft4/required-test.js
// https://github.com/json-schema/JSON-Schema-Test-Suite/blob/develop/tests/draft4/required.json var scenerios = [ { "description": "required validation", "schema": { "properties": { "foo": {}, "bar": {} }, "required": ["foo"] ...
// https://github.com/json-schema/JSON-Schema-Test-Suite/blob/develop/tests/draft4/required.json var scenerios = [ { "description": "required validation", "schema": { "properties": { "foo": {}, "bar": {} }, "required": ["foo"] ...
Add actual image rather than link to travis
Add actual image rather than link to travis
JavaScript
mit
southpolesteve/ember-cli-json-schema,southpolesteve/ember-cli-json-schema
188677d8389f7b2082ecdb606273c34d23127a5c
app/packages/fraction-twitter/lib/tweetHot.next.js
app/packages/fraction-twitter/lib/tweetHot.next.js
'use strict'; if (process.env.NODE_ENV === 'production') { var Twit = Npm.require('twit'); var twitter = new Twit({ consumer_key: process.env.TWIT_KEY, consumer_secret: process.env.TWIT_SECRET, access_token: process.env.TWIT_TOKEN, access_token_secret: process.env.TWIT_TOKE...
'use strict'; if (process.env.NODE_ENV === 'production') { var Twit = Npm.require('twit'); var twitter = new Twit({ consumer_key: process.env.TWIT_KEY, consumer_secret: process.env.TWIT_SECRET, access_token: process.env.TWIT_TOKEN, access_token_secret: process.env.TWIT_TOKE...
Remove line break in tweets
Remove line break in tweets
JavaScript
mit
rrevanth/news,rrevanth/news
a3b47d5bb732e920cba5f7bcddf3f15eab60c337
src/api-components/Sort.js
src/api-components/Sort.js
import React from 'react'; import { sort } from 'sajari'; import Base from './Base.js'; import Components from '../constants/QueryComponentConstants.js'; const Sort = props => { const { field, order, ...others } = props; return ( <Base {...others} runDefault='update' componentName={Component...
import React from 'react'; import { sort } from 'sajari'; import Base from './Base.js'; import Components from '../constants/QueryComponentConstants.js'; const Sort = props => { const { field, order, ...others } = props; return ( <Base {...others} runDefault='update' componentName={Component...
Remove order prop from sort
Remove order prop from sort
JavaScript
mit
sajari/sajari-sdk-react,sajari/sajari-sdk-react
4e48b29570a6b1b85492508f7e34656f130dc476
cli/Gulpfile.js
cli/Gulpfile.js
'use strict'; var gulp = require('gulp'); var jshint = require('gulp-jshint'); var mocha = require('gulp-mocha'); gulp.task('default', ['lint', 'mocha']); gulp.task('test', ['default']); gulp.task('mocha', function () { return gulp.src('./tests/**/*.js', { read: false }) .pipe(mocha({ reporter: 'spec' })); })...
'use strict'; var gulp = require('gulp'); var jshint = require('gulp-jshint'); var mocha = require('gulp-mocha'); gulp.task('default', ['lint', 'mocha']); gulp.task('test', ['default']); gulp.task('mocha', function () { return gulp.src('./tests/**/*.js', { read: false }) .pipe(mocha({ reporter: 'spec' })); })...
Fix bug: gulp not failing on lint error
Fix bug: gulp not failing on lint error Without piping the results to the 'fail' reporter inside gulp the build won't fail if an error is introduced.
JavaScript
bsd-3-clause
luizbranco/torus-cli,manifoldco/torus-cli,manifoldco/torus-cli,luizbranco/torus-cli,luizbranco/torus-cli,manifoldco/torus-cli
3a086bf6d4fbba72a9393c4d234d5462b5df68e8
header.js
header.js
// ==UserScript== // @name TPP Touchscreen Input Assist // @namespace chfoo/tppinputassist // @version 1.11.0 // @homepage https://github.com/chfoo/tppinputassist // @updateURL https://raw.githubusercontent.com/chfoo/tppinputassist/master/tppinputassist.user.js // @description Touchscreen coordi...
// ==UserScript== // @name TPP Touchscreen Input Assist // @namespace chfoo/tppinputassist // @version 1.11.0 // @homepage https://github.com/chfoo/tppinputassist // @description Touchscreen coordinate tap overlay for inputting into Twitch chat // @author Christopher Foo // @match http...
Remove @updateURL to not override alternate hosted version.
Remove @updateURL to not override alternate hosted version. It wasn't even being used correctly. Blame the original Userscripts website tutorial.
JavaScript
mit
chfoo/tppinputassist,chfoo/tppinputassist
af375c49371a00e42686c11bc055ed5234a2f596
tests/gtype-signal2.js
tests/gtype-signal2.js
#!/usr/bin/env seed // Returns: 0 // STDIN: // STDOUT:2 Weathermen // STDERR: Seed.import_namespace("GObject"); Seed.import_namespace("Gtk"); Gtk.init(null, null); HelloWindowType = { parent: Gtk.Window, name: "HelloWindow", class_init: function(klass, prototype) { var HelloSignalDefinition = ...
#!/usr/bin/env seed // Returns: 0 // STDIN: // STDOUT:2 Weathermen\n\[object GtkWindow\] // STDERR: Seed.import_namespace("GObject"); Seed.import_namespace("Gtk"); Gtk.init(null, null); HelloWindowType = { parent: Gtk.Window, name: "HelloWindow", class_init: function(klass, prototype) { var He...
Add test of defining a signal with a return type.
Add test of defining a signal with a return type. svn path=/trunk/; revision=233
JavaScript
lgpl-2.1
danilocesar/seed,danilocesar/seed,danilocesar/seed,danilocesar/seed,danilocesar/seed
9810b9950de6f7830c0557abefd3a12e0edaf148
brunch-config.js
brunch-config.js
exports.config = { npm: { enabled: true }, files: { javascripts: { joinTo: 'app.js' }, stylesheets: { joinTo: { 'app.css': /^app\/styles/ } } }, overrides: { production: { plugins: { postcss: { processors: [ require('autop...
exports.config = { files: { javascripts: { joinTo: 'app.js' }, stylesheets: { joinTo: { 'app.css': /^app\/styles/ } } }, overrides: { production: { plugins: { postcss: { processors: [ require('autoprefixer'), require('c...
Remove npm from config (enabled by default)
Remove npm from config (enabled by default)
JavaScript
mit
makenew/tasty-brunch,makenew/tasty-brunch,rxlabs/tasty-todos,makenew/tasty-brunch,rxlabs/tasty-todos,rxlabs/tasty-todos
c9f9444f3b7ad45cfffc6084de15a5c30796b264
DSA-Campaign-Uplift-Estimation/src/main/webapp/script.js
DSA-Campaign-Uplift-Estimation/src/main/webapp/script.js
// Copyright 2019 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 // // Unless required by applicable law or agreed to in ...
//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 // //Unless required by applicable law or agreed to in writin...
Create new method for logging in
Create new method for logging in
JavaScript
apache-2.0
googleinterns/step51-2020,googleinterns/step51-2020,googleinterns/step51-2020,googleinterns/step51-2020,googleinterns/step51-2020
7bdd46cdf2128b65efb8b62e6d5cc5b9c6c3a9d5
src/constants/Endpoints.js
src/constants/Endpoints.js
import { PROD_PROJECT_ID } from '../secrets'; export const OPTIMIZELY_BASE_URL = 'https://www.optimizelyapis.com/experiment/v1/'; export const PROJECTS_URL = `${OPTIMIZELY_BASE_URL}projects/`; export const PROD_EXPERIMENTS_URL = `${PROJECTS_URL}${PROD_PROJECT_ID}/experiments/`; export const getResultsUrl = (experim...
import { PROD_PROJECT_ID } from '../secrets'; export const OPTIMIZELY_BASE_URL = 'https://www.optimizelyapis.com/experiment/v1/'; export const PROJECTS_URL = `${OPTIMIZELY_BASE_URL}projects/`; export const PROD_EXPERIMENTS_URL = `${PROJECTS_URL}${PROD_PROJECT_ID}/experiments/`; export const getResultsUrl = (experim...
Change to use /stats instead of /results
Change to use /stats instead of /results
JavaScript
mit
zebogen/kapow-optimizely-dashboard,zebogen/kapow-optimizely-dashboard
1cf9b5d0a0946057399b261e598080efe0f686a2
src/skinner/core/resolver.js
src/skinner/core/resolver.js
define (["lib/lodash", "lib/Handlebars", "src/skinner/core/keypath"], function (_, Handlebars, keyPath) { "use strict"; function resolveData(data, subject, additionalDimensionData, context) { var allContext = keyPath(subject, "condition", {}); if (!_.isUndefined(additionalDimensionData)) { ...
define (["lib/lodash", "lib/Handlebars", "src/skinner/core/keypath"], function (_, Handlebars, keyPath) { "use strict"; function resolveData(data, subject, additionalDimensionData, context) { var allContext = keyPath(subject, "condition", {}); if (!_.isUndefined(additionalDimensionData)) { ...
Remove a console log statement, so tests run without extraneous logging
Remove a console log statement, so tests run without extraneous logging
JavaScript
mit
dbachrach/skinner,dbachrach/skinner
b733ed269de8dee5fd25cb4b273cc9963a21aa1d
examples/pagination/js/callbacks.js
examples/pagination/js/callbacks.js
// TODO
function displayPage(results) { $('#results tbody').empty(); for (let row of results) { let tr = $('<tr />'); for (let field of ['id', 'name', 'category', 'sub_category', 'container_type', 'price_per_unit', 'margin']) { tr.append($('<td />').text(row[field])); } $('...
Add callback version of pagination.
Add callback version of pagination.
JavaScript
mit
efritz/arrows,JoshuaSCochrane/arrows
d50634c9bf93893c82400e012c12841644c0d6a2
scripts/getBabelOptions.js
scripts/getBabelOptions.js
/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * * @format */ 'use strict'; module.exports = function(options) { options = Object.assign( { env: 'production', mod...
/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @noformat */ 'use strict'; module.exports = function(options) { options = Object.assign( { env: 'production', modu...
Fix CI for node 6
Fix CI for node 6 Summary: This file is executed without transforms so we can't have trailing commas in function calls until we drop node 6. Closes https://github.com/facebook/relay/pull/2424 Differential Revision: D7754622 Pulled By: kassens fbshipit-source-id: a3a54348cc4890616304c9ed5a739d4a92a9e305
JavaScript
mit
voideanvalue/relay,xuorig/relay,cpojer/relay,kassens/relay,xuorig/relay,xuorig/relay,wincent/relay,iamchenxin/relay,cpojer/relay,xuorig/relay,cpojer/relay,atxwebs/relay,josephsavona/relay,wincent/relay,dbslone/relay,iamchenxin/relay,voideanvalue/relay,xuorig/relay,yungsters/relay,voideanvalue/relay,wincent/relay,xuorig...
3f9ee727a59c00f955521b1c3f2137c9b901bce9
extension/keysocket-yandex-radio.js
extension/keysocket-yandex-radio.js
var playTarget = '.player-controls__play'; var nextTarget = '.button_round'; function onKeyPress(key) { if (key === NEXT) { var cards = document.querySelectorAll('.slider__item') var nextCard = cards[cards.length - 3]; console.log(nextCard); simulateClick(nextCard.querySele...
var playTarget = '.player-controls__play'; var nextTarget = '.button_round'; function onKeyPress(key) { if (key === NEXT) { var nextCard = document.querySelector('.slider__item_next'); console.log(nextCard); simulateClick(nextCard.querySelectorAll(nextTarget)[2]); } else if (key === PL...
Fix issue with forward button at Yandex.Radio
Fix issue with forward button at Yandex.Radio
JavaScript
apache-2.0
feedbee/keysocket,feedbee/keysocket
84746b5ce55292e85bdbbb031fff2712c8d40aee
scripts/cd-server.js
scripts/cd-server.js
// Continuous delivery server const { spawn } = require('child_process') const { resolve } = require('path') const { createServer } = require('http') const { urlencoded } = require('body-parser') const hostname = '127.0.0.1' const port = 80 const server = createServer((req, res) => { const { headers, method, url } =...
// Continuous delivery server const { spawn } = require('child_process') const { resolve } = require('path') const { createServer } = require('http') const { urlencoded } = require('body-parser') const hostname = '127.0.0.1' const port = 80 const server = createServer((req, res) => { const { headers, method, url } =...
Add branch and state check on CD server.
Add branch and state check on CD server.
JavaScript
mit
jsonnull/jsonnull.com,jsonnull/jsonnull.com,jsonnull/jsonnull.com
51a3c472ee6e4010971af1e7534ba6a5b2178abd
public/js/script.js
public/js/script.js
(function _bindPlanEvents () { 'use strict'; function getPlanContext (element) { var context = element.parentElement; if ('BODY' === context.tagName) { return null; } else if (context.classList.contains('plan')) { return context; } else { return getPlanContex...
(function _bindPlanEvents () { 'use strict'; function getPlanContext (element) { var context = element.parentElement; if ('BODY' === context.tagName) { return null; } else if (context.classList.contains('plan')) { return context; } else { return getPlanContex...
Use textContent instead of innerText
Use textContent instead of innerText
JavaScript
mit
marek-saji/standupper
5413c871f0d98e27515ee57e5a8a09fadaac11aa
lib/index.js
lib/index.js
/** * @param {mongoose.Schema} schema * @param {?Object=} options */ module.exports = exports = function constantPlugin(schema, options) { var validSchemaTypes = ['String', 'Number', 'Date', 'ObjectID']; function validateSchemaType(path, schemaType) { if (!~validSchemaTypes.indexOf(schemaType.instan...
var util = require('util'); /** * @param {mongoose.Schema} schema * @param {?Object=} options */ module.exports = exports = function constantPlugin(schema, options) { options = options || {}; options.ValidSchemaTypes = options.ValidSchemaTypes || ['String', 'Number', 'Date', 'ObjectID']; options.ErrorT...
Make valid schema types and validator error type configurable
Make valid schema types and validator error type configurable
JavaScript
isc
cakuki/mongoose-constant
867730d0855a81aa7b72118fc969932c37790cfb
packages/accounts/accounts_server.js
packages/accounts/accounts_server.js
/** * Sets the default permissions to new users */ Meteor.users.after.insert(function (userId, doc) { var userId = doc._id; if (orion.adminExists) { // if there is a admin created we will set the default roles. var defaultRoles = Options.get('defaultRoles'); Roles.addUserToRoles(userId, defaultRoles)...
/** * Sets the default permissions to new users */ Meteor.users.after.insert(function (userId, doc) { var userId = doc._id; if (orion.adminExists) { // if there is a admin created we will set the default roles. if (Roles._collection.find({ userId: userId }).count() == 0) { var defaultRoles = O...
Set default roles only if user has no roles
Set default roles only if user has no roles
JavaScript
mit
kevohagan/orion,BudickDa/orion,justathoughtor2/orion,PEM--/orion,Citronnade/orion,mauricionr/orion,PEM--/orion,nabiltntn/orion,Citronnade/orion,orionjs/orion,BudickDa/orion,kevohagan/orion,jorisroling/orion,mauricionr/orion,justathoughtor2/orion,rwatts3/orion,rwatts3/orion,nabiltntn/orion,orionjs/orion,TedEwanchyna/ori...
935076aa1cb280bea1fe1ac9c49aa4c52108b820
commands/tell.js
commands/tell.js
var l10n_file = __dirname + '/../l10n/commands/tell.yml'; var l10n = require('../src/l10n')(l10n_file); var CommandUtil = require('../src/command_util').CommandUtil; exports.command = function(rooms, items, players, npcs, Commands) { return function(args, player) { var message = args.split(''); var recipient...
var l10n_file = __dirname + '/../l10n/commands/tell.yml'; var l10n = require('../src/l10n')(l10n_file); var CommandUtil = require('../src/command_util').CommandUtil; exports.command = function(rooms, items, players, npcs, Commands) { return function(args, player) { var message = args.split(' '); var recipien...
Fix split/join and move functions so they can refer to recipient var.
Fix split/join and move functions so they can refer to recipient var.
JavaScript
mit
shawncplus/ranviermud,seanohue/ranviermud,seanohue/ranviermud
070cd9727bdb269a215b0dd087bb30c83fd3d5f5
commands/tell.js
commands/tell.js
var l10n_file = __dirname + '/../l10n/commands/tell.yml'; var l10n = require('../src/l10n')(l10n_file); var CommandUtil = require('../src/command_util').CommandUtil; exports.command = function(rooms, items, players, npcs, Commands) { return function(args, player) { var message = args.split(' '); var recipien...
var l10n_file = __dirname + '/../l10n/commands/tell.yml'; var l10n = require('../src/l10n')(l10n_file); var CommandUtil = require('../src/command_util').CommandUtil; exports.command = function(rooms, items, players, npcs, Commands) { return function(args, player) { var message = args.split(' '); var recipien...
Fix conditional for recipient name/playername
Fix conditional for recipient name/playername
JavaScript
mit
seanohue/ranviermud,shawncplus/ranviermud,seanohue/ranviermud
7722859f57858f8567bb5ab82dfdc023b9470b50
server/privileges.js
server/privileges.js
BlogPosts.allow({ insert: Utils.constant(true), remove: Utils.constant(true), update: Utils.constant(true), });
BlogPosts.allow({ insert: anyoneLoggedIn, remove: onlyTheOwner, update: onlyTheOwner, }); // these documents can be only accessed with custom methods Published.deny({ insert: Utils.constant(true), remove: Utils.constant(true), update: Utils.constant(true), }); function anyoneLoggedIn(userId) { return ...
Secure updates on BlogPost collection
Secure updates on BlogPost collection
JavaScript
mit
anticoders/blog,anticoders/blog,anticoders/blog
7b14081f1852c17167ea4295459f7514b234b5b6
server/userGarden.js
server/userGarden.js
'use strict'; const rethinkDB = require('rethinkdb'); const program = require('commander'); const UserDB = require('./UserDB'); const metrics = require('./metrics'); program .version('0.0.1') .option('-p, --port <n>', 'Port for WebSocket', parseInt) .option('-d, --dump <n>', 'Period for dump of user positions...
'use strict'; const rethinkDB = require('rethinkdb'); const program = require('commander'); const UserDB = require('./UserDB'); const metrics = require('./metrics'); program .version('0.0.1') .option('-p, --port <n>', 'Port for WebSocket', parseInt) .option('-d, --dump <n>', 'Period for dump of user positions...
Add default value for period of dump.
Add default value for period of dump.
JavaScript
mit
nobus/Labyrinth,nobus/Labyrinth
42a291286b4627191a18e8848dffee0bf5574c93
settings/js/admin.js
settings/js/admin.js
$(document).ready(function(){ $('#loglevel').change(function(){ $.post(OC.filePath('settings','ajax','setloglevel.php'), { level: $(this).val() },function(){ OC.Log.reload(); } ); }); $('#backgroundjobs input').change(function(){ if($(this).attr('checked')){ var mode = $(this).val(); if (mode == 'aja...
$(document).ready(function(){ $('#loglevel').change(function(){ $.post(OC.filePath('settings','ajax','setloglevel.php'), { level: $(this).val() },function(){ OC.Log.reload(); } ); }); $('#backgroundjobs input').change(function(){ if($(this).attr('checked')){ var mode = $(this).val(); if (mode == 'aja...
Fix incorrect Javascript for changing Share API settings
Fix incorrect Javascript for changing Share API settings
JavaScript
agpl-3.0
pmattern/server,pmattern/server,lrytz/core,pixelipo/server,owncloud/core,nextcloud/server,bluelml/core,owncloud/core,Ardinis/server,bluelml/core,phil-davis/core,michaelletzgus/nextcloud-server,pixelipo/server,cernbox/core,Ardinis/server,endsguy/server,pollopolea/core,IljaN/core,cernbox/core,IljaN/core,bluelml/core,whit...
72d6da5a3550976deba5cc245f5d3b88f770cf4d
lib/utils.js
lib/utils.js
var fs = require('fs'), expandHomeDir = require('expand-home-dir'), async = require('async') ; function readFile(fileLocation, cb) { fs.readFile(fileLocation, {encoding: 'utf8'}, function (err, fileContents) { if (err) { cb(err); return; } cb(null, fileCo...
var fs = require('fs'), expandHomeDir = require('expand-home-dir'), async = require('async') ; function readFile(fileLocation, cb) { fs.stat(fileLocation, function (stats) { if (stats.size > Math.pow(1024, 2) || !stats.isFile()) { cb(new Error('File ' + fileLocation + ' too large or...
Check whether read file is actually a file, and if it's not too big.
Check whether read file is actually a file, and if it's not too big.
JavaScript
mit
dice-cyfronet/hyperflow-client,dice-cyfronet/hyperflow-client
f5b2a9545d57b687b3f3726db255a29a47a5df07
src/global/routers/netinfo.js
src/global/routers/netinfo.js
/* jshint node: true */ /** * Wake Up Platform * (c) Telefonica Digital, 2014 - All rights reserved * License: GNU Affero V3 (see LICENSE file) * Fernando Rodríguez Sela <frsela at tid dot es> * Guillermo López Leal <gll at tid dot es> */ var log = require('../shared_libs/logger'); module.exports.info = { n...
/* jshint node: true */ /** * Wake Up Platform * (c) Telefonica Digital, 2014 - All rights reserved * License: GNU Affero V3 (see LICENSE file) * Fernando Rodríguez Sela <frsela at tid dot es> * Guillermo López Leal <gll at tid dot es> */ var log = require('../shared_libs/logger'), mn = require('../../common...
Use Mobile Network module to fetch network statuses data
Use Mobile Network module to fetch network statuses data
JavaScript
agpl-3.0
telefonicaid/wakeup_platform_global,telefonicaid/wakeup_platform_global
2eebdd3b129adbaf661c6a6a5e18c5329f4b6311
liphte.ts.js
liphte.ts.js
var fs = require('fs'); var vm = require('vm'); var includeInThisContext = function(path) { var code = fs.readFileSync(path); vm.runInThisContext(code, path); }.bind(this); includeInThisContext("dist/liphte.min.js"); exports.liphte = liphte;
var fs = require('fs'); var vm = require('vm'); var includeInThisContext = function(path) { var code = fs.readFileSync(path); vm.runInThisContext(code, path); }.bind(this); includeInThisContext(__dirname+"/dist/liphte.min.js"); exports.liphte = liphte;
Fix module for NodeJS - apped_dir_name
Fix module for NodeJS - apped_dir_name
JavaScript
mit
maveius/liphte.ts,maveius/liphte.ts
1ffcd46beb7659fa314c6ea799991d6320c828e1
spec/bind_to_spec.js
spec/bind_to_spec.js
var vows = require('vows') , assert = require('assert') , Glue = require(__dirname + "/../lib/glue"); var suite = vows.describe('bindTo') suite.addBatch({ "ensures": { "that the target object of glue is changed": function() { var topic = new Glue({an: "object"}); topic.bindTo({another: "ob...
var vows = require('vows') , assert = require('assert') , Glue = require(__dirname + "/../lib/glue"); var suite = vows.describe('bindTo') suite.addBatch({ "ensures": { topic: new Glue({}), "that the target object of glue is changed": function(topic) { topic.target = {}; topic.bindTo({...
Refactor bind_to spec to better performance
Refactor bind_to spec to better performance
JavaScript
mit
edgecase/glue.js
af4aa45ca05de249b4dc4bee0271c47cc838ddac
src/bot/helpers/incomes.js
src/bot/helpers/incomes.js
import { get } from 'lodash'; import { calculateCurrentEvents } from '../../lib/events'; import { getEbudgie } from './ebudgie'; export const showMontlyIncomesAmount = async (page_scoped_id, reply) => { try { const ebudgie = await getEbudgie(page_scoped_id, reply); if (!ebudgie) { return; } ...
import { get } from 'lodash'; import { calculateCurrentEvents } from '../../lib/events'; import { getEbudgie } from './ebudgie'; export const showMonthlyIncomesAmount = async (page_scoped_id, reply) => { try { const ebudgie = await getEbudgie(page_scoped_id, reply); if (!ebudgie) { return; } ...
FIx the typo of showMonthlyIncomesAmount
FIx the typo of showMonthlyIncomesAmount
JavaScript
mit
nikolay-radkov/ebudgie-server,nikolay-radkov/ebudgie-server
168c9b47763e30982a47c4c1fed683f31788d098
src/ipfs-access-controller.js
src/ipfs-access-controller.js
'use strict' const AccessController = require('./access-controller') const { DAGNode } = require('ipld-dag-pb') class IPFSAccessController extends AccessController { constructor (ipfs) { super() this._ipfs = ipfs } async load (address) { // Transform '/ipfs/QmPFtHi3cmfZerxtH9ySLdzpg1yFhocYDZgEZywd...
'use strict' const AccessController = require('./access-controller') const { DAGNode } = require('ipld-dag-pb') class IPFSAccessController extends AccessController { constructor (ipfs) { super() this._ipfs = ipfs } async load (address) { // Transform '/ipfs/QmPFtHi3cmfZerxtH9ySLdzpg1yFhocYDZgEZywd...
Throw error returned from DAGNode.create in access controller
Throw error returned from DAGNode.create in access controller
JavaScript
mit
haadcode/orbit-db,orbitdb/orbit-db,orbitdb/orbit-db,haadcode/orbit-db
f22a82b87463a0abf802af582d52b89520433e46
models/users_model.js
models/users_model.js
import mongoose, { Schema } from 'mongoose'; const userSchema = new Schema({ first_name: { type: String, required: true }, last_name: { type: String, required: true }, email: { type: String, unique: true, required: true }, username: { type: String, unique: true, required: true }, password: { type: ...
import mongoose, { Schema } from 'mongoose'; const userSchema = new Schema({ first_name: { type: String, required: true }, last_name: { type: String, required: true }, email: { type: String, unique: true, required: true }, username: { type: String, unique: true, required: true }, password: { type: ...
Remove admin privilege from users model for security
Remove admin privilege from users model for security
JavaScript
mit
davidlamt/antfinder-api
caa4e2071ae26d012a71eeae77b72cc60bcfe2e1
src/content/shorten-url.js
src/content/shorten-url.js
import fetchJsonP from 'fetch-jsonp'; import queryString from 'query-string'; import url from 'url'; export default function shortenURL(urlToShorten) { let longURL = urlToShorten; if (!longURL.startsWith('https://perf-html.io/')) { const parsedURL = url.parse(longURL); const parsedURLOnCanonicalHost = Obje...
import fetchJsonP from 'fetch-jsonp'; import queryString from 'query-string'; import url from 'url'; export default function shortenURL(urlToShorten) { let longURL = urlToShorten; if (!longURL.startsWith('https://perf-html.io/')) { const parsedURL = url.parse(longURL); const parsedURLOnCanonicalHost = Obje...
Add missing 'format' key in the bit.ly API request.
Add missing 'format' key in the bit.ly API request. Bit.ly have recently made a change on their side to ignore the jsonp callback argument if format=json was not specified, and that made our requests fail.
JavaScript
mpl-2.0
devtools-html/perf.html,mstange/cleopatra,squarewave/bhr.html,mstange/cleopatra,squarewave/bhr.html,devtools-html/perf.html
707ab3e66fb6f27a4e6d7e8165b229c3deea8140
client/src/components/SmallSave/styled.js
client/src/components/SmallSave/styled.js
import styled from 'styled-components'; export const Save = styled.div` align-items: center; display: flex; flex-direction: row; justify-content: center; padding: 8px; &:hover { color: #000; } `; export const Bookmark = styled.span` color: ${props => (props.saved ? '#04d092' : '#bbb')}; line-he...
import styled from 'styled-components'; export const Save = styled.div` align-items: center; display: flex; flex-direction: row; justify-content: center; padding: 8px; &:hover { color: #000; } `; export const Bookmark = styled.span` color: ${props => (props.saved ? '#04d092' : '#bbb')}; line-he...
Remove pointer events from bookmark symbol
Remove pointer events from bookmark symbol
JavaScript
mit
jenovs/bears-team-14,jenovs/bears-team-14
c47e5906cd53d9348df05194c511cc5a0c020b8e
routes/index.js
routes/index.js
const router = require('express').Router() // eslint-disable-line new-cap const website = require('../data/website') /* GET API */ router.get('/api', (req, res) => { res.json(website) }) /* GET home page */ router.get('/', (req, res) => { res.render('index', { title: website.author.name, description: web...
const router = require('express').Router() // eslint-disable-line new-cap const website = require('../data/website') /* GET API */ router.get('/api', (req, res) => { res.json(website) }) /* GET home page */ router.get('/', (req, res) => { res.render('index', { title: website.author.name, description: web...
Remove projects data from API
Remove projects data from API
JavaScript
mit
mlcdf/website,mlcdf/website
dd43ad4214d51d911beae3ecead16705736a5148
routes/users.js
routes/users.js
'use strict'; const userCtr = require('./../controllers/users.js'); const authentication = require('./../middleware/authentication'); const authorisation = require('./../middleware/authorisation'); const userRoutes = (router) => { router .route('/users') .post(userCtr.create); }; module.exports = userRout...
'use strict'; const userCtr = require('./../controllers/users.js'); const userAuth = require('./../controllers/authentication.js'); const authentication = require('./../middleware/authentication'); const authorisation = require('./../middleware/authorisation'); const userRoutes = (router) => { router ...
Add authentication controller to handle user authentication
Add authentication controller to handle user authentication
JavaScript
mit
andela-oolutola/document-management-system-api