commit
stringlengths
40
40
subject
stringlengths
1
3.25k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
old_contents
stringlengths
0
26.3k
lang
stringclasses
3 values
proba
float64
0
1
diff
stringlengths
0
7.82k
9c5f67fd883f2ce295967dd336fe1f6f3db08580
Remove unused onerror event handlers in PNG test.
tests/png.js
tests/png.js
QUnit.module("png"); QUnit.test("png-image-element format returns an image element", function(assert) { var done = assert.async(); var image = Viz("digraph { a -> b; }", { format: "png-image-element" }); assert.ok(image instanceof Image, "image should be an Image"); image.onload = function() { done(...
JavaScript
0
@@ -324,60 +324,8 @@ %7D%0A - %0A image.onerror = function(e) %7B%0A throw e;%0A %7D%0A %7D);%0A @@ -664,60 +664,8 @@ %7D%0A - %0A image.onerror = function(e) %7B%0A throw e;%0A %7D%0A %7D);%0A @@ -1365,61 +1365,8 @@ %0A %0A - worker.onerror = function(e) %7B%0A throw e;%0A %7D%0A %0A wo
df11fbec1bd290c755d43ddb838757c3b3a64b4d
fix file key bug on win32 system
index.js
index.js
'use strict'; const qiniu = require('qiniu'); const path = require('path'); const ora = require('ora'); const tip = (uploaded, total) => { let percentage = Math.round(uploaded / total * 100); return `Uploading to Qiniu CDN: ${percentage}% ${uploaded}/${total} files uploaded`; }; module.exports = class QiniuPlugi...
JavaScript
0
@@ -1476,16 +1476,22 @@ = path. +posix. join(upl
3f81cfbcd6ddb1b7de78f1f6001236e74885f643
Update app.js
assets/app.js
assets/app.js
App = Ember.Application.create(); //Routers App.Router.map(function() { this.resource('index', {path : '/'} , function() { this.resource('post', { path: '/p/:post_id' }); this.resource('login'); this.resource('about'); }); }); //Location API App.Router.reopen({ location: 'auto' }); //...
JavaScript
0.000002
@@ -266,16 +266,108 @@ tion API +, keep auto for browser history API and none for # URL, hashbang for #! URLs to bettter SEO %0AApp.Rou @@ -379,16 +379,19 @@ eopen(%7B%0A +// locati @@ -401,16 +401,43 @@ 'auto'%0A + location : 'hashbang'%0A %7D);%0A%0A//C
9f59acd7b3d4aa032e3485d04c1ee3be2f181f4f
Revert "Better initialisation of arrays"
script.js
script.js
// Trello Sort Cards by Steps - https://github.com/Q42/TrelloScrum // Organizes cards by steps // // Original: // Hadrien BRUNAUD <https://github.com/sewnboy> /** * Declaration of main variables */ // Lang langSortLabel = 'Trier par étapes'; langSortShortLabel = 'étapes'; // Main mainContainer = '.js-cards-conte...
JavaScript
0
@@ -700,17 +700,16 @@ Boards%0A -_ boardsAr @@ -806,17 +806,16 @@ / Cards%0A -_ cardsArr @@ -5880,20 +5880,10 @@ y = -_boardsArray +%5B%5D ;%0A @@ -5899,19 +5899,55 @@ y = -_cardsArray +%7B%0A todo: %5B%5D,%0A doing: %5B%5D,%0A done: %5B%5D%0A %7D ;%0A
d65770ddc6d73a6f3f209fffa7bac99f18b4e7f0
make mongo connection robust
server.js
server.js
// set up ====================================================================== var express = require('express'); var app = express(); // create our app w/ express var mongoose = require('mongoose'); // mongoose for mongodb var port = process.env.PORT || 8080; // set the port var database = require('./co...
JavaScript
0.000012
@@ -582,16 +582,41 @@ connect( +process.env.MONGO_URL %7C%7C database @@ -708,16 +708,96 @@ ulus.io) +%0Amongoose.connection.on(%22error%22, () =%3E %7B console.log(%22DB connection error%22); %7D); %0A%0Aapp.us
19863e550af7b70368538a1b8404c9e044f280af
Change new variable name
script.js
script.js
// Require filesystem API (used to save data to file later on) const fs = require('fs'); // ipc is used to open and communicate with the data viewer and other additional windows. const ipc = require('electron').ipcRenderer; const user = require('os').userInfo(); // Define some elements. var pg = { team: document.ge...
JavaScript
0.000559
@@ -716,13 +716,11 @@ var -chang +gam e =
952d8bb8e15bc3cd054be49fcfcbc5d6690ab9ed
Add additional check for Q and when
src/spotify-web-api.js
src/spotify-web-api.js
var SpotifyWebApi = (function() { 'use strict'; var _baseUri = 'https://api.spotify.com/v1'; var _accessToken = null; var _promiseProvider = function(promiseFunction, callback) { if (window.Promise) { return new Promise(promiseFunction); } else { var other = window.Q || window.when; ...
JavaScript
0
@@ -225,16 +225,23 @@ urn new +window. Promise( @@ -293,16 +293,17 @@ other = +( window.Q @@ -307,22 +307,113 @@ w.Q -%7C%7C window.when +&& window.Q.defer ? window.Q : false) %7C%7C%0A (window.when && window.when.defer ? window.when : false) ;%0A @@ -425,16 +425,26 @@ f (other + !== false ) %7B%0A ...
9e0076060def78e7affebdccf457083d65c1bdaa
fix tiny typo 👻
index.js
index.js
var menubar = require('menubar') var ipc = require('electron').ipcMain var globalShortcut = require('global-shortcut') var mb = menubar({ dir: __dirname + '/app', width: 440, height: 230, icon: __dirname + '/app/Icon-Template.png', preloadWindow: true, 'window-position': 'topRight' }) var Menu = require('menu') mb.on(...
JavaScript
0.999881
@@ -1669,17 +1669,17 @@ 'Prefer -a +e nce',%0A
6d731e3ceb995a9177e9c2f202e99b04220b560c
implement sub-60fps frame rate for native rAF
index.js
index.js
var request, cancel, root; var syncDelay = 8; var isNative = true; function ctxDelayWrapper(func) { return function (fn, _ctx, _delay) { if (typeof _ctx === 'number' && typeof _delay === 'undefined') { var delay = _ctx; var ctx = void 0; } return func(fn, ctx, delay...
JavaScript
0.000001
@@ -1522,17 +1522,276 @@ delay);%0A -%7D + return syncDelay;%0A%7D%0A%0Avar later = ctxDelayWrapper(function _later(fn, ctx, _delay) %7B%0A return delay(iteratee(fn, ctx), _delay);%0A%7D);%0A%0Avar latered = ctxDelayWrapper(function _latered(fn, ctx, _delay) %7B%0A return iterateeFake(iteratee(fn, ctx), _dela...
29fd47320adc0693d331dd1c69eeba26e89de36c
Remove some no-longer-relevant tests
index.js
index.js
// !! This module implements the state object of a ProseMirror editor. const {Mark} = require("../model") const {Mapping} = require("../transform") const {Selection, TextSelection, NodeSelection} = require("./selection") exports.Selection = Selection; exports.TextSelection = TextSelection; exports.NodeSelection = Nod...
JavaScript
0.000327
@@ -5543,8 +5543,50 @@ teClass%0A +%0Aexports.EditorState = makeStateClass(%5B%5D)%0A
529a67f7c8c7243935a686536ba4a254ecf5dbf3
Remove versionGuard error if versions are same. Not the best fix, but it will have to do for now.
index.js
index.js
'use strict'; var bitcore = module.exports; // module information bitcore.version = 'v' + require('./package.json').version; bitcore.versionGuard = function(version) { if (version !== undefined) { var message = 'More than one instance of bitcore found with versions: ' + bitcore.version + ' and ' + version...
JavaScript
0
@@ -190,16 +190,47 @@ ndefined + && version !== bitcore.version ) %7B%0A
ba4b02264cbfd18aa8e4d0f20f3907d9ae9e6316
test process id
script.js
script.js
'use strict'; const _ = require('lodash'); const Script = require('smooch-bot').Script; var pg = require('pg'); var Q = require("q"); var request = require("request"); var nlp = require("./nlp"); var newBot = require("./newBot"); var push = require("./push"); var logConv = require("./log").logConversation; //var findS...
JavaScript
0.000002
@@ -1006,16 +1006,67 @@ essage); +%0A console.log(%22processID%22, process.pid); %0A%0A
7feaaf6413adacf2e8d501c18ee01feaa49ea239
add `prev` check to `incrementName()`
index.js
index.js
'use strict'; const fs = require('fs'); const path = require('path'); /** * Asynchronously writes data to a file, replacing the file if it already * exists and creating any intermediate directories if they don't already * exist. Data can be a string or a buffer. Returns a promise if a callback * function is not p...
JavaScript
0
@@ -4769,16 +4769,28 @@ e.name;%0A + let prev;%0A let n @@ -4804,16 +4804,38 @@ while ( +prev !== file.path && fs.exist @@ -4850,24 +4850,46 @@ le.path)) %7B%0A + prev = file.path;%0A file.pat
ba317bb00b868dfabdffcd96934fd53588b67f50
Use prefered method of locating actual app instance
index.js
index.js
/* eslint-env node */ 'use strict'; module.exports = { name: 'ember-chrome-devtools', included(parent) { this.isProductionBuild = parent.env === 'production'; }, treeFor(name) { if (this.isProductionBuild) { return; } return this._super.treeFor.apply(this, arguments); }, };
JavaScript
0
@@ -89,31 +89,115 @@ %0A%0A +f in -cluded(parent +dHost() %7B%0A // %60ember-cli%60 %3E= 2.7.0 has _findHost%0A if (typeof this._findHost === 'function' ) %7B%0A this @@ -196,102 +196,309 @@ + -this.isProductionBuild = parent.env === 'production';%0A %7D,%0A%0A treeFor(name) %7B%0A if (this....
76748bc5f9b3c8b04745dd6a22ef563da15b158a
remove video test
test/unit/services/servicesSpec.js
test/unit/services/servicesSpec.js
// // test/unit/services/servicesSpec.js // // // var sinon = require('sinon'); beforeEach(function() { config.unitToSatoshi = 100; config.unitName = 'bits'; }); describe('Check config', function() { it('unit should be set to BITS in config.js', function() { expect(config.unitToSatoshi).to.equal(100); ...
JavaScript
0.000001
@@ -4046,208 +4046,8 @@ %7D);%0A -describe(%22Unit: video service%22, function() %7B%0A beforeEach(angular.mock.module('copayApp.services'));%0A it('should contain a video service', inject(function(video) %7B%0A should.exist(video);%0A %7D));%0A%7D); %0Ades
aa8b4c079825910829efc6bdd705626f7b0a8f4f
Update Checking and Checkbox Behavior
script.js
script.js
function addToList() { if(textbox.value != ''){ var list = document.getElementById('list'); item = document.createElement('li'); item.innerHTML = '<input type= "checkbox" onClick = "removeFromList()"/>'+textbox.value; list.appendChild(item); document.getElementById("textbox").value= ""; } } function remove...
JavaScript
0
@@ -370,19 +370,537 @@ 'list'), -%0A%09%09 + items = Array.prototype.slice.call(list.childNodes), item;%0A%09while (item = items.pop()) %7B%0A%09%09if (item.firstChild && item.firstChild.checked) %7B%0A%09%09%09var text = list.firstChild.innerText;%0A%09%09%09var completedList = document.getElementById('completed');%0...
8ebffb3189e9c36fcb777e0038f47b15fdde4100
update to the latest umeboshi-cli entrypoint format
index.js
index.js
module.exports = () => { return {}; };
JavaScript
0
@@ -18,16 +18,176 @@ () =%3E %7B%0A + console.error('This entrypoint format is deprecated. Please upgrade umeboshi-cli.');%0A console.error();%0A console.error('npm install -g umeboshi-cli');%0A retu
4e7f33a3380a1906f1bb3aaec6d7111fd3980a4c
Update instructions verbiage
script.js
script.js
function playTone (note, octave) { tones.play(note, octave); } function playOne (element, delay, i) { function play () { element.className = element.className + " auto-playing"; element.onmouseover(); setTimeout(function () { element.className = element.className.replace(" auto-playing", ""); ...
JavaScript
0
@@ -4740,29 +4740,24 @@ obile%22%3ETippe -n Sie mit zwei Fi @@ -4793,12 +4793,9 @@ die -Tonw +W iede @@ -4814,33 +4814,34 @@ rten -. Tippen Sie mit drei, um +, mit drei Fingern, um sie zu
3403625a7b1c190539af3dafb4cad79054f3f8c1
update twix path, https://github.com/icambron/twix.js/commit/bab82df73a4590e0b6b6b021d82bcfa7ac6b87ff
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'emberui', included: function(app) { this._super.included(app); app.import(app.bowerDirectory + '/moment/moment.js'); app.import(app.bowerDirectory + '/twix/bin/twix.js'); } };
JavaScript
0.000001
@@ -236,11 +236,12 @@ wix/ -bin +dist /twi
e5dbf6d303520d7373fe224104d825783cef6652
add more expect blocks to test hasVowel function
spec/string_spec.js
spec/string_spec.js
describe('hasVowels()', function() { it('should always return a boolean', function() { expect('example string'.hasVowels()).toEqual(jasmine.any(Boolean)); }); it('should return true if string has vowels', function() { expect('oreofe'.hasVowels()).toBe(true); }); it('should return f...
JavaScript
0
@@ -277,24 +277,75 @@ toBe(true);%0A + expect(('AnDeLa').hasVowels()).toBe(true);%0A %7D);%0A%0A @@ -451,23 +451,81 @@ oBe(false);%0A + expect(('twyndyllyngs').hasVowels()).toBe(false);%0A %7D);%0A%7D);
40479a9006c0b989458d38a3eff70f8fe7031967
fix index for `npm run build`
index.js
index.js
var path = require('path'); module.exports = function(robot) { robot.load(path.join(__dirname, '/src/scripts/')); };
JavaScript
0
@@ -97,11 +97,11 @@ , '/ -src +lib /scr
3a97926aa5e3f24906216a2d3ac735d122b01293
fix the spec requiring removed prfun
spec/support/es6.js
spec/support/es6.js
require('6to5/register') require('prfun') global.expect = require('chai').expect console.log('ES6 Mode Activated!')
JavaScript
0.000002
@@ -22,25 +22,8 @@ r')%0A -require('prfun')%0A glob
4b78cc2dd2c759c523e0c3f0943e4c43d064c12d
use font awesome pro's fonts if present in the parent's deps
index.js
index.js
/* jshint node: true */ 'use strict'; const mergeTrees = require('broccoli-merge-trees'); const Funnel = require('broccoli-funnel'); const { name, version } = require('./package'); module.exports = { name, version, isDevelopingAddon: function () { return true; }, _registerLessDependencies(app) { l...
JavaScript
0
@@ -641,24 +641,127 @@ (this, app); +%0A this.hasFontAwesomePro = Object.keys(app.dependencies()).includes('@fortawesome/fontawesome-pro'); %0A%0A this._ @@ -1084,63 +1084,159 @@ -this.import('node_modules/@fortawesome/fontawesome-free +const faPackage = this.hasFontAwesomePro ? '@fortawesome/fontawesome-...
3eb6ce91e21f964057238a7bb4844c30dca372c2
Delete a duplicate view
packages/lesswrong/lib/modules/alignment-forum/users/views.js
packages/lesswrong/lib/modules/alignment-forum/users/views.js
import Users from "meteor/vulcan:users"; import { ensureIndex } from '../../../collectionUtils'; Users.addView('LWSunshinesList', function(terms) { return { selector: {groups:'sunshineRegiment'}, options: { sort: terms.sort } } }); Users.addView("alignmentSuggestedUsers", function () { return...
JavaScript
0.000001
@@ -95,166 +95,8 @@ ';%0A%0A -Users.addView('LWSunshinesList', function(terms) %7B%0A return %7B%0A selector: %7Bgroups:'sunshineRegiment'%7D,%0A options: %7B%0A sort: terms.sort%0A %7D%0A %7D%0A%7D);%0A%0A %0AUse
96ea7aea5a8f8ad2b81466f29c1cf20a40b0a295
use C-Scale frequency
script.js
script.js
var frequencies = [800, 750, 700, 650, 600, 550, 500, 450, 400, 350, 300], duration = 2000, steps = 10, step = duration/steps, timings = d3.range(step, duration, step); var matrix = timings.map(function(t, t_i){ return frequencies.map(function(f, f_i){ return { t: t, ...
JavaScript
0
@@ -17,60 +17,58 @@ = %5B8 -0 +8 0, 7 -50, 700, 650, 600, 550, 500, 450, 400, 350, 300 +83.99, 698.46, 659.26, 587.33, 523.25, 493.88 %5D,%0A%0A
05781b7b3d5bdb3b523e7e59e2e5b21c51d5b13f
add static
timestamp.js
timestamp.js
//pass a string as a parameter , and it will check to see whether that string contains either a unix timestamp or a natural language date (example: January 1, 2016) //If it does, it returns both the Unix timestamp and the natural language form of that date //If it does not contain a date or Unix timestamp, it returns n...
JavaScript
0.000152
@@ -466,24 +466,73 @@ , 'jade');%0A%0A +app.use(express.static(__dirname + '/public'));%0A%0A app.get('/',
f7032956db4aaccf57a0edb106ba101c6ae3005e
Write debug messages as JSON
server.js
server.js
/* The MIT License (MIT) Copyright ( c ) 2014 Teem2 LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, ...
JavaScript
0.999987
@@ -4792,22 +4792,38 @@ 'data', +JSON.stringify( state) +) ;%0A %7D%0A
70c257aa170d6320d0b8dcf29924fded15ad53c1
change iframe size while not shown
src/foam/nanos/fs/fileDropZone/FilePreview.js
src/foam/nanos/fs/fileDropZone/FilePreview.js
/** * @license * Copyright 2020 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.nanos.fs.fileDropZone', name: 'FilePreview', extends: 'foam.u2.View', documentation: 'iframe for file preview', properties: [ { name: 'selected' ...
JavaScript
0
@@ -848,24 +848,37 @@ .end()%0A + .end()%0A .sta @@ -890,18 +890,16 @@ frame')%0A - @@ -927,34 +927,32 @@ ame' + this.id)%0A - .style @@ -966,18 +966,16 @@ - 'visibil @@ -1002,18 +1002,16 @@ - 'height' @@ -1009,33 +1009,30 @@ 'height': ' -100%25...
4ff494106df83f29af3c56b90848a41db0077f4c
fix https resource
script.js
script.js
function display30Items(itemsArray) { var templateEl = document.querySelectorAll('template')[0]; var template = templateEl.innerHTML; Mustache.parse(template); var renderedArticles = ''; var items = itemsArray.slice(0, 30); for (var index = 0; index < items.length; index++) { var article = items[inde...
JavaScript
0.000002
@@ -962,16 +962,17 @@ = 'http +s ://node-
3872b336f93be07b3aba69e416a3379a762aa3eb
Update index.js to return go stdout.
index.js
index.js
// https://gist.github.com/miksago/d1c456d4e235e025791d var child_process = require('child_process'); exports.handler = function(event, context) { var proc = spawn('./ask_nest', [ JSON.stringify(event) ], { stdio: 'inherit' }); proc.on('close', function(code){ if(code !== 0) { return context.done(new E...
JavaScript
0.000542
@@ -155,16 +155,30 @@ proc = +child_process. spawn('. @@ -218,29 +218,88 @@ t) %5D -, %7B stdio: 'inherit' +);%0A%0A%09var stdout = '';%0A%09proc.stdout.on('data', function(buf) %7B%0A%09%09stdout += buf;%0A%09 %7D);%0A @@ -460,17 +460,34 @@ ext. -done(null +succeed(JSON.parse(stdout) );%0A
6004a2afcd84f3584c782b4542b41d8820204330
add new comments
server.js
server.js
/*** SERVER ***/ var express = require('express'), app = express(), http = require('http').Server(app), io = require('socket.io')(http), bodyParser = require('body-parser'), hbs = require('hbs'), mongoose = require('mongoose'), cookieParser = require('cookie-parser'), session = require(...
JavaScript
0
@@ -4712,24 +4712,67 @@ user in');%0A%0A + // set new player to the room base on id%0A socket.on( @@ -4951,16 +4951,62 @@ %0A %7D);%0A%0A + // broadcast every movements to other player %0A socke
bad6c54f586d1faffbe8e83e0417117da4a69453
add port to startup console output
server.js
server.js
#!/usr/bin/env node "use strict"; var http = require('http'), send = require('send'), url = require('url'); var app = http.createServer(function (req, res) { console.log('Request: %s', req.url); function error(err) { res.statusCode = err.status || 500; res.end(err.message); } function ...
JavaScript
0.000001
@@ -624,12 +624,84 @@ ten(3333 +, function() %7B%0A console.log('Simple-Static Listening on port 3333');%0A%7D );%0A%0A
4a9244dec013fae729f23574d9f97cde783cb8eb
Make sure 'end' is dispatched only once
index.js
index.js
var stream = require('stream') function BufferStream(source, encoding, options) { stream.Duplex.call(this, options) this.__buffer = typeof source === 'string' || source instanceof Buffer ? new Buffer(source, encoding) : new Buffer(0) this.__cursor = 0 } BufferStream.prototype = new stream.Duplex() BufferS...
JavaScript
0.000002
@@ -412,84 +412,50 @@ %7B%0A -var chunk = this.__buffer.slice(this.__cursor, size)%0A%0A if (chunk +if (this.__cursor === this.__buffer .length - %3E 0 ) %7B%0A @@ -467,110 +467,125 @@ his. -__cursor += chunk.length%0A%0A this.push(chunk)%0A %7D%0A%0A if (this.__cursor === this.__buffer +push(null)%0A%0A ...
af27d5058dfbe4de742d5ec1b8258e3877c4d731
Call sequelize.sync() before starting server.
server.js
server.js
var express = require('express'); var childProcess = require('child_process'); var middleware = require('./config/initializers/middleware.js'); var router = require('./config/routes.js'); var host = process.env.HOST; var port = process.env.PORT || 4000; var app = express(); middleware.configure(app); router.route(app)...
JavaScript
0
@@ -267,16 +267,79 @@ press(); +%0Avar sequelize = require('./config/initializers/sequelize.js'); %0A%0Amiddle @@ -379,16 +379,56 @@ (app);%0A%0A +%0Asequelize.sync().success(function()%7B%0A host ? a @@ -470,16 +470,18 @@ port);%0A%0A + var inco @@ -555,16 +555,19 @@ .js%22%5D);%0A +%0A incoming @@ -616,...
0bce3e1caf9f358b1b16e0ec217510666d67684e
Fix issue with readline history
index.js
index.js
/** * `autocomplete` type prompt */ var util = require('util'); var chalk = require('chalk'); var figures = require('figures'); var Base = require('inquirer/lib/prompts/base'); var Choices = require('inquirer/lib/objects/choices'); var observe = require('inquirer/lib/utils/events'); var utils = require('inquirer/lib...
JavaScript
0.000003
@@ -1012,16 +1012,89 @@ = cb;%0A%0A + if (self.rl.history instanceof Array) %7B%0A self.rl.history = %5B%5D;%0A %7D%0A%0A var ev
92120437b1dd063d71231a0d831c0350c4fc3049
add missing flow type
src/Server.js
src/Server.js
'use strict' // @flow const Client = require('./Client') const EventEmitter = require('events') const WebSocket = require('ws') const WebSocketServer = require('ws').Server const uid = require('uid-safe') const { CLOSE_FORBIDDEN } = require('./constants') const { assign, attempt, fromCallback, toEmit } = require('./ut...
JavaScript
0.000384
@@ -3691,16 +3691,24 @@ se (code +: number = 1000)
cf08e21946cc80362272ced8baf7a68df9495679
Add toLower() function to pass return type test
src/String.js
src/String.js
/** * Has Vowels * * hasVowel tests if the String calling the function has a vowels * * @param {void} * @return {Boolean} returns true or false indicating if the string * has a vowel or not */ String.prototype.hasVowels = function() { var inputString = this; return /[aeiou]/gi.test(inputString); }; /...
JavaScript
0.000003
@@ -747,12 +747,71 @@ ;%0A %7D);%0A%7D; +%0A%0AString.prototype.toLower = function() %7B%0A return %22%22;%0A%7D;
9069268cfb9d0552cb97205c7e84392b931b7430
Use variable instead of static 3000 port
server.js
server.js
var theme = require('./lib/theme'); var express = require('express'); var bodyParser = require('body-parser'); var cors = require('cors'); var app = express(); var minify = require('express-minify'); var compress = require('compression'); app.disable('x-powered-by'); app.use(compress()); app.use(minify( { cache: __d...
JavaScript
0.000001
@@ -231,16 +231,33 @@ ssion'); +%0Avar port = 3000; %0A%0Aapp.di @@ -691,20 +691,20 @@ .listen( -3000 +port );%0A%0Acons @@ -795,17 +795,25 @@ calhost: -3000 +' + port + ' /');%0A
edf48e1a958c1e3ed62697b97234b106bee4bf56
Disable CSP for testing
server.js
server.js
//Initialize the Express library, used to create a web server var express = require("express"); var app = express(); //Enable compression var compression = require("compression"); app.use(compression()); // Set up mailgun to send email. body-parser is required for the json format. var mailgun = require('mailgun-js') ...
JavaScript
0
@@ -828,39 +828,8 @@ re.%0A -var helmet = require('helmet'); %0Avar @@ -890,1724 +890,40 @@ );%0A%0A -app.use(helmet());%0Aapp.use(helmet.contentSecurityPolicy(%7B%0A directives: %7B%0A baseUri: %5B%0A %22'self'%22,%0A %5D,%0A blockAllMixedContent: true,%0A childSrc: %5B%0A %22'self'%22,%0A ...
d4ab8964efe561fffbbe71237ad07799c1478a16
Update castArgument to simplify conditional logic
index.js
index.js
'use strict'; const postcss = require('postcss'); const helpers = require('./lib/helpers'); module.exports = postcss.plugin('postcss-js-mixins', (options = {}) => { let mixins = options.mixins || {}, mixinArguments = {}; if (options.units) { helpers.setDefaultUnits(options.units); } function isNumber(value)...
JavaScript
0
@@ -738,46 +738,10 @@ %0A%09%09%7D - else if (typeof arg === 'string') %7B%0A%09 +%0A%0A %09%09if @@ -782,17 +782,16 @@ ') %7B%0A%09%09%09 -%09 return a @@ -807,21 +807,19 @@ rue';%0A%09%09 -%09 %7D%0A%0A -%09 %09%09return @@ -853,27 +853,8 @@ ed;%0A -%09%09%7D%0A%0A%09%09return arg;%0A %09%7D%0A%0A
9082b7967f3ad7cef62fae4b36e7281d47294c4f
Remove invalid jsdoc
script.js
script.js
/** * @fileoverview script.js - JS Orrery - A CS323 Assignment * @author Ben Brooks (beb12@aber.ac.uk) * @version 1.0 * @uses gl-matrix.js - Brandon Jones & Colin MacKenzie IV */ var gl; function init() { canvas = document.getElementById('canvas'); gl = initWebGL(canvas); initScene(); } window.onload = in...
JavaScript
0.00001
@@ -118,67 +118,8 @@ 1.0%0A - * @uses gl-matrix.js - Brandon Jones & Colin MacKenzie IV%0A */%0A
893dcc87f584d21b585710b68b9b1168f1612463
update server configurations
server.js
server.js
var express = require('express'); var app = require('./app/config/express'); var port = process.env.PORT || 5555; app.listen(port, function(){ console.log("listening on port "+ port); }); module.exports = app;
JavaScript
0.000001
@@ -1,38 +1,4 @@ -var express = require('express');%0A var @@ -18,12 +18,8 @@ ('./ -app/ conf @@ -150,10 +150,38 @@ %7D);%0A - +%0A// expose the server to app%0A modu
44d65e904a21254aa251ec52ed79714c82246164
Fix setting value of `node.content` to be an array
index.js
index.js
/* global Promise */ var postcss = require('postcss'); function indentResolve(str, options) { if (str.match(/\n(?!\n)\s*/g) === null) { return str; } if (options.length === undefined) { options.lastLine = str.substr(str.lastIndexOf('\n') + 1); var newStr = str.substr(0, str.lastInd...
JavaScript
0
@@ -1607,16 +1607,17 @@ ntent = +%5B indentRe @@ -1633,32 +1633,33 @@ ult.css, indent) +%5D ;%0A
91020855fc8cce6e11bee8d2722137a261cff5ee
Add basic middleware for parsing and serving static files
server.js
server.js
var express = require('express'); var app = express(); require('./server/utils/middleware.js')(app, express); require('./server/routes')(app, express); module.exports = app;
JavaScript
0
@@ -72,14 +72,8 @@ ver/ -utils/ midd @@ -123,16 +123,19 @@ r/routes +.js ')(app,
5f725e43b948f33fa0d97bdfa97dcf5892ab9326
Fix docker stop timeout on fleet
server.js
server.js
/* jshint node: true, browser: false */ 'use strict'; // CREATE HTTP SERVER AND PROXY var app = require('express')(); var proxy = require('http-proxy').createProxyServer({}); proxy.on('error', function(e) { console.error(e); }); //ignore errors // LOAD CONFIGURATION var oneDay = 86400000; var cacheTag ...
JavaScript
0.000002
@@ -29,16 +29,30 @@ r: false +, esnext: true */%0A'use @@ -1085,12 +1085,56 @@ ess());%0A%7D);%0A +%0Aprocess.on('SIGTERM', ()=%3Eprocess.exit());%0A
c102ecc77c30a66ed0bb949547446848f7aafa89
replace Array.from to new Array
index.js
index.js
'use strict'; var InvalidMonthError = require('./src/errors/InvalidMonthError'); var InvalidMonthsError = require('./src/errors/InvalidMonthsError'); var InvalidMonthsAbbrError = require('./src/errors/InvalidMonthsAbbrError'); var MONTHS = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July'...
JavaScript
0.002168
@@ -615,16 +615,86 @@ %7D);%0A%7D%0A%0A +function createArray(length) %7B%0A return new Array(length).fill(1);%0A%7D%0A%0A module.e @@ -2703,37 +2703,28 @@ %0A%0A -Array.from(%7B length: +createArray( totalWee @@ -2725,18 +2725,16 @@ talWeeks - %7D ).forEac @@ -2768,29 +2768,20 @@ -Array.from(%7B l...
48266d7dfe7294b06933b10d5d8ab951b120d166
allow `insert` to be bypassed
index.js
index.js
/*! * template-toc <https://github.com/jonschlinkert/template-toc> * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. */ 'use strict'; var extend = require('extend-shallow'); var toc = require('markdown-toc'); module.exports = function (app) { return function (view, next) { if (view...
JavaScript
0.000005
@@ -486,16 +486,27 @@ r opts = + extend(%7B%7D, app.opt @@ -519,51 +519,25 @@ oc') - %7C%7C %7B%7D;%0A var fn = filter(opts.ignore +, view.options );%0A -%0A @@ -581,16 +581,17 @@ template +? %0A if @@ -591,27 +591,19 @@ if ( -view.option +opt s.toc == @@ -637,24 +637,81 @@ t();%0A %7D%0A%...
97fd64a975615a8fa666f13dadcb93b474319cda
disable app cache
server.js
server.js
'use strict'; /* var cl = console.log; console.log = function(){ console.trace(); cl.apply(console,arguments); }; */ // Requires meanio . var mean = require('meanio'); var cluster = require('cluster'); // Code to run if we're in the master process or if we are not in debug mode/ running tests if ((cluster.isMa...
JavaScript
0.000001
@@ -1284,24 +1284,55 @@ ion (app) %7B%0A + app.app.disable('etag');%0A var co
313d5f6a8970a6f5f22b8d594e9b8f3239c44849
Implement error handler returning status or 500
server.js
server.js
// import necessary packages // path fs and express // create app // instantiate var app equal to express() // define view engine // app.set view engine to html // app.engine(html function(path options callbacks)) // fs. readfile(path standard utf 8 encoding and callback to be used on contents of file) // middle wa...
JavaScript
0.000001
@@ -1335,12 +1335,107 @@ tml'));%0A%7D);%0A +%0A// error handler%0Aapp.use(function(err, req, res, next)%7B%0A%09res.status(err.status %7C%7C 500);%0A%7D);%0A%0A%0A
f9ad1b6a58f0066cb8e329cfc07f29644cf7df4e
add doPromise
index.js
index.js
/** @module */ "use strict" const ctrl = require("./lib/ctrl") const Monad = require("./lib/monad") const { Maybe, Just, Nothing } = require("./lib/maybe") const { Either, Left, Right } = require("./lib/either") const NodeContinuation = require("./lib/node-continuation") const PromiseMonad = require("./lib/promise") c...
JavaScript
0.000101
@@ -1914,16 +1914,131 @@ %0A %7D%0A%7D%0A%0A +function doPromise(gen, data=%7B%7D) %7B%0A return Promise((resolve, reject) =%3E %7B%0A do_(gen, resolve, %5B%5D, data)%0A %7D)%0A%7D%0A%0A %0Amodule. @@ -2060,16 +2060,29 @@ o: do_,%0A + doPromise,%0A Maybe,
8c2e49bea4f33732faf2118a8628b5fcecdcba0f
Call callback in error case, too
index.js
index.js
var reqwest = require('reqwest'), qs = require('qs'), through = require('through'); var osmStream = (function osmMinutely() { var s = {}; // presets var baseUrl = 'https://overpass-api.de/', minuteStatePath = 'api/augmented_diff_status', changePath = 'api/augmented_diff?'; fun...
JavaScript
0
@@ -1052,24 +1052,100 @@ null, res);%0A + %7D,%0A error: function (err) %7B%0A cb(err);%0A
329e1910b3b9dbfb6e52464358370ecfcd187d1f
allow env override of config path
server.js
server.js
var figger = require("figger"), expand = require("expand-hash"), loadcerts = require("./lib/load-certs"), bodewell = require("./"), server = new bodewell.Server(), monitorType = require("./lib/monitor/monitor-type"); monitorType("disk", require("./lib/monitor/disk")); monitorType("load", require("....
JavaScript
0
@@ -418,44 +418,91 @@ -return figger(%22/etc/bodewell/config%22 +var config = process.env.config %7C%7C %22/etc/bodewell/config%22;%0A return figger(config ).th
63a4afb05e87f7ade85911548966dad91584e2dc
Fix typo
index.js
index.js
'use strict' const debug = require('debug')(require('./package.json').name) const isRetryAllowed = require('is-retry-allowed') const addTimeout = require('callback-timeout') const DEFAULT = { timeout: 30000, retries: 5, backoff: (seed) => { const noise = Math.random() * 100 return (1 << seed) * 1000 + n...
JavaScript
0.999999
@@ -446,20 +446,18 @@ opts%0A -cons +le t retryC @@ -1029,17 +1029,22 @@ %0A %7D%0A%0A -b +retryB ackoff.r
c394e69b92067dbbeb16865bc2aec4ca035656d5
Disable indev authentication
server.js
server.js
var express = require('express'), bodyParser = require('body-parser'), methodOverride = require('method-override'), port = process.env.PORT || 8080, route = require('./app/routes/route.js'), colors = require('colors'), app = express(), passport = require('passport'), cookieParser = require('cookie-parser'), GoogleStrat...
JavaScript
0.000001
@@ -798,24 +798,27 @@ dule.js');%0A%0A +// var passport
9107dd8c9b240d58106f7ba53e2040c81f6c5661
change server.js
server.js
server.js
/* eslint no-console: 0 */ "use strict"; const path = require('path'); const express = require('express'); const compression = require('compression') // const isDeveloping = process.env.DEV_MODE !== 'production'; const port = process.env.PORT || process.env.OPENSHIFT_NODEJS_PORT || 3000; const ip = process.env.IP || ...
JavaScript
0.000002
@@ -145,19 +145,16 @@ sion')%0A%0A -// const is @@ -672,36 +672,28 @@ );%0A%0Aif ( -process.env.DEV_MODE +isDeveloping ) %7B%0A co
8a297b43c0ef579e75b407ef561689a306107cbc
improve comments in server.js
server.js
server.js
process.env.VUE_ENV = 'server' const isProd = process.env.NODE_ENV === 'production' const fs = require('fs') const path = require('path') const express = require('express') const favicon = require('serve-favicon') const compression = require('compression') const serialize = require('serialize-javascript') const resolv...
JavaScript
0
@@ -360,299 +360,146 @@ e)%0A%0A -// https://github.com/vuejs/vue/blob/next/packages/vue-server-r +const app = express()%0A%0Alet indexHTML // g en -d er -er/README.md#why-use-bundlerenderer%0Acons +ated by html-webpack-plugin%0Ale t -c re -ateBundleRenderer = require('vue-server-renderer').createBundleRenderer%0...
9dbb52e41c4239d2bab6b170c438c8dd33b85d1e
Manage OPTION preflight for CORS request (DELETE/POST)
server.js
server.js
const express = require('express'); const bodyParser = require('body-parser'); const lodash = require('lodash'); const constants = require('./constants'); const morgan = require('morgan'); const Server = function Server(db, rest, prefix) { const watcher = {}; const urlRegex = RegExp(`/+${prefix}/([^/?]+).*`); //...
JavaScript
0
@@ -842,16 +842,38 @@ logging + (TODO: Add an option) %0A app.u @@ -896,16 +896,524 @@ ned'));%0A + // For CORS (TODO: Add an option)%0A app.use(function(req, res, next) %7B%0A res.header('Access-Control-Allow-Origin', '*');%0A res.header('Access-Control-Allow-Methods', 'GET, PUT, POST, DELETE, OPTIONS...
ba88ea7e724afaeaf51d012683dd66a02e6bb721
update server.js
server.js
server.js
var app = require('./server/app')(__dirname); app.listen(3000); console.log('listening on port 3000');
JavaScript
0.000001
@@ -26,16 +26,21 @@ er/app') +;%0Aapp (__dirna @@ -42,21 +42,16 @@ dirname) -;%0Aapp .listen(
fc471cccea56b8801efef61150fd2a33419dde00
Add POST route to create external transactions
server.js
server.js
var express = require('express') var requireAll = require('./lib/require-all') var authorization = require('express-authorization') var passport = require('passport') var utils = require("./lib/utils") var BasicStrategy = require("passport-http").BasicStrategy var User = require("./app/models/user") var ExternalTransac...
JavaScript
0
@@ -1756,28 +1756,117 @@ tions'%5D. -userIndex +index);%0Aapp.post('/api/v1/users/:id/external_transactions', ctrls%5B'external_transactions'%5D.create );%0A +%0A app.get(
ac5a8631b098c5731c02de8aa168f627ea0ffe4f
Change log name to something more generic
server.js
server.js
'use strict'; const Hapi = require('hapi'); const inert = require('inert'); const path = require('path'); const bunyan = require('bunyan'); const webpack = require('webpack'); const LOG = bunyan.createLogger({ name: 'footnotes' }); process.env.NODE_ENV = process.env.NODE_ENV || 'development'; if (process.env.NODE_E...
JavaScript
0
@@ -216,17 +216,11 @@ e: ' -footnotes +app ' %7D)
baf0c39f803ea88fba83ef07381ac0fae0fccf1d
update for fs in server file
server.js
server.js
var express = require('express'); var https = require('https'); var http = require('http'); var app = express(); //var httpPort = 10549; var httpsPort = 10337; var privateKey = '../server.key'; var publicCert = '../cert.pem'; var httpsOptions = { key: privateKey, cert: publicCert }; app.use(express.static(__dirna...
JavaScript
0
@@ -84,16 +84,40 @@ 'http'); +%0Avar fs = require('fs'); %0A%0Avar ap @@ -271,33 +271,80 @@ = %7B%0A -%09 + key: -privateKey,%0A%09cert: +fs.readFileSync(privateKey, 'utf8'),%0A cert: fs.readFileSync( publ @@ -349,16 +349,25 @@ blicCert +, 'utf8') %0A%7D;%0A%0Aapp @@ -654,17 +654,17 @@ () %7B%0A// -%0...
83bf6b14941d682a1592388ae2db342799b3182e
add index endpoint
server.js
server.js
var root = require('root') var JSONStream = require('JSONStream') var through = require('through2') var pump = require('pump') var cors = require('cors') var registry = require('./') module.exports = function() { var client = registry() var server = root() // library paths server.client = client server.set...
JavaScript
0.000003
@@ -5248,32 +5248,186 @@ res%0A )%0A %7D)%0A%0A + server.get('/', function(req, res) %7B%0A res.send(%7B%0A name: 'docker-registry-server',%0A version: require('./package.json').version%0A %7D)%0A %7D)%0A%0A server.error(f
69ac864e3dff320bdf3d8e831533b3c082c8c7e2
Add SSL support.
server.js
server.js
var express = require('express'), http = require('http'), path = require('path'), pg = require('pg'), db = require('./config/sequelize.js'), User = require('./models/user.js'), utils = require('./utils.js'); var app = express(); app.set('port', process.env.PORT || 3000); ap...
JavaScript
0
@@ -23,24 +23,51 @@ 'express'),%0A +%09%09fs = require('fs'),%0A http @@ -81,24 +81,56 @@ re('http'),%0A + https = require('https'),%0A path @@ -306,16 +306,222 @@ .js');%0A%0A +var privateKey = fs.readFileSync('/home/ssh/privatekey.pem').toString();%0Avar certificate = fs.readFileSync('/...
7fe65980635faf547732a3b65f5a288ffc7ae729
Remove nexts.
server.js
server.js
(function () { "use strict"; var argv, express, corser, mongo, app; argv = require("optimist") .options("port", { default: 1337, describe: "Port" }) .options("mongodb-host", { default: "127.0.0.1", ...
JavaScript
0
@@ -783,17 +783,18 @@ dle CORS +. %0A - app. @@ -2188,38 +2188,32 @@ nction (req, res -, next ) %7B%0A var @@ -2914,38 +2914,32 @@ nction (req, res -, next ) %7B%0A var @@ -4251,38 +4251,32 @@ nction (req, res -, next ) %7B%0A var @@ -5058,32 +5058,51 @@ %7D);%0A %7D);%0A%0A ...
422e61cc28fbafa4637313473b6b20cc97d670b1
update server dot js
server.js
server.js
var express = require('express'), path = require('path'), favicon = require('serve-favicon'), logger = require('morgan'), cookieParser = require('cookie-parser'), bodyParser = require('body-parser'), users = require('./routes/users'); //Mongo running check re...
JavaScript
0.000001
@@ -28,24 +28,54 @@ 'express'),%0A + app = express(),%0A path @@ -820,16 +820,19 @@ %60app%60.%0A +// var app
70aaddb70724c023a12dd465732cf9d0396b7e11
Define rethink queries
server.js
server.js
'use strict'; // standard express app plumbing const express = require('express'); const app = express(); const morgan = require('morgan'); const path = require('path'); app.use(morgan('dev')); app.use(express.static('dist')); app.get('/', (req, res) => { let template = 'index.html'; if (process.env.NODE_ENV ==...
JavaScript
0.000005
@@ -554,16 +554,1891 @@ ).port%7D%60);%0A%7D);%0A%0A +// connect to the database%0Aconst r = require('rethinkdbdash')(%7B%0A db: process.env.DATABASE_NAME %7C%7C 'realtime_rethinkdb',%0A servers: %5B%7B%0A host: process.env.DATABASE_HOST %7C%7C 'localhost',%0A port: parseInt(process.env.DATABASE_PORT) %7C%7C 2...
84ddaa66e7f9fbb7380dd007c4e112d897d229b7
debug request
server.js
server.js
var express = require('express'); var bodyParser = require('body-parser'); var pg = require('pg'); var app = express(); app.use(bodyParser.json()); // Create link to Angular build directory var distDir = __dirname + "/dist/"; app.use(express.static(distDir)); pg.defaults.ssl = true; // Connect to the database befor...
JavaScript
0.000001
@@ -361,19 +361,23 @@ ient -;%0Apg.connec + = new pg.Clien t(pr @@ -398,18 +398,34 @@ BASE_URL -, +);%0Aclient.connect( function @@ -432,16 +432,8 @@ (err -, client ) %7B%0A
6bdb70c50d37aa849bc96d124d392048073d710d
Add another port
server.js
server.js
//Initialize the Express library, used to create a web server var express = require("express"); var https = require("https"); var app = express(); // API endpoint to send email from the form var mailgun = require('mailgun-js')( { apiKey: process.env.MAILGUN_API_KEY, domain: process.env.MAILGUN_DOMAIN } ); var bodyPar...
JavaScript
0.000001
@@ -1465,11 +1465,19 @@ nv.PORT +%7C%7C 8000 );%0A
256e1fd6c28e2ef0aed1a4c867db47d1d6be81d3
add cors
server.js
server.js
var express = require('express'), app = express(), port = process.env.PORT || 8000, mongoose = require('mongoose'), ChatHistory = require('./api/models/ChatHistoryModel'), bodyParser = require('body-parser'); mongoose.Promise = global.Promise; mongoose.connect('mongodb://heroku_7rcrjj4s:fq0tkipu75hgi8h7jnp...
JavaScript
0.998386
@@ -1,12 +1,41 @@ +var cors = require('cors');%0A%0A var express @@ -244,16 +244,36 @@ r');%0A %0A +app.use(cors());%0A %0A mongoose
9ef8b1f48f128f89c516d3692491e94bf1574068
remove language cookie expiry
server.js
server.js
const argv = require('minimist')(process.argv.slice(2)) const path = require('path') const i18n = require('./lib/i18n') const express = require('express') const lobars = require('lobars') // Middleware const hbs = require('express-hbs') const slashes = require('connect-slashes') const browsersync = require('./middlewa...
JavaScript
0.998441
@@ -1587,52 +1587,8 @@ e',%0A - options: %7BmaxAge: 24 * 60 * 60 * 1000%7D,%0A
8c3bca8048a9a66642a25118c70b93655ed39fb5
set cursor style as pointer
src/js/creation-interface/anchor-reset-css.js
src/js/creation-interface/anchor-reset-css.js
/** * Defines a Reset CSS for anchor elements. Webpages may have arbitrary adjustments * to the default rendering of <a> links. Applying the 'inherit' value to each * property is intended to make the anchors appear as if they are no different * than any of the surrounding text (sort of like if the elements were wra...
JavaScript
0.000004
@@ -517,31 +517,8 @@ ;%22,%0A -%09%09%09%22cursor: inherit;%22,%0A %09%09%09%22 @@ -885,16 +885,39 @@ rit;%22,%0A%0A +%09%09%09%22cursor: pointer;%22,%0A %09%09%09%22disp
32fc187ec3c1842486d67fefe540c6084b30570d
remove bogus console.log
signin.js
signin.js
'use strict'; var PromiseA = require('bluebird').Promise; var request = require('request'); var requestAsync = PromiseA.promisify(request); function signin(username, password) { var jar = request.jar(); // as per https://tech.lds.org/wiki/LDS_Tools_Web_Services // updated: https://tech.lds.org/mobile/ldstools/c...
JavaScript
0.000006
@@ -1217,38 +1217,8 @@ %7D%0A%0A - console.log(body.length);%0A
f10f82f69a5d2ec5b61029fe0c9a3295847196c0
Edit comments
server.js
server.js
// server.js //jscs:disable requireTrailingComma, disallowQuotedKeysInObjects, requireCamelCaseOrUpperCaseIdentifiers 'use strict'; const express = require('express'); const app = express(); const mongoose = require('mongoose'); const morgan = require('morgan'); const bodyParser =...
JavaScript
0
@@ -1683,18 +1683,18 @@ es%0A%0A// G -et +ET all tod @@ -1932,21 +1932,21 @@ );%0A%0A// C -reate +REATE a todo%0A
4ddf4796fc6189f911d8c26dc9e44d82202dd6c3
Use Object.keys() instead of Object.getOwnPropertyNames()
simple.js
simple.js
'use strict'; function $(selector){ return document.querySelector(selector); } function $All(selector){ return document.querySelectorAll(selector); } function assignGlobalObjects(list){ for(let item of Object.getOwnPropertyNames(list)) window[item] = $(list[item]); } function create(type, propertie...
JavaScript
0.000007
@@ -220,34 +220,19 @@ Object. -getOwnPropertyName +key s(list)) @@ -1266,34 +1266,19 @@ Object. -getOwnPropertyName +key s(proper @@ -1487,26 +1487,11 @@ ect. -getOwnPropertyName +key s(pr @@ -2375,17 +2375,16 @@ %3E0; i--) -%7B %0A%09string @@ -2423,22 +2423,16 @@ ts%5Bi%5D);%0A - %7D%0A retu
5a910af7bba8365b285dfb78fa303e5d47ba55d3
Allow controlling of stats server
server.js
server.js
var http = require('http'); var faye = require('faye'); // Configuration options var options = { port: process.env.FAYE_PORT || 8080, mount: process.env.FAYE_MOUNT || '/bayeux', timeout: process.env.FAYE_TIMEOUT || 45, logging: process.env.FAYE_LOGGING || 'false', stats: process.env.FAYE_STATS |...
JavaScript
0
@@ -316,32 +316,80 @@ ATS %7C%7C 'false',%0A + stats2: process.env.FAYE_STATS2 %7C%7C 'false',%0A statsPort: p @@ -1947,32 +1947,33 @@ f (options.stats +2 === 'true') %7B%0A
e5bf424bdcd60290d7decf042f588bb062c397af
Remove platfor and arch from json
server.js
server.js
// server.js function gen_routing_key(platform, arch) { return platform + '_' + arch; } // load configs var configDB = require('./config/database.js'); var settings_config = require('./config/settings.js'); var root_abs_path = __dirname; var public_dir_abs_path = root_abs_path + '/public'; var public_downloads_dir...
JavaScript
0
@@ -4490,88 +4490,8 @@ es,%0A - 'platform': in_json.platform,%0A 'arch': in_json.arch,%0A
b02e85c45da0fc2586a71a3a2be7de77b74f16c8
fix message
server.js
server.js
'use strict'; //Load configurations //Set the node enviornment variable if not set before process.env.NODE_ENV = process.env.NODE_ENV || 'development'; /** * Module dependencies. */ var express = require('express'), fs = require('fs'), PeerSync = require('./lib/PeerSync').class(), HistoricSync = require('./l...
JavaScript
0.000017
@@ -1203,16 +1203,17 @@ le.log(' +%5B historic @@ -1217,16 +1217,17 @@ ric_sync +%5D finishe
a1ddc5db20aa8e2b211c7270d8419b6f8d15a1d8
Add path module
server.js
server.js
const express = require('express') const app = express() const port = process.env.PORT || 8080 app.use(express.static(__dirname + '/app')); app.get('*', function (request, response){ response.sendFile(path.resolve(__dirname, 'app', 'index.html')) }) app.listen(port); console.log(`Listening at http://localhost:${...
JavaScript
0.000001
@@ -28,16 +28,44 @@ press')%0A +const path = require('path') %0Aconst a
2c06b74b7c9119fc5ee656312b305d1836815d29
add port from environment
server.js
server.js
/** * Dom Storm. Built using Express, EJS, Mongoose, ACE */ console.log('Starting server.js'); var express = require('express'); var controllers = require('./controllers'); var modules = require('./controllers/modules.js'); var http = require('http'); var path = require('path'); var fs = require('fs'); var passport ...
JavaScript
0.000001
@@ -573,26 +573,20 @@ s;%0A%0Avar -ipaddress +port = proce @@ -596,91 +596,12 @@ env. -OPENSHIFT_NODEJS_IP %7C%7C %22127.0.0.1%22;%0Avar port = process.env.OPENSHIFT_NODEJS_PORT +port %7C%7C @@ -4706,19 +4706,8 @@ ort, - ipaddress, fun @@ -4768,27 +4768,15 @@ on -' + ipaddress + %22:%22 +port: ' +po...
93cc0c950a2a63ca5360dfe316e7d2fe9bfc2890
fix bug
server.js
server.js
var express = require('express') var bodyParser = require("body-parser"); var lcbo = require('./codybo.js'); var gm = require('./groupme.js'); var server = express(); server.set('PORT', (process.env.PORT || 5000)); server.use(express.static(__dirname + '/public')); server.use(bodyParser.json()); server.get("/echo...
JavaScript
0.000001
@@ -1551,16 +1551,30 @@ dy.text. +toLowerCase(). split(' @@ -1828,16 +1828,284 @@ = 'find' +%0A%0A%09if (cmd%5B0%5D == 'near') %7B%0A%09%09lcbo.lookUpInventoryNearAddress(cmd%5B1%5D, cmd%5B2%5D)%0A%09%09.then(function(results) %7B%0A%09%09%09var txt = results.map(function(s) %7B%0A%09%09%09%09return s.name + ', qua...
14c03ef4579b1c6b0c365f3e447c8f3d729c900a
replace script to noscript
server.js
server.js
var http = require('http'); var https = require("https"); var url = require('url'); var qs = require('querystring'); var server = http.createServer(function(req, res) { if (req.url === "/favicon.ico") { res.writeHead(404, {}); res.end('not found'); } var u = url.parse(req.url); if (u.pathname === "/search") ...
JavaScript
0.001071
@@ -1056,16 +1056,18 @@ d;%0A%09%09%09%09 +// res.end( @@ -1087,17 +1087,16 @@ /%3Cscript -%3E .+?%3C%5C/sc @@ -1111,16 +1111,111 @@ , %22%22));%0A +%09%09%09%09res.end(data.replace(/%3Cscript.*?%3E/mg, %22%3Cnoscript%3E%22).replace(/%3C%5C/script%3E/g,%22%3C/noscript%3E%22));%0A %09%09%09%7D);%0A%0A
e035bcbf48ce0c18cf769b3a61bb18f04bf5cde9
change again the style folder
server.js
server.js
var express = require("express"); var bodyParser = require("body-parser"); var mongodb = require("mongodb"); var cors = require('cors'); var ObjectID = mongodb.ObjectID; var COMPANIES_COLLECTION = "companies"; var app = express(); app.use(bodyParser.json()); // Create link to Angular build directory var distDir = __...
JavaScript
0
@@ -332,16 +332,72 @@ /dist/%22; +%0Avar styleDir = __dirname + %22/dist/assets/stylesheets/%22; %0A%0Aapp.us
a0c3252246036dbca9b9a4b75341d9f5a9e3915f
add port to console.log
server.js
server.js
/* eslint no-console: "off"*/ const app = require('./lib/app'); const http = require('http'); require('./lib/connect'); const server = http.createServer(app); const port = process.env.PORT || 3000; server.listen(port, () => { console.log('server running on', server.address()); });
JavaScript
0.000001
@@ -90,34 +90,8 @@ p'); -%0Arequire('./lib/connect'); %0A%0Aco @@ -247,14 +247,19 @@ ddress() +.port );%0A%7D);
d2fa0f25cce7facf56a95c54406fe5c0360d8076
Fix default mass property of Boid class
src/sketch.js
src/sketch.js
function setup() { createCanvas(640, 480); } function draw() { ellipse(50, 50, 80, 80); } /** * Boid class */ function Boid() { this.location = createVector(); this.velocity = createVector(); this.acceleration = createVector(); this.mass = 0; }
JavaScript
0.000001
@@ -253,9 +253,11 @@ s = -0 +1 ;%0A%7D%0A +%0A%0A
ffd24f163134fc0febf0bede5128a5c93fe29e4d
Declare Doctype with export
src/static.js
src/static.js
/* eslint-disable import/no-dynamic-require, react/no-danger, no-cond-assign */ import React, { Component } from 'react' import PropTypes from 'prop-types' import { renderToStaticMarkup } from 'react-dom/server' import fs from 'fs-extra' import nodepath from 'path' import Helmet from 'react-helmet' // import DefaultHt...
JavaScript
0
@@ -3937,24 +3937,42 @@ onst html = +%60%3C!DOCTYPE html%3E$%7B renderToStat @@ -4162,32 +4162,34 @@ mplate%3E,%0A ) +%7D%60 %0A%0A const ur
c9d05def1b3dedddaf9fc5471e841d9b98bb82f7
Fix for 'enabled' check. The type of the settings.enabled needs to be checked on both sides of the || because if it isn't, the check always returns true for a boolean based feature.
sauce/main.js
sauce/main.js
import features from 'features'; const featureInstances = features.map(Feature => new Feature()); // This poll() function will only need to run until we find that the DOM is ready (function poll() { if (typeof Em !== 'undefined' && typeof Ember !== 'undefined' && typeof $ !== 'undefined' && $('.ember-view.layou...
JavaScript
0
@@ -785,32 +785,43 @@ %3E %7B%0A if ( +%0A feature.construc @@ -847,16 +847,65 @@ eName && +%0A isFeatureEnabled(feature) &&%0A feature @@ -911,32 +911,41 @@ e.shouldInvoke() +%0A ) %7B%0A fe @@ -1286,24 +1286,96 @@ ) =%3E %7B%0A + if (isFeatureEnabled(fe...
c72af16ba0c24cf728fca15dd415bd6bdffada38
clean up test file
tests/ObjectPropertyInitializer.js
tests/ObjectPropertyInitializer.js
// see ../license.txt, BSD // Case 1: Object Property Initializer var anObject = { aPropertyInitialized: function() { return true; } }; anObject.aPropertyInitialized.displayName = "anObject.aPropertyInitialized";
JavaScript
0.000001
@@ -143,81 +143,4 @@ %0A%7D;%0A -%0AanObject.aPropertyInitialized.displayName = %22anObject.aPropertyInitialized%22;
c7eb5cb1ccda13d9f708c185254f76b1256504b1
rename $silkey to $weaver
components/prism-keyman.js
components/prism-keyman.js
Prism.languages.keyman = { 'comment': /\bc\s.*/i, 'function': /\[\s*((CTRL|SHIFT|ALT|LCTRL|RCTRL|LALT|RALT|CAPS|NCAPS)\s+)*([TKU]_[a-z0-9_?]+|".+?"|'.+?')\s*\]/i, // virtual key 'string': /("|')((?!\1).)*\1/, 'keyword': /\b(any|beep|call|context|deadkey|dk|if|index|notany|nul|outs|return|reset|save|set|store|use)\...
JavaScript
0.999995
@@ -1065,14 +1065,14 @@ mfl%7C -silkey +weaver %7Ckey
ea7e220284117fb17b99113006f0bf6fdad20e4a
define query argument as non null.
northwind-service/src/main/resources/ui/js/CustomerMasterDetailCtrl.js
northwind-service/src/main/resources/ui/js/CustomerMasterDetailCtrl.js
var myApp = angular.module('myApp', ["restangular"]); var northwindUri = "uri:http://ultrastructure.me/ontology/com.chiralbehaviors/demo/northwind"; myApp.filter('sumByKey', function () { return function (data, key) { if (typeof (data) === 'undefined' || typeof (key) === 'undefined') { ...
JavaScript
0.000071
@@ -1817,16 +1817,17 @@ : String +! ) %7B Cust
01e57c653302ab6b8082ebf969ffef933dfe2b21
support <Marker offset={{ x, y }} /> as document says
components/utils/common.js
components/utils/common.js
const hasWindow = (typeof window !== 'undefined') /* * [lng, lat] * {lng, lat} * {longitude, latitude} */ export const toLnglat = (pos) => { if (!pos) { return pos } // 高德原生 AMap.LngLat 类 if ('getLng' in pos && 'getLat' in pos) { return pos } let lng = 0 let lat = 0 if (({}).toString.call(p...
JavaScript
0.000012
@@ -870,16 +870,91 @@ ofst%5B1%5D%0A + %7D else if ('x' in ofst && 'y' in ofst) %7B%0A x = ofst.x;%0A y = ofst.y;%0A %7D%0A re
c84b547232f99f1b2e617c3a9755d16779e92332
Update sample.js
sample.js
sample.js
// this is a comment const func = (a, b, c, d, e, f, s, n) => { if (a++ && b-- || c >= d || e <= f) { } if (s === 'string' && n !== 999) { } if (a == b && c != d) a <- b <-- c <== d a <| b |> c -> d ==> e } <!-- test --> // italic ligatures // != == >= <= -> => ==>...
JavaScript
0.000001
@@ -341,20 +341,61 @@ ++ --%0A -%0A %0A %0A +// a %3C- b %3C-- c %3C== d%0A // a %3C%7C b %7C%3E c -%3E d ==%3E e %0A
e41cdde7936cd1d80071e12ef5fe4290e788d353
Add build and watch tasks
src/main/webapp/gulpfile.js
src/main/webapp/gulpfile.js
// jshint ignore:start 'use strict'; var gulp = require('gulp'); var jshint = require('gulp-jshint'); var csslint = require('gulp-csslint'); var gutil = require('gulp-util'); var chalk = require('chalk'); var source = require('vinyl-source-stream'); var buffer = require('vinyl-buffer'); var del = require('del'); var s...
JavaScript
0
@@ -885,16 +885,236 @@ %7D%0A%7D;%0A%0A +gulp.task('watch', %5B'build'%5D, function() %7B%0A gulp.watch(src.styles.all, %5B'build:stylesheets'%5D);%0A gulp.watch(src.scripts.all, %5B'build:scripts'%5D);%0A%7D);%0A%0Agulp.task('build', %5B'clean', 'build:stylesheets', 'build:scripts'%5D);%0A %0Agulp.ta
d63d66ce66a43f11f8ff380538f6f1ecdc0d6d63
remove success flags to supress messages
public/modules/users/controllers/friends.client.controller.js
public/modules/users/controllers/friends.client.controller.js
'use strict'; angular.module('users').controller('FriendsController', ['$scope', '$http', '$location', '$resource', 'Users', 'Authentication', function($scope, $http, $location, $resource,Users, Authentication ) { $scope.user = Authentication.user; // If user is not signed in then redirect back home if (!$scope...
JavaScript
0
@@ -1244,35 +1244,8 @@ orm%0A -%09%09%09%09$scope.success = true;%0A %09%09%09%09 @@ -1649,35 +1649,8 @@ orm%0A -%09%09%09%09$scope.success = true;%0A %09%09%09%09 @@ -1977,35 +1977,8 @@ e) %7B -%0A%09%09%09%09$scope.success = true; %0A%0A%09%09
b9da281cb1cf122b044af81f0120ace826fb2505
Add assignableLabelsEndpoint to issue after createing it
app/assets/javascripts/boards/models/list.js
app/assets/javascripts/boards/models/list.js
/* eslint-disable no-underscore-dangle, class-methods-use-this, consistent-return, no-shadow, no-param-reassign */ /* global ListIssue */ import { __ } from '~/locale'; import ListLabel from '~/vue_shared/models/label'; import ListAssignee from '~/vue_shared/models/assignee'; import { urlParamsToObject } from '~/lib/u...
JavaScript
0
@@ -5882,16 +5882,86 @@ ce_path; +%0A issue.assignableLabelsEndpoint = data.assignable_labels_endpoint; %0A%0A if
32ab09b9160599cbe4f007ab6fe46d070088081a
Jump to the first question in the list, not 'q1'
compytition/static/main.js
compytition/static/main.js
function update_question(event) { if(event) event.preventDefault(); if(this.hash) window.location.hash = this.hash; $('#questions .question').hide(); $('#questions .question-button').removeClass('pure-menu-selected'); $(window.location.hash + '-body').show(); $(window.location.hash + '-button').addClass('pure-me...
JavaScript
0.999981
@@ -683,36 +683,106 @@ %0A%09%09%09 -window.location.hash = '#q1' +var i = $('#questions .question')%5B0%5D.id;%0A%09%09%09window.location.hash = '#' + i.substr(0, i.length - 5) ;%0A%09%09
ef46d98112deb80827d88a9cf8ddb8f29471ab1e
Reword class names to be BEM convention
packages/es-components/src/components/containers/tabPanels/TabPanel.js
packages/es-components/src/components/containers/tabPanels/TabPanel.js
import React from 'react'; import PropTypes from 'prop-types'; import styled, { ThemeProvider } from 'styled-components'; import defaultTheme from 'es-components-via-theme'; import Tab from './Tab'; const TabWrapper = styled.div` display: flex; `; const TabFormatter = styled.div` display: flex; flex-direction: ...
JavaScript
0.00059
@@ -2122,16 +2122,23 @@ %22es-tab- +panel__ wrapper%22 @@ -2183,16 +2183,23 @@ %22es-tab- +panel__ formatte @@ -2205,18 +2205,46 @@ er%22%3E -%7Belements%7D +%0A %7Belements%7D%0A %3C/Ta @@ -2319,16 +2319,23 @@ %22es-tab- +panel__ content%22
7b150f4b4e9294958c2c63ce0f0216175af51ab8
Allow for None
src/DevRelOMeter.js
src/DevRelOMeter.js
import $ from 'jquery'; import d3 from 'd3'; import epoch from 'epoch-charting'; import 'epoch-charting/dist/css/epoch.min.css!'; import 'assets/css/styles.css!'; import Activities from 'src/Activities'; /** * Developer Relations Meter * * Determine if the activities that are being undertaken, * or that are pla...
JavaScript
0.99997
@@ -2583,37 +2583,102 @@ = 0 -.75; // hope for advocacy%0A +;%0A if(percentEvangelism %3E= percentAdvocacy) %7B%0A fakeGaugePercent = 0.25;%0A %7D%0A else if( @@ -2695,17 +2695,17 @@ ngelism -%3E +%3C percent @@ -2735,33 +2735,33 @@ augePercent = 0. -2 +7 5;%0A %7D%0A %0A
ae31a6e4a884fa47c1a52831a5d8ffc57eb988ac
Revert "get most recent reservation status"
app/assets/javascripts/reservation_status.js
app/assets/javascripts/reservation_status.js
var reservationStatusSpinning = false; function getReservationStatus() { startStatusSpinner(); $.getJSON(reservation_status_url, function(data) { handleReservationStatus(data.reservation); }); } function handleReservationStatus(reservation) { switch(reservation.status) { case "ready": handleRes...
JavaScript
0
@@ -1343,17 +1343,18 @@ s.slice( -0 +-1 )%5B0%5D);%0A
af8de93c301eab51c939dd0be9881a3e5e467947
add cancel buttons to template folder flow
app/assets/javascripts/templateFolderForm.js
app/assets/javascripts/templateFolderForm.js
(function(Modules) { "use strict"; Modules.TemplateFolderForm = function() { this.start = function(templateFolderForm) { this.$form = $(templateFolderForm); this.$stickyBottom = this.$form.find('#sticky_template_forms'); this.$stickyBottom.append(this.nothingSelectedButtons); this.$s...
JavaScript
0
@@ -869,24 +869,320 @@ %0A%0A %7D;%0A%0A + // cancel buttons only relevant if JS enabled, so%0A this.addCancelButton(this.states.moveToFolderRadios);%0A this.addCancelButton(this.states.moveToNewFolderForm);%0A this.addCancelButton(this.states.addNewFolderForm);%0A this.addCancelButton(th...
0df4c8a9d699f56a6f13fc8ec64369be0f094088
remove unneeded helper fun
transform.js
transform.js
var assert = require('assert'); var truthy = function (val) { return !!val; }; var compileLiteral = function (tree) { assert.strictEqual(tree.type, 'Literal'); var type; switch (typeof tree.value) { case 'number': type = 'NumericLiteral'; break; case 'string': type = 'StringLiteral'; break; defa...
JavaScript
0.000001
@@ -30,58 +30,8 @@ );%0A%0A -var truthy = function (val) %7B%0A return !!val;%0A%7D;%0A%0A var