commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
7d11bdf4d584b592bb5e751ce637313cf761a51b | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var browserify = require('browserify');
var vinyl = require('vinyl-source-stream');
var tsify = require('tsify');
var watchify = require('watchify');
const JS_OUTPUT = 'bundle.js';
const DIST_DIR = './dist';
function compile() {
return browserify({
basedir: '.',
debug: true,
... | var gulp = require('gulp');
var browserify = require('browserify');
var vinyl = require('vinyl-source-stream');
var tsify = require('tsify');
var watchify = require('watchify');
const JS_OUTPUT = 'bundle.js';
const DIST_DIR = './dist';
function compile() {
return browserify({
basedir: '.',
debug: true,
... | Fix a bug where `watch` task was not working. | Fix a bug where `watch` task was not working.
| JavaScript | unknown | lanets/floorplan-2,lanets/floorplanets,lanets/floorplanets,lanets/floorplan-2,lanets/floorplan-2,lanets/floorplanets | ---
+++
@@ -25,13 +25,12 @@
.pipe(gulp.dest(DIST_DIR));
}
-// Recompile TypeScript on file change.
+// Watch the source code and recompile on modifications
+var watchedBrowserify = watchify(compile());
+watchedBrowserify.on("update", watch);
+
function watch() {
- var task = watchify(compile());
-
- task.o... |
03fba42ffe6b52c1e9c4f9a4c076acbf722d2ba6 | browser/dom.js | browser/dom.js | const flatten = require('flatten')
const Set = require('es6-set')
function normalizeRoot(root) {
if(!root) return document
if(typeof(root) == 'string') return $(root)
return root
}
function $(selector, root) {
root = normalizeRoot(root)
return wrapNode(root.querySelector(selector))
}
$.all = function $$(sel... | const flatten = require('flatten')
const Set = require('es6-set')
function normalizeRoot(root) {
if(!root) return document
if(typeof(root) == 'string') return $(root)
return root
}
function $(selector, root) {
root = normalizeRoot(root)
return wrapNode(root.querySelector(selector))
}
$.all = function $$(sel... | Fix $.wrap for null This also fixes $ for when no element is found | Fix $.wrap for null
This also fixes $ for when no element is found
| JavaScript | mit | CoderPuppy/movie-voting.js,CoderPuppy/movie-voting.js,CoderPuppy/movie-voting.js | ---
+++
@@ -30,6 +30,8 @@
}
function wrapNode(node) {
+ if(!node) return null
+
node.find = function(sel) {
return $(sel, node)
} |
1cd730878eab16266d4d3a71d3f789427af4768f | src/services/common/load.js | src/services/common/load.js | import { resolve } from 'path';
import { load as grpcLoad } from 'grpc';
// The proto files are copied as part of the build script (see package.json) to a '/protos'
// folder under the root of the project
const root = resolve(__dirname, '../../protos');
/**
* Common function for loading a protobuf file. Returns the... | import { resolve } from 'path';
import { load as grpcLoad } from 'grpc';
// The proto files are copied as part of the build script (see package.json) to a '/protos'
// folder under the root of the project
const root = resolve(__dirname, '../../protos');
/**
* Common function for loading a protobuf file. Returns the... | Load should convert fields to camel case | Load should convert fields to camel case
| JavaScript | apache-2.0 | KillrVideo/killrvideo-nodejs,KillrVideo/killrvideo-nodejs | ---
+++
@@ -9,7 +9,7 @@
* Common function for loading a protobuf file. Returns the proto object.
*/
export function load(file) {
- return grpcLoad({ root, file });
+ return grpcLoad({ root, file }, 'proto', { convertFieldsToCamelCase: true });
};
export default load; |
05f7801ff6cab53446e74ae92798dcec80e81ac6 | config/ember-try.js | config/ember-try.js | /*jshint node:true*/
module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-release',
dependencies: {
'ember': 'components/ember#release'
},
resolutions: {
'ember': 'release'
}
},
{
name: 'ember-beta',
... | /*jshint node:true*/
module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-1.12',
dependencies: {
'ember': '1.12'
}
},
{
name: 'ember-1.13',
dependencies: {
'ember': '1.13'
}
},
{
name: '... | Add Ember 1.12 and 1.13 to tests | Add Ember 1.12 and 1.13 to tests | JavaScript | mit | pk4media/fireplace,rlivsey/fireplace,pk4media/fireplace,rlivsey/fireplace | ---
+++
@@ -4,6 +4,18 @@
{
name: 'default',
dependencies: { }
+ },
+ {
+ name: 'ember-1.12',
+ dependencies: {
+ 'ember': '1.12'
+ }
+ },
+ {
+ name: 'ember-1.13',
+ dependencies: {
+ 'ember': '1.13'
+ }
},
{
name: 'ember-rele... |
659574a11fc1f292326cdc3e6f14617cc313085b | tasks/typedoc.js | tasks/typedoc.js | module.exports = function (grunt) {
'use strict';
grunt.registerMultiTask('typedoc', 'Generate TypeScript docs', function () {
var options = this.options({});
var args = [];
for (var key in options) {
if (options.hasOwnProperty(key)) {
args.push('--' + key);
if (!!options[key]) {
args.push(opt... | module.exports = function (grunt) {
'use strict';
grunt.registerMultiTask('typedoc', 'Generate TypeScript docs', function () {
var options = this.options({});
var args = [];
for (var key in options) {
if (options.hasOwnProperty(key) && (typeof options[key] !== "boolean" || options[key])) {
args.push('-... | Implement boolean option flags and change TypeDoc path strategy | Implement boolean option flags and change TypeDoc path strategy | JavaScript | mit | TypeStrong/grunt-typedoc | ---
+++
@@ -6,9 +6,9 @@
var args = [];
for (var key in options) {
- if (options.hasOwnProperty(key)) {
+ if (options.hasOwnProperty(key) && (typeof options[key] !== "boolean" || options[key])) {
args.push('--' + key);
- if (!!options[key]) {
+ if (typeof options[key] !== "boolean" && !!options[... |
b37db9b0ba15389ccb38457b9ceb53c23d8ff9f1 | app/server/publish.js | app/server/publish.js | Meteor.publish('ItemSets.id', function (id) {
check(id, String);
this.unblock();
return ItemSets.find(new Meteor.Collection.ObjectID(id));
});
Meteor.publish('ItemSets.last', function () {
this.unblock();
return ItemSets.find({}, { sort: { patchVersion : -1, generationDate: -1 }, limit: 1 });
});
Meteor.publ... | Meteor.publish('ItemSets.id', function (id) {
check(id, String);
this.unblock();
return ItemSets.find(new Meteor.Collection.ObjectID(id), { reactive: false });
});
Meteor.publish('ItemSets.last', function () {
this.unblock();
return ItemSets.find({}, { sort: { patchVersion : -1, generationDate: -1 }, limit: 1... | Disable reactivity of item sets publications. | Disable reactivity of item sets publications.
| JavaScript | mit | Ilshidur/lol-item-sets-generator.org,Ilshidur/lol-item-sets-generator.org,league-of-legends-devs/lol-item-sets-generator.org,league-of-legends-devs/lol-item-sets-generator.org,Ilshidur/lol-item-sets-generator.org,league-of-legends-devs/lol-item-sets-generator.org | ---
+++
@@ -1,11 +1,11 @@
Meteor.publish('ItemSets.id', function (id) {
check(id, String);
this.unblock();
- return ItemSets.find(new Meteor.Collection.ObjectID(id));
+ return ItemSets.find(new Meteor.Collection.ObjectID(id), { reactive: false });
});
Meteor.publish('ItemSets.last', function () {
this.u... |
8054bec9f81f975089930d5d68a63f07eba1d71f | test/promise.domain.test.js | test/promise.domain.test.js | var Promise = require('../')
, Domain = require('domain')
, assert = require('assert');
var next = 'function' == typeof setImmediate
? setImmediate
: process.nextTick;
describe("domains", function () {
it("exceptions should not breakout of domain bounderies", function (done) {
var d = Domain.create();
... | var Promise = require('../')
, Domain = require('domain')
, assert = require('assert');
var next = 'function' == typeof setImmediate
? setImmediate
: process.nextTick;
describe("domains", function () {
it("exceptions should not breakout of domain bounderies", function (done) {
if (process.version.indexO... | Fix works only for v0.10.x | Fix works only for v0.10.x
| JavaScript | mit | aheckmann/mpromise | ---
+++
@@ -8,8 +8,9 @@
describe("domains", function () {
it("exceptions should not breakout of domain bounderies", function (done) {
+ if (process.version.indexOf('v0.8') == 0) return done();
var d = Domain.create();
- d.on('error', function (err) {
+ d.once('error', function (err) {
asser... |
c06c25b13c9b9fd10b53d97e54d1b4f1298e0754 | test/test-app.js | test/test-app.js | 'use strict';
var path = require('path');
var assert = require('yeoman-generator').assert;
var helpers = require('yeoman-generator').test;
var os = require('os');
describe('ironhide-webapp:app', function () {
before(function (done) {
helpers.run(path.join(__dirname, '../app'))
.withOptions({ skipInstall: ... | 'use strict';
var path = require('path');
var assert = require('yeoman-generator').assert;
var helpers = require('yeoman-generator').test;
var os = require('os');
describe('ironhide-webapp:app', function () {
before(function (done) {
helpers.run(path.join(__dirname, '../app'))
.withOptions({ skipInstall: ... | Update tests to reflect new files. | Update tests to reflect new files.
| JavaScript | mit | rishabhsrao/generator-ironhide-webapp,rishabhsrao/generator-ironhide-webapp,rishabhsrao/generator-ironhide-webapp | ---
+++
@@ -9,16 +9,34 @@
before(function (done) {
helpers.run(path.join(__dirname, '../app'))
.withOptions({ skipInstall: true })
- .withPrompts({ someOption: true })
+ .withPrompts({ appname: 'ironhide-webapp-test-app' })
.on('end', done);
});
- it('creates files', function () ... |
95561133b889334cc006da38f1abb549a34784c2 | assets/base.js | assets/base.js | (function () {
'use strict';
if (location.hostname === 'todomvc.com') {
var _gaq=[['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'));
}
})();
| (function () {
'use strict';
if (location.hostname === 'todomvc.com') {
var _gaq=[['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'));
}
function ap... | Add link to source to footer of every example | Add link to source to footer of every example
| JavaScript | mit | chrisfcarroll/todomvc,ckirkendall/todomvc,skatejs/todomvc,mboudreau/todomvc,ckirkendall/todomvc,nbr1ninrsan2/todomvc,theoldnewbie/todomvc,lorgiorepo/todomvc,meligatt/todomvc,ajansa/todomvc,MariaSimion/todomvc,babarqb/todomvc,cbolton97/todomvc,allanbrito/todomvc,kamilogorek/todomvc,nancy44/todomvc,MikeDulik/todomvc,dyla... | ---
+++
@@ -4,4 +4,20 @@
if (location.hostname === 'todomvc.com') {
var _gaq=[['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'));
}
+
+ function a... |
b5559268875c8d6150586482d23697ae3e0bcd55 | app/javascript/api.js | app/javascript/api.js | import createDebug from 'debug';
import { onLoad } from './util';
const debug = createDebug('ms:api');
const partitionArray = (array, size) => array.map((e, i) => (i % size === 0) ?
array.slice(i, i + size) : null).filter(e => e);
onLoad(() => {
$('#create_filter').on('click', () => {
const checkboxes = $('i... | import createDebug from 'debug';
import { onLoad } from './util';
const debug = createDebug('ms:api');
const partitionArray = (array, size) => array.map((e, i) => (i % size === 0) ?
array.slice(i, i + size) : null).filter(e => e);
onLoad(() => {
$('#create_filter').on('click', () => {
const bits = Array.from... | Refactor to more functional style | Refactor to more functional style
| JavaScript | cc0-1.0 | j-f1/forked-metasmoke,angussidney/metasmoke,angussidney/metasmoke,Charcoal-SE/metasmoke,j-f1/forked-metasmoke,j-f1/forked-metasmoke,Charcoal-SE/metasmoke,Charcoal-SE/metasmoke,angussidney/metasmoke,Charcoal-SE/metasmoke,angussidney/metasmoke,j-f1/forked-metasmoke | ---
+++
@@ -8,19 +8,11 @@
onLoad(() => {
$('#create_filter').on('click', () => {
- const checkboxes = $('input[type=checkbox]');
- const bits = new Array(checkboxes.length);
-
- $.each(checkboxes, (index, item) => {
- const $item = $(item);
- const arrayIndex = $item.data('index');
- if ... |
7d31323c8a11f16a60524a648390bd8e2358d9bf | Gulpfile.js | Gulpfile.js | const gulp = require('gulp');
const tsc = require('gulp-typescript');
const Server = require('karma').Server;
const tsProject = tsc.createProject('src/tsconfig.json');
const tsProjectSpec = tsc.createProject('spec/tsconfig.json');
gulp.task('default', ['build']);
gulp.task('build', () => {
return tsProject.src()
... | const gulp = require('gulp');
const tsc = require('gulp-typescript');
const Server = require('karma').Server;
const tsProject = tsc.createProject('src/tsconfig.json');
const tsProjectSpec = tsc.createProject('spec/tsconfig.json');
gulp.task('default', ['build']);
gulp.task('build', () => {
return tsProject.src()
... | Add karma-jasmine to the plugins | Add karma-jasmine to the plugins
| JavaScript | mit | Jameskmonger/courtroom,Jameskmonger/courtroom | ---
+++
@@ -14,7 +14,8 @@
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true,
- plugins:[
+ plugins: [
+ 'karma-jasmine',
'karma-spec-reporter',
'karma-coverage',
'karma-coveralls' |
582c8926bdeb47844ad844c5adc12f4b8d998b27 | modules/core/github_mention.js | modules/core/github_mention.js | // PiscoBot Script
var commandDescription = {
name: 'GitHub Mention',
author: 'Daniel Gallegos [@that_taco_guy]',
trigger: '[none]',
version: 1.0,
description: 'Have the bot reply to new commits on GitHub.',
module: 'Core'
};
global.botHelp.push(commandDescription);
var _ = require('underscore');
global... | // PiscoBot Script
var commandDescription = {
name: 'GitHub Mention',
author: 'Daniel Gallegos [@that_taco_guy]',
trigger: '[none]',
version: 1.0,
description: 'Have the bot reply to new commits on GitHub.',
module: 'Core'
};
var _ = require('underscore');
global.piscobot.hears(['PiscoBot.*new commits by... | Remove GitHub from the help scripts | Remove GitHub from the help scripts
| JavaScript | mit | devacademyla/PiscoBot,devacademyla/PiscoBot | ---
+++
@@ -8,8 +8,6 @@
description: 'Have the bot reply to new commits on GitHub.',
module: 'Core'
};
-
-global.botHelp.push(commandDescription);
var _ = require('underscore');
|
547d1eea4940e4beb48a2a85b3b48bef6eb2ff25 | tests/helpers/readGraph.js | tests/helpers/readGraph.js | const fs = require('fs')
const file = require('file')
const path = require('path')
const toml = require('toml')
const parsers = {
'.toml': toml.parse,
'.json': JSON.parse
}
function readGraphObjects(objectsPath) {
let result = []
file.walkSync(objectsPath, (dirPath, dirs, filePaths) => {
resul... | const fs = require('fs')
const file = require('file')
const path = require('path')
const toml = require('toml')
const parsers = {
'.toml': toml.parse,
'.json': JSON.parse
}
function readGraphObjects(objectsPath, mapResult) {
let result = []
file.walkSync(objectsPath, (dirPath, dirs, filePaths) => {
... | Allow custom mapping function when reading graph. | Allow custom mapping function when reading graph.
| JavaScript | mit | frontiernav/frontiernav-data,frontiernav/frontiernav-data | ---
+++
@@ -8,7 +8,7 @@
'.json': JSON.parse
}
-function readGraphObjects(objectsPath) {
+function readGraphObjects(objectsPath, mapResult) {
let result = []
file.walkSync(objectsPath, (dirPath, dirs, filePaths) => {
result = result.concat(
@@ -21,22 +21,22 @@
const pars... |
ac939200325205ee41f7495a9295ea20c5e7e121 | backend/utils/socketio.js | backend/utils/socketio.js | const twitchIO = require('socket.io');
const twitchClient = require('./tmiClient');
// const Rx = require('rx');
const eventEmitter = require('./eventEmitter');
const messageController = require('../db/messageController');
// const messageSource = Rx.Observable.fromEvent(twitchClient, 'chat', () => {
// let args = [... | const twitchIO = require('socket.io');
const twitchClient = require('./tmiClient');
const Rx = require('rx');
const eventEmitter = require('./eventEmitter');
const messageController = require('../db/messageController');
const messageSource = Rx.Observable.fromEvent(twitchClient, 'chat', (channel, user, msg) => {
ret... | Simplify message emitting and incorporate RxJS | Simplify message emitting and incorporate RxJS
| JavaScript | mit | dramich/twitchBot,badT/twitchBot,dramich/Chatson,badT/Chatson,dramich/twitchBot,TerryCapan/twitchBot,badT/twitchBot,TerryCapan/twitchBot,badT/Chatson,dramich/Chatson | ---
+++
@@ -1,45 +1,27 @@
const twitchIO = require('socket.io');
const twitchClient = require('./tmiClient');
-// const Rx = require('rx');
+const Rx = require('rx');
const eventEmitter = require('./eventEmitter');
const messageController = require('../db/messageController');
-// const messageSource = Rx.Observ... |
cb6184370d41cdeeed92784f0864b45864ddd10f | spec/arethusa.core/directives/deselector_spec.js | spec/arethusa.core/directives/deselector_spec.js | "use strict";
describe("deselector", function() {
var element;
var state;
var configurator = { provideResource: function() {} };
beforeEach(module("arethusa.core", function($provide) {
$provide.value('configurator', configurator);
}));
beforeEach(inject(function($compile, $rootScope, _state_) {
e... | "use strict";
describe("deselector", function() {
var element;
var state;
var configurator = {
provideResource: function() {},
configurationFor: function() {}
};
beforeEach(module("arethusa.core", function($provide) {
$provide.value('configurator', configurator);
}));
beforeEach(inject(func... | Update configurator mock in deselector spec | Update configurator mock in deselector spec
| JavaScript | mit | Masoumeh/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa | ---
+++
@@ -3,7 +3,10 @@
describe("deselector", function() {
var element;
var state;
- var configurator = { provideResource: function() {} };
+ var configurator = {
+ provideResource: function() {},
+ configurationFor: function() {}
+ };
beforeEach(module("arethusa.core", function($provide) {
... |
9f8e2346b9ede60d0548af01bf5d7a62f548cde1 | src/components/jsoninput/jsoninput.js | src/components/jsoninput/jsoninput.js | 'use strict';
angular.module('polestar')
.directive('jsonInput', function() {
return {
restrict: 'A',
require: 'ngModel',
scope: {},
link: function(scope, element, attrs, modelCtrl) {
var format = function(inputValue) {
return JSON.stringify(inputValue, null, ' ', 80);
... | 'use strict';
angular.module('polestar')
.directive('jsonInput', function(JSON3) {
return {
restrict: 'A',
require: 'ngModel',
scope: {},
link: function(scope, element, attrs, modelCtrl) {
var format = function(inputValue) {
return JSON3.stringify(inputValue, null, ' ',... | Use JSON3 with no conflict | Use JSON3 with no conflict | JavaScript | bsd-3-clause | uwdata/polestar,uwdata/polestar,vega/polestar,uwdata/polestar,vega/polestar,vega/polestar | ---
+++
@@ -1,14 +1,14 @@
'use strict';
angular.module('polestar')
- .directive('jsonInput', function() {
+ .directive('jsonInput', function(JSON3) {
return {
restrict: 'A',
require: 'ngModel',
scope: {},
link: function(scope, element, attrs, modelCtrl) {
var format = f... |
1ccf524338ce1984e0aa7d9dae83be634abf4e28 | stores/util/queryResults.js | stores/util/queryResults.js | define([
'../../Promise'
], function (Promise) {
'use strict';
var resolve = Promise.resolve.bind(Promise),
arrayProto = Array.prototype,
slice = arrayProto.slice,
iteratorMethods = [ 'forEach', 'map', 'filter' ];
/**
* Decorates a promise with a method derived from the Array.prototype wrapped in a promi... | define([
'../../Promise'
], function (Promise) {
'use strict';
var resolve = Promise.resolve.bind(Promise),
arrayProto = Array.prototype,
slice = arrayProto.slice,
iteratorMethods = [ 'forEach', 'map', 'filter', 'every', 'some', 'reduce', 'reduceRight' ];
/**
* Decorates a promise with a method derived f... | Add more iterator methods to query results. | Add more iterator methods to query results.
| JavaScript | bsd-3-clause | kitsonk/core-js,kitsonk/core-js | ---
+++
@@ -6,7 +6,7 @@
var resolve = Promise.resolve.bind(Promise),
arrayProto = Array.prototype,
slice = arrayProto.slice,
- iteratorMethods = [ 'forEach', 'map', 'filter' ];
+ iteratorMethods = [ 'forEach', 'map', 'filter', 'every', 'some', 'reduce', 'reduceRight' ];
/**
* Decorates a promise with... |
541ab943aed2768c53c38833fbfd6ec2f5863f34 | src/inject/generic/core/appDetails.js | src/inject/generic/core/appDetails.js | import { remote } from 'electron';
import fs from 'fs';
import path from 'path';
window.addEventListener('load', () => {
if (window.$ && Settings.get('welcomed') === remote.app.getVersion() && $('#welcome').length) {
$('[data-app-changes]').html(fs.readFileSync(path.resolve(`${__dirname}/../../../../MR_CHANGELOG... | import { remote } from 'electron';
import fs from 'fs';
import path from 'path';
window.addEventListener('load', () => {
if (window.$ && Settings.get('welcomed') !== remote.app.getVersion() && $('#welcome').length) {
$('[data-app-changes]').html(fs.readFileSync(path.resolve(`${__dirname}/../../../../MR_CHANGELOG... | Undo change made for debugging | Undo change made for debugging
| JavaScript | mit | petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,n4k1/Google-Play-Music-Desktop-Player-UNOFFICIAL-,MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,n4k1/Google-Play-Music-Desktop-Player-... | ---
+++
@@ -3,7 +3,7 @@
import path from 'path';
window.addEventListener('load', () => {
- if (window.$ && Settings.get('welcomed') === remote.app.getVersion() && $('#welcome').length) {
+ if (window.$ && Settings.get('welcomed') !== remote.app.getVersion() && $('#welcome').length) {
$('[data-app-changes]'... |
3c46bd1c62ef3242ed18c29d593eaa8e9b8b45e0 | server/webhooks/registration.js | server/webhooks/registration.js | import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { Email } from 'meteor/email';
const Post = Picker.filter((req, res) => (req.method === 'POST'));
Post.route('/api/register', function(params, req, res, next) {
Meteor.logger.info(`Request on route:`);
Email.send({
... | import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { Email } from 'meteor/email';
const Post = Picker.filter((req, res) => (req.method === 'POST'));
Post.route('/api/register', function(params, req, res, next) {
Meteor.logger.info(`Request on route:`);
Email.send({
... | Fix from email in POST route test email | Fix from email in POST route test email
| JavaScript | mit | kyle-rader/greatpuzzlehunt,kyle-rader/greatpuzzlehunt,kyle-rader/greatpuzzlehunt | ---
+++
@@ -10,7 +10,7 @@
Email.send({
to: 'kyle@kylerader.ninja',
- from: 'Great Puzzle Hunt API',
+ from: 'Great Puzzle Hunt API <info@greatpuzzlehunt.com>',
subject: 'Registration API Hit',
text: `Params:
${JSON.stringify(params)} |
16dc6991addf1b2011e471563f3bf305e444f223 | src/editor/components/BackComponent.js | src/editor/components/BackComponent.js | import { Component } from 'substance'
/*
Simplistic back-matter displaying references and appendixes
*/
export default class BackComponent extends Component {
render($$) {
const node = this.props.node
let el = $$('div').addClass('sc-back')
.attr('data-id', node.id)
// NOTE: Bibliography depend... | import { Component } from 'substance'
/*
Simplistic back-matter displaying references and appendixes
*/
export default class BackComponent extends Component {
render($$) {
const node = this.props.node
let el = $$('div').addClass('sc-back')
.attr('data-id', node.id)
// NOTE: Bibliography depend... | Fix jumping on ref removing. | Fix jumping on ref removing.
| JavaScript | mit | substance/texture,substance/texture | ---
+++
@@ -15,7 +15,7 @@
let refList = node.find('ref-list')
if (refList) {
el.append(
- $$(this.getComponent('ref-list'), { node: refList })
+ $$(this.getComponent('ref-list'), { node: refList }).ref('ref-list')
)
}
|
aff915b9c9a249d63af8f2e04215dda2c2068caf | tests/utils/branchUtils.js | tests/utils/branchUtils.js | // Find the GitHub branch we are running from
getBranch = function (path, repository) {
// The branch is the word after the repository name, and before the word "tests"
// Assumes that the branch exists in the path
// Note that the repository includes a final '/'
var repositoryName = repository.sli... | // Find the GitHub branch we are running from
getBranch = function (path, repository) {
// The branch is the word after the repository name, and before the word "tests"
// Assumes that the branch exists in the path
// Note that the repository includes a final '/'
var repositoryName = repository.slice(0... | Deal with call from local script. | Deal with call from local script.
| JavaScript | apache-2.0 | highfidelity/hifi_tests,highfidelity/hifi_tests,highfidelity/hifi_tests | ---
+++
@@ -2,16 +2,24 @@
getBranch = function (path, repository) {
// The branch is the word after the repository name, and before the word "tests"
// Assumes that the branch exists in the path
-
+
// Note that the repository includes a final '/'
var repositoryName = repository.slice(0,-1);
... |
c9d48dd038e49d364d7c7a6a567bdb2d059df524 | client/src/store.js | client/src/store.js | import { createStore, applyMiddleware, compose } from 'redux'
import { routerMiddleware } from 'react-router-redux'
import promiseMiddleware from 'redux-promise-middleware'
import createHistory from 'history/createBrowserHistory'
import rootReducer from './reducers/index'
const history = createHistory()
const routerS... | import { createStore, applyMiddleware, compose } from 'redux'
import { routerMiddleware } from 'react-router-redux'
import promiseMiddleware from 'redux-promise-middleware'
import createHistory from 'history/createBrowserHistory'
import rootReducer from './reducers/index'
const history = createHistory()
const routerS... | Change default state of howitworks visibility | Change default state of howitworks visibility
| JavaScript | mit | Code-For-Change/GivingWeb,Code-For-Change/GivingWeb | ---
+++
@@ -16,7 +16,7 @@
dropdownVisible: false
},
howItWorks: {
- howItWorksVisible: true
+ howItWorksVisible: false
}
}
|
733b948e07dd4b1c9b8ba342d82807e81444e562 | js-notes/sumAll.js | js-notes/sumAll.js | function sumAll(arr) {
var total = 0;
var len = arr.length;
for(var i = 0; i <= len;i++){
total += arr[i];
}
return total;
}
sumAll([1, 4]);
| function sumAll(arr) {
var total = 0;
createRange(arr).forEach(function(val){
total += val;
});
return total;
}
function createRange(arr) {
var end = arr[1];
var start = arr[0];
var range = [];
if (arr[0] > arr[1]) {
start = arr[1];
end = arr[0];
}
for(var i = start; i <= en... | Add sollution to sum all | Add sollution to sum all
| JavaScript | mit | schaui6/geek_out,schaui6/geek_out,schaui6/geek_out | ---
+++
@@ -1,11 +1,30 @@
function sumAll(arr) {
var total = 0;
- var len = arr.length;
+
- for(var i = 0; i <= len;i++){
- total += arr[i];
- }
+ createRange(arr).forEach(function(val){
+ total += val;
+ });
+
return total;
+
}
-sumAll([1, 4]);
+function createRange(arr) {
+ var end = a... |
9176e16b49bacd9b57238ddb3a4db6ec0b38cdd9 | controller/NormalMonitorController.js | controller/NormalMonitorController.js | var merge = require('merge');
var temperature = require('../model/temperature.js');
var humidity = require('../model/humidity.js');
var gas = require('../model/gas.js');
var co = require('../model/co.js');
var timestamp = require('../timestamp.js');
exports.index = function index(callback) {
// FIXME: callback he... | var merge = require('merge');
var temperature = require('../model/temperature.js');
var humidity = require('../model/humidity.js');
var gas = require('../model/gas.js');
var co = require('../model/co.js');
var timestamp = require('../timestamp.js');
exports.index = function index(callback) {
// FIXME: callback he... | Fix chart no data display | Fix chart no data display
| JavaScript | mit | FCU-Simple-Smart-Home/Control-Website,FCU-Simple-Smart-Home/Control-Website | ---
+++
@@ -28,7 +28,7 @@
];
if (result.length == 0) {
- data.push(['', 0]);
+ data.push([timestamp.toChartDateString(new Date()), 0]);
}
for (var i in result) { |
f4bbcd84d56810153744fc15c0d245ec63b4086e | js/initialState.js | js/initialState.js | module.exports = {
selectedItem: 1,
budgetItems: [],
error: {
show: true,
text: 'Hello my name is nathan'
}
}
| module.exports = {
selectedItem: 1,
budgetItems: [],
error: {
show: false,
text: ''
}
}
| Change initial state of error. | Change initial state of error.
| JavaScript | mit | JumpStartGeorgia/Georgian-Budget-Public | ---
+++
@@ -2,7 +2,7 @@
selectedItem: 1,
budgetItems: [],
error: {
- show: true,
- text: 'Hello my name is nathan'
+ show: false,
+ text: ''
}
} |
90d80e8e75a37cac3e4cac137a5ab7ea1282e684 | collections.js | collections.js | "use strict";
Nbsp.Messages = new Mongo.Collection("rooms");
Nbsp.MessageSchema = new SimpleSchema({
from: {
type: String,
label: "Your name",
max: 64
},
content: {
type: String,
label: "Your message"
max: 256
},
createdAt: {
type: Date
},
updatedAt: {
type: Date,
opt... | "use strict";
Nbsp.Cards = new Mongo.Collection("cards");
Nbsp.Cards.allow({
insert() { return false; },
update() { return false; },
remove() { return false; }
});
Nbsp.Cards.deny({
insert() { return true; },
update() { return true; },
remove() { return true; }
});
Nbsp.CardPositionSchema = new SimpleSc... | Rename (and improve) message collection and schema to cards | Rename (and improve) message collection and schema to cards
| JavaScript | mit | iwazaru/notrebeausapin.fr,iwazaru/notrebeausapin.fr | ---
+++
@@ -1,8 +1,43 @@
"use strict";
-Nbsp.Messages = new Mongo.Collection("rooms");
+Nbsp.Cards = new Mongo.Collection("cards");
-Nbsp.MessageSchema = new SimpleSchema({
+Nbsp.Cards.allow({
+ insert() { return false; },
+ update() { return false; },
+ remove() { return false; }
+});
+
+Nbsp.Cards.deny({
+ ... |
55ededd619e640eb933b266c9bdd4f0f65328acf | client/src/js/jobs/api.js | client/src/js/jobs/api.js | /**
*
*
* @copyright 2017 Government of Canada
* @license MIT
* @author igboyes
*
*/
import Request from "superagent";
const jobsAPI = {
find: () => {
return Request.get("/api/jobs");
},
get: (jobId) => {
return Request.get(`/api/jobs/${jobId}`);
},
test: (options = {}) =... | /**
*
*
* @copyright 2017 Government of Canada
* @license MIT
* @author igboyes
*
*/
import Request from "superagent";
const jobsAPI = {
find: () => {
return Request.get("/api/jobs");
},
get: (jobId) => {
return Request.get(`/api/jobs/${jobId}`);
},
test: (options = {}) =... | Allow starting of long test tasks in client | Allow starting of long test tasks in client
| JavaScript | mit | virtool/virtool,igboyes/virtool,igboyes/virtool,virtool/virtool | ---
+++
@@ -20,6 +20,8 @@
},
test: (options = {}) => {
+ console.log(options);
+
return Request.post("/api/jobs/test")
.send(options);
} |
1d27561a2f204ab28ce1c6c966f231cffea31c1d | src/components/about-us/constants/screen-size.js | src/components/about-us/constants/screen-size.js | const sm = 576
const md = 768
const lg = 1024
const xl = 1440
export default {
smallScreenMinWidth: sm,
smallScreenMaxWidth: md - 1,
mediumScreenMaxWidth: lg - 1,
mediumScreenMinWidth: md,
largeScreenMinWidth: lg,
largeScreenMaxWidth: xl - 1,
xLargeScreenMinWidth: xl
}
| const sm = 576
const md = 768
const lg = 1024
const xl = 1630
export default {
smallScreenMinWidth: sm,
smallScreenMaxWidth: md - 1,
mediumScreenMaxWidth: lg - 1,
mediumScreenMinWidth: md,
largeScreenMinWidth: lg,
largeScreenMaxWidth: xl - 1,
xLargeScreenMinWidth: xl
}
| Change media query breakpoint of overDesktop on about-us page | Change media query breakpoint of overDesktop on about-us page
| JavaScript | agpl-3.0 | twreporter/twreporter-react,nickhsine/twreporter-react | ---
+++
@@ -1,7 +1,7 @@
const sm = 576
const md = 768
const lg = 1024
-const xl = 1440
+const xl = 1630
export default {
smallScreenMinWidth: sm,
smallScreenMaxWidth: md - 1, |
221c6bcc31147ad23ff856ebc3a58f07a59d7966 | spec/arethusa.core/key_capture_spec.js | spec/arethusa.core/key_capture_spec.js | "use strict";
describe('keyCapture', function() {
beforeEach(module('arethusa.core'));
describe('isCtrlActive', function() {
it('return false before any event', inject(function(keyCapture) {
expect(keyCapture.isCtrlActive()).toBe(false);
}));
it('return true if keydown for ctrl was received', i... | "use strict";
describe('keyCapture', function() {
beforeEach(module('arethusa.core'));
describe('onKeyPressed', function() {
it('calls the given callback', inject(function(keyCapture) {
var event = {
keyCode: 27,
target: { tagname: '' }
};
var callbackCalled = false;
va... | Remove obsolete specs for keyCapture service | Remove obsolete specs for keyCapture service
| JavaScript | mit | PonteIneptique/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa | ---
+++
@@ -3,33 +3,17 @@
describe('keyCapture', function() {
beforeEach(module('arethusa.core'));
- describe('isCtrlActive', function() {
- it('return false before any event', inject(function(keyCapture) {
- expect(keyCapture.isCtrlActive()).toBe(false);
- }));
-
- it('return true if keydown for... |
eaa17ad8fbd44d58654508acd6fd0abe5ee3053c | dots-connect.js | dots-connect.js | "use strict";
var playfield;
var scene;
var game;
function init() {
playfield = document.getElementById('playfield');
game = new Game();
scene = new Gamefield(initSceneCanvas('main-scene'), game);
game.view = scene;
game.selectLevel(-1);
game.startNewGame();
}
function initSceneCanvas(name) {
... | "use strict";
var playfield;
var scene;
var game;
function init() {
playfield = document.getElementById('playfield');
game = new Game();
scene = new Gamefield(initSceneCanvas('main-scene'), game);
game.setScene(scene);
game.selectLevel(-1);
game.startNewGame();
}
function initSceneCanvas(name) {
... | Fix passing scene to game | [DOTS-CONNECT] Fix passing scene to game
| JavaScript | mit | BecauseWeCanStudios/dots-connect,BecauseWeCanStudios/dots-connect | ---
+++
@@ -7,7 +7,7 @@
playfield = document.getElementById('playfield');
game = new Game();
scene = new Gamefield(initSceneCanvas('main-scene'), game);
- game.view = scene;
+ game.setScene(scene);
game.selectLevel(-1);
game.startNewGame();
} |
968fca58df580c651491637e7e928194fc58a12e | lib/composition/line/index.js | lib/composition/line/index.js | var Deffy = require("deffy")
, Enny = require("enny")
, Parsers = require("../parsers")
;
function Line(input) {
this.source = input.source;
this.target = input.target;
this.id = this.source.id + "_" + this.target.id + "_" + Math.random();
this.classes = Deffy(input.classes, []);
if (!input.c... | var Deffy = require("deffy")
, Enny = require("enny")
, Parsers = require("../parsers")
, Idy = require("idy")
;
function Line(input) {
this.source = input.source;
this.target = input.target;
this.id = this.source.id + "_" + this.target.id + "_" + Idy();
this.classes = Deffy(input.classes, []);... | Use Idy to create ids | Use Idy to create ids
| JavaScript | mit | jillix/engine-builder | ---
+++
@@ -1,12 +1,13 @@
var Deffy = require("deffy")
, Enny = require("enny")
, Parsers = require("../parsers")
+ , Idy = require("idy")
;
function Line(input) {
this.source = input.source;
this.target = input.target;
- this.id = this.source.id + "_" + this.target.id + "_" + Math.random()... |
f6354171b579714099f2fd8d001dbe4a14d92e70 | contextMenu.js | contextMenu.js | (function() {
var wicketsource, menu;
menu = chrome.contextMenus.create({
title: "Wicket Source",
contexts: ["all"],
onclick: function (info) {
if (wicketsource) {
var ajax = new XMLHttpRequest();
var url = "http://localhost:9123/open?src=" + encodeURIComponent(wicketsource);
... | (function() {
var menu = chrome.contextMenus.create({
title: "Wicket Source",
contexts: [ "all" ],
enabled: false,
onclick: function() {}
});
chrome.extension.onRequest.addListener(function (request) {
if (request.hasOwnProperty('wicketsource')) {
var ws = request.wicketsource;
if... | Improve context menu event handling | Improve context menu event handling
| JavaScript | apache-2.0 | cleiter/wicketsource-contextmenu | ---
+++
@@ -1,42 +1,37 @@
(function() {
-
- var wicketsource, menu;
-
- menu = chrome.contextMenus.create({
+ var menu = chrome.contextMenus.create({
title: "Wicket Source",
- contexts: ["all"],
- onclick: function (info) {
- if (wicketsource) {
- var ajax = new XMLHttpRequest();
- v... |
d8bc594108bc26b866515df88467b64c105a5c8e | app/app.js | app/app.js | 'use strict';
// Declare app level module which depends on views, and components
/*angular.module('myApp', [
'ngRoute',
'myApp.view1',
'myApp.view2',
'myApp.version'
]).
config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');
$routePr... | 'use strict';
// Declare app level module which depends on views, and components
/*angular.module('myApp', [
'ngRoute',
'myApp.view1',
'myApp.view2',
'myApp.version'
]).
config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');
$routePr... | Clear Results for next submit | Clear Results for next submit
| JavaScript | mit | glencollins18888/JSONPathFinder,glencollins18888/JSONPathFinder | ---
+++
@@ -23,6 +23,8 @@
$scope.paths = [];
$scope.submit = function() {
+
+ $scope.paths = [];
var enteredNode = $scope.nodeText;
var json = angular.fromJson($scope.enteredJson);
|
81214343f4e29800faae88a5bc04c6b8c4066748 | src/app/config/app.constants.js | src/app/config/app.constants.js | const AppConstants = {
//Application name
appName: 'Nano Wallet',
version: 'BETA 1.1.11',
//Network
defaultNetwork: -104,
// Ports
defaultNisPort: 7890,
defaultWebsocketPort: 7778,
// Activate/Deactivate mainnet
mainnetDisabled: false,
// Activate/Deactivate mijin
mi... | const AppConstants = {
//Application name
appName: 'Nano Wallet',
version: 'BETA 1.1.12',
//Network
defaultNetwork: 104,
// Ports
defaultNisPort: 7890,
defaultWebsocketPort: 7778,
// Activate/Deactivate mainnet
mainnetDisabled: false,
// Activate/Deactivate mijin
mij... | Set mainnet as default network and bump to 1.1.12 | Set mainnet as default network and bump to 1.1.12
| JavaScript | mit | him0/NanoWallet,him0/NanoWallet,mizunashi/NanoWallet,mizunashi/NanoWallet | ---
+++
@@ -2,10 +2,10 @@
//Application name
appName: 'Nano Wallet',
- version: 'BETA 1.1.11',
+ version: 'BETA 1.1.12',
//Network
- defaultNetwork: -104,
+ defaultNetwork: 104,
// Ports
defaultNisPort: 7890, |
849148bac1598f1ba1fcc898181650e927b0b4cc | src/components/IconBar/index.js | src/components/IconBar/index.js | /* eslint-disable no-unused-vars*/
import React, { Component, PropTypes } from 'react';
/* eslint-enable no-unused-vars*/
import Icons from 'components/Icons/';
const IconBar = () => {
let children = Object.keys(Icons).map(key => {
let Icon = Icons[key];
return (
<Icon key={key} style={ { display: 'in... | /* eslint-disable no-unused-vars*/
import React, { Component, PropTypes } from 'react';
/* eslint-enable no-unused-vars*/
import Icons from 'components/Icons/';
import { Grid, Row, Col } from 'react-bootstrap';
const IconBar = () => {
let children = Object.keys(Icons).map((key, index) => {
let Icon = Icons[key]... | Split icons into responsive grid | Split icons into responsive grid
| JavaScript | mit | pl12133/pl12133.github.io,pl12133/pl12133.github.io | ---
+++
@@ -3,14 +3,28 @@
/* eslint-enable no-unused-vars*/
import Icons from 'components/Icons/';
+import { Grid, Row, Col } from 'react-bootstrap';
const IconBar = () => {
- let children = Object.keys(Icons).map(key => {
+ let children = Object.keys(Icons).map((key, index) => {
let Icon = Icons[key];
... |
7133c3a7ce498b73aded39f8de50df787091e541 | test/spec/controllers/formDropArea.js | test/spec/controllers/formDropArea.js | /* global describe: false, expect: false, it: false, inject: false, beforeEach: false */
'use strict';
describe('Controller: FormDropAreaCtrl', function () {
// load the controller's module
beforeEach(module('confRegistrationWebApp'));
var FormDropAreaCtrl,
scope;
// Initialize the controller and a mock... | /* global describe: false, expect: false, it: false, inject: false, beforeEach: false */
'use strict';
describe('Controller: FormDropAreaCtrl', function () {
// load the controller's module
beforeEach(module('confRegistrationWebApp'));
var FormDropAreaCtrl,
scope;
// Initialize the controller and a mock... | Test the delete block fn | Test the delete block fn
| JavaScript | mit | CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web | ---
+++
@@ -44,4 +44,10 @@
expect(scope.conference.registrationPages[1].blocks.length).toBe(2);
expect(scope.conference.registrationPages[1].blocks[1].type).toBe('textQuestion');
});
+
+ it('should have a function to delete a block', function () {
+ scope.deleteBlock('block2');
+
+ expect(scope.co... |
4a837b9ec7956227d9c856181de4b3b3e5b60737 | src/utils/attach-attr.js | src/utils/attach-attr.js | function attachAttr (ele, attr) {
for (var a in attr) {
ele.setAttribute(a, attr[a]);
}
return ele;
}
| /**
* Attaches DOM attribles to an elements
* @param {object} ele A DOM Element in which to add the CSS to.
* @param {object} attrObj Attributes in which to add to the Element in an object
* @returns {object} ele Passes the element with attributes attached.
*
* @example
* var x = document.createElement('img... | Add JSDoc info for attachAttr | Add JSDoc info for attachAttr
| JavaScript | mit | rockabox/Auxilium.js | ---
+++
@@ -1,6 +1,22 @@
-function attachAttr (ele, attr) {
- for (var a in attr) {
- ele.setAttribute(a, attr[a]);
+/**
+ * Attaches DOM attribles to an elements
+ * @param {object} ele A DOM Element in which to add the CSS to.
+ * @param {object} attrObj Attributes in which to add to the Element in an ... |
4dee0a4ef58fca0abb1d040c372be83a17c66a4c | static/javascript/map.js | static/javascript/map.js | requirejs.config({
paths: {
jquery: "/vendor/jquery",
}
});
define(['jquery'], function ($) {
var _ = window._,
Map = function(svg) {
this.svg = $(svg);
};
var _mpro = Map.prototype;
_mpro.paint = function(specifier) {
/* Paint the regions with the colours specified. */
var ... | requirejs.config({
paths: {
jquery: "vendor/jquery",
}
});
define(['jquery'], function ($) {
var _ = window._,
Map = function(svg) {
this.svg = $(svg);
};
var _mpro = Map.prototype;
_mpro.paint = function(specifier) {
/* Paint the regions with the colours specified. */
var s... | Use relative url to serve jquery | Use relative url to serve jquery
| JavaScript | mit | schatten/cartos,schatten/cartos | ---
+++
@@ -1,6 +1,6 @@
requirejs.config({
paths: {
- jquery: "/vendor/jquery",
+ jquery: "vendor/jquery",
}
});
|
77d3124f82c0af43bf7710c04db817471f4ebc15 | browser.js | browser.js | 'use strict';
const isIp = require('is-ip');
const defaults = {
timeout: 5000
};
const urls = {
v4: 'https://ipv4.icanhazip.com/',
v6: 'https://ipv6.icanhazip.com/'
};
function queryHttps(version, opts) {
return new Promise((resolve, reject) => {
const doReject = () => reject(new Error('Couldn\'t find your IP'... | 'use strict';
const isIp = require('is-ip');
const defaults = {
timeout: 5000
};
const urls = {
v4: 'https://ipv4.icanhazip.com/',
v6: 'https://ipv6.icanhazip.com/'
};
function queryHttps(version, opts) {
return new Promise((resolve, reject) => {
const doReject = () => reject(new Error('Couldn\'t find your IP'... | Set XHR properties between open() and send() | Set XHR properties between open() and send()
Fixes IE11 compatibility. Thanks @bkonetzny for pointing it out.
Fixes: https://github.com/sindresorhus/public-ip/issues/16
| JavaScript | mit | sindresorhus/public-ip,sindresorhus/public-ip,sindresorhus/public-ip | ---
+++
@@ -15,9 +15,6 @@
const doReject = () => reject(new Error('Couldn\'t find your IP'));
const xhr = new XMLHttpRequest();
- xhr.timeout = opts.timeout;
- xhr.onerror = doReject;
- xhr.ontimeout = doReject;
xhr.onload = () => {
const ip = xhr.responseText.trim();
@@ -29,6 +26,9 @@
};
... |
e08bc01c335bbcf123507b16e63e0e8c6addafc2 | tests/unit/functions/calendar_spec.js | tests/unit/functions/calendar_spec.js | var fs = require("fs");
var path = require("path");
var chai = require("chai");
var expect = chai.expect;
var vm = require("vm");
describe("Functions into modules/default/calendar/calendar.js", function() {
// Fake for use by calendar.js
Module = {}
Module.definitions = {};
Module.register = function (name, modu... | var fs = require("fs");
var path = require("path");
var chai = require("chai");
var expect = chai.expect;
var vm = require("vm");
describe("Functions into modules/default/calendar/calendar.js", function() {
// Fake for use by calendar.js
Module = {}
Module.definitions = {};
Module.register = function (name, modu... | Fix conflict with test function newsfeed | Fix conflict with test function newsfeed
| JavaScript | mit | thobach/MagicMirror,Tyvonne/MagicMirror,morozgrafix/MagicMirror,n8many/MagicMirror,morozgrafix/MagicMirror,MichMich/MagicMirror,heyheyhexi/MagicMirror,roramirez/MagicMirror,berlincount/MagicMirror,thobach/MagicMirror,thobach/MagicMirror,marc-86/MagicMirror,Tyvonne/MagicMirror,vyazadji/MagicMirror,morozgrafix/MagicMirro... | ---
+++
@@ -14,8 +14,10 @@
Module.definitions[name] = moduleDefinition;
};
- // load calendar.js
- require("../../../modules/default/calendar/calendar.js");
+ before(function() {
+ // load calendar.js
+ require("../../../modules/default/calendar/calendar.js");
+ });
describe("capFirst", function() {
w... |
9e1fdd5021b9a38b75a905a2ff97cb07e18576b4 | src/events/resize/multigraph.js | src/events/resize/multigraph.js | module.exports = function($, window, errorHandler) {
var Multigraph = require('../../core/multigraph.js')($),
Point = require('../../math/point.js');
if (typeof(Multigraph.registerResizeEvents)==="function") { return Multigraph; }
Multigraph.respondsTo("registerResizeEvents", function (target) {
... | module.exports = function($, window, errorHandler) {
var Multigraph = require('../../core/multigraph.js')($),
Point = require('../../math/point.js');
if (typeof(Multigraph.registerResizeEvents)==="function") { return Multigraph; }
Multigraph.respondsTo("registerResizeEvents", function (target) {
... | Fix scaling issue when a retina-capable device resizes. Will now correctly scale. | Fix scaling issue when a retina-capable device resizes. Will now correctly scale.
| JavaScript | mit | henhouse/js-multigraph,multigraph/js-multigraph,multigraph/js-multigraph,henhouse/js-multigraph,multigraph/js-multigraph,henhouse/js-multigraph | ---
+++
@@ -12,8 +12,8 @@
function respondGraph()
{
- c.attr("width", container.width());
- c.attr("height", container.height());
+ c.attr("width", container.width() * window.devicePixelRatio);
+ c.attr("height", container.height() * window.devicePixelRa... |
e44a46744b04cc89adc231c2b2c50b6a32193b55 | snippet.js | snippet.js | // MIT license, see: https://github.com/tjcrowder/simple-snippets-console/blob/master/LICENSE
var snippet = {
version: "1.0",
// Writes out the given text in a monospaced paragraph tag, escaping
// & and < so they aren't rendered as HTML.
log: function(msg) {
if (Object.prototype.toString.call(... | // MIT license, see: https://github.com/tjcrowder/simple-snippets-console/blob/master/LICENSE
var snippet = {
version: "1.01",
// Writes out the given text in a monospaced paragraph tag, escaping
// & and < so they aren't rendered as HTML.
log: function(msg) {
if (Object.prototype.toString.call... | Fix stoopid mistake in log | Fix stoopid mistake in log | JavaScript | mit | tjcrowder/simple-snippets-console,tjcrowder/simple-snippets-console | ---
+++
@@ -1,6 +1,6 @@
// MIT license, see: https://github.com/tjcrowder/simple-snippets-console/blob/master/LICENSE
var snippet = {
- version: "1.0",
+ version: "1.01",
// Writes out the given text in a monospaced paragraph tag, escaping
// & and < so they aren't rendered as HTML.
@@ -9,6 +9,8 @... |
19413e0a5fc9decff56bbe1429bda4ff82ac3aa5 | app/js/modules/tabs/settings/controllers/SettingsCtrl.js | app/js/modules/tabs/settings/controllers/SettingsCtrl.js | (function() {
var SettingsCtrl = function($scope, $ionicModal, Auth) {
var vm = this
$ionicModal
.fromTemplateUrl("js/modules/tabs/settings/views/login.html", {
scope: $scope,
animation: "slide-in-up"
})
.then(function(modal) {
vm.loginModal = modal;
})
... | (function() {
var SettingsCtrl = function($scope, $ionicModal, Auth) {
var vm = this
$ionicModal
.fromTemplateUrl("js/modules/tabs/settings/views/login.html", {
scope: $scope,
animation: "slide-in-up"
})
.then(function(modal) {
vm.loginModal = modal;
})
... | Fix bug issue in Settings Ctrl | Fix bug issue in Settings Ctrl
| JavaScript | mit | Plateful/plateful-mobile,Plateful/plateful-mobile | ---
+++
@@ -29,7 +29,13 @@
vm.loginModal.hide();
}
function login(){
- Auth.setAuthToken( vm.username, vm.password );
+
+ Restangular.all('users').all('login').post( vm.username, vm.password )
+ .then(function(err, result){
+ if (err) throw
+ Auth.setAuthToken( re... |
fa62ad541d147e740bedd97f470390aafe882e8f | app/js/arethusa.core/directives/foreign_keys.js | app/js/arethusa.core/directives/foreign_keys.js | 'use strict';
angular.module('arethusa.core').directive('foreignKeys',[
'keyCapture',
'languageSettings',
function (keyCapture, languageSettings) {
return {
restrict: 'A',
scope: {
ngChange: '&',
ngModel: '@',
foreignKeys: '='
},
link: function (scope, element, ... | 'use strict';
angular.module('arethusa.core').directive('foreignKeys',[
'keyCapture',
'languageSettings',
function (keyCapture, languageSettings) {
return {
restrict: 'A',
scope: {
ngChange: '&',
ngModel: '@',
foreignKeys: '='
},
link: function (scope, element, ... | Fix minor mistake in foreignKeys | Fix minor mistake in foreignKeys
| JavaScript | mit | latin-language-toolkit/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa | ---
+++
@@ -30,8 +30,9 @@
element.on('keydown', function (event) {
var input = event.target.value;
- if (lang) {
- var fK = keyCapture.getForeignKey(event, lang);
+ var l = lang();
+ if (l) {
+ var fK = keyCapture.getForeignKey(event, l);
... |
c27428b9ed74120d46700eac0d3b4466453c86a6 | Chrome/background-script.js | Chrome/background-script.js | // FORKED FROM https://github.com/muaz-khan/WebRTC-Experiment/tree/master/Chrome-Extensions/desktopCapture
// this background script is used to invoke desktopCapture API to capture screen-MediaStream.
var session = ['screen', 'window', 'tab'];
chrome.runtime.onConnect.addListener(function (port) {
// this one is c... | // FORKED FROM https://github.com/muaz-khan/WebRTC-Experiment/tree/master/Chrome-Extensions/desktopCapture
// this background script is used to invoke desktopCapture API to capture screen-MediaStream.
var session = ['screen', 'window'];
chrome.runtime.onConnect.addListener(function (port) {
// this one is called f... | Remove 'tab' from session array | Remove 'tab' from session array
| JavaScript | mit | RocketChat/Rocket.Chat.ScreenShare.Extensions,RocketChat/Rocket.Chat.ScreenShare.Extentions | ---
+++
@@ -2,7 +2,7 @@
// this background script is used to invoke desktopCapture API to capture screen-MediaStream.
-var session = ['screen', 'window', 'tab'];
+var session = ['screen', 'window'];
chrome.runtime.onConnect.addListener(function (port) {
// this one is called for each message from "content-s... |
2cc1ca19ac4bf229eb2f7270e711fa3580005063 | spec/fixture/model/image.js | spec/fixture/model/image.js | var Model = require('chaos-orm').Model;
var ImageTag = require('./image-tag');
var Gallery = require('./gallery');
class Image extends Model {
static _define(schema) {
schema.column('id', { type: 'serial' });
schema.column('gallery_id', { type: 'integer' });
schema.column('name', { type: 'string', null: ... | var Model = require('chaos-orm').Model;
var ImageTag = require('./image-tag');
var Gallery = require('./gallery');
class Image extends Model {
static _define(schema) {
schema.column('id', { type: 'serial' });
schema.column('gallery_id', { type: 'integer' });
schema.column('name', { type: 'string', null: ... | Apply core changes which define foreign keys to be not null by default. | Apply core changes which define foreign keys to be not null by default.
| JavaScript | mit | crysalead-js/chaos-database | ---
+++
@@ -9,7 +9,7 @@
schema.column('name', { type: 'string', null: true });
schema.column('title', { type: 'string', length: 50, null: true });
- schema.belongsTo('gallery', 'Gallery', { keys: { gallery_id: 'id' } });
+ schema.belongsTo('gallery', 'Gallery', { keys: { gallery_id: 'id' }, null: tr... |
d2c0a53b7b4d308739940659ff9915d0ffa7db63 | devtools/env.js | devtools/env.js | const path = require('path');
const env = module.exports = {};
env.rootDir = path.join(__dirname, '..');
env.buildDir = path.join(env.rootDir, 'docs'); // we use docs to able publish on gh-pages
env.srcDir = path.join(env.rootDir, 'src');
| const path = require('path');
const env = module.exports = {};
env.rootDir = path.join(__dirname, '..');
env.buildDir = path.join(env.rootDir, 'docs'); // we use docs to able publish on gh-pages
env.srcDir = path.join(env.rootDir, 'src');
env.devServerPort = 3000;
| Return missing dev server port | Return missing dev server port
| JavaScript | mit | rodmax/react-playground,rodmax/react-playground,rodmax/react-playground,rodmax/react-playground | ---
+++
@@ -4,3 +4,5 @@
env.rootDir = path.join(__dirname, '..');
env.buildDir = path.join(env.rootDir, 'docs'); // we use docs to able publish on gh-pages
env.srcDir = path.join(env.rootDir, 'src');
+
+env.devServerPort = 3000; |
501a949395175e83e205ce09ac0386392f1c1999 | db/knexfile.js | db/knexfile.js | module.exports = {
client: 'pg',
connection: process.env.PG_URI + '?ssl=true',
pool: {
min: process.env.PG_POOL_MIN,
max: process.env.PG_POOL_MAX
},
migrations: {
tableName: 'knex_migrations'
},
searchPath: 'knex,public'
};
| module.exports = {
client: 'pg',
connection: process.env.DATABASE_URL + '?ssl=true',
pool: {
min: process.env.PG_POOL_MIN,
max: process.env.PG_POOL_MAX
},
migrations: {
tableName: 'knex_migrations'
},
searchPath: 'knex,public'
};
| Change the connection url for postgres name | Change the connection url for postgres name
| JavaScript | mit | nikolay-radkov/ebudgie-server,nikolay-radkov/ebudgie-server | ---
+++
@@ -1,6 +1,6 @@
module.exports = {
client: 'pg',
- connection: process.env.PG_URI + '?ssl=true',
+ connection: process.env.DATABASE_URL + '?ssl=true',
pool: {
min: process.env.PG_POOL_MIN,
max: process.env.PG_POOL_MAX |
234f228f7426b8df90907f7e123b9eb0aad238ec | spec/index.js | spec/index.js | describe("Unit: eslint-config-openstack", function() {
it("should set espree as the default parser.", function() {
var config = require('../index');
expect(config.parser).toEqual('espree');
});
it("should disable all ecma6 features.", function() {
var config = require('../index');
var keys = Ob... | describe("Unit: eslint-config-openstack", function() {
it("should set espree as the default parser.", function() {
var config = require('../index');
expect(config.parser).toEqual('espree');
});
it("should disable all ecma6 features.", function() {
var config = require('../index');
var keys = Ob... | Add test to alert for rule replacements. | Add test to alert for rule replacements.
Eslint carries forward a replacement list that indicates when a
rule is about to be renamed/deprecated. This unit test checks our
rules against that list, and will fail if it detects a pending
replacement.
Change-Id: If1a20c2f6dd198f8ee9e38625977885e29f05303
| JavaScript | apache-2.0 | openstack/eslint-config-openstack | ---
+++
@@ -20,6 +20,18 @@
expect(config.env).toBeFalsy();
});
+ it("should alert on rule replacements.", function() {
+ var eslintReplacements = require('eslint/conf/replacements.json');
+ var rules = require('../index').rules;
+
+ /*eslint-disable guard-for-in */
+ for (var ruleName in eslint... |
e00ba70ffba16707d8dcc347bb432a20fc0caee2 | modules/librato-cli-config.js | modules/librato-cli-config.js | var filesystem = require('fs');
var config = { baseUrl: 'https://metrics-api.librato.com/v1/' };
try {
config = JSON.parse(filesystem.readFileSync('config.json'));
} catch (err) {
}
var saveConfig = function() {
var configContents = JSON.stringify(config, null, 2);
filesystem.writeFileSync('config.json', configC... | var filesystem = require('fs');
var config = { baseUrl: 'https://metrics-api.librato.com/v1/' };
try {
config = JSON.parse(filesystem.readFileSync(__dirname + '/../config.json'));
} catch (err) {
console.error('Could not read config file at ' + __dirname + '/../config.json');
}
var saveConfig = function() {
var ... | Fix relative pathing of config file. | Fix relative pathing of config file.
| JavaScript | mit | plmwong/librato-cli | ---
+++
@@ -1,8 +1,9 @@
var filesystem = require('fs');
var config = { baseUrl: 'https://metrics-api.librato.com/v1/' };
try {
- config = JSON.parse(filesystem.readFileSync('config.json'));
+ config = JSON.parse(filesystem.readFileSync(__dirname + '/../config.json'));
} catch (err) {
+ console.error('Could not... |
a5ce01e766d1c9f453254e3211a1da4b1a0cfbf8 | db.js | db.js | const express = require('express');
const mongoose = require('mongoose');
// Connect to MongoDB
mongoose.connect('mongodb://localhost/test');
const db = mongoose.connection;
// Define product schema for e-commerce demo site
let productsSchema = mongoose.Schema({
name: String,
description: String,
img: String,
... | const express = require('express');
const mongoose = require('mongoose');
// Connect to MongoDB
mongoose.connect('mongodb://localhost/test');
const db = mongoose.connection;
// Define product schema for e-commerce demo site
let productsSchema = mongoose.Schema({
name: String,
description: String,
img: String,
... | Add flightSchema for travel demo site | Add flightSchema for travel demo site
| JavaScript | mit | dshaps10/full-stack-demo-site,dshaps10/full-stack-demo-site | ---
+++
@@ -13,3 +13,12 @@
img: String,
price: Number
});
+
+// Define flight schema for travel demo site
+let flightsSchema = mongoose.Schema({
+ airline: String,
+ origin: String,
+ dest: String,
+ departureTime: Date,
+ arrivalTime: Date
+}); |
d7afb70d65a16fa6d6a0c4773167f0fcabd622a2 | build-config/RequireJS_config_multiple-bundles.js | build-config/RequireJS_config_multiple-bundles.js | // Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, thi... | // Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, thi... | Remove references to plugins in multiple bundles config It looks like they don't need to be excluded at all. | Remove references to plugins in multiple bundles config
It looks like they don't need to be excluded at all.
| JavaScript | bsd-3-clause | bibliolabs/readium-js,looknear/readium-js,bibliolabs/readium-js,ravn-no/readium-js,kivuto/readium-js,readium/readium-js,looknear/readium-js,readium/readium-js,ravn-no/readium-js,kivuto/readium-js | ---
+++
@@ -25,7 +25,7 @@
name: "readium-js",
create: true,
include: ["readium_js/Readium"],
- exclude: ["readium-external-libs", "readium-shared-js", "readium-cfi-js", "readium-plugin-example", "readium-plugin-annotations"]
+ exclude: ["readium-external-li... |
35613f2c36bad1b2f1ee8e9f24c2bdb20bd7d366 | webpack-plugin/src/validateOptions.js | webpack-plugin/src/validateOptions.js | /* eslint-disable no-param-reassign, max-len */
// Validates and defaults the options
function validateOptions(options) {
// Default options to our preferred value
options.dest = options.dest || 'carte-blanche';
options.filter = options.filter || /([A-Z][a-zA-Z]*\/index|[A-Z][a-zA-Z]*)\.(jsx?|es6|react\.jsx?)$/;... | /* eslint-disable no-param-reassign, max-len */
// Validates and defaults the options
function validateOptions(options) {
// Default options to our preferred value
options.dest = options.dest || 'carte-blanche';
// HACK: Webpack can embed this regex verbatim and the .? makes it not insert a comment terminator
... | Fix webpack regex embed comment termination | Fix webpack regex embed comment termination
Webpack has no protection against inserting */ in the comments it writes when output.pathinfo is true | JavaScript | mit | pure-ui/styleguide,carteb/carte-blanche,pure-ui/styleguide,carteb/carte-blanche | ---
+++
@@ -4,7 +4,8 @@
function validateOptions(options) {
// Default options to our preferred value
options.dest = options.dest || 'carte-blanche';
- options.filter = options.filter || /([A-Z][a-zA-Z]*\/index|[A-Z][a-zA-Z]*)\.(jsx?|es6|react\.jsx?)$/;
+ // HACK: Webpack can embed this regex verbatim and th... |
c5b0ab7347530d091d98b9265402b76e5f684738 | lib/main.js | lib/main.js | "use babel";
import _ from "lodash";
function isMappedToGrammer(grammar) {
return (builder) => {
console.log(builder);
return _.includes(builder.grammars, grammar);
};
}
export default {
activate() {
this.commands = atom.commands.add("atom-workspace", {
"gluon:build": () => { this.build(); },... | "use babel";
import _ from "lodash";
function isMappedToGrammer(grammar) {
return (builder) => {
console.log(builder);
return _.includes(builder.grammars, grammar);
};
}
export default {
activate() {
this.commands = atom.commands.add("atom-workspace", {
"gluon:build": () => { this.build(); },... | Tweak formatting, nesting, and ordering | :art: Tweak formatting, nesting, and ordering
| JavaScript | mit | thomasjo/gluon | ---
+++
@@ -20,26 +20,23 @@
this.commands.dispose();
},
- build() {
- const builder = this.builderForActiveTextEditor();
- if (!builder) { return; }
-
- builder.buildFunction();
- },
-
provideBuildService() {
const self = this;
return {
register(registration) {
if (!r... |
65045c9fd213caf1f2e5ba3c88c74777a57dc35a | app.js | app.js | //Handles browser request for the react app.
const express = require('express');
const path = require('path');
const app = express();
app.set('port', process.env.port || 9080);
app.use('/', express.static('public'));
//app.use('/dist', express.static('dist'));
app.use('/css', express.static('css'));
app.use('/font-a... | //Handles browser request for the react app.
const express = require('express');
const path = require('path');
const app = express();
app.set('port', process.env.PORT || 9080);
app.use('/', express.static('public'));
//app.use('/dist', express.static('dist'));
app.use('/css', express.static('css'));
app.use('/font-a... | Make it run on heroku | Make it run on heroku
| JavaScript | mit | frank18cr/galilee-softec,frank18cr/galilee-softec | ---
+++
@@ -4,7 +4,7 @@
const path = require('path');
const app = express();
-app.set('port', process.env.port || 9080);
+app.set('port', process.env.PORT || 9080);
app.use('/', express.static('public'));
//app.use('/dist', express.static('dist')); |
6187b6471d944d63636b837816dbcb1a2e9cec35 | app.js | app.js | const express = require('express');
const app = express();
const server = require('http').createServer(app);
const io = require('socket.io')(server);
app.use('/public', express.static(__dirname + '/public'));
let users = {};
app.get('/', (req, res) => {
res.sendFile(__dirname + '/index.html');
});
io.on('connecti... | const express = require('express');
const app = express();
const server = require('http').createServer(app);
const io = require('socket.io')(server);
app.use('/public', express.static(__dirname + '/public'));
let users = {};
app.get('/', (req, res) => {
res.sendFile(__dirname + '/index.html');
});
io.on('connecti... | Check whether the user entered a name | Check whether the user entered a name
| JavaScript | mit | kpace/basic_chat_server,kpace/basic_chat_server | ---
+++
@@ -15,7 +15,10 @@
console.log(`A user with id ${socket.id} connected`);
socket.on('send a message', (message) => {
- // emit to all users a meessage is sent
+ if(!socket.id in users) {
+ throw 'You should first enter your name';
+ }
+ // notify all users a meessage is sent
io.so... |
d93c55ab4ee6976c143962da83507c9d3b0c7b6f | cli.js | cli.js | #!/usr/bin/env node
// Copy over the index.html
var fs = require("fs");
var path = require("path");
fs.createReadStream(path.join(__dirname, "index.html"))
.pipe(fs.createWriteStream("index.html"));
// Launch the server.
require("./index.js");
| #!/usr/bin/env node
// Copy over the index.html
var fs = require("fs");
var path = require("path");
var mkdirp = require("mkdirp");
fs.createReadStream(path.join(__dirname, "index.html"))
.pipe(fs.createWriteStream("index.html"));
mkdirp("example-viewer-dist", function (err) {
fs.createReadStream(path.join(__dir... | Update CLI script to copy over css, bundle | Update CLI script to copy over css, bundle
| JavaScript | mit | curran/example-viewer,curran/example-viewer | ---
+++
@@ -3,8 +3,17 @@
// Copy over the index.html
var fs = require("fs");
var path = require("path");
+var mkdirp = require("mkdirp");
+
fs.createReadStream(path.join(__dirname, "index.html"))
.pipe(fs.createWriteStream("index.html"));
+mkdirp("example-viewer-dist", function (err) {
+ fs.createReadStream... |
4681dd8fa864bc9ce60999c447e112f6065a5fa3 | tests/protractor.conf.js | tests/protractor.conf.js | exports.config = {
allScriptsTimeout: 11000,
specs: [
'e2e/*.js'
],
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['load-extension=/Users/adamu/src/screensharing-extensions/chrome/ScreenSharing/',
'auto-select-desktop-capture-source="Entire screen"']
}
},
... | exports.config = {
allScriptsTimeout: 11000,
specs: [
'e2e/*.js'
],
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['load-extension=/Users/adamu/src/screensharing-extensions/chrome/ScreenSharing/',
'auto-select-desktop-capture-source="Entire screen"', 'use-fake-d... | Use fake devices for protractor test | Use fake devices for protractor test
| JavaScript | mit | aullman/opentok-meet,opentok/opentok-meet,opentok/opentok-meet,opentok/opentok-meet,aullman/opentok-meet | ---
+++
@@ -9,7 +9,8 @@
'browserName': 'chrome',
'chromeOptions': {
'args': ['load-extension=/Users/adamu/src/screensharing-extensions/chrome/ScreenSharing/',
- 'auto-select-desktop-capture-source="Entire screen"']
+ 'auto-select-desktop-capture-source="Entire screen"', 'use-fake-device... |
a8770896c5afcc48f9732c652844ea03efd0b48c | src/config.js | src/config.js | module.exports = {
sesRegion: 'us-east-1',
sesEndpoint: process.env.SES_ENDPOINT,
kinesisRegion: process.env.KINESIS_REGION || 'ap-southeast-2',
kinesisEndpoint: process.env.KINESIS_ENDPOINT,
accessKeyId: process.env.AWS_ACCESS_KEY_ID || 'FAKE',
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || 'FAKE',
... | module.exports = {
sesRegion: process.env.SES_REGION || 'us-east-1',
sesEndpoint: process.env.SES_ENDPOINT,
kinesisRegion: process.env.KINESIS_REGION || 'ap-southeast-2',
kinesisEndpoint: process.env.KINESIS_ENDPOINT,
accessKeyId: process.env.AWS_ACCESS_KEY_ID || 'FAKE',
secretAccessKey: process.env.AWS_SEC... | Allow the SES region to be overridden from the environment | Allow the SES region to be overridden from the environment
| JavaScript | agpl-3.0 | rabblerouser/mailer,rabblerouser/mailer | ---
+++
@@ -1,5 +1,5 @@
module.exports = {
- sesRegion: 'us-east-1',
+ sesRegion: process.env.SES_REGION || 'us-east-1',
sesEndpoint: process.env.SES_ENDPOINT,
kinesisRegion: process.env.KINESIS_REGION || 'ap-southeast-2',
kinesisEndpoint: process.env.KINESIS_ENDPOINT, |
eb61d5bd74bba98eb93f9d857e5c1635b1988dcd | src/config.js | src/config.js | /** @namespace */
var here = window.here || {};
here.builder = {
config: {
shareURL: 'https://share.here.com/',
PBAPI: "https://places.sit.api.here.com/places/v1/",
appId: '45vC3JHWu5fUqqUm9Ik2',
appCode: 'U8WhuCuhmYAHgttfjOEdfg'
}
};
| /** @namespace */
var here = window.here || {};
here.builder = {
config: {
shareURL: 'https://share.here.com/',
PBAPI: "https://places.api.here.com/places/v1/",
appId: '45vC3JHWu5fUqqUm9Ik2',
appCode: 'U8WhuCuhmYAHgttfjOEdfg'
}
};
| Change places env to production | Change places env to production
| JavaScript | mit | heremaps/map-linkbuilder-app,heremaps/map-linkbuilder-app,heremaps/map-linkbuilder-app | ---
+++
@@ -4,7 +4,7 @@
here.builder = {
config: {
shareURL: 'https://share.here.com/',
- PBAPI: "https://places.sit.api.here.com/places/v1/",
+ PBAPI: "https://places.api.here.com/places/v1/",
appId: '45vC3JHWu5fUqqUm9Ik2',
appCode: 'U8WhuCuhmYAHgttfjOEdfg'
} |
c9efca76015d56f374e11f8d61b9d39b47f1e56a | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var babel = require('gulp-babel');
require("babel-polyfill");
gulp.task('default', function () {
return gulp.src('src/superagent-jsonp.js')
.pipe(babel({ blacklist: ['strict'] }))
.pipe(gulp.dest('dist'));
});
| var gulp = require('gulp');
var babel = require('gulp-babel');
require("babel-polyfill");
gulp.task('default', function () {
return gulp.src('src/superagent-jsonp.js')
.pipe(babel())
.pipe(gulp.dest('dist'));
});
| Remove unused babel 5 option | Remove unused babel 5 option
| JavaScript | mit | lamp/superagent-jsonp | ---
+++
@@ -4,6 +4,6 @@
gulp.task('default', function () {
return gulp.src('src/superagent-jsonp.js')
- .pipe(babel({ blacklist: ['strict'] }))
+ .pipe(babel())
.pipe(gulp.dest('dist'));
}); |
339ee6c2186a6241540317abc265e7809e6280cc | src/logger.js | src/logger.js | import chalk from 'chalk';
import { map } from 'lodash/fp';
const logger = {
// default log level is silent!
level: 0,
init({ level, colour }) {
if (this.isInitialised) return;
this.colour = !!colour;
const levelMap = { debug: 4, log: 3, warn: 2, error: 1, silent: 0 };
this... | import chalk from 'chalk';
import { map } from 'lodash/fp';
const logger = {
// default log level is silent!
level: 0,
init({ level, colour }) {
if (this.isInitialised) return;
this.colour = !!colour;
const levelMap = { debug: 4, log: 3, warn: 2, error: 1, silent: 0 };
this... | Add prefix to debug logs to make clearer when not colourised | Add prefix to debug logs to make clearer when not colourised
| JavaScript | mit | rohanorton/batch-file-renamer | ---
+++
@@ -14,6 +14,8 @@
},
debug(...args) {
if (this.level < 4) return;
+ // add prefix:
+ args = [ '[DEBUG]', ...args ];
if (this.colour) args = map(chalk.gray, args);
console.log(...args);
}, |
511f382b39596a5ca48515b22885a0e711c0065b | components/form/markdown-editor/markdown-editor.js | components/form/markdown-editor/markdown-editor.js | angular.module( 'gj.Form.MarkdownEditor', [ 'monospaced.elastic', 'gj.Form', 'gj.Api', 'gj.Permalink' ] );
| angular.module( 'gj.Form.MarkdownEditor', [ 'monospaced.elastic', 'gj.Form', 'gj.Api', 'gj.Clipboard' ] );
| Add requirement to Comment Widget for Clipboard service. | Add requirement to Comment Widget for Clipboard service.
| JavaScript | mit | gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib | ---
+++
@@ -1 +1 @@
-angular.module( 'gj.Form.MarkdownEditor', [ 'monospaced.elastic', 'gj.Form', 'gj.Api', 'gj.Permalink' ] );
+angular.module( 'gj.Form.MarkdownEditor', [ 'monospaced.elastic', 'gj.Form', 'gj.Api', 'gj.Clipboard' ] ); |
4d7ae9d91fcde1e28953d45206e5bb7cd2f5e98a | src/actions/SpecsActions.js | src/actions/SpecsActions.js |
export function setSpecsURLsForDocumentWithID(documentID, specsURLs) {
}
| // TODO: change to ../config ?
import { getActionURL } from '../stores/ConfigurationStore';
export function setSpecsURLsForDocument({ documentID, specsURLs }) {
return arguments[0];
}
export function invalidateSpec({ specURL }) {
return arguments[0];
}
export function beginLoadingSpec({ specURL }) {
return ar... | Add declarative flambeau-style Specs actions | Add declarative flambeau-style Specs actions
| JavaScript | apache-2.0 | BurntIcing/IcingEditor,BurntIcing/IcingEditor | ---
+++
@@ -1,4 +1,75 @@
+// TODO: change to ../config ?
+import { getActionURL } from '../stores/ConfigurationStore';
-export function setSpecsURLsForDocumentWithID(documentID, specsURLs) {
-
+
+export function setSpecsURLsForDocument({ documentID, specsURLs }) {
+ return arguments[0];
}
+
+export function inv... |
1cf4715e477e758d73fbf2943d3cc5605166fb6c | packages/vega-view/src/transforms/Mark.js | packages/vega-view/src/transforms/Mark.js | import {Transform} from 'vega-dataflow';
import {Item, GroupItem} from 'vega-scenegraph';
import {inherits} from 'vega-util';
/**
* Bind scenegraph items to a scenegraph mark instance.
* @constructor
* @param {object} params - The parameters for this operator.
* @param {object} params.markdef - The mark definition... | import {Transform} from 'vega-dataflow';
import {Item, GroupItem} from 'vega-scenegraph';
import {inherits} from 'vega-util';
/**
* Bind scenegraph items to a scenegraph mark instance.
* @constructor
* @param {object} params - The parameters for this operator.
* @param {object} params.markdef - The mark definition... | Annotate scenegraph group items with runtime context. | Annotate scenegraph group items with runtime context.
| JavaScript | bsd-3-clause | vega/vega,vega/vega,vega/vega,lgrammel/vega,vega/vega | ---
+++
@@ -27,6 +27,7 @@
mark = pulse.dataflow.scenegraph().mark(_.scenepath, _.markdef);
mark.source = this;
this.value = mark;
+ mark.group.context = _.scenepath.context;
}
// initialize entering items |
70d4c50688bb0492a7f5df19504ae4faa3775dca | gulp/tasks/scripts.js | gulp/tasks/scripts.js | var gulp = require('gulp'),
browserify = require('browserify'),
babelify = require('babelify'),
source = require('vinyl-source-stream'),
paths = require('../paths');
gulp.task('scripts:app', function () {
return browserify({
entries: paths.app.scriptsMain,
debug: true,
transform: ['browse... | var gulp = require('gulp'),
browserify = require('browserify'),
babelify = require('babelify'),
source = require('vinyl-source-stream'),
paths = require('../paths');
gulp.task('scripts:app', function () {
return browserify({
entries: paths.app.scriptsMain,
debug: true,
transform: ['browse... | Add error handling so JS errors don't break streams | Add error handling so JS errors don't break streams
Fixes #1
| JavaScript | mit | trendyminds/pura,trendyminds/pura | ---
+++
@@ -12,6 +12,10 @@
})
.transform('babelify', { presets: ['es2015'] })
.bundle()
+ .on('error', function (err) {
+ console.log(err.toString());
+ this.emit('end');
+ })
.pipe(source('app.js'))
.pipe(gulp.dest(paths.app.tmpJSDir));
});
@@ -22,6 +26,10 @@
})
.transform('babelify', {... |
258f0cd6ddceaa84c4f416bd1a338f2f653f57ba | src/components/Dashboard.js | src/components/Dashboard.js | import React, { PropTypes } from 'react';
const formatValue = (item, results) => {
if (!results.hasOwnProperty(item.query)) {
return '—';
}
return (item.formatValue || (e => e))(results[item.query]);
};
const Dashboard = props => (
<div className="dashboard">
{props.items.map(item => (
<div cla... | import React, { PropTypes } from 'react';
const formatValue = (item, results) => {
if (!results.hasOwnProperty(item.query)) {
return '—';
}
return (item.formatValue || (e => e))(results[item.query]);
};
const Dashboard = props => (
<div className="dashboard">
{props.items.map(item => (
<div cla... | Remove unnecessary space from the dashboard items | Remove unnecessary space from the dashboard items
| JavaScript | mit | quintel/etmobile,quintel/etmobile,quintel/etmobile | ---
+++
@@ -12,7 +12,7 @@
<div className="dashboard">
{props.items.map(item => (
<div className="dashboard-item" key={item.query}>
- {item.title}{' '}
+ {item.title}
<span className="value">{formatValue(item, props.results)}</span>
</div>
))} |
6fa8f0c12a3802c92f61d08843f9bfca8b7917c6 | src/components/Hand/Hand.js | src/components/Hand/Hand.js | import React, { Component, PropTypes } from 'react';
import { List } from 'immutable';
import { DraggableCard } from 'containers';
export default class Hand extends Component {
static propTypes = {
cards: PropTypes.instanceOf(List),
}
render() {
const { cards } = this.props;
const styles = require('... | import React, { Component, PropTypes } from 'react';
import { List } from 'immutable';
import { DraggableCard } from 'containers';
export default class Hand extends Component {
static propTypes = {
cards: PropTypes.instanceOf(List),
}
render() {
const { cards } = this.props;
const styles = require('... | Make use of size instead of count() | Make use of size instead of count()
| JavaScript | mit | inooid/react-redux-card-game,inooid/react-redux-card-game | ---
+++
@@ -10,7 +10,7 @@
render() {
const { cards } = this.props;
const styles = require('./Hand.scss');
- const margin = cards.count() * 6;
+ const margin = cards.size * 6;
const cardList = cards.map((card, index) => (
<DraggableCard |
e7ed1a9bc83bed17178860d4957f2c1f1cc8efd4 | js/admin/chosen/chosenImage.jquery.js | js/admin/chosen/chosenImage.jquery.js | /*
* Chosen jQuery plugin to add an image to the dropdown items.
*/
(function($) {
$.fn.chosenImage = function(options) {
return this.each(function() {
var $select = $(this);
var imgMap = {};
// 1. Retrieve img-src from data attribute and build object of image sources... | /*
* Chosen jQuery plugin to add an image to the dropdown items.
*/
(function($) {
$.fn.chosenImage = function(options) {
return this.each(function() {
var $select = $(this);
var imgMap = {};
// 1. Retrieve img-src from data attribute and build object of image sources... | Make use of the events provided by chosen. Make it work when using the search field. | Make use of the events provided by chosen.
Make it work when using the search field.
| JavaScript | mit | noplanman/podlove-publisher,podlove/podlove-publisher,noplanman/podlove-publisher,katrinleinweber/podlove-publisher,katrinleinweber/podlove-publisher,katrinleinweber/podlove-publisher,podlove/podlove-publisher,podlove/podlove-publisher,katrinleinweber/podlove-publisher,podlove/podlove-publisher,noplanman/podlove-publis... | ---
+++
@@ -19,9 +19,10 @@
var $chosen = $select.next('.chosen-container').addClass('chosenImage-container');
// 3. Style lis with image sources.
- $chosen.mousedown(function(event) {
- $chosen.find('.chosen-results li').each(function(i) {
- $(t... |
bf8150f88649e28ae675be22f5a5e11425e496d0 | src/main/webapp/scripts/controllers.js | src/main/webapp/scripts/controllers.js | 'use strict';
angular.
module('buildMonitor.controllers', [ 'buildMonitor.services', 'uiSlider']).
controller('JobViews', function($scope, $dialog, $timeout, fetch, storage) {
$scope.fontSize = storage.retrieve('fontSize', 1);
$scope.numberOfColumns = storage.retrieve('numberOfColumns',... | 'use strict';
angular.
module('buildMonitor.controllers', [ 'buildMonitor.services', 'uiSlider']).
controller('JobViews', function($scope, $rootScope, $dialog, $timeout, fetch, storage) {
$scope.fontSize = storage.retrieve('fontSize', 1);
$scope.numberOfColumns = storage.retrieve('numbe... | Build Monitor should now correctly respond to Jenkins being restarted | Build Monitor should now correctly respond to Jenkins being restarted
| JavaScript | mit | erikhakansson/jenkins-build-monitor-plugin,drekbour/jenkins-build-monitor-plugin,jan-molak/jenkins-build-monitor-plugin,guoliang/jenkins-build-monitor-plugin,Le0Michine/jenkins-build-monitor-plugin,seanly/jenkins-build-monitor-plugin,Witos/jenkins-build-monitor-plugin,seanly/jenkins-build-monitor-plugin,erikhakansson/j... | ---
+++
@@ -3,7 +3,7 @@
angular.
module('buildMonitor.controllers', [ 'buildMonitor.services', 'uiSlider']).
- controller('JobViews', function($scope, $dialog, $timeout, fetch, storage) {
+ controller('JobViews', function($scope, $rootScope, $dialog, $timeout, fetch, storage) {
$scope.fontSize ... |
02a986474608e64f161d8ead7534b537614ede35 | extensions/ibus-indicator@example.com/extension.js | extensions/ibus-indicator@example.com/extension.js | /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Main = imports.ui.main;
const Panel = imports.ui.panel;
const PopupMenu = imports.ui.popupMenu;
const Indicator = imports.ui.status.ibus.indicator;
let indicator = null;
let menus = null;
function init() {
}
function main() {
// The gette... | /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Main = imports.ui.main;
const Indicator = imports.ui.status.ibus.indicator;
let indicator = null;
function init() {
}
function enable() {
if (!indicator) {
indicator = new Indicator.Indicator();
Main.panel.addToStatusArea(... | Make use of standard API addToStatusArea | Make use of standard API addToStatusArea
| JavaScript | lgpl-2.1 | fujiwarat/ibus-gjs,fujiwarat/ibus-gjs | ---
+++
@@ -1,48 +1,23 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Main = imports.ui.main;
-const Panel = imports.ui.panel;
-const PopupMenu = imports.ui.popupMenu;
const Indicator = imports.ui.status.ibus.indicator;
let indicator = null;
-let menus = null;
function init() ... |
8d84dec27606c0ef2b590091f916a70eb48fd2cd | js/ClientApp.js | js/ClientApp.js | var div = React.DOM.div
var h1 = React.DOM.h1
var MyTitle = React.createClass({
render () {
return (
div(null,
h1(null, 'Check out my first class component!')
)
)
}
})
var MyFirstComponent = (
div(null,
React.createElement(MyTitle, null)
)
)
ReactDOM.render(MyFirstComponent, d... | var div = React.DOM.div
var h1 = React.DOM.h1
var MyTitle = React.createClass({
render () {
return (
div(null,
h1(null, 'Check out my first class component!')
)
)
}
})
var MyTitleFact = React.createFactory(MyTitle)
var MyFirstComponent = (
div(null,
MyTitleFact(null),
React.... | Use factory technique for rendering component | Use factory technique for rendering component
| JavaScript | mit | bencodezen/cloneflix-react-with-bholt,bencodezen/cloneflix-react-with-bholt | ---
+++
@@ -11,8 +11,11 @@
}
})
+var MyTitleFact = React.createFactory(MyTitle)
+
var MyFirstComponent = (
div(null,
+ MyTitleFact(null),
React.createElement(MyTitle, null)
)
) |
1d5eaf75e434e6ddf91221313804802c67e1145e | js/analytics.js | js/analytics.js | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('creat... | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('creat... | Add print button to resume | Add print button to resume
| JavaScript | mit | coryflucas/CoryLucasDotCom.old | ---
+++
@@ -3,3 +3,4 @@
ga('create', 'UA-43160335-1', 'corylucas.com');
ga('send', 'pageview');
+$('a').click(function(){ga('send', 'event', 'link', 'click', $(this).text()); return true}) |
2f7850ce7aee73acec48d53946db02a82ed02665 | packages/talos.forms/inputs/time.js | packages/talos.forms/inputs/time.js | // Time input
import { Template } from 'meteor/templating';
import { ReactiveForms } from 'meteor/templates:forms';
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';
checkNpmVersions({
jquery: '2.2.4',
}, 'talos:forms');
const $ = require('jquery');
ReactiveForms.createElement({
template: '... | // Time input
import { ReactiveForms } from 'meteor/templates:forms';
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';
checkNpmVersions({
jquery: '2.2.4',
}, 'talos:forms');
const $ = require('jquery');
ReactiveForms.createElement({
template: 'timeInput',
validationEvent: 'blur',
rende... | Add rendered callback for lolliclock | Add rendered callback for lolliclock
| JavaScript | mit | talos-code/mdl-blaze,talos-code/mdl-blaze | ---
+++
@@ -1,6 +1,5 @@
// Time input
-import { Template } from 'meteor/templating';
import { ReactiveForms } from 'meteor/templates:forms';
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';
|
a25983402657c0394c2314daafd89afd8c301779 | packages/test-in-browser/package.js | packages/test-in-browser/package.js | Package.describe({
summary: "Run tests interactively in the browser",
version: '1.0.8-plugins.0',
documentation: null
});
Package.onUse(function (api) {
// XXX this should go away, and there should be a clean interface
// that tinytest and the driver both implement?
api.use('tinytest');
api.use('bootstra... | Package.describe({
summary: "Run tests interactively in the browser",
version: '1.0.8-plugins.1',
documentation: null
});
Package.onUse(function (api) {
// XXX this should go away, and there should be a clean interface
// that tinytest and the driver both implement?
api.use('tinytest');
api.use('bootstra... | Add webapp dependency to test-in-browser | Add webapp dependency to test-in-browser
This ensures the app created for test-packages will have the default
Cordova plugins installed.
| JavaScript | mit | devgrok/meteor,yalexx/meteor,lpinto93/meteor,youprofit/meteor,emmerge/meteor,sdeveloper/meteor,Theviajerock/meteor,shmiko/meteor,benstoltz/meteor,Ken-Liu/meteor,steedos/meteor,aramk/meteor,udhayam/meteor,yyx990803/meteor,baiyunping333/meteor,Jeremy017/meteor,ericterpstra/meteor,paul-barry-kenzan/meteor,juansgaitan/mete... | ---
+++
@@ -1,6 +1,6 @@
Package.describe({
summary: "Run tests interactively in the browser",
- version: '1.0.8-plugins.0',
+ version: '1.0.8-plugins.1',
documentation: null
});
@@ -14,7 +14,7 @@
api.use('session');
api.use('reload');
- api.use(['blaze', 'templating', 'spacebars',
+ api.use(['we... |
99a9a6e891408164e2ee26ad49ff3dcbd082281c | example/Gulpfile.js | example/Gulpfile.js | var NwBuilder = require('node-webkit-builder');
var gulp = require('gulp');
var gutil = require('gulp-util');
gulp.task('nw', function (callback) {
var nw = new NwBuilder({
version: '0.9.2',
files: [ './nwapp/**']
});
// Log stuff you want
nw.on('log', function (mgs) {
gutil.l... | var NwBuilder = require('node-webkit-builder');
var gulp = require('gulp');
var gutil = require('gulp-util');
gulp.task('nw', function () {
var nw = new NwBuilder({
version: '0.9.2',
files: [ './nwapp/**']
});
// Log stuff you want
nw.on('log', function (msg) {
gutil.log('node... | Use promises in Gulp example | Use promises in Gulp example
Gulp supports returning promises to make the task not parallel, so just return it, and use promise-like functions for error logging.
Also, fix a couple typos. | JavaScript | mit | Crunch/nw-builder,imperiumzigna/nw-builder,modulexcite/nw-builder,marianoguerra/nw-builder,GrabCAD/node-webkit-builder,nwjs/nw-builder,modulexcite/nw-builder,cypress-io/nw-builder,marianoguerra/nw-builder,GrabCAD/node-webkit-builder,nwjs/nw-builder,donkeycode/nw-builder,cypress-io/nw-builder,donkeycode/nw-builder,imper... | ---
+++
@@ -2,7 +2,7 @@
var gulp = require('gulp');
var gutil = require('gulp-util');
-gulp.task('nw', function (callback) {
+gulp.task('nw', function () {
var nw = new NwBuilder({
version: '0.9.2',
@@ -10,16 +10,12 @@
});
// Log stuff you want
- nw.on('log', function (mgs) {
- ... |
8ad2eb577c58dd20e07baf009a9bcb69ec696ee2 | karma.conf.js | karma.conf.js | // Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha', 'sinon-chai', '@angular/cli'],
plugins: [
require('karma-mocha')... | // Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha', 'sinon-chai', '@angular/cli'],
plugins: [
require('karma-mocha')... | Increase Karma's browserNoActivityTimeout to fight timeouts in CI | Increase Karma's browserNoActivityTimeout to fight timeouts in CI
| JavaScript | mit | mattbdean/Helium,mattbdean/Helium,mattbdean/Helium,mattbdean/Helium | ---
+++
@@ -16,6 +16,7 @@
require('@angular/cli/plugins/karma')
],
browserDisconnectTimeout: 30000,
+ browserNoActivityTimeout: 30000,
client: {
clearContext: false
}, |
23a014af24dec52f479603f2bd6df0f3cbbae479 | src/js/client/util/index.js | src/js/client/util/index.js | import shortcut from './shortcut';
import setUserRequire from './require';
import log from './log';
module.exports = {
setUserRequire,
shortcut,
log
} | import shortcut from './shortcut';
import setUserRequire from './require';
module.exports = {
setUserRequire,
shortcut,
} | Remove old log utility function | Remove old log utility function
| JavaScript | mit | simonlovesyou/AutoRobot | ---
+++
@@ -1,9 +1,7 @@
import shortcut from './shortcut';
import setUserRequire from './require';
-import log from './log';
module.exports = {
setUserRequire,
shortcut,
- log
} |
e68df8834a5e01b596e65aa91e1f5fe59bb9ad82 | lib/entity.js | lib/entity.js | /**
* Module dependencies.
*/
var pkginfo = require('pkginfo')
, path = require('path');
/**
* Creates an entity object.
*
* An entity is an object with properties used to identify the application.
* These properties can be used in any context in which an identifier is
* needed, such as security where stable... | /**
* Module dependencies.
*/
var pkginfo = require('pkginfo')
, path = require('path');
/**
* Creates an entity object.
*
* An entity is an object with properties used to identify the application.
* These properties can be used in any context in which an identifier is
* needed, such as security where stable... | Remove unneeded fix to cast setting to array. | Remove unneeded fix to cast setting to array.
| JavaScript | mit | bixbyjs/bixby-common | ---
+++
@@ -27,19 +27,7 @@
entity.id = 'file://' + path.dirname(pkginfo.find(require.main));
}
- var aliases = settings.get('entity/aliases');
- // FIX TOML
- var arr, i, len;
- if (typeof aliases == 'object') {
- arr = [];
- for (i = 0, len = Object.keys(aliases).length; i < len; ++i) {
- ... |
e6da6955f5632ff3e2766cd54b815f779767ad3d | cli/main.js | cli/main.js | #!/usr/bin/env node
'use strict'
require('debug').enable('UCompiler:*')
const UCompiler = require('..')
const knownCommands = ['go', 'watch']
const parameters = process.argv.slice(2)
if (!parameters.length || knownCommands.indexOf(parameters[0]) === -1) {
console.log('Usage: ucompiler go|watch [path]')
process.ex... | #!/usr/bin/env node
'use strict'
process.title = 'ucompiler'
require('debug').enable('UCompiler:*')
const UCompiler = require('..')
const knownCommands = ['go', 'watch']
const parameters = process.argv.slice(2)
if (!parameters.length || knownCommands.indexOf(parameters[0]) === -1) {
console.log('Usage: ucompiler go... | Set process title to ucompiler | :new: Set process title to ucompiler
| JavaScript | mit | steelbrain/UCompiler | ---
+++
@@ -1,5 +1,6 @@
#!/usr/bin/env node
'use strict'
+process.title = 'ucompiler'
require('debug').enable('UCompiler:*')
const UCompiler = require('..') |
73d2239f5edb926e8b8db9f9957f2cf6eaa28186 | lib/htpasswd.js | lib/htpasswd.js | #!/usr/bin/env node
/**
* Now use CoffeeScript.
*/
require('coffee-script/register');
/**
* Importing local modules.
*/
var program = require('./program');
var processor = require('./processor');
var utils = require('./utils');
if (require.main === module ) {
// Parses and processes command line arguments.
pro... | #!/usr/bin/env node
/**
* Now use CoffeeScript.
*/
require('coffee-script/register');
var program, processor, utils;
if (require.main === module ) {
// Parses and processes command line arguments.
program = require('./program');
processor = require('./processor');
program.parse(process.argv);
processor.proces... | Fix native prototype pollution in library mode Since `processor` has the package `colors` as an upstream dependency, String` s prototype would get unexpectedly modified. This commit fixes that issue by only loading `processor` if really needed. | Fix native prototype pollution in library mode
Since `processor` has the package `colors` as an upstream dependency, String` s prototype would get unexpectedly modified.
This commit fixes that issue by only loading `processor` if really needed.
| JavaScript | mit | http-auth/htpasswd,gevorg/htpasswd,CapacitorSet/htpasswd | ---
+++
@@ -5,18 +5,16 @@
*/
require('coffee-script/register');
-/**
- * Importing local modules.
- */
-var program = require('./program');
-var processor = require('./processor');
-var utils = require('./utils');
+var program, processor, utils;
if (require.main === module ) {
// Parses and processes comman... |
9b2efafb62f738f437b8c056ea4bcee26cdd9226 | lib/task-data/tasks/install-coreos.js | lib/task-data/tasks/install-coreos.js | // Copyright 2015, EMC, Inc.
module.exports = {
friendlyName: 'Install CoreOS',
injectableName: 'Task.Os.Install.CoreOS',
implementsTask: 'Task.Base.Os.Install',
options: {
// NOTE: user/pass aren't used by the coreos installer at the moment,
// but they are required values
user... | // Copyright 2015, EMC, Inc.
module.exports = {
friendlyName: 'Install CoreOS',
injectableName: 'Task.Os.Install.CoreOS',
implementsTask: 'Task.Base.Os.Install',
options: {
// NOTE: user/pass aren't used by the coreos installer at the moment,
// but they are required values
user... | Enable CoreOS Install to Disk | Enable CoreOS Install to Disk
| JavaScript | apache-2.0 | AlaricChan/on-tasks,AlaricChan/on-tasks,bbcyyb/on-tasks,nortonluo/on-tasks,nortonluo/on-tasks,bbcyyb/on-tasks | ---
+++
@@ -12,6 +12,7 @@
profile: 'install-coreos.ipxe',
comport: 'ttyS0',
hostname: 'coreos-node',
+ installDisk: '/dev/sda',
completionUri: 'pxe-cloud-config.yml'
},
properties: { |
28956f188fce9f5e2618f84d6d4af7fbbf629383 | project/frontend/src/containers/LandingPage/LandingPage.js | project/frontend/src/containers/LandingPage/LandingPage.js | import React from "react";
import classes from "./LandingPage.module.css";
import LoginButtonSet from "../../components/UI/LoginButtonSet/LoginButtonSet";
const LandingPage = (props) => {
return (
<div className={classes.LandingPageContent}>
<div className={classes.Hero}>
<h1>Who's the next trendse... | import React from "react";
import classes from "./LandingPage.module.css";
import LoginButtonSet from "../../components/UI/LoginButtonSet/LoginButtonSet";
import Illustration from "../../assets/landing_illustration.png";
const LandingPage = (props) => {
return (
<div className={classes.LandingPageContent}>
... | Add illustration to landing page | Add illustration to landing page
| JavaScript | apache-2.0 | googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks | ---
+++
@@ -1,6 +1,7 @@
import React from "react";
import classes from "./LandingPage.module.css";
import LoginButtonSet from "../../components/UI/LoginButtonSet/LoginButtonSet";
+import Illustration from "../../assets/landing_illustration.png";
const LandingPage = (props) => {
return (
@@ -13,7 +14,9 @@
... |
0ce66fe7c73d99e33f4cb7726a9b2d135b95045a | lib/node_modules/@stdlib/array/uint32/lib/index.js | lib/node_modules/@stdlib/array/uint32/lib/index.js | 'use strict';
/**
* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.
*
* @module @stdlib/array/uint32
*
* @example
* var ctor = require( '@stdlib/array/uint32' );
*
* var arr = new ctor( 10 );
* // returns <Uint32Array>
*/
// MODULES //
... | 'use strict';
/**
* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.
*
* @module @stdlib/array/uint32
*
* @example
* var ctor = require( '@stdlib/array/uint32' );
*
* var arr = new ctor( 10 );
* // returns <Uint32Array>
*/
// MODULES //
... | Refactor to avoid dynamic module resolution | Refactor to avoid dynamic module resolution
| JavaScript | apache-2.0 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | ---
+++
@@ -15,15 +15,17 @@
// MODULES //
var hasUint32ArraySupport = require( '@stdlib/utils/detect-uint32array-support' );
+var builtin = require( './uint32array.js' );
+var polyfill = require( './polyfill.js' );
// MAIN //
var ctor;
if ( hasUint32ArraySupport() ) {
- ctor = require( './uint32array.js'... |
b6ddcf46779f0d813daafd34600b2054fce8aed6 | src/common/makeWclUrl.js | src/common/makeWclUrl.js | import makeUrl from './makeUrl';
const API_BASE = process.env.REACT_APP_API_BASE || '';
const WCL_API_KEY = process.env.REACT_APP_WCL_API_KEY;
export default function makeWclUrl(base, queryParams = {}) {
if (!WCL_API_KEY && process.env.NODE_ENV !== 'production') {
const message = 'Invalid API key. You need to e... | import makeUrl from './makeUrl';
const API_BASE = process.env.REACT_APP_API_BASE || '';
const WCL_API_KEY = process.env.REACT_APP_WCL_API_KEY;
// Since the WCL API has a fairly strict request cap, we have implemented a proxy that caches responses. This proxy provides the same functionality as WCL.
export default fun... | Add comment explaining the WCL API proxy | Add comment explaining the WCL API proxy
| JavaScript | agpl-3.0 | fyruna/WoWAnalyzer,mwwscott0/WoWAnalyzer,sMteX/WoWAnalyzer,hasseboulen/WoWAnalyzer,ronaldpereira/WoWAnalyzer,fyruna/WoWAnalyzer,FaideWW/WoWAnalyzer,sMteX/WoWAnalyzer,hasseboulen/WoWAnalyzer,anom0ly/WoWAnalyzer,hasseboulen/WoWAnalyzer,Juko8/WoWAnalyzer,Juko8/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,anom0l... | ---
+++
@@ -3,6 +3,7 @@
const API_BASE = process.env.REACT_APP_API_BASE || '';
const WCL_API_KEY = process.env.REACT_APP_WCL_API_KEY;
+// Since the WCL API has a fairly strict request cap, we have implemented a proxy that caches responses. This proxy provides the same functionality as WCL.
export default functi... |
dfd213c775a43a4b1f933afb36aaaebb908e0eb5 | src/index.js | src/index.js | /*
* Author: Alexandre Havrileck (Oxyno-zeta)
* Date: 03/07/16
* Licence: See Readme
*/
/* ************************************* */
/* ******** REQUIRE ******** */
/* ************************************* */
const server = require('./server');
/* ************************************* */
/* ******** ... | /*
* Author: Alexandre Havrileck (Oxyno-zeta)
* Date: 03/07/16
* Licence: See Readme
*/
/* ************************************* */
/* ******** REQUIRE ******** */
/* ************************************* */
const server = require('./server');
/* ************************************* */
/* ******** ... | Exit 1 when error detected on main instruction | [Backend] Exit 1 when error detected on main instruction
| JavaScript | mit | oxyno-zeta/crash-reporter-electron,oxyno-zeta/crash-reporter-electron | ---
+++
@@ -17,4 +17,4 @@
server.prepare().then(() => (
// Listen server
server.listenSync()
-));
+)).catch(() => process.exit(1)); |
1949fb82966f31e1e57f9017fec7776c8dcfcc18 | src/index.js | src/index.js | //
// Add boundary-handling to a Leaflet map
//
// The boundary layer allows exactly one boundary at a time and fires events
// (boundarieschange) when this layer changes.
//
L.Map.include({
boundariesLayer: null,
_initBoundaries: function () {
this.boundariesLayer = L.geoJson(null, {
colo... | //
// Add boundary-handling to a Leaflet map
//
// The boundary layer allows exactly one boundary at a time and fires events
// (boundarieschange) when this layer changes.
//
var mixin = {
boundariesLayer: null,
_initBoundaries: function () {
this.boundariesLayer = L.geoJson(null, {
color:... | Make it so you have to explicitly initialize the mixin | Make it so you have to explicitly initialize the mixin
Also lets you add the mixin to other classes
| JavaScript | agpl-3.0 | 596acres/livinglots.boundaries | ---
+++
@@ -5,7 +5,7 @@
// (boundarieschange) when this layer changes.
//
-L.Map.include({
+var mixin = {
boundariesLayer: null,
_initBoundaries: function () {
@@ -30,6 +30,14 @@
}
}
-});
+};
-L.Map.addInitHook('_initBoundaries');
+module.exports = {
+ initialize: function (mapCla... |
426d476b75c1645f67a01e23fa4ef164d3875a38 | src/index.js | src/index.js | module.exports = function ({Transformer}) {
return new Transformer('minification.removeReactPropTypes', {
Property: {
exit(node) {
if (node.computed || node.key.name !== 'propTypes') {
return;
}
const parent = this.findParent((parent) => {
return parent.type === ... | export default function ({ Plugin, types: t }) {
const visitor = {
Property: {
exit(node) {
if (node.computed || node.key.name !== 'propTypes') {
return;
}
const parent = this.findParent((parent) => {
return parent.type === 'CallExpression';
});
... | Migrate to new plugin api | Migrate to new plugin api
| JavaScript | mit | nkt/babel-plugin-react-remove-prop-types,NogsMPLS/babel-plugin-transform-react-remove-statics,oliviertassinari/babel-plugin-transform-react-remove-prop-types | ---
+++
@@ -1,5 +1,5 @@
-module.exports = function ({Transformer}) {
- return new Transformer('minification.removeReactPropTypes', {
+export default function ({ Plugin, types: t }) {
+ const visitor = {
Property: {
exit(node) {
if (node.computed || node.key.name !== 'propTypes') {
@@ -11,13 +11... |
e6cfaae4d02a4cc3420fcc615ecd641635146e54 | src/index.js | src/index.js | const get = require('lodash.get');
const forEach = require('lodash.foreach');
const defaultsDeep = require('lodash.defaultsdeep');
const loaderUtils = require('loader-utils');
const parse = require('./parse').default;
const defaultOptions = require('./options');
/**
* ComponentOne Loader
* @param {string} content
*... | const get = require('lodash.get');
const forEach = require('lodash.foreach');
const defaultsDeep = require('lodash.defaultsdeep');
const loaderUtils = require('loader-utils');
const parse = require('./parse').default;
const defaultOptions = require('./options');
/**
* ComponentOne Loader
* @param {string} content
*... | Fix issue with Javascript compilation | Fix issue with Javascript compilation
| JavaScript | mit | digitalie/one-loader | ---
+++
@@ -39,6 +39,7 @@
* @returns {string}
*/
function getRequire(context, options, tag, type, resource) {
- let url = loaderUtils.stringifyRequest(context, '!' + options.map[type] + require.resolve('./select-loader.js') + '?tag=' + tag + '&type=' + type + '!' + resource)
- return `require(${url});\r\n`... |
7b58ced279eafaecd624d3063644377ab7a49bd2 | resources/provision/sparta_utils.js | resources/provision/sparta_utils.js | var _ = require('underscore');
module.exports.toBoolean = function(value) {
var bValue = value;
if (_.isString(bValue)) {
switch (bValue.toLowerCase().trim()) {
case "true":
case "1":
bValue = true;
break;
case "false":
case "0":
case null:
bValue = false;
... | var _ = require('underscore');
module.exports.toBoolean = function(value) {
var bValue = value;
if (_.isString(bValue)) {
switch (bValue.toLowerCase().trim()) {
case "true":
case "1":
bValue = true;
break;
case "false":
case "0":
case null:
bValue = false;
... | Add cfg-response shim for local testing of CustomResources | Add cfg-response shim for local testing of CustomResources
| JavaScript | mit | mweagle/Sparta,mweagle/Sparta,mweagle/Sparta,mweagle/Sparta | ---
+++
@@ -19,3 +19,21 @@
}
return bValue;
};
+
+
+module.exports.cfnResponseLocalTesting = function() {
+ console.log('Using local CFN response object');
+ return {
+ FAILED : 'FAILED',
+ SUCCESS: 'SUCCESS',
+ send: function(event, context, status, responseData) {
+ var msg = {
+ e... |
ceaec31d5c34505d13418042551aec70aa1a864c | gulpTasks/tasks/watch.js | gulpTasks/tasks/watch.js | 'use strict';
var gulp = require('gulp');
var watch = require('gulp-watch');
var gulpSequence = require('gulp-sequence');
// var config = require('../config/index');
var templates = require('../config/templates');
var styles = require('../config/styles');
var scripts = require('../config/scripts');
var images = requi... | 'use strict';
var gulp = require('gulp');
var watch = require('gulp-watch');
var gulpSequence = require('gulp-sequence');
// var config = require('../config/index');
var templates = require('../config/templates');
var styles = require('../config/styles');
var scripts = require('../config/scripts');
var images = requi... | Fix task name to start BrowserSync session | Fix task name to start BrowserSync session
| JavaScript | mit | 3runoDesign/setRobot,3runoDesign/setRobot,3runoDesign/setRobot | ---
+++
@@ -19,4 +19,4 @@
watch(templates.source, () => { gulp.start(['templates:watch']); });
});
-gulp.task('cw', (cb) => { gulpSequence('build', ['browserSync'], 'watch', cb); });
+gulp.task('start', (cb) => { gulpSequence('build', ['browserSync'], 'watch', cb); }); |
b2fa7082d5839472e132735c3ce376b91b6417ba | test/fake/fake-request-session-data.js | test/fake/fake-request-session-data.js | var chance = require('./fake-extension.js'),
glimpse = require('glimpse'),
names = [];
function generateNames() {
var range = chance.integerRange(3, 8);
for (var i = 0; i < range; i++) {
names.push(chance.first());
}
}
function publishSession() {
var item = { id: chance.pick(names), co... | var chance = require('./fake-extension.js'),
glimpse = require('glimpse'),
names = [];
function generateNames() {
var range = chance.integerRange(3, 8);
for (var i = 0; i < range; i++) {
names.push(chance.first());
}
}
function publishSession() {
var item = { id: chance.pick(names), co... | Put bounds on session count for fake data generator | Put bounds on session count for fake data generator
| JavaScript | unknown | Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype | ---
+++
@@ -10,7 +10,7 @@
}
function publishSession() {
- var item = { id: chance.pick(names), count: chance.integer(30), last: (chance.integerRange(1, 45) + ' sec ago ') };
+ var item = { id: chance.pick(names), count: chance.integerRange(1, 30), last: (chance.integerRange(1, 45) + ' sec ago ') };
g... |
8e9bfe76508615dd1dfeaddae374e67659b55e5a | client/src/Account/index.js | client/src/Account/index.js | import React from 'react';
import { compose } from 'recompose';
import PasswordChangeForm from '../PasswordChange';
import {
AuthUserContext,
withAuthorization,
withEmailVerification,
} from '../Session';
const AccountPage = () => (
<AuthUserContext.Consumer>
{authUser => (
<div>
<h1>Account... | import React from 'react';
import { compose } from 'recompose';
import { Link } from 'react-router-dom';
import PasswordChangeForm from '../PasswordChange';
import {
AuthUserContext,
withAuthorization,
withEmailVerification,
} from '../Session';
import * as ROUTES from '../constants/routes';
const AccountPage =... | Add button to return to dashboard from account page. | Add button to return to dashboard from account page.
| JavaScript | apache-2.0 | googleinterns/Pictophone,googleinterns/Pictophone,googleinterns/Pictophone,googleinterns/Pictophone | ---
+++
@@ -1,5 +1,6 @@
import React from 'react';
import { compose } from 'recompose';
+import { Link } from 'react-router-dom';
import PasswordChangeForm from '../PasswordChange';
import {
@@ -7,6 +8,7 @@
withAuthorization,
withEmailVerification,
} from '../Session';
+import * as ROUTES from '../consta... |
a8f18a9552ffbbb9aee84067943d24ca4e595a96 | src/Sylius/Bundle/WebBundle/Resources/public/js/backend.js | src/Sylius/Bundle/WebBundle/Resources/public/js/backend.js | /*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
(function ( $ ) {
'use strict';
$(document).ready(function() {
$('.variant-table-toggle i.gly... | /*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
(function ( $ ) {
'use strict';
$(document).ready(function() {
$('.variant-table-toggle i.gly... | Change $.fn.datepicker format to yyyy-mm-dd. | [WebBundle] Change $.fn.datepicker format to yyyy-mm-dd.
The motivation here is to allow the datetime comparison operators in the
database layer to was done so that native database comparisons can do
their job.
| JavaScript | mit | gruberro/Sylius,Lowlo/Sylius,Arminek/Sylius,xrowkristina/sylius,pentarim/Sylius,Brille24/Sylius,Ma27/Sylius,okwinza/Sylius,bigfoot90/Sylius,peteward/Sylius,xantrix/Sylius,psyray/Sylius,torinaki/Sylius,TristanPerchec/Sylius,kayue/Sylius,jverdeyen-forks/Sylius,PyRowMan/Sylius,xrowgmbh/Sylius,aRn0D/Sylius,nicolasricci/Syl... | ---
+++
@@ -14,6 +14,8 @@
$(this).toggleClass('glyphicon-chevron-down glyphicon-chevron-up');
$(this).parent().parent().find('table tbody').toggle();
});
- $('.datepicker').datepicker({});
+ $('.datepicker').datepicker({
+ format: 'yyyy-mm-dd'
+ });
... |
55f9218e86b01db897416799fda4a936ccc37fc8 | src/background.js | src/background.js | if (!document.pictureInPictureEnabled) {
chrome.browserAction.setTitle({ title: 'Picture-in-Picture NOT supported' });
} else {
chrome.browserAction.onClicked.addListener(tab => {
const code = `
(async () => {
const video = document.querySelector('video');
if (video.hasAttribute('... | if (!document.pictureInPictureEnabled) {
chrome.browserAction.setTitle({ title: 'Picture-in-Picture NOT supported' });
} else {
chrome.browserAction.onClicked.addListener(tab => {
const code = `
(async () => {
const video = document.querySelector('video');
if (video.hasAttribute('... | Remove pip attribute when video ends. | Remove pip attribute when video ends.
| JavaScript | apache-2.0 | GoogleChromeLabs/picture-in-picture-chrome-extension,GoogleChromeLabs/picture-in-picture-chrome-extension | ---
+++
@@ -12,6 +12,9 @@
} else {
await video.requestPictureInPicture();
video.setAttribute('__pip__', true);
+ video.addEventListener('emptied', event => {
+ video.removeAttribute('__pip__');
+ });
}
})();
`; |
add5d33a8b997ec0caad5d131c183e21857f17c1 | src/app/menu.react.js | src/app/menu.react.js | import Component from '../components/component.react';
import React from 'react-native';
import {logout} from '../auth/actions';
import {
ScrollView,
Text
} from 'react-native';
import styles from './menu.style';
class Menu extends Component {
onItemSelected(item) {
this.props.menuActions.close();
this... | import Component from '../components/component.react';
import React from 'react-native';
import {msg} from '../intl/store';
import {logout} from '../auth/actions';
import {
ScrollView,
Text,
View
} from 'react-native';
import styles from './menu.style';
class Menu extends Component {
onItemSelected(item) {
... | Add in more menu goodies | Add in more menu goodies
| JavaScript | mit | blueberryapps/este,skallet/este,TheoMer/este,robinpokorny/este,GarrettSmith/schizophrenia,syroegkin/mikora.eu,zanj2006/este,langpavel/este,steida/este,TheoMer/este,AugustinLF/este,estaub/my-este,GarrettSmith/schizophrenia,shawn-dsz/este,estaub/my-este,skyuplam/debt_mgmt,SidhNor/este-cordova-starter-kit,sikhote/davidsin... | ---
+++
@@ -1,9 +1,11 @@
import Component from '../components/component.react';
import React from 'react-native';
+import {msg} from '../intl/store';
import {logout} from '../auth/actions';
import {
ScrollView,
- Text
+ Text,
+ View
} from 'react-native';
import styles from './menu.style';
@@ -21,11 +23... |
8fbbdd6b47b708d2cbb2fbdec5a3e33cf84a418d | src/container-logs.js | src/container-logs.js | /**
* @module lib/container-logs
* @exports {Class} ContainerLogs
*/
'use strict'
var socket = require('./socket')
class ContainerLogs {
/**
* @param {String} dockerHost
* @param {String} dockerContainer
*/
constructor (dockerHost, dockerContainer) {
this._dockerHost = dockerHost
this._dockerC... | /**
* @module lib/container-logs
* @exports {Class} ContainerLogs
*/
'use strict'
var socket = require('./socket')
class ContainerLogs {
/**
* @param {String} dockerHost
* @param {String} dockerContainer
*/
constructor (dockerHost, dockerContainer) {
this._dockerHost = dockerHost
this._dockerC... | Add check if cont-logs output is ctrl sequence and skip | Add check if cont-logs output is ctrl sequence and skip
| JavaScript | mit | cflynn07/runnable-cli | ---
+++
@@ -24,7 +24,8 @@
fetchAndPipeToStdout () {
this._client.on('data', (data) => {
if (!data.args) { return }
- process.stdout.write(this._convertHexToASCII(data.args))
+ if (parseInt(data.args.substr(0, 2), 16) < 31) { return }
+ console.log(this._convertHexToASCII(data.args).repla... |
1beaf7bdbd10681f158e06e5db11293b7b40a06d | js/count.js | js/count.js | document.addEventListener("DOMContentLoaded", function (event) {
// redirect to 7777 port
// ping golang counter
httpGetAsync("http://www.aracki.me:7777", function (res) {
alert(res);
})
});
function httpGetAsync(theUrl, callback) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadysta... | document.addEventListener("DOMContentLoaded", function (event) {
// redirect to 7777 port
// ping golang counter
httpGetAsync("http://www.aracki.me:7777", function (res) {
alert(res);
})
});
function httpGetAsync(theUrl, callback) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadysta... | Add CORS in header xml request | Add CORS in header xml request
| JavaScript | mit | Aracki/aracki.me,Aracki/aracki.me | ---
+++
@@ -13,5 +13,6 @@
callback(xmlHttp.responseText);
};
xmlHttp.open("GET", theUrl, true); // true for asynchronous
+ xmlHttp.setRequestHeader("Access-Control-Allow-Origin", '*');
xmlHttp.send("ivan");
} |
d41d4988fcf94c14f36f2b18dd4709feaa61e010 | src/js/api.js | src/js/api.js | var local = 'http://localhost:55881'
var dev = 'https://dev-api-streetsupport.azurewebsites.net'
var staging = 'https://staging-api-streetsupport.azurewebsites.net'
var live = 'https://live-api-streetsupport.azurewebsites.net'
var env = require('./env')
var envs = [local, dev, staging, live]
var domainRoot = envs[en... | var local = 'http://localhost:55881'
var dev = 'https://dev-api-streetsupport.azurewebsites.net'
var staging = 'https://staging-api-streetsupport.azurewebsites.net'
var live = 'https://live-api-streetsupport.azurewebsites.net'
var env = require('./env')
var envs = [local, dev, staging, live]
var domainRoot = envs[en... | Revert "remove redundatn end points" | Revert "remove redundatn end points"
This reverts commit 4703d26683e4b58510ff25c112dbf2a7fef8b689. | JavaScript | mit | StreetSupport/streetsupport-web,StreetSupport/streetsupport-web,StreetSupport/streetsupport-web | ---
+++
@@ -17,6 +17,8 @@
serviceProviders: p('/v2/service-providers/'),
allServiceProviders: p('/v1/all-service-providers/'),
serviceCategories: p('/v2/service-categories/'),
+ categoryServiceProviders: p('/v2/categorised-service-providers/show/'),
+ categoryServiceProvidersByDay: p('/v2/timetabled-servic... |
09261ac3445e0cb803e406fd1187e3c0cbf50118 | js/setup.js | js/setup.js | (function($, Fleeting){
$(function(){
var view = new Fleeting.CharactersView({
el : $("body"),
strategy : function(){
this.hidden(true);
},
evaporateTime : 5000
});
(function loop(){
window.setTimeout(loop... | (function($, Fleeting){
$(function(){
var search = window.location.search.slice(1).split("=");
var evaporate = 5000;
var index = search.indexOf('evaporate')
if (index !== -1 && search[index + 1]) {
evaporate = parseInt(search[index + 1]) || evaporate;
}
console.log(evaporate);
var view = new Fl... | Use query string to influence to evaporation time | Use query string to influence to evaporation time
the evaporation time can be set with the '?evaporate=200000' query string
| JavaScript | mit | dvberkel/fleeting-thoughts,dvberkel/fleeting-thoughts | ---
+++
@@ -1,13 +1,22 @@
(function($, Fleeting){
$(function(){
- var view = new Fleeting.CharactersView({
- el : $("body"),
+ var search = window.location.search.slice(1).split("=");
+ var evaporate = 5000;
+ var index = search.indexOf('evaporate')
+ if (index !== -1 && search[index + 1]) {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.