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,
entries: ['src/main.ts'],
cache: {},
packageCache: {},
}).plugin(tsify);
}
// Compile TypeScript and bundle everything in a single bundle.js file.
function build() {
return compile()
.bundle()
.pipe(vinyl(JS_OUTPUT))
.pipe(gulp.dest(DIST_DIR));
}
// Recompile TypeScript on file change.
function watch() {
var task = watchify(compile());
task.on('update', build);
return task
.bundle()
.pipe(vinyl(JS_OUTPUT))
.pipe(gulp.dest(DIST_DIR));
}
gulp.task('default', watch);
gulp.task('build', build);
| 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,
entries: ['src/main.ts'],
cache: {},
packageCache: {},
}).plugin(tsify);
}
// Compile TypeScript and bundle everything in a single bundle.js file.
function build() {
return compile()
.bundle()
.pipe(vinyl(JS_OUTPUT))
.pipe(gulp.dest(DIST_DIR));
}
// Watch the source code and recompile on modifications
var watchedBrowserify = watchify(compile());
watchedBrowserify.on("update", watch);
function watch() {
return watchedBrowserify
.bundle()
.pipe(vinyl(JS_OUTPUT))
.pipe(gulp.dest(DIST_DIR));
}
gulp.task('default', watch);
gulp.task('build', build);
| 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.on('update', build);
-
- return task
+ return watchedBrowserify
.bundle()
.pipe(vinyl(JS_OUTPUT))
.pipe(gulp.dest(DIST_DIR)); |
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 $$(selector, root) {
root = normalizeRoot(root)
return [].slice.call(root.querySelectorAll(selector)).map(function(node) {
return wrapNode(node)
})
}
$.wrap = function(node) {
if(typeof(node.length) == 'number') {
return [].slice.call(node).map(function(node) {
return wrapNode(node)
})
} else {
return wrapNode(node)
}
}
function wrapNode(node) {
node.find = function(sel) {
return $(sel, node)
}
node.findAll = function(sel) {
return $.all(sel, node)
}
return node
}
module.exports = $
window.$ = $ | 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 $$(selector, root) {
root = normalizeRoot(root)
return [].slice.call(root.querySelectorAll(selector)).map(function(node) {
return wrapNode(node)
})
}
$.wrap = function(node) {
if(typeof(node.length) == 'number') {
return [].slice.call(node).map(function(node) {
return wrapNode(node)
})
} else {
return wrapNode(node)
}
}
function wrapNode(node) {
if(!node) return null
node.find = function(sel) {
return $(sel, node)
}
node.findAll = function(sel) {
return $.all(sel, node)
}
return node
}
module.exports = $
window.$ = $ | 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 proto object.
*/
export function load(file) {
return grpcLoad({ root, file });
};
export default load; | 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 proto object.
*/
export function load(file) {
return grpcLoad({ root, file }, 'proto', { convertFieldsToCamelCase: true });
};
export default load; | 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',
dependencies: {
'ember': 'components/ember#beta'
},
resolutions: {
'ember': 'beta'
}
},
{
name: 'ember-canary',
dependencies: {
'ember': 'components/ember#canary'
},
resolutions: {
'ember': 'canary'
}
}
]
};
| /*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: 'ember-release',
dependencies: {
'ember': 'components/ember#release'
},
resolutions: {
'ember': 'release'
}
},
{
name: 'ember-beta',
dependencies: {
'ember': 'components/ember#beta'
},
resolutions: {
'ember': 'beta'
}
},
{
name: 'ember-canary',
dependencies: {
'ember': 'components/ember#canary'
},
resolutions: {
'ember': 'canary'
}
}
]
};
| 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-release', |
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(options[key]);
}
}
}
for (var i = 0; i < this.filesSrc.length; i++) {
args.push(this.filesSrc[i]);
}
// lazy init
var path = require('path');
var child_process = require('child_process');
var winExt = /^win/.test(process.platform) ? '.cmd' : '';
var done = this.async();
var executable = path.resolve(require.resolve('typedoc/package.json'), '..', '..', '.bin', 'typedoc' + winExt);
var child = child_process.spawn(executable, args, {
stdio: 'inherit',
env: process.env
}).on('exit', function (code) {
if (code !== 0) {
done(false);
}
if (child) {
child.kill();
}
done();
});
});
};
| 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('--' + key);
if (typeof options[key] !== "boolean" && !!options[key]) {
args.push(options[key]);
}
}
}
for (var i = 0; i < this.filesSrc.length; i++) {
args.push(this.filesSrc[i]);
}
// lazy init
var path = require('path');
var child_process = require('child_process');
var typedoc;
try {
typedoc = require.resolve('../../typedoc/package.json');
} catch(e) {
typedoc = require.resolve('typedoc/package.json')
}
var winExt = /^win/.test(process.platform) ? '.cmd' : '';
var done = this.async();
var executable = path.resolve(typedoc, '..', '..', '.bin', 'typedoc' + winExt);
var child = child_process.spawn(executable, args, {
stdio: 'inherit',
env: process.env
}).on('exit', function (code) {
if (code !== 0) {
done(false);
}
if (child) {
child.kill();
}
done();
});
});
};
| 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[key]) {
args.push(options[key]);
}
}
@@ -20,11 +20,18 @@
// lazy init
var path = require('path');
var child_process = require('child_process');
+ var typedoc;
+
+ try {
+ typedoc = require.resolve('../../typedoc/package.json');
+ } catch(e) {
+ typedoc = require.resolve('typedoc/package.json')
+ }
var winExt = /^win/.test(process.platform) ? '.cmd' : '';
var done = this.async();
- var executable = path.resolve(require.resolve('typedoc/package.json'), '..', '..', '.bin', 'typedoc' + winExt);
+ var executable = path.resolve(typedoc, '..', '..', '.bin', 'typedoc' + winExt);
var child = child_process.spawn(executable, args, {
stdio: 'inherit', |
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.publish('Downloads', function () {
this.unblock();
return Downloads.find();
});
Meteor.publish('Versions', function () {
this.unblock();
return Versions.find();
});
Meteor.publish('GuestbookEntries', function () {
this.unblock();
return GuestbookEntries.find({ approved: true });
});
Meteor.publish('TwitterAnnouncements.last', function () {
this.unblock();
return TwitterAnnouncements.find({}, { sort: { creationDate: -1 }, limit: 1 });
});
| 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 }, { reactive: false });
});
Meteor.publish('Downloads', function () {
this.unblock();
return Downloads.find();
});
Meteor.publish('Versions', function () {
this.unblock();
return Versions.find();
});
Meteor.publish('GuestbookEntries', function () {
this.unblock();
return GuestbookEntries.find({ approved: true });
});
Meteor.publish('TwitterAnnouncements.last', function () {
this.unblock();
return TwitterAnnouncements.find({}, { sort: { creationDate: -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.unblock();
- return ItemSets.find({}, { sort: { patchVersion : -1, generationDate: -1 }, limit: 1 });
+ return ItemSets.find({}, { sort: { patchVersion : -1, generationDate: -1 }, limit: 1 }, { reactive: false });
});
Meteor.publish('Downloads', function () { |
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();
d.on('error', function (err) {
assert.equal(err.message, 'gaga');
done()
});
var p = new Promise();
d.run(function () {
p.then(function () {
}).then(function () {
throw new Error('gaga');
}).end();
});
next(function () {
p.fulfill();
})
});
});
| 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.indexOf('v0.8') == 0) return done();
var d = Domain.create();
d.once('error', function (err) {
assert.equal(err.message, 'gaga');
done()
});
var p = new Promise();
d.run(function () {
p.then(function () {
}).then(function () {
throw new Error('gaga');
}).end();
});
next(function () {
p.fulfill();
})
});
});
| 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) {
assert.equal(err.message, 'gaga');
done()
}); |
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: true })
.withPrompts({ someOption: true })
.on('end', done);
});
it('creates files', function () {
assert.file([
'bower.json',
'package.json',
'.editorconfig',
'.jshintrc'
]);
});
});
| '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: true })
.withPrompts({ appname: 'ironhide-webapp-test-app' })
.on('end', done);
});
it('Should create files', function () {
assert.file([
'app',
'tasks',
'tests',
'bower.json',
'Gemfile',
'Gemfile.lock',
'gulpfile.js',
'license.md',
'package.json',
'package.json',
'readme.md',
'travis.yml',
'.bowerrc',
'.compassrc',
'.editorconfig',
'.gitattributes',
'.jshintignore',
'.jshintrc',
'.karmarc',
'.ruby-gemset',
'.ruby-version',
'.scsslintrc'
]);
});
});
| 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 () {
+ it('Should create files', function () {
assert.file([
+ 'app',
+ 'tasks',
+ 'tests',
'bower.json',
+ 'Gemfile',
+ 'Gemfile.lock',
+ 'gulpfile.js',
+ 'license.md',
'package.json',
+ 'package.json',
+ 'readme.md',
+ 'travis.yml',
+ '.bowerrc',
+ '.compassrc',
'.editorconfig',
- '.jshintrc'
+ '.gitattributes',
+ '.jshintignore',
+ '.jshintrc',
+ '.karmarc',
+ '.ruby-gemset',
+ '.ruby-version',
+ '.scsslintrc'
]);
});
}); |
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 appendSourceLink() {
var sourceLink = document.createElement('a');
var paragraph = document.createElement('p');
var footer = document.getElementById('info');
var urlBase = 'https://github.com/addyosmani/todomvc/tree/gh-pages';
if (footer) {
sourceLink.href = urlBase + location.pathName;
sourceLink.appendChild(document.createTextNode('Check out the source'));
paragraph.appendChild(sourceLink);
footer.appendChild(paragraph);
}
}
appendSourceLink();
})();
| 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,dylanham/todomvc,therebelbeta/todomvc,vanyadymousky/todomvc,watonyweng/todomvc,weivea/todomvc,yalishizhude/todomvc,szytko/todomvc,makelivedotnet/todomvc,vuejs/todomvc,jwabbitt/todomvc,chrisdarroch/todomvc,trungtranthanh93/todomvc,lorgiorepo/todomvc,andreaswachowski/todomvc,wallclockbuilder/todomvc,margaritis/todomvc,ssarber/todo-mvc-angular,smasala/todomvc,baiyaaaaa/todomvc,unmanbearpig/todomvc,santhoshi-viriventi/todomvc,suryasingh/todomvc,meligatt/todomvc,smasala/todomvc,wangcan2014/todomvc,Drup/todomvc,edwardpark/todomvc,oskargustafsson/todomvc,bryanborough/todomvc,Anasskebabi/todomvc,youprofit/todomvc,theflimflam/todomvc,arunrajnayak/todomvc,vikbert/todomvc,natalieparellano/todomvc,ozywuli/todomvc,wangjun/todomvc,YaqubGhazi/todomvc,oskargustafsson/todomvc,troopjs-university/todomvc,v2018z/todomvc,wallclockbuilder/todomvc,mhoyer/todomvc,maksymkhar/todomvc,bryan7c/todomvc,ssarber/todo-mvc-angular,Qwenbo/todomvc,gmoura/todomvc,colinkuo/todomvc,briancavalier/todomvc-fab,sjclijie/todomvc,shanemgrey/todomvc,s-endres/todomvc,Senhordim/todomvc,suryasingh/todomvc,vite21/todomvc,sophiango/todomvc,SooyoungYoon/todomvc,lh8725473/todomvc,arthurvr/todomvc,tweinfeld/todomvc,planttheidea/todomvc,yalishizhude/todomvc,danleavitt0/todomvc,MarkHarper/todomvc,natelaclaire/todomvc,ckirkendall/todomvc,stoeffel/todomvc,Gsearch/todomvc,bitovi/todomvc,natalieparellano/todomvc,biomassives/angular2_todomvc,appleboy/todomvc,unmanbearpig/todomvc,dudeOFprosper/todomvc,john-jay/todomvc,kamilogorek/todomvc,bryan7c/todomvc,dasaprakashk/todomvc,unmanbearpig/todomvc,guillermodiazga/todomvc,pbaron977/todomvc,wishpishh/todomvc,cssJumper1995/todomvc,asudoh/todomvc,fangjing828/todomvc,leverz/todomvc,guillermodiazga/todomvc,kaidokert/todomvc,niki571/todomvc,holydevilboy/todomvc,vicentemaximilianoh/todomvc,fangjing828/todomvc,thebkbuffalo/todomvc,txchen/todomvc,jchadwick/todomvc,ac-adekunle/todomvc,dsumac/todomvc,passy/fakemvc,michalsnik/todomvc,shanemgrey/todomvc,Qwenbo/todomvc,mystor/todomvc,xtian/todomvc,Live4Code/todomvc,akollegger/todomvc,cyberkoi/todomvc,ClashTheBunny/todomvc,passy/fakemvc,Senhordim/todomvc,v2018z/todomvc,arunrajnayak/todomvc,Shadowys/todomvc,laomagege/todomvc,nitish1125/todomvc,jcpeters/todomvc,sethkrasnianski/todomvc,ClashTheBunny/todomvc,patrick-frontend/todomvc,baymaxi/todomvc,babarqb/todomvc,cornerbodega/todomvc,XiaominnHoo/todomvc,glizer/todomvc,planttheidea/todomvc,mweststrate/todomvc,baiyaaaaa/todomvc,edwardpark/todomvc,gmoura/todomvc,pacoleung/todomvc,unmanbearpig/todomvc,ajansa/todomvc,pandoraui/todomvc,silentHoo/todomvc-ngpoly,asudoh/todomvc,thibaultzanini/todomvc,SooyoungYoon/todomvc,wangcan2014/todomvc,bitovi/todomvc,samccone/todomvc,makelivedotnet/todomvc,eatrocks/todomvc,msi008/todomvc,Kedarnath13/todomvc,shawn-dsz/todomvc,lgsanjos/todomvc,yuetsh/todomvc,skatejs/todomvc,Yogi-Jiang/todomvc,pgraff/js4secourse,ajansa/todomvc,arthurvr/todomvc,AngelValdes/todomvc,tianskyluj/todomvc,bondvt04/todomvc,skatejs/todomvc,stephenplusplus/todomvc,lh8725473/todomvc,Shadowys/todomvc,jkf91/todomvc,theoldnewbie/todomvc,zxc0328/todomvc,cyberkoi/todomvc,maksymkhar/todomvc,commana/todomvc,patrick-frontend/todomvc,edygar/todomvc,jeremyeaton89/todomvc,podefr/todomvc,StanislavMar/todomvc,blink1073/todomvc,jwabbitt/todomvc,evansendra/todomvc,Qwenbo/todomvc,altmind/todomvc,passy/fakemvc,zeropool/todomvc,chrisfcarroll/todomvc,kmalakoff/todomvc,swannodette/todomvc,CreaturePhil/todomvc,Shadowys/todomvc,brsteele/todomvc,zxc0328/todomvc,beni55/todomvc,nitish1125/todomvc,trexnix/todomvc,Anasskebabi/todomvc,bryanborough/todomvc,electricessence/todomvc,arunrajnayak/todomvc,dsumac/todomvc,txchen/todomvc,smasala/todomvc,ssarber/todo-mvc-angular,digideskio/todomvc,eatrocks/todomvc,brenopolanski/todomvc,gd46/ToDoMVC,bsoe003/todomvc,yalishizhude/todomvc,marchant/todomvc,blink2ce/todomvc,alohaglenn/todomvc,cyberkoi/todomvc,dudeOFprosper/todomvc,somallg/todomvc,trexnix/todomvc,rdingwall/todomvc,olegbc/todomvc,msi008/todomvc,winweb/todomvc,rwson/todomvc,ivanKaunov/todomvc,fchareyr/todomvc,massimiliano-mantione/todomvc,edygar/todomvc,ryoia/todomvc,Bieliakov/todomvc,edwardpark/todomvc,kaidokert/todomvc,electricessence/todomvc,korrawit/todomvc,weijye91/todomvc,startersacademy/todomvc,YaqubGhazi/todomvc,yejodido/todomvc,colinkuo/todomvc,robwilde/todomvc,Brycetastic/todomvc,kpaxqin/todomvc,laomagege/todomvc,bdylanwalker/todomvc,ryoia/todomvc,zingorn/todomvc,2011uit1719/todomvc,ajream/todomvc,Yogi-Jiang/todomvc,RaveJS/todomvc,akollegger/todomvc,mroserov/todomvc,amorphid/todomvc,freeyiyi1993/todomvc,bryanborough/todomvc,vicentemaximilianoh/todomvc,shawn-dsz/todomvc,vicentemaximilianoh/todomvc,bryan7c/todomvc,rwson/todomvc,balintsoos/todomvc,zingorn/todomvc,NickManos/todoMVC,allanbrito/todomvc,craigmckeachie/todomvc,massimiliano-mantione/todomvc,startersacademy/todomvc,korrawit/todomvc,therebelbeta/todomvc,skatejs/todomvc,Keystion/todomvc,blink2ce/todomvc,tweinfeld/todomvc,therebelbeta/todomvc,yzfcxr/todomvc,JinaLeeK/todomvc,unmanbearpig/todomvc,arthurvr/todomvc,colinkuo/todomvc,planttheidea/todomvc,gmoura/todomvc,sammcgrail/todomvc,yuetsh/todomvc,joelmatiassilva/todomvc,neapolitan-a-la-code/todoAngJS,thebkbuffalo/todomvc,rdingwall/todomvc,AmilaViduranga/todomvc,lh8725473/todomvc,pawelqbera/todomvc,s-endres/todomvc,danleavitt0/todomvc,StanislavMar/todomvc,stephenplusplus/todomvc,JinaLeeK/todomvc,joelmatiassilva/todomvc,edwardpark/todomvc,XiaominnHoo/todomvc,webcoding/todomvc,ABaldwinHunter/todomvc-clone,Granze/todomvc,teng2015/todomvc,4talesa/todomvc,andreaswachowski/todomvc,AmilaViduranga/todomvc,theoldnewbie/todomvc,bdylanwalker/todomvc,guillermodiazga/todomvc,blink1073/todomvc,zxc0328/todomvc,MakarovMax/todomvc,MarkHarper/todomvc,ivanKaunov/todomvc,watonyweng/todomvc,john-jay/todomvc,jcpeters/todomvc,startersacademy/todomvc,nitish1125/todomvc,dcrlz/todomvc,chrisfcarroll/todomvc,vanyadymousky/todomvc,amorphid/todomvc,raiamber1/todomvc,jj4th/todomvc-poc,weijye91/todomvc,glizer/todomvc,lingjuan/todomvc,jdfeemster/todomvc,patrick-frontend/todomvc,kasperpeulen/todomvc,AmilaViduranga/todomvc,SooyoungYoon/todomvc,ivanKaunov/todomvc,yalishizhude/todomvc,bitovi/todomvc,Senhordim/todomvc,eatrocks/todomvc,lh8725473/todomvc,ABaldwinHunter/todomvc-clone,miyai-chihiro/todomvc,ebidel/todomvc,troopjs-university/todomvc,eatrocks/todomvc,weivea/todomvc,benmccormick/todomvc,2011uit1719/todomvc,jdlawrence/todomvc,aitchkhan/todomvc,baymaxi/todomvc,planttheidea/todomvc,amy-chiu/todomvc,nordfjord/todomvc,asudoh/todomvc,fr0609/todomvc,rodrigoolivares/todomvc,jrpeasee/todomvc,AngelValdes/todomvc,wallclockbuilder/todomvc,alohaglenn/todomvc,sammcgrail/todomvc,kmalakoff/todomvc,dakannan/TODOs,hefangshi/todomvc,slegrand45/todomvc,flaviotsf/todomvc,rwson/todomvc,smasala/todomvc,webcoding/todomvc,john-jay/todomvc,leverz/todomvc,ccpowell/todomvc,chrisfcarroll/todomvc,digideskio/todomvc,watonyweng/todomvc,niki571/todomvc,appleboy/todomvc,troopjs-university/todomvc,cyberkoi/todomvc,johnbender/todomvc,thebkbuffalo/todomvc,mikesprague/todomvc,somallg/todomvc,opal/todomvc,sohucw/todomvc,Live4Code/todomvc,shanemgrey/todomvc,cledwyn/todomvc,tweinfeld/todomvc,gd46/ToDoMVC,shui91/todomvc,troopjs-university/todomvc,wangdahoo/todomvc,nordfjord/todomvc,Shadowys/todomvc,zeropool/todomvc,zingorn/todomvc,weivea/todomvc,yisbug/todomvc,cornerbodega/todomvc,nharada1/todomvc,dylanham/todomvc,ClashTheBunny/todomvc,smasala/todomvc,bowcot84/todomvc,electricessence/todomvc,andreaswachowski/todomvc,tianskyluj/todomvc,YaqubGhazi/todomvc,StanislavMar/todomvc,bryan7c/todomvc,pandoraui/todomvc,shui91/todomvc,sergeirybalko/todomvc,sjclijie/todomvc,yzfcxr/todomvc,blink1073/todomvc,youprofit/todomvc,bondvt04/todomvc,swannodette/todomvc,sohucw/todomvc,watonyweng/todomvc,thibaultzanini/todomvc,wishpishh/todomvc,passy/fakemvc,SooyoungYoon/todomvc,kasperpeulen/todomvc,briancavalier/todomvc-fab,slegrand45/todomvc,NickManos/todoMVC,kamilogorek/todomvc,wallacecmo86/todomvc,pro100jam/todomvc,vuejs/todomvc,amorphid/todomvc,olegbc/todomvc,cbolton97/todomvc,kasperpeulen/todomvc,SooyoungYoon/todomvc,albrow/todomvc,natalieparellano/todomvc,sophiango/todomvc,lorgiorepo/todomvc,santhoshi-viriventi/todomvc,planttheidea/todomvc,cledwyn/todomvc,therebelbeta/todomvc,luxiaojian/todomvc,gd46/ToDoMVC,feathersjs/todomvc,eatrocks/todomvc,zxc0328/todomvc,nweber/todomvc,jchadwick/todomvc,zingorn/todomvc,commana/todomvc,NickManos/todoMVC,xtian/todomvc,CreaturePhil/todomvc,Garbar/todomvc,niki571/todomvc,MakarovMax/todomvc,bonbonez/todomvc,ckirkendall/todomvc,bonbonez/todomvc,arthurvr/todomvc,Live4Code/todomvc,v2018z/todomvc,watonyweng/todomvc,troopjs-university/todomvc,Drup/todomvc,Duc-Ngo-CSSE/todomvc,MikeDulik/todomvc,pgraff/js4secourse,margaritis/todomvc,trexnix/todomvc,meligatt/todomvc,mystor/todomvc,PolarBearAndrew/todomvc,arunrajnayak/todomvc,podefr/todomvc,miyai-chihiro/todomvc,colingourlay/todomvc,yisbug/todomvc,aarai/todomvc,willycz/todomvc,shanemgrey/todomvc,vite21/todomvc,bondvt04/todomvc,jwabbitt/todomvc,Drup/todomvc,opal/todomvc,bsoe003/todomvc,mystor/todomvc,mweststrate/todomvc,marcolamberto/todomvc,ozywuli/todomvc,stephenplusplus/todomvc,kaidokert/todomvc,kamilogorek/todomvc,vikbert/todomvc,gmoura/todomvc,v2018z/todomvc,trexnix/todomvc,xtian/todomvc,pgraff/js4secourse,samccone/todomvc,hefangshi/todomvc,Granze/todomvc,nancy44/todomvc,silentHoo/todomvc-ngpoly,Kedarnath13/todomvc,PolarBearAndrew/todomvc,sammcgrail/todomvc,stoeffel/todomvc,andreaswachowski/todomvc,yblee85/todomvc,szytko/todomvc,shawn-dsz/todomvc,albrow/todomvc,jaredhensley/todomvc,Keystion/todomvc,peterkokot/todomvc,shui91/todomvc,wishpishh/todomvc,jeremyeaton89/todomvc,ZusOR/todomvc,samccone/todomvc,edwardpark/todomvc,yyx990803/todomvc,YaqubGhazi/todomvc,cbolton97/todomvc,v2018z/todomvc,wallacecmo86/todomvc,fszlin/todomvc,fr0609/todomvc,suryasingh/todomvc,edygar/todomvc,kidbai/todomvc,startersacademy/todomvc,balintsoos/todomvc,mweststrate/todomvc,Anasskebabi/todomvc,robwilde/todomvc,fchareyr/todomvc,Senhordim/todomvc,edwardpark/todomvc,amy-chiu/todomvc,bonbonez/todomvc,biomassives/angular2_todomvc,jkf91/todomvc,mikesprague/todomvc,shanemgrey/todomvc,luxiaojian/todomvc,raiamber1/todomvc,jdlawrence/todomvc,CreaturePhil/todomvc,bryan7c/todomvc,cledwyn/todomvc,swannodette/todomvc,dylanham/todomvc,sammcgrail/todomvc,digideskio/todomvc,gmoura/todomvc,CreaturePhil/todomvc,massimiliano-mantione/todomvc,dcrlz/todomvc,4talesa/todomvc,briancavalier/todomvc-fab,wangcan2014/todomvc,trexnix/todomvc,rdingwall/todomvc,fszlin/todomvc,kidbai/todomvc,ABaldwinHunter/todomvc-clone,trungtranthanh93/todomvc,andreaswachowski/todomvc,biomassives/angular2_todomvc,lh8725473/todomvc,benmccormick/todomvc,aitchkhan/todomvc,dudeOFprosper/todomvc,joelmatiassilva/todomvc,Gsearch/todomvc,craigmckeachie/todomvc,asudoh/todomvc,holydevilboy/todomvc,mikesprague/todomvc,arthurvr/todomvc,winweb/todomvc,altmind/todomvc,lingjuan/todomvc,sjclijie/todomvc,slegrand45/todomvc,suryasingh/todomvc,brsteele/todomvc,arthurvr/todomvc,stevengregory/todomvc,Gsearch/todomvc,andrepitombeira/todomvc,bowcot84/todomvc,margaritis/todomvc,wcyz666/todomvc,eduardogomes/todomvc,Qwenbo/todomvc,mikesprague/todomvc,NickManos/todoMVC,gd46/ToDoMVC,rdingwall/todomvc,somallg/todomvc,appleboy/todomvc,rodrigoolivares/todomvc,Granze/todomvc,vite21/todomvc,dchambers/todomvc,pplgin/todomvc,zxc0328/todomvc,benmccormick/todomvc,dsumac/todomvc,podefr/todomvc,sohucw/todomvc,petebacondarwin/todomvc,niki571/todomvc,wangdahoo/todomvc,TodoFlux/todoflux,Anasskebabi/todomvc,nbr1ninrsan2/todomvc,Garbar/todomvc,Keystion/todomvc,somallg/todomvc,baiyaaaaa/todomvc,cyberkoi/todomvc,olegbc/todomvc,peterkokot/todomvc,electricessence/todomvc,Shadowys/todomvc,cbolton97/todomvc,natalieparellano/todomvc,therebelbeta/todomvc,luxiaojian/todomvc,lingjuan/todomvc,peterkokot/todomvc,fr0609/todomvc,ivanKaunov/todomvc,jcpeters/todomvc,mystor/todomvc,youprofit/todomvc,edueo/todomvc,fszlin/todomvc,pacoleung/todomvc,jdfeemster/todomvc,dylanham/todomvc,edueo/todomvc,mweststrate/todomvc,freeyiyi1993/todomvc,msi008/todomvc,craigmckeachie/todomvc,nancy44/todomvc,pbaron977/todomvc,AngelValdes/todomvc,dakannan/TODOs,yuetsh/todomvc,nweber/todomvc,stevengregory/todomvc,jmicahc/todomvc,chrisfcarroll/todomvc,pplgin/todomvc,balintsoos/todomvc,dchambers/todomvc,biomassives/angular2_todomvc,bitovi/todomvc,Senhordim/todomvc,RaveJS/todomvc,kingsj/todomvc,johnbender/todomvc,santhoshi-viriventi/todomvc,pawelqbera/todomvc,pandoraui/todomvc,AngelValdes/todomvc,Live4Code/todomvc,somallg/todomvc,ZusOR/todomvc,yyx990803/todomvc,Rithie/todomvc,nancy44/todomvc,cssJumper1995/todomvc,bonbonez/todomvc,jdlawrence/todomvc,aarai/todomvc,shanemgrey/todomvc,pacoleung/todomvc,mroserov/todomvc,nweber/todomvc,laomagege/todomvc,ssarber/todo-mvc-angular,colingourlay/todomvc,nordfjord/todomvc,swannodette/todomvc,urkaver/todomvc,yblee85/todomvc,kidbai/todomvc,opal/todomvc,webcoding/todomvc,edueo/todomvc,yejodido/todomvc,griffiti/todomvc,altmind/todomvc,teng2015/todomvc,jcpeters/todomvc,tianskyluj/todomvc,colinkuo/todomvc,cssJumper1995/todomvc,4talesa/todomvc,ac-adekunle/todomvc,pro100jam/todomvc,wcyz666/todomvc,Senhordim/todomvc,holydevilboy/todomvc,xtian/todomvc,pgraff/js4secourse,ZusOR/todomvc,msi008/todomvc,dylanham/todomvc,pbaron977/todomvc,neapolitan-a-la-code/todoAngJS,commana/todomvc,peterkokot/todomvc,robwilde/todomvc,Keystion/todomvc,makelivedotnet/todomvc,electricessence/todomvc,petebacondarwin/todomvc,korrawit/todomvc,dylanham/todomvc,Granze/todomvc,cledwyn/todomvc,kpaxqin/todomvc,Shadowys/todomvc,sjclijie/todomvc,mroserov/todomvc,Drup/todomvc,lh8725473/todomvc,XiaominnHoo/todomvc,natalieparellano/todomvc,elacin/todomvc,mikesprague/todomvc,freeyiyi1993/todomvc,petebacondarwin/todomvc,yyx990803/todomvc,Duc-Ngo-CSSE/todomvc,RaveJS/todomvc,unmanbearpig/todomvc,marcolamberto/todomvc,winweb/todomvc,dcrlz/todomvc,msi008/todomvc,sergeirybalko/todomvc,ckirkendall/todomvc,stephenplusplus/todomvc,pbaron977/todomvc,startersacademy/todomvc,Brycetastic/todomvc,teng2015/todomvc,MariaSimion/todomvc,flaviotsf/todomvc,sergeirybalko/todomvc,bondvt04/todomvc,guillermodiazga/todomvc,TodoFlux/todoflux,sammcgrail/todomvc,Bieliakov/todomvc,Aupajo/todomvc,planttheidea/todomvc,ccpowell/todomvc,maksymkhar/todomvc,tianskyluj/todomvc,tianskyluj/todomvc,yejodido/todomvc,jmicahc/todomvc,pawelqbera/todomvc,ksteigerwald/todomvc,samccone/todomvc,jcpeters/todomvc,rodrigoolivares/todomvc,pgraff/js4secourse,griffiti/todomvc,marchant/todomvc,youprofit/todomvc,laomagege/todomvc,nbr1ninrsan2/todomvc,jj4th/todomvc-poc,griffiti/todomvc,somallg/todomvc,s-endres/todomvc,jdlawrence/todomvc,pandoraui/todomvc,Anasskebabi/todomvc,ksteigerwald/todomvc,patrick-frontend/todomvc,arunrajnayak/todomvc,yisbug/todomvc,kingsj/todomvc,youprofit/todomvc,danleavitt0/todomvc,mweststrate/todomvc,sjclijie/todomvc,jeff235255/todomvc,massimiliano-mantione/todomvc,rdingwall/todomvc,mhoyer/todomvc,luxiaojian/todomvc,CreaturePhil/todomvc,niki571/todomvc,zeropool/todomvc,marchant/todomvc,pacoleung/todomvc,bonbonez/todomvc,bdylanwalker/todomvc,wallclockbuilder/todomvc,watonyweng/todomvc,neapolitan-a-la-code/todoAngJS,brsteele/todomvc,opal/todomvc,colingourlay/todomvc,youprofit/todomvc,Qwenbo/todomvc,cledwyn/todomvc,wallclockbuilder/todomvc,wcyz666/todomvc,dakannan/TODOs,sjclijie/todomvc,bsoe003/todomvc,johnbender/todomvc,sohucw/todomvc,MakarovMax/todomvc,neapolitan-a-la-code/todoAngJS,Bieliakov/todomvc,pgraff/js4secourse,vuejs/todomvc,evansendra/todomvc,ccpowell/todomvc,rdingwall/todomvc,beni55/todomvc,chrisdarroch/todomvc,trungtranthanh93/todomvc,jcpeters/todomvc,kmalakoff/todomvc,bondvt04/todomvc,Anasskebabi/todomvc,jkf91/todomvc,jmicahc/todomvc,leverz/todomvc,elacin/todomvc,bitovi/todomvc,pbaron977/todomvc,jaredhensley/todomvc,nharada1/todomvc,ksteigerwald/todomvc,dcrlz/todomvc,alohaglenn/todomvc,biomassives/angular2_todomvc,yblee85/todomvc,jrpeasee/todomvc,Brycetastic/todomvc,mystor/todomvc,nharada1/todomvc,v2018z/todomvc,tianskyluj/todomvc,feathersjs/todomvc,vikbert/todomvc,yalishizhude/todomvc,Duc-Ngo-CSSE/todomvc,kamilogorek/todomvc,patrick-frontend/todomvc,patrick-frontend/todomvc,electricessence/todomvc,2011uit1719/todomvc,silentHoo/todomvc-ngpoly,yzfcxr/todomvc,Drup/todomvc,luxiaojian/todomvc,opal/todomvc,lgsanjos/todomvc,kaidokert/todomvc,thibaultzanini/todomvc,massimiliano-mantione/todomvc,blink2ce/todomvc,trexnix/todomvc,bonbonez/todomvc,guillermodiazga/todomvc,CreaturePhil/todomvc,dasaprakashk/todomvc,TodoFlux/todoflux,dchambers/todomvc,mikesprague/todomvc,nancy44/todomvc,johnbender/todomvc,jaredhensley/todomvc,niki571/todomvc,Keystion/todomvc,jeff235255/todomvc,PolarBearAndrew/todomvc,allanbrito/todomvc,edueo/todomvc,Yogi-Jiang/todomvc,peterkokot/todomvc,ajream/todomvc,biomassives/angular2_todomvc,mboudreau/todomvc,dudeOFprosper/todomvc,guillermodiazga/todomvc,pacoleung/todomvc,Aupajo/todomvc,Keystion/todomvc,oskargustafsson/todomvc,Granze/todomvc,troopjs-university/todomvc,flaviotsf/todomvc,briancavalier/todomvc-fab,bowcot84/todomvc,theflimflam/todomvc,evansendra/todomvc,wangjun/todomvc,dudeOFprosper/todomvc,lorgiorepo/todomvc,mhoyer/todomvc,zingorn/todomvc,ngbrya/todomvc,Live4Code/todomvc,jrpeasee/todomvc,Qwenbo/todomvc,kaidokert/todomvc,edueo/todomvc,colinkuo/todomvc,colinkuo/todomvc,ivanKaunov/todomvc,slegrand45/todomvc,lgsanjos/todomvc,pro100jam/todomvc,lingjuan/todomvc,sophiango/todomvc,bowcot84/todomvc,YaqubGhazi/todomvc,natelaclaire/todomvc,bryan7c/todomvc,altmind/todomvc,xtian/todomvc,jmicahc/todomvc,ebidel/todomvc,Rithie/todomvc,yzfcxr/todomvc,jdlawrence/todomvc,JinaLeeK/todomvc,appleboy/todomvc,willycz/todomvc,amy-chiu/todomvc,ozywuli/todomvc,urkaver/todomvc,brenopolanski/todomvc,wangjun/todomvc,pbaron977/todomvc,jmicahc/todomvc,cyberkoi/todomvc,andreaswachowski/todomvc,appleboy/todomvc,eatrocks/todomvc,aarai/todomvc,YaqubGhazi/todomvc,lingjuan/todomvc,jeremyeaton89/todomvc,samccone/todomvc,dasaprakashk/todomvc,hefangshi/todomvc,zingorn/todomvc,sethkrasnianski/todomvc,commana/todomvc,ngbrya/todomvc,cbolton97/todomvc,cledwyn/todomvc,jeff235255/todomvc,fr0609/todomvc,RaveJS/todomvc,laomagege/todomvc,pacoleung/todomvc,MarkHarper/todomvc,chrisfcarroll/todomvc,dcrlz/todomvc,baymaxi/todomvc,MariaSimion/todomvc,ebidel/todomvc,MikeDulik/todomvc,andrepitombeira/todomvc,Kedarnath13/todomvc,marcolamberto/todomvc,skatejs/todomvc,joelmatiassilva/todomvc,gmoura/todomvc,ryoia/todomvc,gd46/ToDoMVC,raiamber1/todomvc,dudeOFprosper/todomvc,pandoraui/todomvc,kpaxqin/todomvc,smasala/todomvc,stevengregory/todomvc,sammcgrail/todomvc,jrpeasee/todomvc,Drup/todomvc,suryasingh/todomvc,wallacecmo86/todomvc,vikbert/todomvc,natelaclaire/todomvc,vanyadymousky/todomvc,altmind/todomvc,eduardogomes/todomvc,szytko/todomvc,pandoraui/todomvc,opal/todomvc,sohucw/todomvc,jdlawrence/todomvc,weijye91/todomvc,wallclockbuilder/todomvc,bowcot84/todomvc,wangdahoo/todomvc,ajream/todomvc,natalieparellano/todomvc,ac-adekunle/todomvc,sethkrasnianski/todomvc,feathersjs/todomvc,lorgiorepo/todomvc,swannodette/todomvc,dcrlz/todomvc,msi008/todomvc,chrisdarroch/todomvc,willycz/todomvc,ngbrya/todomvc,jj4th/todomvc-poc,yzfcxr/todomvc,elacin/todomvc,lingjuan/todomvc,stoeffel/todomvc,massimiliano-mantione/todomvc,SooyoungYoon/todomvc,andrepitombeira/todomvc,urkaver/todomvc,Granze/todomvc,slegrand45/todomvc,joelmatiassilva/todomvc,luxiaojian/todomvc,txchen/todomvc,andrepitombeira/todomvc,mboudreau/todomvc,yzfcxr/todomvc,bondvt04/todomvc,fangjing828/todomvc,samccone/todomvc,aitchkhan/todomvc,cbolton97/todomvc,fchareyr/todomvc,mweststrate/todomvc,Rithie/todomvc,michalsnik/todomvc,theflimflam/todomvc,babarqb/todomvc,dakannan/TODOs,jmicahc/todomvc,Yogi-Jiang/todomvc,Aupajo/todomvc,andrepitombeira/todomvc,margaritis/todomvc,kaidokert/todomvc,pplgin/todomvc,hefangshi/todomvc,jrpeasee/todomvc,ivanKaunov/todomvc,bowcot84/todomvc,sohucw/todomvc,glizer/todomvc,vikbert/todomvc,skatejs/todomvc,miyai-chihiro/todomvc,RaveJS/todomvc,michalsnik/todomvc,andrepitombeira/todomvc,jdfeemster/todomvc,Live4Code/todomvc,zxc0328/todomvc,Garbar/todomvc,slegrand45/todomvc,cornerbodega/todomvc,brenopolanski/todomvc,jrpeasee/todomvc,akollegger/todomvc,nancy44/todomvc,jchadwick/todomvc,stephenplusplus/todomvc,albrow/todomvc,AngelValdes/todomvc,startersacademy/todomvc,arunrajnayak/todomvc,edueo/todomvc,yyx990803/todomvc,lorgiorepo/todomvc,joelmatiassilva/todomvc,xtian/todomvc,laomagege/todomvc | ---
+++
@@ -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 appendSourceLink() {
+ var sourceLink = document.createElement('a');
+ var paragraph = document.createElement('p');
+ var footer = document.getElementById('info');
+ var urlBase = 'https://github.com/addyosmani/todomvc/tree/gh-pages';
+
+ if (footer) {
+ sourceLink.href = urlBase + location.pathName;
+ sourceLink.appendChild(document.createTextNode('Check out the source'));
+ paragraph.appendChild(sourceLink);
+ footer.appendChild(paragraph);
+ }
+ }
+
+ appendSourceLink();
})(); |
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 = $('input[type=checkbox]');
const bits = new Array(checkboxes.length);
$.each(checkboxes, (index, item) => {
const $item = $(item);
const arrayIndex = $item.data('index');
if ($item.is(':checked')) {
bits[arrayIndex] = 1;
debug($item, arrayIndex);
} else {
bits[arrayIndex] = 0;
}
});
const bytes = partitionArray(bits, 8);
debug(bits.join(''));
debug(bytes.map(x => x.join('')).join(' '));
debug(bytes.map(x => parseInt(x.join(''), 2)).join(' '));
let unsafeFilter = '';
for (let i = 0; i < bytes.length; i++) {
const nextByte = bytes[i].join('');
const charCode = parseInt(nextByte.toString(), 2);
unsafeFilter += String.fromCharCode(charCode);
debug(nextByte, charCode, unsafeFilter);
}
const filter = btoa(unsafeFilter);
debug(filter);
window.prompt('Your filter:', filter);
});
});
| 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($('input[type=checkbox]')).reduce((arr, el) => {
const $el = $(el);
arr[$el.data('index')] = Number($el.is(':checked'));
return arr;
}, []);
const bytes = partitionArray(bits, 8);
debug(bits.join(''));
debug(bytes.map(x => x.join('')).join(' '));
debug(bytes.map(x => parseInt(x.join(''), 2)).join(' '));
let unsafeFilter = '';
for (let i = 0; i < bytes.length; i++) {
const nextByte = bytes[i].join('');
const charCode = parseInt(nextByte.toString(), 2);
unsafeFilter += String.fromCharCode(charCode);
debug(nextByte, charCode, unsafeFilter);
}
const filter = btoa(unsafeFilter);
debug(filter);
window.prompt('Your filter:', filter);
});
});
| 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 ($item.is(':checked')) {
- bits[arrayIndex] = 1;
- debug($item, arrayIndex);
- } else {
- bits[arrayIndex] = 0;
- }
- });
+ const bits = Array.from($('input[type=checkbox]')).reduce((arr, el) => {
+ const $el = $(el);
+ arr[$el.data('index')] = Number($el.is(':checked'));
+ return arr;
+ }, []);
const bytes = partitionArray(bits, 8);
debug(bits.join('')); |
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()
.pipe(tsc(tsProject))
.pipe(gulp.dest('build'));
});
gulp.task('test', ['test-build:spec', 'test-build:src'], () => {
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true,
plugins:[
'karma-spec-reporter',
'karma-coverage',
'karma-coveralls'
]
}).start();
});
gulp.task('test-build:spec', (done) => {
tsProjectSpec.src()
.pipe(tsc(tsProjectSpec))
.pipe(gulp.dest('test-build'))
.on('end', done);
});
gulp.task('test-build:src', (done) => {
tsProject.src()
.pipe(tsc(tsProject))
.pipe(gulp.dest('test-build/src'))
.on('end', done);
});
| 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()
.pipe(tsc(tsProject))
.pipe(gulp.dest('build'));
});
gulp.task('test', ['test-build:spec', 'test-build:src'], () => {
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true,
plugins: [
'karma-jasmine',
'karma-spec-reporter',
'karma-coverage',
'karma-coveralls'
]
}).start();
});
gulp.task('test-build:spec', (done) => {
tsProjectSpec.src()
.pipe(tsc(tsProjectSpec))
.pipe(gulp.dest('test-build'))
.on('end', done);
});
gulp.task('test-build:src', (done) => {
tsProject.src()
.pipe(tsc(tsProject))
.pipe(gulp.dest('test-build/src'))
.on('end', done);
});
| 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.hears(['PiscoBot.*new commits by', 'PiscoBot.*new commit by'], ['bot_message'],
function(bot, message) {
var emoji = [
'thinking_face',
'open_mouth',
'face_with_rolling_eyes',
'sweat_smile'
];
bot.api.reactions.add({
timestamp: message.ts,
channel: message.channel,
name: _.sample(emoji)
}, function(err) {
if(err) {
bot.botkit.log('Failed to add emoji reaction :(', err);
}
});
}
);
| // 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', 'PiscoBot.*new commit by'], ['bot_message'],
function(bot, message) {
var emoji = [
'thinking_face',
'open_mouth',
'face_with_rolling_eyes',
'sweat_smile'
];
bot.api.reactions.add({
timestamp: message.ts,
channel: message.channel,
name: _.sample(emoji)
}, function(err) {
if(err) {
bot.botkit.log('Failed to add emoji reaction :(', err);
}
});
}
);
| 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) => {
result = result.concat(
filePaths
.filter(filePath => !!parsers[path.extname(filePath)])
.map(filePath => {
const absoluteFilePath = path.resolve(dirPath, filePath)
const fileContent = fs.readFileSync(absoluteFilePath, { encoding: 'utf8' })
const parser = parsers[path.extname(filePath)]
const content = parser(fileContent)
return {
absoluteFilePath,
content
}
})
)
})
return result
}
module.exports = function readGraph(graphPath) {
return {
nodeLabels: readGraphObjects(path.resolve(graphPath, 'nodeLabels')),
nodes: readGraphObjects(path.resolve(graphPath, 'nodes')),
relationships: readGraphObjects(path.resolve(graphPath, 'relationships')),
relationshipTypes: readGraphObjects(path.resolve(graphPath, 'relationshipTypes')),
}
}
| 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) => {
result = result.concat(
filePaths
.filter(filePath => !!parsers[path.extname(filePath)])
.map(filePath => {
const absoluteFilePath = path.resolve(dirPath, filePath)
const fileContent = fs.readFileSync(absoluteFilePath, { encoding: 'utf8' })
const parser = parsers[path.extname(filePath)]
const content = parser(fileContent)
return mapResult({
absoluteFilePath,
content
})
})
)
})
return result
}
module.exports = function readGraph(graphPath, mapResult = i => i) {
return {
nodeLabels: readGraphObjects(path.resolve(graphPath, 'nodeLabels'), mapResult),
nodes: readGraphObjects(path.resolve(graphPath, 'nodes'), mapResult),
relationships: readGraphObjects(path.resolve(graphPath, 'relationships'), mapResult),
relationshipTypes: readGraphObjects(path.resolve(graphPath, 'relationshipTypes'), mapResult),
}
}
| 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 parser = parsers[path.extname(filePath)]
const content = parser(fileContent)
- return {
+ return mapResult({
absoluteFilePath,
content
- }
+ })
})
)
})
return result
}
-module.exports = function readGraph(graphPath) {
+module.exports = function readGraph(graphPath, mapResult = i => i) {
return {
- nodeLabels: readGraphObjects(path.resolve(graphPath, 'nodeLabels')),
- nodes: readGraphObjects(path.resolve(graphPath, 'nodes')),
- relationships: readGraphObjects(path.resolve(graphPath, 'relationships')),
- relationshipTypes: readGraphObjects(path.resolve(graphPath, 'relationshipTypes')),
+ nodeLabels: readGraphObjects(path.resolve(graphPath, 'nodeLabels'), mapResult),
+ nodes: readGraphObjects(path.resolve(graphPath, 'nodes'), mapResult),
+ relationships: readGraphObjects(path.resolve(graphPath, 'relationships'), mapResult),
+ relationshipTypes: readGraphObjects(path.resolve(graphPath, 'relationshipTypes'), mapResult),
}
} |
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 = [].slice.call(arguments);
// return {
// user: args[1].username,
// message: args[2]
// };
// });
// const messageSubscription = messageSource.subscribe(msgObj => {
// eventEmitter.emit('chatMessage', msgObj);
// });
twitchClient.on('chat', (channel, user, msg, self) => {
const messageBody = {
channel,
user,
msg,
};
messageController.saveMessage(messageBody);
eventEmitter.emit('chatMessage', {
user: user.username,
message: msg,
});
});
module.exports = server => {
const io = twitchIO.listen(server);
io.sockets.on('connection', socket => {
// socket.send('hello world');
eventEmitter.on('chatMessage', message => {
io.emit('message', message);
});
});
return io;
};
| 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) => {
return { channel, user, msg };
});
const messageSubscription = messageSource.subscribe((msgObj) => {
eventEmitter.emit('chatMessage', msgObj);
messageController.saveMessage(msgObj);
});
module.exports = server => {
const io = twitchIO.listen(server);
io.sockets.on('connection', socket => {
eventEmitter.on('chatMessage', message => {
io.emit('message', message);
});
});
return io;
};
| 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.Observable.fromEvent(twitchClient, 'chat', () => {
-// let args = [].slice.call(arguments);
-// return {
-// user: args[1].username,
-// message: args[2]
-// };
-// });
+const messageSource = Rx.Observable.fromEvent(twitchClient, 'chat', (channel, user, msg) => {
+ return { channel, user, msg };
+});
-// const messageSubscription = messageSource.subscribe(msgObj => {
-// eventEmitter.emit('chatMessage', msgObj);
-// });
-
-twitchClient.on('chat', (channel, user, msg, self) => {
- const messageBody = {
- channel,
- user,
- msg,
- };
-
- messageController.saveMessage(messageBody);
-
- eventEmitter.emit('chatMessage', {
- user: user.username,
- message: msg,
- });
+const messageSubscription = messageSource.subscribe((msgObj) => {
+ eventEmitter.emit('chatMessage', msgObj);
+ messageController.saveMessage(msgObj);
});
module.exports = server => {
const io = twitchIO.listen(server);
io.sockets.on('connection', socket => {
- // socket.send('hello world');
eventEmitter.on('chatMessage', message => {
io.emit('message', message);
});
+
});
return io; |
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_) {
element = angular.element("<span deselector/>");
$compile(element)($rootScope);
state = _state_;
}));
describe("on click", function() {
it('deselects all tokens', function() {
state.selectToken('01', 'ctrl-click');
state.selectToken('02', 'ctrl-click');
expect(state.hasSelections()).toBeTruthy();
element.triggerHandler('click');
expect(state.hasSelections()).toBeFalsy();
});
});
});
| "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(function($compile, $rootScope, _state_) {
element = angular.element("<span deselector/>");
$compile(element)($rootScope);
state = _state_;
}));
describe("on click", function() {
it('deselects all tokens', function() {
state.selectToken('01', 'ctrl-click');
state.selectToken('02', 'ctrl-click');
expect(state.hasSelections()).toBeTruthy();
element.triggerHandler('click');
expect(state.hasSelections()).toBeFalsy();
});
});
});
| 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) {
$provide.value('configurator', configurator); |
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);
};
modelCtrl.$formatters.push(format);
}
};
});
| '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, ' ', 80);
};
modelCtrl.$formatters.push(format);
}
};
});
| 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 = function(inputValue) {
- return JSON.stringify(inputValue, null, ' ', 80);
+ return JSON3.stringify(inputValue, null, ' ', 80);
};
modelCtrl.$formatters.push(format);
} |
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 promise that resolves when the
* promise is resolved
* @param {Promise} promise The promise that is to be decorated
* @param {String} method The name of the function from the Array prototype that should be decorated
*/
function decorate(promise, method) {
promise[method] = function () {
var args = slice.call(arguments);
return promise.then(function (results) {
return arrayProto[method].apply(results, args);
});
};
}
/**
* Takes results from a store query, wraps them in a promise if none provided, decorates with promise iterators and
* a total.
* @param {Promise|Array} results The results that are to be wrapped and decorated
* @return {Promise} The resulting promise that has been decorated.
*/
return function queryResults(results) {
var resultsPromise = resolve(results);
iteratorMethods.forEach(function (method) {
decorate(resultsPromise, method);
});
resultsPromise.total = results.total || resultsPromise.then(function (results) {
return results.length;
});
return resultsPromise;
};
}); | 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 from the Array.prototype wrapped in a promise that resolves when the
* promise is resolved
* @param {Promise} promise The promise that is to be decorated
* @param {String} method The name of the function from the Array prototype that should be decorated
*/
function decorate(promise, method) {
promise[method] = function () {
var args = slice.call(arguments);
return promise.then(function (results) {
return arrayProto[method].apply(results, args);
});
};
}
/**
* Takes results from a store query, wraps them in a promise if none provided, decorates with promise iterators and
* a total.
* @param {Promise|Array} results The results that are to be wrapped and decorated
* @return {Promise} The resulting promise that has been decorated.
*/
return function queryResults(results) {
var resultsPromise = resolve(results);
iteratorMethods.forEach(function (method) {
decorate(resultsPromise, method);
});
resultsPromise.total = results.total || resultsPromise.then(function (results) {
return results.length;
});
return resultsPromise;
};
}); | 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 a method derived from the Array.prototype wrapped in a promise that resolves when the |
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.html`), 'utf8')); // eslint-disable-line
$('#welcome').openModal({
dismissible: false,
complete: () => {
Emitter.fire('welcomed', remote.app.getVersion());
},
});
}
if (window.$) {
const modal = $('#about');
$('[data-app-version]').text(remote.app.getVersion());
$('[data-app-name]').text(remote.app.getName());
$('[data-app-dev-mode]').text(remote.getGlobal('DEV_MODE') ? 'Running in Development Mode' : '');
Emitter.on('about', () => {
modal.openModal({
dismissable: true,
});
});
}
});
| 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.html`), 'utf8')); // eslint-disable-line
$('#welcome').openModal({
dismissible: false,
complete: () => {
Emitter.fire('welcomed', remote.app.getVersion());
},
});
}
if (window.$) {
const modal = $('#about');
$('[data-app-version]').text(remote.app.getVersion());
$('[data-app-name]').text(remote.app.getName());
$('[data-app-dev-mode]').text(remote.getGlobal('DEV_MODE') ? 'Running in Development Mode' : '');
Emitter.on('about', () => {
modal.openModal({
dismissable: true,
});
});
}
});
| 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-UNOFFICIAL-,MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-,n4k1/Google-Play-Music-Desktop-Player-UNOFFICIAL-,MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL- | ---
+++
@@ -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]').html(fs.readFileSync(path.resolve(`${__dirname}/../../../../MR_CHANGELOG.html`), 'utf8')); // eslint-disable-line
$('#welcome').openModal({ |
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({
to: 'kyle@kylerader.ninja',
from: 'Great Puzzle Hunt API',
subject: 'Registration API Hit',
text: `Params:
${JSON.stringify(params)}
body:
${JSON.stringify(req.body)}`
});
res.setHeader('Content-Type', 'application/json');
res.statusCode = 200;
res.end();
});
| 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({
to: 'kyle@kylerader.ninja',
from: 'Great Puzzle Hunt API <info@greatpuzzlehunt.com>',
subject: 'Registration API Hit',
text: `Params:
${JSON.stringify(params)}
body:
${JSON.stringify(req.body)}`
});
res.setHeader('Content-Type', 'application/json');
res.statusCode = 200;
res.end();
});
| 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 depends on entityDb and referenceManager in the context.
let refList = node.find('ref-list')
if (refList) {
el.append(
$$(this.getComponent('ref-list'), { node: refList })
)
}
let fnGroup = node.find('fn-group')
if (fnGroup) {
el.append(
$$(this.getComponent('fn-group'), { node: fnGroup })
)
}
return el
}
}
| 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 depends on entityDb and referenceManager in the context.
let refList = node.find('ref-list')
if (refList) {
el.append(
$$(this.getComponent('ref-list'), { node: refList }).ref('ref-list')
)
}
let fnGroup = node.find('fn-group')
if (fnGroup) {
el.append(
$$(this.getComponent('fn-group'), { node: fnGroup })
)
}
return el
}
}
| 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.slice(0,-1);
var words = path.split("/");
for (var i = 0; i < words.length - 2; ++i) {
if (words[i] === repositoryName && words[i + 2] === "tests") {
return words[i + 1];
}
}
return "branch not found";
}
| // 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,-1);
var words = path.split("/");
// If the first word is not "https" then the script is probably running from a local file
// In this case, assume the required branch is "master"
if (words[0] !== "htpps") {
return "master";
}
for (var i = 0; i < words.length - 2; ++i) {
if (words[i] === repositoryName && words[i + 2] === "tests") {
return words[i + 1];
}
}
// This should never happen
return "branch not found";
}
| 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);
-
+
var words = path.split("/");
+
+ // If the first word is not "https" then the script is probably running from a local file
+ // In this case, assume the required branch is "master"
+ if (words[0] !== "htpps") {
+ return "master";
+ }
+
for (var i = 0; i < words.length - 2; ++i) {
if (words[i] === repositoryName && words[i + 2] === "tests") {
return words[i + 1];
}
}
-
+
+ // This should never happen
return "branch not found";
} |
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 routerStuff = routerMiddleware(history)
export { history }
const defaultState = {
auth: {},
navigation: {
dropdownVisible: false
},
howItWorks: {
howItWorksVisible: true
}
}
const middleware = applyMiddleware(routerStuff, promiseMiddleware())
const store = createStore(rootReducer, defaultState, compose(middleware, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()))
export default store | 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 routerStuff = routerMiddleware(history)
export { history }
const defaultState = {
auth: {},
navigation: {
dropdownVisible: false
},
howItWorks: {
howItWorksVisible: false
}
}
const middleware = applyMiddleware(routerStuff, promiseMiddleware())
const store = createStore(rootReducer, defaultState, compose(middleware, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()))
export default store | 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 <= end; i++){
range.push(i);
}
return range;
}
console.log(sumAll([10, 5]));
| 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 = arr[1];
+ var start = arr[0];
+ var range = [];
+
+ if (arr[0] > arr[1]) {
+ start = arr[1];
+ end = arr[0];
+ }
+
+ for(var i = start; i <= end; i++){
+ range.push(i);
+ }
+ return range;
+}
+
+
+console.log(sumAll([10, 5])); |
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 hell
temperature.get5MinData(function (result) {
var data = {data_temperature: handleResult('temperature', result)};
humidity.get5MinData(function (result) {
data = merge(data, {data_humidity: handleResult('humidity', result)});
gas.get5MinData(function (result) {
data = merge(data, {data_gas: handleResult('gas', result)});
co.get5MinData(function (result) {
callback(merge(data, {data_co: handleResult('co', result)}));
});
});
});
});
};
function handleResult(title, result) {
var data = [
[{label: 'Times', type: 'date'}, title]
];
if (result.length == 0) {
data.push(['', 0]);
}
for (var i in result) {
data.push([
timestamp.toChartDateString(result[i].saved),
result[i].value
]);
}
return data;
}
| 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 hell
temperature.get5MinData(function (result) {
var data = {data_temperature: handleResult('temperature', result)};
humidity.get5MinData(function (result) {
data = merge(data, {data_humidity: handleResult('humidity', result)});
gas.get5MinData(function (result) {
data = merge(data, {data_gas: handleResult('gas', result)});
co.get5MinData(function (result) {
callback(merge(data, {data_co: handleResult('co', result)}));
});
});
});
});
};
function handleResult(title, result) {
var data = [
[{label: 'Times', type: 'date'}, title]
];
if (result.length == 0) {
data.push([timestamp.toChartDateString(new Date()), 0]);
}
for (var i in result) {
data.push([
timestamp.toChartDateString(result[i].saved),
result[i].value
]);
}
return data;
}
| 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,
optional: true
}
});
| "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 SimpleSchema({
x: {
type: Number,
min: 0,
max: 100
},
y: {
type: Number,
min: 0,
max: 100
},
z: {
type: Number,
min: 1,
max: 9999
},
rotation: {
type: Number,
min: 0,
max: 100
},
});
Nbsp.CardSchema = new SimpleSchema({
from: {
type: String,
label: "Your name",
max: 64
},
content: {
type: String,
label: "Your message",
max: 256
},
hue: {
type: Number,
label: "Light color",
min: 0,
max: 65535
},
position: {
type: Nbsp.CardPositionSchema
},
createdAt: {
type: Date
},
updatedAt: {
type: Date,
optional: true
}
});
| 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({
+ insert() { return true; },
+ update() { return true; },
+ remove() { return true; }
+});
+
+Nbsp.CardPositionSchema = new SimpleSchema({
+ x: {
+ type: Number,
+ min: 0,
+ max: 100
+ },
+ y: {
+ type: Number,
+ min: 0,
+ max: 100
+ },
+ z: {
+ type: Number,
+ min: 1,
+ max: 9999
+ },
+ rotation: {
+ type: Number,
+ min: 0,
+ max: 100
+ },
+});
+
+Nbsp.CardSchema = new SimpleSchema({
from: {
type: String,
label: "Your name",
@@ -10,8 +45,17 @@
},
content: {
type: String,
- label: "Your message"
+ label: "Your message",
max: 256
+ },
+ hue: {
+ type: Number,
+ label: "Light color",
+ min: 0,
+ max: 65535
+ },
+ position: {
+ type: Nbsp.CardPositionSchema
},
createdAt: {
type: Date |
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 = {}) => {
return Request.post("/api/jobs/test")
.send(options);
}
};
export default jobsAPI;
| /**
*
*
* @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 = {}) => {
console.log(options);
return Request.post("/api/jobs/test")
.send(options);
}
};
export default jobsAPI;
| 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', inject(function(keyCapture) {
keyCapture.keydown({ keyCode : keyCapture.keyCodes.ctrl });
expect(keyCapture.isCtrlActive()).toBe(true);
}));
it('return false if keydown for ctrl was received', inject(function(keyCapture) {
keyCapture.keydown({ keyCode : keyCapture.keyCodes.ctrl });
keyCapture.keyup({ keyCode : keyCapture.keyCodes.ctrl });
expect(keyCapture.isCtrlActive()).toBe(false);
}));
});
describe('onKeyPressed', function() {
it('calls the given callback', inject(function(keyCapture) {
var callbackCalled = false;
var callback = function() { callbackCalled = true; };
keyCapture.onKeyPressed(keyCapture.keyCodes.esc, callback);
keyCapture.keydown({ keyCode : keyCapture.keyCodes.esc });
keyCapture.keyup({ keyCode : keyCapture.keyCodes.esc });
expect(callbackCalled).toBe(true);
}));
});
});
| "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;
var callback = function() { callbackCalled = true; };
keyCapture.onKeyPressed('esc', callback);
keyCapture.keyup(event);
expect(callbackCalled).toBe(true);
}));
});
});
| 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 ctrl was received', inject(function(keyCapture) {
- keyCapture.keydown({ keyCode : keyCapture.keyCodes.ctrl });
-
- expect(keyCapture.isCtrlActive()).toBe(true);
- }));
-
- it('return false if keydown for ctrl was received', inject(function(keyCapture) {
- keyCapture.keydown({ keyCode : keyCapture.keyCodes.ctrl });
- keyCapture.keyup({ keyCode : keyCapture.keyCodes.ctrl });
-
- expect(keyCapture.isCtrlActive()).toBe(false);
- }));
- });
-
describe('onKeyPressed', function() {
it('calls the given callback', inject(function(keyCapture) {
+ var event = {
+ keyCode: 27,
+ target: { tagname: '' }
+ };
var callbackCalled = false;
var callback = function() { callbackCalled = true; };
- keyCapture.onKeyPressed(keyCapture.keyCodes.esc, callback);
+ keyCapture.onKeyPressed('esc', callback);
- keyCapture.keydown({ keyCode : keyCapture.keyCodes.esc });
- keyCapture.keyup({ keyCode : keyCapture.keyCodes.esc });
+ keyCapture.keyup(event);
expect(callbackCalled).toBe(true);
})); |
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) {
var result = document.createElement('canvas');
result.id = name;
result.style = 'border: solid 1px';
result.width = 500;
result.height = 500;
playfield.appendChild(result);
return result;
} | "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) {
var result = document.createElement('canvas');
result.id = name;
result.style = 'border: solid 1px';
result.width = 500;
result.height = 500;
playfield.appendChild(result);
return result;
} | 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.classes) {
this.classes.push(Parsers.LineType(this.source, this.target));
}
this.classes = this.classes.map(function (c) {
return "line-" + c;
});
}
module.exports = Line;
| 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, []);
if (!input.classes) {
this.classes.push(Parsers.LineType(this.source, this.target));
}
this.classes = this.classes.map(function (c) {
return "line-" + c;
});
}
module.exports = Line;
| 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();
+ this.id = this.source.id + "_" + this.target.id + "_" + Idy();
this.classes = Deffy(input.classes, []);
if (!input.classes) {
this.classes.push(Parsers.LineType(this.source, this.target)); |
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);
ajax.open("GET", url, true);
ajax.send();
}
},
enabled: false
});
chrome.extension.onRequest.addListener(function (request) {
if (request.hasOwnProperty('wicketsource')) {
wicketsource = request.wicketsource;
if (wicketsource != null) {
var idx = wicketsource.indexOf(':');
if (idx > -1) {
wicketsource = wicketsource.substring(idx + 1);
}
wicketsource = wicketsource.replace(/\.java:/, ':');
chrome.contextMenus.update(menu, {
enabled: true,
title: "Wicket Source - " + wicketsource
});
} else {
chrome.contextMenus.update(menu, {
enabled: false,
title: "Wicket Source"
});
}
}
});
})();
| (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 (ws == null) {
chrome.contextMenus.update(menu, {
enabled: false,
title: "Wicket Source"
});
return;
}
var idx = ws.indexOf(':');
if (idx > -1) {
ws = ws.substring(idx + 1);
}
ws = ws.replace(/\.java:/, ':');
chrome.contextMenus.update(menu, {
enabled: true,
title: "Wicket Source - " + ws,
onclick: function () {
var ajax = new XMLHttpRequest();
var url = "http://localhost:9123/open?src=" + encodeURIComponent(request.wicketsource);
ajax.open("GET", url, true);
ajax.send();
}
});
}
});
})();
| 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();
- var url = "http://localhost:9123/open?src=" + encodeURIComponent(wicketsource);
- ajax.open("GET", url, true);
- ajax.send();
- }
- },
- enabled: false
+ contexts: [ "all" ],
+ enabled: false,
+ onclick: function() {}
});
chrome.extension.onRequest.addListener(function (request) {
if (request.hasOwnProperty('wicketsource')) {
- wicketsource = request.wicketsource;
- if (wicketsource != null) {
- var idx = wicketsource.indexOf(':');
- if (idx > -1) {
- wicketsource = wicketsource.substring(idx + 1);
- }
- wicketsource = wicketsource.replace(/\.java:/, ':');
- chrome.contextMenus.update(menu, {
- enabled: true,
- title: "Wicket Source - " + wicketsource
- });
- } else {
+ var ws = request.wicketsource;
+ if (ws == null) {
chrome.contextMenus.update(menu, {
enabled: false,
title: "Wicket Source"
});
+ return;
}
+ var idx = ws.indexOf(':');
+ if (idx > -1) {
+ ws = ws.substring(idx + 1);
+ }
+ ws = ws.replace(/\.java:/, ':');
+ chrome.contextMenus.update(menu, {
+ enabled: true,
+ title: "Wicket Source - " + ws,
+ onclick: function () {
+ var ajax = new XMLHttpRequest();
+ var url = "http://localhost:9123/open?src=" + encodeURIComponent(request.wicketsource);
+ ajax.open("GET", url, true);
+ ajax.send();
+ }
+ });
}
});
+})();
-
-})(); |
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('!');
$routeProvider.otherwise({redirectTo: '/view1'});
}]);*/
var clientApp = angular.module('clientApp', []);
clientApp.controller('PathFinderController', ['$scope', function($scope) {
//Submit the Request to get the paths for the node text.
$scope.results = [];
$scope.paths = [];
$scope.submit = function() {
var enteredNode = $scope.nodeText;
var json = angular.fromJson($scope.enteredJson);
addJsonPaths(json, "");
console.log($scope.paths);
};
function addJsonPaths(theObject, path) {
var paths = [];
for (var property in theObject) {
if (theObject.hasOwnProperty(property)) {
if (theObject[property] instanceof Object) {
addJsonPaths(theObject[property], path + '/' + property);
} else {
var finalPath = path + '/' + property;
if(finalPath.indexOf($scope.nodeText) > -1) {
var nodeIndex = finalPath.indexOf($scope.nodeText);
$scope.paths.push(finalPath.substring(0, nodeIndex + $scope.nodeText.length));
}
}
}
}
}
}]);
| '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('!');
$routeProvider.otherwise({redirectTo: '/view1'});
}]);*/
var clientApp = angular.module('clientApp', []);
clientApp.controller('PathFinderController', ['$scope', function($scope) {
//Submit the Request to get the paths for the node text.
$scope.results = [];
$scope.paths = [];
$scope.submit = function() {
$scope.paths = [];
var enteredNode = $scope.nodeText;
var json = angular.fromJson($scope.enteredJson);
addJsonPaths(json, "");
console.log($scope.paths);
};
function addJsonPaths(theObject, path) {
var paths = [];
for (var property in theObject) {
if (theObject.hasOwnProperty(property)) {
if (theObject[property] instanceof Object) {
addJsonPaths(theObject[property], path + '/' + property);
} else {
var finalPath = path + '/' + property;
if(finalPath.indexOf($scope.nodeText) > -1) {
var nodeIndex = finalPath.indexOf($scope.nodeText);
$scope.paths.push(finalPath.substring(0, nodeIndex + $scope.nodeText.length));
}
}
}
}
}
}]);
| 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
mijinDisabled: true,
// Available languages
languages: [{
name: "English",
key: "en"
}, {
name: "Chinese",
key: "cn"
}/*, {
name: "Français",
key: "fr"
}*/],
// Transaction types
TransactionType: {
Transfer: 0x101, // 257
ImportanceTransfer: 0x801, // 2049
MultisigModification: 0x1001, // 4097
MultisigSignature: 0x1002, // 4098
MultisigTransaction: 0x1004, // 4100
ProvisionNamespace: 0x2001, // 8193
MosaicDefinition: 0x4001, // 16385
MosaicSupply: 0x4002, // 16386
}
};
export default AppConstants; | 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
mijinDisabled: true,
// Available languages
languages: [{
name: "English",
key: "en"
}, {
name: "Chinese",
key: "cn"
}/*, {
name: "Français",
key: "fr"
}*/],
// Transaction types
TransactionType: {
Transfer: 0x101, // 257
ImportanceTransfer: 0x801, // 2049
MultisigModification: 0x1001, // 4097
MultisigSignature: 0x1002, // 4098
MultisigTransaction: 0x1004, // 4100
ProvisionNamespace: 0x2001, // 8193
MosaicDefinition: 0x4001, // 16385
MosaicSupply: 0x4002, // 16386
}
};
export default AppConstants; | 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: 'inline-block', width: '5vw' } } />
);
});
return (
<div style={ {
position: 'absolute',
top: '75%',
width: '100%',
background: 'linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6))',
textAlign: 'center' } }
>
{children}
</div>
);
};
export default IconBar;
| /* 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];
return (
<Icon key={key} style={ { display: 'inline-block', width: '10%' } } />
);
});
let rowsOfChildren = (
<Grid>
<Row>
<Col xs={12} sm={6}>
{children.slice(0, 7)}
</Col>
<Col xs={12} sm={6}>
{children.slice(7)}
</Col>
</Row>
</Grid>
);
return (
<div style={ {
position: 'absolute',
top: '75%',
width: '100%',
background: 'linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6))',
textAlign: 'center' } }
>
{rowsOfChildren}
</div>
);
};
export default IconBar;
| 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];
return (
- <Icon key={key} style={ { display: 'inline-block', width: '5vw' } } />
+ <Icon key={key} style={ { display: 'inline-block', width: '10%' } } />
);
});
+ let rowsOfChildren = (
+ <Grid>
+ <Row>
+ <Col xs={12} sm={6}>
+ {children.slice(0, 7)}
+ </Col>
+ <Col xs={12} sm={6}>
+ {children.slice(7)}
+ </Col>
+ </Row>
+ </Grid>
+ );
+
return (
<div style={ {
position: 'absolute',
@@ -19,7 +33,7 @@
background: 'linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6))',
textAlign: 'center' } }
>
- {children}
+ {rowsOfChildren}
</div>
);
}; |
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 scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
scope.conference = {
registrationPages: [
{
id: 'page1',
blocks: [ { id: 'block1' } ]
},
{
id: 'page2',
blocks: [ { id: 'block2' } ]
}
]
};
FormDropAreaCtrl = $controller('FormDropAreaCtrl', {
$scope: scope
});
}));
it('should have a function to move a block', function () {
scope.moveBlock('block2', 'page1', 0);
expect(scope.conference.registrationPages[0].blocks.length).toBe(2);
expect(scope.conference.registrationPages[0].blocks[0].id).toBe('block2');
});
it('should have a function to insert a block', function () {
scope.insertBlock('textQuestion', 'page2', 1);
expect(scope.conference.registrationPages[1].blocks.length).toBe(2);
expect(scope.conference.registrationPages[1].blocks[1].type).toBe('textQuestion');
});
});
| /* 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 scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
scope.conference = {
registrationPages: [
{
id: 'page1',
blocks: [ { id: 'block1' } ]
},
{
id: 'page2',
blocks: [ { id: 'block2' } ]
}
]
};
FormDropAreaCtrl = $controller('FormDropAreaCtrl', {
$scope: scope
});
}));
it('should have a function to move a block', function () {
scope.moveBlock('block2', 'page1', 0);
expect(scope.conference.registrationPages[0].blocks.length).toBe(2);
expect(scope.conference.registrationPages[0].blocks[0].id).toBe('block2');
});
it('should have a function to insert a block', function () {
scope.insertBlock('textQuestion', 'page2', 1);
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.conference.registrationPages[1].blocks.length).toBe(0);
});
});
| 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.conference.registrationPages[1].blocks.length).toBe(0);
+ });
}); |
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'),
* attr = {
* 'src': 'http://example.com/something.gif',
* 'width': '100',
* 'height': '200'
* };
* // Returns x (<img src="http://example.com/something.gif" width="100" height="200" />)
*/
function attachAttr (ele, attrObj) {
for (var attr in attrObj) {
ele.setAttribute(attr, attrObj[attr]);
}
return ele;
}
| 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 object
+ * @returns {object} ele Passes the element with attributes attached.
+ *
+ * @example
+ * var x = document.createElement('img'),
+ * attr = {
+ * 'src': 'http://example.com/something.gif',
+ * 'width': '100',
+ * 'height': '200'
+ * };
+ * // Returns x (<img src="http://example.com/something.gif" width="100" height="200" />)
+ */
+function attachAttr (ele, attrObj) {
+ for (var attr in attrObj) {
+ ele.setAttribute(attr, attrObj[attr]);
}
+
return ele;
} |
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 self = this;
_.each(_.keys(specifier), function(key) {
/* For each of the states specified, update the color */
$(self.svg).find('#' + key).css('fill', specifier[key]);
});
};
return Map;
});
| 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 self = this;
_.each(_.keys(specifier), function(key) {
/* For each of the states specified, update the color */
$(self.svg).find('#' + key).css('fill', specifier[key]);
});
};
return Map;
});
| 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'));
const xhr = new XMLHttpRequest();
xhr.timeout = opts.timeout;
xhr.onerror = doReject;
xhr.ontimeout = doReject;
xhr.onload = () => {
const ip = xhr.responseText.trim();
if (!ip || !isIp[version](ip)) {
doReject();
}
resolve(ip);
};
xhr.open('GET', urls[version]);
xhr.send();
});
}
module.exports.v4 = opts => {
opts = Object.assign({}, defaults, opts);
return queryHttps('v4', opts);
};
module.exports.v6 = opts => {
opts = Object.assign({}, defaults, opts);
return queryHttps('v6', opts);
};
| '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'));
const xhr = new XMLHttpRequest();
xhr.onload = () => {
const ip = xhr.responseText.trim();
if (!ip || !isIp[version](ip)) {
doReject();
}
resolve(ip);
};
xhr.open('GET', urls[version]);
xhr.timeout = opts.timeout;
xhr.onerror = doReject;
xhr.ontimeout = doReject;
xhr.send();
});
}
module.exports.v4 = opts => {
opts = Object.assign({}, defaults, opts);
return queryHttps('v4', opts);
};
module.exports.v6 = opts => {
opts = Object.assign({}, defaults, opts);
return queryHttps('v6', opts);
};
| 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 @@
};
xhr.open('GET', urls[version]);
+ xhr.timeout = opts.timeout;
+ xhr.onerror = doReject;
+ xhr.ontimeout = doReject;
xhr.send();
});
} |
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, moduleDefinition) {
Module.definitions[name] = moduleDefinition;
};
// load calendar.js
require("../../../modules/default/calendar/calendar.js");
describe("capFirst", function() {
words = {
"rodrigo": "Rodrigo",
"123m": "123m",
"magic mirror": "Magic mirror",
",a": ",a",
"ñandú": "Ñandú"
};
Object.keys(words).forEach(word => {
it(`for ${word} should return ${words[word]}`, function() {
expect(Module.definitions.calendar.capFirst(word)).to.equal(words[word]);
});
});
});
});
| 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, moduleDefinition) {
Module.definitions[name] = moduleDefinition;
};
before(function() {
// load calendar.js
require("../../../modules/default/calendar/calendar.js");
});
describe("capFirst", function() {
words = {
"rodrigo": "Rodrigo",
"123m": "123m",
"magic mirror": "Magic mirror",
",a": ",a",
"ñandú": "Ñandú"
};
Object.keys(words).forEach(word => {
it(`for ${word} should return ${words[word]}`, function() {
expect(Module.definitions.calendar.capFirst(word)).to.equal(words[word]);
});
});
});
});
| 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/MagicMirror,roramirez/MagicMirror,n8many/MagicMirror,heyheyhexi/MagicMirror,MichMich/MagicMirror,berlincount/MagicMirror,marc-86/MagicMirror,Tyvonne/MagicMirror,roramirez/MagicMirror,heyheyhexi/MagicMirror,vyazadji/MagicMirror,MichMich/MagicMirror,n8many/MagicMirror,roramirez/MagicMirror,marc-86/MagicMirror,MichMich/MagicMirror,Tyvonne/MagicMirror,berlincount/MagicMirror,heyheyhexi/MagicMirror,berlincount/MagicMirror,marc-86/MagicMirror,thobach/MagicMirror,morozgrafix/MagicMirror,n8many/MagicMirror,vyazadji/MagicMirror,n8many/MagicMirror | ---
+++
@@ -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() {
words = { |
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) {
var multigraph = this;
var container = $(this.div());
var c = $(target); // select canvas in multigraph div
$(window).resize(respondGraph);
function respondGraph()
{
c.attr("width", container.width());
c.attr("height", container.height());
c.css("width", container.width());
c.css("height", container.height());
multigraph.init();
}
});
return Multigraph;
};
| 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) {
var multigraph = this;
var container = $(this.div());
var c = $(target); // select canvas in multigraph div
$(window).resize(respondGraph);
function respondGraph()
{
c.attr("width", container.width() * window.devicePixelRatio);
c.attr("height", container.height() * window.devicePixelRatio);
c.css("width", container.width());
c.css("height", container.height());
multigraph.init();
}
});
return Multigraph;
};
| 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.devicePixelRatio);
c.css("width", container.width());
c.css("height", container.height());
multigraph.init(); |
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(msg) === "[object Array]") {
msg = msg.join();
} else if (typeof object === "object") {
msg = msg === null ? "null" : JSON.stringify(msg);
}
document.body.insertAdjacentHTML(
'beforeend',
'<p style="font-family: monospace; margin: 2px 0 2px 0">' +
msg.replace(/&/g, '&').replace(/</g, '<') +
'</p>'
);
},
// Writes out the given HTML at the end of the body,
// exactly as-is
logHTML: function(html) {
document.body.insertAdjacentHTML("beforeend", html);
}
};
| // 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(msg) === "[object Array]") {
msg = msg.join();
} else if (typeof object === "object") {
msg = msg === null ? "null" : JSON.stringify(msg);
} else {
msg = String(msg);
}
document.body.insertAdjacentHTML(
'beforeend',
'<p style="font-family: monospace; margin: 2px 0 2px 0">' +
msg.replace(/&/g, '&').replace(/</g, '<') +
'</p>'
);
},
// Writes out the given HTML at the end of the body,
// exactly as-is
logHTML: function(html) {
document.body.insertAdjacentHTML("beforeend", html);
}
};
| 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 @@
msg = msg.join();
} else if (typeof object === "object") {
msg = msg === null ? "null" : JSON.stringify(msg);
+ } else {
+ msg = String(msg);
}
document.body.insertAdjacentHTML(
'beforeend', |
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;
})
vm.openModal = openModal
vm.closeModal = closeModal
vm.login = login
//////////////////////
function openModal() {
vm.loginModal.show();
};
function closeModal(){
vm.loginModal.hide();
}
function login(){
Auth.setAuthToken( vm.username, vm.password );
}
};
SettingsCtrl
.$inject = ['$scope', '$ionicModal', 'Auth'];
angular
.module('app.modules.tabs.settings.controllers', [])
.controller('SettingsCtrl', SettingsCtrl);
})();
| (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;
})
vm.openModal = openModal
vm.closeModal = closeModal
vm.login = login
//////////////////////
function openModal() {
vm.loginModal.show();
};
function closeModal(){
vm.loginModal.hide();
}
function login(){
Restangular.all('users').all('login').post( vm.username, vm.password )
.then(function(err, result){
if (err) throw
Auth.setAuthToken( result.user.username, result.sessionsToken, result.user );
})
}
};
SettingsCtrl
.$inject = ['$scope', '$ionicModal', 'Auth'];
angular
.module('app.modules.tabs.settings.controllers', [])
.controller('SettingsCtrl', SettingsCtrl);
})();
| 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( result.user.username, result.sessionsToken, result.user );
+ })
+
}
}; |
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, attrs) {
var parent = scope.$parent;
function extractLanguage() {
return (languageSettings.getFor('treebank') || {}).lang;
}
function lang() {
return scope.foreignKeys || extractLanguage();
}
// This will not detect changes right now
function placeHolderText() {
var language = languageSettings.langNames[lang()];
return language ? language + ' input enabled!' : '';
}
element.attr('placeholder', placeHolderText);
element.on('keydown', function (event) {
var input = event.target.value;
if (lang) {
var fK = keyCapture.getForeignKey(event, lang);
if (fK === false) {
return false;
}
if (fK === undefined) {
return true;
} else {
event.target.value = input + fK;
scope.$apply(function() {
parent.$eval(scope.ngModel + ' = i + k', { i: input, k: fK });
scope.ngChange();
});
return false;
}
} else {
return true;
}
});
}
};
}
]);
| 'use strict';
angular.module('arethusa.core').directive('foreignKeys',[
'keyCapture',
'languageSettings',
function (keyCapture, languageSettings) {
return {
restrict: 'A',
scope: {
ngChange: '&',
ngModel: '@',
foreignKeys: '='
},
link: function (scope, element, attrs) {
var parent = scope.$parent;
function extractLanguage() {
return (languageSettings.getFor('treebank') || {}).lang;
}
function lang() {
return scope.foreignKeys || extractLanguage();
}
// This will not detect changes right now
function placeHolderText() {
var language = languageSettings.langNames[lang()];
return language ? language + ' input enabled!' : '';
}
element.attr('placeholder', placeHolderText);
element.on('keydown', function (event) {
var input = event.target.value;
var l = lang();
if (l) {
var fK = keyCapture.getForeignKey(event, l);
if (fK === false) {
return false;
}
if (fK === undefined) {
return true;
} else {
event.target.value = input + fK;
scope.$apply(function() {
parent.$eval(scope.ngModel + ' = i + k', { i: input, k: fK });
scope.ngChange();
});
return false;
}
} else {
return true;
}
});
}
};
}
]);
| 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);
if (fK === false) {
return false;
} |
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 called for each message from "content-script.js"
port.onMessage.addListener(function (message) {
if(message === 'get-sourceId') {
chrome.desktopCapture.chooseDesktopMedia(session, port.sender.tab, onAccessApproved);
}
});
// "sourceId" will be empty if permission is denied.
function onAccessApproved(sourceId) {
// if "cancel" button is clicked
if(!sourceId || !sourceId.length) {
return port.postMessage('PermissionDeniedError');
}
port.postMessage({
sourceId: sourceId
});
}
});
| // 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 for each message from "content-script.js"
port.onMessage.addListener(function (message) {
if(message === 'get-sourceId') {
chrome.desktopCapture.chooseDesktopMedia(session, port.sender.tab, onAccessApproved);
}
});
// "sourceId" will be empty if permission is denied.
function onAccessApproved(sourceId) {
// if "cancel" button is clicked
if(!sourceId || !sourceId.length) {
return port.postMessage('PermissionDeniedError');
}
port.postMessage({
sourceId: sourceId
});
}
});
| 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-script.js" |
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: true });
schema.column('title', { type: 'string', length: 50, null: true });
schema.belongsTo('gallery', 'Gallery', { keys: { gallery_id: 'id' } });
schema.hasMany('images_tags', 'ImageTag', { keys: { id: 'image_id' } });
schema.hasManyThrough('tags', 'images_tags', 'tag');
}
}
Image.register();
module.exports = Image; | 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: true });
schema.column('title', { type: 'string', length: 50, null: true });
schema.belongsTo('gallery', 'Gallery', { keys: { gallery_id: 'id' }, null: true });
schema.hasMany('images_tags', 'ImageTag', { keys: { id: 'image_id' } });
schema.hasManyThrough('tags', 'images_tags', 'tag');
}
}
Image.register();
module.exports = Image; | 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: true });
schema.hasMany('images_tags', 'ImageTag', { keys: { id: 'image_id' } });
schema.hasManyThrough('tags', 'images_tags', 'tag');
} |
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 = Object.keys(config.ecmaFeatures);
keys.forEach(function(key) {
expect(config.ecmaFeatures[key]).toBeFalsy();
});
});
it("should disable all environments.", function() {
var config = require('../index');
expect(config.env).toBeFalsy();
});
it("should only have opinions on rules that exist (no zombies).", function() {
var eslintRules = require('eslint/conf/eslint.json').rules;
var openstackRules = require('../index').rules;
/*eslint-disable guard-for-in */
for (var ruleName in openstackRules) {
expect(eslintRules.hasOwnProperty(ruleName))
.toBeTruthy("Rule " + ruleName + " is a zombie.");
}
/*eslint-enable guard-for-in */
});
});
| 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 = Object.keys(config.ecmaFeatures);
keys.forEach(function(key) {
expect(config.ecmaFeatures[key]).toBeFalsy();
});
});
it("should disable all environments.", function() {
var config = require('../index');
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 eslintReplacements) {
expect(rules.hasOwnProperty(ruleName))
.toBeFalsy("Rule " + ruleName + " has been replaced:", eslintReplacements[ruleName]);
}
/*eslint-enable guard-for-in */
});
it("should only have opinions on rules that exist (no zombies).", function() {
var eslintRules = require('eslint/conf/eslint.json').rules;
var openstackRules = require('../index').rules;
/*eslint-disable guard-for-in */
for (var ruleName in openstackRules) {
expect(eslintRules.hasOwnProperty(ruleName))
.toBeTruthy("Rule " + ruleName + " is a zombie.");
}
/*eslint-enable guard-for-in */
});
});
| 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 eslintReplacements) {
+ expect(rules.hasOwnProperty(ruleName))
+ .toBeFalsy("Rule " + ruleName + " has been replaced:", eslintReplacements[ruleName]);
+ }
+ /*eslint-enable guard-for-in */
+ });
+
it("should only have opinions on rules that exist (no zombies).", function() {
var eslintRules = require('eslint/conf/eslint.json').rules;
var openstackRules = require('../index').rules; |
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', configContents);
};
var setToken = function(token) {
config.libratoToken = token;
saveConfig();
};
var setApiKey = function(apiKey) {
config.libratoApiKey = apiKey;
saveConfig();
};
module.exports = config;
module.exports.setToken = setToken;
module.exports.setApiKey = setApiKey;
| 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 configContents = JSON.stringify(config, null, 2);
filesystem.writeFileSync('config.json', configContents);
};
var setToken = function(token) {
config.libratoToken = token;
saveConfig();
};
var setApiKey = function(apiKey) {
config.libratoApiKey = apiKey;
saveConfig();
};
module.exports = config;
module.exports.setToken = setToken;
module.exports.setApiKey = setApiKey;
| 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 read config file at ' + __dirname + '/../config.json');
}
var saveConfig = function() { |
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,
price: Number
});
| 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,
price: Number
});
// Define flight schema for travel demo site
let flightsSchema = mongoose.Schema({
airline: String,
origin: String,
dest: String,
departureTime: Date,
arrivalTime: Date
});
| 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, this
// list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation and/or
// other materials provided with the distribution.
// 3. Neither the name of the organization nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
require.config({
baseUrl: process._RJS_baseUrl(2),
// relative to this config file (not baseUrl)
dir: "../build-output/_multiple-bundles",
modules:
[
{
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"]
}
]
//,
// unlike with single-bundle, this does not work! :(
// paths:
// {
// "version":
// process._RJS_rootDir(2) + '/build-output/version',
// }
});
| // 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, this
// list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation and/or
// other materials provided with the distribution.
// 3. Neither the name of the organization nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
require.config({
baseUrl: process._RJS_baseUrl(2),
// relative to this config file (not baseUrl)
dir: "../build-output/_multiple-bundles",
modules:
[
{
name: "readium-js",
create: true,
include: ["readium_js/Readium"],
exclude: ["readium-external-libs", "readium-shared-js", "readium-cfi-js"]
}
]
//,
// unlike with single-bundle, this does not work! :(
// paths:
// {
// "version":
// process._RJS_rootDir(2) + '/build-output/version',
// }
});
| 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-libs", "readium-shared-js", "readium-cfi-js"]
}
]
|
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?)$/;
// Assert that the componentRoot option was specified
if (!options.componentRoot) {
throw new Error(
'You need to specify where your components are in the "componentRoot" option!\n\n'
);
}
// Assert that the plugins option is an array if specified
if (options.plugins && !Array.isArray(options.plugins)) {
throw new Error('The "plugins" option needs to be an array!\n\n');
}
// Assert that the files option is an array if specified
if (options.files && !Array.isArray(options.files)) {
throw new Error('The "files" option needs to be an array!\n\n');
}
}
export default validateOptions;
| /* 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
options.filter = options.filter || /([A-Z][a-zA-Z]*.?\/index|[A-Z][a-zA-Z]*)\.(jsx?|es6|react\.jsx?)$/;
// Assert that the componentRoot option was specified
if (!options.componentRoot) {
throw new Error(
'You need to specify where your components are in the "componentRoot" option!\n\n'
);
}
// Assert that the plugins option is an array if specified
if (options.plugins && !Array.isArray(options.plugins)) {
throw new Error('The "plugins" option needs to be an array!\n\n');
}
// Assert that the files option is an array if specified
if (options.files && !Array.isArray(options.files)) {
throw new Error('The "files" option needs to be an array!\n\n');
}
}
export default validateOptions;
| 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 the .? makes it not insert a comment terminator
+ options.filter = options.filter || /([A-Z][a-zA-Z]*.?\/index|[A-Z][a-zA-Z]*)\.(jsx?|es6|react\.jsx?)$/;
// Assert that the componentRoot option was specified
if (!options.componentRoot) { |
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(); },
});
},
deactivate() {
this.commands.dispose();
},
build() {
const builder = this.builderForActiveTextEditor();
if (!builder) { return; }
builder.buildFunction();
},
provideBuildService() {
const self = this;
return {
register(registration) {
if (!registration) { return; }
if (!self.builders) {
self.builders = {};
}
self.builders[registration.name] = registration;
},
};
},
builderForActiveTextEditor() {
const grammar = this.getActiveGrammar();
if (!grammar) { return null; }
const builder = _.find(this.builders, isMappedToGrammer(grammar));
return builder;
},
getActiveGrammar() {
const editor = this.getActiveTextEditor();
if (editor) {
return editor.getGrammar().scopeName;
}
return null;
},
getActiveTextEditor() {
return atom.workspace.getActiveTextEditor();
},
};
| "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(); },
});
},
deactivate() {
this.commands.dispose();
},
provideBuildService() {
const self = this;
return {
register(registration) {
if (!registration) { return; }
self.builders = self.builders || {};
self.builders[registration.name] = registration;
},
};
},
build() {
const builder = this.builderForActiveTextEditor();
if (!builder) { return; }
builder.buildFunction();
},
builderForActiveTextEditor() {
const grammar = this.getActiveGrammar();
if (!grammar) { return null; }
const builder = _.find(this.builders, isMappedToGrammer(grammar));
return builder;
},
getActiveGrammar() {
const editor = this.getActiveTextEditor();
if (!editor) { return null; }
return editor.getGrammar().scopeName;
},
getActiveTextEditor() {
return atom.workspace.getActiveTextEditor();
},
};
| 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 (!registration) { return; }
- if (!self.builders) {
- self.builders = {};
- }
-
+ self.builders = self.builders || {};
self.builders[registration.name] = registration;
},
};
+ },
+
+ build() {
+ const builder = this.builderForActiveTextEditor();
+ if (!builder) { return; }
+
+ builder.buildFunction();
},
builderForActiveTextEditor() {
@@ -52,11 +49,9 @@
getActiveGrammar() {
const editor = this.getActiveTextEditor();
- if (editor) {
- return editor.getGrammar().scopeName;
- }
+ if (!editor) { return null; }
- return null;
+ return editor.getGrammar().scopeName;
},
getActiveTextEditor() { |
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-awesome', express.static('font-awesome'));
app.use('/js', express.static('js'));
/*// handle every other route with index.html, which will contain
// a script tag to your application's JavaScript file(s).
app.get('*', function (request, response){
response.sendFile(path.resolve('public', 'index.html'))
})*/
const server = app.listen(app.get('port'), function(){
console.log("App started");
}); | //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-awesome', express.static('font-awesome'));
app.use('/js', express.static('js'));
/*// handle every other route with index.html, which will contain
// a script tag to your application's JavaScript file(s).
app.get('*', function (request, response){
response.sendFile(path.resolve('public', 'index.html'))
})*/
const server = app.listen(app.get('port'), function(){
console.log("App started");
}); | 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('connection', (socket) => {
console.log(`A user with id ${socket.id} connected`);
socket.on('send a message', (message) => {
// emit to all users a meessage is sent
io.sockets.emit('message sent', {
message,
user: {id: socket.id, name: users[socket.id]}
});
});
socket.on('enter', (user) => {
users[socket.id] = user.name;
socket.emit('entered', users);
// emit to all users but current a user has entered
socket.broadcast.emit('user entered', users);
});
socket.on('disconnect', () => {
console.log(`A user with id ${socket.id} disconnected`);
delete users[socket.id];
socket.broadcast.emit('user left', users);
});
});
server.listen(3000, () => {
console.log('Listening on port 3000...');
});
| 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('connection', (socket) => {
console.log(`A user with id ${socket.id} connected`);
socket.on('send a message', (message) => {
if(!socket.id in users) {
throw 'You should first enter your name';
}
// notify all users a meessage is sent
io.sockets.emit('message sent', {
message,
user: {id: socket.id, name: users[socket.id]}
});
});
socket.on('enter', (user) => {
users[socket.id] = user.name;
socket.emit('entered', users);
// notify all users but current that a user has entered
socket.broadcast.emit('user entered', users);
});
socket.on('disconnect', () => {
console.log(`A user with id ${socket.id} disconnected`);
delete users[socket.id];
socket.broadcast.emit('user left', users);
});
});
server.listen(3000, () => {
console.log('Listening on port 3000...');
});
| 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.sockets.emit('message sent', {
message,
user: {id: socket.id, name: users[socket.id]}
@@ -26,7 +29,7 @@
users[socket.id] = user.name;
socket.emit('entered', users);
- // emit to all users but current a user has entered
+ // notify all users but current that a user has entered
socket.broadcast.emit('user entered', users);
});
|
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(__dirname, "bundle.min.js"))
.pipe(fs.createWriteStream(path.join("example-viewer-dist", "index.html"));
fs.createReadStream(path.join(__dirname, "styles.css"))
.pipe(fs.createWriteStream(path.join("example-viewer-dist", "styles.css"));
});
// Launch the server.
require("./index.js");
| 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(path.join(__dirname, "bundle.min.js"))
+ .pipe(fs.createWriteStream(path.join("example-viewer-dist", "index.html"));
+ fs.createReadStream(path.join(__dirname, "styles.css"))
+ .pipe(fs.createWriteStream(path.join("example-viewer-dist", "styles.css"));
+});
+
// Launch the server.
require("./index.js"); |
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"']
}
},
directConnect: true,
baseUrl: 'https://adam.local:5000/',
framework: 'jasmine',
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
| 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-device-for-media-stream',
'use-fake-ui-for-media-stream']
}
},
directConnect: true,
baseUrl: 'https://adam.local:5000/',
framework: 'jasmine',
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
| 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-for-media-stream',
+ 'use-fake-ui-for-media-stream']
}
},
|
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',
streamName: process.env.STREAM_NAME,
listenerAuthToken: process.env.LISTENER_AUTH_TOKEN || 'secret',
s3EmailBucket: process.env.S3_EMAILS_BUCKET || 'bucket',
s3Endpoint: process.env.S3_ENDPOINT,
s3Region: process.env.S3_REGION || 'ap-southeast-2',
};
| 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_SECRET_ACCESS_KEY || 'FAKE',
streamName: process.env.STREAM_NAME,
listenerAuthToken: process.env.LISTENER_AUTH_TOKEN || 'secret',
s3EmailBucket: process.env.S3_EMAILS_BUCKET || 'bucket',
s3Endpoint: process.env.S3_ENDPOINT,
s3Region: process.env.S3_REGION || 'ap-southeast-2',
};
| 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.level = levelMap[level] || 0;
this.isInitialised = true;
},
debug(...args) {
if (this.level < 4) return;
if (this.colour) args = map(chalk.gray, args);
console.log(...args);
},
log(...args) {
if (this.level < 3) return;
console.log(...args);
},
warn(...args) {
if (this.level < 2) return;
if (this.colour) args = map(chalk.yellow, args);
console.log(...args);
},
error(...args) {
if (this.level < 1) return;
if (this.colour) args = map(chalk.red.bold, args);
console.log(...args);
}
};
export default logger;
| 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.level = levelMap[level] || 0;
this.isInitialised = true;
},
debug(...args) {
if (this.level < 4) return;
// add prefix:
args = [ '[DEBUG]', ...args ];
if (this.colour) args = map(chalk.gray, args);
console.log(...args);
},
log(...args) {
if (this.level < 3) return;
console.log(...args);
},
warn(...args) {
if (this.level < 2) return;
if (this.colour) args = map(chalk.yellow, args);
console.log(...args);
},
error(...args) {
if (this.level < 1) return;
if (this.colour) args = map(chalk.red.bold, args);
console.log(...args);
}
};
export default logger;
| 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 arguments[0];
}
export function didLoadSpec({ specURL, specJSON }) {
return arguments[0];
}
export function didFailLoadingSpec({ specURL, error }) {
return arguments[0];
}
function loadSpec({ specURL }, { dispatch }) {
let loadURL;
const actionURL = getActionURL('specs/');
if (actionURL) {
loadURL = actionURL + specURL + '/';
}
else {
loadURL = specURL;
}
dispatch({
actionID: 'beginLoadingSpec',
payload: { specURL }
});
qwest.get(loadURL, null, {
cache: true,
dataType: 'json',
responseType: 'json'
})
.then((specJSON) => {
dispatch({
actionID: 'didLoadSpec',
payload: didLoadSpec({ specURL, specJSON })
});
})
.catch((message) => {
console.error(`Failed to load specs with URL ${specURL} ${message}`);
dispatch({
actionID: 'didFailLoadingSpec',
payload: didFailLoadingSpec({ specURL, error: message })
});
});
}
export function loadSpecIfNeeded({ specURL }, { dispatch, getConsensus }) {
if (getConsensus({
introspectionID: 'needsToLoadSpec',
payload: { specURL },
booleanOr: true
})) {
loadSpec({ specURL }, { dispatch });
}
}
export const introspection = {
needsToLoadSpec({ specURL }) {
return arguments[0];
}
}
| 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 invalidateSpec({ specURL }) {
+ return arguments[0];
+}
+
+export function beginLoadingSpec({ specURL }) {
+ return arguments[0];
+}
+
+export function didLoadSpec({ specURL, specJSON }) {
+ return arguments[0];
+}
+
+export function didFailLoadingSpec({ specURL, error }) {
+ return arguments[0];
+}
+
+function loadSpec({ specURL }, { dispatch }) {
+ let loadURL;
+
+ const actionURL = getActionURL('specs/');
+ if (actionURL) {
+ loadURL = actionURL + specURL + '/';
+ }
+ else {
+ loadURL = specURL;
+ }
+
+ dispatch({
+ actionID: 'beginLoadingSpec',
+ payload: { specURL }
+ });
+
+ qwest.get(loadURL, null, {
+ cache: true,
+ dataType: 'json',
+ responseType: 'json'
+ })
+ .then((specJSON) => {
+ dispatch({
+ actionID: 'didLoadSpec',
+ payload: didLoadSpec({ specURL, specJSON })
+ });
+ })
+ .catch((message) => {
+ console.error(`Failed to load specs with URL ${specURL} ${message}`);
+ dispatch({
+ actionID: 'didFailLoadingSpec',
+ payload: didFailLoadingSpec({ specURL, error: message })
+ });
+ });
+}
+
+export function loadSpecIfNeeded({ specURL }, { dispatch, getConsensus }) {
+ if (getConsensus({
+ introspectionID: 'needsToLoadSpec',
+ payload: { specURL },
+ booleanOr: true
+ })) {
+ loadSpec({ specURL }, { dispatch });
+ }
+}
+
+export const introspection = {
+ needsToLoadSpec({ specURL }) {
+ return arguments[0];
+ }
+} |
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 for creating the mark.
* This is an object of legal scenegraph mark properties which *must* include
* the 'marktype' property.
* @param {Array<number>} params.scenepath - Scenegraph tree coordinates for the mark.
* The path is an array of integers, each indicating the index into
* a successive chain of items arrays.
*/
export default function Mark(params) {
Transform.call(this, null, params);
}
var prototype = inherits(Mark, Transform);
prototype.transform = function(_, pulse) {
var mark = this.value;
// acquire mark on first invocation
if (!mark) {
mark = pulse.dataflow.scenegraph().mark(_.scenepath, _.markdef);
mark.source = this;
this.value = mark;
}
// initialize entering items
var Init = mark.marktype === 'group' ? GroupItem : Item;
pulse.visit(pulse.ADD, function(item) { Init.call(item, mark); });
// bind items array to scenegraph mark
return (mark.items = pulse.source, pulse);
};
| 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 for creating the mark.
* This is an object of legal scenegraph mark properties which *must* include
* the 'marktype' property.
* @param {Array<number>} params.scenepath - Scenegraph tree coordinates for the mark.
* The path is an array of integers, each indicating the index into
* a successive chain of items arrays.
*/
export default function Mark(params) {
Transform.call(this, null, params);
}
var prototype = inherits(Mark, Transform);
prototype.transform = function(_, pulse) {
var mark = this.value;
// acquire mark on first invocation
if (!mark) {
mark = pulse.dataflow.scenegraph().mark(_.scenepath, _.markdef);
mark.source = this;
this.value = mark;
mark.group.context = _.scenepath.context;
}
// initialize entering items
var Init = mark.marktype === 'group' ? GroupItem : Item;
pulse.visit(pulse.ADD, function(item) { Init.call(item, mark); });
// bind items array to scenegraph mark
return (mark.items = pulse.source, pulse);
};
| 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: ['browserify-handlebars']
})
.transform('babelify', { presets: ['es2015'] })
.bundle()
.pipe(source('app.js'))
.pipe(gulp.dest(paths.app.tmpJSDir));
});
gulp.task('scripts:vendor', function () {
return browserify({
entries: paths.app.scriptsVendor
})
.transform('babelify', { presets: ['es2015'] })
.bundle()
.pipe(source('vendor.js'))
.pipe(gulp.dest(paths.app.tmpJSDir));
});
| 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: ['browserify-handlebars']
})
.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));
});
gulp.task('scripts:vendor', function () {
return browserify({
entries: paths.app.scriptsVendor
})
.transform('babelify', { presets: ['es2015'] })
.bundle()
.on('error', function (err) {
console.log(err.toString());
this.emit('end');
})
.pipe(source('vendor.js'))
.pipe(gulp.dest(paths.app.tmpJSDir));
});
| 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', { presets: ['es2015'] })
.bundle()
+ .on('error', function (err) {
+ console.log(err.toString());
+ this.emit('end');
+ })
.pipe(source('vendor.js'))
.pipe(gulp.dest(paths.app.tmpJSDir));
}); |
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 className="dashboard-item" key={item.query}>
{item.title}{' '}
<span className="value">{formatValue(item, props.results)}</span>
</div>
))}
</div>
);
Dashboard.propTypes = {
items: PropTypes.arrayOf(
PropTypes.shape({
formatValue: PropTypes.func,
query: PropTypes.string.isRequired,
title: PropTypes.string.isRequired
})
).isRequired,
results: PropTypes.shape().isRequired
};
export default Dashboard;
| 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 className="dashboard-item" key={item.query}>
{item.title}
<span className="value">{formatValue(item, props.results)}</span>
</div>
))}
</div>
);
Dashboard.propTypes = {
items: PropTypes.arrayOf(
PropTypes.shape({
formatValue: PropTypes.func,
query: PropTypes.string.isRequired,
title: PropTypes.string.isRequired
})
).isRequired,
results: PropTypes.shape().isRequired
};
export default Dashboard;
| 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('./Hand.scss');
const margin = cards.count() * 6;
const cardList = cards.map((card, index) => (
<DraggableCard
card={card}
key={card.uniqId}
index={index}
margin={margin}
/>
));
return (
<div className={styles.Hand}>
{ cardList }
</div>
);
}
}
| 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('./Hand.scss');
const margin = cards.size * 6;
const cardList = cards.map((card, index) => (
<DraggableCard
card={card}
key={card.uniqId}
index={index}
margin={margin}
/>
));
return (
<div className={styles.Hand}>
{ cardList }
</div>
);
}
}
| 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 for each list item.
$select.find('option').filter(function(){
return $(this).text();
}).each(function(i) {
imgMap[i] = $(this).attr('data-img-src');
});
// 2. Execute chosen plugin and get the newly created chosen container.
$select.chosen(options);
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) {
$(this).css(cssObj(imgMap[i]));
});
});
// 4. Change image on chosen selected element when form changes.
$select.change(function() {
var imgSrc = $select.find('option:selected').attr('data-img-src') || '';
$chosen.find('.chosen-single span').css(cssObj(imgSrc));
});
$select.trigger('change');
// Utilties
function cssObj(imgSrc) {
var bgImg = (imgSrc) ? 'url(' + imgSrc + ')' : 'none';
return { 'background-image' : bgImg };
}
});
};
})(jQuery);
| /*
* 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 for each list item.
$select.find('option').filter(function(){
return $(this).text();
}).each(function(i) {
imgMap[i] = $(this).attr('data-img-src');
});
// 2. Execute chosen plugin and get the newly created chosen container.
$select.chosen(options);
var $chosen = $select.next('.chosen-container').addClass('chosenImage-container');
// 3. Style lis with image sources.
$chosen.on('mousedown.chosen, keyup.chosen', function(event){
$chosen.find('.chosen-results li').each(function() {
var imgIndex = $(this).attr('data-option-array-index');
$(this).css(cssObj(imgMap[imgIndex]));
});
});
// 4. Change image on chosen selected element when form changes.
$select.change(function() {
var imgSrc = $select.find('option:selected').attr('data-img-src') || '';
$chosen.find('.chosen-single span').css(cssObj(imgSrc));
});
$select.trigger('change');
// Utilties
function cssObj(imgSrc) {
var bgImg = (imgSrc) ? 'url(' + imgSrc + ')' : 'none';
return { 'background-image' : bgImg };
}
});
};
})(jQuery);
| 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-publisher,podlove/podlove-publisher,noplanman/podlove-publisher,noplanman/podlove-publisher,katrinleinweber/podlove-publisher,podlove/podlove-publisher | ---
+++
@@ -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) {
- $(this).css(cssObj(imgMap[i]));
+ $chosen.on('mousedown.chosen, keyup.chosen', function(event){
+ $chosen.find('.chosen-results li').each(function() {
+ var imgIndex = $(this).attr('data-option-array-index');
+ $(this).css(cssObj(imgMap[imgIndex]));
});
});
|
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', 2);
$scope.$watch('fontSize', function(currentFontSize) {
storage.persist('fontSize', currentFontSize);
});
$scope.$watch('numberOfColumns', function(currentNumberOfColumns) {
storage.persist('numberOfColumns', currentNumberOfColumns);
});
$scope.jobs = {};
var update = function() {
var updating;
fetch.current().then(function(current) {
$scope.jobs = current.jobs;
updating = $timeout(update, 5000)
}, function(error) {
$timeout.cancel(updating);
$rootScope.$broadcast("communication-error", error);
});
}
update();
}); | '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('numberOfColumns', 2);
$scope.$watch('fontSize', function(currentFontSize) {
storage.persist('fontSize', currentFontSize);
});
$scope.$watch('numberOfColumns', function(currentNumberOfColumns) {
storage.persist('numberOfColumns', currentNumberOfColumns);
});
$scope.jobs = {};
var update = function() {
var updating;
fetch.current().then(function(current) {
$scope.jobs = current.jobs;
updating = $timeout(update, 5000)
}, function(error) {
$timeout.cancel(updating);
$rootScope.$broadcast("communication-error", error);
});
}
update();
}); | 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/jenkins-build-monitor-plugin,jan-molak/jenkins-build-monitor-plugin,seanly/jenkins-build-monitor-plugin,jan-molak/jenkins-build-monitor-plugin,DominikGebhart/jenkins-build-monitor-plugin,Witos/jenkins-build-monitor-plugin,Witos/jenkins-build-monitor-plugin,drekbour/jenkins-build-monitor-plugin,jan-molak/jenkins-build-monitor-plugin,Le0Michine/jenkins-build-monitor-plugin,erikhakansson/jenkins-build-monitor-plugin,guoliang/jenkins-build-monitor-plugin,drekbour/jenkins-build-monitor-plugin,erikhakansson/jenkins-build-monitor-plugin,DominikGebhart/jenkins-build-monitor-plugin,DominikGebhart/jenkins-build-monitor-plugin,Le0Michine/jenkins-build-monitor-plugin | ---
+++
@@ -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 = storage.retrieve('fontSize', 1);
$scope.numberOfColumns = storage.retrieve('numberOfColumns', 2);
|
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 gettext is fixed in gnome-shell 3.1.4 or later at least.
if (window._ == undefined) {
const Shell = imports.gi.Shell;
const Gettext = imports.gettext;
window.global = Shell.Global.get();
window._ = Gettext.gettext;
window.C_ = Gettext.pgettext;
window.ngettext = Gettext.ngettext;
}
Panel.STANDARD_TRAY_ICON_ORDER.push('ibus');
Panel.STANDARD_TRAY_ICON_SHELL_IMPLEMENTATION['ibus'] = Indicator.Indicator;
}
function enable() {
if (!indicator) {
indicator = new Indicator.Indicator();
}
if (!menus) {
menus = new PopupMenu.PopupMenuManager(indicator);
}
menus.addMenu(indicator.menu);
Main.statusIconDispatcher.emit('status-icon-added', indicator.actor, 'ibus');
}
function disable() {
if (indicator) {
if (menus) {
menus.removeMenu(indicator.menu);
menus = null;
}
Main.statusIconDispatcher.emit('status-icon-removed', indicator.actor);
indicator = null;
}
}
| /* -*- 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('ibus', indicator, 0);
}
}
function disable() {
if (indicator) {
indicator.destroy();
indicator = null;
}
}
| 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() {
-}
-
-function main() {
- // The gettext is fixed in gnome-shell 3.1.4 or later at least.
- if (window._ == undefined) {
- const Shell = imports.gi.Shell;
- const Gettext = imports.gettext;
- window.global = Shell.Global.get();
- window._ = Gettext.gettext;
- window.C_ = Gettext.pgettext;
- window.ngettext = Gettext.ngettext;
- }
- Panel.STANDARD_TRAY_ICON_ORDER.push('ibus');
- Panel.STANDARD_TRAY_ICON_SHELL_IMPLEMENTATION['ibus'] = Indicator.Indicator;
}
function enable() {
if (!indicator) {
indicator = new Indicator.Indicator();
+ Main.panel.addToStatusArea('ibus', indicator, 0);
}
- if (!menus) {
- menus = new PopupMenu.PopupMenuManager(indicator);
- }
- menus.addMenu(indicator.menu);
- Main.statusIconDispatcher.emit('status-icon-added', indicator.actor, 'ibus');
}
function disable() {
if (indicator) {
- if (menus) {
- menus.removeMenu(indicator.menu);
- menus = null;
- }
- Main.statusIconDispatcher.emit('status-icon-removed', indicator.actor);
+ indicator.destroy();
indicator = null;
}
} |
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, document.getElementById('app'))
| 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.createElement(MyTitle, null)
)
)
ReactDOM.render(MyFirstComponent, document.getElementById('app'))
| 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('create', 'UA-43160335-1', 'corylucas.com');
ga('send', 'pageview');
| (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('create', 'UA-43160335-1', 'corylucas.com');
ga('send', 'pageview');
$('a').click(function(){ga('send', 'event', 'link', 'click', $(this).text()); return true}) | 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: 'timeInput',
validationEvent: 'blur',
rendered() {
// Init lolliclock
$('[data-time="pick-a-time"]').lolliclock({ autoclose: true });
},
});
| // 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',
rendered() {
// Init lolliclock
$('[data-time="pick-a-time"]').lolliclock({ autoclose: true });
},
});
| 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('bootstrap@1.0.1');
api.use('underscore');
api.use('session');
api.use('reload');
api.use(['blaze', 'templating', 'spacebars',
'ddp', 'tracker'], 'client');
api.addFiles('diff_match_patch_uncompressed.js', 'client');
api.addFiles([
'driver.css',
'driver.html',
'driver.js'
], "client");
api.use('autoupdate', 'server', {weak: true});
api.use('random', 'server');
api.addFiles('autoupdate.js', 'server');
});
| 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('bootstrap@1.0.1');
api.use('underscore');
api.use('session');
api.use('reload');
api.use(['webapp', 'blaze', 'templating', 'spacebars',
'ddp', 'tracker'], 'client');
api.addFiles('diff_match_patch_uncompressed.js', 'client');
api.addFiles([
'driver.css',
'driver.html',
'driver.js'
], "client");
api.use('autoupdate', 'server', {weak: true});
api.use('random', 'server');
api.addFiles('autoupdate.js', 'server');
});
| 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/meteor,sitexa/meteor,hristaki/meteor,AnthonyAstige/meteor,dev-bobsong/meteor,IveWong/meteor,rozzzly/meteor,kengchau/meteor,EduShareOntario/meteor,colinligertwood/meteor,lassombra/meteor,vjau/meteor,qscripter/meteor,mjmasn/meteor,namho102/meteor,dandv/meteor,kidaa/meteor,yonas/meteor-freebsd,AnthonyAstige/meteor,baiyunping333/meteor,ericterpstra/meteor,dandv/meteor,akintoey/meteor,jg3526/meteor,codedogfish/meteor,sdeveloper/meteor,DCKT/meteor,youprofit/meteor,judsonbsilva/meteor,4commerce-technologies-AG/meteor,codingang/meteor,Urigo/meteor,sclausen/meteor,sdeveloper/meteor,qscripter/meteor,ericterpstra/meteor,sdeveloper/meteor,vacjaliu/meteor,Jeremy017/meteor,steedos/meteor,Hansoft/meteor,chengxiaole/meteor,newswim/meteor,chasertech/meteor,chmac/meteor,cog-64/meteor,chasertech/meteor,fashionsun/meteor,Hansoft/meteor,framewr/meteor,fashionsun/meteor,aldeed/meteor,oceanzou123/meteor,akintoey/meteor,IveWong/meteor,johnthepink/meteor,yonas/meteor-freebsd,aramk/meteor,Hansoft/meteor,dev-bobsong/meteor,chasertech/meteor,baiyunping333/meteor,meonkeys/meteor,DAB0mB/meteor,johnthepink/meteor,dev-bobsong/meteor,rabbyalone/meteor,sclausen/meteor,judsonbsilva/meteor,yinhe007/meteor,yiliaofan/meteor,yiliaofan/meteor,newswim/meteor,lorensr/meteor,dfischer/meteor,aramk/meteor,dfischer/meteor,shadedprofit/meteor,ericterpstra/meteor,elkingtonmcb/meteor,dfischer/meteor,kidaa/meteor,papimomi/meteor,fashionsun/meteor,ericterpstra/meteor,namho102/meteor,benstoltz/meteor,udhayam/meteor,johnthepink/meteor,EduShareOntario/meteor,colinligertwood/meteor,neotim/meteor,chmac/meteor,4commerce-technologies-AG/meteor,AnthonyAstige/meteor,Urigo/meteor,kengchau/meteor,youprofit/meteor,lawrenceAIO/meteor,yyx990803/meteor,katopz/meteor,aldeed/meteor,shmiko/meteor,Jonekee/meteor,aramk/meteor,evilemon/meteor,chengxiaole/meteor,newswim/meteor,qscripter/meteor,kidaa/meteor,sclausen/meteor,AlexR1712/meteor,akintoey/meteor,johnthepink/meteor,luohuazju/meteor,udhayam/meteor,oceanzou123/meteor,DAB0mB/meteor,dfischer/meteor,Hansoft/meteor,evilemon/meteor,henrypan/meteor,justintung/meteor,ericterpstra/meteor,rozzzly/meteor,mjmasn/meteor,paul-barry-kenzan/meteor,lassombra/meteor,cherbst/meteor,neotim/meteor,udhayam/meteor,nuvipannu/meteor,luohuazju/meteor,Quicksteve/meteor,IveWong/meteor,meteor-velocity/meteor,Jonekee/meteor,deanius/meteor,namho102/meteor,Urigo/meteor,Prithvi-A/meteor,jg3526/meteor,sdeveloper/meteor,henrypan/meteor,calvintychan/meteor,Prithvi-A/meteor,Puena/meteor,sclausen/meteor,meteor-velocity/meteor,yonas/meteor-freebsd,dfischer/meteor,rabbyalone/meteor,neotim/meteor,katopz/meteor,meonkeys/meteor,sdeveloper/meteor,henrypan/meteor,DCKT/meteor,michielvanoeffelen/meteor,framewr/meteor,steedos/meteor,codedogfish/meteor,Jonekee/meteor,yyx990803/meteor,meonkeys/meteor,calvintychan/meteor,neotim/meteor,mirstan/meteor,dandv/meteor,yalexx/meteor,Paulyoufu/meteor-1,dev-bobsong/meteor,juansgaitan/meteor,cog-64/meteor,qscripter/meteor,paul-barry-kenzan/meteor,Paulyoufu/meteor-1,luohuazju/meteor,nuvipannu/meteor,4commerce-technologies-AG/meteor,iman-mafi/meteor,judsonbsilva/meteor,Urigo/meteor,framewr/meteor,h200863057/meteor,Quicksteve/meteor,namho102/meteor,shadedprofit/meteor,shrop/meteor,guazipi/meteor,AlexR1712/meteor,papimomi/meteor,kencheung/meteor,devgrok/meteor,dandv/meteor,Ken-Liu/meteor,Ken-Liu/meteor,AlexR1712/meteor,lawrenceAIO/meteor,williambr/meteor,yiliaofan/meteor,aramk/meteor,cog-64/meteor,calvintychan/meteor,baysao/meteor,h200863057/meteor,namho102/meteor,meonkeys/meteor,aramk/meteor,shadedprofit/meteor,juansgaitan/meteor,sitexa/meteor,Theviajerock/meteor,vacjaliu/meteor,paul-barry-kenzan/meteor,baysao/meteor,papimomi/meteor,katopz/meteor,h200863057/meteor,elkingtonmcb/meteor,chengxiaole/meteor,sitexa/meteor,Jeremy017/meteor,mirstan/meteor,Theviajerock/meteor,evilemon/meteor,PatrickMcGuinness/meteor,neotim/meteor,cog-64/meteor,lawrenceAIO/meteor,benstoltz/meteor,mirstan/meteor,evilemon/meteor,vacjaliu/meteor,Puena/meteor,papimomi/meteor,akintoey/meteor,Paulyoufu/meteor-1,hristaki/meteor,DCKT/meteor,lawrenceAIO/meteor,yonglehou/meteor,elkingtonmcb/meteor,youprofit/meteor,justintung/meteor,vjau/meteor,lpinto93/meteor,shmiko/meteor,mjmasn/meteor,AnthonyAstige/meteor,vjau/meteor,lorensr/meteor,meteor-velocity/meteor,emmerge/meteor,rozzzly/meteor,vjau/meteor,emmerge/meteor,codingang/meteor,shmiko/meteor,IveWong/meteor,henrypan/meteor,mirstan/meteor,oceanzou123/meteor,steedos/meteor,AnthonyAstige/meteor,dev-bobsong/meteor,dev-bobsong/meteor,EduShareOntario/meteor,deanius/meteor,juansgaitan/meteor,jg3526/meteor,chmac/meteor,deanius/meteor,steedos/meteor,chengxiaole/meteor,michielvanoeffelen/meteor,baysao/meteor,lassombra/meteor,Theviajerock/meteor,EduShareOntario/meteor,yiliaofan/meteor,yyx990803/meteor,AlexR1712/meteor,elkingtonmcb/meteor,kidaa/meteor,4commerce-technologies-AG/meteor,whip112/meteor,calvintychan/meteor,Puena/meteor,wmkcc/meteor,luohuazju/meteor,katopz/meteor,kengchau/meteor,rozzzly/meteor,Jeremy017/meteor,henrypan/meteor,iman-mafi/meteor,kengchau/meteor,PatrickMcGuinness/meteor,cog-64/meteor,guazipi/meteor,rabbyalone/meteor,vacjaliu/meteor,kencheung/meteor,hristaki/meteor,Ken-Liu/meteor,yonglehou/meteor,iman-mafi/meteor,akintoey/meteor,yinhe007/meteor,fashionsun/meteor,baiyunping333/meteor,wmkcc/meteor,AlexR1712/meteor,Hansoft/meteor,devgrok/meteor,Urigo/meteor,emmerge/meteor,Quicksteve/meteor,h200863057/meteor,udhayam/meteor,sitexa/meteor,sitexa/meteor,PatrickMcGuinness/meteor,mirstan/meteor,DCKT/meteor,yalexx/meteor,rabbyalone/meteor,henrypan/meteor,dev-bobsong/meteor,chengxiaole/meteor,dandv/meteor,framewr/meteor,baysao/meteor,steedos/meteor,guazipi/meteor,wmkcc/meteor,michielvanoeffelen/meteor,jdivy/meteor,guazipi/meteor,nuvipannu/meteor,baiyunping333/meteor,cherbst/meteor,luohuazju/meteor,michielvanoeffelen/meteor,jg3526/meteor,vacjaliu/meteor,yonglehou/meteor,lassombra/meteor,papimomi/meteor,AnthonyAstige/meteor,iman-mafi/meteor,cherbst/meteor,evilemon/meteor,luohuazju/meteor,vjau/meteor,PatrickMcGuinness/meteor,framewr/meteor,cherbst/meteor,AlexR1712/meteor,shmiko/meteor,whip112/meteor,Ken-Liu/meteor,colinligertwood/meteor,henrypan/meteor,johnthepink/meteor,aldeed/meteor,meonkeys/meteor,codingang/meteor,shadedprofit/meteor,EduShareOntario/meteor,yinhe007/meteor,benstoltz/meteor,shmiko/meteor,iman-mafi/meteor,juansgaitan/meteor,vjau/meteor,chasertech/meteor,Urigo/meteor,cherbst/meteor,rabbyalone/meteor,sclausen/meteor,colinligertwood/meteor,colinligertwood/meteor,h200863057/meteor,emmerge/meteor,meonkeys/meteor,nuvipannu/meteor,paul-barry-kenzan/meteor,Jonekee/meteor,codingang/meteor,h200863057/meteor,evilemon/meteor,yonglehou/meteor,whip112/meteor,fashionsun/meteor,yiliaofan/meteor,chengxiaole/meteor,Ken-Liu/meteor,yalexx/meteor,udhayam/meteor,sclausen/meteor,EduShareOntario/meteor,kengchau/meteor,yonas/meteor-freebsd,Theviajerock/meteor,aldeed/meteor,Jeremy017/meteor,benstoltz/meteor,4commerce-technologies-AG/meteor,katopz/meteor,baiyunping333/meteor,yonas/meteor-freebsd,Prithvi-A/meteor,codingang/meteor,johnthepink/meteor,youprofit/meteor,steedos/meteor,cog-64/meteor,Paulyoufu/meteor-1,benstoltz/meteor,kidaa/meteor,fashionsun/meteor,newswim/meteor,meteor-velocity/meteor,Urigo/meteor,rozzzly/meteor,yyx990803/meteor,dandv/meteor,IveWong/meteor,michielvanoeffelen/meteor,codingang/meteor,cherbst/meteor,williambr/meteor,PatrickMcGuinness/meteor,oceanzou123/meteor,akintoey/meteor,shrop/meteor,qscripter/meteor,guazipi/meteor,iman-mafi/meteor,lassombra/meteor,deanius/meteor,justintung/meteor,AnthonyAstige/meteor,fashionsun/meteor,lorensr/meteor,emmerge/meteor,papimomi/meteor,elkingtonmcb/meteor,dfischer/meteor,Jonekee/meteor,yinhe007/meteor,newswim/meteor,framewr/meteor,AlexR1712/meteor,DCKT/meteor,qscripter/meteor,kengchau/meteor,baysao/meteor,williambr/meteor,yiliaofan/meteor,devgrok/meteor,aldeed/meteor,colinligertwood/meteor,namho102/meteor,IveWong/meteor,Hansoft/meteor,lassombra/meteor,whip112/meteor,devgrok/meteor,yinhe007/meteor,chasertech/meteor,oceanzou123/meteor,hristaki/meteor,williambr/meteor,Puena/meteor,chmac/meteor,deanius/meteor,nuvipannu/meteor,wmkcc/meteor,jdivy/meteor,yalexx/meteor,baiyunping333/meteor,Prithvi-A/meteor,baysao/meteor,Quicksteve/meteor,mjmasn/meteor,shmiko/meteor,lorensr/meteor,katopz/meteor,cog-64/meteor,vjau/meteor,judsonbsilva/meteor,Jonekee/meteor,justintung/meteor,DAB0mB/meteor,vacjaliu/meteor,deanius/meteor,codedogfish/meteor,vacjaliu/meteor,kidaa/meteor,DCKT/meteor,guazipi/meteor,benstoltz/meteor,meteor-velocity/meteor,jg3526/meteor,jdivy/meteor,williambr/meteor,Theviajerock/meteor,papimomi/meteor,Jeremy017/meteor,neotim/meteor,lorensr/meteor,wmkcc/meteor,Prithvi-A/meteor,guazipi/meteor,baysao/meteor,yonas/meteor-freebsd,ericterpstra/meteor,lawrenceAIO/meteor,DAB0mB/meteor,shrop/meteor,mirstan/meteor,Jeremy017/meteor,paul-barry-kenzan/meteor,codingang/meteor,akintoey/meteor,elkingtonmcb/meteor,judsonbsilva/meteor,Ken-Liu/meteor,kencheung/meteor,kencheung/meteor,shadedprofit/meteor,lpinto93/meteor,yiliaofan/meteor,Prithvi-A/meteor,katopz/meteor,chasertech/meteor,sclausen/meteor,elkingtonmcb/meteor,kidaa/meteor,meonkeys/meteor,jdivy/meteor,IveWong/meteor,jdivy/meteor,yonglehou/meteor,chmac/meteor,Quicksteve/meteor,hristaki/meteor,kencheung/meteor,chasertech/meteor,youprofit/meteor,oceanzou123/meteor,mjmasn/meteor,jg3526/meteor,aldeed/meteor,4commerce-technologies-AG/meteor,mirstan/meteor,cherbst/meteor,kencheung/meteor,juansgaitan/meteor,judsonbsilva/meteor,sdeveloper/meteor,Paulyoufu/meteor-1,Theviajerock/meteor,jg3526/meteor,lpinto93/meteor,emmerge/meteor,PatrickMcGuinness/meteor,newswim/meteor,Jonekee/meteor,Puena/meteor,shrop/meteor,newswim/meteor,AnthonyAstige/meteor,lawrenceAIO/meteor,jdivy/meteor,codedogfish/meteor,johnthepink/meteor,wmkcc/meteor,aramk/meteor,sitexa/meteor,meteor-velocity/meteor,EduShareOntario/meteor,codedogfish/meteor,whip112/meteor,justintung/meteor,qscripter/meteor,neotim/meteor,Paulyoufu/meteor-1,chengxiaole/meteor,meteor-velocity/meteor,sitexa/meteor,codedogfish/meteor,yonglehou/meteor,Puena/meteor,DCKT/meteor,judsonbsilva/meteor,Puena/meteor,DAB0mB/meteor,youprofit/meteor,Prithvi-A/meteor,mjmasn/meteor,rozzzly/meteor,rozzzly/meteor,Quicksteve/meteor,evilemon/meteor,codedogfish/meteor,shrop/meteor,williambr/meteor,luohuazju/meteor,yonglehou/meteor,4commerce-technologies-AG/meteor,williambr/meteor,kencheung/meteor,hristaki/meteor,kengchau/meteor,justintung/meteor,michielvanoeffelen/meteor,yalexx/meteor,PatrickMcGuinness/meteor,framewr/meteor,deanius/meteor,Hansoft/meteor,mjmasn/meteor,Quicksteve/meteor,calvintychan/meteor,yinhe007/meteor,lorensr/meteor,DAB0mB/meteor,lawrenceAIO/meteor,yalexx/meteor,lpinto93/meteor,DAB0mB/meteor,udhayam/meteor,calvintychan/meteor,lorensr/meteor,yonas/meteor-freebsd,calvintychan/meteor,jdivy/meteor,rabbyalone/meteor,lpinto93/meteor,whip112/meteor,shrop/meteor,yinhe007/meteor,colinligertwood/meteor,shadedprofit/meteor,whip112/meteor,h200863057/meteor,rabbyalone/meteor,justintung/meteor,oceanzou123/meteor,iman-mafi/meteor,namho102/meteor,paul-barry-kenzan/meteor,michielvanoeffelen/meteor,dandv/meteor,aldeed/meteor,devgrok/meteor,shrop/meteor,yyx990803/meteor,dfischer/meteor,devgrok/meteor,chmac/meteor,shadedprofit/meteor,nuvipannu/meteor,yyx990803/meteor,nuvipannu/meteor,juansgaitan/meteor,Paulyoufu/meteor-1,wmkcc/meteor,hristaki/meteor,chmac/meteor,lpinto93/meteor,lassombra/meteor | ---
+++
@@ -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(['webapp', 'blaze', 'templating', 'spacebars',
'ddp', 'tracker'], 'client');
api.addFiles('diff_match_patch_uncompressed.js', 'client'); |
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.log('node-webkit-builder', mgs);
});
// Build retruns a promise
nw.build(function (err) {
if(err) {
gutil.log('node-webkit-builder', err);
}
callback();
gutil.beep();
});
}); | 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-webkit-builder', msg);
});
// Build returns a promise, return it so the task isn't called in parallel
return nw.build().catch(function (err) {
gutil.log('node-webkit-builder', err);
});
});
| 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,imperiumzigna/nw-builder,joshterrill/nw-builder,mcanthony/nw-builder,mllrsohn/node-webkit-builder,manviny/nw-builder,ArmorText/nw-builder,nwjs-community/nw-builder,mllrsohn/nw-builder,mcanthony/nw-builder,joshterrill/nw-builder,nwjs-community/nw-builder,achrist/node-webkit-builder,mllrsohn/node-webkit-builder,manviny/nw-builder,Crunch/nw-builder,ArmorText/nw-builder,mllrsohn/nw-builder,achrist/node-webkit-builder,GrabCAD/node-webkit-builder,achrist/node-webkit-builder | ---
+++
@@ -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) {
- gutil.log('node-webkit-builder', mgs);
+ nw.on('log', function (msg) {
+ gutil.log('node-webkit-builder', msg);
});
- // Build retruns a promise
- nw.build(function (err) {
- if(err) {
- gutil.log('node-webkit-builder', err);
- }
- callback();
- gutil.beep();
+ // Build returns a promise, return it so the task isn't called in parallel
+ return nw.build().catch(function (err) {
+ gutil.log('node-webkit-builder', err);
});
}); |
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'),
require('karma-sinon-chai'),
require('karma-mocha-clean-reporter'),
require('karma-chrome-launcher'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
browserDisconnectTimeout: 30000,
client: {
clearContext: false
},
files: [
{ pattern: 'node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css', instrument: false },
],
coverageIstanbulReporter: {
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['mocha-clean'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
| // 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'),
require('karma-sinon-chai'),
require('karma-mocha-clean-reporter'),
require('karma-chrome-launcher'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
browserDisconnectTimeout: 30000,
browserNoActivityTimeout: 30000,
client: {
clearContext: false
},
files: [
{ pattern: 'node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css', instrument: false },
],
coverageIstanbulReporter: {
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['mocha-clean'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
| 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 identifiers are crucial.
*
* @param {Settings} settings
* @param {Logger} logger
* @returns {Object}
* @api public
*/
exports = module.exports = function(settings, logger) {
var entity = new Object();
var id = settings.get('entity/id');
if (id) {
entity.id = id;
} else {
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) {
arr[i] = aliases[i];
}
aliases = arr;
}
if (aliases) {
entity.aliases = aliases;
}
logger.info('Operating as entity: ' + entity.id);
return entity;
}
/**
* Component annotations.
*/
exports['@singleton'] = true;
exports['@require'] = [ 'settings', 'logger' ];
| /**
* 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 identifiers are crucial.
*
* @param {Settings} settings
* @param {Logger} logger
* @returns {Object}
* @api public
*/
exports = module.exports = function(settings, logger) {
var entity = new Object();
var id = settings.get('entity/id');
if (id) {
entity.id = id;
} else {
entity.id = 'file://' + path.dirname(pkginfo.find(require.main));
}
entity.aliases = settings.get('entity/aliases');
logger.info('Operating as entity: ' + entity.id);
return entity;
}
/**
* Component annotations.
*/
exports['@singleton'] = true;
exports['@require'] = [ 'settings', 'logger' ];
| 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) {
- arr[i] = aliases[i];
- }
- aliases = arr;
- }
- if (aliases) {
- entity.aliases = aliases;
- }
+ entity.aliases = settings.get('entity/aliases');
logger.info('Operating as entity: ' + entity.id);
return entity; |
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.exit(0)
}
if (parameters[0] === 'go') {
UCompiler.compile(parameters[1] || null, {cwd: process.cwd()}).catch(function(e) {
console.error(e)
process.exit(1)
})
} else if (parameters[0] === 'watch') {
if (!parameters[1]) {
console.error('You must specify a path to watch')
process.exit(1)
}
UCompiler.watch(parameters[1])
}
| #!/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|watch [path]')
process.exit(0)
}
if (parameters[0] === 'go') {
UCompiler.compile(parameters[1] || null, {cwd: process.cwd()}).catch(function(e) {
console.error(e)
process.exit(1)
})
} else if (parameters[0] === 'watch') {
if (!parameters[1]) {
console.error('You must specify a path to watch')
process.exit(1)
}
UCompiler.watch(parameters[1])
}
| 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.
program.parse(process.argv);
processor.process(program);
} else { // Library mode.
module.exports.verify = utils.verify;
module.exports.isCryptInstalled = utils.isCryptInstalled;
} | #!/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.process(program);
} else { // Library mode.
utils = require('./utils');
module.exports.verify = utils.verify;
module.exports.isCryptInstalled = utils.isCryptInstalled;
} | 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 command line arguments.
+ program = require('./program');
+ processor = require('./processor');
program.parse(process.argv);
processor.process(program);
} else { // Library mode.
+ utils = require('./utils');
module.exports.verify = utils.verify;
module.exports.isCryptInstalled = utils.isCryptInstalled;
} |
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
username: 'root',
password: 'root',
profile: 'install-coreos.ipxe',
comport: 'ttyS0',
hostname: 'coreos-node',
completionUri: 'pxe-cloud-config.yml'
},
properties: {
os: {
linux: {
distribution: 'coreos'
}
}
}
};
| // 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
username: 'root',
password: 'root',
profile: 'install-coreos.ipxe',
comport: 'ttyS0',
hostname: 'coreos-node',
installDisk: '/dev/sda',
completionUri: 'pxe-cloud-config.yml'
},
properties: {
os: {
linux: {
distribution: 'coreos'
}
}
}
};
| 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 trendsetter?</h1>
<h3>
Something something a description of what the game does, what benefits
it has. Something something ...
</h3>
<LoginButtonSet></LoginButtonSet>
</div>
<div className={classes.IllustrationContainer}></div>
</div>
);
};
export default LandingPage;
| 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}>
<div className={classes.Hero}>
<h1>Who's the next trendsetter?</h1>
<h3>
Something something a description of what the game does, what benefits
it has. Something something ...
</h3>
<LoginButtonSet></LoginButtonSet>
</div>
<div className={classes.IllustrationContainer}>
<img src={Illustration} className={classes.Logo} />
</div>
</div>
);
};
export default LandingPage;
| 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 @@
</h3>
<LoginButtonSet></LoginButtonSet>
</div>
- <div className={classes.IllustrationContainer}></div>
+ <div className={classes.IllustrationContainer}>
+ <img src={Illustration} className={classes.Logo} />
+ </div>
</div>
);
}; |
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 //
var hasUint32ArraySupport = require( '@stdlib/utils/detect-uint32array-support' );
// MAIN //
var ctor;
if ( hasUint32ArraySupport() ) {
ctor = require( './uint32array.js' );
} else {
ctor = require( './polyfill.js' );
}
// EXPORTS //
module.exports = ctor;
| '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 //
var hasUint32ArraySupport = require( '@stdlib/utils/detect-uint32array-support' );
var builtin = require( './uint32array.js' );
var polyfill = require( './polyfill.js' );
// MAIN //
var ctor;
if ( hasUint32ArraySupport() ) {
ctor = builtin;
} else {
ctor = polyfill;
}
// EXPORTS //
module.exports = ctor;
| 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' );
+ ctor = builtin;
} else {
- ctor = require( './polyfill.js' );
+ ctor = polyfill;
}
|
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 enter your own API key by creating a new file in the root repo called `.env.local` with the contents: `WCL_API_KEY=INSERT_YOUR_API_KEY_HERE`. After saving this file, you need to restart `npm start`.';
alert(message);
throw new Error(message);
}
queryParams.api_key = WCL_API_KEY;
return makeUrl(`${API_BASE}${base}`, queryParams);
}
| 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 function makeWclUrl(base, queryParams = {}) {
if (!WCL_API_KEY && process.env.NODE_ENV !== 'production') {
const message = 'Invalid API key. You need to enter your own API key by creating a new file in the root repo called `.env.local` with the contents: `WCL_API_KEY=INSERT_YOUR_API_KEY_HERE`. After saving this file, you need to restart `npm start`.';
alert(message);
throw new Error(message);
}
queryParams.api_key = WCL_API_KEY;
return makeUrl(`${API_BASE}${base}`, queryParams);
}
| 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,anom0ly/WoWAnalyzer,FaideWW/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,Juko8/WoWAnalyzer,enragednuke/WoWAnalyzer,enragednuke/WoWAnalyzer,FaideWW/WoWAnalyzer,enragednuke/WoWAnalyzer,sMteX/WoWAnalyzer,ronaldpereira/WoWAnalyzer,ronaldpereira/WoWAnalyzer,fyruna/WoWAnalyzer,mwwscott0/WoWAnalyzer,yajinni/WoWAnalyzer,yajinni/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer | ---
+++
@@ -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 function makeWclUrl(base, queryParams = {}) {
if (!WCL_API_KEY && process.env.NODE_ENV !== 'production') {
const message = 'Invalid API key. You need to enter your own API key by creating a new file in the root repo called `.env.local` with the contents: `WCL_API_KEY=INSERT_YOUR_API_KEY_HERE`. After saving this file, you need to restart `npm start`.'; |
dfd213c775a43a4b1f933afb36aaaebb908e0eb5 | src/index.js | src/index.js | /*
* Author: Alexandre Havrileck (Oxyno-zeta)
* Date: 03/07/16
* Licence: See Readme
*/
/* ************************************* */
/* ******** REQUIRE ******** */
/* ************************************* */
const server = require('./server');
/* ************************************* */
/* ******** RUN ******** */
/* ************************************* */
// Prepare server
server.prepare().then(() => (
// Listen server
server.listenSync()
));
| /*
* Author: Alexandre Havrileck (Oxyno-zeta)
* Date: 03/07/16
* Licence: See Readme
*/
/* ************************************* */
/* ******** REQUIRE ******** */
/* ************************************* */
const server = require('./server');
/* ************************************* */
/* ******** RUN ******** */
/* ************************************* */
// Prepare server
server.prepare().then(() => (
// Listen server
server.listenSync()
)).catch(() => process.exit(1));
| 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, {
color: '#FFA813',
fill: false,
opacity: 1
}).addTo(this);
},
removeBoundaries: function (data, options) {
this.boundariesLayer.clearLayers();
this.fire('boundarieschange');
},
updateBoundaries: function (data, options) {
this.boundariesLayer.clearLayers();
this.boundariesLayer.addData(data);
this.fire('boundarieschange');
if (options.zoomToBounds) {
this.fitBounds(this.boundariesLayer.getBounds());
}
}
});
L.Map.addInitHook('_initBoundaries');
| //
// 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: '#FFA813',
fill: false,
opacity: 1
}).addTo(this);
},
removeBoundaries: function (data, options) {
this.boundariesLayer.clearLayers();
this.fire('boundarieschange');
},
updateBoundaries: function (data, options) {
this.boundariesLayer.clearLayers();
this.boundariesLayer.addData(data);
this.fire('boundarieschange');
if (options.zoomToBounds) {
this.fitBounds(this.boundariesLayer.getBounds());
}
}
};
module.exports = {
initialize: function (mapClass) {
mapClass = mapClass || L.Map;
mapClass.include(mixin);
mapClass.addInitHook('_initBoundaries');
},
mixin: mixin
};
| 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 (mapClass) {
+ mapClass = mapClass || L.Map;
+ mapClass.include(mixin);
+ mapClass.addInitHook('_initBoundaries');
+ },
+
+ mixin: mixin
+}; |
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 === 'CallExpression';
});
if (parent && parent.get('callee').matchesPattern('React.createClass')) {
if (this.dangerouslyRemove) {
this.dangerouslyRemove();
} else {
this.remove();
}
}
}
}
});
};
| 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';
});
if (parent && parent.get('callee').matchesPattern('React.createClass')) {
this.dangerouslyRemove();
}
}
}
};
return new Plugin('react-remove-prop-types', {
visitor,
metadata: {
group: 'builtin-pre'
}
});
};
| 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,16 @@
});
if (parent && parent.get('callee').matchesPattern('React.createClass')) {
- if (this.dangerouslyRemove) {
- this.dangerouslyRemove();
- } else {
- this.remove();
- }
+ this.dangerouslyRemove();
}
}
}
+ };
+
+ return new Plugin('react-remove-prop-types', {
+ visitor,
+ metadata: {
+ group: 'builtin-pre'
+ }
});
}; |
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
*/
module.exports = function (content) {
let output = '';
const cb = this.async();
const parts = parse(content);
const options = defaultsDeep(loaderUtils.getOptions(this), defaultOptions);
const resource = loaderUtils.getRemainingRequest(this);
forEach(parts, (part, tag) => {
forEach(part, (code, type) => {
if (options.map.hasOwnProperty(type)) {
output += getRequire(this, options, tag, type, resource);
}
});
});
cb(null, output);
}
/**
* Return full require() statement for given resource and type
* @param {object} context
* @param {object} options
* @param {string} tag
* @param {string} type
* @param {string} resource
* @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`;
}
| 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
*/
module.exports = function (content) {
let output = '';
const cb = this.async();
const parts = parse(content);
const options = defaultsDeep(loaderUtils.getOptions(this), defaultOptions);
const resource = loaderUtils.getRemainingRequest(this);
forEach(parts, (part, tag) => {
forEach(part, (code, type) => {
if (options.map.hasOwnProperty(type)) {
output += getRequire(this, options, tag, type, resource);
}
});
});
cb(null, output);
}
/**
* Return full require() statement for given resource and type
* @param {object} context
* @param {object} options
* @param {string} tag
* @param {string} type
* @param {string} resource
* @returns {string}
*/
function getRequire(context, options, tag, type, resource) {
const url = loaderUtils.stringifyRequest(context, '!' + options.map[type] + require.resolve('./select-loader.js') + '?tag=' + tag + '&type=' + type + '!' + resource)
const prefix = tag === 'script' ? 'module.exports = ' : '';
return `${prefix}require(${url});\r\n`;
}
| 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`;
+ const url = loaderUtils.stringifyRequest(context, '!' + options.map[type] + require.resolve('./select-loader.js') + '?tag=' + tag + '&type=' + type + '!' + resource)
+ const prefix = tag === 'script' ? 'module.exports = ' : '';
+ return `${prefix}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;
break;
default:
bValue = false;
}
}
return bValue;
};
| 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;
break;
default:
bValue = false;
}
}
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 = {
event: event,
context: context,
result: status,
responseData: responseData
};
console.log(JSON.stringify(msg, null, ' '));
}
};
};
| 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 = {
+ event: event,
+ context: context,
+ result: status,
+ responseData: responseData
+ };
+ console.log(JSON.stringify(msg, null, ' '));
+ }
+ };
+}; |
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 = require('../config/images');
var sprite = require('../config/sprite');
gulp.task('watch', function () {
watch(styles.base, () => { gulp.start(['styles']); });
watch(images.source, () => { gulp.start(['images']); });
watch(sprite.source, () => { gulp.start(['sprite']); });
watch(scripts.source, () => { gulp.start(['scripts']); });
watch(templates.source, () => { gulp.start(['templates:watch']); });
});
gulp.task('cw', (cb) => { gulpSequence('build', ['browserSync'], 'watch', cb); });
| '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 = require('../config/images');
var sprite = require('../config/sprite');
gulp.task('watch', function () {
watch(styles.base, () => { gulp.start(['styles']); });
watch(images.source, () => { gulp.start(['images']); });
watch(sprite.source, () => { gulp.start(['sprite']); });
watch(scripts.source, () => { gulp.start(['scripts']); });
watch(templates.source, () => { gulp.start(['templates:watch']); });
});
gulp.task('start', (cb) => { gulpSequence('build', ['browserSync'], 'watch', cb); });
| 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), count: chance.integer(30), last: (chance.integerRange(1, 45) + ' sec ago ') };
glimpse.emit('data.request.session.update', item);
setTimeout(publishSession, chance.integerRange(250, 3000));
}
generateNames();
publishSession();
| 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), count: chance.integerRange(1, 30), last: (chance.integerRange(1, 45) + ' sec ago ') };
glimpse.emit('data.request.session.update', item);
setTimeout(publishSession, chance.integerRange(250, 3000));
}
generateNames();
publishSession();
| 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 ') };
glimpse.emit('data.request.session.update', item);
|
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: {authUser.email}</h1>
<PasswordChangeForm />
</div>
)}
</AuthUserContext.Consumer>
);
const condition = authUser => !!authUser;
export default compose(
withEmailVerification,
withAuthorization(condition),
)(AccountPage);
| 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 = () => (
<AuthUserContext.Consumer>
{authUser => (
<div>
<h1>Account: {authUser.email}</h1>
<PasswordChangeForm />
<button type="button"><Link to={ROUTES.DASHBOARD}>Back to dashboard</Link></button>
</div>
)}
</AuthUserContext.Consumer>
);
const condition = authUser => !!authUser;
export default compose(
withEmailVerification,
withAuthorization(condition),
)(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 '../constants/routes';
const AccountPage = () => (
<AuthUserContext.Consumer>
@@ -14,6 +16,7 @@
<div>
<h1>Account: {authUser.email}</h1>
<PasswordChangeForm />
+ <button type="button"><Link to={ROUTES.DASHBOARD}>Back to dashboard</Link></button>
</div>
)}
</AuthUserContext.Consumer> |
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.glyphicon').on('click', function(e) {
$(this).toggleClass('glyphicon-chevron-down glyphicon-chevron-up');
$(this).parent().parent().find('table tbody').toggle();
});
$('.datepicker').datepicker({});
});
})( jQuery );
| /*
* 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.glyphicon').on('click', function(e) {
$(this).toggleClass('glyphicon-chevron-down glyphicon-chevron-up');
$(this).parent().parent().find('table tbody').toggle();
});
$('.datepicker').datepicker({
format: 'yyyy-mm-dd'
});
});
})( jQuery );
| 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/Sylius,pfwd/Sylius,Strontium-90/Sylius,SyliusBot/Sylius,jvahldick/Sylius,Strontium-90/Sylius,StoreFactory/Sylius,fredcollet/Sylius,PWalkow/Sylius,Joypricecorp/Sylius,Sylius/Sylius,psyray/Sylius,1XWP/Sylius,PyRowMan/Sylius,StoreFactory/Sylius,Ejobs/Sylius,Symfomany/Sylius,pamil/Sylius,liukaijv/Sylius,TheMadeleine/Sylius,NeverResponse/Sylius,inssein/Sylius,tonicospinelli/Sylius,polisys/Sylius,tuka217/Sylius,gruberro/Sylius,kayue/Sylius,mhujer/Sylius,pjedrzejewski/Sylius,puterakahfi/Sylius,kongqingfu/Sylius,martijngastkemper/Sylius,regnisolbap/Sylius,ekyna/Sylius,ekyna/Sylius,gmoigneu/platformsh-integrations,lchrusciel/Sylius,TeamNovatek/Sylius,pjedrzejewski/Sylius,psren/Sylius,ekyna/Sylius,Shine-neko/Sylius,ReissClothing/Sylius,martijngastkemper/Sylius,PWalkow/Sylius,bigfoot90/Sylius,Niiko/Sylius,peteward/Sylius,jverdeyen-forks/Sylius,Joypricecorp/Sylius,bitbager/Sylius,Niiko/Sylius,NeverResponse/Sylius,jjanvier/Sylius,mhujer/Sylius,TristanPerchec/Sylius,jverdeyen/Sylius,sjonkeesse/Sylius,gseidel/Sylius,puterakahfi/Sylius,CoderMaggie/Sylius,jblanchon/Sylius,gruberro/Sylius,ylastapis/Sylius,CoderMaggie/Sylius,loic425/Sylius,itinance/Sylius,Ejobs/Sylius,artkonekt/Sylius,juramy/Sylius,fredcollet/Sylius,michalmarcinkowski/Sylius,Rvanlaak/Sylius,Niiko/Sylius,gorkalaucirica/Sylius,mheki/Sylius,StoreFactory/Sylius,foopang/Sylius,danut007ro/Sylius,vukanac/Sylius,polisys/Sylius,Limelyte/Sylius,dragosprotung/Sylius,sweoggy/Sylius,vihuvac/Sylius,itinance/Sylius,davalb/Sylius,gorkalaucirica/Sylius,pfwd/Sylius,Arminek/Sylius,Limelyte/Sylius,TheMadeleine/Sylius,theanh/Sylius,Pitoune/Sylius,liukaijv/Sylius,NeverResponse/Sylius,psren/Sylius,mgonyan/Sylius,vukanac/Sylius,101medialab/Sylius,xrowkristina/sylius,SyliusBot/Sylius,TristanPerchec/Sylius,pentarim/Sylius,PyRowMan/Sylius,Zales0123/Sylius,joshuataylor/Sylius,TeamNovatek/Sylius,Limelyte/Sylius,Symfomany/Sylius,rpg600/Sylius,coudenysj/Sylius,xantrix/Sylius,Lowlo/Sylius,polisys/Sylius,adamelso/Sylius,mkilmanas/Sylius,jjanvier/Sylius,xrowgmbh/Sylius,sweoggy/Sylius,tuka217/Sylius,1XWP/Sylius,tonicospinelli/Sylius,TristanPerchec/Sylius,vukanac/Sylius,jverdeyen/Sylius,Ejobs/Sylius,michalmarcinkowski/Sylius,jverdeyen/Sylius,psren/Sylius,mheki/Sylius,gabiudrescu/Sylius,PyRowMan/Sylius,bitbager/Sylius,ravaj-group/Sylius,101medialab/Sylius,starspire/eventmanager,ezecosystem/Sylius,bigfoot90/Sylius,ReissClothing/Sylius,mkilmanas/Sylius,TeamNovatek/Sylius,Onnit/Sylius,foopang/Sylius,Symfomany/Sylius,Lakion/Sylius,Ma27/Sylius,gRoussac/Sylius,Strontium-90/Sylius,rpg600/Sylius,cngroupdk/Sylius,axelvnk/Sylius,michalmarcinkowski/Sylius,ezecosystem/Sylius,pentarim/Sylius,videni/Sylius,Amunak/Sylius,pamil/Sylius,cngroupdk/Sylius,jverdeyen-forks/Sylius,nicolasricci/Sylius,pfwd/Sylius,Rvanlaak/Sylius,xrowgmbh/Sylius,okwinza/Sylius,tuka217/Sylius,axelvnk/Sylius,psyray/Sylius,itinance/Sylius,tonicospinelli/Sylius,1XWP/Sylius,cdaguerre/Sylius,MichaelKubovic/Sylius,ravaj-group/Sylius,mgonyan/Sylius,cdaguerre/Sylius,pjedrzejewski/Sylius,ezecosystem/Sylius,Rvanlaak/Sylius,vukanac/Sylius,bigfoot90/Sylius,regnisolbap/Sylius,dragosprotung/Sylius,artkonekt/Sylius,jjanvier/Sylius,tuka217/Sylius,Lakion/Sylius,winzou/Sylius,martijngastkemper/Sylius,Shine-neko/Sylius,bigfoot90/Sylius,Lakion/Sylius,jblanchon/Sylius,mgonyan/Sylius,gruberro/Sylius,Sylius/Sylius,ktzouno/Sylius,jjanvier/Sylius,Joypricecorp/Sylius,liukaijv/Sylius,Limelyte/Sylius,bretto36/Sylius,antonioperic/Sylius,diimpp/Sylius,sjonkeesse/Sylius,Niiko/Sylius,davalb/Sylius,nicolasricci/Sylius,starspire/eventmanager,StoreFactory/Sylius,DorianCMore/Sylius,coudenysj/Sylius,artkonekt/Sylius,mgonyan/Sylius,Amunak/Sylius,jjanvier/Sylius,cdaguerre/Sylius,mbabker/Sylius,gRoussac/Sylius,okwinza/Sylius,ylastapis/Sylius,vukanac/Sylius,sweoggy/Sylius,Ma27/Sylius,Lowlo/Sylius,MichaelKubovic/Sylius,Brille24/Sylius,kayue/Sylius,foobarflies/Sylius,foobarflies/Sylius,Sylius/Sylius,gabiudrescu/Sylius,Shine-neko/Sylius,mkilmanas/Sylius,steffenbrem/Sylius,MichaelKubovic/Sylius,peteward/Sylius,gmoigneu/platformsh-integrations,kongqingfu/Sylius,1XWP/Sylius,Lowlo/Sylius,1XWP/Sylius,pamil/Sylius,liukaijv/Sylius,xrowgmbh/Sylius,gseidel/Sylius,Strontium-90/Sylius,starspire/eventmanager,101medialab/Sylius,Mozan/Sylius,pentarim/Sylius,theanh/Sylius,Brille24/Sylius,cdaguerre/Sylius,diimpp/Sylius,foobarflies/Sylius,Mozan/Sylius,rpg600/Sylius,pentarim/Sylius,torinaki/Sylius,Shine-neko/Sylius,StoreFactory/Sylius,martijngastkemper/Sylius,TeamNovatek/Sylius,ekyna/Sylius,joshuataylor/Sylius,CoderMaggie/Sylius,Onnit/Sylius,loic425/Sylius,Lakion/Sylius,xantrix/Sylius,Brille24/Sylius,xrowkristina/sylius,patrick-mcdougle/Sylius,Mozan/Sylius,pfwd/Sylius,psyray/Sylius,sweoggy/Sylius,adamelso/Sylius,patrick-mcdougle/Sylius,DorianCMore/Sylius,Rvanlaak/Sylius,regnisolbap/Sylius,mhujer/Sylius,gRoussac/Sylius,Amunak/Sylius,dragosprotung/Sylius,jvahldick/Sylius,pfwd/Sylius,Zales0123/Sylius,coudenysj/Sylius,wwojcik/Sylius,psren/Sylius,kongqingfu/Sylius,ktzouno/Sylius,aRn0D/Sylius,nicolasricci/Sylius,coudenysj/Sylius,okwinza/Sylius,venyii/Sylius,Pitoune/Sylius,bitbager/Sylius,adamelso/Sylius,adamelso/Sylius,inssein/Sylius,torinaki/Sylius,patrick-mcdougle/Sylius,cdaguerre/Sylius,DorianCMore/Sylius,TheMadeleine/Sylius,Limelyte/Sylius,sjonkeesse/Sylius,theanh/Sylius,Ma27/Sylius,ReissClothing/Sylius,jblanchon/Sylius,danut007ro/Sylius,joshuataylor/Sylius,nakashu/Sylius,Mozan/Sylius,juramy/Sylius,steffenbrem/Sylius,mgonyan/Sylius,peteward/Sylius,theanh/Sylius,ktzouno/Sylius,lchrusciel/Sylius,polisys/Sylius,gRoussac/Sylius,aRn0D/Sylius,foopang/Sylius,jvahldick/Sylius,xrowgmbh/Sylius,itinance/Sylius,NeverResponse/Sylius,danut007ro/Sylius,michalmarcinkowski/Sylius,gabiudrescu/Sylius,wwojcik/Sylius,wwojcik/Sylius,artkonekt/Sylius,loic425/Sylius,gRoussac/Sylius,cngroupdk/Sylius,Mozan/Sylius,juramy/Sylius,steffenbrem/Sylius,inssein/Sylius,GSadee/Sylius,mbabker/Sylius,dragosprotung/Sylius,Pitoune/Sylius,regnisolbap/Sylius,kongqingfu/Sylius,peteward/Sylius,Amunak/Sylius,Strontium-90/Sylius,Symfomany/Sylius,starspire/eventmanager,bitbager/Sylius,antonioperic/Sylius,Lakion/Sylius,polisys/Sylius,fredcollet/Sylius,Rvanlaak/Sylius,joshuataylor/Sylius,videni/Sylius,TristanPerchec/Sylius,ravaj-group/Sylius,mbabker/Sylius,venyii/Sylius,ylastapis/Sylius,sjonkeesse/Sylius,TheMadeleine/Sylius,antonioperic/Sylius,jverdeyen-forks/Sylius,Arminek/Sylius,pjedrzejewski/Sylius,puterakahfi/Sylius,xrowkristina/sylius,rpg600/Sylius,TeamNovatek/Sylius,liukaijv/Sylius,winzou/Sylius,joshuataylor/Sylius,patrick-mcdougle/Sylius,ktzouno/Sylius,Shine-neko/Sylius,Onnit/Sylius,Ejobs/Sylius,GSadee/Sylius,DorianCMore/Sylius,Ejobs/Sylius,Ma27/Sylius,axelvnk/Sylius,fredcollet/Sylius,gseidel/Sylius,Joypricecorp/Sylius,starspire/eventmanager,wwojcik/Sylius,tonicospinelli/Sylius,winzou/Sylius,jverdeyen/Sylius,rpg600/Sylius,bretto36/Sylius,adamelso/Sylius,axelvnk/Sylius,davalb/Sylius,vihuvac/Sylius,Amunak/Sylius,Symfomany/Sylius,jblanchon/Sylius,mhujer/Sylius,danut007ro/Sylius,steffenbrem/Sylius,jblanchon/Sylius,artkonekt/Sylius,tonicospinelli/Sylius,lchrusciel/Sylius,mkilmanas/Sylius,theanh/Sylius,gmoigneu/platformsh-integrations,GSadee/Sylius,Zales0123/Sylius,mheki/Sylius,mbabker/Sylius,nakashu/Sylius,gorkalaucirica/Sylius,inssein/Sylius,Pitoune/Sylius,davalb/Sylius,coudenysj/Sylius,CoderMaggie/Sylius,Onnit/Sylius,axelvnk/Sylius,nakashu/Sylius,patrick-mcdougle/Sylius,davalb/Sylius,jverdeyen/Sylius,foopang/Sylius,gseidel/Sylius,bretto36/Sylius,jvahldick/Sylius,mheki/Sylius,foopang/Sylius,juramy/Sylius,steffenbrem/Sylius,ReissClothing/Sylius,aRn0D/Sylius,gabiudrescu/Sylius,nakashu/Sylius,MichaelKubovic/Sylius,cngroupdk/Sylius,jverdeyen-forks/Sylius,nicolasricci/Sylius,PWalkow/Sylius,fredcollet/Sylius,mhujer/Sylius,venyii/Sylius,vihuvac/Sylius,tuka217/Sylius,videni/Sylius,venyii/Sylius,PWalkow/Sylius,puterakahfi/Sylius,winzou/Sylius,ravaj-group/Sylius,xantrix/Sylius,ReissClothing/Sylius,Onnit/Sylius,torinaki/Sylius,gorkalaucirica/Sylius,foobarflies/Sylius,wwojcik/Sylius,xantrix/Sylius,xrowkristina/sylius,winzou/Sylius,kongqingfu/Sylius,ezecosystem/Sylius,juramy/Sylius,diimpp/Sylius,ekyna/Sylius,puterakahfi/Sylius,sjonkeesse/Sylius,cngroupdk/Sylius,ylastapis/Sylius,psyray/Sylius,aRn0D/Sylius,okwinza/Sylius,PWalkow/Sylius,SyliusBot/Sylius,ravaj-group/Sylius,gmoigneu/platformsh-integrations,videni/Sylius,bretto36/Sylius,vihuvac/Sylius,martijngastkemper/Sylius | ---
+++
@@ -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'
+ });
});
})( jQuery ); |
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('__pip__')) {
await document.exitPictureInPicture();
video.removeAttribute('__pip__');
} else {
await video.requestPictureInPicture();
video.setAttribute('__pip__', true);
}
})();
`;
chrome.tabs.executeScript({ code });
});
}
| 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('__pip__')) {
await document.exitPictureInPicture();
video.removeAttribute('__pip__');
} else {
await video.requestPictureInPicture();
video.setAttribute('__pip__', true);
video.addEventListener('emptied', event => {
video.removeAttribute('__pip__');
});
}
})();
`;
chrome.tabs.executeScript({ code });
});
}
| 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.props.onItemSelected(item);
}
logoutUser() {
this.props.menuActions.close();
logout();
}
render() {
return (
<ScrollView style={styles.menu}>
<Text onPress={_ => this.onItemSelected('champagnes')} style={styles.item}>CHAMPAGNE</Text>
<Text onPress={_ => this.onItemSelected('orders')} style={styles.item}>ORDERS</Text>
<Text onPress={_ => this.logoutUser()} style={styles.item}>LOGOUT</Text>
</ScrollView>
);
}
}
Menu.propTypes = {
menuActions: React.PropTypes.object,
onItemSelected: React.PropTypes.func.isRequired
};
export default Menu;
| 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) {
this.props.menuActions.close();
this.props.onItemSelected(item);
}
logoutUser() {
this.props.menuActions.close();
logout();
}
render() {
const {isLoggedIn} = this.props;
return (
<ScrollView style={styles.menu}>
<Text onPress={_ => this.onItemSelected('home')} style={styles.item}>
{msg('menu.home')}
</Text>
<Text onPress={_ => this.onItemSelected('todos')} style={styles.item}>
{msg('menu.todos')}
</Text>
<Text onPress={_ => this.onItemSelected('examples')} style={styles.item}>
{msg('menu.examples')}
</Text>
{isLoggedIn && (
<View>
<Text onPress={_ => this.onItemSelected('me')} style={styles.item}>
{msg('menu.me')}
</Text>
<Text onPress={_ => this.logoutUser()} style={styles.item}>
{msg('menu.logout')}
</Text>
</View>
)}
{!isLoggedIn && (
<Text onPress={_ => this.onItemSelected('login')} style={styles.item}>
{msg('menu.login')}
</Text>
)}
</ScrollView>
);
}
}
Menu.propTypes = {
isLoggedIn: React.PropTypes.object.isRequired,
menuActions: React.PropTypes.object,
onItemSelected: React.PropTypes.func.isRequired
};
export default Menu;
| 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/davidsinclair,este/este,XeeD/test,XeeD/test,XeeD/este,GarrettSmith/schizophrenia,XeeD/este,blueberryapps/este,christophediprima/este,este/este,abelaska/este,nezaidu/este,christophediprima/este,este/este,neozhangthe1/framedrop-web,christophediprima/este,TheoMer/Gyms-Of-The-World,abelaska/este,abelaska/este,puzzfuzz/othello-redux,zanj2006/este,neozhangthe1/framedrop-web,este/este,vacuumlabs/este,syroegkin/mikora.eu,langpavel/este,skyuplam/debt_mgmt,estaub/my-este,glaserp/Maturita-Project,amrsekilly/updatedEste,sikhote/davidsinclair,Brainfock/este,AlesJiranek/este,ViliamKopecky/este,puzzfuzz/othello-redux,robinpokorny/este,nason/este,syroegkin/mikora.eu,aindre/este-example,robinpokorny/este,skallet/este,AugustinLF/este,neozhangthe1/framedrop-web,neozhangthe1/framedrop-web,amrsekilly/updatedEste,TheoMer/Gyms-Of-The-World,skallet/este,neozhangthe1/framedrop-web,steida/este,christophediprima/este,AlesJiranek/este,vacuumlabs/este,TheoMer/Gyms-Of-The-World,amrsekilly/updatedEste,TheoMer/este,sikhote/davidsinclair,glaserp/Maturita-Project,aindre/este-example,cjk/smart-home-app | ---
+++
@@ -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,37 @@
}
render() {
+ const {isLoggedIn} = this.props;
+
return (
<ScrollView style={styles.menu}>
- <Text onPress={_ => this.onItemSelected('champagnes')} style={styles.item}>CHAMPAGNE</Text>
- <Text onPress={_ => this.onItemSelected('orders')} style={styles.item}>ORDERS</Text>
- <Text onPress={_ => this.logoutUser()} style={styles.item}>LOGOUT</Text>
+ <Text onPress={_ => this.onItemSelected('home')} style={styles.item}>
+ {msg('menu.home')}
+ </Text>
+ <Text onPress={_ => this.onItemSelected('todos')} style={styles.item}>
+ {msg('menu.todos')}
+ </Text>
+ <Text onPress={_ => this.onItemSelected('examples')} style={styles.item}>
+ {msg('menu.examples')}
+ </Text>
+
+ {isLoggedIn && (
+ <View>
+ <Text onPress={_ => this.onItemSelected('me')} style={styles.item}>
+ {msg('menu.me')}
+ </Text>
+ <Text onPress={_ => this.logoutUser()} style={styles.item}>
+ {msg('menu.logout')}
+ </Text>
+ </View>
+ )}
+
+ {!isLoggedIn && (
+ <Text onPress={_ => this.onItemSelected('login')} style={styles.item}>
+ {msg('menu.login')}
+ </Text>
+ )}
+
</ScrollView>
);
}
@@ -33,6 +61,7 @@
}
Menu.propTypes = {
+ isLoggedIn: React.PropTypes.object.isRequired,
menuActions: React.PropTypes.object,
onItemSelected: React.PropTypes.func.isRequired
}; |
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._dockerContainer = dockerContainer
this._client = socket()
this._logStream = this._client.substream(1)
}
/**
* Fetch a running containers stdout stream and pipe to process.stdout
*/
fetchAndPipeToStdout () {
this._client.on('data', (data) => {
if (!data.args) { return }
process.stdout.write(this._convertHexToASCII(data.args))
})
this._client.write({
id: 1,
event: 'log-stream',
data: {
substreamId: this._dockerContainer,
dockHost: this._dockerHost,
containerId: this._dockerContainer
}
})
}
/**
* Converts string of bytes represented in hexadecimal format to ASCII
* @param {String} hexString
* @return String
*/
_convertHexToASCII (hexString) {
hexString = hexString.toString()
var str = ''
for (var i = 0, len = hexString.length; i < len; i += 2) {
str += String.fromCharCode(parseInt(hexString.substr(i, 2), 16))
}
return str
}
}
module.exports = ContainerLogs
| /**
* @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._dockerContainer = dockerContainer
this._client = socket()
this._logStream = this._client.substream(1)
}
/**
* Fetch a running containers stdout stream and pipe to process.stdout
*/
fetchAndPipeToStdout () {
this._client.on('data', (data) => {
if (!data.args) { return }
if (parseInt(data.args.substr(0, 2), 16) < 31) { return }
console.log(this._convertHexToASCII(data.args).replace(/\n$/, ''))
})
this._client.write({
id: 1,
event: 'log-stream',
data: {
substreamId: this._dockerContainer,
dockHost: this._dockerHost,
containerId: this._dockerContainer
}
})
}
/**
* Converts string of bytes represented in hexadecimal format to ASCII
* @param {String} hexString
* @return String
*/
_convertHexToASCII (hexString) {
hexString = hexString.toString()
var str = ''
for (var i = 0, len = hexString.length; i < len; i += 2) {
str += String.fromCharCode(parseInt(hexString.substr(i, 2), 16))
}
return str
}
}
module.exports = ContainerLogs
| 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).replace(/\n$/, ''))
})
this._client.write({
id: 1, |
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.onreadystatechange = function () {
if (xmlHttp.readyState === 4 && xmlHttp.status === 200)
callback(xmlHttp.responseText);
};
xmlHttp.open("GET", theUrl, true); // true for asynchronous
xmlHttp.send("ivan");
} | 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.onreadystatechange = function () {
if (xmlHttp.readyState === 4 && xmlHttp.status === 200)
callback(xmlHttp.responseText);
};
xmlHttp.open("GET", theUrl, true); // true for asynchronous
xmlHttp.setRequestHeader("Access-Control-Allow-Origin", '*');
xmlHttp.send("ivan");
} | 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[env]
var p = function (url) {
return domainRoot + url
}
module.exports = {
serviceProviders: p('/v2/service-providers/'),
allServiceProviders: p('/v1/all-service-providers/'),
serviceCategories: p('/v2/service-categories/'),
organisation: p('/v2/service-providers/show/'),
needs: p('/v1/service-provider-needs/'),
createVolunteerEnquiry: p('/v1/volunteer-enquiries/'),
createOfferOfItems: p('/v1/offers-of-items/'),
joinStreetSupportApplications: p('/v1/join-street-support-applications/'),
offerSponsorship: p('/v1/sponsorship-offers/'),
servicesByCategory: p('/v2/service-categories/'),
newlyRegisteredProviders: p('/v1/newly-registered-providers'),
cities: p('/v1/cities/')
}
| 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[env]
var p = function (url) {
return domainRoot + url
}
module.exports = {
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-service-providers/show/'),
organisation: p('/v2/service-providers/show/'),
needs: p('/v1/service-provider-needs/'),
createVolunteerEnquiry: p('/v1/volunteer-enquiries/'),
createOfferOfItems: p('/v1/offers-of-items/'),
joinStreetSupportApplications: p('/v1/join-street-support-applications/'),
offerSponsorship: p('/v1/sponsorship-offers/'),
servicesByCategory: p('/v2/service-categories/'),
newlyRegisteredProviders: p('/v1/newly-registered-providers'),
cities: p('/v1/cities/')
}
| 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-service-providers/show/'),
organisation: p('/v2/service-providers/show/'),
needs: p('/v1/service-provider-needs/'),
createVolunteerEnquiry: p('/v1/volunteer-enquiries/'), |
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, 1000);
view.tick();
})();
});
})(jQuery, Fleeting);
| (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 Fleeting.CharactersView({
el : $("body"),
strategy : function(){
this.hidden(true);
},
evaporateTime : evaporate
});
(function loop(){
window.setTimeout(loop, 1000);
view.tick();
})();
});
})(jQuery, Fleeting);
| 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]) {
+ evaporate = parseInt(search[index + 1]) || evaporate;
+ }
+
+ console.log(evaporate);
+
+ var view = new Fleeting.CharactersView({
+ el : $("body"),
strategy : function(){
this.hidden(true);
},
- evaporateTime : 5000
+ evaporateTime : evaporate
});
-
+
(function loop(){
window.setTimeout(loop, 1000);
view.tick(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.