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
47c887ad3090b772440c049d63e9d867d03ea61e
bin/global.js
bin/global.js
#!/usr/bin/env node --harmony-async-await const kamerbotchi = require('../index.js') console.log('KamerBOTchi v'+require('../package.json').version) console.log('Developed with <3 by Sander Laarhoven') console.log('https://git.io/kamergotchi') console.log('\nPlayer token is set to ' + process.argv[2]) kamerbotchi.set...
#!/bin/sh ":" //# http://sambal.org/?p=1014 ; exec /usr/bin/env node --harmony-async-await "$0" "$@" const kamerbotchi = require('../index.js') console.log('KamerBOTchi v'+require('../package.json').version) console.log('Developed with <3 by Sander Laarhoven') console.log('https://git.io/kamergotchi') console.log('\n...
Fix shebang arguments for Ubuntu users.
Fix shebang arguments for Ubuntu users. http://sambal.org/2014/02/passing-options-node-shebang-line/
JavaScript
mit
lesander/kamergotchi-bot,lesander/kamergotchi-bot
3302fe89cb1a30f54871e90ed177a1a8e8e832c7
controllers.js
controllers.js
(function (angular){ 'use strict'; angular.module('app') .controller('counterController', counterController) .controller('todoController', todoController) counterController.$inject = [] todoController.$inject = [] function counterController(){ this.counter = 0; this.add = functi...
(function (angular){ 'use strict'; angular.module('app') .controller('counterController', counterController) .controller('todoController', todoController) counterController.$inject = [] todoController.$inject = [] function counterController(){ this.counter = 0; this.add = functi...
Fix input submit, now clear itself after submit
Fix input submit, now clear itself after submit
JavaScript
mit
haworku/angular-todo,haworku/angular-todo
2ea983793b5bb734954fa091be6a4579c4768203
src/content_scripts/view/story_listener.js
src/content_scripts/view/story_listener.js
import $ from 'jquery' import AnalyticsWrapper from "../utilities/analytics_wrapper"; export default (modal) => { $(document).on('click', '.finish.button', function () { chrome.runtime.sendMessage({ eventType: 'pop' }); modal.modal('show'); }); };
import $ from 'jquery' export default (modal) => { $(document).on('click', '.finish.button', function () { chrome.runtime.sendMessage({ eventType: 'pop' }); modal.modal('show'); }); };
Revert "Missing import for AnalyticsWrapper"
Revert "Missing import for AnalyticsWrapper" We stopped using AnalyticsWrapper and now send messages to the background instead This reverts commit 0f6cd479b089319275d3f08e79c8e9ecbf96eb5e.
JavaScript
isc
oliverswitzer/wwltw-for-pivotal-tracker,oliverswitzer/wwltw-for-pivotal-tracker
40c6326cfd7a16f2643bf594d027a2b1dc4eda8f
api/services/Cron.js
api/services/Cron.js
// Cron.js - in api/services "use strict"; const CronJob = require('cron').CronJob; const _ = require('lodash'); const crons = []; module.exports = { start: () => { sails.config.scientilla.crons.forEach(cron => { crons.push(new CronJob(cron.time, onTick(cron), null, false, 'Europe/Rome')) ...
// Cron.js - in api/services "use strict"; const CronJob = require('cron').CronJob; const _ = require('lodash'); const crons = []; module.exports = { start: () => { sails.config.scientilla.crons.forEach(cron => { crons.push(new CronJob(cron.time, generateOnTick(cron), null, false, 'Europe/Rom...
Change name function generate on tick
Change name function generate on tick
JavaScript
mit
scientilla/scientilla,scientilla/scientilla,scientilla/scientilla
141ac976ff38506cd68db5402d0a96fe0899abab
libs/cmd.js
libs/cmd.js
'use strict'; const fs = require('fs'); var importCmd = () => { let files = fs.readdirSync(__dirname+'/../cmds/'); let cmds = {}; for(var i in files) { let ext = require(__dirname+'/../cmds/'+files[i]).cmds; for(var index in ext) { cmds[index] = ext[index]; } } return cmds; }; module.expo...
'use strict'; const fs = require('fs'); const remote = require('remote'); var getExtDir = () => { return remote.app.getPath('userData')+'/cmds'; }; var importCmd = () => { let cmds = {}; cmds = importInternal(cmds); cmds = importExternal(cmds); return cmds; }; var importInternal = (cmds) => { let files ...
Allow injection of simple extensions
Allow injection of simple extensions Allows to inject single file extensions with basic task.
JavaScript
bsd-2-clause
de-luca/Pinata,de-luca/Pinata
996398912fd327022bc934153cd58ee8b89e9393
config/configuration.js
config/configuration.js
/** * @file Defines the provider settings. * * Will set the path to Mongo, and applications id * Most of the configuration can be done using system environment variables. */ // Load environment variables from .env file var dotenv = require('dotenv'); dotenv.load(); // node_env can either be "development" or "pro...
/** * @file Defines the provider settings. * * Will set the path to Mongo, and applications id * Most of the configuration can be done using system environment variables. */ // Load environment variables from .env file var dotenv = require('dotenv'); dotenv.load(); // node_env can either be "development" or "pro...
Use GDRIVE prefix in env vars
Use GDRIVE prefix in env vars
JavaScript
mit
AnyFetch/gdrive-provider.anyfetch.com
65501f32f2266e0c6c6750c28218d5df5ad67bbd
swh/web/assets/src/bundles/webapp/index.js
swh/web/assets/src/bundles/webapp/index.js
/** * Copyright (C) 2018 The Software Heritage developers * See the AUTHORS file at the top-level directory of this distribution * License: GNU Affero General Public License version 3, or any later version * See top-level LICENSE file for more information */ // webapp entrypoint bundle centralizing global custom...
/** * Copyright (C) 2018 The Software Heritage developers * See the AUTHORS file at the top-level directory of this distribution * License: GNU Affero General Public License version 3, or any later version * See top-level LICENSE file for more information */ // webapp entrypoint bundle centralizing global custom...
Add missing filterXSS function export
assets/webapp: Add missing filterXSS function export
JavaScript
agpl-3.0
SoftwareHeritage/swh-web-ui,SoftwareHeritage/swh-web-ui,SoftwareHeritage/swh-web-ui
f37e42b6e9b33b2961239c52c58641eb959b9563
app/js/mol.map.splash.js
app/js/mol.map.splash.js
mol.modules.map.splash = function(mol) { mol.map.splash = {}; mol.map.splash.SplashEngine = mol.mvp.Engine.extend( { init: function(proxy, bus) { this.proxy = proxy; this.bus = bus; }, /** * Starts the MenuEngine. Note ...
mol.modules.map.splash = function(mol) { mol.map.splash = {}; mol.map.splash.SplashEngine = mol.mvp.Engine.extend( { init: function(proxy, bus) { this.proxy = proxy; this.bus = bus; }, /** * Starts the MenuEngine. Note ...
Fix Splash width to 800 px.
Fix Splash width to 800 px.
JavaScript
bsd-3-clause
MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL
ba850707c1f8031717bb75065c23345665328977
app/lib/firebase_auth.js
app/lib/firebase_auth.js
import EmberObject from "@ember/object"; import config from "fakturama/config/environment"; const { APP: { FIREBASE, FIREBASE: { projectId } } } = config; const { firebase } = window; const app = firebase.initializeApp(FIREBASE); function delegateMethod(name) { return function() { return this.get("content")[na...
import EmberObject from "@ember/object"; import config from "fakturama/config/environment"; const { APP: { FIREBASE, FIREBASE: { projectId } } } = config; const { firebase } = window; const app = firebase.initializeApp(FIREBASE); function delegateMethod(name) { return function() { return this.get("...
Add profile scope to google auth
Add profile scope to google auth
JavaScript
mit
cowbell/fakturama,cowbell/fakturama
c76b85a5f14d036433ceede9de69cf041a64d2bc
public/js/boot.js
public/js/boot.js
var bootState = { create: function () { //Initial GameSystem (Arcade, P2, Ninja) game.physics.startSystem(Phaser.Physics.ARCADE); //Initial Load State game.state.start('load'); } };
var bootState = { create: function () { //Initial GameSystem (Arcade, P2, Ninja) game.physics.startSystem(Phaser.Physics.P2JS); //Initial Load State game.state.start('load'); } };
Change physics engine to P2
Change physics engine to P2
JavaScript
mit
bunchopunch/ludum-38,bunchopunch/ludum-38
1515fe0fbfb7dfb39f602da4d1d9051069ee8454
src/languages/css.js
src/languages/css.js
define(function() { // Export return function(Prism) { Prism.languages.css = { 'comment': /\/\*[\w\W]*?\*\//g, 'atrule': /@[\w-]+?(\s+[^;{]+)?(?=\s*{|\s*;)/gi, 'url': /url\((["']?).*?\1\)/gi, 'selector': /[^\{\}\s][^\{\}]*(?=\s*\{)/g, 'property': /(\b|\B)[a-z-]+(?=\s*:)/ig, 'string': /("|')(\\?....
define(function() { return function(Prism) { Prism.languages.css = { 'comment': /\/\*[\w\W]*?\*\//g, 'atrule': /@[\w-]+?(\s+[^;{]+)?(?=\s*{|\s*;)/gi, 'url': /url\((["']?).*?\1\)/gi, 'selector': /[^\{\}\s][^\{\}]*(?=\s*\{)/g, 'property': /(\b|\B)[a-z-]+(?=\s*:)/ig, 'string': /("...
Fix indentation of the CSS grammar
Fix indentation of the CSS grammar
JavaScript
mit
apiaryio/prism
c0ca6b23053d338fd94f20a61c49b46634abb1fb
api/index.js
api/index.js
module.exports = function createApi (osm) { return { getMap: require('./get_map.js')(osm), getElement: require('./get_element.js')(osm), createElement: require('./create_element.js')(osm), createChangeset: require('./create_changeset.js')(osm), closeChangeset: require('./close_changeset.js')(osm),...
module.exports = function createApi (osm) { return { getMap: require('./get_map.js')(osm), getElement: require('./get_element.js')(osm), createElement: require('./create_element.js')(osm), createChangeset: require('./create_changeset.js')(osm), closeChangeset: require('./close_changeset.js')(osm),...
Remove osm export from API
Remove osm export from API
JavaScript
bsd-2-clause
substack/osm-p2p-server,digidem/osm-p2p-server
c8c9d34c76811176d6c719527a69ec456005c0d2
app/index.js
app/index.js
const canvas = document.getElementById('pong'); console.log('canvas', canvas);
const canvas = document.getElementById('pong'); const context = canvas.getContext('2d'); const COLORS = { BACKGROUND: '#000', PROPS: '#FFF', }; context.fillStyle = COLORS.BACKGROUND; context.fillRect(0, 0, canvas.width, canvas.height); const Player = function() {}; Player.prototype.draw = function(positionX, posi...
Add basic drawing functionality to test canvas is functional and behaving correctly
Add basic drawing functionality to test canvas is functional and behaving correctly
JavaScript
mit
oliverbenns/pong,oliverbenns/pong
ed784e014f5258c82efeea34740d17c2527ac868
src/public/js/settings.js
src/public/js/settings.js
define([], function () { 'use strict'; return { 'oauthConsumerKey': 'wPfXjdZViPvrRWSlenSWBsAWhYKarmOkOKk5WS4U', 'oauthSecret': 'kaBZXTHZHKSk2jvBUr8vzk7JRI1cryFI08ubv7Du', 'overpassServer': 'http://overpass-api.de/api/', // 'overpassServer': 'http://overpass.osm.rambler.ru/cgi/', // 'overpassServer': '...
define([], function () { 'use strict'; return { 'oauthConsumerKey': 'wPfXjdZViPvrRWSlenSWBsAWhYKarmOkOKk5WS4U', 'oauthSecret': 'kaBZXTHZHKSk2jvBUr8vzk7JRI1cryFI08ubv7Du', // 'overpassServer': 'http://overpass-api.de/api/', 'overpassServer': 'http://overpass.osm.rambler.ru/cgi/', // 'overpassServer': '...
Revert "New default Overpass server"
Revert "New default Overpass server" This reverts commit a32767d2d697313c452f6a06aac16360b75e3619.
JavaScript
mit
MapContrib/MapContrib,MapContrib/MapContrib,MapContrib/MapContrib
39d14512e8bf4791d569fb417e01e82ddfbcfb63
bin/pwned.js
bin/pwned.js
#!/usr/bin/env node // Enable source map support require('source-map-support').install(); // Polyfill Promise if necessary if (global.Promise === undefined) { require('es6-promise').polyfill(); } var program = require('commander'); var pkg = require('../package.json'); var addCommands = require('../lib/commands');...
#!/usr/bin/env node // Polyfill Promise if necessary if (global.Promise === undefined) { require('es6-promise').polyfill(); } var program = require('commander'); var pkg = require('../package.json'); var addCommands = require('../lib/commands'); // Begin command-line argument configuration program .usage('[opt...
Remove unnecessary source map support from entry point
Remove unnecessary source map support from entry point Transpiling the entry point was discontinued in e4c1ed8f.
JavaScript
mit
wKovacs64/pwned,wKovacs64/pwned
eafc8e98d29bd60db63ce1d3ffca5ff28bd8412f
algorithm/sorting/quick/basic/code.js
algorithm/sorting/quick/basic/code.js
tracer._print('original array = [' + D.join(', ') + ']'); tracer._sleep(1000); tracer._pace(500); function quicksort(low, high) { if (low < high) { var p = partition(low, high); quicksort(low, p - 1); quicksort(p + 1, high); } } function partition(low, high) { var pivot = D[high]; ...
tracer._print('original array = [' + D.join(', ') + ']'); tracer._sleep(1000); tracer._pace(500); function quicksort(low, high) { if (low < high) { var p = partition(low, high); quicksort(low, p - 1); quicksort(p + 1, high); } } function partition(low, high) { var pivot = D[high]; ...
Fix define warning in "temp" variable
Fix define warning in "temp" variable
JavaScript
mit
archie94/AlgorithmVisualizer,archie94/AlgorithmVisualizer,makintunde/AlgorithmVisualizer,nem035/AlgorithmVisualizer,makintunde/AlgorithmVisualizer,nem035/AlgorithmVisualizer
cc912b3155cadd5915c26e5e2077c2432b0d346b
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ...
Update nav background-color change from 50px to 110px trigger
Update nav background-color change from 50px to 110px trigger
JavaScript
mit
benjaminhyw/rails-online-shop,benjaminhyw/rails-online-shop,benjaminhyw/rails-online-shop
812ac44c9e0e837a44651cd731e06d07b370976a
config/tabs.js
config/tabs.js
export const TABS = [ { name: 'latest', title: 'Nåtid', chartKind: 'bar', year: 'latest' }, { name: 'chronological', title: 'Over tid', chartKind: 'stackedArea', year: 'all' }, { name: 'map', title: 'Kart', chartKind: 'map', year: 'latest' }, { name: 'be...
export const TABS = [ { name: 'latest', title: 'Nåtid', chartKind: 'bar', year: 'latest' }, { name: 'chronological', title: 'Over tid', chartKind: 'line', year: 'all' }, { name: 'map', title: 'Kart', chartKind: 'map', year: 'latest' }, { name: 'benchmark...
Change default for chronological tab to line
Change default for chronological tab to line
JavaScript
mit
bengler/imdikator,bengler/imdikator
5bd4af9d7a3ccfee9a347a0e6cdd6641e64fec79
gh-pages-stub/public/js/process404.js
gh-pages-stub/public/js/process404.js
/* * Copyright 2014-2016 CyberVision, Inc. * <p/> * 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 * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applic...
/* * Copyright 2014-2016 CyberVision, Inc. * <p/> * 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 * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applic...
Add separate eventCategory for broken links
JEK-8: Add separate eventCategory for broken links
JavaScript
apache-2.0
aglne/kaa,sashadidukh/kaa,sashadidukh/kaa,vtkhir/kaa,aglne/kaa,sashadidukh/kaa,aglne/kaa,vtkhir/kaa,aglne/kaa,vtkhir/kaa,vtkhir/kaa,vtkhir/kaa,aglne/kaa,sashadidukh/kaa,sashadidukh/kaa,vtkhir/kaa,sashadidukh/kaa,aglne/kaa,vtkhir/kaa,sashadidukh/kaa,sashadidukh/kaa,vtkhir/kaa,aglne/kaa
bce6148287de314127188099c59c82ce79905156
lib/client.js
lib/client.js
var aws = require('aws-sdk'); module.exports = function() { aws.config.update({ accessKeyId: process.env.AWS_ACCESS_KEY_ID, secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, region: 'us-east-1' }); return new aws.EC2(); }
var aws = require('aws-sdk'); module.exports = function() { if (!process.env.AWS_ACCESS_KEY_ID || !process.env.AWS_SECRET_ACCESS_KEY) { throw new Error('Must set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY') } aws.config.update({ accessKeyId: process.env.AWS_ACCESS_KEY_ID, secretAccessKey: process.env.AWS_S...
Add check for env vars
Add check for env vars
JavaScript
mit
freeman-lab/tinycloud
27c8e704ab182ae6e2d6dfb39a64b8417c809680
lib/concat.js
lib/concat.js
(function(){ module.exports = concat var fs = require('fs') function concat(files, target, done){ validateInputs(files, target, done) var writeStream = fs.createWriteStream(target, {flags: 'a'}) writeFiles(files.reverse(), writeStream, done) } function writeFiles(files, writeStream, ca...
(function(){ module.exports = concat var fs = require('fs') function concat(files, target, done, errFunction){ validateInputs(files, target, done, errFunction) var writeStream = fs.createWriteStream(target, {flags: 'a'}) writeFiles(files.reverse(), writeStream, done, errFunction) } fun...
Allow for error handler to be passed as parameter
Allow for error handler to be passed as parameter So that errors can be properly handled in cases like Promises etc.
JavaScript
mit
andreicioban/file-concat-stream
06e38be848b204b60db34fac3f7adb50fa3d1e7a
packages/stylus/package.js
packages/stylus/package.js
Package.describe({ summary: 'Expressive, dynamic, robust CSS', version: "2.0.0_511" }); Package.registerBuildPlugin({ name: 'compileStylusBatch', use: ['ecmascript', 'caching-compiler'], sources: [ 'plugin/compile-stylus.js' ], npmDependencies: { stylus: "https://github.com/meteor/stylus/tarball/...
Package.describe({ summary: 'Expressive, dynamic, robust CSS', version: "2.0.0_511" }); Package.registerBuildPlugin({ name: 'compileStylusBatch', use: ['ecmascript', 'caching-compiler'], sources: [ 'plugin/compile-stylus.js' ], npmDependencies: { stylus: "https://github.com/meteor/stylus/tarball/...
Remove lru-cache dependency from stylus
Remove lru-cache dependency from stylus
JavaScript
mit
joannekoong/meteor,msavin/meteor,lpinto93/meteor,meteor-velocity/meteor,DCKT/meteor,Theviajerock/meteor,deanius/meteor,SeanOceanHu/meteor,chasertech/meteor,Prithvi-A/meteor,mubassirhayat/meteor,yinhe007/meteor,udhayam/meteor,Theviajerock/meteor,hristaki/meteor,chiefninew/meteor,hristaki/meteor,aldeed/meteor,alexbeletsk...
856382581b137c3b2a9a0ed0efcc4fe60db5f1b5
test/ui-testing/test.js
test/ui-testing/test.js
const new_user = require('./new_user.js'); const patron_group = require('./patron_group.js'); module.exports.test = function(uitestctx) { patron_group.test(uitestctx); new_user.test(uitestctx); }
const new_user = require('./new_user.js'); const patron_group = require('./patron_group.js'); module.exports.test = function(uitestctx) { patron_group.test(uitestctx); new_user.test(uitestctx); }
Add missing final newline FOLIO-351
Add missing final newline FOLIO-351
JavaScript
apache-2.0
folio-org/ui-users,folio-org/ui-users
b5ea8b96c1ae114220f45635c6e4bf783881964c
plugins/dropkick.jquery.js
plugins/dropkick.jquery.js
jQuery.fn.dropkick = function ( opts, args ) { return $( this ).each(function() { if ( !opts || typeof opts === 'object' ) { new Dropkick( this, opts || {} ); } else if ( typeof opts === 'string' ) { new Dropkick( this )[ opts ]( args ); } }); };
jQuery.fn.dropkick = function ( opts ) { return $( this ).each(function() { var dk; if ( !opts || typeof opts === 'object' ) { new Dropkick( this, opts || {} ); } else if ( typeof opts === 'string' ) { dk = new Dropkick( this ); dk[ opts ].apply( dk, arguments.slice(1) ); } })...
Allow multiple args for jQuery extension
Allow multiple args for jQuery extension
JavaScript
mit
Robdel12/DropKick,GerHobbelt/DropKick,alex-riabenko/DropKick,Robdel12/DropKick,chrismoulton/DropKick,alexgleason/DropKick,acebalajadia/DropKick,chrismoulton/DropKick,spoonben/DropKick,alexgleason/DropKick,GerHobbelt/DropKick,acebalajadia/DropKick,alex-riabenko/DropKick
2c1b02b96e19905bd21712e9ce4e1983a3a0e5b0
renanbrg/dropstory/js/Main.js
renanbrg/dropstory/js/Main.js
var game = new Phaser.Game(Config.global.screen.width, Config.global.screen.height, Phaser.Auto, 'game'); game.state.add('ludus-state', State.LudusSplash); game.state.add('sponsor-state', State.SponsorSplash); game.state.add('pause-state', State.Pause); game.state.add('gameover-state', State.GameOver); game.state.ad...
var game = new Phaser.Game(Config.global.screen.width, Config.global.screen.height, Phaser.CANVAS, 'game'); game.state.add('ludus-state', State.LudusSplash); game.state.add('sponsor-state', State.SponsorSplash); game.state.add('pause-state', State.Pause); game.state.add('gameover-state', State.GameOver); game.state....
Change the renderer of the game
Change the renderer of the game Change the renderer of the game from Phaser.AUTO to Phaser.CANVAS. For some reason, using canvas improves the performance significantly, in comparison with WebGL (which is the one chosen by Phaser.AUTO).
JavaScript
mit
jucimarjr/posueagames,jucimarjr/posueagames
040d5d1f6ef2f582a0c5c2b8fe6263bb0c1b7c4d
packages/plug-auth-server/test/authenticator.js
packages/plug-auth-server/test/authenticator.js
import test from 'ava' import authenticator from '../src/authenticator' import testUsers from './util/testUsers' function localUsersRepository () { return { getUser(id) { const result = testUsers.find((user) => user.id === id) if (!result) { return Promise.reject(new Error('User not found'))...
import test from 'ava' import authenticator from '../src/authenticator' import testUsers from './util/testUsers' function localUsersRepository () { return { getUser(id) { const result = testUsers.find((user) => user.id === id) if (!result) { return Promise.reject(new Error('User not found'))...
Fix test for getAuthBlurb() result
Fix test for getAuthBlurb() result
JavaScript
mit
goto-bus-stop/plug-auth
86ee32602f9257790c2da7b4e84e2070ace5bfb7
client/constants/NavigateConstants.js
client/constants/NavigateConstants.js
import constantCreator from '../lib/constantCreator' const NavigateConstants = constantCreator('NAVIGATE', { START: null, FAILURE: null, SUCCESS: null }) export default NavigateConstants
import constantCreator from '../lib/constantCreator' const NavigateConstants = constantCreator('NAVIGATE', { START: null, FAILURE: null, SUCCESS: null, TRANSITION_TO: null }) export default NavigateConstants
Add transition constant for navigation
Add transition constant for navigation
JavaScript
apache-2.0
cesarandreu/bshed,cesarandreu/bshed
8c86d8945458031b6164f110a3a59899f638ad37
closure/goog/structs/priorityqueue.js
closure/goog/structs/priorityqueue.js
/** * @license * Copyright The Closure Library Authors. * SPDX-License-Identifier: Apache-2.0 */ /** * @fileoverview Datastructure: Priority Queue. * * * This file provides the implementation of a Priority Queue. Smaller priorities * move to the front of the queue. If two values have the same priority, * it ...
/** * @license * Copyright The Closure Library Authors. * SPDX-License-Identifier: Apache-2.0 */ /** * @fileoverview Datastructure: Priority Queue. * * * This file provides the implementation of a Priority Queue. Smaller priorities * move to the front of the queue. If two values have the same priority, * it ...
Convert goog.structs.PriorityQueue to goog.module and ES6 class
Convert goog.structs.PriorityQueue to goog.module and ES6 class RELNOTES: n/a PiperOrigin-RevId: 442836111 Change-Id: I24f217f529862670ff383d92bd4095f17bf980ff
JavaScript
apache-2.0
google/closure-library,google/closure-library,google/closure-library,google/closure-library,google/closure-library
d9497da46e647f2ca9d6a2ad2f3fcf4d8c56c90d
assets/src/edit-story/elements/video/display.js
assets/src/edit-story/elements/video/display.js
/** * External dependencies */ import PropTypes from 'prop-types'; import styled from 'styled-components'; /** * Internal dependencies */ import { ElementWithPosition, ElementWithSize, ElementWithRotation } from '../shared'; const Element = styled.video` ${ ElementWithPosition } ${ ElementWithSize } ${ Element...
/** * External dependencies */ import PropTypes from 'prop-types'; import styled from 'styled-components'; /** * Internal dependencies */ import { ElementWithPosition, ElementWithSize, ElementWithRotation } from '../shared'; const Element = styled.video` ${ ElementWithPosition } ${ ElementWithSize } ${ Element...
Add some basic video element.
Add some basic video element.
JavaScript
apache-2.0
GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp
bfac9b3caa74208d63b55a3f2dd0c364e8656e8a
test/src/mocha/browser.js
test/src/mocha/browser.js
var windowTest = require('./windowTest'); var elmTest = require('./elmTest'); var locationTest = require('./locationTest'); var storageTest = require('./storageTest'); module.exports = function (browser) { var title = browser.desiredCapabilities.browserName + "-" + browser.desiredCapabilities.versi...
var windowTest = require('./windowTest'); var elmTest = require('./elmTest'); var locationTest = require('./locationTest'); var storageTest = require('./storageTest'); module.exports = function (browser) { var title = browser.desiredCapabilities.browserName + "-" + browser.desiredCapabilities.versi...
Increase timeout for the sake of iPhone tests.
Increase timeout for the sake of iPhone tests.
JavaScript
mit
rgrempel/elm-web-api,rgrempel/elm-web-api
6336e7cd56c760d90ef63694ecea0eee529705a7
test/stores/Store.spec.js
test/stores/Store.spec.js
import store from "src/stores/Store.js"; import app from "src/reducers/App.js"; describe("store", () => { it("should exist", () => { store.should.exist; }); it("should have all API methods", () => { store.dispatch.should.be.a.function; store.getState.should.be.a.function; store.replaceReducer.s...
import store from "src/stores/Store.js"; import app from "src/reducers/App.js"; describe("store", () => { it("should exist", () => { store.should.exist; }); it("should have all API methods", () => { store.dispatch.should.be.a.function; store.getState.should.be.a.function; store.replaceReducer.s...
Fix Store: fix broken test whether store use app reducer or not
Fix Store: fix broken test whether store use app reducer or not
JavaScript
mit
Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React
00d96d49e368313190aad149d5f3de0f9a226149
examples/expected_invocation_test.js
examples/expected_invocation_test.js
var Ajax = { get: function(uri) { } }; var Updater = Class.create({ initialize: function(bookId) { this.bookId = bookId; setSample('<div id="title"></div>'); }, run: function() { var book = Ajax.get('http://example.com/books/'+this.bookId+'.json'); var title = book.title; $('title').inne...
var Ajax = { get: function(uri) { } }; var Updater = Class.create({ initialize: function(bookId) { this.bookId = bookId; }, run: function() { var book = Ajax.get('http://example.com/books/'+this.bookId+'.json'); var title = book.title; $('title').innerHTML = book.title; } }); Moksi.descri...
Fix something in the the expected invocation example.
Fix something in the the expected invocation example.
JavaScript
mit
Manfred/moksi
0c1dc88e462e55ca7bae7afd085941abe5400ed1
listings/intro/first-project/index.js
listings/intro/first-project/index.js
var CountStream = require('./countstream'); //<co id="callout-intro-countstream-index-1" /> var countStream = new CountStream('book'); //<co id="callout-intro-countstream-index-2" /> var http = require('http'); http.get('http://www.manning.com', function(res) { //<co id="callout-intro-countstream-index-3" /> res.pip...
var CountStream = require('./countstream'); //<co id="callout-intro-countstream-index-1" /> var countStream = new CountStream('book'); //<co id="callout-intro-countstream-index-2" /> var https = require('https'); https.get('https://www.manning.com', function(res) { //<co id="callout-intro-countstream-index-3" /> res...
Update example to use https rather than http. (looks like manning.com switched to https protocol.)
Update example to use https rather than http. (looks like manning.com switched to https protocol.)
JavaScript
mit
alexyoung/nodeinpractice,alexyoung/nodeinpractice,alexyoung/nodeinpractice,alexyoung/nodeinpractice,alexyoung/nodeinpractice,alexyoung/nodeinpractice
19d3b4ee7b416b219903ec2b2f42aedfc665c3b3
server.js
server.js
var http = require('http'); var r = require('request'); var config = require('./config.json'); var doneUrl; var userUrl; http.createServer(function(request, response) { if (!isEvent(request)) return; r.post({ url: doneUrl }, function(error, response, body) { if (error !== null) { ...
var http = require('http'); var r = require('request'); var config = require('./config.json'); var doneUrl; var userUrl; http.createServer(function(request, response) { if (!isEvent(request)) return; r.post({ url: doneUrl }, function(error, response, body) { if (error !== null) { ...
Remove unnecessary parsing of body -- it's already an object.
Remove unnecessary parsing of body -- it's already an object.
JavaScript
mit
RemoteHelper/client-mock-node
8805437d1b1c1e37f29223bbe2ef74920a719fc2
packages/app/source/client/components/appeals-editor/appeal-form.js
packages/app/source/client/components/appeals-editor/appeal-form.js
Space.flux.BlazeComponent.extend(Donations, 'AppealForm', { events() { return [{ 'keyup .appeal.form input': this._onInputChange, 'keyup .appeal.form .description': this._onInputChange, 'click .appeal.form .submit': this._onSubmit }]; }, _onInputChange() {}, _onSubmit() {}, _getVa...
Space.flux.BlazeComponent.extend(Donations, 'AppealForm', { ENTER: 13, events() { return [{ 'keyup .appeal.form input': this._onInputChange, 'keyup .appeal.form .description': this._onInputChange, 'click .appeal.form .submit': this._onSubmit }]; }, _onInputChange() { if (event.k...
Add enter keymap to Appeals editor
Add enter keymap to Appeals editor Note that there’s some fuzzy UI logic that is linking the isEditing state to the submit being clicked.
JavaScript
mit
meteor-space/donations,meteor-space/donations,meteor-space/donations
eb85db3ed1dbd7f30ebc0a67777951c37dfe766e
app/adapters/gist-file.js
app/adapters/gist-file.js
import ApplicationAdapter from './application'; export default ApplicationAdapter.extend({ generateIdForRecord: function(store, type, inputProperties) { return inputProperties.filePath.replace(/\//gi, '.'); } });
import ApplicationAdapter from './application'; export default ApplicationAdapter.extend({ seq: 0, generateIdForRecord: function(store, type, inputProperties) { return inputProperties.filePath.replace(/\//gi, '.') + "." + this.incrementProperty('seq'); } });
Fix issue cannot create two files of the same type
Fix issue cannot create two files of the same type
JavaScript
mit
pangratz/ember-twiddle,pangratz/ember-twiddle,vikram7/ember-twiddle,Gaurav0/ember-twiddle,ember-cli/ember-twiddle,knownasilya/ember-twiddle,knownasilya/ember-twiddle,Gaurav0/ember-twiddle,vikram7/ember-twiddle,knownasilya/ember-twiddle,vikram7/ember-twiddle,pangratz/ember-twiddle,Gaurav0/ember-twiddle,ember-cli/ember-t...
0e149f3fe042b6c2aaed0ff8d97116624f148951
server/game/cards/02.3-ItFC/ChasingTheSun.js
server/game/cards/02.3-ItFC/ChasingTheSun.js
const _ = require('underscore'); const DrawCard = require('../../drawcard.js'); const { Locations, CardTypes, EventNames } = require('../../Constants'); class ChasingTheSun extends DrawCard { setupCardAbilities() { this.action({ title: 'Move the conflict to another eligible province', ...
const _ = require('underscore'); const DrawCard = require('../../drawcard.js'); const { Locations, CardTypes, EventNames } = require('../../Constants'); class ChasingTheSun extends DrawCard { setupCardAbilities() { this.action({ title: 'Move the conflict to another eligible province', ...
Add canBeAttacked condition to Chasing the Sun
Add canBeAttacked condition to Chasing the Sun
JavaScript
mit
gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki
511d83a1612d0c348045bb0511bbd6ecc6cb01a7
jenkins/seedDatabase.js
jenkins/seedDatabase.js
var system = require('system'); var url = encodeURI(system.args[1]); var page = require('webpage').create(); page.open(url, function(status) { console.log("Status: " + status); phantom.exit(); });
var system = require('system'); console.log(system.args[1]); var url = encodeURI(system.args[1]); console.log(url); var page = require('webpage').create(); page.open(url, function(status) { console.log("Status: " + status); phantom.exit(); });
Include debugging in seed database script
Include debugging in seed database script
JavaScript
apache-2.0
ecohealthalliance/infrastructure,ecohealthalliance/infrastructure,ecohealthalliance/infrastructure,ecohealthalliance/infrastructure
3fbbec30b1bfd3f635becb3496481a187f29b7e3
index.ios.js
index.ios.js
/** * @providesModule RNShare * @flow */ 'use strict'; var NativeRNShare = require('react-native').NativeModules.RNShare; var invariant = require('invariant'); /** * High-level docs for the RNShare iOS API can be written here. */ var RNShare = { test: function() { NativeRNShare.test(); }, open: functi...
/** * @providesModule RNShare * @flow */ 'use strict'; var NativeRNShare = require('NativeModules').RNShare; var invariant = require('invariant'); /** * High-level docs for the RNShare iOS API can be written here. */ var RNShare = { test: function() { NativeRNShare.test(); }, open: function(options) {...
Revert "updateRN 0.14.0 new native module Api"
Revert "updateRN 0.14.0 new native module Api"
JavaScript
mit
EstebanFuentealba/react-native-share,EstebanFuentealba/react-native-share,EstebanFuentealba/react-native-share,EstebanFuentealba/react-native-share
5211ee14bd569729d8c5193a1684e495f649f16a
generators/app/templates/task/dev.js
generators/app/templates/task/dev.js
import gulp from 'gulp'; import browserSync from 'browser-sync'; const bs = browserSync.get('dev'); gulp.task('connect:dev', ['styles'], (done) => { bs.init({ notify: false, port: 9000, open: false, server: { baseDir: ['.tmp', 'app'] } }, done); }); gulp.task('watch:dev', ['connect:dev'...
import gulp from 'gulp'; import browserSync from 'browser-sync'; const bs = browserSync.get('dev'); gulp.task('connect:dev', ['styles'], (done) => { bs.init({ notify: false, port: 9000, open: false, server: { baseDir: ['.tmp', 'app'] } }, done); }); gulp.task('watch:dev', ['connect:dev'...
Fix wrong jspm config path
Fix wrong jspm config path
JavaScript
mit
silvenon/generator-wbp,silvenon/generator-wbp
612a144c611549b6ceef9f59e2df0eb246d881d0
concat-svg/concat-svg.js
concat-svg/concat-svg.js
#!/usr/bin/env node var fs = require('fs'); var cheerio = require('cheerio'); var path = require('path'); var cheerioOptions = {xmlMode: true}; var files = process.argv.slice(2); function read(file) { var content = fs.readFileSync(file, 'utf8'); return cheerio.load(content, cheerioOptions); } function transmogr...
#!/usr/bin/env node var fs = require('fs'); var cheerio = require('cheerio'); var path = require('path'); var cheerioOptions = {xmlMode: true}; var files = process.argv.slice(2); function read(file) { var content = fs.readFileSync(file, 'utf8'); return cheerio.load(content, cheerioOptions); } function transmogr...
Remove spacer rectangles and flatten groups in source SVG files
Remove spacer rectangles and flatten groups in source SVG files Saves 30K on the iconsets!
JavaScript
bsd-3-clause
jorgecasar/tools,imrehorvath/tools,Polymer/tools,Polymer/tools,imrehorvath/tools,Polymer/tools,jorgecasar/tools,Polymer/tools
5bcd4d2b709128e9e908812279280d3e4fca5eca
app/app.js
app/app.js
"use strict"; // Declare app level module which depends on views, and components angular.module("myApp", [ "ngRoute", "myApp.view1", "myApp.view2", "myApp.version", "ui.bootstrap" ]). config(["$routeProvider", function($routeProvider) { $routeProvider.otherwise({redirectTo: "/view1"}); }]);
"use strict"; // Declare app level module which depends on views, and components angular.module("myApp", [ "ngRoute", "myApp.view1", "myApp.view2", "myApp.version" ]). config(["$routeProvider", function($routeProvider) { $routeProvider.otherwise({redirectTo: "/view1"}); }]);
Fix integration test by removing bootstrap module
Fix integration test by removing bootstrap module
JavaScript
mit
mikar/cmis-browser,mikar/cmis-browser
d6807bb4f28e0b8bc3cf990ce629edfe186dfa80
js/events.js
js/events.js
function Events() { var listeners = {} $.extend(this, { on: function(type, cb) { if (!$.isArray(listeners[type])) listeners[type] = [] if (listeners[type].indexOf(cb) < 0) listeners[type].push(cb) }, once: function(type, cb) { this.o...
function Events() { var listeners = {} $.extend(this, { on: function(type, cb) { if (!$.isArray(listeners[type])) listeners[type] = [] if (listeners[type].indexOf(cb) < 0) listeners[type].push(cb) }, once: function(type, cb) { this.o...
Make emit able to return an array of values
Make emit able to return an array of values
JavaScript
artistic-2.0
atrodo/fission_engine,atrodo/fission_engine
65eff470cfe7e52ec3c778290dc0c20d046ee23a
src/Disp/buildingTiles/toggleBuildingLock.js
src/Disp/buildingTiles/toggleBuildingLock.js
/** * This function toggle the locked state of a building * @param {number} index Index of the row to change */ export default function toggleBuildingLock(index) { if (l(`productLock${index}`).innerHTML === 'Lock') { Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.lockedMinigames.push( index.t...
/** * This function toggle the locked state of a building * @param {number} index Index of the row to change */ export default function toggleBuildingLock(index) { if (l(`productLock${index}`).innerHTML === 'Lock') { // Add to storing array Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.lockedM...
Fix bug with storing locked buildings
Fix bug with storing locked buildings
JavaScript
mit
Aktanusa/CookieMonster,Aktanusa/CookieMonster
3bb25ff6053f6ea0ce124a7fdfa804f15631ede9
grunt/config/copy.js
grunt/config/copy.js
module.exports = { docs: { files: [ { src: ['css/**/*'], dest: 'docs/public/' }, { src: ['img/**/*'], dest: 'docs/public/' } ] } };
module.exports = { docs: { files: [ { src: ['css/**/*'], dest: 'docs/public/' }, { src: ['img/**/*'], dest: 'docs/public/' }, { src: ['js/**/*'], dest: 'docs/public/' } ] } };
Copy the JS to the docs dir
Copy the JS to the docs dir
JavaScript
agpl-3.0
FiviumAustralia/OpenEyes,FiviumAustralia/OpenEyes,FiviumAustralia/OpenEyes,FiviumAustralia/OpenEyes,FiviumAustralia/OpenEyes
ff4679095d924160e1ee69a1b1051bf846689dac
config/passportConfig.js
config/passportConfig.js
/* * This file contains all of the Passport configuration that will * be used through the application for Facebook authentication. */ var FacebookStrategy = require('passport-facebook').Strategy; var keys = require('./keys'); var model = require('../models/index'); module.exports = function(app, passport) { ap...
/* * This file contains all of the Passport configuration that will * be used through the application for Facebook authentication. */ var FacebookStrategy = require('passport-facebook').Strategy; var keys = require('./keys'); var model = require('../models/index'); module.exports = function(app, passport) { ap...
Add sessions and more robust Facebook auth.
Add sessions and more robust Facebook auth.
JavaScript
mit
kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender
90fb58a96ea37dfe6c9e08e2248b833e60038093
bin/cmd.js
bin/cmd.js
#!/usr/bin/env node var fs = require('fs') var path = require('path') var argv = require('yargs') .alias('s', 'silent') .describe('s', 'print empty string instead of erroring out') .argv var pkg = path.join(process.cwd(), 'package.json') var field = argv._[0] || 'name' fs.readFile(pkg, 'utf8...
#!/usr/bin/env node var fs = require('fs') var path = require('path') var argv = require('yargs') .boolean('s') .alias('s', 'silent') .describe('s', 'print empty string instead of erroring out') .argv var pkg = path.join(process.cwd(), 'package.json') var field = argv._[0] || 'name' ...
Use -s option before or after argument
Use -s option before or after argument
JavaScript
mit
mattdesl/package-field
bc72cb413b3ebc308027ea9fb7191455a6005071
bin/guh.js
bin/guh.js
#!/usr/bin/env node "use strict"; const aliases = { h: "help", "-h": "help", "/h": "help", v: "version", "-v": "version", n: "new", b: "build" }; let command = process.argv[2] || "help"; if (aliases[command]) { command = aliases[command]; } try { require(`./guh-${ command }`); } catch(e) { if (e.code === ...
#!/usr/bin/env node "use strict"; const aliases = { h: "help", "-h": "help", "/h": "help", v: "version", "-v": "version", n: "new", b: "build" }; let command = process.argv[2] || "help"; if (aliases[command]) { command = aliases[command]; } try { require(`./guh-${ command }`); } catch(e) { if (e.code === ...
Add --debug flag to command line to allow easier reporting
Add --debug flag to command line to allow easier reporting
JavaScript
mit
LPGhatguy/guh,LPGhatguy/basis
ce3b4d7c61fde7c4918205df77f7f009c2eb461c
Welcomer/index.js
Welcomer/index.js
/*Tell users to read the rules, with a direct link to the channel, when they join.*/ var info = console.log.bind(console, "[Welcomer]"); var message = [ "Welcome to the server!", "We have rules that we'd like you to follow, so make sure to check out the <#155309620540342272> channel.", "We hope you enjoy ...
/*Tell users to read the rules, with a direct link to the channel, when they join.*/ var info = console.log.bind(console, "[Welcomer]"); var message = [ "Welcome to the server!", "We have rules that we'd like you to follow, so make sure to check out the <#155309620540342272> channel.", "We hope you enjoy ...
Join the welcome message on script init
Join the welcome message on script init
JavaScript
mit
izy521/Sera-PCMR
271c7b629d84c0fbe4fe0003cb49e07c8d8b5cf5
generators/app/templates/gulp-tasks/build/composer.js
generators/app/templates/gulp-tasks/build/composer.js
const childProcess = require('child_process'); const path = require('path'); const setup = require('setup/setup'); function exec(command) { const run = childProcess.exec; return new Promise((resolve, reject) => { run(command, (error, stdout, stderr) => { if (error) { return reject(stderr); ...
const childProcess = require('child_process'); const path = require('path'); const setup = require('setup/setup'); function exec(command) { const run = childProcess.exec; return new Promise((resolve, reject) => { run(command, (error, stdout, stderr) => { if (error) { return reject(stderr); ...
Fix task not complete error
Fix task not complete error
JavaScript
mit
ethancfchen/generator-nodena-api-php
100021f87e4401d94a034f15b917efb6d68b60e9
packages/truffle-debugger/lib/web3/adapter.js
packages/truffle-debugger/lib/web3/adapter.js
import debugModule from "debug"; const debug = debugModule("debugger:web3:adapter"); import Web3 from "web3"; export default class Web3Adapter { constructor(provider) { this.web3 = new Web3(provider); } async getTrace(txHash) { return new Promise((accept, reject) => { this.web3.currentProvider.se...
import debugModule from "debug"; const debug = debugModule("debugger:web3:adapter"); import Web3 from "web3"; import { promisify } from "util"; export default class Web3Adapter { constructor(provider) { this.web3 = new Web3(provider); } async getTrace(txHash) { let result = await promisify(this.web3.cu...
Rewrite getTrace with util.promisify for readability
Rewrite getTrace with util.promisify for readability
JavaScript
mit
ConsenSys/truffle
63dbcbe2fa8a1ca0fb1dbc1e4df928f11e52f45e
js/getData.js
js/getData.js
window.onload = initializeData() var ref = new Firebase("https://cepatsembuh.firebaseio.com"); var no_antri = new Firebase(ref + '/no_antrian'); function initializeData() { var right_now = document.getElementById("right_now"); var date = new Date(); right_now.textContent = date.getFullYear() + '-' + date.getMont...
window.onload = initializeData() var ref = new Firebase("https://cepatsembuh.firebaseio.com"); var no_antri = new Firebase(ref + '/no_antrian'); function initializeData() { var right_now = $('#right_now'); var date = new Date(); right_now.textContent = date.getFullYear() + '-' + date.getMonth() + '-' + date.getD...
Use jQuery to get elements
Use jQuery to get elements
JavaScript
mit
mercysmart/cepatsembuh-iqbal,mercysmart/cepatsembuh-iqbal
43d17915450f11cb928cbba68a7c08f7b1f31c87
src/TimeSelect.js
src/TimeSelect.js
import React from 'react' import PropTypes from 'prop-types' import NativeSelect from '@material-ui/core/NativeSelect' class TimeSelect extends React.Component { render = () => { const topRight = { position: 'absolute', right: '0px', top: '0px' } // Inspired by: https://material-ui.com/components/selects/#...
import React from 'react' import PropTypes from 'prop-types' import NativeSelect from '@material-ui/core/NativeSelect' class TimeSelect extends React.Component { constructor (props) { super(props) this.state = { value: 'now' } } render = () => { const topRight = { position: 'absolute', r...
Switch dropdown value on selections
Switch dropdown value on selections
JavaScript
mit
walles/weatherclock,walles/weatherclock,walles/weatherclock,walles/weatherclock
5f6fec6b2548f2151291bb4d7876939c0271c5d6
karma.conf.js
karma.conf.js
var fs = require('fs') module.exports = function(config) { config.set({ browserify: { debug: true, extensions: ['.ts'], plugin: [['tsify', JSON.parse(fs.readFileSync('./tsconfig.json', 'utf8')).compilerOptions]], transform: ['brfs'], }, browsers: ['Firefox'], concurrency: 1, ...
var fs = require('fs') module.exports = function(config) { config.set({ browserify: { debug: true, extensions: ['.ts'], plugin: [['tsify', JSON.parse(fs.readFileSync('./tsconfig.json', 'utf8')).compilerOptions]], transform: ['brfs'], }, browsers: ['Firefox'], concurrency: 1, ...
Set mime type for ts files explicitly.
Set mime type for ts files explicitly. Set mime type to ensure that Chrome interprets Typescript files correctly when debugging unit tests.
JavaScript
mit
mapillary/mapillary-js,mapillary/mapillary-js
0d306907d1f2de812504af43fbaa360e070d720a
karma.conf.js
karma.conf.js
module.exports = function(config) { config.set({ frameworks: ['mocha', 'chai'], files: ['test/**/*.js', 'xterm-terminal.js'], reporters: ['progress'], port: 9876, // karma web server port colors: true, logLevel: config.LOG_INFO, browsers: ['ChromeHeadless'], autoWatch: false, conc...
module.exports = function(config) { config.set({ frameworks: ['mocha', 'chai'], files: ['test/**/*.js', 'node_modules/xterm/dist/xterm.js', 'xterm-terminal.js'], reporters: ['progress'], port: 9876, // karma web server port colors: true, logLevel: config.LOG_INFO, browsers: ['ChromeHeadle...
Add xterm.js to included files
Add xterm.js to included files
JavaScript
mit
parisk/xterm-terminal,parisk/xterm-terminal
fba020f9b26f4f8f8beefc925f219c5211174ea4
www/last_photo_taken.js
www/last_photo_taken.js
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use ...
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use ...
Update js interface to allow more params
Update js interface to allow more params
JavaScript
apache-2.0
xlongtang/cordova-last-photo-taken,xlongtang/cordova-last-photo-taken
6424996e2bd5f6ba06443c8efc4f3ae13f7b2186
app/js/views/edit_profile_modal.js
app/js/views/edit_profile_modal.js
define(["application"], function(App) { App.EditProfileModalView = Ember.View.extend({ actions: { save: function () { var person = this.get('controller.person') , personData = this.get('controller.personData') , newProperties = personData.getProperties([ 'name', 'ti...
define(["application"], function(App) { App.EditProfileModalView = Ember.View.extend({ actions: { save: function () { var person = this.get('controller.person') , personData = this.get('controller.personData') , newProperties = personData.getProperties([ 'name', 'ti...
Send person data in the request.
Send person data in the request.
JavaScript
mit
mhs/t2-people,mhs/t2-people,mhs/t2-people
908cee1e2d7a13863ff6b4dc0501f56e65eed958
lib/index.js
lib/index.js
/** server The backbone of the server module. In development, this runs proxied through BrowserSync server. @param {Object} options Options passed on to "globals" @param {Function} next Called when server successfully initialized **/ var reorg = require("reorg"); module.exports = reorg(function(options,...
/** server The backbone of the server module. In development, this runs proxied through BrowserSync server. @param {Object} options Options passed on to "globals" @param {Function} next Called when server successfully initialized **/ var reorg = require("reorg"); module.exports = reorg(function(options,...
Enforce strict routing (handled in compiler)
Enforce strict routing (handled in compiler)
JavaScript
apache-2.0
shippjs/shipp-server,shippjs/shipp-server
498ca98b2fad6e15fa2d65cd7fb461861158e839
packages/bottom-tabs/src/views/ResourceSavingScene.js
packages/bottom-tabs/src/views/ResourceSavingScene.js
/* @flow */ import * as React from 'react'; import { Platform, StyleSheet, View } from 'react-native'; import { Screen, screensEnabled } from 'react-native-screens'; type Props = { isVisible: boolean, children: React.Node, style?: any, }; const FAR_FAR_AWAY = 3000; // this should be big enough to move the whol...
/* @flow */ import * as React from 'react'; import { Platform, StyleSheet, View } from 'react-native'; import { Screen, screensEnabled } from 'react-native-screens'; type Props = { isVisible: boolean, children: React.Node, style?: any, }; const FAR_FAR_AWAY = 3000; // this should be big enough to move the whol...
Handle case where screensEnabled isn't available (in Snack)
Handle case where screensEnabled isn't available (in Snack)
JavaScript
bsd-2-clause
react-community/react-navigation,react-community/react-navigation,react-community/react-navigation
400f41f87ae4d06db3d3c4e2b59dee40f4d06d0a
src/apps/support/middleware.js
src/apps/support/middleware.js
const { isEmpty, pickBy } = require('lodash') const logger = require('../../../config/logger') const { createZenDeskMessage, postToZenDesk } = require('./services') async function postFeedback (req, res, next) { const { title, feedbackType, email } = req.body const messages = pickBy({ title: !title && 'Your ...
const { isEmpty, pickBy } = require('lodash') const logger = require('../../../config/logger') const { createZenDeskMessage, postToZenDesk } = require('./services') async function postFeedback (req, res, next) { const { title, feedbackType, email } = req.body const messages = pickBy({ title: !title && 'Your ...
Set email address as optional to show optional label
Set email address as optional to show optional label
JavaScript
mit
uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend
2d7da7b416b460aaa646e6662a622990bda1a07b
src/components/services/ConfigService.js
src/components/services/ConfigService.js
(function() { 'use strict'; angular.module('civic.services') .constant('ConfigService', { serverUrl: 'http://localhost:3000/', mainMenuItems: [ { label: 'Collaborate', state: 'collaborate' }, { label: 'Help', state: 'help' }, ...
(function() { 'use strict'; angular.module('civic.services') .constant('ConfigService', { serverUrl: 'http://localhost:3000/', mainMenuItems: [ { label: 'Collaborate', state: 'collaborate' }, { label: 'Help', state: 'help' }, ...
Replace the Contact page with the FAQ page
Replace the Contact page with the FAQ page
JavaScript
mit
yanyangfeng/civic-client,yanyangfeng/civic-client,genome/civic-client,genome/civic-client
54cb3847e205dff54c4f3490a15e659f81b0bb5a
app/javascript/messages.js
app/javascript/messages.js
/* global angular */ const MESSAGE_TIMEOUTS = {message: 7000, success: 6000, error: 14000}; angular.module('dappChess').controller('MessagesCtrl', function ($scope) { $scope.messages = []; $scope.$on('message', function(event, message, type = message, topic = null) { let id = Math.random(); if(topic) { ...
/* global angular */ const MESSAGE_TIMEOUTS = {message: 7000, success: 6000, error: 14000}; angular.module('dappChess').controller('MessagesCtrl', function ($scope, $timeout) { $scope.messages = []; $scope.$on('message', function(event, message, type = message, topic = null) { let id = Math.random(); if(...
Use $timeout instead of setTimeout for better compatibility
Use $timeout instead of setTimeout for better compatibility
JavaScript
mit
ise-ethereum/on-chain-chess,ise-ethereum/on-chain-chess
b752f54661aa11ea235ed6c092a2b41188685e68
src/beat.js
src/beat.js
(function() { var Beat = function ( dance, freq, threshold, decay, onBeat, offBeat ) { this.dance = dance; this.freq = freq; this.threshold = threshold; this.decay = decay; this.onBeat = onBeat; this.offBeat = offBeat; this.isOn = false; this.currentThreshold = t...
(function() { var Beat = function ( dance, frequency, threshold, decay, onBeat, offBeat ) { this.dance = dance; this.frequency = frequency; this.threshold = threshold; this.decay = decay; this.onBeat = onBeat; this.offBeat = offBeat; this.isOn = false; this.currentThr...
Change Beat's instance property 'freq' to 'frequency' for more natural get/setting
Change Beat's instance property 'freq' to 'frequency' for more natural get/setting
JavaScript
mit
modulexcite/dancer.js,kyroskoh/dancer.js,ngokevin/dancer.js,jsantell/dancer.js,kyroskoh/dancer.js,ngokevin/dancer.js,modulexcite/dancer.js,hoboman313/dancer.js,hoboman313/dancer.js,suryasingh/dancer.js,suryasingh/dancer.js
989bd29938fe860ea862fe914254d1373a6422da
app/mirage/route-handlers/index.js
app/mirage/route-handlers/index.js
import getDailyRiderships from './get-daily-riderships'; import getRoute from './get-route'; import getRoutes from './get-routes'; import getServiceHourRiderships from './get-service-hour-riderships'; import getSystemTrends from './get-system-trends'; export {getDailyRiderships as getDailyRiderships}; export {getServi...
import getDailyRiderships from './get-daily-riderships'; import getHighRidership from './get-high-ridership'; import getRoute from './get-route'; import getRoutes from './get-routes'; import getRouteLabels from './get-route-labels'; import getServiceHourRiderships from './get-service-hour-riderships'; import getSystemT...
Add new Mirage route handlers.
Add new Mirage route handlers.
JavaScript
mit
jga/capmetrics-web,jga/capmetrics-web
ecca67b6eb571673adca35cf952b5e3bcaa01832
gulp/handlebars.js
gulp/handlebars.js
import path from 'path'; import _ from 'lodash'; import minimatch from "minimatch"; let allFiles = {} module.exports.helpers = { equal(lvalue, rvalue, options) { if (arguments.length < 3) throw new Error("Handlebars Helper equal needs 2 parameters"); if( lvalue!=rvalue ) { return options.inverse(this); }...
import path from 'path'; import _ from 'lodash'; import minimatch from "minimatch"; let allFiles = {} module.exports.helpers = { equal(lvalue, rvalue, options) { if (arguments.length < 3) throw new Error("Handlebars Helper equal needs 2 parameters"); if( lvalue!=rvalue ) { return options.inverse(this); }...
Fix context loss for eachFile helper
Fix context loss for eachFile helper
JavaScript
apache-2.0
stellar/developers,stellar/developers
2d61e31acdc66a57107ef4198f9641f0b18b2d13
packages/truffle-core/lib/services/analytics/index.js
packages/truffle-core/lib/services/analytics/index.js
const analytics = { send: function(eventObject) { let analyticsPath; const path = require("path"); if (typeof BUNDLE_ANALYTICS_FILENAME != "undefined") { analyticsPath = path.join(__dirname, BUNDLE_ANALYTICS_FILENAME); } else { analyticsPath = path.join(__dirname, "main.js"); } co...
const analytics = { send: function(eventObject) { let analyticsPath; const path = require("path"); if (typeof BUNDLE_ANALYTICS_FILENAME !== "undefined") { analyticsPath = path.join(__dirname, BUNDLE_ANALYTICS_FILENAME); } else { analyticsPath = path.join(__dirname, "main.js"); } c...
Convert Non-strict to strict equality checking Convert non-strict equality checking, using `==`, to the strict version, using `===`.
Convert Non-strict to strict equality checking Convert non-strict equality checking, using `==`, to the strict version, using `===`.
JavaScript
mit
ConsenSys/truffle
c01901bb1c95c5b96560d53dd4e2cf46b6b95207
simpleshelfmobile/_attachments/code/router.js
simpleshelfmobile/_attachments/code/router.js
"use strict"; /** * Handle all routes. */ define([ "underscore", "backbone", "app" ], function(_, Backbone, app) { // Define the application router. var Router = Backbone.Router.extend({ routes: { "": "index", "login": "login" }, /** * Ind...
"use strict"; /** * Handle all routes. */ define([ "underscore", "backbone", "app" ], function(_, Backbone, app) { // Define the application router. var Router = Backbone.Router.extend({ routes: { "": "index", "login": "login" }, /** * Ind...
Add main route, change screen helper
Add main route, change screen helper
JavaScript
agpl-3.0
tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf
cfaa1420009e4525aa74f7374c04adb0d29721b4
src/v2/components/UI/Layouts/BlankLayout/components/BaseStyles/index.js
src/v2/components/UI/Layouts/BlankLayout/components/BaseStyles/index.js
import { createGlobalStyle } from 'styled-components' export default createGlobalStyle` body { margin: 0; padding: 0; -webkit-font-smoothing: antialiased; font-family: ${props => props.theme.fonts.sans}; background-color: ${props => props.theme.colors.background}; } a { text-decoration: ...
import { createGlobalStyle } from 'styled-components' export default createGlobalStyle` body { margin: 0; padding: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-family: ${props => props.theme.fonts.sans}; background-color: ${props => props.theme.colors.backg...
Add font smoothing for firefox
Add font smoothing for firefox
JavaScript
mit
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
c40a5137dd0236ff6a9ad4ebfda4071381f3fd9a
src/app/services/messaging.js
src/app/services/messaging.js
import socketCluster from 'socketcluster-client'; import socketOptions from '../constants/socketOptions'; let socket; let channel; export function subscribe(subscriber, options) { if (socket) socket.disconnect(); socket = socketCluster.connect({ ...socketOptions, ...options }); socket.emit('login', {...
import socketCluster from 'socketcluster-client'; import socketOptions from '../constants/socketOptions'; let socket; let channel; export function subscribe(subscriber, options = socketOptions) { if (socket) socket.disconnect(); socket = socketCluster.connect(options); socket.emit('login', {}, (err, channelNam...
Use default options from socketcluster when not specified
Use default options from socketcluster when not specified
JavaScript
mit
zalmoxisus/remotedev-app,zalmoxisus/remotedev-app
dbc6e45a1b2c8de616f1d28646c388951125d241
src/defaultPropTypes.js
src/defaultPropTypes.js
import { PropTypes } from 'react'; export default { message: PropTypes.oneOfType([ PropTypes.string, PropTypes.element ]).isRequired, action: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string ]), onClick: PropTypes.func, style: PropTypes.bool, actionStyle: PropTypes.object, barStyl...
import { PropTypes } from 'react'; export default { message: PropTypes.oneOfType([ PropTypes.string, PropTypes.element ]).isRequired, action: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.node ]), onClick: PropTypes.func, style: PropTypes.bool, actionStyle: PropTyp...
Change proptypes for action to allow node
Change proptypes for action to allow node * Changed proptypes for action in order to remove the proptypes warning when passing a node. * Changed action proptype to accept node
JavaScript
mit
pburtchaell/react-notification
92a92cdbf9a25aa4afa6b5d7983ec5d4c9738747
gevents.js
gevents.js
'use strict'; var request = require('request'); var opts = parseOptions(process.argv[2]); request(opts, function (err, res, body) { if (err) throw new Error(err); var format = '[%s]: %s %s %s %s'; for (var i = 0; i < body.length; i++) { /* * TODO return something like this as JSON ...
'use strict'; var request = require('request'); var opts = parseOptions(process.argv[2]); request(opts, function (err, res, body) { if (err) throw new Error(err); var format = '[%s]: %s %s %s'; for (var i = 0; i < body.length; i++) { /* * TODO return something like this as JSON ...
Remove superfluous string from format variable
Remove superfluous string from format variable
JavaScript
mit
jm-janzen/scripts,jm-janzen/scripts,jm-janzen/scripts
fbda3cfcb96e7cb8b5535fcb8985b942b7f0606d
javascript/DependentDynamicListDropdownField.js
javascript/DependentDynamicListDropdownField.js
(function($){ $.entwine('ss', function($){ $('select.dependentdynamiclistdropdown').entwine({ onmatch : function(){ var self = $(this), dependentOn = $('select[name=' + self.data('dependenton') + ']'); if(!dependentOn.length){ return; } if(dependentOn.val()){ self.updateOptions(d...
(function($){ $.entwine('ss', function($){ $('select.dependentdynamiclistdropdown').entwine({ onmatch : function(){ var self = $(this), dependentOn = $('select[name=' + self.data('dependenton') + ']'); if(!dependentOn.length){ return; } if(dependentOn.val()){ self.updateOptions(d...
FIX (field js): correctly refresh chosen fields if dependent field already has value
FIX (field js): correctly refresh chosen fields if dependent field already has value
JavaScript
bsd-3-clause
sheadawson/silverstripe-dynamiclists,sheadawson/silverstripe-dynamiclists
c79d4fee907c01e8a1acb8d33fbac5be67493f9f
app/components/game-nav.js
app/components/game-nav.js
import * as React from 'react' import {Octicon as OcticonClass} from './octicon' import {Link} from 'react-router' let Octicon = React.createFactory(OcticonClass); let GameNavbar = React.createClass({ render() { return React.createElement('ul', {id: 'game-nav', className: 'menu'}, React.createElement('li', {key...
import * as React from 'react' import {State} from 'react-router' import {Octicon as OcticonClass} from './octicon' import {Link as LinkClass} from 'react-router' let Link = React.createFactory(LinkClass); let Octicon = React.createFactory(OcticonClass); let GameNavbar = React.createClass({ mixins: [State], render(...
Use the RouterState mixin in GameNav
Use the RouterState mixin in GameNav
JavaScript
mit
hawkrives/svg-diplomacy,hawkrives/svg-diplomacy,hawkrives/svg-diplomacy,hawkrives/svg-diplomacy
e8d94d83d8f78d5407aca3f3609b68b375ffb667
app/Gruntfile.js
app/Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), babel: { options: { sourceMap: true, presets: ['es2015', 'react'] }, dist: { files: [ { expand: true, cwd: 'ui/js', src: ['*.j...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), babel: { options: { sourceMap: true, presets: ['es2015', 'react'] }, dist: { files: [ { expand: true, cwd: 'ui/js', src: ['*.j...
Update grunt setup to compile JSX properly
Update grunt setup to compile JSX properly
JavaScript
mit
muffinista/before-dawn,muffinista/before-dawn,muffinista/before-dawn
79924bfd5429029b7ab7943bbbd9ac67182bb0e0
src/core/touch.js
src/core/touch.js
/** * Flag indicating if the client supports touch events. * * @returns {Boolean} <em>true</em> if have touch support * @preserve */ sn.hasTouchSupport = (function() { if ( !(global && global.document) ) { return false; } if ( 'createTouch' in global.document ) { // True on the iPhone return true; } try ...
/** * Flag indicating if the client supports touch events. * * @returns {Boolean} <em>true</em> if have touch support * @preserve */ sn.hasTouchSupport = (function() { if ( !(global && global.document) ) { return false; } if ( 'createTouch' in global.document ) { // True on the iPhone return true; } try ...
Add missing tapEventNames and tapCoordinates properties.
Add missing tapEventNames and tapCoordinates properties.
JavaScript
apache-2.0
SolarNetwork/solarnetwork-d3,SolarNetwork/solarnetwork-d3
c4fbfd51a6281efa61bfa0cff69ee9d6f3c152a6
lib/client.js
lib/client.js
var Promise = require('es6-promise').Promise; module.exports = { init: function(url) { createIframe(url) .then(sendHandshake); } }; function createIframe(url) { var iframe = document.createElement('iframe'); iframe.src = url; var iframeLoaded = new Promise(function(resolve, reject) { onIfra...
var Promise = require('es6-promise').Promise; module.exports = { init: function(url) { createIframe(url) .then(sendHandshake) .then(undefined, errorHandler); } }; function createIframe(url) { var iframe = document.createElement('iframe'); iframe.src = url; var iframeLoaded = new Promise...
Add simple error handling during iframe creation.
Add simple error handling during iframe creation.
JavaScript
mit
igoratron/iframe-api
d31252d2335c1f4a66a27e068fc32c87ed2b52e2
app/feed/model.js
app/feed/model.js
import Ember from 'ember'; import DS from 'ember-data'; import _ from 'npm:lodash'; var Feed = DS.Model.extend({ onestop_id: Ember.computed.alias('id'), operators: DS.hasMany('operator', { async: true }), url: DS.attr('string'), feed_format: DS.attr('string'), license_name: DS.attr('string'), license_url: DS.att...
import Ember from 'ember'; import DS from 'ember-data'; import _ from 'npm:lodash'; var Feed = DS.Model.extend({ onestop_id: Ember.computed.alias('id'), operators: DS.hasMany('operator', { async: true }), url: DS.attr('string'), feed_format: DS.attr('string'), license_name: DS.attr('string'), license_url: DS.att...
Add timezone/geometry/tags to new Operators from Feed
Add timezone/geometry/tags to new Operators from Feed
JavaScript
mit
transitland/feed-registry,transitland/feed-registry
7382b2af070e4b3210bd378242483058ce5f98f0
lib/utils.js
lib/utils.js
module.exports.extend = function(constructor, parent) { constructor.prototype = Object.create(parent.prototype); constructor.prototype.constructor = constructor; }; var utils = {}; utils.extend = function(constructor, parent) { constructor.prototype = Object.create(parent.prototype); constructor.prototype.con...
module.exports.extend = function(constructor, parent) { constructor.prototype = Object.create(parent.prototype); constructor.prototype.constructor = constructor; }; var utils = {}; utils.extend = function(constructor, parent) { constructor.prototype = Object.create(parent.prototype); constructor.prototype.con...
Make sure options is an object.
Make sure options is an object.
JavaScript
mit
jnsmalm/jsplay,jnsmalm/jsplay
6631e9734e40a90df936cf0778bbe3c407878f1e
src/fetch/auth.js
src/fetch/auth.js
export function signUp(name, email, password) { return fetch('/api/user', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify({ name, email, password }) }) .then(response => response); } export function authenticate(ema...
export function signUp(name, email, password) { return fetch('/api/users', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify({ name, email, password }) }) .then(response => response); } export function authenticate(em...
Use plurals in API resource URIs
Use plurals in API resource URIs
JavaScript
mit
orouvinen/mytype-frontend,orouvinen/mytype-frontend
9f45ec003be871fc1f79264eb2936638baba76d8
infernoshoutmod.user.js
infernoshoutmod.user.js
// ==UserScript== // @name InfernoShoutMod Dev // @namespace http://rune-server.org/ // @include *.rune-server.org/forum.php // @include *.rune-server.org/infernoshout.php?do=detach // @version 1 // ==/UserScript== var scriptNode = document.createElement("script"); scriptNode.setAttribute("type", "text/...
// ==UserScript== // @name InfernoShoutMod Dev // @namespace http://rune-server.org/ // @include *.rune-server.org/forum.php // @include *.rune-server.org/infernoshout.php?do=detach // @version 1.1 // ==/UserScript== var scriptNode = document.createElement("script"); scriptNode.setAttribute("type", "tex...
Update the loader to use SSL
Update the loader to use SSL Update the loader to use SSL
JavaScript
isc
nikkiii/infernoshoutmod,nikkiii/infernoshoutmod
1ca4cbf376d39c152cb6b2680f777985bd03cea3
input/utils/fieldset.js
input/utils/fieldset.js
'use strict'; var Db = require('../'); module.exports = Db; require('./row'); Db.prototype.set('toDOMFieldset', function (document/*, options*/) { var options = Object(arguments[1]), names, container, rows, body; if (options.names != null) names = options.names; else names = this.getPropertyNames(options.tag); ...
'use strict'; var Db = require('../'); module.exports = Db; require('./row'); Db.prototype.set('toDOMFieldset', function (document/*, options*/) { var options = Object(arguments[1]), names, container, rows, body; if (options.names != null) names = options.names; else names = this.getPropertyNames(options.tag); ...
Support custom options for each field
Support custom options for each field
JavaScript
mit
medikoo/dbjs-dom
2c5954d3964bbab33cb381037604d37db7bf4f6b
gatsby-node.js
gatsby-node.js
const FaviconsWebpackPlugin = require('favicons-webpack-plugin'); module.exports.onCreateWebpackConfig = ({ actions, stage }, { logo, icons = {}, title, background }) => { if (stage === 'develop-html' || stage === 'build-html') { const prefix = __PATH_PREFIX__ ? __PATH_PREFIX__ : ''; actions.setWebpackConfi...
const FaviconsWebpackPlugin = require('favicons-webpack-plugin'); module.exports.onCreateWebpackConfig = ({ actions, stage, getConfig }, { logo, icons = {}, title, background }) => { if (stage === 'develop-html' || stage === 'build-html') { actions.setWebpackConfig({ plugins: [ new FaviconsWebpackP...
Use webpack config to set publicPath
Use webpack config to set publicPath
JavaScript
mit
Creatiwity/gatsby-plugin-favicon
d4bad6943f16db6d651725dd39df7974549cf245
js/injector.js
js/injector.js
///////////////////////////////// // Dropbox injection functions // ///////////////////////////////// Dropbox.appKey = "8oj6dw6o6urk6wn"; function addDropboxScriptTag() { $("head").append('<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="8oj6dw6o6urk6...
///////////////////////////////// // Dropbox injection functions // ///////////////////////////////// Dropbox.appKey = "8oj6dw6o6urk6wn"; function addDropboxScriptTag() { $("head").append('<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="8oj6dw6o6urk6...
Remove temp download link format that doesn't work
Remove temp download link format that doesn't work
JavaScript
mit
Speenah/rit-mycourses-file-downloader
ee7d89a16ccea59a675a7ba1afbf5707a4521f3b
src/kata.js
src/kata.js
const rawPathToEs6KataLink = (path) => { return `http://tddbin.com/#?kata=es6/language/${path}`; }; export default class Kata { static fromRawItem(rawItem) { let kata = new Kata(); kata.initializePropertiesFromRawItem(rawItem); kata.url = rawPathToEs6KataLink(rawItem.path); kata.id = parseInt(ka...
const rawPathToEs6KataLink = (path) => { return `http://tddbin.com/#?kata=es6/language/${path}`; }; export default class Kata { static fromRawItem(rawItem) { let kata = new Kata(); kata.initializePropertiesFromRawItem(rawItem); kata.url = rawPathToEs6KataLink(rawItem.path); kata.id = Number.pars...
Use the ES6 parseInt, which is in the Number namespace now.
Use the ES6 parseInt, which is in the Number namespace now.
JavaScript
mit
tddbin/es6katas.org
694ae32b7f74402bddd4d14e8f2b492776e6c66b
assets/js/profile-index.js
assets/js/profile-index.js
--- --- $(document).ready(function() { 'use strict'; // Navbar // ======================================================= const header = $('.header'); const navbar = $('.navbar-profile'); const range = 64; // Height of navbar $(window).on('scroll', function() { let scrollTop = $(this).scrollTop(); ...
--- --- $(document).ready(function() { 'use strict'; // Navbar // ======================================================= const header = $('.header'); const navbar = $('.navbar-profile'); const range = 64; // Height of navbar $(window).on('scroll', function() { let scrollTop = $(this).scrollTop(); ...
Fix sidenav on full-index page
Fix sidenav on full-index page
JavaScript
mit
grantmakers/profiles,grantmakers/profiles,grantmakers/profiles
503fc48217ebb38e8d69d858a7e51aa953929225
tests/integration/_testHelpers/setupTeardown.js
tests/integration/_testHelpers/setupTeardown.js
let serverless export async function setup(options) { const { servicePath } = options if (RUN_TEST_AGAINST_AWS) { return } // require lazy, AWS tests will execute faster const { default: Serverless } = await import('serverless') const { argv } = process // just areally hacky way to pass options ...
const { node } = require('execa') const { resolve } = require('path') let serverlessProcess const serverlessPath = resolve( __dirname, '../../../node_modules/serverless/bin/serverless', ) export async function setup(options) { const { servicePath } = options if (RUN_TEST_AGAINST_AWS) { return } ser...
Rewrite plugin instantiation for integration tests
Rewrite plugin instantiation for integration tests
JavaScript
mit
dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline
23438dd73bce70df44dde2874113ce8961505acd
src/main.js
src/main.js
import React, { Component } from 'react'; import { Provider } from 'react-redux'; import { Router } from 'react-native-router-flux'; import setup from './store/setup'; import scenes from './scenes'; global.isDebuggingInChrome = __DEV__ && !!window.navigator.userAgent; function bootstrap() { // Setup any services h...
import React, { Component } from 'react'; import { Provider } from 'react-redux'; import { Router } from 'react-native-router-flux'; import setup from './store/setup'; import scenes from './scenes'; global.isDebuggingInChrome = __DEV__ && !!window.navigator.userAgent; function bootstrap() { // Setup any services h...
Use componentDidMount over willMount in boostrap
Use componentDidMount over willMount in boostrap
JavaScript
mit
teamfa/react-native-starter-app,teamfa/react-native-starter-app,teamfa/react-native-starter-app
a57f7e9e4e64740c5207d691c5cfb4d62df9381a
app.js
app.js
require('dotenv').config(); var path = require('path'); var express = require('express'); var passport = require('passport'); var authRouter = require('./routes/auth'); // Create a new Express application. var app = express(); require('./boot/auth')(); // Configure view engine to render EJS templates. app.set('vi...
require('dotenv').config(); var express = require('express'); var passport = require('passport'); var path = require('path'); var cookieParser = require('cookie-parser'); var logger = require('morgan'); var authRouter = require('./routes/auth'); var app = express(); require('./boot/auth')(); // view engine setup a...
Use middleware as generated by express-generator.
Use middleware as generated by express-generator.
JavaScript
unlicense
passport/express-4.x-facebook-example,passport/express-4.x-facebook-example
bf6bf26788ca5b1aa9af01fa647aca883766af0f
server/sessions/sessionsController.js
server/sessions/sessionsController.js
var helpers = require( '../config/helpers' ); var Session = require( './sessions' ); module.exports = { getAllSessions: function( reqw, res, next ) { Session.findAll() .then( function( sessions ) { response.send( sessions ); }) }, addSession: function( req, res, next ) { var sessionName =...
var helpers = require( '../config/helpers' ); var Session = require( './sessions' ); module.exports = { getAllSessions: function( reqw, res, next ) { Session.findAll() .then( function( sessions ) { res.send( sessions ); }) }, addSession: function( req, res, next ) { var sessionName = req....
Refactor to use shorthand req res
Refactor to use shorthand req res
JavaScript
mpl-2.0
RubiginousChanticleer/rubiginouschanticleer,CantillatingZygote/rubiginouschanticleer,CantillatingZygote/rubiginouschanticleer,RubiginousChanticleer/rubiginouschanticleer
f90e02e8e62807d1b22698ec57fcb08281e33834
lib/command/utils.js
lib/command/utils.js
'use strict'; let fileExists = require('../utils').fileExists; let output = require("../output"); let fs = require('fs'); let path = require('path'); let colors = require('colors'); module.exports.getTestRoot = function (currentPath) { let testsPath = path.join(process.cwd(), currentPath || '.'); if (!currentPath...
'use strict'; let fileExists = require('../utils').fileExists; let output = require("../output"); let fs = require('fs'); let path = require('path'); let colors = require('colors'); module.exports.getTestRoot = function (currentPath) { let testsPath = path.resolve(currentPath || '.'); if (!currentPath) { outp...
Fix path resolution on the command line to support absolute paths
Fix path resolution on the command line to support absolute paths Before the change, I could not `codecept run /my/absolute/path`. `path.join` would always stick the current working directory in front. More proper path resolution is also simpler, as `path.resolve` will stick the current working directory if the pat...
JavaScript
mit
Codeception/CodeceptJS,Codeception/CodeceptJS,Codeception/CodeceptJS,Shullaca1/Teste-do-CdB,williammizuta/CodeceptJS,williammizuta/CodeceptJS,Nighthawk14/CodeceptJS,Nighthawk14/CodeceptJS,Shullaca1/Teste-do-CdB,williammizuta/CodeceptJS,Shullaca1/Teste-do-CdB
7e38fce931f119035c611825a4c923a59b5a43f9
lib/flash-message.js
lib/flash-message.js
App.FlashMessage = Ember.Object.extend({ type: 'notice', dismissable: true, message: null, isNotice: function(){ return this.get('type') == 'notice'; }.property('type'), isWarning: function(){ return this.get('type') == 'warning'; }.property('type'), isAlert: function(){ return this.get('...
App.FlashMessage = Ember.Object.extend({ type: 'notice', message: null, dismissable: true, isInfo: Ember.computed.equal('type', 'info'), isAlert: Ember.computed.equal('type', 'alert'), isNotice: Ember.computed.equal('type', 'notice'), isWarning: Ember.computed.equal('type', 'warni...
Use computed properties instead of manually checking equality
Use computed properties instead of manually checking equality
JavaScript
mit
aackerman/ember-flash-queue
3e5afa07ed9d94a1c607c0dff8355c157d6cded1
karma-unit.conf.js
karma-unit.conf.js
module.exports = function(config) { config.set({ basePath: '', files: [ 'vendor/angular/angular.js', 'vendor/angular-animate/angular-animate.js', 'vendor/angular-mocks/angular-mocks.js', 'dist/*.template.js', 'src/**/*.js' ], exclude: [ ], frameworks: ['jasmine'], browsers: ['Chrome'],...
module.exports = function(config) { config.set({ basePath: '', files: [ 'vendor/angular/angular.js', 'vendor/angular-animate/angular-animate.js', 'vendor/angular-mocks/angular-mocks.js', 'vendor/angular-progress-arc/angular-progress-arc.js', 'dist/*.template.js', 'src/**/*.module.js', 'src/*...
Make sure `module` files are loaded first.
chore(karma): Make sure `module` files are loaded first.
JavaScript
mit
sebald/ed,mps-gmbh/ed,sebald/ed,mps-gmbh/ed,mps-gmbh/ed,sebald/ed
db90a78b8cc5fc0f30e2ae88ff58165ea8714d4f
lib/number.js
lib/number.js
'use strict'; function hasTypeNumber(numberToCheck) { return typeof numberToCheck === 'number'; } module.exports = { isNumeric: function isNumeric(numberToCheck) { if(!hasTypeNumber(numberToCheck)) { return false; } return (numberToCheck - parseFloat(numberToCheck) + 1) >...
'use strict'; function hasTypeNumber(numberToCheck) { return typeof numberToCheck === 'number'; } module.exports = { isNumeric: function isNumeric(numberToCheck) { if(!hasTypeNumber(numberToCheck) || isNaN(numberToCheck)) { return false; } return (numberToCheck - parseFlo...
Add additional isNaN check for check methods.
Add additional isNaN check for check methods.
JavaScript
mit
lxanders/belt
8ce1c294cfc87ba18d743cf14801843cc112a0b4
app/actions/item-actions.js
app/actions/item-actions.js
import AppDispatcher from '../dispatchers/app-dispatcher'; import {products} from '../lib/sprintly-client'; let ItemActions = { addItem(productId, data) { let product = products.get(productId); if (!product) { throw new Error('Missing product: %s', productId); } data.product = product.toJSON(...
import AppDispatcher from '../dispatchers/app-dispatcher'; import {products} from '../lib/sprintly-client'; import Promise from 'bluebird'; let ItemActions = { addItem(productId, data) { let product = products.get(productId); if (!product) { throw new Error('Missing product: %s', productId); } ...
Return a promise from a failed item save
Return a promise from a failed item save
JavaScript
isc
jeffreymoya/sprintly-kanban,whitebird08/sprintly-kanban,sprintly/sprintly-kanban,pipermerriam/sprintly-kanban,florapdx/sprintly-kanban,florapdx/sprintly-kanban,sprintly/sprintly-kanban,datachand/sprintly-kanban,whitebird08/sprintly-kanban,datachand/sprintly-kanban,pipermerriam/sprintly-kanban,jeffreymoya/sprintly-kanba...
b53c220b892f41d431487ab4ad7ff3c7ef92de21
src/panels/EmptyDetailPanel.js
src/panels/EmptyDetailPanel.js
/** * Empty panel which is shown when no data object is selected. * @class */ export default class EmptyDetailPanel { constructor(rootElement, rb) { this.rootElement = rootElement; this.rb = rb; } render() { let panel = $('#rbro_detail_panel'); $('#rbro_detail_panel').app...
/** * Empty panel which is shown when no data object is selected. * @class */ export default class EmptyDetailPanel { constructor(rootElement, rb) { this.rootElement = rootElement; this.rb = rb; } render() { let panel = $('#rbro_detail_panel'); $('#rbro_detail_panel').app...
Add missing method for empty panel
Add missing method for empty panel
JavaScript
agpl-3.0
jobsta/reportbro-designer
6946908ae19972853902e2e0aaf01f35b18731b8
src/prefabs/datatype_number.js
src/prefabs/datatype_number.js
var BigNumber = require("bignumber.js"); class ErlNumber { constructor(value) { this.value = new BigNumber(value); } toString() { return this.value.toString(); } static isErlNumber(erlnum) { return erlnum instanceof ErlNumber; } static cloneNumber(erlnum) { ...
var BigNumber = require("bignumber.js"); // Constructor function ErlNumber(value) { this.value = new BigNumber(value); } // Static Methods ErlNumber.isErlNumber = function(erlnum) { return erlnum instanceof ErlNumber; } ErlNumber.cloneNumber = function(erlnum) { return new ErlNumber(erlnum.toString());...
Change format of ErlNumber class
Change format of ErlNumber class
JavaScript
mit
Vereis/jarlang,Vereis/jarlang
96e350cb21377ca65d0c05ae63f37416fa0b0f65
models/student.model.js
models/student.model.js
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const studentSchema = new Schema({ fname: String, lname: String, csub_id: Number, gender: String, created_at: Date, evaluations: [ { wais: { vc: Number, pri: Number, wmi: Number, ps: Number, ...
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const studentSchema = new Schema({ fname: String, lname: String, csub_id: Number, gender: String, created_at: Date, evaluations: { wais: { vc: Number, pri: Number, wmi: Number, ps: Number, fsiq: Number, ...
Use key/val data structure for evaluations
Use key/val data structure for evaluations
JavaScript
mit
corykitchens/gaus,corykitchens/gaus
f3cc961adfdaacfa43b2bc6349a389679f14740e
modules/chaos-monkey.js
modules/chaos-monkey.js
'use strict'; /** * Stubby Chaos Money Demo Module */ var StubbyChaosMonkey = function() { /* min is inclusive, and max is exclusive */ var getRandomArbitrary = function(min, max) { return Math.random() * (max - min) + min; }; var getRandomHTTPStatus = function() { return getRandomArbitrary(100,...
'use strict'; /** * Stubby Chaos Money Demo Module */ var StubbyChaosMonkey = function() { /* min is inclusive, and max is exclusive */ var getRandomArbitrary = function(min, max) { return Math.random() * (max - min) + min; }; var getRandomHTTPStatus = function() { return getRandomArbitrary(100,...
Remove empty event handler in chaos monkey
Remove empty event handler in chaos monkey
JavaScript
mit
gocardless/stubby,gocardless/stubby,gocardless/stubby
046b30842e00b37d8b30c899b7af06b76a7b4434
encryption.js
encryption.js
var crypto = require('crypto'); var iv = new Buffer(""); function createCryptor(key) { key = new Buffer(key); return function encrypt(data) { var cipher = crypto.createCipheriv("bf-ecb", key, iv); try { return Buffer.concat([ cipher.update(data), ciph...
var crypto = require('crypto'); var iv = new Buffer(""); var PADDING_LENGTH = 16; var PADDING = Array(PADDING_LENGTH).join("\0"); function createCryptor(key) { key = new Buffer(key); return function encrypt(data) { var cipher = crypto.createCipheriv("bf-ecb", key, iv); cipher.setAutoPadding(fa...
Fix null padding issues to pass tests
Fix null padding issues to pass tests
JavaScript
mit
dlom/anesidora
364541ae389891a27d7e1b2a87c9e37e25f50bae
src/store/reducers/captures.js
src/store/reducers/captures.js
function faceCaptures(state = [], action) { switch (action.type) { case 'FACE_CAPTURE': return [action.data, ...state] default: return state } } function documentCaptures(state = [], action) { switch (action.type) { case 'DOCUMENT_CAPTURE': return [action.data, ...state] default...
function faceCaptures(state = [], action) { switch (action.type) { case 'FACE_CAPTURE': return [action.payload, ...state] default: return state } } function documentCaptures(state = [], action) { switch (action.type) { case 'DOCUMENT_CAPTURE': return [action.payload, ...state] d...
Rename action data to payload
Rename action data to payload
JavaScript
mit
onfido/onfido-sdk-core