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
07a9d519af16c064a9364b1f852bf5c018c6b974
Remove unused property from trains array
server.js
server.js
const express = require('express'); const path = require('path'); const fs = require('fs'); const pug = require('pug'); const request = require('request'); const cheerio = require('cheerio'); const app = express(); app.set('views', './views') app.set('view engine', 'pug'); app.use(express.static(path.join(__dirname, ...
JavaScript
0
@@ -4335,37 +4335,8 @@ us,%0A -%09%09%09%09%09%22direction%22: direction,%0A %09%09%09%09
0d98c7264a78894fbed253e8711bf0ba8c89ba0c
Remove the `X-Powered-By` header added by Express
server.js
server.js
'use strict'; const app = require('./app'); require('./api.js')(app); require('./static.js')(app); const PORT = process.env.PORT || 4000; app.listen(PORT, () => { console.log(`App listening on port ${PORT}!`); });
JavaScript
0
@@ -38,16 +38,103 @@ /app');%0A +%0A// remove the automatically added %60X-Powered-By%60 header%0Aapp.disable('x-powered-by');%0A%0A require(
7255c9750a537cee538cc6599873b2bf22514447
Fix typos
server.js
server.js
var express = require('express'); var google = require('googleapis'); var request = require('request'); var jwt = require('jsonwebtoken'); var bodyParser = require("body-parser"); var gcal = require('google-calendar'); // Google authentication //var OAuth2 = google.auth.OAuth2; //var CLIENT_ID = '698142480854-nii1...
JavaScript
0.999999
@@ -2791,17 +2791,17 @@ f(day_of - +_ week == @@ -2872,16 +2872,25 @@ = days%5B +parseInt( date.get @@ -2894,16 +2894,17 @@ getDay() +) + 1%5D;%0A
5ef9281eb7b0ae35ecde1180625232bd470b8645
fix standard style
server.js
server.js
const Hapi = require('hapi') const Inert = require('inert') const Vision = require('vision') const Routes = require('./routes') const Https = { register: require('hapi-require-https'), options: {} } const config = {} const server = new Hapi.Server(config) const port = 8080 const host = 'localhost' server.con...
JavaScript
0.000004
@@ -137,18 +137,16 @@ tps = %7B%0A - regist @@ -180,18 +180,16 @@ ttps'),%0A - option
a84a7ca3b27eb2d9bf217a671e5fb37ae787b258
Remove unused actions
app/assets/javascripts/angular/services/ConstructionDefaults.js
app/assets/javascripts/angular/services/ConstructionDefaults.js
cbecc.factory('ConstructionDefaults', ['$resource',function($resource) { return $resource('construction_defaults/:id.json', { project_id: '@projectId', id: '@id' }, { 'create': { method: 'POST' }, 'index': { method: 'GET', isArray: true }, 'show': { method: 'GET', isArray: false }, '...
JavaScript
0.000005
@@ -170,45 +170,8 @@ %7B%0A - 'create': %7B method: 'POST' %7D,%0A @@ -221,134 +221,8 @@ %7D,%0A - 'show': %7B method: 'GET', isArray: false %7D,%0A 'update': %7B method: 'PUT' %7D,%0A 'destroy': %7B method: 'DELETE' %7D%0A
037cd35ec4fbbdcf0744834f9ed7778a6b456cc6
update server ip
server.js
server.js
var Hapi = require('hapi'), settings = require('./config/settings'), models = require('./models/models'); var server = new Hapi.Server('localhost', settings.port); // Add the server routes server.route(require('./config/routes')); //Start the server server.start(function() { //Log to the console the host...
JavaScript
0.000001
@@ -64,22 +64,24 @@ ttings') -, +; %0A +// models = @@ -144,17 +144,15 @@ er(' -localhost +0.0.0.0 ', s
fa47ee6b1d230b3743f66678bcb7b62655f7fa7f
add heroku
server.js
server.js
var express =require( 'express' ), http =require( 'http' ), path =require( 'path' ), mongoose =require( 'mongoose' ), bodyParser =require( 'body-parser' ), passport = require('passport'), localStrategy = require('passport-local').Strategy, cookieParser = require('cookie-parser'), session...
JavaScript
0.001276
@@ -425,16 +425,19 @@ atabase%0A +// mongoose @@ -483,16 +483,184 @@ stem');%0A +mongoose.connect('//%3CgradingSystem%3E:%3Crobert%3E@ds011419.mlab.com:11419/heroku_r8mrg14f');%0A%0A// mongodb://%3CgradingSystem%3E:%3Crobert%3E@ds011419.mlab.com:11419/heroku_r8mrg14f%0A%0A //databa
4c09ca394562aa716e7e2fe9c46b8a9841288da2
add a pubsub tiny API.
server.js
server.js
var express = require('express'); var app = express(); var connections = []; var counter = 0; app.use('/static', express.static(__dirname + '/public')); app.get("/signalling", function(req, res) { console.log("/signalling connection opened"); res.writeHead(200, { "Content-Type": "text/event-stream",...
JavaScript
0
@@ -88,16 +88,47 @@ r = 0;%0A%0A +app.use(express.bodyParser());%0A app.use( @@ -688,16 +688,313 @@ );%0A%7D);%0A%0A +app.post(%22/signalling%22, function(req, res) %7B%0A var type = req.body.type;%0A var event = JSON.stringify(req.body);%0A console.log(req.body);%0A%0A connections.map(function(c) %7B%0A...
d2997cfa698552b426ddfcf2d876b989d593423d
update error message
app/javascript/components/map-v2/components/analysis/actions.js
app/javascript/components/map-v2/components/analysis/actions.js
import { createAction, createThunkAction } from 'redux-tools'; import union from 'turf-union'; import compact from 'lodash/compact'; import { DASHBOARDS } from 'router'; import { track } from 'utils/analytics'; import { fetchUmdLossGain } from 'services/analysis'; import { uploadShapeFile } from 'services/shape'; impo...
JavaScript
0.000001
@@ -1981,16 +1981,39 @@ o large +or service unavailable for $%7Bla
432c45199d54f73ef1e9a3ee70df781ee5562ffd
add config files
test/fixtures/apps/mqtt-test/config/config.unittest.js
test/fixtures/apps/mqtt-test/config/config.unittest.js
'use strict'; exports.keys = '123456';
JavaScript
0.000002
@@ -8,16 +8,244 @@ rict';%0A%0A +exports.mqtt = %7B%0A client: %7B%0A host: '127.0.0.1',%0A port: 7000,%0A user: 'arden',%0A password: '123456',%0A clientId: '0123456789',%0A connectTimeout: 30 * 1000,%0A keepalive: 5,%0A clean: false,%0A %7D,%0A agent:true%0A%7D;%0A%0A exports.
874b50ab5766c4e32a2f17f69e4da34567cb6a5b
Handle missing props in Pack
lib/pack.js
lib/pack.js
// pipe in an fstream, and it'll make a tarball. // key-value pair argument is global extended header props. module.exports = Pack var EntryWriter = require("./entry-writer.js") , Stream = require("stream").Stream , path = require("path") , inherits = require("inherits") , GlobalHeaderWriter = require("./glob...
JavaScript
0.000001
@@ -3166,16 +3166,22 @@ ry.props + %7C%7C %7B%7D ).forEac @@ -3193,24 +3193,24 @@ ction (k) %7B%0A - wprops%5Bk @@ -3334,16 +3334,22 @@ try.path + %7C%7C '' )%0A%0A // @@ -3484,16 +3484,67 @@ %22)%0A %7D%0A%0A + if (!wprops.type)%0A wprops.type = 'Directory'%0A%0A switch @@ -3695,32 +3695,33 @@ = ...
c3a200fb521aa48ecfb4c84e56684ebdeb0004e1
add english to the string printed.
server.js
server.js
var http = require('http'); var startTime = new Date(); var PORT = 8000; var server = http.createServer(function(req, res){ // for any request, print out the number of milliseconds since the server started. var elapsedTime = new Date().getTime() - startTime.getTime(); console.log('request received, sen...
JavaScript
0.000538
@@ -359,16 +359,54 @@ res.end( +%22This server has been running for %22 + elapsedT @@ -412,16 +412,19 @@ Time + %22 +ms. %5Cn%22);%0A%7D)
1e962fe748e25f657db66f4f794f9d3affb842d5
Update carousel.js
public/app/js/directives/carousel.js
public/app/js/directives/carousel.js
angular.module('myApp').directive('carouselContent', function () { return { templateUrl: 'partials/carousel/index.html', restrict: 'E', replace: true, link: function (scope, element, attrs) { var options = scope.$eval($(element).attr('data-options')); $(el...
JavaScript
0.000001
@@ -1,8 +1,45 @@ +/* Directive for carousel feature */%0A angular. @@ -211,16 +211,55 @@ : true,%0A + /* Provided by Owl Carousel */%0A @@ -439,7 +439,8 @@ %7D;%0A - %7D); +%0A
bb7dc88b6bdb324dfc2feb627a86d1125e8d51a4
Remove left over console log
test/javascripts/unit/hide_department_children_test.js
test/javascripts/unit/hide_department_children_test.js
module("Hide department children", { setup: function() { this.$departments = $( '<div class="js-hide-department-children">' + '<div class="department">' + '<div class="child-organisations">' + '<p>child content</p>' + '</div>' + '</div>' + '</div>'); $('#qunit-...
JavaScript
0
@@ -529,49 +529,8 @@ 1);%0A - console.log(this.$departments.html());%0A %7D);%0A
a380145060508daa8c4d75eb009453ded9396f30
Revert "its hard to debug on your phone.."
src/gameover.js
src/gameover.js
Lettris.GameOver = function(game){ }; Lettris.GameOver.prototype = { init: function( gameData ) { this.endScore = gameData.score this.bestWord = gameData.best_word.word this.bestPoints = gameData.best_word.score this.highscore_key = 'Test2-Lettris-best-' + this.game.lang + '-' + this.game.version this.highsc...
JavaScript
0
@@ -779,104 +779,45 @@ put. -startFocus()%0A%09PhaserInput.onKeyboardClose.addOnce(function() %7B%0A%09 console.log(%22nothing?%22)%0A%09%7D); +zoom = true;%0A%09this.input.startFocus() %0A%09th
514b7c1be18034040f775367cd6a519aa05684a3
rename setId() mtd and .id prp
lib/site.js
lib/site.js
/** * Module dependencies. */ var Post = require('./post'); var req = require('./req'); var debug = require('debug')('wp-connect:site'); /** * Create a Site instance * * @param {Site} wpconn * @api public */ function Site(wpconn){ if (!(this instanceof Site)) return new Site(wpconn); this.wpconn = wpconn...
JavaScript
0.000001
@@ -443,12 +443,9 @@ ype. -setI +i d = @@ -498,16 +498,17 @@ %0A this. +_ id = id; @@ -654,32 +654,33 @@ n)%7B%0A if (!this. +_ id) %7B%0A return @@ -751,24 +751,25 @@ site: this. +_ id %7D, fn);%0A%7D @@ -1042,16 +1042,17 @@ (!this. +_ id) %7B%0A @@ -1104,24 +1104,24 @@ ed'));%0A %7D%0A%0A - r...
55c67623f15fa0983ec2b92911cdb7ca72f972e1
add required field to params
integrations.js
integrations.js
let fs = require('fs'); let request = require('request'); let chalk = require('chalk'); let columnify = require('columnify'); let datafire = require('./index'); const APIS_GURU_URL = "https://api.apis.guru/v2/list.json"; const FILE_SUFFIX = '.openapi.json'; const MAX_DESCRIPTION_LENGTH = 100; let integrations = mod...
JavaScript
0.000001
@@ -4903,24 +4903,79 @@ ': p.type);%0A + ret.required = p.required ? chalk.red('yes') : '';%0A if (p.de
1bda53cfa629cdba0b0c723ff330ef81f70610a7
Update config for jest
jest.config.js
jest.config.js
module.exports = { verbose: true, rootDir: './frontend' };
JavaScript
0
@@ -1,8 +1,11 @@ +// module.e @@ -15,16 +15,19 @@ rts = %7B%0A +// verbos @@ -35,16 +35,19 @@ : true,%0A +// rootDi @@ -66,8 +66,883 @@ nd'%0A +// %7D;%0A%0A +module.exports = %7B%0A verbose: true,%0A preset: 'ts-jest',%0A testEnvironment: 'node',%0A rootDir: './frontend',%0A // roots: %5B%0A // ...
49647a3982988bcfb60b7ce7d18392626c65cd5b
Fix jest deprecation warning
jest.config.js
jest.config.js
module.exports = { testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$', setupFiles: ['./src/setupTests.js'], setupTestFrameworkScriptFile: './src/setupTestFramework.js', testPathIgnorePatterns: ['/node_modules/', '/dist/', '/integration/'], moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'], ...
JavaScript
0.000056
@@ -130,33 +130,24 @@ etup -TestFrameworkScriptFile +FilesAfterEnv : +%5B './s @@ -171,16 +171,17 @@ work.js' +%5D ,%0A te
e39b9ef5f7f52d9e3d8ef38cff09ceb8d505ac1a
update deprecated config option
jest.config.js
jest.config.js
// test dependencies that require transformation let pluginsToTransform = [ 'tdp_*', 'phovea_*', 'lineupjs' ].join('|'); if (pluginsToTransform.length > 0) { /** Attention: Negative Lookahead! This regex adds the specified repos to a whitelist that holds plugins that are excluded from the transformIgnorePatte...
JavaScript
0.000001
@@ -1285,17 +1285,17 @@ %22ts -C +c onfig%22:
61cb91bb48dbbca51053907274ad33d2f3e95f29
fix failing parquet sets when env is set
jest.config.js
jest.config.js
module.exports = { testTimeout: 1000, projects: [ { displayName: { name: "node", color: "magenta" }, testEnvironment: "node", testPathIgnorePatterns: [".jsdom.test."], testMatch: ["**/*.test.(jsx|js)"], modulePathIgnorePatterns: ["<rootDir>/wor...
JavaScript
0.000001
@@ -582,8 +582,151 @@ %5D,%0A%7D%0A +%0A// special envs for tests%0Aprocess.env = Object.assign(process.env, %7B%0A CATALOG_PATH: %22https://owid-catalog.nyc3.digitaloceanspaces.com%22,%0A%7D)%0A
e711ab1c4d379671f5422a37a554ec21dc0f9b76
fix @/ imports
jest.config.js
jest.config.js
/* eslint-disable max-len */ // For a detailed explanation regarding each configuration property, visit: // https://jestjs.io/docs/en/configuration.html 'use strict'; module.exports = { // All imported modules in your tests should be mocked automatically // automock: false, // Stop running tests after the fir...
JavaScript
0.000001
@@ -2648,16 +2648,98 @@ ck.js',%0A + '%5E@/(.*)': '%3CrootDir%3E/src/js/$1',%0A '#/(.*)': '%3CrootDir%3E/static/images/$1',%0A %7D,%0A%0A
bdd2905bf9707fc633d07fd14e2c17a2858219f1
Add collectCoverageFrom field
jest.config.js
jest.config.js
module.exports = { moduleFileExtensions: ['js', 'json', 'vue'], transform: { '.*\\.(vue)$': 'vue-jest', '^.+\\.js$': '<rootDir>/node_modules/babel-jest' }, moduleNameMapper: { '^[@~]/(.*)$': '<rootDir>/$1', '^helper$': '<rootDir>/__tests__/helper', '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|...
JavaScript
0
@@ -611,11 +611,169 @@ uxt)/)'%5D +,%0A collectCoverageFrom: %5B%0A 'assets/js/**/*',%0A 'components/**/*',%0A 'store/**/*',%0A 'assets/js/**/*',%0A 'layouts/js/**/*',%0A 'pages/js/**/*'%0A %5D %0A%7D%0A
c4602d4fe99ef40953959ebf5ab34ad938fd3e4a
Fix coverage
jest.config.js
jest.config.js
module.exports = { collectCoverageFrom: ['src/**/*.js'], coveragePathIgnorePatterns: ['polyfills.js', 'testing/.*.js'], moduleDirectories: [__dirname, 'node_modules', 'src'], setupFilesAfterEnv: ['./jest.setup.js'], testEnvironment: 'jsdom', testEnvironmentOptions: { url: 'http://localhost', }, };
JavaScript
0.000005
@@ -46,17 +46,46 @@ rc/**/*. -j +%7Bjs,ts,jsx%7D', '!src/**/*.css.t s'%5D,%0A c
f675e7b5f1d80571827fdf6809cad1cd268b54f3
fix drive example stdout upload progress (#2403)
samples/drive/upload.js
samples/drive/upload.js
// Copyright 2016 Google LLC // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
JavaScript
0
@@ -1613,16 +1613,33 @@ earLine( +process.stdout, 0 );%0A @@ -1659,16 +1659,32 @@ ursorTo( +process.stdout, 0);%0A
8ef86e4d4fe87c8721e9a7c258aa0c745573ae26
Update selector for layout change
firefox/addon/data/api.js
firefox/addon/data/api.js
// toilet-paper-icon_32 from Rokey (http://www.iconarchive.com/show/smooth-icons-by-rokey/toilet-paper-icon.html) // 48-fork-and-knife-icon by Glyphish (http://glyphish.com/) // test // jpm run --binary-args http://www.just-eat.co.uk/area/nn1-northampton function ShowElement(element) { element.style.display = ''; } ...
JavaScript
0
@@ -5273,18 +5273,16 @@ 'h2.name - a ').textC @@ -5295,17 +5295,16 @@ .trim(); - %0A var
b6d739b5c38d03788dfddb397e5c4b5718f67aeb
add opacity as a fallback for showing enabled/disabled state of sun.CheckBox
js/CheckBox.js
js/CheckBox.js
// Copyright 2002-2013, University of Colorado Boulder /** * Check box. * * @author Chris Malley (PixelZoom, Inc.) */ define( function( require ) { 'use strict'; // imports var ButtonListener = require( 'SCENERY/input/ButtonListener' ); var FontAwesomeNode = require( 'SUN/FontAwesomeNode' ); var inherit...
JavaScript
0
@@ -5039,24 +5039,25 @@ llDisabled;%0A +%0A // e @@ -5059,63 +5059,39 @@ // -enabled/disable the content if it implements setEnabled +if the check box has an icon... %0A @@ -5125,10 +5125,26 @@ con -&& +) %7B%0A if ( che @@ -5190,51 +5190,247 @@ -checkBoxOptions.icon.setEnabled( enab...
e28746346eb2439cf4f9fe3fbf02474cb39c65b6
Fix fail on Object.keys(app.me.installed) which was holding up page loads.
testpilot/frontend/static-src/app/models/experiment.js
testpilot/frontend/static-src/app/models/experiment.js
import app from 'ampersand-app'; import Model from 'ampersand-model'; import querystring from 'querystring'; export default Model.extend({ urlRoot: '/api/experiments', extraProperties: 'allow', props: { enabled: {type: 'boolean', default: false} }, // This shouldn't be necessary; see comments in collect...
JavaScript
0
@@ -883,61 +883,8 @@ ) %7B%0A - const installed = Object.keys(app.me.installed);%0A @@ -990,16 +990,23 @@ talled: +app.me. installe @@ -1006,16 +1006,53 @@ nstalled + ? Object.keys(app.me.installed) : %5B%5D %0A %7D);
7a6148a9343c809d501751295cd8c113f05c2d70
Update messages will now fire when a message is posted
http/public/javascripts/app/controllers/chat_controller.js
http/public/javascripts/app/controllers/chat_controller.js
JsChat.ChatController = Class.create({ initialize: function() { $('loading').show(); this.resizeEvent(); setTimeout(this.initDisplay.bindAsEventListener(this), 50); this.tabCompletion = new TabCompletion('message'); Event.observe(window, 'focus', this.focusEvent.bindAsEventListener(this)); E...
JavaScript
0
@@ -2014,24 +2014,56 @@ %7D);%0A + this.firePollers();%0A %7D%0A @@ -5262,24 +5262,94 @@ op');%0A %7D,%0A%0A + firePollers: function() %7B%0A this.pollers.invoke('execute');%0A %7D,%0A%0A startPolli
bcdf1e53373068ddb83b9118f876daa5fe9d5bdb
frequency = 1
gsuiOscillator/gsuiOscillator.js
gsuiOscillator/gsuiOscillator.js
"use strict"; class gsuiOscillator { constructor() { const root = gsuiOscillator.template.cloneNode( true ), sliders = {}, waves = [ new gsuiPeriodicWave(), new gsuiPeriodicWave() ]; this.onchange = () => {}; this.rootElement = root; this._waves = waves; this._selectWaves = {}; "sine tri...
JavaScript
0.998374
@@ -562,17 +562,17 @@ uency = -2 +1 ;%0A%09%09root
03448313e6b4f0ad41b329d08d95f1d8188bb84c
Fix event handler leak in MemberStatusMessageAvatar
src/components/views/avatars/MemberStatusMessageAvatar.js
src/components/views/avatars/MemberStatusMessageAvatar.js
/* Copyright 2018 New Vector Ltd 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software ...
JavaScript
0
@@ -2126,16 +2126,17 @@ entWillU +n mount()
b1d751400723877c47e7c9fa4eddf8012fedee9d
Change the name of Panel and Elements sidebar pane to 'Backbone'
js/devtools.js
js/devtools.js
// Script executed every time the devtools are opened. // custom panel chrome.devtools.panels.create("Backbone Debugger", "img/panel.png", "panel.html"); // custom sidebar pane in the elements panel chrome.devtools.panels.elements.createSidebarPane("Backbone Debugger", function(sidebar) { chrome.devtools.panels.e...
JavaScript
0.000004
@@ -104,25 +104,16 @@ Backbone - Debugger %22, %22img/ @@ -248,17 +248,8 @@ bone - Debugger %22, f
4745ad091e75512f637446052130b90771ec28ee
Make it possible to modify the map from outside
js/game/map.js
js/game/map.js
TRAFFICSIM_APP.game = TRAFFICSIM_APP.game || {}; TRAFFICSIM_APP.game.Map = function () { var TILE_SIZE = 8; // Measured in meters in real world /* Map object types: * Q = Road up left * E = Road up right * W = Road down left * R = Road bottom right * T = Road horizontal * Y = Roa...
JavaScript
0.000001
@@ -1265,32 +1265,287 @@ Size();%0A %7D;%0A%0A + this.insertObjectToLocation = function(id, row, column) %7B%0A var rows = map.split(%22%5Cn%22);%0A rows%5Brow%5D = rows%5Brow%5D.substr(0, column) + id + rows%5Brow%5D.substr(column + id.length); // Replace object in row%0A map = rows.join(%2...
bcc9cf4c67a90dbcf03b6d4374371d99a2b558c5
Fix #112 'FPS cout explodes while paused'
js/renderer.js
js/renderer.js
import createRegl from 'regl'; import CommandBuilder from './command-builder'; import RendererClock from './renderer/clock'; import RendererState from './renderer/state'; /** * The Renderer's job is to perform the following steps: * 1. Take a config object with the user's desired settings * 2. Inform the RendererSt...
JavaScript
0
@@ -1527,24 +1527,62 @@ ck.frame();%0A + if (!this.clock.isPaused()) %7B%0A this.f @@ -1653,16 +1653,24 @@ RENGTH;%0A + %7D%0A th
0e27494efa91cd30d96ff72f3b7be62233cb2921
Add legend service
js/services.js
js/services.js
angular.module('westernWaterApp').service('LoadService', function() { this.file_load = function (text_file, $scope) { d3.csv(text_file, function (error, graph) { load(graph); }); function load(data) { // put the data into angular's scope $scope.data = dat...
JavaScript
0
@@ -2902,32 +2902,1322 @@ chart;%0A %7D;%0A%0A + this.legend = function(selector, check) %7B%0A var keys = %5B'Capacity', 'Current Storage'%5D;%0A var colors = %5B'green', 'steelblue'%5D;%0A var width = 225;%0A var compare = document.querySelectorAll('#compare_legend .legend');%0A ...
d160607e3e3473eb4719607936bc7a863ada0324
remove unused baseURL variable in settings
js/settings.js
js/settings.js
var settings = { test:{ baseUrl: "http://staging-move1t.herokuapp.com/", apiUrl: "http://staging-move1t.herokuapp.com/" }, production:{ baseUrl: "http://staging-move1t.herokuapp.com/", apiUrl: "http://staging-move1t.herokuapp.com/" }, getSetting: function(setting){ var settings = JSON.par...
JavaScript
0.000001
@@ -23,61 +23,8 @@ t:%7B%0A - baseUrl: %22http://staging-move1t.herokuapp.com/%22,%0A @@ -98,105 +98,42 @@ -baseUrl: %22http://staging-move1t.herokuapp.com/%22,%0A apiUrl: %22http://staging-move1t.herokuapp.com +apiUrl: %22http://192.168.2.240:3000 /%22%0A
b0ffa511f4b77baed8b8d9d68e03d7d715e96c2f
Update settings.js
js/settings.js
js/settings.js
document.getElementById("demo").innerHTML = '<img id="myImage" src="http://i.imgur.com/AP5imrD.png" onclick="nedface()" height="200" width="600"><br>'; function hideface() { document.getElementById("demo").innerHTML = ''; document.getElementById("hide").innerHTML = ''; document.getElementById("show").innerHTML = '<ned...
JavaScript
0.000001
@@ -1182,28 +1182,683 @@ d(%22sbox%22).innerHTML = '';%0A%7D%0A +%0Afunction backgroundon() %7B%0Adocument.getElementById(%22bg%22).innerHTML = ' %3Cstyle type=%22text/css%22 id=%22bg%22%3E%0Ahtml, body, bg, background %7B%0A background-image: url(%22http://enjoycss.com/webshots/hB_1.png%22);%0A%7D%0A%3C/style%3E'...
4947ec49f6d1738fff745e546bd831c3574857bd
Add b32encode_trim and underlying b32encode, which was found on the web with an unrestricted license.
js_aux/misc.js
js_aux/misc.js
/* Stub translate function for eventual i8n. */ function translate(text) { return text }; $(document).ready(function() { /* Prevent "event.layerX and event.layerY are broken and deprecated ..." WebKit warning message, per: http://stackoverflow.com/questions/7825448/webkit-issues-with-event-layerx...
JavaScript
0
@@ -493,16 +493,19 @@ ford */%0A +// if (type @@ -534,24 +534,27 @@ unction') %7B%0A +// Object. @@ -572,24 +572,27 @@ ction (o) %7B%0A +// var @@ -611,16 +611,18 @@ () %7B%7D;%0A +// @@ -622,16 +622,17 @@ + F.protot @@ -640,16 +640,18 @@ pe = o;%0A +// @@ -647,...
047c522e3a3102df8818adba7e14ecf4dcced4c0
make selectToToggle happen before validate, so that the events are triggered in the correct order
htdocs/components/10_UserData.js
htdocs/components/10_UserData.js
// $Revision$ // JavaScript to dynamically change form action on the UserData upload page according to the option selected (or radio buttons checked) and do validation on the form Ensembl.Panel.UserData = Ensembl.Panel.extend({ init: function () { var panel = this; this.base(); this.elLk.active...
JavaScript
0
@@ -289,24 +289,84 @@ ase();%0A %0A + this.el.find('._stt').selectToToggle(%7B%7D, this.el);%0A %0A this.elL @@ -891,41 +891,8 @@ n'). -each(function () %7B%0A $(this). off( @@ -946,18 +946,16 @@ %7B%0A - - // chang @@ -1089,18 +1089,16 @@ isible)%0A - va @@ -1252,18 +1252,16 @...
4cdfb9021cab1111340cab45e55a1a953fbec5e6
use view.remove() instead of view.destroy() to clear bound events
client/spa/js/learning-resource/learning-resource.controller.js
client/spa/js/learning-resource/learning-resource.controller.js
'use strict'; var Backbone = require('../vendor/index').Backbone; var $ = require('../vendor/index').$; var Model = require('./learning-resource.model'); var View = require('./learning-resource.view'); module.exports = Backbone.Controller.extend({ routes: { 'learning-resource/:': 'list', 'learning-resource...
JavaScript
0.000001
@@ -936,19 +936,16 @@ %0A - // this.vi @@ -951,15 +951,14 @@ iew. -destroy +remove ();%0A
14689564b8f19a5bd61a078ab7ce5f1287a9284b
Set class.
devilry/apps/themebase/static/themebase/lib/AlertMessageList.js
devilry/apps/themebase/static/themebase/lib/AlertMessageList.js
/** A container of AlerMessages. This container is perfect for top-of-form messages. It defaults to beeing hidden. When you add a message it becomes invisible, and when you remove all messages, it hides itself automatically. */ Ext.define('themebase.AlertMessageList', { extend: 'Ext.panel.Panel', requires: [ ...
JavaScript
0
@@ -418,16 +418,45 @@ elist',%0A + cls: 'alertmessagelist',%0A hidd
c9d6b8acc9182dab863912cbfffaac351413d408
move some codes.
F.js
F.js
/*************************************************************************************** ** Author: Guillaume ARM *************************************************************** ** F.js: is little library utilites made for doing functional coding style with JS. **** *****************************************************...
JavaScript
0
@@ -350,16 +350,314 @@ *****/%0A%0A +%0A/////////////////////// PRIVATE ////////////////////////////////////////////////%0Aconst isUndefined = x =%3E (x === _)%0Aconst concatUndefined = xsa =%3E xsb =%3E%0A%09xsa.map(x =%3E !isUndefined(x) ? x : xsb.shift()).concat(xsb)%0A//////////////////////////////////////////////...
cf1b9aff6c4d4f0a2fe7f336b3e2735d3ddae013
refactor so make() is a series of ORs
i.js
i.js
var u = require('./util') function map$ (obj, map) { var $obj = {} for(var k in obj) $obj['$'+k] = map(obj[k]) return $obj } var maps = map$(require('./simple/maps'), function (fn) { return function (argument) { return function (value) { return fn(value, argument) } } }) var reduces = map$...
JavaScript
0.000009
@@ -1103,20 +1103,26 @@ unction -make +isBasicMap (rule) @@ -1400,16 +1400,18 @@ le%5D%0A %7D%0A + %0A if(tr @@ -1468,16 +1468,42 @@ value %7D%0A +%7D%0A%0Afunction isFun (rule) %7B %0A if(u. @@ -1532,16 +1532,51 @@ rn rule%0A +%7D%0A%0Afunction isArrayCompose (rule) %7B %0A if(u. @@ -1754,24 +1754,113...
7c0fd6280802a027077f4ef18379038fcfa3beac
create methods on a copy of seraph
co.js
co.js
var seraph = require('./lib/seraph'); var thunkify = require('thunkify'); var excludes = [ 'batch', 'operation' ]; module.exports = function() { var db = seraph.apply(null, [].slice.call(arguments)); return function wrapObject(obj) { Object.keys(obj).forEach(function(key) { if (typeof obj[key] == 'fu...
JavaScript
0
@@ -139,16 +139,20 @@ unction( +opts ) %7B%0A va @@ -168,46 +168,14 @@ raph -.apply(null, %5B%5D.slice.call(argumen +(op ts) -) ;%0A @@ -204,24 +204,43 @@ ject(obj) %7B%0A + var copy = %7B%7D;%0A Object.k @@ -363,35 +363,36 @@ '_') %7B%0A -obj +copy %5Bkey%5D = thunkify @@ -459,19 +459,20 @@...
ed36525a8ee86400bb7f8daaed8bf2f67aebae97
Store the device key for push notifications in a flat structure for better client access
db.js
db.js
const inherits = require('util').inherits; const EventEmitter = require('events').EventEmitter; function FirebaseDatabase(firebase, deviceKey) { if (!(this instanceof FirebaseDatabase)) return new FirebaseDatabase(firebase, deviceKey); EventEmitter.call(this); const self = this; self.db = firebase.database(...
JavaScript
0
@@ -372,20 +372,20 @@ const -ba +u se +r Ref = se @@ -411,22 +411,98 @@ uid%7D -/$%7BdeviceKey%7D%60 +%60);%0A const baseRef = userRef.child(deviceKey);%0A const deviceRef = userRef.child('device' );%0A @@ -651,24 +651,24 @@ ('sensor');%0A - const subs @@ -709,24 +709,156 @@ ription');%0A%0A + deviceRe...
df2371f961379ba71a44e687f4152bb5f0e9617b
Update js.js
js.js
js.js
function _(el) {return document.getElementById(el);} function _q(el) {return document.querySelector(el);} function _a(el) {return document.querySelectorAll(el);} function _cr(el) {return document.createElement(''+el+'');} function _ap(el,dest) {_q(''+dest+'').appendChild(el);} function _pp(el,dest) {_q(''+dest+'').inse...
JavaScript
0.000001
@@ -415,13 +415,10 @@ l) %7B -$( el -) .inn
b4230faff2104c177027d6bb9df12546b5a2da26
update entry
oj.js
oj.js
/** * XadillaX created at 2015-12-01 14:39:30 With ♥ * * Copyright (c) 2015 Souche.com, all rights * reserved. */ "use strict"; require("sugar"); const config = require("config"); const bodyParser = require("body-parser"); const express = require("express"); const pkg = require("./package"); global.__DOC_ROOT = ...
JavaScript
0
@@ -175,24 +175,71 @@ (%22config%22);%0A +const cookieParser = require(%22cookie-parser%22);%0A const bodyPa @@ -304,16 +304,118 @@ press%22); +%0Aconst session = require(%22express-session%22);%0A%0Aconst Exmcached = require(%22exmcached-session%22)(session); %0A%0Aconst @@ -1370,16 +1370,236 @@ %60));%0A%7D%0A%...
dbbcefed7b0f29fd43baa5c536df549444318ceb
Disable unavailable buttons
ui.js
ui.js
// codepoints is an int array, // tableId a string to a <table class="table table-striped"> // and buttons is an array of { // displayName: "Display name", // functionName: "function name", // require: function(idx, length) -> bool // }, // where each function name refers to a function taking a codepoint and a...
JavaScript
0.000002
@@ -797,16 +797,38 @@ ons%5Bj%5D;%0A +%09%09%09var disabled = '';%0A %09%09%09if (b @@ -934,17 +934,40 @@ %09%09%09%09 -continue; +disabled = 'disabled=%22disabled%22' %0A%09%09%09 @@ -999,16 +999,32 @@ %3Cbutton +' + disabled + ' onclick=
d544a8b6a1db97192919a7ef178972deca8a7efc
Add function export `link(linkTargetDir, linkName, options)` to module `api` which delegates to `lib/link.link(linkTargetDir, linkName, options)`
api.js
api.js
/* * Copyright 2014-2016 Guy Bedford (http://guybedford.com) * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless...
JavaScript
0
@@ -712,24 +712,58 @@ b/bundle');%0A +var link = require('./lib/link');%0A var core = r @@ -4166,12 +4166,516 @@ spiler);%0A%7D;%0A +%0A/**%0A * Link a local folder as an installable package%0A * @param %7Bstring%7D linkTargetDir Filesystem path to package source directory%0A * @param %7Bstring%7D linkName Uncanonic...
4d551975e56aae3638862daecfef42786546d157
use promiss, duh
api.js
api.js
'use strict'; function sendSms(toNumber, cb) { var twilio = require('twilio'); // Your accountSid and authToken from twilio.com/user/account var config = require('./config'); var accountSid = config.twilio.accountSid; var authToken = config.twilio.authToken; var client = twilio(accountSid, authToken); ...
JavaScript
0.000576
@@ -33,20 +33,16 @@ toNumber -, cb ) %7B%0A va @@ -309,16 +309,23 @@ en);%0A%0A +return client.m @@ -349,21 +349,16 @@ - - body: %22 -AJ p +P leas @@ -375,23 +375,86 @@ you %3C3%22 -, %0A - +// whichever number the 6-digit verification code was sent to%0A , to: toN @@ -462,44 +462,47 @@ mb...
9a09a3bf10535923804473edf1c921f0807632c1
add placeholder `github-webhooks` end point
api.js
api.js
const fs = require('fs'); const qs = require('qs'); const https = require('https'); const url = require('url'); const request = require('request'); const passport = require('passport'); const config = require('./config'); module.exports = function (app) { const GITHUB_API_ROOT = 'https://api.github.com'; functio...
JavaScript
0
@@ -3997,11 +3997,263 @@ );%0A %7D); +%0A%0A // handle github web hooks%0A app.post('/api/github-webhooks', passport.authenticate('oauth-bearer', %7B session: false %7D), function (req, res) %7B%0A console.log(%60received web hook:%5Cn$%7Breq.body%7D%60);%0A res.json(%7B message: 'received web hook' %7D);%0A ...
fcff7a0fec1a71552c00e81b39171340de1c2e3e
Send last mojang_services update when a socket connects
app.js
app.js
var server = require('./lib/server'); var ping = require('./lib/ping'); var logger = require('./lib/logger'); var mojang = require('./lib/mojang_services'); var config = require('./config.json'); var networkHistory = []; var connectedClients = 0; function pingAll() { var servers = config.servers; for (var i = 0; ...
JavaScript
0
@@ -2444,16 +2444,75 @@ ryList); +%0A%09%09client.emit('updateMojangServices', mojang.toMessage()); %0A%0A%09%09// A
402aca34f0f8c36cfa0d6897eb06036d34f31ed5
Change DB admin init to delete and overwrite.
app.js
app.js
/* * The MIT License * * Copyright 2014 Bertold von Dormilich <Dormilich@netscape.net>. * * 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...
JavaScript
0
@@ -4399,12 +4399,14 @@ ser. -find +remove (%7B i @@ -4423,15 +4423,10 @@ ue %7D -).exec( +, func @@ -4481,26 +4481,12 @@ %0D%0A%09%09 -if (!admin) %7B%0D%0A%09%09%09 +var admi @@ -4517,13 +4517,8 @@ );%0D%0A -%09%09%7D%0D%0A %09%09//
35f35568473ff4019807152ae287ee522182ed74
Increase Playlist limit to 50
app.js
app.js
(function(exports) { client_id = '17f243b944f14386af940a735d5c70c7'; redirect_uri = 'https://nachiketapte.com/spotify-reverse'; g_access_token = ''; g_username = ''; var doLogin = function(callback) { var url = 'https://accounts.spotify.com/authorize?client_id=' + client_id + '&response_type=token' + '&...
JavaScript
0.000003
@@ -3000,32 +3000,63 @@ pplication/json' +,%0A%09%09%7D,%0A%09%09data:%7B%0A%09%09%09'limit' : 50 %0A%09%09%7D,%0A%09%09success:
6c5a366e65255dfffdc5e86f5a03aa39b4a303cb
Add dialog for uploading image
app.js
app.js
var fs = require('fs'); var path = require('path'); var restify = require('restify'); var builder = require('botbuilder'); var server = restify.createServer(); /** * START BOOTSTRAP */ var applicationPassword = null; var config = { environment: (process.env.NODE_ENV || 'development'), botCredentials: {}, luis...
JavaScript
0
@@ -1364,16 +1364,497 @@ ough%22)); +%0A%0A//session.beginDialog('/uploadImage');%0A%0Abot.dialog('/uploadImage', %5B%0A (session) =%3E %7B%0A builder.Prompts.attachment(session, %22Upload an image and I'll send it back to you.%22);%0A %7D,%0A (session, results) =%3E %7B%0A var msg = new builder.Message(sessi...
2600615f1a210e4c73edf099a3b3198a627fcea3
fix build
app.js
app.js
const mongoose = require("mongoose"); mongoose.promise = global.Promise; const recaptcha = require("express-recaptcha"); const readline = require("readline").createInterface({input: process.stdin, output: process.stdout}); const util = require("util"); const PaintingManager = require("./util/PaintingManager"); const HT...
JavaScript
0.000001
@@ -4452,16 +4452,17 @@ e: now %7D + %7D, funct @@ -6556,8 +6556,9 @@ %7D%0A%7D) +%0A
6d2ce2a94a7a61db9c67817d15f8932b130f3aa3
Save event tracking data to database
app.js
app.js
// Licensed under the Apache 2.0 License. See footer for details. var express = require('express'), http = require('http'), path = require('path'), cloudant = require('cloudant'), program = require('commander'), dotenv = require('dotenv'), bodyParser = require('body-parser'); dotenv.load(); v...
JavaScript
0
@@ -1261,30 +1261,48 @@ ;%0A %7D%0A -console.log(%22A +var event = %7B%7D;%0A if (req.body.a pplicati @@ -1307,27 +1307,26 @@ tion - Name: %22 + req.body +_name) %7B%0A event .app @@ -1342,51 +1342,89 @@ name -);%0A console.log(%22Application Space ID: %22 + + = req.body.application_name;%0A %7D%0A if (r...
f93ae131c9cd202e7ab584230438198245995ce1
add logs
app.js
app.js
'use strict'; // don't be a dummy var express = require('express'); var request = require('request'); var bodyParser = require('body-parser'); var SummaryTool = require('node-summary'); var app = express(); var port = process.env.PORT || 3000; var args = process.argv; var team = args[2]; var token = args[3]; var api...
JavaScript
0.000002
@@ -740,16 +740,42 @@ );%0A %7D%0A%0A + console.log(req.body);%0A%0A // set @@ -919,16 +919,67 @@ apiToken +,%0A channel : %7B%0A channelId : channelId%0A %7D %0A %7D;%0A%0A @@ -1009,16 +1009,40 @@ = bot;%0A + console.log(res.bot);%0A next() @@ -1416,32 +1416,76 @@ 0 && body.ok) %7B%0A + ...
95e2fdf26c6e7b765170b21dfc1c247ef952cc8b
Revert "Set header cache control"
app.js
app.js
let express = require('express') let methodOverride = require('method-override') let bodyParser = require('body-parser') let cors = require('cors') let app = express() let path = require('path') let swig = require('swig') let acl = require('express-acl') let helmet = require('helmet') let compression = require('compres...
JavaScript
0
@@ -979,29 +979,10 @@ ic') -, %7B maxAge: '5d' %7D )) -; %0A%0A// @@ -1414,142 +1414,8 @@ %7D)%0A%0A -// cache control%0Aapp.use(function (req, res, next) %7B%0A res.setHeader('Cache-Control', 'public, max-age=432000');%0A return next();%0A%7D)%0A%0A // r
a9019f0d54809c974a1ce23b3b3f07b09f597a6c
remove unwanted texts
app.js
app.js
Todos = new Meteor.Collection('todos'); Todos.allow({ remove: function() { return true; }, update: function() { return true; } }); Meteor.methods({ addTodo: function(title) { var a = Todos.insert({'title': title}); console.log('n8866666'); } }); if(Meteor.isServer) { Meteor.publish('todos', functio...
JavaScript
0.000001
@@ -224,37 +224,8 @@ %7D);%0A - console.log('n8866666');%0A %7D%0A
6051fd504c41474ce5cd4f71ccaa68a679b6ad67
Add ooooo
app.js
app.js
var express = require('express'); var bodyParser = require('body-parser'); var app = express(); var port = process.env.PORT || 1337; app.use(bodyParser.urlencoded({ extended: true })); app.get('/', function (req, res) { res.status(200).send('Hello World'); }); app.listen(port, function() { console.log('listen...
JavaScript
0.000491
@@ -616,12 +616,314 @@ d();%0A%09%7D%0A%0A%7D); +%0A%0Aapp.post('/ooo', function(req, res, next) %7B%0A%09var username = req.body.user_name;%0A%09var botPayoad = %7B%0A%09%09text: 'Oooo, deste momci? Radimo a?',%0A%09%09challenge: req.body.challenge;%0A%09%7D;%0A%0A%09if (username !== 'slackbot') %7B%0A%09%09return re...
af8c69d0fd8738a7dabdcf53821791f0542067b4
Fix 101 error when run on Windows
app.js
app.js
var express = require('express'); var _ = require('lodash'); var path = require('path'); var phantom = require('phantom'); var expressServer; //Default options var config = { port: 1337, options: { lineHeigth: "40px", fontSize: "25px", width: "400px" }, callback: null, googleAPIKey: "" }; /** * Start basi...
JavaScript
0
@@ -1176,16 +1176,37 @@ ol=any%22, + %22--web-security=no%22, functio @@ -2398,8 +2398,9 @@ otstrap; +%0A
38c7ac4434bdf3d5df8632e9da32dbb5524b5d46
Add require statements
app.js
app.js
/** * Module dependencies. */ var express = require('express'); var http = require('http'); var path = require('path'); var handlebars = require('express3-handlebars') var index = require('./routes/index'); // Example route // var user = require('./routes/user'); var add = require('./routes/add'); var app = expre...
JavaScript
0.001622
@@ -296,16 +296,152 @@ s/add'); +%0Avar foodfinder = require('./routes/foodfinder');%0Avar messages = require('.routes/messages');%0Avar profile = require('./routes/profile'); %0A%0Avar ap
6f8ea26ff62d2096084ff85142ba1ae67f63f59c
move dev initialization
app.js
app.js
// node modules require('./lib/utils'); require('./lib/config'); require('./lib/responses'); const bodyParser = require('body-parser'); const db = require('./lib/db'); const express = require('express'); const expressHandlebars = require('express-handlebars'); const http = require('http'); const middleware = require('....
JavaScript
0.000001
@@ -1638,46 +1638,12 @@ );%0A%0A -%7D).catch(err =%3E console.error(err));%0A%0A + if ( @@ -1692,8 +1692,45 @@ ev'); %7D%0A +%7D).catch(err =%3E console.error(err));%0A
5192a9bda6817b05879b9848fc87ff0d7ba1c790
set correctly bottom scroll
app.js
app.js
const dom = { sidebar: document.getElementById('sidebar'), overlay: document.getElementById('overlay'), blinking: document.getElementsByClassName('blinking'), terminalText: document.getElementById('terminal-text'), scrollUp: document.getElementById('scroll-up'), whoami: document.getElementById('whoami'), ...
JavaScript
0
@@ -2111,10 +2111,11 @@ op: -25 +100 00,%0A
1bba0e18bc7221580308890087a5334c0122ebf7
Create Web Server & Handle route GET and POST
app.js
app.js
// Problem: We need a simple way to look at a user's badge count and JavaScript point from a web browser // Solution: Use Node.js to perform the profile look ups and server our template via HTTP // 1. Create a web server var http = require('http'); http.createServer(function (request, response) { response.writeHead(...
JavaScript
0
@@ -298,302 +298,442 @@ %7B%0A -response.writeHead(200, %7B'Content-Type': 'text/plain'%7D);%0A response.write('This is before the end%5Cn');%0A response.end('Hello World%5Cn');%0A%7D).listen(3000);%0Aconsole.log('Server is running on port 3000');%0A%0A// 2. Handle HTTP route GET / and POST / i.e. Home%0A%09// if ...
de52ab3620242ebfef0f6f7a79f4d41854a7ba73
Test route
app.js
app.js
var express = require('express'); var app = express(); var bodyParser = require('body-parser'); app.use(bodyParser.json()); // for parsing application/json app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded var Config = require('./lib/config'); var log = require('./li...
JavaScript
0.000132
@@ -473,24 +473,216 @@ t 80')%0A%7D);%0A%0A +app.all(/%5E%5C/test%5C/.*/, function (req, res) %7B%0A log.debug('test url', req.originalUrl);%0A log.debug('test headers', req.headers);%0A log.debug('test body', req.body);%0A res.send();%0A%7D);%0A%0A app.post('/'
85eb17406f327e534f3c3b26e2198e626415542e
add cfenv
app.js
app.js
var net = require('net'); var sockets = []; /* * Cleans the input of carriage return, newline */ function cleanInput(data) { return data.toString().replace(/(\r\n|\n|\r)/gm,""); } /* * Method executed when data is received from a socket */ function receiveData(socket, data) { var cleanData = cleanInput(data...
JavaScript
0.000001
@@ -19,16 +19,46 @@ 'net');%0A +var cfenv = require(%22cfenv%22);%0A %0Avar so @@ -1364,8 +1364,24 @@ ten( +cfenv.port %7C%7C 888 8 -0 );
8666df6d445278c55624df44b54519ded0c13100
Revert "chgane console.log to console.error"
app.js
app.js
// エラー処理は終了にしているので適当にプロセス監視してください const keyword = process.env.keyword const axios = require('axios'); const webhook_url = process.env.webhook_url const twitter = require('twitter'); const client = new twitter({ consumer_key: process.env.twitter_consumer_key, consumer_secret: process.env.twitter_consumer_secret, a...
JavaScript
0
@@ -542,21 +542,19 @@ console. -error +log ('webhoo @@ -554,34 +554,53 @@ 'webhook error.' -, +);%0A console.log( error);%0A pr @@ -817,21 +817,19 @@ console. -error +log ('twitte @@ -837,18 +837,37 @@ error.' -, +);%0A console.log( error);%0A
a317aa712500d51e7070681956c979705c1d7176
add some placeholder html
app.js
app.js
'use strict'; // -- Module Dependencies -- // ------------------- var express = require('express'); var http = require('http'); var JWT = require('./lib/jwtDecoder'); var path = require('path'); var request = require('request'); var config = require('./config/default'); var parseStri...
JavaScript
0.000001
@@ -458,16 +458,59 @@ son');%0A%0A +var indexhtml = %22Placeholder text for JB%22%0A%0A function @@ -5093,396 +5093,44 @@ ) %7B%0A - var caEditUrl = 'CA_EDIT_URL';%0A var editCAUrl = process.env%5BcaEditUrl%5D;%0A // add the number of steps to the query string ... not sensitive info%0A var numSteps = pro...
616dfb52be5dc405f6f1e3bb021da52a050ac118
write album info to database
app.js
app.js
var express = require('express') var AWS = require('aws-sdk') var fs = require('fs') // local modules var config = require('./aws-config.json') console.log(config) AWS.config.loadFromPath('./aws-config.json') var s3 = new AWS.S3(); var s3_params = { Bucket:config.bucket } var s3_dir_value = false // album - (O...
JavaScript
0.000001
@@ -77,16 +77,48 @@ re('fs') +%0Avar Datastore = require('nedb') %0A%0A// loc @@ -175,29 +175,8 @@ ')%0A%0A -console.log(config)%0A%0A AWS. @@ -293,28 +293,77 @@ var -s3_dir_value = false +db = new Datastore(%7B filename: './aws-wrangler.db', autoload: true%7D); %0A%0A// @@ -817,18 +817,18 @@ a is tru +n c -t ...
bcc4576a2a5f86b4e3ce426d6125a071c1c7fbe7
remove dropbox requirement
app.js
app.js
var express = require('express'), everyauth = require('everyauth'), qs = require('querystring'), url = require('url'), rk = require('node-runkeeper/lib/runkeeper'), OAuth = require('oauth').OAuth, DropboxClient = require('dropbox').DropboxClient, RedisStore = require('connect-redis')(express...
JavaScript
0.000001
@@ -214,62 +214,8 @@ th,%0A - DropboxClient = require('dropbox').DropboxClient,%0A
4376958c4ad4e248324c626521b1b1d74d987869
teste no botao
app.js
app.js
var express = require('express'); var request = require('request'); var bodyParser = require('body-parser'); var watson = require('watson-developer-cloud'); var app = express(); var contexid = ""; app.use(bodyParser.urlencoded({ extended: false })) app.use(bodyParser.json()) var conversation_id = ""; var w_conversati...
JavaScript
0.000023
@@ -3545,24 +3545,57 @@ %22type%22:%22 -postback +web_url%22,%0A %09%09%09%22url%22:%22google.com.br %22,%0A @@ -3622,21 +3622,106 @@ e%22:%22 -Bookmark Item +Google%22,%0A %09%09%09%7D,%0A %09%09%09%7B%0A %09%09%09%09%22type%22:%22postback%22,%0A %09%09%22title%22:%22Start Chat...
3e6db5efd2d25ab673f8c77734ecb9b4de924588
Add default case to example file
app.js
app.js
var express = require('express'); var bunyan = require('bunyan'); var log = bunyan.createLogger({ name: 'app' }); var app = express(); var webhooks = require('datashaman-webhooks'); webhooks.boot(app, 'somesecret'); app.post('/', webhooks.router(function(req, res, event) { log.info(req.body, event); switch ...
JavaScript
0.000001
@@ -366,16 +366,87 @@ Ping');%0A + break;%0A default:%0A res.send('Unhandled event: ' + event);%0A %7D%0A%7D)
186f742eb8c68383eb67d970778102d5e046f573
support for stograncazzo in /camel endpoint
app.js
app.js
var Hapi = require('hapi'), Utils = require('./lib/utils.js'), config = require('./config.js'), server = new Hapi.Server(), sc = config.sc; server.connection({port: config.port}); server.route({ method: 'GET', path: '/', handler: function(request, reply){ var r = {response: sc}; Utils.requestFormatter(req...
JavaScript
0
@@ -803,32 +803,58 @@ tter(request, r) +dilate(request, r, 'Gran') ;%0A%09%09return reply
96383558f19389bd16dc3db5900e21e4a6066294
Change the listening port to 3000 (for AWS)
app.js
app.js
/** * Module dependencies. */ var express = require( 'express' ); var http = require( 'http' ); var path = require( 'path' ); var engine = require( 'ejs-locals' ); var favicon = require( 'serve-favicon' ); var cookieParser = require( 'cookie-parser' ); var bodyParser =...
JavaScript
0.000002
@@ -700,9 +700,9 @@ 300 -1 +0 );%0A
441bc30ea538aedb5d9a8c070990d57db5d80c8f
Swap broken if/else statement
app.js
app.js
var config = require('./config'), _ = require('underscore'), httpServer, express = require('express'), partials = require('express-partials'), Promise = require('promise'), authManager = require('./lib/authentication'), passport = authManager.passport, socketAuthenticator = require('./li...
JavaScript
0.000058
@@ -3654,12 +3654,11 @@ .get -Open +All Pull @@ -3700,35 +3700,36 @@ = gitManager.get -All +Open Pulls();%0A %7D%0A%0A
e07257f3c0318f91568d06fed878933cb9b7cc42
add header
app.js
app.js
'use strict' let React = require("react") , app = require("koa")() , _static = require("koa-static") , router = require("./router") , config = require("config") , port = config.port || 80 app .use(function* (next) { try { if (config.online) { console.log(this.method + " " + this.href + " from " + this.ip) if ...
JavaScript
0.000001
@@ -665,16 +665,8 @@ his. -headers. set(
2cdae1d06cbf9a51120de6e09f07f93deb94c9f8
Remove legacy path
app.js
app.js
require('sugar') var googlePlus = require('./lib/google-plus'), express = require('express'), errors = require('./lib/errors') var app = express.createServer() app.configure(function() { app.use(express.static(__dirname + '/public')) app.set('views', __dirname + '/views') app.set('view engin...
JavaScript
0.000003
@@ -934,136 +934,8 @@ %7D)%0A%0A -// Legacy path%0Aapp.get('/users/:id/feed', function(request, response) %7B%0A response.redirect('/' + request.params.id, 301)%0A%7D)%0A%0A app.
8644edee72324dacf3c80de1afa9b04725eabae1
set state with promise
app.js
app.js
/** * AWS DynamoDB */ AWS.config.update({ region: 'ap-southeast-1', accessKeyId: 'AKIAJEZJR6ZGINIW5YYQ', secretAccessKey: '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', }); const docClient = new AWS.DynamoDB.DocumentClient(); const db = { tables: { grains: 'taxisg.grains', locations: 'taxisg.locations' ...
JavaScript
0.000091
@@ -650,16 +650,64 @@ %7D;%0A%0A + return new Promise((resolve, reject) =%3E %7B%0A docC @@ -749,16 +749,18 @@ %7B%0A + if (err) @@ -774,26 +774,23 @@ + return -console.log +reject (err @@ -802,16 +802,18 @@ + %7D%0A cons @@ -812,88 +812,40 @@ + -console.log(da...
3bcdaa4df5aaaece34579bd29590dfda8c0c2010
Revert "prevent weird redirect loop"
app.js
app.js
var path = require('path'); var nconf = require('nconf'); var config_path = process.env.OHE_CONFIG_PATH || path.join(__dirname, '/config.json'); var asset_map_path = process.env.OHE_ASSET_MAP_PATH || path.join(__dirname, '/asset_map.json'); nconf.argv().env('__').file({file: config_path}); nconf.add('asset_map', {typ...
JavaScript
0
@@ -3114,132 +3114,8 @@ %0A%7D%0A%0A -var noCache = function (req, resp, next) %7B%0A resp.setHeader('Cache-Control', 'no-cache, no-store, max-age=0');%0A next();%0A%7D%0A%0A app. @@ -3122,25 +3122,16 @@ get('/', - noCache, routes. @@ -3155,25 +3155,16 @@ /muted', - noCache, routes. @@ -3202,25 +3202,16 @@ n...
a6dce708639c48555a97d02846cfef2bc5993e1b
Remove whitespace
app.js
app.js
'use strict'; /** * Module dependencies. */ var express = require('express'), http = require('http'), pg = require('pg'), cors = require('cors'), async = require('async'), config = require('./config'), app = express(); var corsOptions = { origin: 'http://gekko.stolarsky.com' }; // all env...
JavaScript
0.999999
@@ -2492,22 +2492,16 @@ ', err); - %0A r
0561a1522024c82a3c6bb991ef361045e42565d7
test 2
app.js
app.js
var express = require('express'), app = express(), server = require('http').createServer(app), io = require('socket.io').listen(server), colors = require('colors'), mongoose = require('mongoose'), connectCounter = "0"; server.listen(3000); app.use(express.static(__dirname + '/public')); app.ge...
JavaScript
0.000003
@@ -2339,20 +2339,16 @@ -var aquaTemp
37b7b90b130cedc760d071245c13a84799e42d48
fix app.js
app.js
app.js
var App = pc.createScript('app'); App.attributes.add("PHOTON CLOUD",{type:"title"}); App.attributes.add("appid",{type:"string",default:"",title:"AppId",description:"Please input your AppId"}); App.attributes.add("appversion",{type:"string",default:"1.0",title:"Appversion",description:"Application version. You can not b...
JavaScript
0.00011
@@ -432,16 +432,181 @@ fault',%0A + description: 'Photon Cloud has servers in several regions, distributed across multiple hosting centers over the world.You can choose optimized region for you.',%0A enum
346c5fb12692d25e5fb46764c6180288fe065bb8
change valid license comment to app.js.
app.js
app.js
/************************************************************ * * NODE-HOME-AUTOMATION * designed by JVA * * Code license: GNU GPL v2 * ************************************************************/ /* * * Module dependencies. */ var //node.js modules: express = require('express') , http = r...
JavaScript
0
@@ -67,28 +67,15 @@ * -NODE-HOME-AUTOMATION +HOME.JS %0A * @@ -118,18 +118,11 @@ se: -GNU GPL v2 +MIT %0A *%0A
cd9aedff37c069230ca758056f10816aebbff0fb
Set API to allow commit filtering by date/author
app.js
app.js
var fs = require('fs'), path = require('path'), api = require('./lib/vso-api'), repo = require('./lib/repo'), config = require('./lib/config'); var express = require('express'); var bunyan = require('bunyan'); var logger = bunyan.createLogger({ name: 'vso-activity', serializers: bunyan.stdSeria...
JavaScript
0
@@ -1,12 +1,39 @@ var +_ = require('lodash'),%0A fs = req @@ -385,36 +385,37 @@ level: ' -info +error ',%0A s @@ -2359,32 +2359,170 @@ ion(req, res) %7B%0A + var since = parseInt(req.query.since %7C%7C (new Date().getTime()/1000) - (60*60*24*7));%0A var author = req.query.auth...
05ca1529a5303ca9a13ef3dbb610e3a9c5d21026
Remove user from 'users' when they disconnect.
app.js
app.js
var express = require('express'); var app = express(); var path = require('path'); var server = require('http').Server(app); var io = require('socket.io')(server); var strftime = require('strftime'); var users = []; var usercount = 0; var port = process.env.PORT || 8080; app.use('/js', express.static(path.join(__dirn...
JavaScript
0.000002
@@ -634,24 +634,70 @@ unction() %7B%0A + users.pop(socket.username.toLowerCase());%0A io.emit(
08b58219cef4fcc916dd7f97de9edd404b105e23
support for env.PORT
bin.js
bin.js
#!/usr/bin/env node var registry = require('./') var minimist = require('minimist') var argv = minimist(process.argv, {alias:{p:'port'}}) var server = registry() var log = function(ns) { ns += ' '.slice(ns.length)+' :' console.log(Array.prototype.join.call(arguments, ' ')) } var id = function(obj) { re...
JavaScript
0
@@ -698,16 +698,36 @@ .port %7C%7C + process.env.PORT %7C%7C 8000, f @@ -804,12 +804,13 @@ s().port)%0A%7D) +%0A
5d6f1c31c491aa11ed2e66c93942f47e00613f53
use minimist correctly (#429)
bin.js
bin.js
#! /usr/bin/env node process.title = 'bankai' require('v8-compile-cache') var ansi = require('ansi-escape-sequences') var minimist = require('minimist') var dedent = require('dedent') var path = require('path') var USAGE = ` $ ${clr('bankai', 'bold')} ${clr('<command> [entry]', 'green')} [options] Commands: ...
JavaScript
0
@@ -1584,21 +1584,16 @@ -' base -' : 'b -ase '%0A
5f5b702999ad1276a2016616431c3d432b300465
Change environment variables to object
bot.js
bot.js
var Twit = require('twit'); // var consumer_key = process.env.CONSUMER_KEY; // var consumer_secret = process.env.CONSUMER_SECRET; // var access_token = process.env.ACCESS_TOKEN; // var secret_token = process.env.ACCESS_TOKEN_SECRET; var twitInfo = [process.env.CONSUMER_KEY, process.env.CONSUMER_SECRET, process.env.ACC...
JavaScript
0.000004
@@ -21,23 +21,33 @@ twit');%0A -// +%0A var +twitInfo = %7B consumer @@ -50,18 +50,17 @@ umer_key - = +: process @@ -76,24 +76,27 @@ UMER_KEY -;%0A// var +,%0A consume @@ -103,18 +103,17 @@ r_secret - = +: process @@ -132,24 +132,27 @@ R_SECRET -;%0A// var +,%0A access_ @@ -152,26 +15...
490446d87d8068bbe3c7d46b4c5bde8926083a44
stop after finding a match
bot.js
bot.js
var fs = require('fs'); var token = process.env.SLACK_BOT_TOKEN || ''; var message_map = {}; var bot_type = process.env.SLACK_BOT_TYPE || 'default'; function loadConfig(){ fs.readFile('./config/' + bot_type + '.json', function(err, data) { if (err) console.log('Failed to load bot ' + bot_type + ' config...
JavaScript
0.000058
@@ -143,16 +143,17 @@ fault';%0A +%0A function @@ -165,19 +165,23 @@ Config() + %7B%0A -%09 + fs.readF @@ -240,17 +240,20 @@ data) %7B%0A -%09 + if ( @@ -257,25 +257,25 @@ f (err)%0A -%09 + console. @@ -258,32 +258,35 @@ (err)%0A + console.log('Fai @@ -335,21 +335,24 @@ ...
7a27750100ec3011a34e5e535136a23945c11809
fix module-type opt
cli.js
cli.js
#!/usr/bin/env node var version = require('./package.json').version; var path = require('path'); var fs = require('fs'); var lexParser = require('lex-parser'); var RegExpLexer = require('./regexp-lexer.js'); var opts = require("nomnom") .script('jison-lex') .option('file', { flag: true, position: 0, ...
JavaScript
0.000001
@@ -1543,27 +1543,31 @@ e = opts -. +%5B' module -T +-t ype +'%5D ;%0A if
d8322c954bb22997fbe8f12b10ba290f3783a728
Add the link command to the cli
cli.js
cli.js
#!/usr/bin/env node // usage: // npm [global options] command [command args] // only run as main module. if (module.id !== ".") return; // figure out where we're at. // don't assume that npm is installed in any particular spot, since this // might conceivably be a bootstrap attempt. var fs = require("fs"), path = ...
JavaScript
0.000001
@@ -789,16 +789,29 @@ %22build%22%0A + , %22link%22%0A %5D,%0A
e8dfc0770fe4aab2555e0ba4f4643371cb8b793e
Update CLI
cli.js
cli.js
#!/usr/bin/env node 'use strict'; var getBrowsers = require('./'); var pkg = require('./package.json'); /** * Help screen */ function help() { console.log(pkg.description); console.log(''); console.log('Usage'); console.log(' $ get-browsers'); } /** * Show help */ if (process.argv.indexOf('-h'...
JavaScript
0.000001
@@ -754,16 +754,21 @@ browser +.item );%0A %7D
c0b77fb17fa2de8942a78073240bb471c5fb2c07
Bring back descriptions
cli.js
cli.js
#!/usr/bin/env node "use strict"; const path = require('path'); const yargs = require("yargs"); const ipt = require("ipt"); const out = require("simple-output"); const readPkg = require('read-pkg'); let tasks; let descriptions; const sep = require("os").EOL; const { execSync } = require("child_process"); const { arg...
JavaScript
0
@@ -2136,119 +2136,34 @@ s = -%7B exports: %7B%7D %7D;%0A%09%09pkgInfo(descriptions, %7B dir: cwd, include: %5B%22ntl%22%5D %7D);%0A%09%09descriptions = descriptions.exports +readPkg.sync(%7B cwd: cwd %7D) .ntl @@ -2179,14 +2179,8 @@ ions - %7C%7C %7B%7D ;%0A%09%7D @@ -2198,21 +2198,17 @@ %7B%0A%09%09 -console.wa...
b8ade5cce6691959552770c81e866f3fd4f77383
add sourceMap support
cli.js
cli.js
#!/usr/bin/env node 'use strict' const fs = require('fs') const path = require('path') const process = require('process') const cli = require('cli') const mkdirp = require('mkdirp') const { transformFile } = require('./index') const CWD = process.cwd() const extensions = ['js', 'es', 'es6'] cli.parse({ in: ['i'...
JavaScript
0.000001
@@ -1050,11 +1050,9 @@ de)%0A - %0A + @@ -1533,17 +1533,16 @@ ile)) %7B%0A -%0A @@ -1645,16 +1645,106 @@ de)%0A +%0A if (sourceMaps) %7B%0A writeFile(path.join(_outfile, '.map'), map)%0A %7D%0A %7D - %0A @@ -1958,29 +1958,16 @@ t('/')%0A - const file = parts....
7c8dd7fa4f50938d5a44d928e0973b6793a9bcef
add support for `options.remove`, close #1
cli.js
cli.js
#!/usr/bin/env node /** * npm-related <https://github.com/tunnckoCore/npm-related> * * Copyright (c) 2015 Charlike Mike Reagent, contributors. * Released under the MIT license. */ 'use strict'; var is = require('is-kindof'); var meow = require('meow'); var chalk = require('chalk'); var multiline = require('multi...
JavaScript
0.000001
@@ -692,16 +692,75 @@ cription +%0A --remove glob patterns (can be comma separated) %0A%0A Us @@ -950,19 +950,215 @@ s 2%0A -%0A */%7D))%0A%7D) + npm-related template assemble remarkable --remove assemble%0A%0A */%7D))%0A%7D);%0A%0Avar remove = cli.flags.remove %7C%7C '';%0Aif (remove.indexOf(','...
c93444e84dcc3d21974da1ca8837037806c4e3d7
Call functions on render.
dib.js
dib.js
define(['render', 'dom'], function(render, dom) { function Dib(name) { // TODO: Implement ability to pass element directly. (??) this._name = name; } Dib.prototype.container = function(container) { this._container = container; return this; } Dib.prototype.events = functio...
JavaScript
0
@@ -472,17 +472,19 @@ var -$ +out = rende @@ -489,61 +489,8 @@ der. -$%0A , render = render.render;%0A %0A var out = rend @@ -819,16 +819,23 @@ el = +render. $(dom.cr @@ -1227,24 +1227,31 @@ el = +render. $(out);%0A @@ -1283,32 +1283,32 @@ = 'function') %7B%0A - el = ...
775982b8ea976bedc3eb5d5ac313182c6701eabc
Fix for .text() pulling from subnodes
dna.js
dna.js
// dna.js Template Cloner, version 0.2 (beta) // GPLv3/MIT, see: dnajs.org/license.html // Copyright (c) 2013 Center Key Software and other contributors var dna = {}; dna.util = { defaults: function(options, defaults) { //Sets each missing field in options to its default value if (options) for...
JavaScript
0.000001
@@ -885,30 +885,26 @@ %7D,%0A -findFieldElems +isDnaField : functi @@ -902,32 +902,24 @@ d: function( -template ) %7B%0A // @@ -920,374 +920,324 @@ -//Returns list of elements whose content is a dna field%0A return template.find('*').filter(%0A function() %7B return $(this).text().match...
bed8e4793d76322e342902270ced9cfe6ac0d49f
Handle webhook errors
g2d.js
g2d.js
#! /usr/bin/env node var fs = require('fs'); var http = require('http') var request = require('request') var config = JSON.parse( fs.readFileSync('config.json') ); // Ensure all files in object var mandatory_discourse_props = ["api_key", "api_user", "domain", "topic_id"] var mandatory_webhook_props = ["se...
JavaScript
0.000002
@@ -3642,12 +3642,77 @@ oad.zen)%0A%7D)%0A +%0Ahandler.on('error', function(event) %7B%0A console.log(event)%0A%7D)%0A