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 |
|---|---|---|---|---|---|---|---|---|---|---|
813cb6ded01ba962935588bad4793febfcb74154 | app/scripts/services/facebook_api.js | app/scripts/services/facebook_api.js | 'use strict';
angular.module('angularjsRundownApp')
.factory('facebookApi', ['$q', 'facebookAppId', function($q, facebookAppId) {
// Public API here
return {
favoriteMovie: function(movie) {
var defer = $q.defer();
FB.api(
'me/kinetoscope:favorite',
'post',
{
movie: "http://kinetoscope.herokuapp.com/#/movie/" + movie.id,
},
function(response) {
defer.resolve(response);
}
);
return defer.promise;
}
};
}]);
| 'use strict';
angular.module('angularjsRundownApp')
.factory('facebookApi', ['$q', 'facebookAppId', function($q, facebookAppId) {
// Public API here
return {
favoriteMovie: function(movie) {
var defer = $q.defer();
FB.api(
'me/kinetoscope:favorite',
'post',
{
movie: "http://kinetoscope.herokuapp.com/#!/movie/" + movie.id,
},
function(response) {
defer.resolve(response);
}
);
return defer.promise;
}
};
}]);
| Change the URL of Facebook Like | Change the URL of Facebook Like
| JavaScript | mit | wlepinski/kinetoscope,wlepinski/kinetoscope | ---
+++
@@ -11,7 +11,7 @@
'me/kinetoscope:favorite',
'post',
{
- movie: "http://kinetoscope.herokuapp.com/#/movie/" + movie.id,
+ movie: "http://kinetoscope.herokuapp.com/#!/movie/" + movie.id,
},
function(response) {
defer.resolve(response); |
f3ef2a4bd4f53306b973c5fc8d7da4c6507aa8af | ghostjs-examples/test/navigation_test.js | ghostjs-examples/test/navigation_test.js | import ghost from 'ghostjs'
import assert from 'assert'
import localServer from './fixtures/server.js'
describe('Navigation', () => {
localServer()
it('navigates', async () => {
await ghost.open('http://localhost:8888/basic_content.html')
assert.equal(await ghost.pageTitle(), 'Basic Content')
await ghost.open('http://localhost:8888/form.html')
assert.equal(await ghost.pageTitle(), 'Form')
ghost.goBack()
await ghost.waitFor(async () => {
return await ghost.pageTitle() === 'Basic Content'
})
ghost.goForward()
await ghost.waitFor(async () => {
return await ghost.pageTitle() === 'Form'
})
})
})
| import ghost from 'ghostjs'
import assert from 'assert'
import localServer from './fixtures/server.js'
describe('Navigation', () => {
localServer()
it('navigates after ghost.open() call', async () => {
await ghost.open('http://localhost:8888/basic_content.html')
assert.equal(await ghost.pageTitle(), 'Basic Content')
await ghost.open('http://localhost:8888/form.html')
assert.equal(await ghost.pageTitle(), 'Form')
ghost.goBack()
await ghost.waitFor(async () => {
return await ghost.pageTitle() === 'Basic Content'
})
ghost.goForward()
await ghost.waitFor(async () => {
return await ghost.pageTitle() === 'Form'
})
})
it('able to go back after clicking a link', async () => {
await ghost.open('http://localhost:8888/basic_content.html')
var formLink = await ghost.findElement('#formLink')
await formLink.click()
await ghost.waitFor(async () => {
return await ghost.pageTitle() === 'Form'
})
ghost.goBack()
await ghost.waitFor(async () => {
return await ghost.pageTitle() === 'Basic Content'
})
})
})
| Add navigation test after clicking. | Add navigation test after clicking.
| JavaScript | mit | KevinGrandon/ghostjs,KevinGrandon/ghostjs | ---
+++
@@ -7,7 +7,7 @@
localServer()
- it('navigates', async () => {
+ it('navigates after ghost.open() call', async () => {
await ghost.open('http://localhost:8888/basic_content.html')
assert.equal(await ghost.pageTitle(), 'Basic Content')
@@ -25,4 +25,17 @@
})
})
+ it('able to go back after clicking a link', async () => {
+ await ghost.open('http://localhost:8888/basic_content.html')
+ var formLink = await ghost.findElement('#formLink')
+ await formLink.click()
+ await ghost.waitFor(async () => {
+ return await ghost.pageTitle() === 'Form'
+ })
+
+ ghost.goBack()
+ await ghost.waitFor(async () => {
+ return await ghost.pageTitle() === 'Basic Content'
+ })
+ })
}) |
4b9ab7d113fd714efe1821e69ae403cfecb96816 | src/options_ui/options-display-table.js | src/options_ui/options-display-table.js | import m from 'mithril';
export const OptionsDisplayTableHeader = () => ({
view() {
return m('thead', [
m('tr', [
m('th', 'Name'),
m('th', 'Pattern'),
m('th', 'Selector'),
m('th', 'Enabled'),
]),
]);
},
});
export class OptionsDisplayTableBody {
constructor(vnode) {
this.options = vnode.attrs.options;
}
view() {
return m(
'tbody',
this.options.map(option => {
return m(OptionsDisplayTableRow, { option, key: option.name });
})
);
}
}
export class OptionsDisplayTableRow {
constructor(vnode) {
this.option = vnode.attrs.option;
}
view() {
const { name, pattern, enabled, selector } = this.option;
return m('tr', [
m('td', name),
m('td', m('pre', pattern.toString())),
m('td', selector),
m('td', enabled),
]);
}
}
export class OptionsDisplayTable {
view(vnode) {
const { options } = vnode.attrs;
return m('table.table.table-bordered', [
m(OptionsDisplayTableHeader),
m(OptionsDisplayTableBody, { options }),
]);
}
}
| import m from 'mithril';
export const OptionsDisplayTableHeader = () => ({
view() {
return m('thead', [
m('tr', [
m('th', 'Name'),
m('th', 'Pattern'),
m('th', 'Selector'),
m('th', 'Enabled'),
]),
]);
},
});
export class OptionsDisplayTableBody {
view(vnode) {
return m(
'tbody',
vnode.attrs.options.map(option => {
return m(OptionsDisplayTableRow, {
option,
key: option.name,
onEnabledChange: () => {
option.enabled = !option.enabled;
},
});
})
);
}
}
export class OptionsDisplayTableRow {
view(vnode) {
const {
option: { name, pattern, enabled, selector },
onEnabledChange,
} = vnode.attrs;
return m('tr', [
m('td', name),
m('td', m('pre', pattern.toString())),
m('td', selector),
m(
'td',
m('label.form-check-label', [
m('input.form-check-input', {
type: 'checkbox',
checked: enabled,
onchange: onEnabledChange,
}),
'Enabled',
])
),
]);
}
}
export class OptionsDisplayTable {
view(vnode) {
const { options } = vnode.attrs;
return m('table.table.table-bordered', [
m(OptionsDisplayTableHeader),
m(OptionsDisplayTableBody, { options }),
]);
}
}
| Implement enabling/disabling an option in OptionsDisplayTableRow | Implement enabling/disabling an option in OptionsDisplayTableRow
| JavaScript | mit | solkaz/source-copy,solkaz/source-copy | ---
+++
@@ -14,33 +14,44 @@
});
export class OptionsDisplayTableBody {
- constructor(vnode) {
- this.options = vnode.attrs.options;
- }
-
- view() {
+ view(vnode) {
return m(
'tbody',
- this.options.map(option => {
- return m(OptionsDisplayTableRow, { option, key: option.name });
+ vnode.attrs.options.map(option => {
+ return m(OptionsDisplayTableRow, {
+ option,
+ key: option.name,
+ onEnabledChange: () => {
+ option.enabled = !option.enabled;
+ },
+ });
})
);
}
}
export class OptionsDisplayTableRow {
- constructor(vnode) {
- this.option = vnode.attrs.option;
- }
-
- view() {
- const { name, pattern, enabled, selector } = this.option;
+ view(vnode) {
+ const {
+ option: { name, pattern, enabled, selector },
+ onEnabledChange,
+ } = vnode.attrs;
return m('tr', [
m('td', name),
m('td', m('pre', pattern.toString())),
m('td', selector),
- m('td', enabled),
+ m(
+ 'td',
+ m('label.form-check-label', [
+ m('input.form-check-input', {
+ type: 'checkbox',
+ checked: enabled,
+ onchange: onEnabledChange,
+ }),
+ 'Enabled',
+ ])
+ ),
]);
}
} |
44a011e00c2884e192d6e0f72ca05aa215d4a3a2 | js/Home/containers/MyProfileContainer.js | js/Home/containers/MyProfileContainer.js | import gql from 'graphql-tag';
import { graphql } from 'react-apollo';
import Profile from '../components/Profile';
const ownProfileQuery = gql`
{
viewer {
me {
id
username
firstName
lastName
email
profilePhoto
appCount
isLegacy
apps(limit: 15, offset: 0) {
id
fullName
iconUrl
packageName
description
lastPublishedTime
}
likes(limit: 15, offset: 0) {
id
}
}
}
}
`
export default graphql(ownProfileQuery, {
props: (props) => {
let { data } = props;
let user;
if (data.viewer && data.viewer.me) {
user = data.viewer.me;
}
return {
...props,
data: {
...data,
user,
},
};
},
options: {
forceFetch: true,
},
})(Profile);
| import gql from 'graphql-tag';
import { graphql } from 'react-apollo';
import Profile from '../components/Profile';
const ownProfileQuery = gql`
{
viewer {
me {
id
username
firstName
lastName
email
profilePhoto
appCount
isLegacy
apps(limit: 15, offset: 0) {
id
fullName
iconUrl
packageName
description
lastPublishedTime
}
likes(limit: 15, offset: 0) {
id
}
}
}
}
`
export default graphql(ownProfileQuery, {
props: (props) => {
let { data } = props;
let user;
if (data.viewer && data.viewer.me) {
user = data.viewer.me;
}
return {
...props,
data: {
...data,
user,
},
};
},
options: {
returnPartialData: true,
forceFetch: true,
},
})(Profile);
| Fix data being blown away on profile screen when fetching projects | Fix data being blown away on profile screen when fetching projects
fbshipit-source-id: 1aeab38
| JavaScript | bsd-3-clause | exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent | ---
+++
@@ -48,6 +48,7 @@
};
},
options: {
+ returnPartialData: true,
forceFetch: true,
},
})(Profile); |
c19901ca8b5cc613eb66183d26f50b617275d326 | aura-components/src/main/components/auradocs/search/searchController.js | aura-components/src/main/components/auradocs/search/searchController.js | /*
* Copyright (C) 2012 salesforce.com, inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
handleSearch : function(cmp,event){
var searchTerm = event.getParam('searchTerm') || event.getSource().getElement().value;
if (searchTerm.length > 0) {
var results_location = "#help?topic=searchResults&searchTerm=" + escape(searchTerm);
window.location = results_location;
}
}
} | /*
* Copyright (C) 2012 salesforce.com, inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
handleSearch : function(cmp,event){
var searchTerm = event.getParam('searchTerm') || (event.getSource() && event.getSource().getElement().value);
if (searchTerm.length > 0) {
var results_location = "#help?topic=searchResults&searchTerm=" + escape(searchTerm);
window.location = results_location;
}
}
} | Fix for possible deref of cleaned up source component | Fix for possible deref of cleaned up source component
@rev dwidjaja@ | JavaScript | apache-2.0 | lcnbala/aura,madmax983/aura,forcedotcom/aura,lhong375/aura,TribeMedia/aura,forcedotcom/aura,lcnbala/aura,lhong375/aura,TribeMedia/aura,forcedotcom/aura,DebalinaDey/AuraDevelopDeb,badlogicmanpreet/aura,navyliu/aura,navyliu/aura,igor-sfdc/aura,madmax983/aura,lcnbala/aura,madmax983/aura,badlogicmanpreet/aura,DebalinaDey/AuraDevelopDeb,forcedotcom/aura,TribeMedia/aura,SalesforceSFDC/aura,badlogicmanpreet/aura,igor-sfdc/aura,igor-sfdc/aura,madmax983/aura,SalesforceSFDC/aura,DebalinaDey/AuraDevelopDeb,navyliu/aura,badlogicmanpreet/aura,DebalinaDey/AuraDevelopDeb,badlogicmanpreet/aura,madmax983/aura,SalesforceSFDC/aura,TribeMedia/aura,madmax983/aura,igor-sfdc/aura,badlogicmanpreet/aura,navyliu/aura,TribeMedia/aura,navyliu/aura,DebalinaDey/AuraDevelopDeb,lcnbala/aura,igor-sfdc/aura,SalesforceSFDC/aura,lhong375/aura,TribeMedia/aura,SalesforceSFDC/aura,SalesforceSFDC/aura,lcnbala/aura,navyliu/aura,forcedotcom/aura,lcnbala/aura,DebalinaDey/AuraDevelopDeb,lhong375/aura | ---
+++
@@ -16,8 +16,7 @@
{
handleSearch : function(cmp,event){
- var searchTerm = event.getParam('searchTerm') || event.getSource().getElement().value;
-
+ var searchTerm = event.getParam('searchTerm') || (event.getSource() && event.getSource().getElement().value);
if (searchTerm.length > 0) {
var results_location = "#help?topic=searchResults&searchTerm=" + escape(searchTerm);
window.location = results_location; |
f45deeef6b6162a086dc40269dfca3e1e8157e50 | server/APIv1/likes/likesController.js | server/APIv1/likes/likesController.js | import { postgresConnection as cn } from '../../config/helpers.js';
const pgp = require('pg-promise')();
const db = pgp(cn);
| import { postgresConnection as cn } from '../../config/helpers.js';
const pgp = require('pg-promise')();
const db = pgp(cn);
module.exports = {
getAllLikedRecipes: (request, response, next) => {
const newQueryObj = {
name: 'get-my-favorite-recipes',
text: `SELECT
*
FROM
recipes r INNER JOIN likes_recipes_users lru
ON
lru.recipe_id = r.id INNER JOIN users u
ON
lru.user_id = u.id
WHERE
u.id = $1;`,
values: [
request.params.user,
],
}
db.query(newQueryObj)
.then((data) => {
response.status(200);
response.json(data);
next();
})
.catch((error) => {
console.log(error);
next();
});
}
};
| Add getAllLikedRecipes method, to get all liked recipes for a single user | Add getAllLikedRecipes method, to get all liked recipes for a single user
| JavaScript | mit | rompingstalactite/rompingstalactite,rompingstalactite/rompingstalactite,forkful/forkful,forkful/forkful,forkful/forkful,rompingstalactite/rompingstalactite | ---
+++
@@ -1,3 +1,38 @@
import { postgresConnection as cn } from '../../config/helpers.js';
const pgp = require('pg-promise')();
const db = pgp(cn);
+
+
+module.exports = {
+
+
+ getAllLikedRecipes: (request, response, next) => {
+ const newQueryObj = {
+ name: 'get-my-favorite-recipes',
+ text: `SELECT
+ *
+ FROM
+ recipes r INNER JOIN likes_recipes_users lru
+ ON
+ lru.recipe_id = r.id INNER JOIN users u
+ ON
+ lru.user_id = u.id
+ WHERE
+ u.id = $1;`,
+ values: [
+ request.params.user,
+ ],
+ }
+
+ db.query(newQueryObj)
+ .then((data) => {
+ response.status(200);
+ response.json(data);
+ next();
+ })
+ .catch((error) => {
+ console.log(error);
+ next();
+ });
+ }
+}; |
c40a768c17d54f4ebb71d6e9aafb0bff086bffde | C-FAR/db.js | C-FAR/db.js | var Sequelize = require('sequelize');
var sequelize = new Sequelize('c-far', 'root', '123456@', {
host: '192.168.99.100',
dialect: 'mysql',
pool: {
max: 5,
min: 0,
idle: 10000
},
});
module.exports = sequelize; | var Sequelize = require('sequelize');
var sequelize = new Sequelize('c-far', 'root', '123456@', {
host: '192.168.99.100',
dialect: 'mysql',
port: 3306,
pool: {
max: 5,
min: 0,
idle: 10000
},
});
module.exports = sequelize; | Add database port in the config file. | Add database port in the config file.
| JavaScript | mit | tom19960222/C-FAR-Website,tom19960222/C-FAR-Website,tom19960222/C-FAR-Website,tom19960222/C-FAR-Website | ---
+++
@@ -2,7 +2,7 @@
var sequelize = new Sequelize('c-far', 'root', '123456@', {
host: '192.168.99.100',
dialect: 'mysql',
-
+ port: 3306,
pool: {
max: 5,
min: 0, |
d8ec3bb5d5863f2b8b37223f39af42355135fedf | config.test.js | config.test.js | 'use strict';
var fs = require('fs');
var crypto = require('crypto');
module.exports = {
root: '',
db: {
host: 'localhost',
db: 'gandhi'
},
pool: {
max: 1,
min: 1,
timeout: 30000
},
redis: {
host: process.env.REDIS_PORT_6379_TCP_ADDR || '127.0.0.1',
port: process.env.REDIS_PORT_6379_TCP_PORT || 6379
},
lock: {
retry: 50,
timeout: 30000
},
auth: {
secret: 'rubber bunny'
},
mail: {
transport: null,
defaults: {
from: 'test@test.gandhi.io'
}
},
modules: fs.readdirSync(__dirname + '/lib/modules').map(function(dir){
return __dirname + '/lib/modules/' + dir;
}),
files: {
directory: __dirname + '/uploads'
},
port: 3000,
log: false
};
| 'use strict';
var fs = require('fs');
var crypto = require('crypto');
module.exports = {
root: '',
db: {
host: process.env.RETHINKDB_PORT_29015_TCP_ADDR,
port: process.env.RETHINKDB_PORT_28015_TCP_PORT,
db: 'gandhi'
},
pool: {
max: 1,
min: 1,
timeout: 30000
},
redis: {
host: process.env.REDIS_PORT_6379_TCP_ADDR || '127.0.0.1',
port: process.env.REDIS_PORT_6379_TCP_PORT || 6379
},
lock: {
retry: 50,
timeout: 30000
},
auth: {
secret: 'rubber bunny'
},
mail: {
transport: null,
defaults: {
from: 'test@test.gandhi.io'
}
},
modules: fs.readdirSync(__dirname + '/lib/modules').map(function(dir){
return __dirname + '/lib/modules/' + dir;
}),
files: {
directory: __dirname + '/uploads'
},
port: 3000,
log: false
};
| Use docker connect env vars | Use docker connect env vars
| JavaScript | agpl-3.0 | mike-marcacci/gandhi,mike-marcacci/gandhi,mike-marcacci/gandhi | ---
+++
@@ -6,7 +6,8 @@
module.exports = {
root: '',
db: {
- host: 'localhost',
+ host: process.env.RETHINKDB_PORT_29015_TCP_ADDR,
+ port: process.env.RETHINKDB_PORT_28015_TCP_PORT,
db: 'gandhi'
},
pool: { |
c42aaec157d14e9f0173575d4fbac272c0917b5f | Brocfile.js | Brocfile.js | /* jshint node: true */
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
var app = new EmberAddon();
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
app.import('bower_components/bootstrap/dist/css/bootstrap.css');
app.import('bower_components/bootstrap/dist/css/bootstrap.css.map', {
destDir: 'assets'
});
app.import('bower_components/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js');
module.exports = app.toTree();
| /* jshint node: true */
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
var app = new EmberAddon();
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
app.import(app.bowerDirectory + '/bootstrap/dist/css/bootstrap.css');
app.import(app.bowerDirectory + '/bootstrap/dist/css/bootstrap.css.map', {
destDir: 'assets'
});
app.import(app.bowerDirectory + '/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js');
module.exports = app.toTree();
| Use `app.bowerDirectory` instead of hardcoded `bower_components` | Use `app.bowerDirectory` instead of hardcoded `bower_components`
| JavaScript | mit | aravindranath/ember-cli-datepicker,topaxi/ember-bootstrap-datepicker,maladon/ember-cli-bootstrap-datepicker,Hanastaroth/ember-cli-bootstrap-datepicker,jesenko/ember-cli-bootstrap-datepicker,aravindranath/ember-cli-datepicker,lazybensch/ember-cli-bootstrap-datepicker,lazybensch/ember-cli-bootstrap-datepicker,jelhan/ember-cli-bootstrap-datepicker,lazybensch/ember-cli-bootstrap-datepicker,jesenko/ember-cli-bootstrap-datepicker,aldhsu/ember-cli-bootstrap-datepicker,NichenLg/ember-cli-bootstrap-datepicker,soulim/ember-cli-bootstrap-datepicker,jesenko/ember-cli-bootstrap-datepicker,aldhsu/ember-cli-bootstrap-datepicker,aravindranath/ember-cli-datepicker,Hanastaroth/ember-cli-bootstrap-datepicker,soulim/ember-cli-bootstrap-datepicker,maladon/ember-cli-bootstrap-datepicker,Hanastaroth/ember-cli-bootstrap-datepicker,jelhan/ember-cli-bootstrap-datepicker,NichenLg/ember-cli-bootstrap-datepicker,NichenLg/ember-cli-bootstrap-datepicker,maladon/ember-cli-bootstrap-datepicker,aldhsu/ember-cli-bootstrap-datepicker,jelhan/ember-cli-bootstrap-datepicker,soulim/ember-cli-bootstrap-datepicker,topaxi/ember-bootstrap-datepicker | ---
+++
@@ -18,11 +18,11 @@
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
-app.import('bower_components/bootstrap/dist/css/bootstrap.css');
-app.import('bower_components/bootstrap/dist/css/bootstrap.css.map', {
+app.import(app.bowerDirectory + '/bootstrap/dist/css/bootstrap.css');
+app.import(app.bowerDirectory + '/bootstrap/dist/css/bootstrap.css.map', {
destDir: 'assets'
});
-app.import('bower_components/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js');
+app.import(app.bowerDirectory + '/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js');
module.exports = app.toTree(); |
003becf56e1cfc3b9737ee5c43824ebd12ffc252 | sampleConfig.js | sampleConfig.js | var global = {
domain: 'http://subdomain.yourdomain.com/',
secretUrlSuffix: 'putSomeAlphanumericSecretCharsHere'
};
var projects = [
{
repo: {
owner: 'yourbitbucketusername',
slug: 'your-bitbucket-repo-name',
sshPrivKeyPath: '/home/youruser/.ssh/id_rsa'
},
dest: {
host: 'yourstaticwebhost.com',
username: 'yourusername',
password: 'yourpassword',
path: '/home/youruser/public_html/'
}
}
];
module.exports = {
projects: projects
};
| var global = {
domain: 'http://subdomain.yourdomain.com/',
secretUrlSuffix: 'putSomeAlphanumericSecretCharsHere'
};
var projects = [
{
repo: {
owner: 'yourbitbucketusername',
slug: 'your-bitbucket-repo-name',
sshPrivKeyPath: '/home/youruser/.ssh/id_rsa'
},
dest: {
host: 'yourstaticwebhost.com',
username: 'yourusername',
password: 'yourpassword',
path: '/home/youruser/public_html/'
}
}
];
module.exports = {
global: global,
projects: projects
};
| Add global to export config | Add global to export config
| JavaScript | mit | mplewis/statichook | ---
+++
@@ -20,5 +20,6 @@
];
module.exports = {
+ global: global,
projects: projects
}; |
f7df94c004677304e33e3deae35f1478b004292b | public/js/login.js | public/js/login.js | /* eslint-env jquery */
start();
function start () {
'use strict';
$(document).ready(() => {
$('form').submit(event => {
event.preventDefault();
const username = $('#username').val();
const password = $('#password').val();
const loginObj = {
username,
password
};
console.log(loginObj);
$.post({
url: '/login',
data: JSON.stringify(loginObj),
dataType: 'JSON',
contentType: "application/json; charset=utf-8",
success: (result) => console.log(result)
});
});
});
}
| /* eslint-env jquery */
start();
function start () {
'use strict';
$(document).ready(() => {
$('form').submit(event => {
event.preventDefault();
const username = $('#username').val();
const password = $('#password').val();
const loginObj = {
username,
password
};
$.post({
url: '/login',
data: JSON.stringify(loginObj),
dataType: 'JSON',
contentType: "application/json; charset=utf-8",
success: (result) => console.log(result)
});
});
});
}
| Remove console.log that we use for debugging | Remove console.log that we use for debugging
| JavaScript | apache-2.0 | ailijic/era-floor-time,ailijic/era-floor-time | ---
+++
@@ -13,7 +13,6 @@
username,
password
};
- console.log(loginObj);
$.post({
url: '/login',
data: JSON.stringify(loginObj), |
e7f535483c0aea83523bca5d12584fad95980567 | src/networking/auth.js | src/networking/auth.js | import * as ACTION_TYPES from '../constants/action_types'
function extractToken(hash, oldToken) {
const match = hash.match(/access_token=([^&]+)/)
let token = !!match && match[1]
if (!token) {
token = oldToken
}
return token
}
export function checkAuth(dispatch, oldToken, location) {
const token = extractToken(location.hash, oldToken)
if (window.history && window.history.replaceState) {
window.history.replaceState(window.history.state, document.title, window.location.pathname)
} else {
document.location.hash = '' // this is a fallback for IE < 10
}
if (token) {
dispatch({
type: ACTION_TYPES.ACCESS_TOKEN.SAVE,
payload: token,
})
} else {
const url = 'https://' + ENV.AUTH_DOMAIN + '/api/oauth/authorize.html' +
'?response_type=token' +
'&scope=public' +
'&client_id=' + ENV.AUTH_CLIENT_ID +
'&redirect_uri=' + ENV.AUTH_REDIRECT_URI
window.location.href = url
}
}
export function resetAuth(dispatch, oldToken, location) {
if (oldToken) {
dispatch({
type: ACTION_TYPES.ACCESS_TOKEN.DELETE,
})
}
checkAuth(dispatch, null, location)
}
| import * as ACTION_TYPES from '../constants/action_types'
function extractToken(hash, oldToken) {
const match = hash.match(/access_token=([^&]+)/)
let token = !!match && match[1]
if (!token) {
token = oldToken
}
return token
}
export function checkAuth(dispatch, oldToken, location) {
const token = extractToken(location.hash, oldToken)
if (window.history && window.history.replaceState) {
window.history.replaceState(window.history.state, document.title, window.location.pathname)
} else {
document.location.hash = '' // this is a fallback for IE < 10
}
if (token) {
dispatch({
type: ACTION_TYPES.ACCESS_TOKEN.SAVE,
payload: token,
})
} else {
const url = 'https://' + ENV.AUTH_DOMAIN + '/api/oauth/authorize.html' +
'?response_type=token' +
'&scope=web_app+public' +
'&client_id=' + ENV.AUTH_CLIENT_ID +
'&redirect_uri=' + ENV.AUTH_REDIRECT_URI
window.location.href = url
}
}
export function resetAuth(dispatch, oldToken, location) {
if (oldToken) {
dispatch({
type: ACTION_TYPES.ACCESS_TOKEN.DELETE,
})
}
checkAuth(dispatch, null, location)
}
| Revert "Only ask for public privileges" | Revert "Only ask for public privileges"
This reverts commit 47b95cb58a00364fd3146c10e12ba4b93ed45f60.
| JavaScript | mit | ello/webapp,ello/webapp,ello/webapp | ---
+++
@@ -24,7 +24,7 @@
} else {
const url = 'https://' + ENV.AUTH_DOMAIN + '/api/oauth/authorize.html' +
'?response_type=token' +
- '&scope=public' +
+ '&scope=web_app+public' +
'&client_id=' + ENV.AUTH_CLIENT_ID +
'&redirect_uri=' + ENV.AUTH_REDIRECT_URI
|
f7adbbb625830a472f278d696123981b1d96317d | source/background/library/browserEvents.js | source/background/library/browserEvents.js | import log from "../../shared/library/log.js";
import { dispatch } from "../redux/index.js";
import { setAuthToken } from "../../shared/actions/dropbox.js";
const BUTTERCUP_DOMAIN_REXP = /^https:\/\/buttercup.pw\//;
const DROPBOX_ACCESS_TOKEN_REXP = /access_token=([^&]+)/;
export function attachBrowserStateListeners() {
chrome.tabs.onUpdated.addListener(handleTabUpdatedEvent);
}
function handleTabUpdatedEvent(tabID, changeInfo) {
// This event: https://developer.chrome.com/extensions/tabs#event-onUpdated
const { url } = changeInfo;
if (BUTTERCUP_DOMAIN_REXP.test(url)) {
const accessTokenMatch = url.match(DROPBOX_ACCESS_TOKEN_REXP);
if (accessTokenMatch) {
const token = accessTokenMatch[1];
log.info(`Retrieved Dropbox access token from tab: ${tabID}`);
dispatch(setAuthToken(token));
chrome.tabs.remove(tabID);
}
}
}
| import log from "../../shared/library/log.js";
import { dispatch } from "../redux/index.js";
import { setAuthToken } from "../../shared/actions/dropbox.js";
import { setUserActivity } from "../../shared/actions/app.js";
const BUTTERCUP_DOMAIN_REXP = /^https:\/\/buttercup.pw\//;
const DROPBOX_ACCESS_TOKEN_REXP = /access_token=([^&]+)/;
export function attachBrowserStateListeners() {
chrome.tabs.onUpdated.addListener(handleTabUpdatedEvent);
chrome.tabs.onRemoved.addListener(handleTabRemovedEvent);
}
function handleTabUpdatedEvent(tabID, changeInfo) {
// This event: https://developer.chrome.com/extensions/tabs#event-onUpdated
const { url } = changeInfo;
if (BUTTERCUP_DOMAIN_REXP.test(url)) {
const accessTokenMatch = url.match(DROPBOX_ACCESS_TOKEN_REXP);
if (accessTokenMatch) {
const token = accessTokenMatch[1];
log.info(`Retrieved Dropbox access token from tab: ${tabID}`);
dispatch(setAuthToken(token));
chrome.tabs.remove(tabID);
}
}
if (changeInfo.status === "loading") {
dispatch(setUserActivity());
}
}
function handleTabRemovedEvent(tabID, removeInfo) {
dispatch(setUserActivity());
}
| Set user's activity tracking on tab events | Set user's activity tracking on tab events
Update user's activity tracking on any tab opening or closing.
| JavaScript | mit | buttercup-pw/buttercup-browser-extension,buttercup-pw/buttercup-browser-extension,perry-mitchell/buttercup-chrome,perry-mitchell/buttercup-chrome | ---
+++
@@ -1,12 +1,14 @@
import log from "../../shared/library/log.js";
import { dispatch } from "../redux/index.js";
import { setAuthToken } from "../../shared/actions/dropbox.js";
+import { setUserActivity } from "../../shared/actions/app.js";
const BUTTERCUP_DOMAIN_REXP = /^https:\/\/buttercup.pw\//;
const DROPBOX_ACCESS_TOKEN_REXP = /access_token=([^&]+)/;
export function attachBrowserStateListeners() {
chrome.tabs.onUpdated.addListener(handleTabUpdatedEvent);
+ chrome.tabs.onRemoved.addListener(handleTabRemovedEvent);
}
function handleTabUpdatedEvent(tabID, changeInfo) {
@@ -21,4 +23,12 @@
chrome.tabs.remove(tabID);
}
}
+
+ if (changeInfo.status === "loading") {
+ dispatch(setUserActivity());
+ }
}
+
+function handleTabRemovedEvent(tabID, removeInfo) {
+ dispatch(setUserActivity());
+} |
a4a733f8d852eb9928686e933895a46696d567c0 | server/index.js | server/index.js | // Importing Node modules and initializing Express
const express = require('express'),
app = express(),
bodyParser = require('body-parser'),
logger = require('morgan'),
mongoose = require('mongoose'),
router = require('./router');
config = require('./config/main');
// Database connection
mongoose.connect(config.database);
// Start the server
const server = app.listen(config.port);
console.log('Battlerite Base server is running on port ' + config.port + '.');
// Setting up basic middleware for all Express requests
app.use(logger('dev')); // Log requests to API using morgan
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
// Enable CORS from client-side
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Methods", 'PUT, GET, POST, DELETE, OPTIONS');
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Control-Allow-Credentials");
res.header("Access-Control-Allow-Credentials", "true");
});
router(app);
| // Importing Node modules and initializing Express
const express = require('express'),
app = express(),
bodyParser = require('body-parser'),
logger = require('morgan'),
mongoose = require('mongoose'),
router = require('./router');
config = require('./config/main');
// Database connection
mongoose.connect(config.database);
// Start the server
const server = app.listen(config.port);
console.log('Battlerite Base server is running on port ' + config.port + '.');
// Setting up basic middleware for all Express requests
app.use(logger('dev')); // Log requests to API using morgan
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
// Enable CORS from client-side
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Methods", 'PUT, GET, POST, DELETE, OPTIONS');
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Control-Allow-Credentials");
res.header("Access-Control-Allow-Credentials", "true");
next();
});
router(app);
| Fix CORS behavior to not freeze | Fix CORS behavior to not freeze
| JavaScript | mit | davdkm/battlerite-base | ---
+++
@@ -26,6 +26,7 @@
res.header("Access-Control-Allow-Methods", 'PUT, GET, POST, DELETE, OPTIONS');
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Control-Allow-Credentials");
res.header("Access-Control-Allow-Credentials", "true");
+ next();
});
router(app); |
b61ada99d9031e418a57b1676605f7ea0818735f | lib/server/appTokenUtil.js | lib/server/appTokenUtil.js | const AppTokenUtil = {
getAppTokensBasedOnQuery: getAppTokensBasedOnQuery
};
function getAppTokensBasedOnQuery(query, desktopAppId) {
let userDisabledMap = new Map();
let userIdsSet = new Set();
let appTokens = Push.appTokens.find(query).fetch();
if (!appTokens.length) {
return [];
}
appTokens.forEach(function (appToken) {
if (appToken.userId) {
userIdsSet.add(appToken.userId);
}
});
let vet = GlobalVets.findOne({appIdentifier: appTokens[0].appName});
if (!vet && desktopAppId) {
vet = GlobalVets.findOne({_id: desktopAppId});
}
if (!vet) {
console.log(`Couldn't find vet for id ${desktopAppId} or app identifier ${appTokens[0].appName}`);
return false;
}
let users = Meteor.users.find({_id: {$in: [...userIdsSet]}}).fetch();
users.forEach(user => {
let isUserDisabled = user.accountDisabledPerVet && user.accountDisabledPerVet[vet._id];
userDisabledMap.set(user._id, isUserDisabled);
});
return appTokens.filter(appToken => {
return !(appToken.userId && userDisabledMap.get(appToken.userId));
});
}
export {AppTokenUtil};
| const AppTokenUtil = {
getAppTokensBasedOnQuery: getAppTokensBasedOnQuery
};
function getAppTokensBasedOnQuery(query, desktopAppId) {
let userDisabledMap = new Map();
let userIdsSet = new Set();
let appTokens = Push.appTokens.find(query).fetch();
if (!appTokens.length) {
return [];
}
if (desktopAppId) {
return appTokens;
}
appTokens.forEach(function (appToken) {
if (appToken.userId) {
userIdsSet.add(appToken.userId);
}
});
let vet = GlobalVets.findOne({appIdentifier: appTokens[0].appName});
if (!vet) {
return [];
}
let users = Meteor.users.find({_id: {$in: [...userIdsSet]}}).fetch();
users.forEach(user => {
let isUserDisabled = user.accountDisabledPerVet && user.accountDisabledPerVet[vet._id];
userDisabledMap.set(user._id, isUserDisabled);
});
return appTokens.filter(appToken => {
return !(appToken.userId && userDisabledMap.get(appToken.userId));
});
}
export {AppTokenUtil};
| Remove vet check for desktop notifications in AppTokenUtil. | Remove vet check for desktop notifications in AppTokenUtil.
| JavaScript | mit | okgrow/push,staceesanti/push | ---
+++
@@ -12,6 +12,10 @@
return [];
}
+ if (desktopAppId) {
+ return appTokens;
+ }
+
appTokens.forEach(function (appToken) {
if (appToken.userId) {
userIdsSet.add(appToken.userId);
@@ -20,13 +24,8 @@
let vet = GlobalVets.findOne({appIdentifier: appTokens[0].appName});
- if (!vet && desktopAppId) {
- vet = GlobalVets.findOne({_id: desktopAppId});
- }
-
if (!vet) {
- console.log(`Couldn't find vet for id ${desktopAppId} or app identifier ${appTokens[0].appName}`);
- return false;
+ return [];
}
let users = Meteor.users.find({_id: {$in: [...userIdsSet]}}).fetch(); |
fb4536068ef6050a2903e7ba8fb6c02ccff01439 | src/apps/companies/apps/advisers/router.js | src/apps/companies/apps/advisers/router.js | const router = require('express').Router()
const { allPermissionsOr403 } = require('../../../../middleware/conditionals')
const { submit, renderAdvisers, form } = require('./controllers/advisers')
router.get('/', renderAdvisers)
router.route(['/assign', 'remove'])
.all(allPermissionsOr403('company.change_regional_account_manager'))
.get(form)
.post(submit)
module.exports = router
| const router = require('express').Router()
const { allPermissionsOr403 } = require('../../../../middleware/conditionals')
const { submit, renderAdvisers, form } = require('./controllers/advisers')
router.get('/', renderAdvisers)
router.route(['/assign', '/remove'])
.all(allPermissionsOr403('company.change_regional_account_manager'))
.get(form)
.post(submit)
module.exports = router
| Replace missing '/' for path | Replace missing '/' for path
| JavaScript | mit | uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend | ---
+++
@@ -5,7 +5,7 @@
router.get('/', renderAdvisers)
-router.route(['/assign', 'remove'])
+router.route(['/assign', '/remove'])
.all(allPermissionsOr403('company.change_regional_account_manager'))
.get(form)
.post(submit) |
05fdcac6fa83207956f67bc3fa7b0ad8270543d0 | routes/domain-lookup.js | routes/domain-lookup.js | const router = require('express').Router();
router.get('/*', (req, res, next) => {
const seFree = require('se-free'),
domainName = parseDomainFromUrlPath(req.originalUrl),
domainLookup = seFree(domainName);
domainLookup.then(
(domainLookupResult) => {
res.render('domain-lookup', {
domain: domainName,
result: domainLookupResult});
}
);
});
function parseDomainFromUrlPath(urlPath) {
return urlPath.split('/')[1];
}
module.exports = router;
| const router = require('express').Router();
router.get('/*', (req, res, next) => {
const seFree = require('se-free'),
domainName = parseDomainFromUrlPath(req.originalUrl);
if(!endsWithSe(domainName)) {
res.redirect(301, '/' + domainName + '.se');
};
seFree(domainName)
.then((domainLookupResult) => {
res.render('domain-lookup', {
domain: domainName,
result: domainLookupResult});
}
);
});
function parseDomainFromUrlPath(urlPath) {
return urlPath.split('/')[1];
}
function endsWithSe(domainName) {
return (domainName.substring(domainName.length - 3) === '.se');
}
module.exports = router;
| Add .se using redirect if neccessary | Add .se using redirect if neccessary
| JavaScript | mit | kpalmvik/isfree.se,kpalmvik/isfree.se | ---
+++
@@ -2,11 +2,14 @@
router.get('/*', (req, res, next) => {
const seFree = require('se-free'),
- domainName = parseDomainFromUrlPath(req.originalUrl),
- domainLookup = seFree(domainName);
+ domainName = parseDomainFromUrlPath(req.originalUrl);
- domainLookup.then(
- (domainLookupResult) => {
+ if(!endsWithSe(domainName)) {
+ res.redirect(301, '/' + domainName + '.se');
+ };
+
+ seFree(domainName)
+ .then((domainLookupResult) => {
res.render('domain-lookup', {
domain: domainName,
result: domainLookupResult});
@@ -18,4 +21,8 @@
return urlPath.split('/')[1];
}
+function endsWithSe(domainName) {
+ return (domainName.substring(domainName.length - 3) === '.se');
+}
+
module.exports = router; |
3c9a7fa6231d10c8b7d3dff621f8a26b9f6015e4 | js/data_structures.js | js/data_structures.js | var colors = ["red", "blue", "magenta", "yellow"]
var names = ["Dan", "Dave", "Eleanor", "Rupert"]
colors.push("green")
names.push("Nathaniel") | Create initial color & horse arrays | Create initial color & horse arrays
| JavaScript | mit | elliedori/phase-0-tracks,elliedori/phase-0-tracks,elliedori/phase-0-tracks | ---
+++
@@ -0,0 +1,5 @@
+var colors = ["red", "blue", "magenta", "yellow"]
+var names = ["Dan", "Dave", "Eleanor", "Rupert"]
+
+colors.push("green")
+names.push("Nathaniel") | |
558bb084d6d09f4a212f022640142ee812e61352 | app/utils/setPrompts.js | app/utils/setPrompts.js | 'use strict';
var _ = require('lodash');
module.exports = function (answers) {
this.prompts = {};
this.prompts.projectName = answers.projectName;
this.prompts.authorName = answers.useBranding ? 'XHTMLized' : answers.authorName;
this.prompts.useBranding = answers.useBranding;
this.prompts.reloader = answers.reloader;
this.prompts.devServer = answers.devServer;
this.prompts.cssPreprocessor = answers.cssPreprocessor;
this.prompts.ignoreDist = answers.ignoreDist;
this.prompts.isWP = answers.isWP;
this.prompts.extension = answers.extension;
this.prompts.proxy = answers.proxy;
this.prompts.features = {};
for (var i in answers.features) {
this.prompts.features[answers.features[i]] = true;
}
if (this.prompts.isWP) {
this.prompts.wpFolder = 'wp';
this.prompts.wpThemeFolder = this.prompts.wpFolder + '/wp-content/themes/' + _.kebabCase(this.prompts.projectName);
}
};
| 'use strict';
var _ = require('lodash');
module.exports = function (answers) {
this.prompts = {};
this.prompts.projectName = answers.projectName;
this.prompts.authorName = answers.useBranding ? 'XHTMLized' : answers.authorName;
this.prompts.useBranding = answers.useBranding;
this.prompts.reloader = answers.reloader;
this.prompts.devServer = answers.devServer;
this.prompts.cssPreprocessor = answers.cssPreprocessor;
this.prompts.ignoreDist = answers.ignoreDist;
this.prompts.isWP = answers.isWP;
this.prompts.extension = answers.extension;
this.prompts.proxy = answers.proxy;
this.prompts.features = {};
if (Array.isArray(answers.features)) {
for (var i in answers.features) {
this.prompts.features[answers.features[i]] = true;
}
} else if (typeof answers.features === 'object') {
this.prompts.features = answers.features;
}
if (this.prompts.isWP) {
this.prompts.wpFolder = 'wp';
this.prompts.wpThemeFolder = this.prompts.wpFolder + '/wp-content/themes/' + _.kebabCase(this.prompts.projectName);
}
};
| Fix issue with wrong features format in .yo-rc file | Fix issue with wrong features format in .yo-rc file
| JavaScript | mit | xfiveco/generator-xh,xhtmlized/generator-xh,xfiveco/generator-xh,xhtmlized/generator-xh | ---
+++
@@ -16,8 +16,12 @@
this.prompts.proxy = answers.proxy;
this.prompts.features = {};
- for (var i in answers.features) {
- this.prompts.features[answers.features[i]] = true;
+ if (Array.isArray(answers.features)) {
+ for (var i in answers.features) {
+ this.prompts.features[answers.features[i]] = true;
+ }
+ } else if (typeof answers.features === 'object') {
+ this.prompts.features = answers.features;
}
if (this.prompts.isWP) { |
d1aae6ce7c12dda1fc2189411403e7a409aa81c1 | lib/controllers/acceptanceTestExecutions.js | lib/controllers/acceptanceTestExecutions.js | var mongoose = require('mongoose');
var _ = require('lodash');
var AcceptanceTestExecution = mongoose.model('AcceptanceTestExecution');
exports.list = function(req, res, next) {
AcceptanceTestExecution
.find()
.where('acceptanceTest').equals(req.acceptanceTest._id)
.select('-acceptanceTest')
.exec(function(err, acceptanceTestExecutions) {
if (err) return next(err);
res.send(acceptanceTestExecutions);
});
};
exports.create = function(req, res, next) {
req.acceptanceTest.execute(req.user, function(err, execution) {
if (err) return next(err);
res.send(_.omit(execution.toObject(), 'acceptanceTest'));
});
};
| var mongoose = require('mongoose');
var _ = require('lodash');
var AcceptanceTestExecution = mongoose.model('AcceptanceTestExecution');
exports.list = function(req, res, next) {
AcceptanceTestExecution
.find()
.where('acceptanceTest').equals(req.acceptanceTest._id)
.select('-acceptanceTest')
.exec(function(err, acceptanceTestExecutions) {
if (err) return next(err);
res.send(acceptanceTestExecutions);
});
};
exports.create = function(req, res, next) {
req.acceptanceTest.execute(function(err, execution) {
if (err) return next(err);
res.send(_.omit(execution.toObject(), 'acceptanceTest'));
});
};
| Fix ancien appel de fonction | Fix ancien appel de fonction
| JavaScript | agpl-3.0 | sgmap/mes-aides-api | ---
+++
@@ -15,7 +15,7 @@
};
exports.create = function(req, res, next) {
- req.acceptanceTest.execute(req.user, function(err, execution) {
+ req.acceptanceTest.execute(function(err, execution) {
if (err) return next(err);
res.send(_.omit(execution.toObject(), 'acceptanceTest'));
}); |
ba78bb8f7a90558a2fe67f91e3305d63dbfdc70f | config/globals.js | config/globals.js | module.exports.globals = {
proxy: process.env.PROXY_URL || 'http://localhost:4200',
proxyEnabled: process.env.PROXY_ENABLED === undefined ? false : process.env.PROXY_ENABLED === 'true',
redisHost: process.env.REDIS_HOST || 'localhost',
awsAccessKeyId: process.env.AWS_ACCESS_KEY_ID,
awsSecretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
fromEmail: process.env.FROM_EMAIL,
emailEnabled: process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY && process.env.FROM_EMAIL
};
| module.exports.globals = {
version: process.env.npm_package_version,
proxy: process.env.PROXY_URL || 'http://localhost:4200',
proxyEnabled: process.env.PROXY_ENABLED === undefined ? false : process.env.PROXY_ENABLED === 'true',
redisHost: process.env.REDIS_HOST || 'localhost',
awsAccessKeyId: process.env.AWS_ACCESS_KEY_ID,
awsSecretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
fromEmail: process.env.FROM_EMAIL,
emailEnabled: process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY && process.env.FROM_EMAIL
};
| Add NPM version as a global variable | Add NPM version as a global variable
| JavaScript | mit | TheConnMan/missd,TheConnMan/missd,TheConnMan/missd | ---
+++
@@ -1,4 +1,5 @@
module.exports.globals = {
+ version: process.env.npm_package_version,
proxy: process.env.PROXY_URL || 'http://localhost:4200',
proxyEnabled: process.env.PROXY_ENABLED === undefined ? false : process.env.PROXY_ENABLED === 'true',
|
9afe827941349417a8ef416ca2e0255020d28706 | src/DEFAULTS.js | src/DEFAULTS.js | import reactDOMRunner from './reactDOMRunner';
export const endpoint = 'https://happo.now.sh';
export const include = '**/@(*-snaps|snaps).@(js|jsx)';
export const stylesheets = [];
export const targets = {};
export const configFile = './.happo.js';
export const hooks = {
run: reactDOMRunner,
finish: (result) => {
console.log(result);
}
}
export function customizeWebpackConfig(config) {
// provide a default no-op for this config option so that we can assume it's
// always there.
return config;
}
| import reactDOMRunner from './reactDOMRunner';
export const endpoint = 'https://happo.io';
export const include = '**/@(*-happo|happo).@(js|jsx)';
export const stylesheets = [];
export const targets = {};
export const configFile = './.happo.js';
export const hooks = {
run: reactDOMRunner,
finish: (result) => {
console.log(result);
}
}
export function customizeWebpackConfig(config) {
// provide a default no-op for this config option so that we can assume it's
// always there.
return config;
}
| Change endpoint + include pattern | Change endpoint + include pattern
happo.io is now working.
I've decided to use `-happo.js*` as the file naming format instead of
-snaps.
| JavaScript | mit | enduire/happo.io,enduire/happo.io | ---
+++
@@ -1,7 +1,7 @@
import reactDOMRunner from './reactDOMRunner';
-export const endpoint = 'https://happo.now.sh';
-export const include = '**/@(*-snaps|snaps).@(js|jsx)';
+export const endpoint = 'https://happo.io';
+export const include = '**/@(*-happo|happo).@(js|jsx)';
export const stylesheets = [];
export const targets = {};
export const configFile = './.happo.js'; |
b7a96d30f240e46b1307105eaaca2b24c13eac18 | test/specrunner.js | test/specrunner.js | require.config({
baseUrl: '../src',
paths: {
// Vendor libraries
async: '../bower_components/requirejs-plugins/async',
sinon: '../bower_components/sinon/index',
jasmine: '../bower_components/jasmine/lib/jasmine-core/jasmine',
'jasmine-html': '../bower_components/jasmine/lib/jasmine-core/jasmine-html',
underscore: '../bower_components/underscore/underscore',
// Test resources
spec: '../test/spec',
mock: '../test/mock'
},
shim: {
jasmine: {
exports: 'jasmine'
},
'jasmine-html': {
deps: ['jasmine'],
exports: 'jasmine'
},
sinon: {
exports: 'sinon'
},
underscore: {
exports: '_'
}
}
});
require([
'jasmine',
'jasmine-html'
], function(jasmine) {
var jasmineEnv = jasmine.getEnv();
jasmineEnv.updateInterval = 1000;
var reporter = new jasmine.HtmlReporter();
jasmineEnv.addReporter(reporter);
jasmineEnv.specFilter = function(spec) {
return reporter.specFilter(spec);
};
require([
// Test specs go here
'spec/mock/require'
], function() {
jasmineEnv.execute();
});
});
| require.config({
baseUrl: '../src',
paths: {
// Vendor libraries
async: '../bower_components/requirejs-plugins/src/async',
sinon: '../bower_components/sinon/index',
jasmine: '../bower_components/jasmine/lib/jasmine-core/jasmine',
'jasmine-html': '../bower_components/jasmine/lib/jasmine-core/jasmine-html',
underscore: '../bower_components/underscore/underscore',
// Test resources
spec: '../test/spec',
mock: '../test/mock'
},
shim: {
jasmine: {
exports: 'jasmine'
},
'jasmine-html': {
deps: ['jasmine'],
exports: 'jasmine'
},
sinon: {
exports: 'sinon'
},
underscore: {
exports: '_'
}
}
});
require([
'jasmine',
'jasmine-html'
], function(jasmine) {
var jasmineEnv = jasmine.getEnv();
jasmineEnv.updateInterval = 1000;
var reporter = new jasmine.HtmlReporter();
jasmineEnv.addReporter(reporter);
jasmineEnv.specFilter = function(spec) {
return reporter.specFilter(spec);
};
require([
// Test specs go here
'spec/mock/require'
], function() {
jasmineEnv.execute();
});
});
| Fix async vendor lib AMD path | Fix async vendor lib AMD path
| JavaScript | bsd-3-clause | aerisweather/googlemaps-amd,aerisweather/googlemaps-amd | ---
+++
@@ -3,7 +3,7 @@
paths: {
// Vendor libraries
- async: '../bower_components/requirejs-plugins/async',
+ async: '../bower_components/requirejs-plugins/src/async',
sinon: '../bower_components/sinon/index',
jasmine: '../bower_components/jasmine/lib/jasmine-core/jasmine',
'jasmine-html': '../bower_components/jasmine/lib/jasmine-core/jasmine-html', |
ffc09edea51e1dce93f7a1910262156584602f6b | koans/AboutExpects.js | koans/AboutExpects.js | describe("About Expects", function() {
//We shall contemplate truth by testing reality, via spec expectations.
it("should expect true", function() {
expect(true).toBeTruthy(); //This should be true
});
//To understand reality, we must compare our expectations against reality.
it("should expect equality", function () {
var expectedValue = 2;
var actualValue = 1 + 1;
expect(actualValue === expectedValue).toBeTruthy();
});
//Some ways of asserting equality are better than others.
it("should assert equality a better way", function () {
var expectedValue = 2;
var actualValue = 1 + 1;
// toEqual() compares using common sense equality.
expect(actualValue).toEqual(expectedValue);
});
//Sometimes you need to be really exact about what you "type".
it("should assert equality with ===", function () {
var expectedValue = "1 + 1";
var actualValue = (1 + 1).toString();
// toBe() will always use === to compare.
expect(actualValue).toBe(expectedValue);
});
//Sometimes we will ask you to fill in the values.
it("should have filled in values", function () {
expect(1 + 1).toEqual(2);
});
});
| describe("About Expects", function() {
//We shall contemplate truth by testing reality, via spec expectations.
it("should expect true", function() {
expect(true).toBeTruthy(); //This should be true
});
//To understand reality, we must compare our expectations against reality.
it("should expect equality", function () {
var expectedValue = 2;
var actualValue = 1 + 1;
expect(actualValue === expectedValue).toBeTruthy();
});
//Some ways of asserting equality are better than others.
it("should assert equality a better way", function () {
var expectedValue = 2;
var actualValue = 1 + 1;
// toEqual() compares using common sense equality.
expect(actualValue).toEqual(expectedValue);
});
//Sometimes you need to be really exact about what you "type".
it("should assert equality with ===", function () {
var expectedValue = "2";
var actualValue = (1 + 1).toString();
// toBe() will always use === to compare.
expect(actualValue).toBe(expectedValue);
});
//Sometimes we will ask you to fill in the values.
it("should have filled in values", function () {
expect(1 + 1).toEqual(2);
});
});
| Change value in "should assert equality with ===" block | Change value in "should assert equality with ===" block
| JavaScript | mit | aevange/2013-08-javascript-koans,aevange/2013-08-javascript-koans | ---
+++
@@ -24,7 +24,7 @@
//Sometimes you need to be really exact about what you "type".
it("should assert equality with ===", function () {
- var expectedValue = "1 + 1";
+ var expectedValue = "2";
var actualValue = (1 + 1).toString();
// toBe() will always use === to compare. |
45399b5b85d25675430462aa4239d0bd4d1e6009 | atmo/static/js/forms.js | atmo/static/js/forms.js | $(function() {
// apply datetimepicker initialization
$('.datetimepicker').datetimepicker({
sideBySide: true, // show the time picker and date picker at the same time
useCurrent: false, // don't automatically set the date when opening the dialog
widgetPositioning: {vertical: 'bottom'}, // make sure the picker shows up below the control
format: 'YYYY-MM-DD h:mm',
});
});
| $(function() {
// apply datetimepicker initialization
$('.datetimepicker').datetimepicker({
sideBySide: true, // show the time picker and date picker at the same time
useCurrent: false, // don't automatically set the date when opening the dialog
format: 'YYYY-MM-DD HH:mm',
stepping: 5,
minDate: moment().startOf('day'),
toolbarPlacement: 'top',
showTodayButton: true,
showClear: true,
showClose: true
});
});
| Use 24h based datepicket and prevent dates in the past | Use 24h based datepicket and prevent dates in the past
| JavaScript | mpl-2.0 | mozilla/telemetry-analysis-service,mozilla/telemetry-analysis-service,mozilla/telemetry-analysis-service,mozilla/telemetry-analysis-service | ---
+++
@@ -3,7 +3,12 @@
$('.datetimepicker').datetimepicker({
sideBySide: true, // show the time picker and date picker at the same time
useCurrent: false, // don't automatically set the date when opening the dialog
- widgetPositioning: {vertical: 'bottom'}, // make sure the picker shows up below the control
- format: 'YYYY-MM-DD h:mm',
+ format: 'YYYY-MM-DD HH:mm',
+ stepping: 5,
+ minDate: moment().startOf('day'),
+ toolbarPlacement: 'top',
+ showTodayButton: true,
+ showClear: true,
+ showClose: true
});
}); |
93b377d3c66d96ab82b7722e5bcc409e53f1b66d | client/app/services/notes-service.js | client/app/services/notes-service.js | angular.module('notely')
.service('NotesService', NotesService);
// NotesService
// Handle CRUD operations against the server.
NotesService.$inject = ['$http'];
function NotesService($http) {
var self = this;
self.notes = [];
// Get all notes from server
self.fetch = function() {
return $http.get('http://localhost:3000/notes')
.then(
// Success callback
function(response) {
self.notes = response.data;
},
// Failure callback
function(response) {
// TODO: Handle failure
}
);
};
self.get = function() {
return self.notes;
};
self.findById = function(noteId) {
// Look through `self.notes` for a note with a matching _id.
for (var i = 0; i < self.notes.length; i++) {
if (self.notes[i]._id === noteId) {
return self.notes[i];
}
}
return {};
};
self.save = function(note) {
$http.post('http://localhost:3000/notes', {
note: note
}).then(function(response) {
self.notes.unshift(response.data.note);
});
}
}
//
| angular.module('notely')
.service('NotesService', NotesService);
// NotesService
// Handle CRUD operations against the server.
NotesService.$inject = ['$http'];
function NotesService($http) {
var self = this;
self.notes = [];
// Get all notes from server
self.fetch = function() {
return $http.get('http://localhost:3000/notes')
.then(
// Success callback
function(response) {
self.notes = response.data;
},
// Failure callback
function(response) {
// TODO: Handle failure
}
);
};
self.get = function() {
return self.notes;
};
self.findById = function(noteId) {
// Look through `self.notes` for a note with a matching _id.
for (var i = 0; i < self.notes.length; i++) {
if (self.notes[i]._id === noteId) {
return angular.copy(self.notes[i]);
}
}
return {};
};
self.save = function(note) {
$http.post('http://localhost:3000/notes', {
note: note
}).then(function(response) {
self.notes.unshift(response.data.note);
});
}
}
//
| Load a copy of a note into the form, rather than the actual object from the array. | Load a copy of a note into the form, rather than the actual object from the array.
| JavaScript | mit | FretlessJS201511/notely,FretlessJS201511/notely | ---
+++
@@ -31,7 +31,7 @@
// Look through `self.notes` for a note with a matching _id.
for (var i = 0; i < self.notes.length; i++) {
if (self.notes[i]._id === noteId) {
- return self.notes[i];
+ return angular.copy(self.notes[i]);
}
}
return {}; |
0b76375e1ebc40067e9fe1afacf5cf499d903c8a | extensions/roc-plugin-dredd/src/actions/dredd.js | extensions/roc-plugin-dredd/src/actions/dredd.js | import { initLog } from 'roc';
import Dredd from 'dredd';
const log = initLog();
export default ({ context: { config: { settings } } }) => () => {
const port = process.env.PORT || settings.runtime.port;
const dredd = new Dredd({
server: `http://localhost:${port}`,
options: settings.test.dredd,
});
log.small.info('Testing API using dredd.\n');
return () => dredd.run((err, stats) => {
if (err) {
throw err;
}
if (stats.errors) {
log.large.error('One or more errors occured while running dredd');
return;
}
if (stats.failures) {
log.large.error('One or more dredd tests failed');
return;
}
log.small.success('Dredd tests passed');
});
};
| import { initLog } from 'roc';
import Dredd from 'dredd';
const { name, version } = require('../../package.json');
const log = initLog(name, version);
export default ({ context: { config: { settings } } }) => () => {
const port = process.env.PORT || settings.runtime.port;
const dredd = new Dredd({
server: `http://localhost:${port}`,
options: settings.test.dredd,
});
log.small.info('Testing API using dredd.\n');
return () => dredd.run((err, stats) => {
if (err) {
throw err;
}
if (stats.errors) {
log.large.error('One or more errors occured while running dredd');
return;
}
if (stats.failures) {
log.large.error('One or more dredd tests failed');
return;
}
log.small.success('Dredd tests passed');
});
};
| Initialize log using `name` and `version` | Initialize log using `name` and `version`
| JavaScript | mit | voldern/roc-plugin-dredd | ---
+++
@@ -1,7 +1,9 @@
import { initLog } from 'roc';
import Dredd from 'dredd';
-const log = initLog();
+const { name, version } = require('../../package.json');
+
+const log = initLog(name, version);
export default ({ context: { config: { settings } } }) => () => {
const port = process.env.PORT || settings.runtime.port; |
70a8010b001d9a7960915468c63c38449fcf4d67 | src/main/webapp/app/controllers/lessons/modals/lessonModal.controller.js | src/main/webapp/app/controllers/lessons/modals/lessonModal.controller.js | angular
.module('app')
.controller('LessonModalController', LessonModalController);
function LessonModalController(self, $mdDialog, lesson, AuthService) {
if (lesson && lesson.startTime) {
lesson.startTime = new Date(lesson.startTime);
}
self.lesson = lesson;
self.cancel = cancel;
self.now = now;
self.isAdminLesson = isAdminLesson;
self.isTeacherLesson = isTeacherLesson;
self.isStudentLesson = isStudentLesson;
self.isPastLesson = isPastLesson;
self.canSave = canSave;
self.canEditHometask = canEditHometask;
AuthService.prepareAuthInfo().then(function () {
self.userRole = AuthService.role;
});
function isAdminLesson() {
return self.userRole === 'ADMIN';
}
function isTeacherLesson() {
return self.userRole === 'TEACHER';
}
function isStudentLesson() {
return self.userRole === 'STUDENT';
}
function isPastLesson() {
return self.lesson.startTime < now();
}
function canSave() {
return self.isAdminLesson() || (self.isTeacherLesson() && !self.isPastLesson());
}
function canEditHometask() {
return !self.isPastLesson() && (self.isTeacherLesson() || self.isAdminLesson());
}
function now() {
return +new Date();
}
function cancel() {
$mdDialog.cancel();
}
} | angular
.module('app')
.controller('LessonModalController', LessonModalController);
function LessonModalController(self, $mdDialog, lesson, AuthService) {
if (lesson && lesson.startTime) {
lesson.startTime = new Date(lesson.startTime);
}
self.lesson = lesson;
self.cancel = cancel;
self.now = now;
self.isAdminLesson = isAdminLesson;
self.isTeacherLesson = isTeacherLesson;
self.isStudentLesson = isStudentLesson;
self.isPastLesson = isPastLesson;
self.canSave = canSave;
self.canEditHometask = canEditHometask;
AuthService.prepareAuthInfo().then(function () {
self.userRole = AuthService.role;
});
function isAdminLesson() {
return self.userRole === 'ADMIN';
}
function isTeacherLesson() {
return self.userRole === 'TEACHER';
}
function isStudentLesson() {
return self.userRole === 'STUDENT';
}
function isPastLesson() {
return self.lesson.startTime < now();
}
function canSave() {
return self.isAdminLesson() || (self.isTeacherLesson() && !self.isPastLesson());
}
function canEditHometask() {
return (!self.isPastLesson() && self.isTeacherLesson()) || self.isAdminLesson();
}
function now() {
return +new Date();
}
function cancel() {
$mdDialog.cancel();
}
} | Fix hometask disabled for admin | Fix hometask disabled for admin
| JavaScript | mit | TriumGroup/ReCourse,TriumGroup/ReCourse,TriumGroup/ReCourse | ---
+++
@@ -42,7 +42,7 @@
}
function canEditHometask() {
- return !self.isPastLesson() && (self.isTeacherLesson() || self.isAdminLesson());
+ return (!self.isPastLesson() && self.isTeacherLesson()) || self.isAdminLesson();
}
function now() { |
e5dae645d220a22a70babc7ac2216b79ebb2a136 | components/stateless/screens/Home.js | components/stateless/screens/Home.js | import React from 'react';
import { StyleSheet, Text, View, TextInput, Button } from 'react-native';
import { SearchBar } from 'react-native-elements'
export let SEARCH_QUERY = ''
const Home = ({ navigation: { navigate }}) => {
console.log('Home rendered!!')
return (
<View style={{flex: 1}}>
<View style={[{flex: 3, backgroundColor: 'lightblue'}, styles.container]}>
<Text>Aurity Code Challenge</Text>
<Text>Github Search App.</Text>
</View>
<View style={{flex: 4, backgroundColor: 'grey'}} >
<View style={{flex:1}}>
<SearchBar
lightTheme
onChangeText={(text) => SEARCH_QUERY = text}
placeholder='Search Github'
/>
<Button
onPress={() => navigate('ReposList')}
title="Search"
/>
</View>
</View>
<View style={{flex:1, flexDirection: 'row'}}>
<View style={{flex: 1, backgroundColor: 'cyan'}} />
<View style={{flex: 1, backgroundColor: 'skyblue'}} />
</View>
</View>
)
}
const styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'center',
},
});
export default Home | import React from 'react';
import { StyleSheet, Text, View, TextInput, Button, StatusBar } from 'react-native';
import { SearchBar } from 'react-native-elements'
export let SEARCH_QUERY = ''
const Home = ({ navigation: { navigate }}) => {
console.log('Home rendered!!')
return (
<View style={{flex: 1}}>
<StatusBar hidden />
<View style={[{flex: 3, backgroundColor: 'lightblue'}, styles.container]}>
<Text>Aurity Code Challenge</Text>
<Text>Github Search App.</Text>
</View>
<View style={{flex: 4, backgroundColor: 'grey'}} >
<View style={{flex:1}}>
<SearchBar
lightTheme
onChangeText={(text) => SEARCH_QUERY = text}
placeholder='Search Github'
/>
<Button
onPress={() => navigate('ReposList')}
title="Search"
/>
</View>
</View>
<View style={{flex:1, flexDirection: 'row'}}>
<View style={{flex: 1, backgroundColor: 'cyan'}} />
<View style={{flex: 1, backgroundColor: 'skyblue'}} />
</View>
</View>
)
}
const styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'center',
},
});
export default Home | Hide the flippin' status bar on android | Hide the flippin' status bar on android
| JavaScript | mit | bnovf/react-native-github-graphql-app | ---
+++
@@ -1,5 +1,5 @@
import React from 'react';
-import { StyleSheet, Text, View, TextInput, Button } from 'react-native';
+import { StyleSheet, Text, View, TextInput, Button, StatusBar } from 'react-native';
import { SearchBar } from 'react-native-elements'
export let SEARCH_QUERY = ''
@@ -7,6 +7,7 @@
console.log('Home rendered!!')
return (
<View style={{flex: 1}}>
+ <StatusBar hidden />
<View style={[{flex: 3, backgroundColor: 'lightblue'}, styles.container]}>
<Text>Aurity Code Challenge</Text>
<Text>Github Search App.</Text> |
afa164de11eec71948252f1eb469a7ed9c981dac | bin/projects-resolve.js | bin/projects-resolve.js | #!/usr/bin/env node
exports.command = {
description: 'resolve a path to a project',
arguments: '<path>'
};
if (require.main !== module) {
return;
}
var path = require('path');
var storage = require('../lib/storage.js');
var utilities = require('../lib/utilities.js');
var program = utilities.programDefaults('resolve', '<path>');
program.option('-r, --relative', 'display the relative path');
program.parse(process.argv);
program.handleColor();
if (!program.args[0]) {
console.error('Please specify a path.');
process.exit(1);
}
storage.setup(function () {
var project = storage.getProjectByDirectory(program.args[0]);
if (project) {
if (program.relative) {
console.log(path.relative(process.cwd(), project.directory));
} else {
console.log(project.directory);
}
process.exit(0);
}
process.exit(1);
});
| #!/usr/bin/env node
exports.command = {
description: 'resolve a path to a project',
arguments: '<path>'
};
if (require.main !== module) {
return;
}
var path = require('path');
var storage = require('../lib/storage.js');
var utilities = require('../lib/utilities.js');
var program = utilities.programDefaults('resolve', '<path>');
program.option('-r, --relative', 'display the relative path');
program.parse(process.argv);
program.handleColor();
if (!program.args[0]) {
console.error('Please specify a path.');
process.exit(1);
}
storage.setup(function () {
var project = storage.getProjectByDirectory(program.args[0]);
if (project) {
if (program.relative) {
var relativePath = path.relative(process.cwd(), project.directory);
// Return '.' if we're at the root of the project
console.log(relativePath === '' ? '.' : relativePath);
} else {
console.log(project.directory);
}
process.exit(0);
}
process.exit(1);
});
| Return a proper relative path | Return a proper relative path
| JavaScript | mit | beaugunderson/projects,beaugunderson/projects | ---
+++
@@ -31,7 +31,10 @@
if (project) {
if (program.relative) {
- console.log(path.relative(process.cwd(), project.directory));
+ var relativePath = path.relative(process.cwd(), project.directory);
+
+ // Return '.' if we're at the root of the project
+ console.log(relativePath === '' ? '.' : relativePath);
} else {
console.log(project.directory);
} |
20ba9b777292c4f74c28e942801ea928af6b7a9b | test/src/board/movable_point/lance_test.js | test/src/board/movable_point/lance_test.js | import Board from '../../../../frontend/src/shogi/board';
import Piece from '../../../../frontend/src/shogi/piece';
import memo from 'memo-is';
import _ from 'lodash';
describe('black', () => {
context('match the piece of coordinate', () => {
context('exists movable coordinates', () => {
});
context('does not exist movable coordinates', () => {
});
context('other piece exists', () => {
});
});
context('mismatch the piece of coordinate', () => {
});
context.skip('if move piece, king is taken', () => {
});
});
| import Board from '../../../../frontend/src/shogi/board';
import Piece from '../../../../frontend/src/shogi/piece';
import memo from 'memo-is';
import _ from 'lodash';
describe('black', () => {
context('match the piece of coordinate', () => {
context('exists movable coordinates', () => {
var board = memo().is(() => {
var _board = new Board;
_board.setBoard(position());
return(_board);
});
var position = memo().is(() => {
return (
[
['*', '*', '*'],
['*', '*', '*'],
['*', '*', '*'],
['*', '*', '*'],
['*', 'L', '*'],
['*', '*', '*']
]
);
});
it('change property of piece is movable', () => {
var piece = new Piece({ type: 'L', x: 8, y: 5 });
board().enhanceMovablePoint(piece);
var movablePieces = board().board.map((row) => {
return (
row.filter((cell) => { return(cell.movable); })
);
});
_.flattenDeep(movablePieces).should.eql(
[
new Piece({ type: '*', x: 8, y: 1, movable: true }),
new Piece({ type: '*', x: 8, y: 2, movable: true }),
new Piece({ type: '*', x: 8, y: 3, movable: true }),
new Piece({ type: '*', x: 8, y: 4, movable: true }),
]
);
});
});
context('does not exist movable coordinates', () => {
});
context('other piece exists', () => {
});
});
context('mismatch the piece of coordinate', () => {
});
context.skip('if move piece, king is taken', () => {
});
});
| Add example but this is failed. | Add example but this is failed.
| JavaScript | mit | mgi166/usi-front,mgi166/usi-front | ---
+++
@@ -6,6 +6,45 @@
describe('black', () => {
context('match the piece of coordinate', () => {
context('exists movable coordinates', () => {
+ var board = memo().is(() => {
+ var _board = new Board;
+ _board.setBoard(position());
+ return(_board);
+ });
+
+ var position = memo().is(() => {
+ return (
+ [
+ ['*', '*', '*'],
+ ['*', '*', '*'],
+ ['*', '*', '*'],
+ ['*', '*', '*'],
+ ['*', 'L', '*'],
+ ['*', '*', '*']
+ ]
+ );
+ });
+
+ it('change property of piece is movable', () => {
+ var piece = new Piece({ type: 'L', x: 8, y: 5 });
+
+ board().enhanceMovablePoint(piece);
+
+ var movablePieces = board().board.map((row) => {
+ return (
+ row.filter((cell) => { return(cell.movable); })
+ );
+ });
+
+ _.flattenDeep(movablePieces).should.eql(
+ [
+ new Piece({ type: '*', x: 8, y: 1, movable: true }),
+ new Piece({ type: '*', x: 8, y: 2, movable: true }),
+ new Piece({ type: '*', x: 8, y: 3, movable: true }),
+ new Piece({ type: '*', x: 8, y: 4, movable: true }),
+ ]
+ );
+ });
});
context('does not exist movable coordinates', () => { |
4dd28119cb553ffa71cc2ab8a67e37295f6732b8 | src/index.js | src/index.js | module.exports = ({types: t}) => {
return {
pre(file) {
const opts = this.opts;
if (
!(
opts &&
typeof opts === 'object' &&
Object.keys(opts).every(key => (
opts[key] &&
(
typeof opts[key] === 'string' ||
(
typeof opts[key] === 'object' &&
typeof opts[key].moduleName === 'string' &&
typeof opts[key].exportName === 'string'
)
)
))
)
) {
throw new Error(
'Invalid config options for babel-plugin-import-globals, espected a mapping from global variable name ' +
'to either a module name (with a default export) or an object of the type {moduleName: string, ' +
'exportName: string}.'
);
}
},
visitor: {
ReferencedIdentifier(path, state) {
const {node, scope} = path;
if (scope.getBindingIdentifier(node.name)) return;
const opts = this.opts;
const name = node.name;
if (!(name in opts)) {
return;
}
const source = (
typeof opts[name] === 'string'
? {moduleName: opts[name], exportName: 'default'}
: opts[name]
);
const newIdentifier = state.addImport(
source.moduleName,
source.exportName,
name
);
path.replaceWith(
node.type === 'JSXIdentifier'
? t.jSXIdentifier(newIdentifier.name)
: newIdentifier
);
},
},
};
};
| module.exports = ({types: t}) => {
return {
pre(file) {
const opts = this.opts;
if (
!(
opts &&
typeof opts === 'object' &&
Object.keys(opts).every(key => (
opts[key] &&
(
typeof opts[key] === 'string' ||
(
typeof opts[key] === 'object' &&
typeof opts[key].moduleName === 'string' &&
typeof opts[key].exportName === 'string'
)
)
))
)
) {
throw new Error(
'Invalid config options for babel-plugin-import-globals, espected a mapping from global variable name ' +
'to either a module name (with a default export) or an object of the type {moduleName: string, ' +
'exportName: string}.'
);
}
},
visitor: {
ReferencedIdentifier(path, state) {
const {node, scope} = path;
if (scope.getBindingIdentifier(node.name)) return;
const opts = this.opts;
const name = node.name;
if (!(name in opts) || (typeof opts[name] !== 'string' && typeof opts[name] !== 'object')) {
return;
}
const source = (
typeof opts[name] === 'string'
? {moduleName: opts[name], exportName: 'default'}
: opts[name]
);
const newIdentifier = state.addImport(
source.moduleName,
source.exportName,
name
);
path.replaceWith(
node.type === 'JSXIdentifier'
? t.jSXIdentifier(newIdentifier.name)
: newIdentifier
);
},
},
};
};
| Check type of options more carefully | Check type of options more carefully
| JavaScript | mit | mopedjs/babel-plugin-import-globals | ---
+++
@@ -32,7 +32,7 @@
if (scope.getBindingIdentifier(node.name)) return;
const opts = this.opts;
const name = node.name;
- if (!(name in opts)) {
+ if (!(name in opts) || (typeof opts[name] !== 'string' && typeof opts[name] !== 'object')) {
return;
}
|
4b479f671156db716f986144b9950865792ac0f4 | src/index.js | src/index.js | const express = require('express');
const bodyParser = require('body-parser');
const morgan = require('morgan');
const logger = require('./logger');
const streamClient = require('./streamClient');
const sendEmail = require('./sendEmail');
const app = express();
if (process.env.NODE_ENV !== 'test') {
app.use(morgan('dev'));
}
app.use(bodyParser.json());
streamClient.on('send-email', sendEmail);
app.post('/events', streamClient.listen());
app.listen(3001, () => {
logger.info('Listening for events');
});
| const express = require('express');
const bodyParser = require('body-parser');
const morgan = require('morgan');
const logger = require('./logger');
const streamClient = require('./streamClient');
const sendEmail = require('./sendEmail');
const app = express();
if (process.env.NODE_ENV !== 'test') {
app.use(morgan('dev'));
}
app.use(bodyParser.json());
streamClient.on('send-email', sendEmail);
app.post('/events', streamClient.listen());
app.listen(process.env.PORT || 3001, () => {
logger.info('Listening for events');
});
| Make the port overridable from the environment | Make the port overridable from the environment
| JavaScript | agpl-3.0 | rabblerouser/mailer,rabblerouser/mailer | ---
+++
@@ -15,6 +15,6 @@
streamClient.on('send-email', sendEmail);
app.post('/events', streamClient.listen());
-app.listen(3001, () => {
+app.listen(process.env.PORT || 3001, () => {
logger.info('Listening for events');
}); |
509b334c79b75adb2cd2d7bfa193b89e14a7dfd6 | src/index.js | src/index.js | import { Game } from 'cervus/modules/core';
import { Plane, Box } from 'cervus/modules/shapes';
import { basic } from 'cervus/modules/materials';
const game = new Game({
width: window.innerWidth,
height: window.innerHeight,
clear_color: "#eeeeee",
far: 1000
});
document.querySelector("#ui").addEventListener(
'click', () => game.canvas.requestPointerLock()
);
game.camera.position = [0, 1.5, 0];
game.camera.keyboard_controlled = true;
game.camera.mouse_controlled = true;
game.camera.move_speed = 10;
game.add(new Plane({
material: basic,
color: "#000000",
scale: [1000, 1, 1000]
}));
for (let i = 0; i < 20; i++) {
const sign = Math.cos(i * Math.PI);
const x = 75 + 100 * Math.sin(i * Math.PI / 6);
game.add(new Box({
material: basic,
color: "#000000",
position: [sign * x, 20, 20 * i],
scale: [90, 40, 15]
}));
}
| import { Game } from 'cervus/core';
import { Plane, Box } from 'cervus/shapes';
import { basic } from 'cervus/materials';
const game = new Game({
width: window.innerWidth,
height: window.innerHeight,
clear_color: "#eeeeee",
far: 1000
});
document.querySelector("#ui").addEventListener(
'click', () => game.canvas.requestPointerLock()
);
game.camera.position = [0, 1.5, 0];
game.camera.keyboard_controlled = true;
game.camera.mouse_controlled = true;
game.camera.move_speed = 10;
game.add(new Plane({
material: basic,
color: "#000000",
scale: [1000, 1, 1000]
}));
for (let i = 0; i < 20; i++) {
const sign = Math.cos(i * Math.PI);
const x = 75 + 100 * Math.sin(i * Math.PI / 6);
game.add(new Box({
material: basic,
color: "#000000",
position: [sign * x, 20, 20 * i],
scale: [90, 40, 15]
}));
}
| Update to new Cervus API | Update to new Cervus API
| JavaScript | isc | piesku/moment-lost,piesku/moment-lost | ---
+++
@@ -1,6 +1,6 @@
-import { Game } from 'cervus/modules/core';
-import { Plane, Box } from 'cervus/modules/shapes';
-import { basic } from 'cervus/modules/materials';
+import { Game } from 'cervus/core';
+import { Plane, Box } from 'cervus/shapes';
+import { basic } from 'cervus/materials';
const game = new Game({
width: window.innerWidth, |
4b81900bbe4bbf113fbfb967ff37938ac96f071f | src/index.js | src/index.js |
import {Video} from 'kaleidoscopejs';
import {ContainerPlugin} from 'clappr';
export default class Video360 extends ContainerPlugin {
constructor(container) {
super(container);
this.listenTo(this.container, 'container:fullscreen', this.updateSize);
let {height, width, autoplay} = container.options;
container.playback.el.setAttribute('crossorigin', 'anonymous');
this.viewer = new Video({height, width, container: container.el, source: container.playback.el});
this.viewer.render();
}
get name() {
return 'Video360';
}
updateSize() {
setTimeout(() =>
this.viewer.renderer.setSize({height: this.container.$el.height(), width: this.container.$el.width()})
, 250)
}
}
|
import {Video} from 'kaleidoscopejs';
import {ContainerPlugin, Mediator, Events} from 'clappr';
export default class Video360 extends ContainerPlugin {
constructor(container) {
super(container);
Mediator.on(`${this.options.playerId}:${Events.PLAYER_RESIZE}`, this.updateSize, this);
let {height, width, autoplay} = container.options;
container.playback.el.setAttribute('crossorigin', 'anonymous');
this.viewer = new Video({height: isNaN(height) ? 300 : height, width: isNaN(width) ? 400 : width, container: this.container.el, source: this.container.playback.el});
this.viewer.render();
}
get name() {
return 'Video360';
}
updateSize() {
setTimeout(() =>
this.viewer.renderer.setSize({height: this.container.$el.height(), width: this.container.$el.width()})
, 250)
}
}
| Fix plugin scaling when player size is set in percents or player is resized at runtime | Fix plugin scaling when player size is set in percents or player is resized at runtime
| JavaScript | mit | thiagopnts/video-360,thiagopnts/video-360 | ---
+++
@@ -1,14 +1,14 @@
import {Video} from 'kaleidoscopejs';
-import {ContainerPlugin} from 'clappr';
+import {ContainerPlugin, Mediator, Events} from 'clappr';
export default class Video360 extends ContainerPlugin {
constructor(container) {
super(container);
- this.listenTo(this.container, 'container:fullscreen', this.updateSize);
+ Mediator.on(`${this.options.playerId}:${Events.PLAYER_RESIZE}`, this.updateSize, this);
let {height, width, autoplay} = container.options;
container.playback.el.setAttribute('crossorigin', 'anonymous');
- this.viewer = new Video({height, width, container: container.el, source: container.playback.el});
+ this.viewer = new Video({height: isNaN(height) ? 300 : height, width: isNaN(width) ? 400 : width, container: this.container.el, source: this.container.playback.el});
this.viewer.render();
}
|
cd1b69dfb75def40203f6783dbae7e4ebbe6f36a | src/index.js | src/index.js | // @flow
import 'source-map-support/register';
import 'babel-polyfill';
import 'colors';
// import async from 'async';
// import _ from 'lodash';
import console from 'better-console';
import './fib-gen';
import './table';
import './random-throw';
| // @flow
import 'source-map-support/register';
import 'babel-polyfill';
import 'colors';
// import async from 'async';
// import _ from 'lodash';
// import console from 'better-console';
| Comment unwanted but relevant modules | Comment unwanted but relevant modules
| JavaScript | mit | abhisekp/Practice-Modern-JavaScript | ---
+++
@@ -5,8 +5,5 @@
import 'colors';
// import async from 'async';
// import _ from 'lodash';
-import console from 'better-console';
+// import console from 'better-console';
-import './fib-gen';
-import './table';
-import './random-throw'; |
c026131558cdfd02d62d6d60bf494e93fd2d5285 | test/fixtures/with-config/nuxt.config.js | test/fixtures/with-config/nuxt.config.js | module.exports = {
router: {
base: '/test/'
},
cache: true,
plugins: ['~plugins/test.js'],
loading: '~components/loading',
env: {
bool: true,
num: 23,
string: 'Nuxt.js'
}
}
| module.exports = {
router: {
base: '/test/'
},
cache: true,
plugins: ['~plugins/test.js'],
loading: '~components/loading',
env: {
bool: true,
num: 23,
string: 'Nuxt.js'
},
extend (config, options) {
config.devtool = 'eval-source-map'
}
}
| Add test for extend option | Add test for extend option
| JavaScript | mit | jfroffice/nuxt.js,cj/nuxt.js,jfroffice/nuxt.js,cj/nuxt.js,mgesmundo/nuxt.js,mgesmundo/nuxt.js | ---
+++
@@ -9,5 +9,8 @@
bool: true,
num: 23,
string: 'Nuxt.js'
+ },
+ extend (config, options) {
+ config.devtool = 'eval-source-map'
}
} |
4895034d5368d6ec65d02c00ef3a0b7fe46c25e6 | src/index.js | src/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import SearchBar from './components/search_bar'
const API_KEY = 'AIzaSyBKBu77HCUT6I3oZiFXlaIdou8S_3voo5E';
const App = () => {
return (
<div>
<SearchBar />
</div>
);
}
ReactDOM.render(<App />, document.querySelector('.container'));
| import React from 'react';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search'
import SearchBar from './components/search_bar'
const API_KEY = 'AIzaSyBKBu77HCUT6I3oZiFXlaIdou8S_3voo5E';
YTSearch({key: API_KEY, term: 'surfboards'}, function(data) {
console.log(data);
});
const App = () => {
return (
<div>
<SearchBar />
</div>
);
}
ReactDOM.render(<App />, document.querySelector('.container'));
| Add simple youtube api call | Add simple youtube api call
| JavaScript | mit | izabelka/redux-simple-starter,izabelka/redux-simple-starter | ---
+++
@@ -1,9 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom';
+import YTSearch from 'youtube-api-search'
import SearchBar from './components/search_bar'
const API_KEY = 'AIzaSyBKBu77HCUT6I3oZiFXlaIdou8S_3voo5E';
+
+YTSearch({key: API_KEY, term: 'surfboards'}, function(data) {
+ console.log(data);
+});
const App = () => {
return ( |
d72ad53ce31a49754fd62978741c1fe7ac819751 | src/index.js | src/index.js | import React from 'react'
import ReactDOM from 'react-dom'
import { createGlobalStyle } from 'styled-components'
import { App } from './App'
import woff2 from './fonts/source-sans-pro-v11-latin-regular.woff2'
import woff from './fonts/source-sans-pro-v11-latin-regular.woff'
import registerServiceWorker from './registerServiceWorker'
const GlobalStyle = createGlobalStyle`
body {
margin: 0;
padding: 0;
font-family: 'Source Sans Pro', sans-serif;
}
/* source-sans-pro-regular - latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
font-display: optional;
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'),
url(${woff2}) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url(${woff}) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
`
ReactDOM.render(
<>
<GlobalStyle />
<App />
</>,
document.getElementById('root')
)
registerServiceWorker()
| import React from 'react'
import ReactDOM from 'react-dom'
import { createGlobalStyle } from 'styled-components'
import { App } from './App'
import woff2 from './fonts/source-sans-pro-v11-latin-regular.woff2'
import woff from './fonts/source-sans-pro-v11-latin-regular.woff'
import registerServiceWorker from './registerServiceWorker'
const GlobalStyle = createGlobalStyle`
body {
margin: 0;
padding: 0;
font-family: 'Source Sans Pro', sans-serif;
overscroll-behavior-y: none;
}
/* source-sans-pro-regular - latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
font-display: optional;
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'),
url(${woff2}) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url(${woff}) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
`
ReactDOM.render(
<>
<GlobalStyle />
<App />
</>,
document.getElementById('root')
)
registerServiceWorker()
| Disable pull-to-refresh and overscroll glow | Disable pull-to-refresh and overscroll glow
| JavaScript | mit | joelgeorgev/react-checkbox-tree,joelgeorgev/react-checkbox-tree | ---
+++
@@ -12,6 +12,7 @@
margin: 0;
padding: 0;
font-family: 'Source Sans Pro', sans-serif;
+ overscroll-behavior-y: none;
}
/* source-sans-pro-regular - latin */ |
465fe8a992b6a277f0371fe175309b68688c77fe | creep.Harvester.behaviour.Harvest.js | creep.Harvester.behaviour.Harvest.js | module.exports = function (creep) {
// Aquire target
if(creep.memory.currentTarget.ticksToRegeneration === undefined || !creep.memory.currentTarget.energy || !creep.memory.movement.path.length) {
creep.memory.currentTarget = creep.pos.findClosest(FIND_SOURCES_ACTIVE, {
algorithm: "astar"
});
}
// Execute on target
if(creep.pos.isNearTo(creep.memory.currentTarget.pos.x, creep.memory.currentTarget.pos.y)) {
creep.harvest(Game.getObjectById(creep.memory.currentTarget.id));
} else {
creep.advMove(creep.memory.currentTarget);
}
};
| module.exports = function (creep) {
// Aquire target
if(!creep.memory.currentTarget || creep.memory.currentTarget.ticksToRegeneration === undefined || !creep.memory.currentTarget.energy || !creep.memory.movement.path.length) {
creep.memory.currentTarget = creep.pos.findClosest(FIND_SOURCES_ACTIVE, {
algorithm: "astar"
});
}
// Execute on target
if(creep.memory.currentTarget) {
if(creep.pos.isNearTo(creep.memory.currentTarget.pos.x, creep.memory.currentTarget.pos.y)) {
creep.harvest(Game.getObjectById(creep.memory.currentTarget.id));
} else {
creep.advMove(creep.memory.currentTarget);
}
}
};
| Add checks for currentTarget defined | Add checks for currentTarget defined
| JavaScript | mit | pmaidens/screeps,pmaidens/screeps | ---
+++
@@ -1,15 +1,17 @@
module.exports = function (creep) {
// Aquire target
- if(creep.memory.currentTarget.ticksToRegeneration === undefined || !creep.memory.currentTarget.energy || !creep.memory.movement.path.length) {
+ if(!creep.memory.currentTarget || creep.memory.currentTarget.ticksToRegeneration === undefined || !creep.memory.currentTarget.energy || !creep.memory.movement.path.length) {
creep.memory.currentTarget = creep.pos.findClosest(FIND_SOURCES_ACTIVE, {
algorithm: "astar"
});
}
// Execute on target
- if(creep.pos.isNearTo(creep.memory.currentTarget.pos.x, creep.memory.currentTarget.pos.y)) {
- creep.harvest(Game.getObjectById(creep.memory.currentTarget.id));
- } else {
- creep.advMove(creep.memory.currentTarget);
+ if(creep.memory.currentTarget) {
+ if(creep.pos.isNearTo(creep.memory.currentTarget.pos.x, creep.memory.currentTarget.pos.y)) {
+ creep.harvest(Game.getObjectById(creep.memory.currentTarget.id));
+ } else {
+ creep.advMove(creep.memory.currentTarget);
+ }
}
}; |
1861155258d041d1c4b0c00dfb5b5e7407a37f0c | src/peeracle.js | src/peeracle.js | 'use strict';
(function () {
var Peeracle = {};
Peeracle.Media = require('./media');
Peeracle.Peer = require('./peer');
Peeracle.Tracker = require('./tracker');
module.exports = Peeracle;
})();
| 'use strict';
(function () {
var Peeracle = {};
Peeracle.Media = require('./media');
Peeracle.Metadata = require('./metadata');
Peeracle.Peer = require('./peer');
Peeracle.Tracker = require('./tracker');
Peeracle.Utils = require('./utils');
module.exports = Peeracle;
})();
| Load Metadata and Utils in node | Load Metadata and Utils in node
| JavaScript | mit | peeracle/legacy | ---
+++
@@ -3,7 +3,9 @@
(function () {
var Peeracle = {};
Peeracle.Media = require('./media');
+ Peeracle.Metadata = require('./metadata');
Peeracle.Peer = require('./peer');
Peeracle.Tracker = require('./tracker');
+ Peeracle.Utils = require('./utils');
module.exports = Peeracle;
})(); |
037af037f4b392ebc51da482ff654b8915f8f448 | reducers/es5/reviews.js | reducers/es5/reviews.js | const reviews = (state=[], action) => {
switch (action.type) {
case 'ADD_REVIEW':
return [
...state, {
id: action.id,
reviewer: action.reviewer,
text: action.text,
rating: action.rating,
flag: false
}
]
case 'DELETE_REVIEW':
return state.filter(review => review.id !== action.id);
case 'FLAG_REVIEW':
return state.map((review, index) => review.id === action.id ? Object.assign({}, review, { flag: !action.flag}): review)
case 'RATE_REVIEW':
return state.map((review, index) => review.id === action.id ? [...review, {rating: action.rating}]: review)
default:
return state;
}
}
export default reviews; | const reviews = (state=[], action) => {
switch (action.type) {
case 'ADD_REVIEW':
return [
...state, {
id: action.id,
reviewer: action.reviewer,
text: action.text,
rating: action.rating,
flag: false
}
]
case 'DELETE_REVIEW':
return state.filter(review => review.id !== action.id);
case 'FLAG_REVIEW':
return state.map(review => review.id === action.id ? Object.assign({}, review, { flag: action.flag}): review)
case 'RATE_REVIEW':
return state.map(review => review.id === action.id ? [...review, {rating: action.rating}]: review)
default:
return state;
}
}
export default reviews;
| Remove unneccessary paren in flag review statement | [Chore] Remove unneccessary paren in flag review statement
| JavaScript | mit | andela-emabishi/immutable-redux | ---
+++
@@ -2,7 +2,7 @@
switch (action.type) {
case 'ADD_REVIEW':
return [
- ...state, {
+ ...state, {
id: action.id,
reviewer: action.reviewer,
text: action.text,
@@ -13,9 +13,9 @@
case 'DELETE_REVIEW':
return state.filter(review => review.id !== action.id);
case 'FLAG_REVIEW':
- return state.map((review, index) => review.id === action.id ? Object.assign({}, review, { flag: !action.flag}): review)
+ return state.map(review => review.id === action.id ? Object.assign({}, review, { flag: action.flag}): review)
case 'RATE_REVIEW':
- return state.map((review, index) => review.id === action.id ? [...review, {rating: action.rating}]: review)
+ return state.map(review => review.id === action.id ? [...review, {rating: action.rating}]: review)
default:
return state;
} |
909be0fe839a61616bc62e93176a7ceb7f8fdd55 | example/redux/client/routes.js | example/redux/client/routes.js | /* @flow */
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import { App, NotFound } from './components/App.js';
import Home, { Who, How } from './components/Pages.js';
import { LogIn, SignUp } from './components/SignUp.js';
/**
* The route configuration for the whole app.
*/
export const routes = (
<Route path='/' title='Redux Example | Home' component={App}>
<IndexRoute component={Home} />
{/* Pages */}
<Route path='who' title='Redux Example | Who' component={Who} />
<Route path='how' title='Redux Example | How' component={How} />
{/* Account */}
<Route path='log-in' title='Redux Example | Log In' component={LogIn} />
<Route path='sign-up' title='Redux Example | Sign Up' component={SignUp} />
{/* Not Found */}
<Route path='*' title='Redux Example | Not Found' component={NotFound} />
</Route>
);
export default routes;
| /* @flow */
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import { App, NotFound } from './components/App.js';
import Home, { Who, How } from './components/Pages.js';
import { LogIn, SignUp } from './components/SignUp.js';
/**
* The route configuration for the whole app.
*/
export const routes = (
<Route path='/' component={App}>
<IndexRoute title='Redux Example | Home' component={Home} />
{/* Pages */}
<Route path='who' title='Redux Example | Who' component={Who} />
<Route path='how' title='Redux Example | How' component={How} />
{/* Account */}
<Route path='log-in' title='Redux Example | Log In' component={LogIn} />
<Route path='sign-up' title='Redux Example | Sign Up' component={SignUp} />
{/* Not Found */}
<Route path='*' title='Redux Example | Not Found' component={NotFound} />
</Route>
);
export default routes;
| Fix title rendering in redux example | Fix title rendering in redux example
| JavaScript | mit | iansinnott/react-static-webpack-plugin,iansinnott/react-static-webpack-plugin | ---
+++
@@ -11,8 +11,8 @@
*/
export const routes = (
- <Route path='/' title='Redux Example | Home' component={App}>
- <IndexRoute component={Home} />
+ <Route path='/' component={App}>
+ <IndexRoute title='Redux Example | Home' component={Home} />
{/* Pages */}
<Route path='who' title='Redux Example | Who' component={Who} /> |
29071eee23739d47dd9957b7fbdfacd5dd2918d7 | app.js | app.js | //var http = require('http');
var express = require('express');
var app = module.exports = express();
/*http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain; charset=utf-8'});
res.end('Can i haz app.js host another one or probably?');
}).listen(4080);*/
app.get('/', function(req,res){
res.send('Hello from express');
});
app.listen(4000);
console.log('Server running at http://*:4080/');
| //var http = require('http');
var express = require('express');
var app = module.exports = express();
/*http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain; charset=utf-8'});
res.end('Can i haz app.js host another one or probably?');
}).listen(4080);*/
app.get('/', function(req,res){
res.send('Hello from express');
});
app.listen(4000, function() {
console.log('srv OK');
});
console.log('Server running at http://*:4080/');
| Fix issue with old express usage | Fix issue with old express usage
| JavaScript | mit | pieszynski/test | ---
+++
@@ -12,5 +12,7 @@
res.send('Hello from express');
});
-app.listen(4000);
+app.listen(4000, function() {
+ console.log('srv OK');
+});
console.log('Server running at http://*:4080/'); |
1c372f7892199b84f128662fd71dc5795ec64348 | test/tests/itemTest.js | test/tests/itemTest.js | describe("Zotero.Item", function() {
describe("#getField()", function () {
it("should return false for valid unset fields on unsaved items", function* () {
var item = new Zotero.Item('book');
assert.equal(item.getField('rights'), false);
});
it("should return false for valid unset fields on unsaved items after setting on another field", function* () {
var item = new Zotero.Item('book');
item.setField('title', 'foo');
assert.equal(item.getField('rights'), false);
});
it("should return false for invalid unset fields on unsaved items after setting on another field", function* () {
var item = new Zotero.Item('book');
item.setField('title', 'foo');
assert.equal(item.getField('invalid'), false);
});
});
describe("#parentID", function () {
it("should create a child note", function () {
return Zotero.DB.executeTransaction(function* () {
var item = new Zotero.Item('book');
var parentItemID = yield item.save();
item = new Zotero.Item('note');
item.parentID = parentItemID;
var childItemID = yield item.save();
item = yield Zotero.Items.getAsync(childItemID);
Zotero.debug('=-=-=');
Zotero.debug(item.parentID);
assert.ok(item.parentID);
assert.equal(item.parentID, parentItemID);
}.bind(this));
});
});
});
| describe("Zotero.Item", function() {
describe("#getField()", function () {
it("should return false for valid unset fields on unsaved items", function* () {
var item = new Zotero.Item('book');
assert.equal(item.getField('rights'), false);
});
it("should return false for valid unset fields on unsaved items after setting on another field", function* () {
var item = new Zotero.Item('book');
item.setField('title', 'foo');
assert.equal(item.getField('rights'), false);
});
it("should return false for invalid unset fields on unsaved items after setting on another field", function* () {
var item = new Zotero.Item('book');
item.setField('title', 'foo');
assert.equal(item.getField('invalid'), false);
});
});
describe("#parentID", function () {
it("should create a child note", function () {
return Zotero.DB.executeTransaction(function* () {
var item = new Zotero.Item('book');
var parentItemID = yield item.save();
item = new Zotero.Item('note');
item.parentID = parentItemID;
var childItemID = yield item.save();
item = yield Zotero.Items.getAsync(childItemID);
assert.ok(item.parentID);
assert.equal(item.parentID, parentItemID);
}.bind(this));
});
});
});
| Remove extra debug lines in item test | Remove extra debug lines in item test
| JavaScript | agpl-3.0 | hoehnp/zotero,hoehnp/zotero,retorquere/zotero,rmzelle/zotero,hoehnp/zotero,gracile-fr/zotero,rmzelle/zotero,gracile-fr/zotero,gracile-fr/zotero,retorquere/zotero,retorquere/zotero,rmzelle/zotero | ---
+++
@@ -29,8 +29,6 @@
var childItemID = yield item.save();
item = yield Zotero.Items.getAsync(childItemID);
- Zotero.debug('=-=-=');
- Zotero.debug(item.parentID);
assert.ok(item.parentID);
assert.equal(item.parentID, parentItemID);
}.bind(this)); |
17f04695e0548e093533d8b498d2b741bdc9daeb | test/twitterService.js | test/twitterService.js | 'use strict';
class TwitterService {
// House Keeping of our connection/server
constructor() {
this.server = undefined;
}
start(done) {
require('../server').then((server) => {
this.server = server;
done();
}).catch(done);
}
clearDB() {
this.server.db.dropDatabase();
}
stop() {
this.server.db.close();
}
// Sample API
getAPISample() {
return this.server.hapiSever.inject('/api/sample');
}
// Sample Static page
getStaticSample() {
return this.server.hapiSever.inject('/');
}
}
module.exports = TwitterService;
| 'use strict';
const User = require('../app/models/user');
class TwitterService {
// House Keeping of our connection/server
constructor() {
this.server = undefined;
}
start(done) {
require('../server').then((server) => {
this.server = server;
done();
}).catch(done);
}
clearDB() {
this.server.db.dropDatabase();
}
stop() {
this.server.db.close();
}
// Sample API
getAPISample() {
return this.server.hapiSever.inject('/api/sample');
}
// Sample Static page
getStaticSample() {
return this.server.hapiSever.inject('/');
}
// User API
getAPIUsers() {
return this.server.hapiServer.inject('/api/users');
}
getAPIUser(id) {
return this.server.hapiSever.inject(`/api/users/${id}`);
}
createAPIUser(user) {
return this.server.hapiSever.inject({ url: '/api/users', method: 'POST', payload: user });
}
deleteAPIUser(id) {
return this.server.hapiSever.inject({ url: '/api/users/${id}', method: 'DELETE' });
}
// User DB
getDBUsers() {
return User.find({});
}
getDBUser(id) {
return User.findOne({ _id: id });
}
createDBUser(user) {
const newUser = new User(user);
return newUser.save();
}
deleteDBUser(id) {
return User.remove({ _id: id });
}
}
module.exports = TwitterService;
| Add user helpers to test service | Add user helpers to test service
| JavaScript | mit | FritzFlorian/true-parrot,FritzFlorian/true-parrot | ---
+++
@@ -1,4 +1,6 @@
'use strict';
+
+const User = require('../app/models/user');
class TwitterService {
// House Keeping of our connection/server
@@ -30,6 +32,41 @@
getStaticSample() {
return this.server.hapiSever.inject('/');
}
+
+ // User API
+ getAPIUsers() {
+ return this.server.hapiServer.inject('/api/users');
+ }
+
+ getAPIUser(id) {
+ return this.server.hapiSever.inject(`/api/users/${id}`);
+ }
+
+ createAPIUser(user) {
+ return this.server.hapiSever.inject({ url: '/api/users', method: 'POST', payload: user });
+ }
+
+ deleteAPIUser(id) {
+ return this.server.hapiSever.inject({ url: '/api/users/${id}', method: 'DELETE' });
+ }
+
+ // User DB
+ getDBUsers() {
+ return User.find({});
+ }
+
+ getDBUser(id) {
+ return User.findOne({ _id: id });
+ }
+
+ createDBUser(user) {
+ const newUser = new User(user);
+ return newUser.save();
+ }
+
+ deleteDBUser(id) {
+ return User.remove({ _id: id });
+ }
}
module.exports = TwitterService; |
2a780f2132c867a996e78c1c0f1e9ef92d4a86fa | bot.js | bot.js | /* Require modules */
var nodeTelegramBot = require('node-telegram-bot')
, config = require('./config.json')
, request = require("request")
, cheerio = require("cheerio");
/* Functions */
/**
* Uses the request module to return the body of a web page
* @param {string} url
* @param {callback} callback
* @return {string}
*/
function getWebContent(url, callback){
request({
uri: url,
}, function(error, response, body) {
callback(body);
});
}
/* Logic */
var recipeURL = 'http://www.cookstr.com/searches/surprise';
var bot = new nodeTelegramBot({
token: config.token
})
.on('message', function (message) {
/* Process "/random" command */
if (message.text == "/dinner") {
console.log(message);
getWebContent(recipeURL, function(data){
// Parse DOM and recipe informations
var $ = cheerio.load(data)
, recipeName = $("meta[property='og:title']").attr('content')
, recipeURL = $("meta[property='og:url']").attr('content');
// Send bot reply
bot.sendMessage({
chat_id: message.chat.id,
text: 'What about "' + recipeName + '"? ' + recipeURL
});
});
}
})
.start();
| /* Require modules */
var nodeTelegramBot = require('node-telegram-bot')
, config = require('./config.json')
, request = require("request")
, cheerio = require("cheerio");
/* Functions */
/**
* Uses the request module to return the body of a web page
* @param {string} url
* @param {callback} callback
* @return {string}
*/
function getWebContent(url, callback){
request({
uri: url,
}, function(error, response, body) {
callback(body);
});
}
/* Logic */
var recipeURL = 'http://www.cookstr.com/searches/surprise';
var bot = new nodeTelegramBot({
token: config.token
})
.on('message', function (message) {
/* Process "/dinner" command */
if (message.text == "/dinner" || message.text == "/dinner@WhatToEatBot") {
console.log(message);
getWebContent(recipeURL, function(data){
// Parse DOM and recipe informations
var $ = cheerio.load(data)
, recipeName = $("meta[property='og:title']").attr('content')
, recipeURL = $("meta[property='og:url']").attr('content');
// Send bot reply
bot.sendMessage({
chat_id: message.chat.id,
text: 'What about "' + recipeName + '"? ' + recipeURL
});
});
}
})
.start();
| Add support for new @mention command syntax | Add support for new @mention command syntax
| JavaScript | mit | frdmn/telegram-WhatToEatBot | ---
+++
@@ -30,8 +30,8 @@
token: config.token
})
.on('message', function (message) {
- /* Process "/random" command */
- if (message.text == "/dinner") {
+ /* Process "/dinner" command */
+ if (message.text == "/dinner" || message.text == "/dinner@WhatToEatBot") {
console.log(message);
getWebContent(recipeURL, function(data){
// Parse DOM and recipe informations |
c366fabc81d60b9ce641ce6756f78896d45dcd3c | modules/main.js | modules/main.js | var BASE = 'extensions.auto-confirm@myokoym.net.';
var prefs = require('lib/prefs').prefs;
function log(message) {
if (prefs.getPref(BASE + 'debug')) {
console.log("auto-confirm: " + message);
}
}
load('lib/WindowManager');
var global = this;
function handleWindow(aWindow)
{
log("handleWindow");
var doc = aWindow.document;
if (doc.documentElement.localName === 'dialog' &&
doc.documentElement.id === 'commonDialog') {
handleCommonDialog(aWindow);
return;
}
}
function handleCommonDialog(aWindow)
{
log("commonDialog");
aWindow.setTimeout(function() {
log("cancelDialog");
doc.documentElement.cancelDialog();
}, 10000);
}
WindowManager.addHandler(handleWindow);
function shutdown()
{
WindowManager = undefined;
global = undefined;
}
| /*
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
var BASE = 'extensions.auto-confirm@myokoym.net.';
var prefs = require('lib/prefs').prefs;
function log(message) {
if (prefs.getPref(BASE + 'debug')) {
console.log("auto-confirm: " + message);
}
}
load('lib/WindowManager');
var global = this;
function handleWindow(aWindow)
{
log("handleWindow");
var doc = aWindow.document;
if (doc.documentElement.localName === 'dialog' &&
doc.documentElement.id === 'commonDialog') {
handleCommonDialog(aWindow);
return;
}
}
function handleCommonDialog(aWindow)
{
log("commonDialog");
aWindow.setTimeout(function() {
log("cancelDialog");
doc.documentElement.cancelDialog();
}, 10000);
}
WindowManager.addHandler(handleWindow);
function shutdown()
{
WindowManager = undefined;
global = undefined;
}
| Add license header for MPL 2.0 | Add license header for MPL 2.0
| JavaScript | mpl-2.0 | myokoym/auto-confirm,myokoym/auto-confirm | ---
+++
@@ -1,3 +1,9 @@
+/*
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*/
+
var BASE = 'extensions.auto-confirm@myokoym.net.';
var prefs = require('lib/prefs').prefs;
|
092931766b842f4be71c27ab467f3549e1acf901 | Gulpfile.js | Gulpfile.js | var gulp = require('gulp');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var mocha = require('gulp-mocha');
gulp.task('lint', function() {
gulp.src(['src/**/*.js', 'test/**/*.js'])
.pipe(jshint({
esnext: true
}))
.pipe(jshint.reporter(stylish))
.pipe(jshint.reporter('fail'));
});
gulp.task('test', function() {
require('6to5/register');
gulp.src(['test/**/*Test.js'])
.pipe(mocha({
reporter: 'spec'
}));
});
gulp.task('default', ['lint', 'test']); | var gulp = require('gulp');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var mocha = require('gulp-mocha');
var sixToFive = require('gulp-6to5');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var del = require('del');
gulp.task('lint', function() {
gulp.src(['src/**/*.js', 'test/**/*.js'])
.pipe(jshint({
esnext: true
}))
.pipe(jshint.reporter(stylish))
.pipe(jshint.reporter('fail'));
});
gulp.task('test', function() {
require('6to5/register');
gulp.src(['test/**/*Test.js'])
.pipe(mocha({
reporter: 'spec'
}));
});
gulp.task('clean', function() {
del('dist');
});
gulp.task('dist', ['lint', 'test', 'clean'], function() {
gulp.src(['src/chusha.js'])
.pipe(sixToFive({
// Note: I'm not sure what the difference between umd and umdStrict is.
// I like being stricter so I'll go with umdStrict for now.
modules: 'umd'
}))
.pipe(gulp.dest('dist'))
.pipe(uglify())
.pipe(rename('chusha.min.js'))
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['lint', 'test', 'dist']); | Add UMD dist file building | Add UMD dist file building
| JavaScript | mit | MadaraUchiha/chusha | ---
+++
@@ -2,6 +2,10 @@
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var mocha = require('gulp-mocha');
+var sixToFive = require('gulp-6to5');
+var uglify = require('gulp-uglify');
+var rename = require('gulp-rename');
+var del = require('del');
gulp.task('lint', function() {
gulp.src(['src/**/*.js', 'test/**/*.js'])
@@ -20,4 +24,21 @@
}));
});
-gulp.task('default', ['lint', 'test']);
+gulp.task('clean', function() {
+ del('dist');
+});
+
+gulp.task('dist', ['lint', 'test', 'clean'], function() {
+ gulp.src(['src/chusha.js'])
+ .pipe(sixToFive({
+ // Note: I'm not sure what the difference between umd and umdStrict is.
+ // I like being stricter so I'll go with umdStrict for now.
+ modules: 'umd'
+ }))
+ .pipe(gulp.dest('dist'))
+ .pipe(uglify())
+ .pipe(rename('chusha.min.js'))
+ .pipe(gulp.dest('dist'));
+});
+
+gulp.task('default', ['lint', 'test', 'dist']); |
4c0dfb36c9814228c633a430041f516018114a9c | routes/recipes/index.js | routes/recipes/index.js | var express = require('express');
var router = express.Router();
var JsonDB = require('node-json-db');
var _ = require('lodash');
// Escape a string for regexp use
function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
// Recipes listing
router.get('/', function (req, res, next) {
var db = new JsonDB('db', false, false);
var recipes = db.getData('/recipes');
// Expand requested resources if they exist
// The resource to expand is singular, e.g.
// to expand 'users' we provide _expand=user
var expand = req.query._expand;
if (expand) {
try {
var relation = db.getData('/' + expand + 's');
_(recipes)
.forEach(function (recipe) {
recipe[expand] = _(relation).find({ id: recipe[expand + 'Id'] });
delete recipe[expand + 'Id'];
});
}
catch(err) {
console.log(err);
}
}
res.json(recipes);
});
module.exports = router;
| var express = require('express');
var router = express.Router();
var JsonDB = require('node-json-db');
var _ = require('lodash');
// Recipes listing
router.get('/', function (req, res, next) {
var db = new JsonDB('db', false, false);
var recipes = db.getData('/recipes');
// Expand requested resources if they exist
// The resource to expand is singular, e.g.
// to expand 'users' we provide _expand=user
var expand = req.query._expand;
if (expand) {
try {
var relation = db.getData('/' + expand + 's');
_(recipes)
.forEach(function (recipe) {
recipe[expand] = _(relation).find({ id: recipe[expand + 'Id'] });
delete recipe[expand + 'Id'];
});
}
catch(err) {
console.log(err);
}
}
res.json(recipes);
});
module.exports = router;
| Revert "Prepare branch for section 2.4 tutorial" | Revert "Prepare branch for section 2.4 tutorial"
This reverts commit 169e11232511209548673dd769a9c6f71d9b8498.
| JavaScript | mit | adamsea/recipes-api | ---
+++
@@ -2,11 +2,6 @@
var router = express.Router();
var JsonDB = require('node-json-db');
var _ = require('lodash');
-
-// Escape a string for regexp use
-function escapeRegExp(string) {
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
// Recipes listing
router.get('/', function (req, res, next) { |
9731f408a89cf848959f7e593277cc2e67b1a437 | lib/attach.js | lib/attach.js | var getDefaultHistory = require('./history/getHistory');
/**
* Bootstraps the app by getting the initial state.
*/
function attach(Router, element, opts) {
if (!opts) opts = {};
var router = new Router();
var history = opts.history || getDefaultHistory();
var render = function() {
Router.engine.renderInto(router, element);
};
var onInitialReady = function() {
render();
router
.on('viewChange', render)
.on('stateChange', render);
// Now that the view has been bootstrapped (i.e. is in its inital state), it
// can be updated.
update();
history.on('change', function() {
update();
});
};
var previousURL;
var update = function(isInitial) {
var url = history.currentURL();
if (url === previousURL) return;
previousURL = url;
// TODO: How should we handle an error here? Throw it? Log it?
var res = router.dispatch(url);
if (isInitial) {
res.once('initialReady', onInitialReady);
}
};
// Start the process.
update(true);
return router;
}
module.exports = attach;
| var getDefaultHistory = require('./history/getHistory');
/**
* Bootstraps the app by getting the initial state.
*/
function attach(Router, element, opts) {
if (!opts) opts = {};
var router = new Router({defaultVars: {forDOM: true}});
var history = opts.history || getDefaultHistory();
var render = function() {
Router.engine.renderInto(router, element);
};
var onInitialReady = function() {
render();
router
.on('viewChange', render)
.on('stateChange', render);
// Now that the view has been bootstrapped (i.e. is in its inital state), it
// can be updated.
update();
history.on('change', function() {
update();
});
};
var previousURL;
var update = function(isInitial) {
var url = history.currentURL();
if (url === previousURL) return;
previousURL = url;
// TODO: How should we handle an error here? Throw it? Log it?
var res = router.dispatch(url);
if (isInitial) {
res.once('initialReady', onInitialReady);
}
};
// Start the process.
update(true);
return router;
}
module.exports = attach;
| Add "forDOM" var when rendering for DOM | Add "forDOM" var when rendering for DOM
| JavaScript | mit | matthewwithanm/monorouter | ---
+++
@@ -6,7 +6,7 @@
*/
function attach(Router, element, opts) {
if (!opts) opts = {};
- var router = new Router();
+ var router = new Router({defaultVars: {forDOM: true}});
var history = opts.history || getDefaultHistory();
var render = function() { |
5d329062de1f903a05bb83101d81e4543cf993f6 | cu-build.config.js | cu-build.config.js | /**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
var name = 'cu-patcher-ui';
var config = {
type: 'module',
path: __dirname,
name: name,
bundle: {
copy: [
'src/**/!(*.js|*.jsx|*.ts|*.tsx|*.ui|*.styl|*.scss)',
'src/include/**'
]
}
};
// load user config and merge it with default config if it exists
var extend = require('extend');
var fs = require('fs');
var userConfig = {};
if (fs.existsSync(__dirname + '/user-cu-build.config.js')) {
userConfig = require(__dirname + '/user-cu-build.config.js');
}
config = extend(true, config, userConfig);
module.exports = config;
| /**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
var name = 'cu-patcher-ui';
var config = {
type: 'module',
path: __dirname,
name: name,
bundle: {
copy: [
'src/**/!(*.js|*.jsx|*.ts|*.tsx|*.ui|*.styl|*.scss)',
'src/include/**'
]
},
server: {
root: __dirname + "/publish/interface/cu-patcher-ui/"
}
};
// load user config and merge it with default config if it exists
var extend = require('extend');
var fs = require('fs');
var userConfig = {};
if (fs.existsSync(__dirname + '/user-cu-build.config.js')) {
userConfig = require(__dirname + '/user-cu-build.config.js');
}
config = extend(true, config, userConfig);
module.exports = config;
| Fix gulp server root (for some reason started defaulting to dist) | Fix gulp server root (for some reason started defaulting to dist)
| JavaScript | mpl-2.0 | jamkoo/cu-patcher-ui,saddieeiddas/cu-patcher-ui,stanley85/cu-patcher-ui,stanley85/cu-patcher-ui,saddieeiddas/cu-patcher-ui,jamkoo/cu-patcher-ui,saddieeiddas/cu-patcher-ui | ---
+++
@@ -15,6 +15,9 @@
'src/**/!(*.js|*.jsx|*.ts|*.tsx|*.ui|*.styl|*.scss)',
'src/include/**'
]
+ },
+ server: {
+ root: __dirname + "/publish/interface/cu-patcher-ui/"
}
};
|
fe752be0c1f02be11ae2feb53b4e730fee9d9d42 | packages/grpc-tools/bin/protoc_plugin.js | packages/grpc-tools/bin/protoc_plugin.js | #!/usr/bin/env node
/*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/**
* This file is required because package.json cannot reference a file that
* is not distributed with the package, and we use node-pre-gyp to distribute
* the plugin binary
*/
'use strict';
var path = require('path');
var execFile = require('child_process').execFile;
var exe_ext = process.platform === 'win32' ? '.exe' : '';
var plugin = path.resolve(__dirname, 'grpc_node_plugin' + exe_ext);
var child_process = execFile(plugin, process.argv.slice(2), {encoding: 'buffer', maxBuffer: 1024 * 1000}, function(error, stdout, stderr) {
if (error) {
throw error;
}
});
process.stdin.pipe(child_process.stdin);
child_process.stdout.pipe(process.stdout);
child_process.stderr.pipe(process.stderr);
| #!/usr/bin/env node
/*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/**
* This file is required because package.json cannot reference a file that
* is not distributed with the package, and we use node-pre-gyp to distribute
* the plugin binary
*/
'use strict';
var path = require('path');
var execFile = require('child_process').execFile;
var exe_ext = process.platform === 'win32' ? '.exe' : '';
var plugin = path.resolve(__dirname, 'grpc_node_plugin' + exe_ext);
var child_process = execFile(plugin, process.argv.slice(2), {encoding: 'buffer', maxBuffer: 1024 * 1024 * 100}, function(error, stdout, stderr) {
if (error) {
throw error;
}
});
process.stdin.pipe(child_process.stdin);
child_process.stdout.pipe(process.stdout);
child_process.stderr.pipe(process.stderr);
| Update maxBuffer limit to 100Mib | Update maxBuffer limit to 100Mib | JavaScript | apache-2.0 | grpc/grpc-node,grpc/grpc-node,grpc/grpc-node,grpc/grpc-node | ---
+++
@@ -32,7 +32,7 @@
var plugin = path.resolve(__dirname, 'grpc_node_plugin' + exe_ext);
-var child_process = execFile(plugin, process.argv.slice(2), {encoding: 'buffer', maxBuffer: 1024 * 1000}, function(error, stdout, stderr) {
+var child_process = execFile(plugin, process.argv.slice(2), {encoding: 'buffer', maxBuffer: 1024 * 1024 * 100}, function(error, stdout, stderr) {
if (error) {
throw error;
} |
e45f7eb62428aa8e5b00afeca2fa0bed5aeb9c21 | lib/less-browser/cache.js | lib/less-browser/cache.js | // Cache system is a bit outdated and could do with work
module.exports = function(window, options, logger) {
var cache = null;
if (options.env !== 'development') {
try {
cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage;
} catch (_) {}
}
return {
setCSS: function(path, lastModified, styles) {
if (cache) {
logger.info('saving ' + path+ ' to cache.');
try {
cache.setItem(path, styles);
cache.setItem(path + ':timestamp', lastModified);
} catch(e) {
//TODO - could do with adding more robust error handling
logger.error('failed to save');
}
}
},
getCSS: function(path, webInfo) {
var css = cache && cache.getItem(path),
timestamp = cache && cache.getItem(path + ':timestamp');
if (timestamp && webInfo.lastModified &&
(new Date(webInfo.lastModified).valueOf() ===
new Date(timestamp).valueOf())) {
// Use local copy
return css;
}
}
};
};
| // Cache system is a bit outdated and could do with work
module.exports = function(window, options, logger) {
var cache = null;
if (options.env !== 'development') {
try {
cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage;
} catch (_) {}
}
return {
setCSS: function(path, lastModified, styles) {
if (cache) {
logger.info('saving ' + path+ ' to cache.');
try {
cache.setItem(path, styles);
cache.setItem(path + ':timestamp', lastModified);
} catch(e) {
//TODO - could do with adding more robust error handling
logger.error('failed to save "' + path + '" to local storage for caching.');
}
}
},
getCSS: function(path, webInfo) {
var css = cache && cache.getItem(path),
timestamp = cache && cache.getItem(path + ':timestamp');
if (timestamp && webInfo.lastModified &&
(new Date(webInfo.lastModified).valueOf() ===
new Date(timestamp).valueOf())) {
// Use local copy
return css;
}
}
};
};
| Change error message when caching fails | Change error message when caching fails
see also: http://stackoverflow.com/questions/27722349/less-js-error-msg-failed-to-save/27750286 | JavaScript | apache-2.0 | pkdevbox/less.js,dyx/less.js,MrChen2015/less.js,less/less.js,xiaoyanit/less.js,royriojas/less.js,bendroid/less.js,cypher0x9/less.js,PUSEN/less.js,mishal/less.js,christer155/less.js,paladox/less.js,lvpeng/less.js,ridixcr/less.js,miguel-serrano/less.js,NaSymbol/less.js,SomMeri/less-rhino.js,yuhualingfeng/less.js,jjj117/less.js,PUSEN/less.js,mcanthony/less.js,evocateur/less.js,demohi/less.js,wyfyyy818818/less.js,bendroid/less.js,foresthz/less.js,huzion/less.js,wjb12/less.js,aichangzhi123/less.js,less/less.js,ahstro/less.js,miguel-serrano/less.js,chenxiaoxing1992/less.js,AlexMeliq/less.js,seven-phases-max/less.js,cgvarela/less.js,egg-/less.js,featurist/less-vars,angeliaz/less.js,thinkDevDM/less.js,waiter/less.js,huzion/less.js,sqliang/less.js,yuhualingfeng/less.js,nolanlawson/less.js,thinkDevDM/less.js,foresthz/less.js,ahstro/less.js,SkReD/less.js,gencer/less.js,deciament/less.js,idreamingreen/less.js,deciament/less.js,bhavyaNaveen/project1,Nastarani1368/less.js,royriojas/less.js,waiter/less.js,arusanov/less.js,egg-/less.js,sqliang/less.js,bammoo/less.js,AlexMeliq/less.js,idreamingreen/less.js,mishal/less.js,pkdevbox/less.js,SkReD/less.js,mcanthony/less.js,paladox/less.js,cgvarela/less.js,ridixcr/less.js,jjj117/less.js,NirViaje/less.js,jdan/less.js,lvpeng/less.js,nolanlawson/less.js,dyx/less.js,jdan/less.js,evocateur/less.js,seven-phases-max/less.js,NaSymbol/less.js,featurist/less-vars,lincome/less.js,Synchro/less.js,aichangzhi123/less.js,lincome/less.js,bammoo/less.js,gencer/less.js,less/less.js,angeliaz/less.js,wyfyyy818818/less.js,wjb12/less.js,ahutchings/less.js,christer155/less.js,xiaoyanit/less.js,ahutchings/less.js,arusanov/less.js,demohi/less.js,NirViaje/less.js,bhavyaNaveen/project1,Nastarani1368/less.js,cypher0x9/less.js,SomMeri/less-rhino.js,Synchro/less.js,MrChen2015/less.js,chenxiaoxing1992/less.js | ---
+++
@@ -16,7 +16,7 @@
cache.setItem(path + ':timestamp', lastModified);
} catch(e) {
//TODO - could do with adding more robust error handling
- logger.error('failed to save');
+ logger.error('failed to save "' + path + '" to local storage for caching.');
}
}
}, |
c77cf00a60d489aaf3ceb45eb9f08ba7a85d2097 | figlet-node.js | figlet-node.js | /**
* Figlet JS node.js module
*
* Copyright (c) 2010 Scott González
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://github.com/scottgonzalez/figlet-js
*/
var Figlet = require("./figlet").Figlet;
Figlet.loadFont = function(name, fn) {
require("fs").readFile("./fonts/" + name + ".flf", "utf-8", function(err, contents) {
fn(contents);
});
};
exports.Figlet = Figlet;
| /**
* Figlet JS node.js module
*
* Copyright (c) 2010 Scott González
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://github.com/scottgonzalez/figlet-js
*/
var fs = require("fs");
var path = require('path');
var Figlet = require("./figlet").Figlet;
Figlet.loadFont = function(name, fn) {
var fontFileName = name + ".flf";
var filePath = path.resolve(__dirname, "fonts", fontFileName);
fs.readFile(filePath, "utf8", function(err, contents) {
if (err) {throw err;}
// console.log('figlet-node.loadFont', err, contents);
fn(contents);
});
};
exports.Figlet = Figlet;
| Clean up figlet font loading for node | Clean up figlet font loading for node
| JavaScript | mit | olizilla/figlet-js | ---
+++
@@ -8,13 +8,23 @@
* http://github.com/scottgonzalez/figlet-js
*/
+var fs = require("fs");
+var path = require('path');
var Figlet = require("./figlet").Figlet;
Figlet.loadFont = function(name, fn) {
- require("fs").readFile("./fonts/" + name + ".flf", "utf-8", function(err, contents) {
+
+ var fontFileName = name + ".flf";
+
+ var filePath = path.resolve(__dirname, "fonts", fontFileName);
+
+ fs.readFile(filePath, "utf8", function(err, contents) {
+
+ if (err) {throw err;}
+ // console.log('figlet-node.loadFont', err, contents);
+
fn(contents);
});
};
exports.Figlet = Figlet;
- |
eabfa3b3ed987746d335d4e0eb04688a6033b100 | ui/app/controllers/csi/volumes/volume.js | ui/app/controllers/csi/volumes/volume.js | import Controller from '@ember/controller';
export default Controller.extend({
actions: {
gotoAllocation(allocation) {
this.transitionToRoute('allocations.allocation', allocation);
},
},
});
| import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
export default Controller.extend({
system: service(),
sortedReadAllocations: computed('model.readAllocations.@each.modifyIndex', function() {
return this.model.readAllocations.sortBy('modifyIndex').reverse();
}),
sortedWriteAllocations: computed('model.writeAllocations.@each.modifyIndex', function() {
return this.model.writeAllocations.sortBy('modifyIndex').reverse();
}),
actions: {
gotoAllocation(allocation) {
this.transitionToRoute('allocations.allocation', allocation);
},
},
});
| Sort allocation tables by modify index | Sort allocation tables by modify index
| JavaScript | mpl-2.0 | dvusboy/nomad,burdandrei/nomad,dvusboy/nomad,dvusboy/nomad,burdandrei/nomad,dvusboy/nomad,burdandrei/nomad,hashicorp/nomad,hashicorp/nomad,burdandrei/nomad,burdandrei/nomad,hashicorp/nomad,dvusboy/nomad,burdandrei/nomad,hashicorp/nomad,burdandrei/nomad,dvusboy/nomad,hashicorp/nomad,dvusboy/nomad,hashicorp/nomad | ---
+++
@@ -1,6 +1,18 @@
import Controller from '@ember/controller';
+import { inject as service } from '@ember/service';
+import { computed } from '@ember/object';
export default Controller.extend({
+ system: service(),
+
+ sortedReadAllocations: computed('model.readAllocations.@each.modifyIndex', function() {
+ return this.model.readAllocations.sortBy('modifyIndex').reverse();
+ }),
+
+ sortedWriteAllocations: computed('model.writeAllocations.@each.modifyIndex', function() {
+ return this.model.writeAllocations.sortBy('modifyIndex').reverse();
+ }),
+
actions: {
gotoAllocation(allocation) {
this.transitionToRoute('allocations.allocation', allocation); |
91e3c6bddf1345970b7e2f8a34a487ccf9dc5224 | sashimi-webapp/test/database/sqlCommands_test.js | sashimi-webapp/test/database/sqlCommands_test.js | /*
* Test-unit framework for sqlCommands.js
*/
const assert = require('assert');
const vows = require('vows');
const Sql = require('../../src/database/sql-related/sqlCommands');
const sqlCommands = new Sql();
const isNotEmptyTable = function isNotEmptyTable(stringResult) {
return stringResult !== undefined;
};
const sqlCommandsTest = function sqlCommandsTest() {
this.testCreateTable = function testCreateTable() {
try {
sqlCommands.deleteTable('demo');
} catch (e) {
//
}
sqlCommands.createTable('CREATE TABLE demo (paramX INT)');
const tableData = sqlCommands.getFullTableData('demo');
assert.isTrue(isNotEmptyTable(tableData));
sqlCommands.deleteTable('demo');
};
this.testCreateTable();
};
module.exports = sqlCommandsTest;
sqlCommandsTest();
/* Failed attempt to test on travis
vows.describe('Test SQL Statements').addBatch({
'table creation': {
topic: createTable(),
'create table': CreateTable(topic) {
DeleteTable(tableName);
CreateTable(createTableSql);
const tableData = sqlCommands.getFullTableData('tableName');
assert.isNotEmptyTable(tableData);
}
}
}).export(module);
*/
| /*
* Test-unit framework for sqlCommands.js
*/
const assert = require('assert');
const vows = require('vows');
const Sql = require('../../src/database/sql-related/sqlCommands');
const sqlCommands = new Sql();
const isNotEmptyTable = function isNotEmptyTable(stringResult) {
return stringResult !== undefined;
};
const returnTableToMemory = function(tableData) {
// do nothing for now
};
const sqlCommandsTest = function sqlCommandsTest() {
this.testCreateTable = function testCreateTable() {
let preData = '';
let isPreDataExists = false;
try {
sqlCommands.deleteTable('demo');
} catch (e) {
preData = sqlCommands.getFullTableData('demo');
isPreDataExists = true;
}
sqlCommands.createTable('CREATE TABLE demo (paramX INT)');
const tableData = sqlCommands.getFullTableData('demo');
assert.isTrue(isNotEmptyTable(tableData));
sqlCommands.deleteTable('demo');
if (isPreDataExists) {
returnTableToMemory(preData);
}
};
this.testCreateTable();
};
module.exports = sqlCommandsTest;
sqlCommandsTest();
/* Failed attempt to test on travis
vows.describe('Test SQL Statements').addBatch({
'table creation': {
topic: createTable(),
'create table': CreateTable(topic) {
DeleteTable(tableName);
CreateTable(createTableSql);
const tableData = sqlCommands.getFullTableData('tableName');
assert.isNotEmptyTable(tableData);
}
}
}).export(module);
*/
| Add code framework to return data from test | Add code framework to return data from test
| JavaScript | mit | nus-mtp/sashimi-note,nus-mtp/sashimi-note,nus-mtp/sashimi-note | ---
+++
@@ -14,17 +14,27 @@
return stringResult !== undefined;
};
+const returnTableToMemory = function(tableData) {
+ // do nothing for now
+};
+
const sqlCommandsTest = function sqlCommandsTest() {
this.testCreateTable = function testCreateTable() {
+ let preData = '';
+ let isPreDataExists = false;
try {
sqlCommands.deleteTable('demo');
} catch (e) {
- //
+ preData = sqlCommands.getFullTableData('demo');
+ isPreDataExists = true;
}
sqlCommands.createTable('CREATE TABLE demo (paramX INT)');
const tableData = sqlCommands.getFullTableData('demo');
assert.isTrue(isNotEmptyTable(tableData));
sqlCommands.deleteTable('demo');
+ if (isPreDataExists) {
+ returnTableToMemory(preData);
+ }
};
this.testCreateTable(); |
a2981360a9531458ce590eb8c6144fbd64848d90 | configs/typescript.js | configs/typescript.js | module.exports = {
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
// typescript will handle this so no need for it
'no-undef': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/no-use-before-define': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': 'allow-with-description',
'ts-nocheck': true,
'ts-check': false,
minimumDescriptionLength: 3,
},
],
},
},
],
};
| module.exports = {
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
rules: {
// typescript will handle this so no need for it
'no-undef': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/no-use-before-define': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': 'allow-with-description',
'ts-nocheck': true,
'ts-check': false,
minimumDescriptionLength: 3,
},
],
},
},
],
};
| Add parser to ts overrides | fix: Add parser to ts overrides
| JavaScript | mit | relekang/eslint-config-relekang | ---
+++
@@ -3,6 +3,7 @@
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
+ parser: '@typescript-eslint/parser',
rules: {
// typescript will handle this so no need for it
'no-undef': 'off', |
f1da9f35647cd44ee8bd898593da8f35b7e7cb02 | routes/media.js | routes/media.js | const db = require('../lib/db')
const mongoose = db.goose
const conn = db.rope
const fs = require('fs')
const router = require('koa-router')()
const File = require('../lib/models/file')
const grid = require('gridfs-stream')
const gfs = grid(conn.db, mongoose.mongo)
router.get('/', function *() {
try {
var results = yield File.find()
} catch (err) {
throw err
}
for (var file in results) {
results[file] = results[file].toObject()
}
yield this.render('media', {
pageTitle: 'Media',
list: true,
files: results
})
})
router.post('/upload', function *(next) {
const file = this.request.body.files.file
const writestream = gfs.createWriteStream({
filename: file.name,
root: 'media',
content_type: file.type
})
const content = fs.createReadStream(file.path)
content.pipe(writestream)
try {
yield new Promise(function (resolve) {
writestream.on('close', () => resolve())
})
} catch (err) {
throw err
}
this.body = file.name + ' was written to DB'
yield next
})
module.exports = router
| const db = require('../lib/db')
const mongoose = db.goose
const conn = db.rope
const fs = require('fs')
const router = require('koa-router')()
const File = require('../lib/models/file')
const grid = require('gridfs-stream')
const gfs = grid(conn.db, mongoose.mongo)
router.get('/', function *() {
try {
var results = yield File.find()
} catch (err) {
throw err
}
for (var file in results) {
results[file] = results[file].toObject()
}
yield this.render('media', {
pageTitle: 'Media',
list: true,
files: results
})
})
router.post('/upload', function *(next) {
const file = this.request.body.files.file
const writestream = gfs.createWriteStream({
filename: file.name,
root: 'media',
content_type: file.type
})
const content = fs.createReadStream(file.path)
content.pipe(writestream)
try {
yield new Promise(function (resolve) {
writestream.on('close', () => resolve())
})
} catch (err) {
throw err
}
this.body = file.name + ' was written to DB'
yield next
fs.unlink(file.path, function (err) {
if (err) throw err
})
})
module.exports = router
| Remove temporary file after upload | Remove temporary file after upload
| JavaScript | mit | kunni80/server,muffin/server | ---
+++
@@ -50,6 +50,10 @@
this.body = file.name + ' was written to DB'
yield next
+
+ fs.unlink(file.path, function (err) {
+ if (err) throw err
+ })
})
module.exports = router |
28df4f7258df6930b0fa5892becde4c8962c6017 | packages/geolocation/geolocation.js | packages/geolocation/geolocation.js | var locationDep = new Deps.Dependency();
var location = null;
var locationRefresh = false;
var options = {
enableHighAccuracy: true,
maximumAge: 0
};
var errCallback = function () {
// do nothing
};
var callback = function (newLocation) {
location = newLocation;
locationDep.changed();
};
var enableLocationRefresh = function () {
if (! locationRefresh && navigator.geolocation) {
navigator.geolocation.watchPosition(callback, errCallback, options);
locationRefresh = true;
}
};
Geolocation = {
currentLocation: function () {
enableLocationRefresh();
locationDep.depend();
return location;
}
}; | var locationDep = new Deps.Dependency();
var location = null;
var locationRefresh = false;
var options = {
enableHighAccuracy: true,
maximumAge: 0
};
var errCallback = function () {
// do nothing
};
var callback = function (newLocation) {
location = newLocation;
locationDep.changed();
};
var enableLocationRefresh = function () {
if (! locationRefresh && navigator.geolocation) {
navigator.geolocation.watchPosition(callback, errCallback, options);
locationRefresh = true;
}
};
Geolocation = {
currentLocation: function () {
enableLocationRefresh();
locationDep.depend();
return location;
},
// simple version of location; just lat and lng
latLng: function () {
var loc = Geolocation.currentLocation();
if (loc) {
return {
lat: loc.coords.latitude,
lng: loc.coords.longitude
};
}
return null;
}
}; | Add simple location to Geolocation package | Add simple location to Geolocation package
| JavaScript | mit | steedos/meteor,yalexx/meteor,justintung/meteor,Profab/meteor,mubassirhayat/meteor,aramk/meteor,ashwathgovind/meteor,lpinto93/meteor,jagi/meteor,skarekrow/meteor,papimomi/meteor,SeanOceanHu/meteor,emmerge/meteor,lawrenceAIO/meteor,dfischer/meteor,Theviajerock/meteor,rabbyalone/meteor,mubassirhayat/meteor,stevenliuit/meteor,wmkcc/meteor,michielvanoeffelen/meteor,newswim/meteor,iman-mafi/meteor,iman-mafi/meteor,jdivy/meteor,benjamn/meteor,brettle/meteor,daltonrenaldo/meteor,framewr/meteor,Hansoft/meteor,devgrok/meteor,sclausen/meteor,tdamsma/meteor,Profab/meteor,vacjaliu/meteor,justintung/meteor,brdtrpp/meteor,ljack/meteor,tdamsma/meteor,EduShareOntario/meteor,lorensr/meteor,lorensr/meteor,sitexa/meteor,allanalexandre/meteor,ndarilek/meteor,vacjaliu/meteor,JesseQin/meteor,aramk/meteor,jagi/meteor,lassombra/meteor,daltonrenaldo/meteor,framewr/meteor,alexbeletsky/meteor,msavin/meteor,dboyliao/meteor,GrimDerp/meteor,modulexcite/meteor,steedos/meteor,karlito40/meteor,whip112/meteor,daltonrenaldo/meteor,Quicksteve/meteor,Prithvi-A/meteor,h200863057/meteor,kidaa/meteor,oceanzou123/meteor,hristaki/meteor,TribeMedia/meteor,stevenliuit/meteor,ndarilek/meteor,lieuwex/meteor,joannekoong/meteor,cog-64/meteor,mjmasn/meteor,jeblister/meteor,ashwathgovind/meteor,devgrok/meteor,PatrickMcGuinness/meteor,hristaki/meteor,shadedprofit/meteor,jrudio/meteor,msavin/meteor,GrimDerp/meteor,DAB0mB/meteor,ndarilek/meteor,yyx990803/meteor,LWHTarena/meteor,shrop/meteor,pandeysoni/meteor,codingang/meteor,jagi/meteor,shadedprofit/meteor,juansgaitan/meteor,luohuazju/meteor,aramk/meteor,meteor-velocity/meteor,youprofit/meteor,benstoltz/meteor,katopz/meteor,aleclarson/meteor,shadedprofit/meteor,Jeremy017/meteor,servel333/meteor,shrop/meteor,Eynaliyev/meteor,colinligertwood/meteor,devgrok/meteor,sunny-g/meteor,TechplexEngineer/meteor,daslicht/meteor,allanalexandre/meteor,h200863057/meteor,DCKT/meteor,queso/meteor,Quicksteve/meteor,udhayam/meteor,baiyunping333/meteor,l0rd0fwar/meteor,yiliaofan/meteor,baysao/meteor,daslicht/meteor,ericterpstra/meteor,yonglehou/meteor,pjump/meteor,justintung/meteor,papimomi/meteor,rozzzly/meteor,codedogfish/meteor,judsonbsilva/meteor,papimomi/meteor,4commerce-technologies-AG/meteor,qscripter/meteor,dev-bobsong/meteor,lpinto93/meteor,dandv/meteor,HugoRLopes/meteor,jdivy/meteor,yalexx/meteor,DAB0mB/meteor,jirengu/meteor,jirengu/meteor,cbonami/meteor,pjump/meteor,esteedqueen/meteor,williambr/meteor,servel333/meteor,chinasb/meteor,GrimDerp/meteor,shadedprofit/meteor,aldeed/meteor,jagi/meteor,AnthonyAstige/meteor,juansgaitan/meteor,Urigo/meteor,EduShareOntario/meteor,vjau/meteor,Ken-Liu/meteor,williambr/meteor,Hansoft/meteor,bhargav175/meteor,michielvanoeffelen/meteor,fashionsun/meteor,brettle/meteor,devgrok/meteor,EduShareOntario/meteor,TribeMedia/meteor,iman-mafi/meteor,paul-barry-kenzan/meteor,lassombra/meteor,guazipi/meteor,nuvipannu/meteor,arunoda/meteor,AnthonyAstige/meteor,kidaa/meteor,Hansoft/meteor,DCKT/meteor,aldeed/meteor,mjmasn/meteor,williambr/meteor,LWHTarena/meteor,baysao/meteor,nuvipannu/meteor,skarekrow/meteor,lassombra/meteor,saisai/meteor,meonkeys/meteor,SeanOceanHu/meteor,henrypan/meteor,elkingtonmcb/meteor,shadedprofit/meteor,mauricionr/meteor,TechplexEngineer/meteor,alphanso/meteor,servel333/meteor,AnthonyAstige/meteor,deanius/meteor,akintoey/meteor,meteor-velocity/meteor,steedos/meteor,elkingtonmcb/meteor,calvintychan/meteor,Hansoft/meteor,sdeveloper/meteor,namho102/meteor,Quicksteve/meteor,dev-bobsong/meteor,evilemon/meteor,rabbyalone/meteor,fashionsun/meteor,jdivy/meteor,chinasb/meteor,dboyliao/meteor,Eynaliyev/meteor,luohuazju/meteor,joannekoong/meteor,yyx990803/meteor,dandv/meteor,yonas/meteor-freebsd,Puena/meteor,namho102/meteor,Paulyoufu/meteor-1,D1no/meteor,brdtrpp/meteor,AlexR1712/meteor,karlito40/meteor,aramk/meteor,tdamsma/meteor,oceanzou123/meteor,jg3526/meteor,bhargav175/meteor,joannekoong/meteor,mauricionr/meteor,akintoey/meteor,vacjaliu/meteor,alexbeletsky/meteor,kengchau/meteor,modulexcite/meteor,LWHTarena/meteor,daslicht/meteor,deanius/meteor,tdamsma/meteor,msavin/meteor,dandv/meteor,dfischer/meteor,oceanzou123/meteor,alexbeletsky/meteor,dboyliao/meteor,zdd910/meteor,saisai/meteor,Urigo/meteor,D1no/meteor,lorensr/meteor,steedos/meteor,kidaa/meteor,cbonami/meteor,joannekoong/meteor,yonglehou/meteor,alexbeletsky/meteor,qscripter/meteor,AlexR1712/meteor,jenalgit/meteor,zdd910/meteor,fashionsun/meteor,PatrickMcGuinness/meteor,jeblister/meteor,Theviajerock/meteor,brdtrpp/meteor,rozzzly/meteor,dboyliao/meteor,Urigo/meteor,jenalgit/meteor,cog-64/meteor,yinhe007/meteor,imanmafi/meteor,ashwathgovind/meteor,codingang/meteor,yanisIk/meteor,vjau/meteor,tdamsma/meteor,akintoey/meteor,luohuazju/meteor,mirstan/meteor,codingang/meteor,codedogfish/meteor,framewr/meteor,colinligertwood/meteor,lieuwex/meteor,lawrenceAIO/meteor,baysao/meteor,HugoRLopes/meteor,4commerce-technologies-AG/meteor,modulexcite/meteor,imanmafi/meteor,cherbst/meteor,jirengu/meteor,tdamsma/meteor,yonas/meteor-freebsd,ashwathgovind/meteor,msavin/meteor,rabbyalone/meteor,dboyliao/meteor,EduShareOntario/meteor,joannekoong/meteor,D1no/meteor,lpinto93/meteor,nuvipannu/meteor,jg3526/meteor,jdivy/meteor,benstoltz/meteor,dfischer/meteor,katopz/meteor,brdtrpp/meteor,Profab/meteor,jrudio/meteor,iman-mafi/meteor,jirengu/meteor,sitexa/meteor,newswim/meteor,justintung/meteor,sunny-g/meteor,mirstan/meteor,brdtrpp/meteor,sclausen/meteor,dfischer/meteor,ericterpstra/meteor,alphanso/meteor,Paulyoufu/meteor-1,allanalexandre/meteor,planet-training/meteor,justintung/meteor,PatrickMcGuinness/meteor,brdtrpp/meteor,eluck/meteor,yinhe007/meteor,akintoey/meteor,modulexcite/meteor,oceanzou123/meteor,lassombra/meteor,planet-training/meteor,akintoey/meteor,arunoda/meteor,katopz/meteor,queso/meteor,SeanOceanHu/meteor,youprofit/meteor,sunny-g/meteor,namho102/meteor,meonkeys/meteor,kengchau/meteor,SeanOceanHu/meteor,eluck/meteor,Hansoft/meteor,TechplexEngineer/meteor,TechplexEngineer/meteor,cog-64/meteor,steedos/meteor,yiliaofan/meteor,framewr/meteor,shmiko/meteor,daslicht/meteor,Jeremy017/meteor,skarekrow/meteor,jeblister/meteor,EduShareOntario/meteor,whip112/meteor,karlito40/meteor,sunny-g/meteor,GrimDerp/meteor,lorensr/meteor,ndarilek/meteor,neotim/meteor,sclausen/meteor,PatrickMcGuinness/meteor,namho102/meteor,skarekrow/meteor,shrop/meteor,michielvanoeffelen/meteor,eluck/meteor,kencheung/meteor,vjau/meteor,sdeveloper/meteor,iman-mafi/meteor,sitexa/meteor,brettle/meteor,imanmafi/meteor,somallg/meteor,yonglehou/meteor,chiefninew/meteor,vacjaliu/meteor,sdeveloper/meteor,emmerge/meteor,ericterpstra/meteor,jdivy/meteor,JesseQin/meteor,mirstan/meteor,cherbst/meteor,JesseQin/meteor,johnthepink/meteor,mauricionr/meteor,SeanOceanHu/meteor,chasertech/meteor,4commerce-technologies-AG/meteor,dfischer/meteor,mubassirhayat/meteor,newswim/meteor,yanisIk/meteor,calvintychan/meteor,framewr/meteor,sdeveloper/meteor,benstoltz/meteor,arunoda/meteor,fashionsun/meteor,h200863057/meteor,shmiko/meteor,stevenliuit/meteor,sitexa/meteor,ndarilek/meteor,esteedqueen/meteor,Puena/meteor,TribeMedia/meteor,nuvipannu/meteor,evilemon/meteor,williambr/meteor,kidaa/meteor,chasertech/meteor,AnjirHossain/meteor,devgrok/meteor,ericterpstra/meteor,chmac/meteor,Quicksteve/meteor,qscripter/meteor,udhayam/meteor,sitexa/meteor,ashwathgovind/meteor,yalexx/meteor,Puena/meteor,benstoltz/meteor,DCKT/meteor,Paulyoufu/meteor-1,rozzzly/meteor,rozzzly/meteor,cbonami/meteor,vjau/meteor,cbonami/meteor,kengchau/meteor,ljack/meteor,jagi/meteor,saisai/meteor,papimomi/meteor,benjamn/meteor,tdamsma/meteor,allanalexandre/meteor,brettle/meteor,hristaki/meteor,yonglehou/meteor,kidaa/meteor,stevenliuit/meteor,Urigo/meteor,baiyunping333/meteor,yyx990803/meteor,jdivy/meteor,planet-training/meteor,deanius/meteor,daltonrenaldo/meteor,lpinto93/meteor,msavin/meteor,karlito40/meteor,IveWong/meteor,emmerge/meteor,TribeMedia/meteor,sdeveloper/meteor,h200863057/meteor,mubassirhayat/meteor,meteor-velocity/meteor,kidaa/meteor,yyx990803/meteor,pandeysoni/meteor,TribeMedia/meteor,GrimDerp/meteor,ashwathgovind/meteor,chiefninew/meteor,benjamn/meteor,arunoda/meteor,elkingtonmcb/meteor,baiyunping333/meteor,kencheung/meteor,Ken-Liu/meteor,jenalgit/meteor,baysao/meteor,ericterpstra/meteor,shadedprofit/meteor,meteor-velocity/meteor,saisai/meteor,Ken-Liu/meteor,jeblister/meteor,bhargav175/meteor,chasertech/meteor,ericterpstra/meteor,udhayam/meteor,jrudio/meteor,katopz/meteor,ljack/meteor,stevenliuit/meteor,guazipi/meteor,kencheung/meteor,williambr/meteor,nuvipannu/meteor,TechplexEngineer/meteor,mjmasn/meteor,hristaki/meteor,somallg/meteor,ljack/meteor,zdd910/meteor,tdamsma/meteor,kencheung/meteor,EduShareOntario/meteor,alexbeletsky/meteor,chiefninew/meteor,D1no/meteor,meonkeys/meteor,yinhe007/meteor,Jonekee/meteor,eluck/meteor,chengxiaole/meteor,brdtrpp/meteor,youprofit/meteor,AlexR1712/meteor,D1no/meteor,baysao/meteor,fashionsun/meteor,dfischer/meteor,l0rd0fwar/meteor,eluck/meteor,codedogfish/meteor,henrypan/meteor,kencheung/meteor,hristaki/meteor,TribeMedia/meteor,yinhe007/meteor,mubassirhayat/meteor,guazipi/meteor,chengxiaole/meteor,johnthepink/meteor,devgrok/meteor,AnjirHossain/meteor,stevenliuit/meteor,pandeysoni/meteor,SeanOceanHu/meteor,chiefninew/meteor,jrudio/meteor,evilemon/meteor,ljack/meteor,kengchau/meteor,allanalexandre/meteor,bhargav175/meteor,newswim/meteor,mirstan/meteor,vacjaliu/meteor,h200863057/meteor,jenalgit/meteor,cbonami/meteor,williambr/meteor,michielvanoeffelen/meteor,jg3526/meteor,msavin/meteor,chiefninew/meteor,meteor-velocity/meteor,juansgaitan/meteor,codedogfish/meteor,elkingtonmcb/meteor,servel333/meteor,cog-64/meteor,alexbeletsky/meteor,vjau/meteor,Jeremy017/meteor,DAB0mB/meteor,planet-training/meteor,DCKT/meteor,somallg/meteor,yiliaofan/meteor,udhayam/meteor,qscripter/meteor,neotim/meteor,meteor-velocity/meteor,chasertech/meteor,baiyunping333/meteor,Puena/meteor,alphanso/meteor,imanmafi/meteor,lieuwex/meteor,fashionsun/meteor,zdd910/meteor,pjump/meteor,h200863057/meteor,LWHTarena/meteor,vjau/meteor,chmac/meteor,aldeed/meteor,Eynaliyev/meteor,pjump/meteor,deanius/meteor,chinasb/meteor,lieuwex/meteor,allanalexandre/meteor,udhayam/meteor,yanisIk/meteor,cbonami/meteor,luohuazju/meteor,daltonrenaldo/meteor,cbonami/meteor,queso/meteor,bhargav175/meteor,colinligertwood/meteor,williambr/meteor,4commerce-technologies-AG/meteor,whip112/meteor,Theviajerock/meteor,michielvanoeffelen/meteor,udhayam/meteor,shrop/meteor,somallg/meteor,jrudio/meteor,PatrickMcGuinness/meteor,Jeremy017/meteor,johnthepink/meteor,Eynaliyev/meteor,eluck/meteor,dev-bobsong/meteor,Eynaliyev/meteor,skarekrow/meteor,deanius/meteor,kengchau/meteor,DAB0mB/meteor,sclausen/meteor,emmerge/meteor,IveWong/meteor,wmkcc/meteor,jirengu/meteor,alexbeletsky/meteor,chengxiaole/meteor,yonas/meteor-freebsd,emmerge/meteor,yonas/meteor-freebsd,steedos/meteor,Prithvi-A/meteor,devgrok/meteor,Eynaliyev/meteor,calvintychan/meteor,shrop/meteor,kengchau/meteor,brettle/meteor,queso/meteor,yalexx/meteor,juansgaitan/meteor,AnthonyAstige/meteor,shmiko/meteor,Profab/meteor,sclausen/meteor,AnthonyAstige/meteor,lassombra/meteor,4commerce-technologies-AG/meteor,guazipi/meteor,lawrenceAIO/meteor,deanius/meteor,modulexcite/meteor,yanisIk/meteor,judsonbsilva/meteor,skarekrow/meteor,whip112/meteor,yanisIk/meteor,jrudio/meteor,qscripter/meteor,Prithvi-A/meteor,namho102/meteor,planet-training/meteor,AnthonyAstige/meteor,juansgaitan/meteor,deanius/meteor,Ken-Liu/meteor,baiyunping333/meteor,guazipi/meteor,mirstan/meteor,bhargav175/meteor,jagi/meteor,baiyunping333/meteor,ljack/meteor,judsonbsilva/meteor,luohuazju/meteor,shmiko/meteor,dboyliao/meteor,DCKT/meteor,chmac/meteor,mirstan/meteor,IveWong/meteor,allanalexandre/meteor,sitexa/meteor,Jonekee/meteor,esteedqueen/meteor,neotim/meteor,dev-bobsong/meteor,paul-barry-kenzan/meteor,wmkcc/meteor,lieuwex/meteor,Urigo/meteor,rozzzly/meteor,GrimDerp/meteor,TribeMedia/meteor,jagi/meteor,nuvipannu/meteor,AnjirHossain/meteor,rabbyalone/meteor,whip112/meteor,namho102/meteor,4commerce-technologies-AG/meteor,lpinto93/meteor,kidaa/meteor,zdd910/meteor,Ken-Liu/meteor,johnthepink/meteor,Puena/meteor,johnthepink/meteor,evilemon/meteor,EduShareOntario/meteor,neotim/meteor,yonas/meteor-freebsd,shmiko/meteor,yiliaofan/meteor,Theviajerock/meteor,wmkcc/meteor,henrypan/meteor,saisai/meteor,Paulyoufu/meteor-1,TechplexEngineer/meteor,akintoey/meteor,lpinto93/meteor,jirengu/meteor,yyx990803/meteor,Theviajerock/meteor,chinasb/meteor,jeblister/meteor,ljack/meteor,cherbst/meteor,GrimDerp/meteor,l0rd0fwar/meteor,elkingtonmcb/meteor,benstoltz/meteor,pjump/meteor,esteedqueen/meteor,planet-training/meteor,pjump/meteor,Jeremy017/meteor,calvintychan/meteor,HugoRLopes/meteor,AnjirHossain/meteor,karlito40/meteor,yiliaofan/meteor,yinhe007/meteor,yinhe007/meteor,chinasb/meteor,paul-barry-kenzan/meteor,IveWong/meteor,alexbeletsky/meteor,henrypan/meteor,mirstan/meteor,Urigo/meteor,alphanso/meteor,servel333/meteor,benjamn/meteor,yalexx/meteor,whip112/meteor,sitexa/meteor,dandv/meteor,evilemon/meteor,imanmafi/meteor,calvintychan/meteor,arunoda/meteor,Prithvi-A/meteor,chmac/meteor,elkingtonmcb/meteor,papimomi/meteor,Theviajerock/meteor,lawrenceAIO/meteor,alphanso/meteor,wmkcc/meteor,dev-bobsong/meteor,aldeed/meteor,brettle/meteor,yyx990803/meteor,newswim/meteor,mjmasn/meteor,pandeysoni/meteor,msavin/meteor,qscripter/meteor,joannekoong/meteor,jirengu/meteor,aleclarson/meteor,paul-barry-kenzan/meteor,aramk/meteor,Profab/meteor,chinasb/meteor,akintoey/meteor,juansgaitan/meteor,johnthepink/meteor,LWHTarena/meteor,daslicht/meteor,daslicht/meteor,Profab/meteor,DAB0mB/meteor,ndarilek/meteor,esteedqueen/meteor,meonkeys/meteor,l0rd0fwar/meteor,IveWong/meteor,servel333/meteor,lassombra/meteor,evilemon/meteor,kencheung/meteor,jg3526/meteor,HugoRLopes/meteor,somallg/meteor,mjmasn/meteor,queso/meteor,chiefninew/meteor,esteedqueen/meteor,IveWong/meteor,JesseQin/meteor,modulexcite/meteor,newswim/meteor,Jonekee/meteor,Quicksteve/meteor,Paulyoufu/meteor-1,rozzzly/meteor,mjmasn/meteor,iman-mafi/meteor,JesseQin/meteor,l0rd0fwar/meteor,eluck/meteor,Jonekee/meteor,cherbst/meteor,yiliaofan/meteor,Eynaliyev/meteor,judsonbsilva/meteor,codingang/meteor,shmiko/meteor,newswim/meteor,sclausen/meteor,paul-barry-kenzan/meteor,Puena/meteor,yanisIk/meteor,AnjirHossain/meteor,cherbst/meteor,imanmafi/meteor,ndarilek/meteor,sdeveloper/meteor,Jeremy017/meteor,lorensr/meteor,lpinto93/meteor,luohuazju/meteor,papimomi/meteor,vacjaliu/meteor,steedos/meteor,daslicht/meteor,sunny-g/meteor,zdd910/meteor,elkingtonmcb/meteor,mubassirhayat/meteor,chengxiaole/meteor,meonkeys/meteor,yonglehou/meteor,Ken-Liu/meteor,h200863057/meteor,Jonekee/meteor,lieuwex/meteor,guazipi/meteor,Paulyoufu/meteor-1,michielvanoeffelen/meteor,dandv/meteor,esteedqueen/meteor,benjamn/meteor,yonas/meteor-freebsd,bhargav175/meteor,Urigo/meteor,TechplexEngineer/meteor,aramk/meteor,l0rd0fwar/meteor,SeanOceanHu/meteor,mjmasn/meteor,Eynaliyev/meteor,chiefninew/meteor,rabbyalone/meteor,AnjirHossain/meteor,saisai/meteor,D1no/meteor,jenalgit/meteor,chmac/meteor,servel333/meteor,ljack/meteor,katopz/meteor,papimomi/meteor,pjump/meteor,D1no/meteor,neotim/meteor,queso/meteor,karlito40/meteor,codingang/meteor,yinhe007/meteor,justintung/meteor,meonkeys/meteor,HugoRLopes/meteor,4commerce-technologies-AG/meteor,baysao/meteor,daltonrenaldo/meteor,codingang/meteor,paul-barry-kenzan/meteor,lorensr/meteor,alphanso/meteor,alphanso/meteor,jeblister/meteor,Hansoft/meteor,Ken-Liu/meteor,Prithvi-A/meteor,chengxiaole/meteor,shrop/meteor,dev-bobsong/meteor,paul-barry-kenzan/meteor,lieuwex/meteor,ashwathgovind/meteor,pandeysoni/meteor,kengchau/meteor,mauricionr/meteor,HugoRLopes/meteor,judsonbsilva/meteor,imanmafi/meteor,henrypan/meteor,emmerge/meteor,pandeysoni/meteor,udhayam/meteor,D1no/meteor,aldeed/meteor,DCKT/meteor,dandv/meteor,jenalgit/meteor,yonglehou/meteor,joannekoong/meteor,shmiko/meteor,lawrenceAIO/meteor,rabbyalone/meteor,whip112/meteor,pandeysoni/meteor,katopz/meteor,yalexx/meteor,katopz/meteor,hristaki/meteor,ndarilek/meteor,modulexcite/meteor,Puena/meteor,jg3526/meteor,karlito40/meteor,HugoRLopes/meteor,rozzzly/meteor,chmac/meteor,HugoRLopes/meteor,mubassirhayat/meteor,AnjirHossain/meteor,planet-training/meteor,AnthonyAstige/meteor,yalexx/meteor,meonkeys/meteor,evilemon/meteor,eluck/meteor,codedogfish/meteor,Quicksteve/meteor,qscripter/meteor,Paulyoufu/meteor-1,IveWong/meteor,SeanOceanHu/meteor,henrypan/meteor,nuvipannu/meteor,sunny-g/meteor,youprofit/meteor,jenalgit/meteor,Hansoft/meteor,meteor-velocity/meteor,skarekrow/meteor,stevenliuit/meteor,codedogfish/meteor,calvintychan/meteor,allanalexandre/meteor,benjamn/meteor,AnthonyAstige/meteor,cherbst/meteor,Prithvi-A/meteor,yyx990803/meteor,codingang/meteor,youprofit/meteor,vjau/meteor,aleclarson/meteor,yonglehou/meteor,judsonbsilva/meteor,l0rd0fwar/meteor,Jeremy017/meteor,AlexR1712/meteor,PatrickMcGuinness/meteor,karlito40/meteor,DAB0mB/meteor,chmac/meteor,JesseQin/meteor,saisai/meteor,yiliaofan/meteor,mauricionr/meteor,neotim/meteor,brettle/meteor,jdivy/meteor,chengxiaole/meteor,calvintychan/meteor,planet-training/meteor,neotim/meteor,Prithvi-A/meteor,justintung/meteor,brdtrpp/meteor,fashionsun/meteor,aramk/meteor,rabbyalone/meteor,colinligertwood/meteor,somallg/meteor,Theviajerock/meteor,wmkcc/meteor,chengxiaole/meteor,lassombra/meteor,vacjaliu/meteor,colinligertwood/meteor,namho102/meteor,Jonekee/meteor,cherbst/meteor,yanisIk/meteor,colinligertwood/meteor,arunoda/meteor,benstoltz/meteor,AlexR1712/meteor,mauricionr/meteor,chinasb/meteor,dev-bobsong/meteor,juansgaitan/meteor,queso/meteor,chasertech/meteor,guazipi/meteor,somallg/meteor,shrop/meteor,chasertech/meteor,framewr/meteor,benstoltz/meteor,wmkcc/meteor,sunny-g/meteor,cog-64/meteor,michielvanoeffelen/meteor,mauricionr/meteor,jeblister/meteor,Jonekee/meteor,baysao/meteor,AlexR1712/meteor,DCKT/meteor,daltonrenaldo/meteor,sdeveloper/meteor,LWHTarena/meteor,johnthepink/meteor,hristaki/meteor,yanisIk/meteor,sclausen/meteor,colinligertwood/meteor,benjamn/meteor,arunoda/meteor,Quicksteve/meteor,aldeed/meteor,framewr/meteor,iman-mafi/meteor,judsonbsilva/meteor,baiyunping333/meteor,zdd910/meteor,Profab/meteor,DAB0mB/meteor,servel333/meteor,jg3526/meteor,youprofit/meteor,oceanzou123/meteor,lorensr/meteor,mubassirhayat/meteor,lawrenceAIO/meteor,codedogfish/meteor,lawrenceAIO/meteor,henrypan/meteor,jg3526/meteor,dboyliao/meteor,dandv/meteor,yonas/meteor-freebsd,chasertech/meteor,oceanzou123/meteor,dboyliao/meteor,chiefninew/meteor,somallg/meteor,emmerge/meteor,LWHTarena/meteor,shadedprofit/meteor,cog-64/meteor,AlexR1712/meteor,PatrickMcGuinness/meteor,dfischer/meteor,kencheung/meteor,aldeed/meteor,cog-64/meteor,daltonrenaldo/meteor,luohuazju/meteor,youprofit/meteor,oceanzou123/meteor,ericterpstra/meteor,JesseQin/meteor,sunny-g/meteor | ---
+++
@@ -28,5 +28,18 @@
enableLocationRefresh();
locationDep.depend();
return location;
+ },
+ // simple version of location; just lat and lng
+ latLng: function () {
+ var loc = Geolocation.currentLocation();
+
+ if (loc) {
+ return {
+ lat: loc.coords.latitude,
+ lng: loc.coords.longitude
+ };
+ }
+
+ return null;
}
}; |
af56a39be34c4c42ffffbcf9f5dff5bba268bb8a | src/components/Modal.js | src/components/Modal.js | import React from 'react'
import styled from 'styled-components'
const Modal = props =>
props.isOpen ? (
<ModalContainer>
<ModalContent>{props.children}</ModalContent>
</ModalContainer>
) : (
<div />
)
const ModalContainer = styled.div`
display: flex;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
padding: 50px;
`
const ModalContent = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
max-width: 600px;
min-height: 200px;
border-radius: 4px;
background-color: ${props => props.theme.paletteTertiary};
box-shadow: rgba(25, 17, 34, 0.05) 0px 3px 10px;
padding: 5rem 2rem;
`
export default Modal
| import React from 'react'
import styled from 'styled-components'
import Close from 'react-icons/lib/md/close'
const Modal = props =>
props.isOpen ? (
<ModalContainer>
<ModalContent>
<CloseIcon onClick={() => props.handleClose()} />
{props.children}
</ModalContent>
</ModalContainer>
) : (
<div />
)
const ModalContainer = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
padding: 50px;
`
const ModalContent = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
max-width: 600px;
min-height: 200px;
border-radius: 4px;
background-color: ${props => props.theme.paletteTertiary};
box-shadow: rgba(25, 17, 34, 0.05) 0px 3px 10px;
padding: 2rem 2rem 5rem 2rem;
`
const CloseIcon = styled(Close)`
width: 2rem;
height: 2rem;
cursor: pointer;
color: ${props => props.theme.paletteFontPrimary};
padding-left: 80%;
margin: 0 0 4rem 0;
`
export default Modal
| Add close icon to modal window | Add close icon to modal window
| JavaScript | mit | h-simpson/hughsimpson.me,h-simpson/hughsimpson.me | ---
+++
@@ -1,10 +1,14 @@
import React from 'react'
import styled from 'styled-components'
+import Close from 'react-icons/lib/md/close'
const Modal = props =>
props.isOpen ? (
<ModalContainer>
- <ModalContent>{props.children}</ModalContent>
+ <ModalContent>
+ <CloseIcon onClick={() => props.handleClose()} />
+ {props.children}
+ </ModalContent>
</ModalContainer>
) : (
<div />
@@ -12,6 +16,7 @@
const ModalContainer = styled.div`
display: flex;
+ flex-direction: column;
justify-content: center;
align-items: center;
position: fixed;
@@ -35,7 +40,16 @@
border-radius: 4px;
background-color: ${props => props.theme.paletteTertiary};
box-shadow: rgba(25, 17, 34, 0.05) 0px 3px 10px;
- padding: 5rem 2rem;
+ padding: 2rem 2rem 5rem 2rem;
+`
+
+const CloseIcon = styled(Close)`
+ width: 2rem;
+ height: 2rem;
+ cursor: pointer;
+ color: ${props => props.theme.paletteFontPrimary};
+ padding-left: 80%;
+ margin: 0 0 4rem 0;
`
export default Modal |
254a3a85d6ca2e769949c7062bb6035dcfd9cd11 | addon/components/ilios-calendar-event.js | addon/components/ilios-calendar-event.js | import Ember from 'ember';
import { default as CalendarEvent } from 'el-calendar/components/calendar-event';
import layout from '../templates/components/ilios-calendar-event';
import moment from 'moment';
const {computed, Handlebars} = Ember;
const {SafeString} = Handlebars;
export default CalendarEvent.extend({
layout,
event: null,
timeFormat: 'h:mma',
classNames: ['event', 'event-pos', 'ilios-calendar-event', 'event.eventClass', 'day'],
tooltipContent: computed('event', function(){
let str = this.get('event.location') + '<br />' +
moment(this.get('event.startDate')).format(this.get('timeFormat')) + ' - ' +
moment(this.get('event.endDate')).format(this.get('timeFormat')) + '<br />' +
this.get('event.name');
return str;
}),
style: computed(function() {
let escape = Handlebars.Utils.escapeExpression;
return new SafeString(
`top: ${escape(this.calculateTop())}%;
height: ${escape(this.calculateHeight())}%;
left: ${escape(this.calculateLeft())}%;
width: ${escape(this.calculateWidth())}%;`
);
}),
click(){
this.sendAction('action', this.get('event'));
}
});
| import Ember from 'ember';
import { default as CalendarEvent } from 'el-calendar/components/calendar-event';
import layout from '../templates/components/ilios-calendar-event';
import moment from 'moment';
const {computed, Handlebars} = Ember;
const {SafeString} = Handlebars;
export default CalendarEvent.extend({
layout,
event: null,
timeFormat: 'h:mma',
classNameBindings: [':event', ':event-pos', ':ilios-calendar-event', 'event.eventClass', ':day'],
tooltipContent: computed('event', function(){
let str = this.get('event.location') + '<br />' +
moment(this.get('event.startDate')).format(this.get('timeFormat')) + ' - ' +
moment(this.get('event.endDate')).format(this.get('timeFormat')) + '<br />' +
this.get('event.name');
return str;
}),
style: computed(function() {
let escape = Handlebars.Utils.escapeExpression;
return new SafeString(
`top: ${escape(this.calculateTop())}%;
height: ${escape(this.calculateHeight())}%;
left: ${escape(this.calculateLeft())}%;
width: ${escape(this.calculateWidth())}%;`
);
}),
click(){
this.sendAction('action', this.get('event'));
}
});
| Fix single event class bindings | Fix single event class bindings
| JavaScript | mit | ilios/calendar,jrjohnson/calendar,stopfstedt/calendar,stopfstedt/calendar,ilios/calendar,jrjohnson/calendar | ---
+++
@@ -10,7 +10,7 @@
layout,
event: null,
timeFormat: 'h:mma',
- classNames: ['event', 'event-pos', 'ilios-calendar-event', 'event.eventClass', 'day'],
+ classNameBindings: [':event', ':event-pos', ':ilios-calendar-event', 'event.eventClass', ':day'],
tooltipContent: computed('event', function(){
let str = this.get('event.location') + '<br />' +
moment(this.get('event.startDate')).format(this.get('timeFormat')) + ' - ' + |
4875769e5f7b38642e76ef8996058b644b45aae2 | src/defaultContainer.js | src/defaultContainer.js | import {formatString} from './utils';
import HostStorage from './Storage/HostStorage';
import ContextualIdentities from './ContextualIdentity';
import ExtendedURL from './ExtendedURL';
export async function buildDefaultContainer(preferences, url) {
url = new ExtendedURL(url);
let name = preferences['defaultContainer.containerName'];
name = formatString(name, {
ms: Date.now(),
domain: url.domain,
fqdn: url.host,
host: url.host,
tld: url.tld,
});
// Get cookieStoreId
const containers = await ContextualIdentities.get(name);
let cookieStoreId;
if (containers.length > 0) {
cookieStoreId = containers[0].cookieStoreId;
} else {
// Create a default container
const container = await ContextualIdentities.create(name);
cookieStoreId = container.cookieStoreId;
}
// Add a rule if necessary
const ruleAddition = preferences['defaultContainer.ruleAddition'];
if (ruleAddition) {
try {
const host = formatString(ruleAddition, {
domain: url.domain,
fqdn: url.host,
host: url.host,
tld: url.tld,
});
await HostStorage.set({
host: host,
cookieStoreId,
containerName: name,
enabled: true,
});
} catch (e) {
console.error('Couldn\'t add rule', ruleAddition, e);
}
}
return cookieStoreId;
}
| import {formatString} from './utils';
import HostStorage from './Storage/HostStorage';
import ContextualIdentities from './ContextualIdentity';
import ExtendedURL from './ExtendedURL';
import PreferenceStorage from './Storage/PreferenceStorage';
export async function buildDefaultContainer(preferences, url) {
url = new ExtendedURL(url);
let name = preferences['defaultContainer.containerName'];
name = formatString(name, {
ms: Date.now(),
domain: url.domain,
fqdn: url.host,
host: url.host,
tld: url.tld,
});
// Get cookieStoreId
const containers = await ContextualIdentities.get(name);
let cookieStoreId;
if (containers.length > 0) {
cookieStoreId = containers[0].cookieStoreId;
} else {
// Create a default container
const container = await ContextualIdentities.create(name);
cookieStoreId = container.cookieStoreId;
}
// Add a rule if necessary
const ruleAddition = preferences['defaultContainer.ruleAddition'];
if (ruleAddition) {
try {
const host = formatString(ruleAddition, {
domain: url.domain,
fqdn: url.host,
host: url.host,
tld: url.tld,
});
await HostStorage.set({
host: host,
cookieStoreId,
containerName: name,
enabled: true,
});
} catch (e) {
console.error('Couldn\'t add rule', ruleAddition, e);
}
}
const lifetime = preferences['defaultContainer.lifetime'];
if(lifetime !== 'forever'){
await PreferenceStorage.set({
key: `containers.${cookieStoreId}.lifetime`,
value: lifetime,
});
}
return cookieStoreId;
}
| Save 'lifetime' preference for created default containers | Save 'lifetime' preference for created default containers
| JavaScript | mit | kintesh/containerise,kintesh/containerise | ---
+++
@@ -2,6 +2,7 @@
import HostStorage from './Storage/HostStorage';
import ContextualIdentities from './ContextualIdentity';
import ExtendedURL from './ExtendedURL';
+import PreferenceStorage from './Storage/PreferenceStorage';
export async function buildDefaultContainer(preferences, url) {
url = new ExtendedURL(url);
@@ -46,5 +47,13 @@
}
}
+ const lifetime = preferences['defaultContainer.lifetime'];
+ if(lifetime !== 'forever'){
+ await PreferenceStorage.set({
+ key: `containers.${cookieStoreId}.lifetime`,
+ value: lifetime,
+ });
+ }
+
return cookieStoreId;
} |
0cacc1182e66fe3cc8ac68639309b1bc5c8714b2 | src/models/variables.js | src/models/variables.js | 'use strict';
const readline = require('readline');
const _ = require('lodash');
const Bacon = require('baconjs');
function parseLine (line) {
const p = line.split('=');
const key = p[0];
p.shift();
const value = p.join('=');
if (line.trim()[0] !== '#' && p.length > 0) {
return [key.trim(), value.trim()];
}
return null;
};
function render (variables, addExport) {
return _(variables)
.map(({ name, value }) => {
if (addExport) {
const escapedValue = value.replace(/'/g, '\'\\\'\'');
return `export ${name}='${escapedValue}';`;
}
return `${name}=${value}`;
})
.join('\n');
};
function readFromStdin () {
return Bacon.fromBinder((sink) => {
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false,
});
const vars = {};
rl.on('line', (line) => {
const res = parseLine(line);
if (res) {
const [name, value] = res;
vars[name] = value;
}
});
rl.on('close', () => {
console.log(vars);
sink(new Bacon.Next(vars));
sink(new Bacon.End());
});
});
};
module.exports = {
parseLine,
render,
readFromStdin,
};
| 'use strict';
const readline = require('readline');
const _ = require('lodash');
const Bacon = require('baconjs');
function parseLine (line) {
const p = line.split('=');
const key = p[0];
p.shift();
const value = p.join('=');
if (line.trim()[0] !== '#' && p.length > 0) {
return [key.trim(), value.trim()];
}
return null;
};
function render (variables, addExport) {
return _(variables)
.map(({ name, value }) => {
if (addExport) {
const escapedValue = value.replace(/'/g, '\'\\\'\'');
return `export ${name}='${escapedValue}';`;
}
return `${name}=${value}`;
})
.join('\n');
};
function readFromStdin () {
return Bacon.fromBinder((sink) => {
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false,
});
const vars = {};
rl.on('line', (line) => {
const res = parseLine(line);
if (res) {
const [name, value] = res;
vars[name] = value;
}
});
rl.on('close', () => {
sink(new Bacon.Next(vars));
sink(new Bacon.End());
});
});
};
module.exports = {
parseLine,
render,
readFromStdin,
};
| Remove leftover `console.log` in `clever env import` | Remove leftover `console.log` in `clever env import` | JavaScript | apache-2.0 | CleverCloud/clever-tools,CleverCloud/clever-tools,CleverCloud/clever-tools | ---
+++
@@ -48,7 +48,6 @@
});
rl.on('close', () => {
- console.log(vars);
sink(new Bacon.Next(vars));
sink(new Bacon.End());
}); |
248123f9306c6805df7026153dd13e98113e9e77 | server/src/main/webapp/resources/js/dashboard.js | server/src/main/webapp/resources/js/dashboard.js |
"use strict";
$(function () {
//-----------------------
//- Dashboard > Authentication Requests Chart -
//-----------------------
try{
var authChartData = JSON.parse($("#authenticationChartJson").val());
console.log("authentication chart data");
console.log(authChartData);
var authenticationRequestsChartData = {
labels : authChartData.labels,
datasets : [
{
label : "Successful Login",
fill : false,
backgroundColor : "#00BE79",
data : authChartData.success
}, {
label : "Failed Attempts",
fill : false,
backgroundColor : "#F39C12",
data : authChartData.failure
}
]
};
var authenticationRequestsChartOptions = {
responsive: true,
scales: {
yAxes: [{
ticks: {
suggestedMin: 0,
suggestedMax: 1000
}
}]
}
};
console.log(authenticationRequestsChartData);
console.log(authenticationRequestsChartOptions);
// Get context with jQuery - using jQuery's .get() method.
var authenticationRequestsChartCanvas = $("#authenticationRequestsChart").get(0).getContext("2d");
// This will get the first returned node in the jQuery collection.
//Create the line chart
var authenticationRequestsChart = new Chart(authenticationRequestsChartCanvas, {
type: 'line',
data: authenticationRequestsChartData,
options: authenticationRequestsChartOptions
});
}catch(error){
console.log(error);
}
}); |
"use strict";
$(function () {
//-----------------------
//- Dashboard > Authentication Requests Chart -
//-----------------------
try{
var authChartData = JSON.parse($("#authenticationChartJson").val());
console.log("authentication chart data");
console.log(authChartData);
var authenticationRequestsChartData = {
labels : authChartData.labels,
datasets : [
{
label : "Successful Login",
fill : false,
backgroundColor : "#00BE79",
data : authChartData.success
}, {
label : "Failed Attempts",
fill : false,
backgroundColor : "#F39C12",
data : authChartData.failure
}
]
};
var authenticationRequestsChartOptions = {
responsive: true,
scales: {
yAxes: [{
ticks: {
suggestedMin: 0,
suggestedMax: 10
}
}]
}
};
console.log(authenticationRequestsChartData);
console.log(authenticationRequestsChartOptions);
// Get context with jQuery - using jQuery's .get() method.
var authenticationRequestsChartCanvas = $("#authenticationRequestsChart").get(0).getContext("2d");
// This will get the first returned node in the jQuery collection.
//Create the line chart
var authenticationRequestsChart = new Chart(authenticationRequestsChartCanvas, {
type: 'line',
data: authenticationRequestsChartData,
options: authenticationRequestsChartOptions
});
}catch(error){
console.log(error);
}
}); | Fix suggestedMax in chart when there is no data to display | Fix suggestedMax in chart when there is no data to display | JavaScript | mit | madumlao/oxTrust,madumlao/oxTrust,GluuFederation/oxTrust,GluuFederation/oxTrust,GluuFederation/oxTrust,madumlao/oxTrust,madumlao/oxTrust,GluuFederation/oxTrust,GluuFederation/oxTrust,madumlao/oxTrust | ---
+++
@@ -38,7 +38,7 @@
yAxes: [{
ticks: {
suggestedMin: 0,
- suggestedMax: 1000
+ suggestedMax: 10
}
}]
} |
63cd19e26f0cd5629372fb50c0244986c3ef1bbd | app/client/templates/posts/post_submit.js | app/client/templates/posts/post_submit.js | Template.postSubmit.events({
'submit form': function(e) {
e.preventDefault();
var post = {
url: $(e.target).find('[name=url]').val(),
title: $(e.target).find('[name=title]').val()
};
post.slug = slugify(post.title);
post._id = Posts.insert(post);
Router.go('postPage', post);
}
}); | Template.postSubmit.events({
'submit form': function(e) {
e.preventDefault();
var post = {
url: $(e.target).find('[name=url]').val(),
title: $(e.target).find('[name=title]').val()
};
post.slug = slugify(post.title);
Meteor.call('postInsert', post, function(error, result) {
// display the error to the user and abort
if (error)
return alert(error.reason);
Router.go('postPage', {_id: result._id});
});
}
}); | Stop if there's an error | Stop if there's an error
| JavaScript | mit | drainpip/music-management-system,drainpip/music-management-system | ---
+++
@@ -9,7 +9,11 @@
post.slug = slugify(post.title);
- post._id = Posts.insert(post);
- Router.go('postPage', post);
+ Meteor.call('postInsert', post, function(error, result) {
+ // display the error to the user and abort
+ if (error)
+ return alert(error.reason);
+ Router.go('postPage', {_id: result._id});
+ });
}
}); |
e3c9a348450c91830d5e36a792563fffcbe7d992 | app/extensions/safe/server-routes/safe.js | app/extensions/safe/server-routes/safe.js | import logger from 'logger';
import { getAppObj } from '../network';
const safeRoute = {
method : 'GET',
path : '/safe/{link*}',
handler : async ( request, reply ) =>
{
try
{
const link = `safe://${request.params.link}`;
const app = getAppObj();
logger.verbose( `Handling SAFE req: ${link}` );
if ( !app )
{
return reply( 'SAFE not connected yet' );
}
const data = await app.webFetch( link );
return reply( data.body ).type( data.headers['Content-Type'] );
}
catch ( e )
{
logger.error( e );
return reply( e.message || e );
}
}
}
export default safeRoute;
| import logger from 'logger';
import { getAppObj } from '../network';
const safeRoute = {
method : 'GET',
path : '/safe/{link*}',
handler : async ( request, reply ) =>
{
try
{
const link = `safe://${request.params.link}`;
const app = getAppObj();
logger.verbose( `Handling SAFE req: ${link}` );
if ( !app )
{
return reply( 'SAFE not connected yet' );
}
const data = await app.webFetch( link );
return reply( data.body )
.type( data.headers['Content-Type'] )
.header( 'Content-Encoding', 'chunked');
}
catch ( e )
{
logger.error( e );
return reply( e.message || e );
}
}
}
export default safeRoute;
| Add content-encoding headers for webfetch response. Set 'chunked' | fix/webFetch-encoding: Add content-encoding headers for webfetch response. Set 'chunked'
| JavaScript | mit | joshuef/peruse,joshuef/peruse | ---
+++
@@ -21,7 +21,9 @@
const data = await app.webFetch( link );
- return reply( data.body ).type( data.headers['Content-Type'] );
+ return reply( data.body )
+ .type( data.headers['Content-Type'] )
+ .header( 'Content-Encoding', 'chunked');
}
catch ( e )
{ |
9403627fad7d97e27f83643099d264a3b17b9b4a | examples/minimal/app.js | examples/minimal/app.js | // Test functions
function multiply (a, b) {
'use strict'
return a * b
}
function divide (a, b) {
'use strict'
try {
return multiply(add(a, b), a, b) / c
} catch (e) {
Opbeat.captureException(e)
}
}
document.querySelector('.btn-test4').addEventListener('click', function () {
divide(123 / 2)
}, false)
| // Test functions
function multiply (a, b) {
'use strict'
return a * b
}
function divide (a, b) {
'use strict'
try {
return multiply(add(a, b), a, b) / c
} catch (e) {
_opbeat('captureException', e)
}
}
document.querySelector('.btn-test4').addEventListener('click', function () {
divide(123 / 2)
}, false)
| Adjust minimal-example to new API | Adjust minimal-example to new API
| JavaScript | mit | opbeat/opbeat-angular,opbeat/opbeat-react,jahtalab/opbeat-js,opbeat/opbeat-js-core,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-js-core,opbeat/opbeat-angular,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-angular | ---
+++
@@ -9,7 +9,7 @@
try {
return multiply(add(a, b), a, b) / c
} catch (e) {
- Opbeat.captureException(e)
+ _opbeat('captureException', e)
}
}
|
9fd4432e5a4ec9f810bcc44ecebef970af6bf3ed | spec/javascripts/widgets/comment-toggler-spec.js | spec/javascripts/widgets/comment-toggler-spec.js | /* Copyright (c) 2010, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
*/
describe("Diaspora.Widgets.CommentToggler", function() {
var commentToggler;
beforeEach(function() {
jasmine.Clock.useMock();
spec.loadFixture("aspects_index_with_posts");
Diaspora.I18n.locale = { };
commentToggler = Diaspora.BaseWidget.instantiate("CommentToggler", $(".stream_element:first ul.comments"));
});
describe("toggleComments", function() {
it("toggles class hidden on the comments ul", function () {
expect($("ul.comments:first")).not.toHaveClass("hidden");
commentToggler.hideComments($.Event());
jasmine.Clock.tick(200);
expect($("ul.comments:first")).toHaveClass("hidden");
});
it("changes the text on the show comments link", function() {
var link = $("a.toggle_post_comments");
Diaspora.I18n.loadLocale({'comments' : {'show': 'comments.show pl'}}, 'en');
expect(link.text()).toEqual("Hide all comments");
commentToggler.hideComments($.Event());
jasmine.Clock.tick(200);
expect(link.text()).toEqual("comments.show pl");
});
});
}); | /* Copyright (c) 2010, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
*/
describe("Diaspora.Widgets.CommentToggler", function() {
var commentToggler;
beforeEach(function() {
jasmine.Clock.useMock();
spec.loadFixture("aspects_index_with_posts");
Diaspora.I18n.locale = { };
commentToggler = Diaspora.BaseWidget.instantiate("CommentToggler", $(".stream_element:first ul.comments"));
});
describe("toggleComments", function() {
it("toggles class hidden on the comments ul", function () {
expect($("ul.comments:first")).not.toHaveClass("hidden");
commentToggler.hideComments($.Event());
jasmine.Clock.tick(200);
expect($("ul.comments:first")).toHaveClass("hidden");
});
it("changes the text on the show comments link", function() {
var link = $("a.toggle_post_comments:first");
Diaspora.I18n.loadLocale({'comments' : {'show': 'comments.show pl'}}, 'en');
expect(link.text()).toEqual("Hide all comments");
commentToggler.hideComments($.Event());
jasmine.Clock.tick(200);
expect(link.text()).toEqual("comments.show pl");
});
});
});
| Fix a jasmine test in CommentToggler | Fix a jasmine test in CommentToggler
| JavaScript | agpl-3.0 | SuperTux88/diaspora,Amadren/diaspora,Flaburgan/diaspora,despora/diaspora,despora/diaspora,spixi/diaspora,SuperTux88/diaspora,Flaburgan/diaspora,geraspora/diaspora,diaspora/diaspora,spixi/diaspora,spixi/diaspora,spixi/diaspora,Muhannes/diaspora,jhass/diaspora,geraspora/diaspora,SuperTux88/diaspora,despora/diaspora,Muhannes/diaspora,Amadren/diaspora,Muhannes/diaspora,jhass/diaspora,KentShikama/diaspora,geraspora/diaspora,diaspora/diaspora,diaspora/diaspora,geraspora/diaspora,Amadren/diaspora,diaspora/diaspora,Amadren/diaspora,jhass/diaspora,KentShikama/diaspora,jhass/diaspora,KentShikama/diaspora,SuperTux88/diaspora,Muhannes/diaspora,KentShikama/diaspora,Flaburgan/diaspora,despora/diaspora,Flaburgan/diaspora | ---
+++
@@ -21,7 +21,7 @@
});
it("changes the text on the show comments link", function() {
- var link = $("a.toggle_post_comments");
+ var link = $("a.toggle_post_comments:first");
Diaspora.I18n.loadLocale({'comments' : {'show': 'comments.show pl'}}, 'en');
expect(link.text()).toEqual("Hide all comments");
commentToggler.hideComments($.Event()); |
561d5e010f91fef43bda94e7e51af6ed5cbd9792 | app/assets/javascripts/custom.js | app/assets/javascripts/custom.js | $(document).on('turbolinks:load', function () {
$("#selectImage").imagepicker({
hide_select: true,
show_label : true
});
var $container = $('.image_picker_selector');
// initialize
$container.imagesLoaded(function () {
$container.masonry({
columnWidth: 30,
itemSelector: '.thumbnail'
});
});
});
| $(document).on('turbolinks:load', function () {
$("#selectImage").imagepicker({
hide_select: true,
show_label : true
});
$("#pendingImage").imagepicker({
hide_select: true,
show_label : true
});
$("#moochedImage").imagepicker({
hide_select: true,
show_label : true
});
var $container = $('.image_picker_selector');
// initialize
$container.imagesLoaded(function () {
$container.masonry({
columnWidth: 10,
itemSelector: '.thumbnail'
});
});
});
| Use imagepicker for all forms | Use imagepicker for all forms
| JavaScript | mit | ppanagiotis/gamemooch,ppanagiotis/gamemooch,ppanagiotis/gamemooch,ppanagiotis/gamemooch | ---
+++
@@ -1,5 +1,15 @@
$(document).on('turbolinks:load', function () {
$("#selectImage").imagepicker({
+ hide_select: true,
+ show_label : true
+ });
+
+ $("#pendingImage").imagepicker({
+ hide_select: true,
+ show_label : true
+ });
+
+ $("#moochedImage").imagepicker({
hide_select: true,
show_label : true
});
@@ -8,7 +18,7 @@
// initialize
$container.imagesLoaded(function () {
$container.masonry({
- columnWidth: 30,
+ columnWidth: 10,
itemSelector: '.thumbnail'
});
}); |
84bc2383b6c99b0e4696f758b5cb5fa9749fcb14 | app/assets/javascripts/editor.js | app/assets/javascripts/editor.js | /**
* Wysiwyg related javascript
*/
// =require ./lib/redactor.js
(function($){
$(document).ready( function() {
/**
* Minimal wysiwyg support
*/
$('.wysiwyg-minimal').redactor({
airButtons: ['bold', 'italic', 'deleted', '|', 'link'],
air: true
});
/**
* Basic wysiwyg support
*/
$('.wysiwyg').redactor();
/**
* Assets-aware wysiwyg support
*/
$('.wysiwyg-full').redactor({
fixed: true,
wym: true,
imageUpload: '/images',
imageGetJson: '/images',
imageUploadErrorCallback: function( o, json ) { alert( json.error ); },
fileUpload: '/uploads',
fileUploadErrorCallback: function( o, json ) { alert( json.error ); },
uploadFields: {
authenticity_token: $('meta[name="csrf-token"]').attr('content'),
assetable_type: $('.assetable_type').val(),
assetable_id: $('.assetable_id').val()
}
});
});
}(jQuery))
| /**
* Wysiwyg related javascript
*/
// =require ./lib/redactor.js
(function($){
$(document).ready( function() {
/**
* Minimal wysiwyg support
*/
$('.wysiwyg-minimal').redactor({
airButtons: ['bold', 'italic', 'deleted', '|', 'link'],
air: true
});
/**
* Basic wysiwyg support
*/
$('.wysiwyg').redactor();
/**
* Assets-aware wysiwyg support
*/
$('.wysiwyg-full').redactor({
fixed: true,
wym: true,
convertDivs: false,
imageUpload: '/images',
imageGetJson: '/images',
imageUploadErrorCallback: function( o, json ) { alert( json.error ); },
fileUpload: '/uploads',
fileUploadErrorCallback: function( o, json ) { alert( json.error ); },
uploadFields: {
authenticity_token: $('meta[name="csrf-token"]').attr('content'),
assetable_type: $('.assetable_type').val(),
assetable_id: $('.assetable_id').val()
}
});
});
}(jQuery))
| Disable convertion to divs, preserve paragraphs. | Disable convertion to divs, preserve paragraphs. | JavaScript | mit | Courseware/coursewa.re,Courseware/coursewa.re | ---
+++
@@ -25,6 +25,7 @@
$('.wysiwyg-full').redactor({
fixed: true,
wym: true,
+ convertDivs: false,
imageUpload: '/images',
imageGetJson: '/images',
imageUploadErrorCallback: function( o, json ) { alert( json.error ); }, |
a04c900f0f6aa88872d84f92fada2f4517bba9d4 | examples/lightsoff/arrow.js | examples/lightsoff/arrow.js | function pushed_arrow()
{
if(animating_board)
return true;
// TODO: Need to check that click count is 1
var direction = (this.flipped ? 1 : -1);
if(score.value + direction < 1)
return true;
score.set_value(score.value + direction);
swap_animation(direction);
gconf_client.set_int("/apps/lightsoff/score", score.value);
return true;
}
ArrowType = {
parent: Clutter.Group.type,
name: "Arrow",
class_init: function(klass, prototype)
{
prototype.set_arrow_flipped = function ()
{
this.flipped = 1;
this.remove_all();
var bkg = Clutter.Texture.new_from_file("./arrow-r.svg");
bkg.filter_quality = Clutter.TextureQuality.high;
this.add_actor(bkg);
}
},
instance_init: function(klass)
{
this.flipped = 0;
var bkg = Clutter.Texture.new_from_file("./arrow-l.svg");
bkg.filter_quality = Clutter.TextureQuality.high;
this.reactive = true;
this.signal.button_press_event.connect(pushed_arrow, this);
this.add_actor(bkg);
}};
Arrow = new GType(ArrowType);
| function pushed_arrow(actor, event)
{
if(animating_board)
return true;
// TODO: Need to check that click count is 1
var direction = (actor.flipped ? 1 : -1);
if(score.value + direction < 1)
return true;
score.set_value(score.value + direction);
swap_animation(direction);
gconf_client.set_int("/apps/lightsoff/score", score.value);
return true;
}
ArrowType = {
parent: Clutter.Group.type,
name: "Arrow",
class_init: function(klass, prototype)
{
prototype.set_arrow_flipped = function ()
{
this.flipped = 1;
this.remove_all();
var bkg = Clutter.Texture.new_from_file("./arrow-r.svg");
bkg.filter_quality = Clutter.TextureQuality.high;
this.add_actor(bkg);
}
},
instance_init: function(klass)
{
this.flipped = 0;
var bkg = Clutter.Texture.new_from_file("./arrow-l.svg");
bkg.filter_quality = Clutter.TextureQuality.high;
this.reactive = true;
this.signal.button_press_event.connect(pushed_arrow);
this.add_actor(bkg);
}};
Arrow = new GType(ArrowType);
| Fix lightsoff to not use signal this.. | Fix lightsoff to not use signal this..
svn path=/trunk/; revision=452
| JavaScript | lgpl-2.1 | danilocesar/seed,danilocesar/seed,danilocesar/seed,danilocesar/seed,danilocesar/seed | ---
+++
@@ -1,10 +1,10 @@
-function pushed_arrow()
+function pushed_arrow(actor, event)
{
if(animating_board)
return true;
// TODO: Need to check that click count is 1
- var direction = (this.flipped ? 1 : -1);
+ var direction = (actor.flipped ? 1 : -1);
if(score.value + direction < 1)
return true;
@@ -39,7 +39,7 @@
bkg.filter_quality = Clutter.TextureQuality.high;
this.reactive = true;
- this.signal.button_press_event.connect(pushed_arrow, this);
+ this.signal.button_press_event.connect(pushed_arrow);
this.add_actor(bkg);
}}; |
b49b4c23636c8264794085b33ffcc702a3d46620 | bids-validator/tests/env/load-examples.js | bids-validator/tests/env/load-examples.js | const fs = require('fs')
const { promisify } = require('util')
const request = require('sync-request')
const AdmZip = require('adm-zip')
const lockfile = require('lockfile')
const lockPromise = promisify(lockfile.lock)
const test_version = '1.2.0'
const examples_lock = 'bids-validator/tests/data/examples.lockfile'
// Wait for up to five minutes for examples to finish
// downloading in another test worker
const examples_lock_opts = { wait: 300000 }
const loadExamples = async () => {
await lockPromise(examples_lock, examples_lock_opts)
if (
!fs.existsSync(
'bids-validator/tests/data/bids-examples-' + test_version + '/',
)
) {
console.log('downloading test data')
const response = request(
'GET',
'http://github.com/bids-standard/bids-examples/archive/' +
test_version +
'.zip',
)
if (!fs.existsSync('bids-validator/tests/data')) {
fs.mkdirSync('bids-validator/tests/data')
}
fs.writeFileSync('bids-validator/tests/data/examples.zip', response.body)
const zip = new AdmZip('bids-validator/tests/data/examples.zip')
console.log('unzipping test data')
zip.extractAllTo('bids-validator/tests/data/', true)
}
lockfile.unlockSync(examples_lock)
return test_version
}
module.exports = loadExamples
| const fs = require('fs')
const { promisify } = require('util')
const request = require('sync-request')
const AdmZip = require('adm-zip')
const lockfile = require('lockfile')
const lockPromise = promisify(lockfile.lock)
const test_version = '1.2.0'
const examples_lock = 'bids-validator/tests/data/examples.lockfile'
// Wait for up to five minutes for examples to finish
// downloading in another test worker
const examples_lock_opts = { wait: 300000 }
const loadExamples = async () => {
await lockPromise(examples_lock, examples_lock_opts)
if (
!fs.existsSync(
'bids-validator/tests/data/bids-examples-' + test_version + '/',
)
) {
console.log('downloading test data')
const response = request(
'GET',
'http://github.com/bids-standard/bids-examples/archive/' +
test_version +
'.zip',
)
fs.writeFileSync('bids-validator/tests/data/examples.zip', response.body)
const zip = new AdmZip('bids-validator/tests/data/examples.zip')
console.log('unzipping test data')
zip.extractAllTo('bids-validator/tests/data/', true)
}
lockfile.unlockSync(examples_lock)
return test_version
}
module.exports = loadExamples
| Remove extraneous directory creation in examples environment. | Remove extraneous directory creation in examples environment.
| JavaScript | mit | nellh/bids-validator,nellh/bids-validator,Squishymedia/bids-validator,Squishymedia/BIDS-Validator,nellh/bids-validator | ---
+++
@@ -26,9 +26,6 @@
test_version +
'.zip',
)
- if (!fs.existsSync('bids-validator/tests/data')) {
- fs.mkdirSync('bids-validator/tests/data')
- }
fs.writeFileSync('bids-validator/tests/data/examples.zip', response.body)
const zip = new AdmZip('bids-validator/tests/data/examples.zip')
console.log('unzipping test data') |
4b707d9da54fb68888a5494fcd9d6d64036446c1 | scripts/time.js | scripts/time.js | /*
* Clock plugin using Moment.js (http://momentjs.com/) to
* format the time and date.
*
* The only exposed property, 'format', determines the
* format (see Moment.js documentation) to display time and date.
*
* Requires 'jquery' and 'moment' to be available through RequireJS.
*/
define(['jquery', 'moment'], function ($, moment) {
"use strict";
var config = {
format: 'llll'
};
function updateClock() {
var dt = moment();
var clockText = dt.format(config.format);
$('.widget-time').text(clockText);
var interval = 59 - dt.second();
if (interval < 1) {
interval = 1;
} else if (interval > 5) {
interval = 5;
}
setTimeout(updateClock, interval * 1000);
}
$(document).ready(function () {
var lang = navigator.language;
if (moment.langData(lang)) {
moment.lang(lang);
} else {
moment.lang(navigator.language.replace(/-.+/, ''));
}
updateClock();
});
return config;
});
| /*
* Clock plugin using Moment.js (http://momentjs.com/) to
* format the time and date.
*
* The only exposed property, 'format', determines the
* format (see Moment.js documentation) to display time and date.
*
* Requires 'jquery' and 'moment' to be available through RequireJS.
*/
define(['jquery', 'moment'], function ($, moment) {
"use strict";
var config = {
format: 'llll'
};
function updateClock() {
var dt = moment();
var clockText = dt.format(config.format);
$('.widget-time').text(clockText);
var interval = 59 - dt.second();
if (interval < 1) {
interval = 1;
} else if (interval > 5) {
interval = 5;
}
setTimeout(updateClock, interval * 1000);
}
$(document).ready(function () {
var lang = navigator.language;
if (moment.localeData(lang)) {
moment.locale(lang);
} else {
moment.locale(navigator.language.replace(/-.+/, ''));
}
updateClock();
});
return config;
});
| Update for new Moment.js API | Update for new Moment.js API
| JavaScript | mit | koterpillar/tianbar,koterpillar/tianbar,koterpillar/tianbar | ---
+++
@@ -29,10 +29,10 @@
$(document).ready(function () {
var lang = navigator.language;
- if (moment.langData(lang)) {
- moment.lang(lang);
+ if (moment.localeData(lang)) {
+ moment.locale(lang);
} else {
- moment.lang(navigator.language.replace(/-.+/, ''));
+ moment.locale(navigator.language.replace(/-.+/, ''));
}
updateClock();
}); |
7a49bcacbb557caca510ea8a044e4a57a62a8733 | lib/components/App.js | lib/components/App.js | import React, {Component} from 'react';
import $ from 'jquery';
import CurrentWeatherCard from './CurrentWeatherCard';
export default class App extends Component {
constructor(){
super()
this.state = {
location:'',
responseData: null,
currentData: null,
forecastData: null,
hourlyData: null,
};
}
handleInput(e) {
this.setState({
location: e.target.value,
})
}
handleSubmit(){
const currentLocation = this.state.location
$.get(`http://api.wunderground.com/api/878e77b9c3411d19/hourly/conditions/forecast10day/q/${currentLocation}.json`).then((data)=> {
this.handleData(data)
})
}
handleData(weatherData){
const keys = Object.keys(weatherData)
this.setState({
location:'',
responseData:weatherData[keys[0]],
currentData:weatherData[keys[1]],
forecastData:weatherData[keys[2]],
hourlyData:weatherData[keys[3]],
})
}
render() {
return (
<div>
<navbar>
<input type="text" value={this.state.location} onChange={this.handleInput.bind(this)}/>
<input type="submit" onClick={this.handleSubmit.bind(this)}/>
</navbar>
<h1 className="welcomeHeader">Weathrly</h1>
<CurrentWeatherCard weatherData={this.state.weatherData}/>
</div>
)
}
}
| import React, {Component} from 'react';
import $ from 'jquery';
import CurrentWeatherCard from './CurrentWeatherCard';
export default class App extends Component {
constructor(){
super()
this.state = {
location:'',
responseData: null,
currentData: null,
forecastData: null,
hourlyData: null,
};
}
handleInput(e) {
this.setState({
location: e.target.value,
})
}
handleSubmit(){
const currentLocation = this.state.location
$.get(`http://api.wunderground.com/api/878e77b9c3411d19/hourly/conditions/forecast10day/q/${currentLocation}.json`).then((data)=> {
this.handleData(data)
})
}
handleData(weatherData){
const keys = Object.keys(weatherData)
this.setState({
location:'',
responseData:weatherData[keys[0]],
currentData:weatherData[keys[1]],
forecastData:weatherData[keys[2]],
hourlyData:weatherData[keys[3]],
})
}
render() {
return (
<div>
<navbar>
<input type="text" value={this.state.location} onChange={this.handleInput.bind(this)}/>
<input type="submit" onClick={this.handleSubmit.bind(this)}/>
</navbar>
<h1 className="welcomeHeader">Weathrly</h1>
<CurrentWeatherCard currentData={this.state.currentData} forecastData={this.state.forecastData}/>
</div>
)
}
}
| Add additional property to pass to weatherCard. | Add additional property to pass to weatherCard.
| JavaScript | mit | thatPamIAm/weathrly,thatPamIAm/weathrly | ---
+++
@@ -46,7 +46,7 @@
<input type="submit" onClick={this.handleSubmit.bind(this)}/>
</navbar>
<h1 className="welcomeHeader">Weathrly</h1>
- <CurrentWeatherCard weatherData={this.state.weatherData}/>
+ <CurrentWeatherCard currentData={this.state.currentData} forecastData={this.state.forecastData}/>
</div>
)
} |
40b9521f4e05eed0bf03accf868f5a4e844e3b9f | app/routes/owner/repositories.js | app/routes/owner/repositories.js | import Ember from 'ember';
import TravisRoute from 'travis/routes/basic';
import config from 'travis/config/environment';
export default TravisRoute.extend({
needsAuth: false,
titleToken(model) {
var name = model.name || model.login;
return name;
},
model(params, transition) {
var options;
options = {};
if (this.get('auth.signedIn')) {
options.headers = {
Authorization: 'token ' + (this.auth.token())
};
}
let includes = `?include=owner.repositories,repository.default_branch,
build.commit,repository.current_build`;
let { owner } = transition.params.owner;
let url = `${config.apiEndpoint}/v3/owner/${owner}${includes}`;
return Ember.$.get(url, options);
}
});
| import Ember from 'ember';
import TravisRoute from 'travis/routes/basic';
import config from 'travis/config/environment';
export default TravisRoute.extend({
needsAuth: false,
titleToken(model) {
var name = model.name || model.login;
return name;
},
model(params, transition) {
var options;
options = {};
if (this.get('auth.signedIn')) {
options.headers = {
Authorization: 'token ' + (this.auth.token())
};
}
// eslint-disable-next-line
let includes = `?include=owner.repositories,repository.default_branch,build.commit,repository.current_build`;
let { owner } = transition.params.owner;
let url = `${config.apiEndpoint}/v3/owner/${owner}${includes}`;
return Ember.$.get(url, options);
}
});
| Remove line break in includes params | Remove line break in includes params
This was causing a 400 Invalid Request on the organizations page.
| JavaScript | mit | fotinakis/travis-web,travis-ci/travis-web,travis-ci/travis-web,fotinakis/travis-web,fotinakis/travis-web,fotinakis/travis-web,travis-ci/travis-web,travis-ci/travis-web | ---
+++
@@ -20,8 +20,8 @@
};
}
- let includes = `?include=owner.repositories,repository.default_branch,
- build.commit,repository.current_build`;
+ // eslint-disable-next-line
+ let includes = `?include=owner.repositories,repository.default_branch,build.commit,repository.current_build`;
let { owner } = transition.params.owner;
let url = `${config.apiEndpoint}/v3/owner/${owner}${includes}`;
return Ember.$.get(url, options); |
796174d58262bafa0157684ae6e28e455dec82b3 | app.js | app.js | import {Component, View, bootstrap} from 'angular2/angular2';
// Annotation section
@Component({
selector: 'my-app'
})
@View({
inline: '<h1>Hello {{ name }}</h1>'
})
// Component controller
class MyAppComponent {
constructor() {
this.name = 'Alice'
}
}
bootstrap(MyAppComponent); | import {Component, Template, bootstrap} from 'angular2/angular2';
// Annotation section
@Component({
selector: 'my-app'
})
@Template({
inline: '<h1>Hello {{ name }}</h1>'
})
// Component controller
class MyAppComponent {
constructor() {
this.name = 'Alice'
}
}
bootstrap(MyAppComponent); | Fix 'template' error replacing View with Template (suggested in blog comments) | Fix 'template' error replacing View with Template
(suggested in blog comments)
| JavaScript | mit | training-blogs/20150514-ionic-angular-2-series-introduction,training-blogs/20150514-ionic-angular-2-series-introduction,training-blogs/20150514-ionic-angular-2-series-introduction | ---
+++
@@ -1,10 +1,10 @@
-import {Component, View, bootstrap} from 'angular2/angular2';
+import {Component, Template, bootstrap} from 'angular2/angular2';
// Annotation section
@Component({
selector: 'my-app'
})
-@View({
+@Template({
inline: '<h1>Hello {{ name }}</h1>'
})
// Component controller |
533833d77577306c8250410dba1ef3332cc4c1e6 | handlers/middlewares/addedToGroup.js | handlers/middlewares/addedToGroup.js | 'use strict';
// Bot
const bot = require('../../bot');
const { replyOptions } = require('../../bot/options');
const { addGroup, managesGroup } = require('../../stores/group');
const { masterID } = require('../../config.json');
const addedToGroupHandler = async (ctx, next) => {
const msg = ctx.message;
const wasAdded = msg.new_chat_members.some(user =>
user.username === ctx.me);
if (wasAdded && ctx.from.id === masterID) {
if (!await managesGroup(ctx.chat)) {
const link = await bot.telegram.exportChatInviteLink(ctx.chat.id);
ctx.chat.link = link ? link : '';
await addGroup(ctx.chat);
}
ctx.reply('🛠 <b>Ok, I\'ll help you manage this group from now.</b>',
replyOptions);
}
return next();
};
module.exports = addedToGroupHandler;
| 'use strict';
// Bot
const bot = require('../../bot');
const { replyOptions } = require('../../bot/options');
const { admin } = require('../../stores/user');
const { addGroup, managesGroup } = require('../../stores/group');
const { masterID } = require('../../config.json');
const addedToGroupHandler = async (ctx, next) => {
const msg = ctx.message;
const wasAdded = msg.new_chat_members.some(user =>
user.username === ctx.me);
if (wasAdded && ctx.from.id === masterID) {
admin(ctx.from);
if (!await managesGroup(ctx.chat)) {
const link = await bot.telegram.exportChatInviteLink(ctx.chat.id);
ctx.chat.link = link ? link : '';
await addGroup(ctx.chat);
}
ctx.reply('🛠 <b>Ok, I\'ll help you manage this group from now.</b>',
replyOptions);
}
return next();
};
module.exports = addedToGroupHandler;
| Add master to admins when added to group | Add master to admins when added to group
| JavaScript | agpl-3.0 | TheDevs-Network/the-guard-bot | ---
+++
@@ -4,6 +4,7 @@
const bot = require('../../bot');
const { replyOptions } = require('../../bot/options');
+const { admin } = require('../../stores/user');
const { addGroup, managesGroup } = require('../../stores/group');
const { masterID } = require('../../config.json');
@@ -13,6 +14,7 @@
const wasAdded = msg.new_chat_members.some(user =>
user.username === ctx.me);
if (wasAdded && ctx.from.id === masterID) {
+ admin(ctx.from);
if (!await managesGroup(ctx.chat)) {
const link = await bot.telegram.exportChatInviteLink(ctx.chat.id);
ctx.chat.link = link ? link : ''; |
72bcff83f71a0fd9cb04a05386e43898c6fbf75b | hooks/lib/android-helper.js | hooks/lib/android-helper.js |
var fs = require("fs");
var path = require("path");
var utilities = require("./utilities");
module.exports = {
addFabricBuildToolsGradle: function() {
var buildGradle = utilities.readBuildGradle();
buildGradle += [
"// Fabric Cordova Plugin - Start Fabric Build Tools ",
"buildscript {",
" repositories {",
" maven { url 'https://maven.fabric.io/public' }",
" }",
" dependencies {",
" classpath 'io.fabric.tools:gradle:1.+'",
" }",
"}",
"",
"apply plugin: 'io.fabric'",
"// Fabric Cordova Plugin - End Fabric Build Tools",
].join("\n");
utilities.writeBuildGradle(buildGradle);
},
removeFabricBuildToolsFromGradle: function() {
var buildGradle = utilities.readBuildGradle();
buildGradle = buildGradle.replace(/\n\/\/ Fabric Cordova Plugin - Start Fabric Build Tools[\s\S]*\/\/ Fabric Cordova Plugin - End Fabric Build Tools\n/, "");
utilities.writeBuildGradle(buildGradle);
}
};
|
var fs = require("fs");
var path = require("path");
var utilities = require("./utilities");
module.exports = {
addFabricBuildToolsGradle: function() {
var buildGradle = utilities.readBuildGradle();
buildGradle += [
"",
"// Fabric Cordova Plugin - Start Fabric Build Tools ",
"buildscript {",
" repositories {",
" maven { url 'https://maven.fabric.io/public' }",
" }",
" dependencies {",
" classpath 'io.fabric.tools:gradle:1.+'",
" }",
"}",
"",
"apply plugin: 'io.fabric'",
"// Fabric Cordova Plugin - End Fabric Build Tools",
].join("\n");
utilities.writeBuildGradle(buildGradle);
},
removeFabricBuildToolsFromGradle: function() {
var buildGradle = utilities.readBuildGradle();
buildGradle = buildGradle.replace(/\n\/\/ Fabric Cordova Plugin - Start Fabric Build Tools[\s\S]*\/\/ Fabric Cordova Plugin - End Fabric Build Tools/, "");
utilities.writeBuildGradle(buildGradle);
}
};
| Fix hook to remove build.gradle config on uninstall. | Fix hook to remove build.gradle config on uninstall.
| JavaScript | mit | andrestraumann/FabricPlugin,sarriaroman/FabricPlugin,andrestraumann/FabricPlugin,sarriaroman/FabricPlugin,sarriaroman/FabricPlugin,andrestraumann/FabricPlugin,sarriaroman/FabricPlugin | ---
+++
@@ -10,6 +10,7 @@
var buildGradle = utilities.readBuildGradle();
buildGradle += [
+ "",
"// Fabric Cordova Plugin - Start Fabric Build Tools ",
"buildscript {",
" repositories {",
@@ -31,7 +32,7 @@
var buildGradle = utilities.readBuildGradle();
- buildGradle = buildGradle.replace(/\n\/\/ Fabric Cordova Plugin - Start Fabric Build Tools[\s\S]*\/\/ Fabric Cordova Plugin - End Fabric Build Tools\n/, "");
+ buildGradle = buildGradle.replace(/\n\/\/ Fabric Cordova Plugin - Start Fabric Build Tools[\s\S]*\/\/ Fabric Cordova Plugin - End Fabric Build Tools/, "");
utilities.writeBuildGradle(buildGradle);
} |
8d1f37df3b597e5fe53374a3c2ec37d0ca54816e | benchmarks/message-registry.js | benchmarks/message-registry.js | 'use babel'
import {MessageRegistry} from '../lib/message-registry'
import {getLinter, getMessage} from '../spec/common'
import {timeNow, timeDiff, getMessages} from './common'
const messageRegistry = new MessageRegistry()
messageRegistry.debouncedUpdate = function() {}
const linter = getLinter()
function benchmarkRegistry(i) {
let timeKey = 'iteration #' + i
messages = getMessages(5000)
const start = performance.now()
messageRegistry.set({linter, messages, buffer: null})
messageRegistry.update()
return performance.now() - start
}
module.exports = function() {
let sum = 0
let count = 500
for (let i = 0; i < count; ++i) {
sum += benchmarkRegistry(i)
}
console.log('average message registry diff time for 5k messages', sum / (count - 1))
}
| 'use babel'
import {MessageRegistry} from '../lib/message-registry'
import {getLinter, getMessage} from '../spec/common'
import {timeNow, timeDiff, getMessages} from './common'
const messageRegistry = new MessageRegistry()
messageRegistry.debouncedUpdate = function() {}
const linter = getLinter()
function benchmarkRegistry(i) {
let timeKey = 'iteration #' + i
messages = getMessages(5000)
const start = performance.now()
messageRegistry.set({linter, messages, buffer: null})
messageRegistry.update()
return performance.now() - start
}
module.exports = function() {
let sum = 0
let count = 500
for (let i = 0; i < count; ++i) {
sum += benchmarkRegistry(i)
}
console.log('average message registry diff time for 5k messages: ' + (sum / (count - 1)))
}
| Make benchmark result electron output friendly | :art: Make benchmark result electron output friendly
| JavaScript | mit | steelbrain/linter,AtomLinter/Linter,atom-community/linter | ---
+++
@@ -22,5 +22,5 @@
for (let i = 0; i < count; ++i) {
sum += benchmarkRegistry(i)
}
- console.log('average message registry diff time for 5k messages', sum / (count - 1))
+ console.log('average message registry diff time for 5k messages: ' + (sum / (count - 1)))
} |
c9b1e95d27e9e5bc150576cd02a2e4769a073f8f | public/js/register.js | public/js/register.js | $(function() {
$("#register").submit(function() {
var password = $("#password").val();
if (password !== $("#confirm").val()) {
return false;
}
var hashedPassword = CryptoJS.SHA256(password).toString();
$("#hashedPassword").val(hashedPassword);
return true;
})
}); | $(function() {
$("#register").submit(function() {
var password = $("#password").val();
var confirmation = $("#confirm").val();
clearErrors();
if (!passwordValid(password)) {
addValidationError("Password must be at least 6 characters long");
return false;
}
if (!passwordConfirmed(password, confirmation)) {
addValidationError("Password and confirmation did not match");
return false;
}
var hashedPassword = CryptoJS.SHA256(password).toString();
$("#hashedPassword").val(hashedPassword);
return true;
});
function clearErrors() {
$("#errors").children().remove();
}
function passwordValid(password) {
return password && password.length > 5;
}
function passwordConfirmed(password, confirmation) {
return password === confirmation;
}
function addValidationError(msg) {
$('<div/>', { class: 'error', text: msg }).appendTo($("#errors"));
}
});
| Add password validation to client side | Add password validation to client side
Since the password is getting hashed before it's sent to the server I
couldn't do any validations on the presence or length of the password on
the server side.
| JavaScript | mit | jimguys/poemlab,jimguys/poemlab | ---
+++
@@ -1,11 +1,42 @@
$(function() {
- $("#register").submit(function() {
- var password = $("#password").val();
- if (password !== $("#confirm").val()) {
- return false;
- }
- var hashedPassword = CryptoJS.SHA256(password).toString();
- $("#hashedPassword").val(hashedPassword);
- return true;
- })
+
+ $("#register").submit(function() {
+
+ var password = $("#password").val();
+ var confirmation = $("#confirm").val();
+
+ clearErrors();
+
+ if (!passwordValid(password)) {
+ addValidationError("Password must be at least 6 characters long");
+ return false;
+ }
+
+ if (!passwordConfirmed(password, confirmation)) {
+ addValidationError("Password and confirmation did not match");
+ return false;
+ }
+
+ var hashedPassword = CryptoJS.SHA256(password).toString();
+ $("#hashedPassword").val(hashedPassword);
+ return true;
+
+ });
+
+ function clearErrors() {
+ $("#errors").children().remove();
+ }
+
+ function passwordValid(password) {
+ return password && password.length > 5;
+ }
+
+ function passwordConfirmed(password, confirmation) {
+ return password === confirmation;
+ }
+
+ function addValidationError(msg) {
+ $('<div/>', { class: 'error', text: msg }).appendTo($("#errors"));
+ }
+
}); |
c2c711f7896ad4cf405e239a4d37dd8112fd288a | chrome-extension/app/scripts/bitbucket.js | chrome-extension/app/scripts/bitbucket.js | var BitBucket = {
hasLogin: function () {
return !!localStorage['bitbucketLogin'] && !!localStorage['bitbucketRepo'];
},
getLastChangeset: function (user, repo, callback, fail) {
var url = "https://bitbucket.org/api/1.0/repositories/" + user + "/" + repo + "/changesets/";
$.ajax({
dataType: "json",
url: url,
data: {limit: 1},
success: callback,
statusCode: {
403: function () {
fail("Forbidden: please, sign in into your accout")
}
}
});
},
requestStatus: function () {
if (!this.hasLogin()) return;
var user = localStorage['bitbucketLogin'];
var repo = localStorage['bitbucketRepo'];
console.log("BitBucket.requestStatus")
BitBucket.getLastChangeset(user, repo, function (response) {
console.log("Got BitBucket changesets:", response);
var changesets = response.changesets;
console.log("timestamp", changesets[0].timestamp);
console.log(Date.parse(changesets[0].timestamp));
chrome.runtime.sendMessage({
requestType: 'status',
name: 'bitbucket',
okDate: changesets.length? Date.parse(changesets[0].timestamp) : null
});
}, function (reason) {
console.log("BB error", reason);
chrome.runtime.sendMessage({
requestType: 'status',
name: 'bitbucket',
okDate: null,
error: reason
});
});
}
}
| var BitBucket = {
hasLogin: function () {
return !!localStorage['bitbucketLogin'] && !!localStorage['bitbucketRepo'];
},
getLastChangeset: function (user, repo, callback, fail) {
var url = "https://bitbucket.org/api/1.0/repositories/" + user + "/" + repo + "/changesets/";
$.ajax({
dataType: "json",
url: url,
data: {limit: 1},
success: callback,
statusCode: {
403: function () {
fail("Forbidden: please, sign in into your accout")
},
404: function () {
fail("Not found: please, sign in or check repository name")
}
}
});
},
requestStatus: function () {
if (!this.hasLogin()) return;
var user = localStorage['bitbucketLogin'];
var repo = localStorage['bitbucketRepo'];
console.log("BitBucket.requestStatus")
BitBucket.getLastChangeset(user, repo, function (response) {
console.log("Got BitBucket changesets:", response);
var changesets = response.changesets;
console.log("timestamp", changesets[0].timestamp);
console.log(Date.parse(changesets[0].timestamp));
chrome.runtime.sendMessage({
requestType: 'status',
name: 'bitbucket',
okDate: changesets.length? Date.parse(changesets[0].timestamp) : null
});
}, function (reason) {
console.log("BB error", reason);
chrome.runtime.sendMessage({
requestType: 'status',
name: 'bitbucket',
okDate: null,
error: reason
});
});
}
}
| Handle 404 from BitBucket API | Handle 404 from BitBucket API
| JavaScript | mit | asivokon/mooch-sentinel,asivokon/mooch-sentinel,asivokon/mooch-sentinel,asivokon/mooch-sentinel | ---
+++
@@ -14,6 +14,9 @@
statusCode: {
403: function () {
fail("Forbidden: please, sign in into your accout")
+ },
+ 404: function () {
+ fail("Not found: please, sign in or check repository name")
}
}
}); |
3f6b6b1db300809bef2540df1c6f05d53e2482af | seeds/cities.js | seeds/cities.js | var util = require('../src/util/seeds');
exports.seed = function(knex, Promise) {
return util.insertOrUpdate(knex, 'cities', {
id: 1,
name: 'Otaniemi',
})
.then(() => util.insertOrUpdate(knex, 'cities', {
id: 2,
name: 'Tampere',
}));
}
| var util = require('../src/util/seeds');
exports.seed = function(knex, Promise) {
return util.removeIfExists(knex, 'cities', {
id: 1,
name: 'Other',
})
.then(() => util.insertOrUpdate(knex, 'cities', {
id: 2,
name: 'Otaniemi',
}))
.then(() => util.insertOrUpdate(knex, 'cities', {
id: 3,
name: 'Tampere',
}));
}
| Remove city 'Other' using removeIfExists | Remove city 'Other' using removeIfExists
| JavaScript | mit | futurice/wappuapp-backend,futurice/wappuapp-backend,kaupunki-apina/prahapp-backend,kaupunki-apina/prahapp-backend | ---
+++
@@ -2,12 +2,16 @@
exports.seed = function(knex, Promise) {
- return util.insertOrUpdate(knex, 'cities', {
+ return util.removeIfExists(knex, 'cities', {
id: 1,
- name: 'Otaniemi',
+ name: 'Other',
})
.then(() => util.insertOrUpdate(knex, 'cities', {
id: 2,
+ name: 'Otaniemi',
+ }))
+ .then(() => util.insertOrUpdate(knex, 'cities', {
+ id: 3,
name: 'Tampere',
}));
} |
692aa1ca5d46206e7e8e360412b545f593e4d355 | web/client/scripts/controllers/LoginCtrl.js | web/client/scripts/controllers/LoginCtrl.js | 'use strict';
angular.module('app').controller('LoginCtrl', function($scope, $uibModal, mafenSession, alertify, PATHS) {
'ngInject';
$scope.mafenSession = mafenSession;
$scope.user = {};
$scope.login = function() {
$scope.mafenSession.reset();
$scope.mafenSession.connect('ws://127.0.0.1:8000');
$scope.loginPromise = $scope.mafenSession.login($scope.user.username, $scope.user.password);
$scope.loginPromise.then(function() {
$uibModal.open({
ariaLabelledBy: 'charlist-modal-title',
ariaDescribedBy: 'charlist-modal-body',
templateUrl: PATHS.views + 'charlist.html',
controller: 'CharListCtrl'
});
}, function() {
alertify.error('Authentication failed');
});
};
});
| 'use strict';
angular.module('app').controller('LoginCtrl', function($scope, $uibModal, mafenSession, alertify, PATHS) {
'ngInject';
$scope.mafenSession = mafenSession;
$scope.user = {};
$scope.login = function() {
$scope.mafenSession.reset();
$scope.mafenSession.connect('ws://mafen.club:8000');
$scope.loginPromise = $scope.mafenSession.login($scope.user.username, $scope.user.password);
$scope.loginPromise.then(function() {
$uibModal.open({
ariaLabelledBy: 'charlist-modal-title',
ariaDescribedBy: 'charlist-modal-body',
templateUrl: PATHS.views + 'charlist.html',
controller: 'CharListCtrl'
});
}, function() {
alertify.error('Authentication failed');
});
};
});
| Fix websocket URL from localhost to the real one | Fix websocket URL from localhost to the real one
| JavaScript | mit | b0r3d0m/mafen,pil-a/mafen,pil-a/mafen,pil-a/mafen,b0r3d0m/mafen,b0r3d0m/mafen | ---
+++
@@ -9,7 +9,7 @@
$scope.login = function() {
$scope.mafenSession.reset();
- $scope.mafenSession.connect('ws://127.0.0.1:8000');
+ $scope.mafenSession.connect('ws://mafen.club:8000');
$scope.loginPromise = $scope.mafenSession.login($scope.user.username, $scope.user.password);
$scope.loginPromise.then(function() {
$uibModal.open({ |
24d0c3e7822165e860132d5bcdc1e9c2ed9d9a2e | initializers/trailing-history.js | initializers/trailing-history.js | /*global Ember */
var trailingHistory = Ember.HistoryLocation.extend({
setURL: function (path) {
var state = this.getState();
path = this.formatURL(path);
path = path.replace(/\/?$/, '/');
if (state && state.path !== path) {
this.pushState(path);
}
}
});
var registerTrailingLocationHistory = {
name: 'registerTrailingLocationHistory',
initialize: function (container, application) {
application.register('location:trailing-history', trailingHistory);
}
};
export default registerTrailingLocationHistory; | /*global Ember */
var trailingHistory = Ember.HistoryLocation.extend({
formatURL: function () {
return this._super.apply(this, arguments).replace(/\/?$/, '/');
}
});
var registerTrailingLocationHistory = {
name: 'registerTrailingLocationHistory',
initialize: function (container, application) {
application.register('location:trailing-history', trailingHistory);
}
};
export default registerTrailingLocationHistory; | Fix trailing slashes output app-wide | Fix trailing slashes output app-wide
closes #2963, closes #2964
- override Ember's `HistoryLocation.formatURL`
- remove overridden `HistoryLocation.setURL`
| JavaScript | mit | dbalders/Ghost-Admin,kevinansfield/Ghost-Admin,acburdine/Ghost-Admin,acburdine/Ghost-Admin,JohnONolan/Ghost-Admin,airycanon/Ghost-Admin,JohnONolan/Ghost-Admin,dbalders/Ghost-Admin,TryGhost/Ghost-Admin,kevinansfield/Ghost-Admin,TryGhost/Ghost-Admin,airycanon/Ghost-Admin | ---
+++
@@ -1,14 +1,8 @@
/*global Ember */
var trailingHistory = Ember.HistoryLocation.extend({
- setURL: function (path) {
- var state = this.getState();
- path = this.formatURL(path);
- path = path.replace(/\/?$/, '/');
-
- if (state && state.path !== path) {
- this.pushState(path);
- }
+ formatURL: function () {
+ return this._super.apply(this, arguments).replace(/\/?$/, '/');
}
});
|
e9de3d6da5e3cfc03b6d5e39fe92ede9c110d712 | webpack_config/server/webpack.prod.babel.js | webpack_config/server/webpack.prod.babel.js | import webpack from 'webpack'
import baseWebpackConfig from './webpack.base'
import UglifyJSPlugin from 'uglifyjs-webpack-plugin'
import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer'
import {Plugin as ShakePlugin} from 'webpack-common-shake'
import OptimizeJsPlugin from 'optimize-js-plugin'
const analyzePlugins = process.env.ANALYZE_BUNDLE
? [new BundleAnalyzerPlugin({analyzerMode: 'static'})]
: []
const plugins = [
new webpack.ProgressPlugin(),
new webpack.optimize.ModuleConcatenationPlugin(),
new ShakePlugin(),
// NOTE: you can use BabiliPlugin as an alternative to UglifyJSPlugin
// new BabiliPlugin(),
new UglifyJSPlugin({
sourceMap: true,
compress: {
warnings: false,
unused: true,
dead_code: true
// This option removes console.log in production
// drop_console: true
},
output: {
comments: false
}
}),
new OptimizeJsPlugin({
sourceMap: true
}),
...analyzePlugins
]
export default Object.assign({}, baseWebpackConfig, {
plugins: baseWebpackConfig.plugins.concat(plugins)
})
| import webpack from 'webpack'
import baseWebpackConfig from './webpack.base'
import UglifyJSPlugin from 'uglifyjs-webpack-plugin'
import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer'
import {Plugin as ShakePlugin} from 'webpack-common-shake'
import OptimizeJsPlugin from 'optimize-js-plugin'
const plugins = [
new webpack.ProgressPlugin(),
new webpack.optimize.ModuleConcatenationPlugin(),
new ShakePlugin(),
// NOTE: you can use BabiliPlugin as an alternative to UglifyJSPlugin
// new BabiliPlugin(),
new UglifyJSPlugin({
sourceMap: true,
compress: {
warnings: false,
unused: true,
dead_code: true
// This option removes console.log in production
// drop_console: true
},
output: {
comments: false
}
}),
new OptimizeJsPlugin({
sourceMap: true
})
]
// Do you want to use bundle analyzer?
if (process.env.ANALYZE_BUNDLE) {
plugins.push(new BundleAnalyzerPlugin({analyzerMode: 'static'}))
}
export default Object.assign({}, baseWebpackConfig, {
plugins: baseWebpackConfig.plugins.concat(plugins)
})
| Revert "style(webpack_config/server): rewrite prod conf in functional style" | Revert "style(webpack_config/server): rewrite prod conf in functional style"
This reverts commit bc707a71f85e918a2d95acd7ce1f15beb191525b.
| JavaScript | apache-2.0 | Metnew/react-semantic.ui-starter | ---
+++
@@ -5,9 +5,6 @@
import {Plugin as ShakePlugin} from 'webpack-common-shake'
import OptimizeJsPlugin from 'optimize-js-plugin'
-const analyzePlugins = process.env.ANALYZE_BUNDLE
- ? [new BundleAnalyzerPlugin({analyzerMode: 'static'})]
- : []
const plugins = [
new webpack.ProgressPlugin(),
new webpack.optimize.ModuleConcatenationPlugin(),
@@ -29,9 +26,13 @@
}),
new OptimizeJsPlugin({
sourceMap: true
- }),
- ...analyzePlugins
+ })
]
+
+// Do you want to use bundle analyzer?
+if (process.env.ANALYZE_BUNDLE) {
+ plugins.push(new BundleAnalyzerPlugin({analyzerMode: 'static'}))
+}
export default Object.assign({}, baseWebpackConfig, {
plugins: baseWebpackConfig.plugins.concat(plugins) |
6bf45d425a47caa83eae07113249c414df6c32c4 | jest.config.js | jest.config.js | var semver = require('semver');
function getSupportedTypescriptTarget() {
var nodeVersion = process.versions.node;
if (semver.gt(nodeVersion, '7.6.0')) {
return 'es2017'
} else if (semver.gt(nodeVersion, '7.0.0')) {
return 'es2016';
} else if (semver.gt(nodeVersion, '6.0.0')) {
return 'es2015';
} else if (semver.gt(nodeVersion, '4.0.0')) {
return 'es5';
} else {
return 'es3';
}
}
module.exports = {
mapCoverage: true,
testEnvironment: 'node',
moduleFileExtensions: ['js', 'json', 'ts'],
transform: {
'.ts': '<rootDir>/node_modules/ts-jest/preprocessor.js'
},
testMatch: [
'**/__tests__/**/*.ts'
],
testPathIgnorePatterns: [
'<rootDir>/(node_modules|dist)',
'_\\w*.\\w+$'
],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts'
],
globals: {
__TS_CONFIG__: {
target: getSupportedTypescriptTarget(),
module: 'commonjs'
}
}
};
| var semver = require('semver');
function getSupportedTypescriptTarget() {
var nodeVersion = process.versions.node;
if (semver.gt(nodeVersion, '7.6.0')) {
return 'es2017'
} else if (semver.gt(nodeVersion, '7.0.0')) {
return 'es2016';
} else if (semver.gt(nodeVersion, '6.0.0')) {
return 'es2015';
} else if (semver.gt(nodeVersion, '4.0.0')) {
return 'es5';
} else {
return 'es3';
}
}
module.exports = {
mapCoverage: true,
testEnvironment: 'node',
moduleFileExtensions: ['js', 'json', 'ts'],
transform: {
'.ts': '<rootDir>/node_modules/ts-jest/preprocessor.js'
},
testMatch: [
'**/__tests__/**/*.ts'
],
testPathIgnorePatterns: [
'<rootDir>/(node_modules|dist)',
'_\\w*.\\w+$'
],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts'
],
globals: {
'ts-jest': {
tsConfigFile: {
target: getSupportedTypescriptTarget(),
module: 'commonjs'
}
}
}
};
| Fix deprecated warning for ts-jest | Fix deprecated warning for ts-jest
| JavaScript | mit | maxdavidson/structly,maxdavidson/structly | ---
+++
@@ -35,9 +35,11 @@
'!src/**/*.d.ts'
],
globals: {
- __TS_CONFIG__: {
- target: getSupportedTypescriptTarget(),
- module: 'commonjs'
+ 'ts-jest': {
+ tsConfigFile: {
+ target: getSupportedTypescriptTarget(),
+ module: 'commonjs'
+ }
}
}
}; |
03ed1776047ebe316fef8e077a0d62d6b5587da6 | client/views/home/edit/edit.js | client/views/home/edit/edit.js | Template.editHome.helpers({
'home': function () {
// Get Home ID from template data context
// convert the 'String' object to a string for the DB query
var homeId = this._id;
// Get home document
var home = Homes.findOne(homeId);
return home;
}
});
Template.editHome.created = function () {
var instance = this;
var router = Router.current();
var homeId = router.params.homeId;
instance.subscribe('singleHome', homeId);
instance.subscribe('allGroups');
};
AutoForm.addHooks(['editHomeForm'], {
'onSuccess': function () {
// Hide the modal dialogue
Modal.hide('editHome');
}
});
| Template.editHome.created = function () {
// Get reference to template instance
var instance = this;
// Get reference to router
var router = Router.current();
// Get Home ID from router parameter
var homeId = router.params.homeId;
// Subscribe to single home, based on Home ID
instance.subscribe('singleHome', homeId);
// Subscribe to all groups, for the group select options
instance.subscribe('allGroups');
};
AutoForm.addHooks(['editHomeForm'], {
'onSuccess': function () {
// Hide the modal dialogue
Modal.hide('editHome');
}
});
| Remove unused template helper; add comments | Remove unused template helper; add comments
| JavaScript | agpl-3.0 | GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,GeriLife/wellbeing | ---
+++
@@ -1,24 +1,17 @@
-Template.editHome.helpers({
- 'home': function () {
- // Get Home ID from template data context
- // convert the 'String' object to a string for the DB query
- var homeId = this._id;
-
- // Get home document
- var home = Homes.findOne(homeId);
-
- return home;
- }
-});
-
Template.editHome.created = function () {
+ // Get reference to template instance
var instance = this;
+ // Get reference to router
var router = Router.current();
+ // Get Home ID from router parameter
var homeId = router.params.homeId;
+ // Subscribe to single home, based on Home ID
instance.subscribe('singleHome', homeId);
+
+ // Subscribe to all groups, for the group select options
instance.subscribe('allGroups');
};
|
a205caefe68d4c9279aaa86470c30974da226874 | Miscellaneous/ebay.highlight-bids.user.js | Miscellaneous/ebay.highlight-bids.user.js | // ==UserScript==
// @name eBay - Hilight Items With Bids
// @namespace http://mathemaniac.org
// @include http://*.ebay.*/*
// @grant none
// @version 2.3.1
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @description Hilights items that have bids with a red border and yellow background.
// ==/UserScript==
// Based on http://userscripts-mirror.org/scripts/show/66089.html v.2.2.1
// Updated for newer eBay layout.
$('document').ready(function() {
$(".bids span").each(function() {
// Skip listings with no bids.
if ($(this).text().match(/\b0 bids/)) return;
$(this).closest('li[listingid]').css({
"border": "3px solid red",
"background-color": "yellow"
});
});
});
| // ==UserScript==
// @name eBay - Hilight Items With Bids
// @namespace http://mathemaniac.org
// @include http://*.ebay.*/*
// @grant none
// @version 2.3.2
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @description Hilights items that have bids with a red border and yellow background.
// ==/UserScript==
// Based on http://userscripts.org/users/126140 v.2.2.1
// Updated for newer eBay layout.
$('document').ready(function() {
$(".lvprices .lvformat").each(function() {
// Skip listings with no bids.
if ($(this).text().match(/\b0 bids/) || !$(this).text().match(/\d+ bids/)) return;
$(this).closest('li[listingid]').css({
"border": "3px solid red",
"background-color": "yellow"
});
});
});
| Update eBay highlight script to work with new classes | Update eBay highlight script to work with new classes
| JavaScript | mit | Eckankar/userscripts,Eckankar/userscripts | ---
+++
@@ -3,18 +3,18 @@
// @namespace http://mathemaniac.org
// @include http://*.ebay.*/*
// @grant none
-// @version 2.3.1
+// @version 2.3.2
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @description Hilights items that have bids with a red border and yellow background.
// ==/UserScript==
-// Based on http://userscripts-mirror.org/scripts/show/66089.html v.2.2.1
+// Based on http://userscripts.org/users/126140 v.2.2.1
// Updated for newer eBay layout.
$('document').ready(function() {
- $(".bids span").each(function() {
+ $(".lvprices .lvformat").each(function() {
// Skip listings with no bids.
- if ($(this).text().match(/\b0 bids/)) return;
+ if ($(this).text().match(/\b0 bids/) || !$(this).text().match(/\d+ bids/)) return;
$(this).closest('li[listingid]').css({
"border": "3px solid red", |
2f2a17f599a3d3de05b61664c6d321494c01e552 | server/production.js | server/production.js | /* eslint strict: 0 */
'use strict';
// Load environment variables
require('dotenv-safe').load();
// Load assets
const assets = require('./assets');
const express = require('express');
const compression = require('compression');
const cookieParser = require('cookie-parser');
const server = express();
// Set up the regular server
server.use(cookieParser());
server.use(compression());
server.use(express.static('build'));
server.use(express.static('public'));
server.use((request, response) => {
const app = require('../build/bundle.server.js');
return app.default(request, response, assets);
});
console.log(`Listening at ${process.env.HOST} on port ${process.env.PORT}`);
server.listen(process.env.PORT);
| /* eslint strict: 0 */
'use strict';
// Load environment variables
require('dotenv-safe').load();
// Load assets
const assets = require('./assets');
const express = require('express');
const compression = require('compression');
const cookieParser = require('cookie-parser');
const server = express();
// Set up the regular server
server.use(cookieParser());
server.use(compression());
server.use(express.static('build', {
maxage: '365d',
}));
server.use(express.static('public'));
server.use((request, response) => {
const app = require('../build/bundle.server.js');
return app.default(request, response, assets);
});
console.log(`Listening at ${process.env.HOST} on port ${process.env.PORT}`);
server.listen(process.env.PORT);
| Set long time caching for js/css builds. | Set long time caching for js/css builds.
| JavaScript | mit | reauv/persgroep-app,reauv/persgroep-app | ---
+++
@@ -14,7 +14,9 @@
// Set up the regular server
server.use(cookieParser());
server.use(compression());
-server.use(express.static('build'));
+server.use(express.static('build', {
+ maxage: '365d',
+}));
server.use(express.static('public'));
server.use((request, response) => { |
f4d79cf2e7924ef1dd294e8c37ce54bfc2a73d02 | js/controllers/catalog-ctrl.js | js/controllers/catalog-ctrl.js | catalogApp.controller('CatalogCtrl', ['$scope', 'assetService', function($scope, assetService) {
$scope.assets = [];
$scope.totalHits = 0;
$scope.getAssets = function(data) {
var promise = assetService.getAssets({
data: data
});
promise.then(function(response) {
var originalAssets = response.data.Data;
originalAssets.forEach(function(asset, index) {
asset.Item.Images.forEach(function(image, index) {
if (image.Type === 1) {
/* Add logic to massage data to pluck out right image size for displaying thumbs */
asset.Item.thumbImage = image.ImageId;
}
});
});
$scope.assets = originalAssets;
$scope.totalHits = response.data.TotalHits;
}, function(reason) {
console.log(reason);
});
};
$scope.getAssets();
}]);
| catalogApp.controller('CatalogCtrl', ['$scope', 'assetService', function($scope, assetService) {
$scope.assets = [];
$scope.currentPage = 0;
$scope.totalPages = 1;
$scope.pageNumbers = [];
$scope.pageSize = 20;
$scope.totalHits = 0;
$scope.pageOffset = 0;
var initPagination = function(totalPages) {
var pageNumbers = [];
for (var i = 0; i < totalPages; i++) {
/* Add in the page number, offset it by 1 */
pageNumbers.push(i + 1);
}
return pageNumbers;
};
var parseAssets = function(assetData) {
assetData.forEach(function(asset, index) {
asset.Item.Images.forEach(function(image, index) {
if (image.Type === 1) {
/* Add logic to massage data to pluck out right image size for displaying thumbs */
asset.Item.thumbImage = image.ImageId;
}
});
});
return assetData;
};
var getAssets = function(data) {
var promise = assetService.getAssets({
data: data
});
promise.then(function(response) {
$scope.assets = parseAssets(response.data.Data);
$scope.totalHits = response.data.TotalHits;
$scope.totalPages = Math.ceil($scope.assets.length / $scope.pageSize);
$scope.pageNumbers = initPagination($scope.totalPages);
}, function(reason) {
console.log(reason);
});
};
$scope.gotoPage = function(page) {
$scope.pageOffset = (page - 1) * $scope.pageSize;
}
getAssets();
}]);
| Add pagination logic, cleanup re-org code | Add pagination logic, cleanup re-org code
| JavaScript | mit | satbirjhuti/catalogFeed,satbirjhuti/catalogFeed | ---
+++
@@ -1,28 +1,51 @@
catalogApp.controller('CatalogCtrl', ['$scope', 'assetService', function($scope, assetService) {
$scope.assets = [];
+ $scope.currentPage = 0;
+ $scope.totalPages = 1;
+ $scope.pageNumbers = [];
+ $scope.pageSize = 20;
$scope.totalHits = 0;
+ $scope.pageOffset = 0;
- $scope.getAssets = function(data) {
+ var initPagination = function(totalPages) {
+ var pageNumbers = [];
+ for (var i = 0; i < totalPages; i++) {
+ /* Add in the page number, offset it by 1 */
+ pageNumbers.push(i + 1);
+ }
+ return pageNumbers;
+ };
+
+ var parseAssets = function(assetData) {
+ assetData.forEach(function(asset, index) {
+ asset.Item.Images.forEach(function(image, index) {
+ if (image.Type === 1) {
+ /* Add logic to massage data to pluck out right image size for displaying thumbs */
+ asset.Item.thumbImage = image.ImageId;
+ }
+ });
+ });
+ return assetData;
+ };
+
+ var getAssets = function(data) {
var promise = assetService.getAssets({
data: data
});
promise.then(function(response) {
- var originalAssets = response.data.Data;
- originalAssets.forEach(function(asset, index) {
- asset.Item.Images.forEach(function(image, index) {
- if (image.Type === 1) {
- /* Add logic to massage data to pluck out right image size for displaying thumbs */
- asset.Item.thumbImage = image.ImageId;
- }
- });
- });
- $scope.assets = originalAssets;
+ $scope.assets = parseAssets(response.data.Data);
$scope.totalHits = response.data.TotalHits;
+ $scope.totalPages = Math.ceil($scope.assets.length / $scope.pageSize);
+ $scope.pageNumbers = initPagination($scope.totalPages);
}, function(reason) {
console.log(reason);
});
};
- $scope.getAssets();
+ $scope.gotoPage = function(page) {
+ $scope.pageOffset = (page - 1) * $scope.pageSize;
+ }
+
+ getAssets();
}]); |
1a067a9635585cbb96c80040b2941e92868b07df | browscap.js | browscap.js | "use strict";
module.exports = function Browscap (cacheDir) {
if (typeof cacheDir === 'undefined') {
cacheDir = './sources/';
}
this.cacheDir = cacheDir;
/**
* parses the given user agent to get the information about the browser
*
* if no user agent is given, it uses {@see \BrowscapPHP\Helper\Support} to get it
*
* @param userAgent the user agent string
*/
this.getBrowser = function(userAgent) {
var Ini = require('./parser');
var Quoter = require('./helper/quoter');
var quoter = new Quoter();
var GetPattern = require('./helper/pattern');
var BrowscapCache = require('browscap-js-cache');
var cache = new BrowscapCache(this.cacheDir);
var GetData = require('./helper/data');
var patternHelper = new GetPattern(cache);
var dataHelper = new GetData(cache, quoter);
var parser = new Ini(patternHelper, dataHelper);
return parser.getBrowser(userAgent);
};
};
| "use strict";
module.exports = function Browscap (cacheDir) {
if (typeof cacheDir === 'undefined') {
cacheDir = __dirname + '/sources/';
}
this.cacheDir = cacheDir;
/**
* parses the given user agent to get the information about the browser
*
* if no user agent is given, it uses {@see \BrowscapPHP\Helper\Support} to get it
*
* @param userAgent the user agent string
*/
this.getBrowser = function(userAgent) {
var Ini = require('./parser');
var Quoter = require('./helper/quoter');
var quoter = new Quoter();
var GetPattern = require('./helper/pattern');
var BrowscapCache = require('browscap-js-cache');
var cache = new BrowscapCache(this.cacheDir);
var GetData = require('./helper/data');
var patternHelper = new GetPattern(cache);
var dataHelper = new GetData(cache, quoter);
var parser = new Ini(patternHelper, dataHelper);
return parser.getBrowser(userAgent);
};
};
| Use cache dir based on file location | Use cache dir based on file location | JavaScript | mit | mimmi20/browscap-js | ---
+++
@@ -2,7 +2,7 @@
module.exports = function Browscap (cacheDir) {
if (typeof cacheDir === 'undefined') {
- cacheDir = './sources/';
+ cacheDir = __dirname + '/sources/';
}
this.cacheDir = cacheDir; |
a7da36d8376de9f2eccac11f9e3db35618ecf44a | source/index.js | source/index.js | import normalizeEvents from './tools/normalizeEvents';
import normalizeListener from './tools/normalizeListener';
export default function stereo () {
let listeners = {};
let emitter = {
on(events, listener) {
// Normalize arguments.
events = normalizeEvents(events);
listener = normalizeListener(listener);
// Register the listener.
for (let event of events) {
let register = listeners[event];
if (!register) listeners[event] = [listener];
else if (!register.includes(listener)) {
register.push(listener);
}
}
},
once(events, listener) {
events = normalizeEvents(events);
listener = normalizeListener(listener);
function listenerWrapper (...args) {
emitter.off(events, listenerWrapper);
listener(...args);
}
emitter.on(events, listenerWrapper);
},
off(events, listener) {
// Normalize arguments.
events = normalizeEvents(events);
// If no listener is specified, unregister all listeners.
if (listener == null) for (let event of events) {
delete listeners[event];
}
// Otherwise unregister the given listener.
else {
listener = normalizeListener(listener);
for (let event of events) {
let register = listeners[event];
let index = register.indexOf(listener);
if (index !== -1) register.splice(index, 1);
}
}
},
emit(events, ...args) {
// Normalize arguments.
events = normalizeEvents(events);
// Dispatch listeners.
for (let event of events) {
let register = listeners[event];
if (register) for (let listener of register) {
listener(...args);
}
}
}
};
return emitter;
}
| import normalizeEvents from './tools/normalizeEvents';
import normalizeListener from './tools/normalizeListener';
export default function stereo () {
let listeners = {};
let emitter = {
on(events, listener) {
// Normalize arguments.
events = normalizeEvents(events);
listener = normalizeListener(listener);
// Register the listener.
for (let event of events) {
let register = listeners[event];
if (!register) listeners[event] = new Set([listener]);
else if (!register.has(listener)) register.add(listener);
}
},
once(events, listener) {
events = normalizeEvents(events);
listener = normalizeListener(listener);
function listenerWrapper (...args) {
emitter.off(events, listenerWrapper);
listener(...args);
}
emitter.on(events, listenerWrapper);
},
off(events, listener) {
// Normalize arguments.
events = normalizeEvents(events);
// If no listener is specified, unregister all listeners.
if (listener == null) for (let event of events) {
delete listeners[event];
}
// Otherwise unregister the given listener.
else {
listener = normalizeListener(listener);
for (let event of events) {
listeners[event].delete(listener);
}
}
},
emit(events, ...args) {
// Normalize arguments.
events = normalizeEvents(events);
// Dispatch listeners.
for (let event of events) {
let register = listeners[event];
if (register) for (let listener of register) {
listener(...args);
}
}
}
};
return emitter;
}
| Switch from arrays to Sets | Switch from arrays to Sets
| JavaScript | mit | stoeffel/stereo,tomekwi/stereo | ---
+++
@@ -13,10 +13,8 @@
// Register the listener.
for (let event of events) {
let register = listeners[event];
- if (!register) listeners[event] = [listener];
- else if (!register.includes(listener)) {
- register.push(listener);
- }
+ if (!register) listeners[event] = new Set([listener]);
+ else if (!register.has(listener)) register.add(listener);
}
},
@@ -44,11 +42,8 @@
// Otherwise unregister the given listener.
else {
listener = normalizeListener(listener);
-
for (let event of events) {
- let register = listeners[event];
- let index = register.indexOf(listener);
- if (index !== -1) register.splice(index, 1);
+ listeners[event].delete(listener);
}
}
}, |
a0b049a5f396eb9498bd1a8ea8bdb79f64321b97 | server/repositories/gameRepository.js | server/repositories/gameRepository.js | const mongoskin = require('mongoskin');
const logger = require('../log.js');
class GameRepository {
save(game, callback) {
var db = mongoskin.db('mongodb://127.0.0.1:27017/throneteki');
if(!game.id) {
db.collection('games').insert(game, function(err, result) {
if(err) {
logger.info(err.message);
callback(err);
return;
}
callback(undefined, result.ops[0]._id);
});
} else {
db.collection('games').update({ _id: mongoskin.helper.toObjectID(game.id) }, {
'$set': {
startedAt: game.startedAt,
players: game.playersAndSpectators,
winner: game.winner,
winReason: game.winReason,
finishedAt: game.finishedAt
}
});
}
}
}
module.exports = GameRepository;
| const mongoskin = require('mongoskin');
const logger = require('../log.js');
class GameRepository {
save(game, callback) {
var db = mongoskin.db('mongodb://127.0.0.1:27017/throneteki');
if(!game.id) {
db.collection('games').insert(game, function(err, result) {
if(err) {
logger.info(err.message);
callback(err);
return;
}
callback(undefined, result.ops[0]._id);
});
} else {
db.collection('games').update({ _id: mongoskin.helper.toObjectID(game.id) }, {
'$set': {
startedAt: game.startedAt,
players: game.players,
winner: game.winner,
winReason: game.winReason,
finishedAt: game.finishedAt
}
});
}
}
}
module.exports = GameRepository;
| Save the players array correctly when saving game stats | Save the players array correctly when saving game stats
| JavaScript | mit | ystros/throneteki,jeremylarner/ringteki,cryogen/gameteki,DukeTax/throneteki,cryogen/throneteki,jbrz/throneteki,gryffon/ringteki,jeremylarner/ringteki,jbrz/throneteki,gryffon/ringteki,Antaiseito/throneteki_for_doomtown,cryogen/throneteki,Antaiseito/throneteki_for_doomtown,cryogen/gameteki,gryffon/ringteki,DukeTax/throneteki,samuellinde/throneteki,jeremylarner/ringteki,samuellinde/throneteki | ---
+++
@@ -21,7 +21,7 @@
db.collection('games').update({ _id: mongoskin.helper.toObjectID(game.id) }, {
'$set': {
startedAt: game.startedAt,
- players: game.playersAndSpectators,
+ players: game.players,
winner: game.winner,
winReason: game.winReason,
finishedAt: game.finishedAt |
40743d988e0ab90d9e54f304a65a5f436db13dbd | server/test/unit/logger/loggerSpec.js | server/test/unit/logger/loggerSpec.js | 'use strict';
var chai = require('chai'),
expect = chai.expect,
sinon = require('sinon'),
sinonChai = require('sinon-chai'),
logger = require('../../../logger');
chai.use(sinonChai);
describe('logger', function () {
describe('infoStream', function () {
var infoStream = logger.infoStream,
messageWithInnerLinebreaks = '\nany message containing \n \n line breaks';
beforeEach(function () {
logger.info = sinon.stub();
});
it('should remove any new line characters at the end', function () {
var message = messageWithInnerLinebreaks + '\n\n\n';
infoStream.write(message);
expect(logger.info).to.have.been.calledOnce;
expect(logger.info).to.have.been.calledWith(messageWithInnerLinebreaks);
});
it('should not remove new line characters in the message string if not at the end', function () {
infoStream.write(messageWithInnerLinebreaks);
expect(logger.info).to.have.been.calledOnce;
expect(logger.info).to.have.been.calledWith(messageWithInnerLinebreaks);
});
it('should stop removing characters when none are left anymore', function () {
infoStream.write('\n');
expect(logger.info).to.have.been.calledOnce;
expect(logger.info).to.have.been.calledWith('');
});
});
});
| 'use strict';
var chai = require('chai'),
expect = chai.expect,
sinon = require('sinon'),
sinonChai = require('sinon-chai'),
logger = require('../../../logger');
chai.use(sinonChai);
describe('logger', function () {
describe('infoStream', function () {
var infoStream = logger.infoStream,
messageWithInnerLinebreaks = '\nany message containing \n \n line breaks';
beforeEach(function () {
logger.info = sinon.stub();
});
it('should remove any new line characters at the end', function () {
var message = messageWithInnerLinebreaks + '\n\n\n';
infoStream.write(message);
expect(logger.info).to.have.been.calledOnce;
expect(logger.info).to.have.been.calledWith(messageWithInnerLinebreaks);
});
it('should not remove new line characters in the message string if not at the end', function () {
infoStream.write(messageWithInnerLinebreaks);
expect(logger.info).to.have.been.calledOnce;
expect(logger.info).to.have.been.calledWith(messageWithInnerLinebreaks);
});
it('should return without errors if the message is empty', function () {
infoStream.write('');
expect(logger.info).to.have.been.calledOnce;
expect(logger.info).to.have.been.calledWith('');
});
it('should stop removing characters when none are left anymore', function () {
infoStream.write('\n');
expect(logger.info).to.have.been.calledOnce;
expect(logger.info).to.have.been.calledWith('');
});
});
});
| Add test for untested empty string branch. | Add test for untested empty string branch.
| JavaScript | mit | lxanders/community | ---
+++
@@ -35,6 +35,13 @@
expect(logger.info).to.have.been.calledWith(messageWithInnerLinebreaks);
});
+ it('should return without errors if the message is empty', function () {
+ infoStream.write('');
+
+ expect(logger.info).to.have.been.calledOnce;
+ expect(logger.info).to.have.been.calledWith('');
+ });
+
it('should stop removing characters when none are left anymore', function () {
infoStream.write('\n');
|
f7ea031dac8dedddd9525c42a5c27b34c01f616a | grunt/config/jsx/jsx.js | grunt/config/jsx/jsx.js | 'use strict';
var rootIDs = [
"React"
];
var debug = {
rootIDs: rootIDs,
configFile: "grunt/config/jsx/debug.json",
sourceDir: "src",
outputDir: "build/modules"
};
var jasmine = {
rootIDs: [
"all"
],
configFile: debug.configFile,
sourceDir: "vendor/jasmine",
outputDir: "build/jasmine"
};
var test = {
rootIDs: rootIDs.concat([
"test/all.js",
"**/__tests__/*.js"
]),
configFile: "grunt/config/jsx/test.json",
sourceDir: "src",
outputDir: "build/modules"
};
var release = {
rootIDs: rootIDs,
configFile: "grunt/config/jsx/release.json",
sourceDir: "src",
outputDir: "build/modules"
};
module.exports = {
debug: debug,
jasmine: jasmine,
test: test,
release: release
};
| 'use strict';
var rootIDs = [
"React",
"ReactTransitionGroup"
];
var debug = {
rootIDs: rootIDs,
configFile: "grunt/config/jsx/debug.json",
sourceDir: "src",
outputDir: "build/modules"
};
var jasmine = {
rootIDs: [
"all"
],
configFile: debug.configFile,
sourceDir: "vendor/jasmine",
outputDir: "build/jasmine"
};
var test = {
rootIDs: rootIDs.concat([
"test/all.js",
"**/__tests__/*.js"
]),
configFile: "grunt/config/jsx/test.json",
sourceDir: "src",
outputDir: "build/modules"
};
var release = {
rootIDs: rootIDs,
configFile: "grunt/config/jsx/release.json",
sourceDir: "src",
outputDir: "build/modules"
};
module.exports = {
debug: debug,
jasmine: jasmine,
test: test,
release: release
};
| Add ReactTransitionGroup to the build | Add ReactTransitionGroup to the build
| JavaScript | bsd-3-clause | gfogle/react,richiethomas/react,claudiopro/react,chacbumbum/react,sugarshin/react,reactjs-vn/reactjs_vndev,orneryhippo/react,dariocravero/react,szhigunov/react,ashwin01/react,TheBlasfem/react,ridixcr/react,TylerBrock/react,benchling/react,dirkliu/react,haoxutong/react,odysseyscience/React-IE-Alt,gfogle/react,trueadm/react,gold3bear/react,maxschmeling/react,Simek/react,greysign/react,DJCordhose/react,acdlite/react,MotherNature/react,jonhester/react,ABaldwinHunter/react-engines,gfogle/react,Furzikov/react,camsong/react,staltz/react,musofan/react,ropik/react,nsimmons/react,jkcaptain/react,apaatsio/react,6feetsong/react,concerned3rdparty/react,mgmcdermott/react,Chiens/react,jdlehman/react,DJCordhose/react,prometheansacrifice/react,cesine/react,chrisbolin/react,insionng/react,marocchino/react,tom-wang/react,JanChw/react,staltz/react,kamilio/react,dariocravero/react,temnoregg/react,lhausermann/react,pswai/react,joaomilho/react,yasaricli/react,STRML/react,JanChw/react,yangshun/react,ridixcr/react,mjul/react,zyt01/react,linmic/react,yuhualingfeng/react,skyFi/react,laogong5i0/react,temnoregg/react,joshblack/react,pze/react,sekiyaeiji/react,salzhrani/react,VukDukic/react,gpbl/react,iamchenxin/react,yabhis/react,getshuvo/react,Riokai/react,JoshKaufman/react,flipactual/react,chacbumbum/react,temnoregg/react,edmellum/react,trueadm/react,skevy/react,silkapp/react,howtolearntocode/react,terminatorheart/react,joe-strummer/react,1yvT0s/react,thomasboyt/react,misnet/react,huanglp47/react,yasaricli/react,arkist/react,savelichalex/react,elquatro/react,nathanmarks/react,ericyang321/react,rasj/react,jagdeesh109/react,ThinkedCoder/react,neusc/react,acdlite/react,devonharvey/react,brillantesmanuel/react,brigand/react,pze/react,scottburch/react,laskos/react,ipmobiletech/react,concerned3rdparty/react,miaozhirui/react,ouyangwenfeng/react,gxr1020/react,mhhegazy/react,jonhester/react,wuguanghai45/react,KevinTCoughlin/react,TheBlasfem/react,Simek/react,yiminghe/react,VioletLife/react,yut148/react,laogong5i0/react,jontewks/react,dmitriiabramov/react,jasonwebster/react,shripadk/react,reactkr/react,negativetwelve/react,benchling/react,Diaosir/react,rohannair/react,reggi/react,greglittlefield-wf/react,tomocchino/react,odysseyscience/React-IE-Alt,dgdblank/react,bitshadow/react,usgoodus/react,tarjei/react,lhausermann/react,jdlehman/react,dortonway/react,joe-strummer/react,0x00evil/react,it33/react,STRML/react,garbles/react,Chiens/react,patryknowak/react,marocchino/react,yisbug/react,ms-carterk/react,facebook/react,free-memory/react,bitshadow/react,salzhrani/react,tomocchino/react,mik01aj/react,SpencerCDixon/react,jameszhan/react,facebook/react,pze/react,zenlambda/react,lonely8rain/react,perterest/react,blainekasten/react,niole/react,kchia/react,flarnie/react,empyrical/react,joon1030/react,zorojean/react,jordanpapaleo/react,yiminghe/react,joshblack/react,mcanthony/react,patrickgoudjoako/react,zyt01/react,mosoft521/react,iamdoron/react,arkist/react,usgoodus/react,Nieralyte/react,elquatro/react,blue68/react,nhunzaker/react,aaron-goshine/react,jeffchan/react,wangyzyoga/react,speedyGonzales/react,lucius-feng/react,jquense/react,gregrperkins/react,ljhsai/react,Furzikov/react,deepaksharmacse12/react,vincentism/react,joecritch/react,mcanthony/react,qq316278987/react,dustin-H/react,agileurbanite/react,rohannair/react,pswai/react,jordanpapaleo/react,IndraVikas/react,staltz/react,nhunzaker/react,dfosco/react,mgmcdermott/react,dilidili/react,negativetwelve/react,nhunzaker/react,inuscript/react,ameyms/react,gpbl/react,gpazo/react,salzhrani/react,billfeller/react,bspaulding/react,varunparkhe/react,krasimir/react,miaozhirui/react,jiangzhixiao/react,tomocchino/react,mhhegazy/react,jabhishek/react,vikbert/react,dittos/react,honger05/react,blainekasten/react,genome21/react,vipulnsward/react,niole/react,ms-carterk/react,mgmcdermott/react,shripadk/react,digideskio/react,yungsters/react,joecritch/react,bitshadow/react,ianb/react,microlv/react,AlmeroSteyn/react,chrismoulton/react,TheBlasfem/react,trueadm/react,kaushik94/react,phillipalexander/react,pdaddyo/react,chrisjallen/react,framp/react,jbonta/react,brillantesmanuel/react,arasmussen/react,skevy/react,TheBlasfem/react,krasimir/react,rickbeerendonk/react,pdaddyo/react,prometheansacrifice/react,kevin0307/react,roylee0704/react,airondumael/react,miaozhirui/react,alvarojoao/react,zigi74/react,flarnie/react,ning-github/react,pod4g/react,dfosco/react,nickpresta/react,elquatro/react,marocchino/react,neomadara/react,zs99/react,mik01aj/react,shripadk/react,venkateshdaram434/react,jbonta/react,restlessdesign/react,vikbert/react,DigitalCoder/react,jedwards1211/react,btholt/react,acdlite/react,marocchino/react,christer155/react,joshblack/react,eoin/react,perterest/react,MoOx/react,0x00evil/react,Diaosir/react,sitexa/react,garbles/react,zorojean/react,8398a7/react,VioletLife/react,jagdeesh109/react,zeke/react,Simek/react,lyip1992/react,jimfb/react,rlugojr/react,tarjei/react,Lonefy/react,Datahero/react,TaaKey/react,reactkr/react,jaredly/react,genome21/react,Jonekee/react,guoshencheng/react,dirkliu/react,tako-black/react-1,dirkliu/react,Rafe/react,maxschmeling/react,marocchino/react,jedwards1211/react,zs99/react,andreypopp/react,linalu1/react,sarvex/react,ning-github/react,szhigunov/react,studiowangfei/react,kchia/react,pletcher/react,bruderstein/server-react,STRML/react,jmptrader/react,aickin/react,zigi74/react,bruderstein/server-react,reactjs-vn/reactjs_vndev,richiethomas/react,perterest/react,lastjune/react,kolmstead/react,magalhas/react,joecritch/react,kamilio/react,scottburch/react,joshblack/react,bhamodi/react,jeffchan/react,maxschmeling/react,gpbl/react,greyhwndz/react,kevin0307/react,vincentism/react,jabhishek/react,LoQIStar/react,terminatorheart/react,quip/react,panhongzhi02/react,OculusVR/react,mjackson/react,obimod/react,TylerBrock/react,Zeboch/react-tap-event-plugin,hejld/react,krasimir/react,sdiaz/react,leexiaosi/react,zigi74/react,rlugojr/react,mhhegazy/react,hzoo/react,yhagio/react,ms-carterk/react,linqingyicen/react,kevinrobinson/react,ssyang0102/react,angeliaz/react,wangyzyoga/react,nathanmarks/react,inuscript/react,yangshun/react,christer155/react,benchling/react,dgreensp/react,mingyaaaa/react,Diaosir/react,andrewsokolov/react,garbles/react,panhongzhi02/react,it33/react,zhangwei001/react,pze/react,zeke/react,billfeller/react,MichelleTodd/react,jsdf/react,JungMinu/react,maxschmeling/react,terminatorheart/react,kaushik94/react,trellowebinars/react,VioletLife/react,rwwarren/react,claudiopro/react,kakadiya91/react,jorrit/react,stardev24/react,mjackson/react,gxr1020/react,rgbkrk/react,panhongzhi02/react,chenglou/react,algolia/react,guoshencheng/react,1234-/react,jmptrader/react,0x00evil/react,blainekasten/react,jmptrader/react,mjackson/react,leeleo26/react,angeliaz/react,silvestrijonathan/react,with-git/react,dortonway/react,james4388/react,salier/react,sejoker/react,felixgrey/react,1yvT0s/react,DJCordhose/react,niubaba63/react,perperyu/react,PrecursorApp/react,mosoft521/react,tomv564/react,psibi/react,yungsters/react,AmericanSundown/react,JasonZook/react,pswai/react,PrecursorApp/react,sverrejoh/react,evilemon/react,obimod/react,usgoodus/react,kieranjones/react,james4388/react,stardev24/react,zyt01/react,microlv/react,microlv/react,gitignorance/react,bleyle/react,edmellum/react,0x00evil/react,roth1002/react,iamchenxin/react,joecritch/react,elquatro/react,aickin/react,acdlite/react,cpojer/react,getshuvo/react,willhackett/react,rickbeerendonk/react,guoshencheng/react,TaaKey/react,iamdoron/react,agileurbanite/react,ABaldwinHunter/react-engines,sugarshin/react,thr0w/react,ajdinhedzic/react,AlexJeng/react,rtfeldman/react,wmydz1/react,slongwang/react,IndraVikas/react,rickbeerendonk/react,ms-carterk/react,michaelchum/react,insionng/react,dgladkov/react,zeke/react,vincentism/react,ssyang0102/react,apaatsio/react,Flip120/react,niubaba63/react,iammerrick/react,andrerpena/react,gpazo/react,kay-is/react,mnordick/react,JoshKaufman/react,k-cheng/react,ABaldwinHunter/react-classic,hejld/react,RReverser/react,ThinkedCoder/react,sugarshin/react,vjeux/react,linmic/react,neomadara/react,christer155/react,alvarojoao/react,reggi/react,haoxutong/react,camsong/react,bspaulding/react,blue68/react,MichelleTodd/react,leohmoraes/react,pyitphyoaung/react,stanleycyang/react,zorojean/react,zhangwei900808/react,pwmckenna/react,reactjs-vn/reactjs_vndev,tjsavage/react,gregrperkins/react,lennerd/react,jmacman007/react,stanleycyang/react,savelichalex/react,popovsh6/react,yiminghe/react,jquense/react,mfunkie/react,nLight/react,zenlambda/react,nomanisan/react,shripadk/react,popovsh6/react,gj262/react,jimfb/react,joaomilho/react,ameyms/react,labs00/react,chicoxyzzy/react,livepanzo/react,cody/react,reggi/react,ManrajGrover/react,gajus/react,pswai/react,conorhastings/react,lina/react,felixgrey/react,sasumi/react,Instrument/react,AmericanSundown/react,skomski/react,jordanpapaleo/react,prathamesh-sonpatki/react,huanglp47/react,manl1100/react,deepaksharmacse12/react,jaredly/react,tom-wang/react,niubaba63/react,salier/react,krasimir/react,LoQIStar/react,kchia/react,ramortegui/react,isathish/react,thomasboyt/react,labs00/react,niubaba63/react,james4388/react,gold3bear/react,prometheansacrifice/react,misnet/react,pwmckenna/react,wushuyi/react,ianb/react,jfschwarz/react,VukDukic/react,isathish/react,jagdeesh109/react,yuhualingfeng/react,dustin-H/react,dmitriiabramov/react,react-china/react-docs,mfunkie/react,jzmq/react,felixgrey/react,laskos/react,nickpresta/react,bitshadow/react,pdaddyo/react,trellowebinars/react,manl1100/react,dmatteo/react,nomanisan/react,theseyi/react,yisbug/react,ArunTesco/react,bruderstein/server-react,atom/react,1040112370/react,dortonway/react,spt110/react,nathanmarks/react,Jyrno42/react,gregrperkins/react,blainekasten/react,blue68/react,marocchino/react,qq316278987/react,reactkr/react,scottburch/react,andreypopp/react,rickbeerendonk/react,yisbug/react,gpbl/react,chacbumbum/react,cpojer/react,adelevie/react,MotherNature/react,gj262/react,rtfeldman/react,lennerd/react,AnSavvides/react,gajus/react,davidmason/react,theseyi/react,empyrical/react,pyitphyoaung/react,Nieralyte/react,jedwards1211/react,flipactual/react,Lonefy/react,yulongge/react,agileurbanite/react,AlexJeng/react,agideo/react,orneryhippo/react,gxr1020/react,OculusVR/react,SpencerCDixon/react,zenlambda/react,digideskio/react,obimod/react,Diaosir/react,yongxu/react,easyfmxu/react,dgdblank/react,yungsters/react,dmatteo/react,rgbkrk/react,chrisjallen/react,dmitriiabramov/react,hzoo/react,pod4g/react,genome21/react,javascriptit/react,zanjs/react,dgreensp/react,jsdf/react,VioletLife/react,agideo/react,sekiyaeiji/react,Flip120/react,dirkliu/react,christer155/react,roth1002/react,Diaosir/react,dgreensp/react,ramortegui/react,darobin/react,yangshun/react,theseyi/react,krasimir/react,camsong/react,ThinkedCoder/react,edvinerikson/react,JasonZook/react,savelichalex/react,hzoo/react,nLight/react,arasmussen/react,vipulnsward/react,prathamesh-sonpatki/react,Zeboch/react-tap-event-plugin,hejld/react,nathanmarks/react,afc163/react,blainekasten/react,negativetwelve/react,rohannair/react,jakeboone02/react,ninjaofawesome/reaction,qq316278987/react,SpencerCDixon/react,ZhouYong10/react,apaatsio/react,crsr/react,jessebeach/react,hawsome/react,AlexJeng/react,jsdf/react,prathamesh-sonpatki/react,digideskio/react,psibi/react,patrickgoudjoako/react,krasimir/react,zenlambda/react,edvinerikson/react,TaaKey/react,shadowhunter2/react,yangshun/react,zorojean/react,tomocchino/react,brigand/react,varunparkhe/react,perperyu/react,reactkr/react,sitexa/react,chicoxyzzy/react,dgladkov/react,kevin0307/react,dirkliu/react,arasmussen/react,zenlambda/react,mhhegazy/react,sejoker/react,iamdoron/react,songawee/react,shergin/react,linalu1/react,ilyachenko/react,Jyrno42/react,niole/react,mingyaaaa/react,glenjamin/react,jakeboone02/react,wmydz1/react,juliocanares/react,gpbl/react,alexanther1012/react,carlosipe/react,billfeller/react,perperyu/react,trueadm/react,kaushik94/react,aaron-goshine/react,AmericanSundown/react,gajus/react,benchling/react,AnSavvides/react,jonhester/react,sergej-kucharev/react,brillantesmanuel/react,manl1100/react,cpojer/react,with-git/react,benchling/react,eoin/react,niubaba63/react,AmericanSundown/react,Lonefy/react,brigand/react,greglittlefield-wf/react,michaelchum/react,chippieTV/react,joaomilho/react,zhengqiangzi/react,getshuvo/react,jbonta/react,S0lahart-AIRpanas-081905220200-Service/react,kaushik94/react,hawsome/react,kolmstead/react,chippieTV/react,dittos/react,kalloc/react,lonely8rain/react,huanglp47/react,musofan/react,mgmcdermott/react,zhangwei001/react,sekiyaeiji/react,atom/react,wmydz1/react,salier/react,yiminghe/react,nhunzaker/react,k-cheng/react,silvestrijonathan/react,apaatsio/react,zs99/react,gitoneman/react,gregrperkins/react,chacbumbum/react,Spotinux/react,AnSavvides/react,shergin/react,arkist/react,jfschwarz/react,mgmcdermott/react,iamdoron/react,zilaiyedaren/react,joe-strummer/react,patryknowak/react,tako-black/react-1,anushreesubramani/react,lastjune/react,obimod/react,rricard/react,silkapp/react,spicyj/react,empyrical/react,flowbywind/react,yungsters/react,stardev24/react,brigand/react,mhhegazy/react,inuscript/react,isathish/react,nickpresta/react,linqingyicen/react,patryknowak/react,ljhsai/react,BorderTravelerX/react,dgdblank/react,joe-strummer/react,jameszhan/react,davidmason/react,salier/react,devonharvey/react,iOSDevBlog/react,livepanzo/react,TaaKey/react,glenjamin/react,patrickgoudjoako/react,trellowebinars/react,deepaksharmacse12/react,laskos/react,psibi/react,diegobdev/react,microlv/react,andrerpena/react,jagdeesh109/react,mosoft521/react,pswai/react,facebook/react,MichelleTodd/react,reactjs-vn/reactjs_vndev,greyhwndz/react,gleborgne/react,algolia/react,wesbos/react,liyayun/react,jzmq/react,ledrui/react,xiaxuewuhen001/react,rohannair/react,roylee0704/react,skevy/react,gleborgne/react,afc163/react,panhongzhi02/react,andrescarceller/react,wjb12/react,wzpan/react,jeffchan/react,gfogle/react,linmic/react,trungda/react,jlongster/react,andrerpena/react,aickin/react,1040112370/react,wushuyi/react,wudouxingjun/react,Simek/react,levibuzolic/react,jeffchan/react,AnSavvides/react,chinakids/react,cmfcmf/react,vjeux/react,thomasboyt/react,carlosipe/react,guoshencheng/react,devonharvey/react,jiangzhixiao/react,DigitalCoder/react,blainekasten/react,dilidili/react,reggi/react,rwwarren/react,ameyms/react,shergin/react,joon1030/react,k-cheng/react,flarnie/react,acdlite/react,pandoraui/react,hawsome/react,shadowhunter2/react,apaatsio/react,roylee0704/react,anushreesubramani/react,Riokai/react,gitoneman/react,maxschmeling/react,rickbeerendonk/react,ThinkedCoder/react,AlmeroSteyn/react,staltz/react,mhhegazy/react,orzyang/react,with-git/react,ropik/react,levibuzolic/react,gleborgne/react,tako-black/react-1,TaaKey/react,skevy/react,dortonway/react,jordanpapaleo/react,supriyantomaftuh/react,kalloc/react,kolmstead/react,MichelleTodd/react,Jericho25/react,chrisjallen/react,rwwarren/react,edmellum/react,stevemao/react,javascriptit/react,jdlehman/react,with-git/react,Jericho25/react,nsimmons/react,camsong/react,ABaldwinHunter/react-classic,salzhrani/react,jmacman007/react,JanChw/react,chenglou/react,yuhualingfeng/react,tjsavage/react,qq316278987/react,zorojean/react,ABaldwinHunter/react-classic,thr0w/react,vikbert/react,IndraVikas/react,JoshKaufman/react,Galactix/react,darobin/react,reggi/react,VioletLife/react,KevinTCoughlin/react,sebmarkbage/react,jlongster/react,zs99/react,magalhas/react,jquense/react,sugarshin/react,yongxu/react,haoxutong/react,zofuthan/react,S0lahart-AIRpanas-081905220200-Service/react,usgoodus/react,joaomilho/react,zorojean/react,nhunzaker/react,pyitphyoaung/react,mjackson/react,mik01aj/react,yongxu/react,ledrui/react,dmatteo/react,vincentnacar02/react,reggi/react,STRML/react,jessebeach/react,inuscript/react,tako-black/react-1,JoshKaufman/react,thomasboyt/react,ericyang321/react,LoQIStar/react,hawsome/react,wuguanghai45/react,gold3bear/react,spt110/react,vipulnsward/react,BreemsEmporiumMensToiletriesFragrances/react,MichelleTodd/react,silppuri/react,jeffchan/react,Lonefy/react,zhangwei900808/react,andrewsokolov/react,facebook/react,angeliaz/react,airondumael/react,jontewks/react,dmatteo/react,willhackett/react,restlessdesign/react,yungsters/react,gitignorance/react,andrescarceller/react,edmellum/react,vipulnsward/react,joshbedo/react,wushuyi/react,jzmq/react,deepaksharmacse12/react,jimfb/react,linqingyicen/react,BorderTravelerX/react,airondumael/react,mtsyganov/react,jmacman007/react,syranide/react,rricard/react,Jonekee/react,gj262/react,jbonta/react,dittos/react,cesine/react,ilyachenko/react,mfunkie/react,wuguanghai45/react,ledrui/react,dittos/react,shergin/react,crsr/react,labs00/react,mjackson/react,tzq668766/react,richiethomas/react,arasmussen/react,jimfb/react,silkapp/react,skyFi/react,brian-murray35/react,wushuyi/react,lonely8rain/react,stevemao/react,shergin/react,gpazo/react,wangyzyoga/react,orneryhippo/react,sebmarkbage/react,trungda/react,airondumael/react,ZhouYong10/react,silkapp/react,yiminghe/react,niole/react,jquense/react,jdlehman/react,luomiao3/react,jabhishek/react,neusc/react,ridixcr/react,Jyrno42/react,devonharvey/react,devonharvey/react,AnSavvides/react,Instrument/react,spt110/react,patrickgoudjoako/react,gitoneman/react,roth1002/react,yjyi/react,angeliaz/react,Simek/react,AmericanSundown/react,adelevie/react,alvarojoao/react,vincentnacar02/react,insionng/react,mfunkie/react,conorhastings/react,MotherNature/react,sverrejoh/react,tywinstark/react,soulcm/react,jameszhan/react,mohitbhatia1994/react,chrisjallen/react,bhamodi/react,pwmckenna/react,jlongster/react,venkateshdaram434/react,yuhualingfeng/react,nhunzaker/react,framp/react,quip/react,ArunTesco/react,tom-wang/react,salzhrani/react,rohannair/react,restlessdesign/react,jsdf/react,easyfmxu/react,zanjs/react,andrerpena/react,roylee0704/react,joshbedo/react,rricard/react,supriyantomaftuh/react,andreypopp/react,joon1030/react,nLight/react,roth1002/react,pwmckenna/react,with-git/react,trellowebinars/react,edvinerikson/react,0x00evil/react,PeterWangPo/react,cmfcmf/react,atom/react,thr0w/react,cpojer/react,nickpresta/react,MotherNature/react,zofuthan/react,mtsyganov/react,acdlite/react,zofuthan/react,0x00evil/react,jquense/react,S0lahart-AIRpanas-081905220200-Service/react,Galactix/react,trungda/react,spt110/react,AlmeroSteyn/react,tlwirtz/react,lhausermann/react,empyrical/react,arush/react,sarvex/react,joshbedo/react,trungda/react,TaaKey/react,qq316278987/react,sergej-kucharev/react,PrecursorApp/react,silvestrijonathan/react,zs99/react,Chiens/react,it33/react,studiowangfei/react,iamchenxin/react,wzpan/react,rasj/react,facebook/react,spicyj/react,sugarshin/react,iammerrick/react,leohmoraes/react,honger05/react,yjyi/react,tomv564/react,bestwpw/react,Jyrno42/react,ssyang0102/react,prometheansacrifice/react,staltz/react,crsr/react,yisbug/react,Rafe/react,Spotinux/react,restlessdesign/react,rohannair/react,ashwin01/react,richiethomas/react,tlwirtz/react,JasonZook/react,savelichalex/react,tywinstark/react,evilemon/react,PeterWangPo/react,lyip1992/react,TheBlasfem/react,dfosco/react,magalhas/react,ramortegui/react,AlexJeng/react,afc163/react,kieranjones/react,gajus/react,framp/react,mnordick/react,Duc-Ngo-CSSE/react,AlmeroSteyn/react,leeleo26/react,gold3bear/react,PrecursorApp/react,cpojer/react,laogong5i0/react,thr0w/react,crsr/react,ameyms/react,yiminghe/react,wjb12/react,free-memory/react,Riokai/react,Nieralyte/react,JungMinu/react,ridixcr/react,yulongge/react,andrescarceller/react,tlwirtz/react,stanleycyang/react,jakeboone02/react,facebook/react,dfosco/react,Duc-Ngo-CSSE/react,vincentism/react,vikbert/react,mingyaaaa/react,thr0w/react,ninjaofawesome/reaction,andrerpena/react,reactjs-vn/reactjs_vndev,davidmason/react,speedyGonzales/react,mtsyganov/react,cody/react,jfschwarz/react,krasimir/react,neusc/react,flipactual/react,laogong5i0/react,gpbl/react,usgoodus/react,apaatsio/react,TaaKey/react,chicoxyzzy/react,magalhas/react,TylerBrock/react,anushreesubramani/react,billfeller/react,jorrit/react,usgoodus/react,zilaiyedaren/react,yungsters/react,anushreesubramani/react,jameszhan/react,pyitphyoaung/react,concerned3rdparty/react,aaron-goshine/react,tywinstark/react,studiowangfei/react,lennerd/react,zigi74/react,Furzikov/react,pletcher/react,ABaldwinHunter/react-engines,JoshKaufman/react,niole/react,dgladkov/react,yhagio/react,silvestrijonathan/react,leeleo26/react,lina/react,bhamodi/react,negativetwelve/react,ManrajGrover/react,temnoregg/react,rlugojr/react,lyip1992/react,ninjaofawesome/reaction,it33/react,gitoneman/react,1040112370/react,patrickgoudjoako/react,cmfcmf/react,dustin-H/react,sejoker/react,yulongge/react,mcanthony/react,mjackson/react,dilidili/react,laskos/react,Furzikov/react,mardigtch/react,juliocanares/react,hawsome/react,dilidili/react,gpazo/react,pletcher/react,howtolearntocode/react,cmfcmf/react,obimod/react,zs99/react,chenglou/react,ashwin01/react,savelichalex/react,skevy/react,alwayrun/react,magalhas/react,ABaldwinHunter/react-classic,pdaddyo/react,chrisbolin/react,niubaba63/react,jquense/react,lyip1992/react,kevinrobinson/react,quip/react,tomocchino/react,edmellum/react,bspaulding/react,JasonZook/react,flarnie/react,joecritch/react,andreypopp/react,Spotinux/react,roylee0704/react,1040112370/react,aickin/react,richiethomas/react,thr0w/react,greglittlefield-wf/react,microlv/react,shripadk/react,rgbkrk/react,dittos/react,studiowangfei/react,venkateshdaram434/react,aaron-goshine/react,rlugojr/react,zyt01/react,bspaulding/react,garbles/react,cody/react,sugarshin/react,davidmason/react,chrisjallen/react,conorhastings/react,jimfb/react,Duc-Ngo-CSSE/react,iOSDevBlog/react,lennerd/react,willhackett/react,bhamodi/react,sverrejoh/react,ericyang321/react,henrik/react,silvestrijonathan/react,billfeller/react,rlugojr/react,jonhester/react,kay-is/react,chenglou/react,pletcher/react,zyt01/react,dariocravero/react,alvarojoao/react,haoxutong/react,jeromjoy/react,edvinerikson/react,wzpan/react,react-china/react-docs,mgmcdermott/react,jquense/react,reactkr/react,jagdeesh109/react,mohitbhatia1994/react,6feetsong/react,temnoregg/react,skevy/react,rricard/react,quip/react,wudouxingjun/react,cmfcmf/react,gxr1020/react,concerned3rdparty/react,cinic/react,KevinTCoughlin/react,jaredly/react,OculusVR/react,ashwin01/react,IndraVikas/react,pletcher/react,cody/react,greyhwndz/react,yongxu/react,haoxutong/react,chicoxyzzy/react,10fish/react,edvinerikson/react,songawee/react,elquatro/react,spt110/react,jiangzhixiao/react,dirkliu/react,yiminghe/react,lhausermann/react,Spotinux/react,ABaldwinHunter/react-engines,yut148/react,luomiao3/react,gxr1020/react,jordanpapaleo/react,salier/react,neusc/react,hawsome/react,kamilio/react,albulescu/react,tomv564/react,8398a7/react,terminatorheart/react,stardev24/react,skomski/react,silvestrijonathan/react,arkist/react,tlwirtz/react,easyfmxu/react,MotherNature/react,DigitalCoder/react,tomocchino/react,Riokai/react,javascriptit/react,trungda/react,free-memory/react,andrescarceller/react,jdlehman/react,henrik/react,ridixcr/react,ropik/react,aaron-goshine/react,honger05/react,bspaulding/react,mosoft521/react,panhongzhi02/react,garbles/react,yjyi/react,ericyang321/react,popovsh6/react,MoOx/react,nLight/react,jlongster/react,insionng/react,demohi/react,supriyantomaftuh/react,wesbos/react,digideskio/react,livepanzo/react,zhengqiangzi/react,tarjei/react,lucius-feng/react,kolmstead/react,orneryhippo/react,billfeller/react,BorderTravelerX/react,szhigunov/react,gpazo/react,spt110/react,ninjaofawesome/reaction,1234-/react,demohi/react,concerned3rdparty/react,react-china/react-docs,crsr/react,xiaxuewuhen001/react,prathamesh-sonpatki/react,btholt/react,JoshKaufman/react,roth1002/react,edvinerikson/react,prometheansacrifice/react,kalloc/react,linqingyicen/react,k-cheng/react,skomski/react,empyrical/react,sdiaz/react,iammerrick/react,roth1002/react,Jyrno42/react,maxschmeling/react,negativetwelve/react,vikbert/react,acdlite/react,afc163/react,lastjune/react,andrewsokolov/react,rickbeerendonk/react,pyitphyoaung/react,flowbywind/react,iamdoron/react,joaomilho/react,tomv564/react,AlmeroSteyn/react,pyitphyoaung/react,pandoraui/react,mjackson/react,cinic/react,hejld/react,aickin/react,yasaricli/react,silppuri/react,1234-/react,MoOx/react,TaaKey/react,DJCordhose/react,wmydz1/react,yisbug/react,ridixcr/react,glenjamin/react,gitoneman/react,jdlehman/react,syranide/react,Datahero/react,lennerd/react,joe-strummer/react,maxschmeling/react,TaaKey/react,ms-carterk/react,stardev24/react,varunparkhe/react,jameszhan/react,gold3bear/react,tomv564/react,zilaiyedaren/react,6feetsong/react,S0lahart-AIRpanas-081905220200-Service/react,musofan/react,kaushik94/react,trueadm/react,trueadm/react,ericyang321/react,angeliaz/react,mjul/react,yhagio/react,tywinstark/react,bleyle/react,laskos/react,iOSDevBlog/react,dustin-H/react,ipmobiletech/react,sergej-kucharev/react,james4388/react,thomasboyt/react,trellowebinars/react,arkist/react,yangshun/react,mingyaaaa/react,nhunzaker/react,camsong/react,honger05/react,chrismoulton/react,1yvT0s/react,dilidili/react,KevinTCoughlin/react,chippieTV/react,sebmarkbage/react,greysign/react,dmitriiabramov/react,levibuzolic/react,chinakids/react,zeke/react,quip/react,ThinkedCoder/react,terminatorheart/react,tom-wang/react,yabhis/react,Jonekee/react,james4388/react,with-git/react,misnet/react,odysseyscience/React-IE-Alt,ms-carterk/react,jzmq/react,nickpresta/react,tom-wang/react,demohi/react,dortonway/react,slongwang/react,1234-/react,panhongzhi02/react,STRML/react,neomadara/react,digideskio/react,mosoft521/react,jameszhan/react,Riokai/react,alwayrun/react,wudouxingjun/react,dgdblank/react,neusc/react,chippieTV/react,cpojer/react,ArunTesco/react,aaron-goshine/react,VioletLife/react,yut148/react,joe-strummer/react,spicyj/react,Riokai/react,soulcm/react,phillipalexander/react,restlessdesign/react,jorrit/react,jontewks/react,ning-github/react,dmitriiabramov/react,claudiopro/react,lonely8rain/react,kaushik94/react,btholt/react,adelevie/react,diegobdev/react,bhamodi/react,k-cheng/react,yulongge/react,ajdinhedzic/react,shripadk/react,ashwin01/react,Simek/react,sverrejoh/react,benjaffe/react,brillantesmanuel/react,jimfb/react,manl1100/react,wmydz1/react,gitignorance/react,rricard/react,framp/react,aickin/react,jzmq/react,supriyantomaftuh/react,reactjs-vn/reactjs_vndev,magalhas/react,trellowebinars/react,yut148/react,shadowhunter2/react,react-china/react-docs,lina/react,IndraVikas/react,benjaffe/react,MichelleTodd/react,kaushik94/react,gajus/react,silkapp/react,ZhouYong10/react,dustin-H/react,manl1100/react,yuhualingfeng/react,silppuri/react,jeromjoy/react,sarvex/react,sdiaz/react,lonely8rain/react,leexiaosi/react,jdlehman/react,claudiopro/react,anushreesubramani/react,nickdima/react,pwmckenna/react,RReverser/react,jasonwebster/react,nLight/react,ljhsai/react,chicoxyzzy/react,jmacman007/react,iamchenxin/react,airondumael/react,sejoker/react,jorrit/react,Rafe/react,flarnie/react,Spotinux/react,quip/react,brillantesmanuel/react,claudiopro/react,dariocravero/react,dgdblank/react,jzmq/react,davidmason/react,diegobdev/react,savelichalex/react,zofuthan/react,henrik/react,conorhastings/react,glenjamin/react,bitshadow/react,jorrit/react,nickpresta/react,chenglou/react,jonhester/react,syranide/react,levibuzolic/react,eoin/react,theseyi/react,prometheansacrifice/react,honger05/react,jedwards1211/react,dustin-H/react,trueadm/react,liyayun/react,rohannair/react,stanleycyang/react,OculusVR/react,vipulnsward/react,ericyang321/react,arkist/react,BreemsEmporiumMensToiletriesFragrances/react,jmptrader/react,STRML/react,Instrument/react,dmatteo/react,RReverser/react,jessebeach/react,psibi/react,dfosco/react,salier/react,PeterWangPo/react,garbles/react,iamdoron/react,restlessdesign/react,camsong/react,orzyang/react,digideskio/react,tzq668766/react,leohmoraes/react,syranide/react,pswai/react,sasumi/react,speedyGonzales/react,10fish/react,jsdf/react,Flip120/react,haoxutong/react,glenjamin/react,wjb12/react,stanleycyang/react,microlv/react,shergin/react,flarnie/react,orneryhippo/react,nsimmons/react,reactkr/react,PrecursorApp/react,BreemsEmporiumMensToiletriesFragrances/react,sejoker/react,Instrument/react,alexanther1012/react,mhhegazy/react,tarjei/react,brigand/react,stanleycyang/react,mnordick/react,yasaricli/react,hejld/react,cody/react,lastjune/react,pandoraui/react,chippieTV/react,lhausermann/react,zhangwei001/react,eoin/react,BreemsEmporiumMensToiletriesFragrances/react,8398a7/react,carlosipe/react,kamilio/react,TheBlasfem/react,kevinrobinson/react,vipulnsward/react,musofan/react,felixgrey/react,jessebeach/react,it33/react,kakadiya91/react,jeffchan/react,pod4g/react,arasmussen/react,VukDukic/react,jasonwebster/react,eoin/react,jorrit/react,sasumi/react,mik01aj/react,lastjune/react,ericyang321/react,miaozhirui/react,btholt/react,stardev24/react,Jericho25/react,yongxu/react,Datahero/react,dariocravero/react,nickdima/react,insionng/react,ashwin01/react,gougouGet/react,tlwirtz/react,lyip1992/react,vincentism/react,joecritch/react,VioletLife/react,claudiopro/react,Spotinux/react,MoOx/react,MoOx/react,vincentnacar02/react,arush/react,perterest/react,insionng/react,ramortegui/react,liyayun/react,arasmussen/react,deepaksharmacse12/react,cmfcmf/react,leexiaosi/react,theseyi/react,sverrejoh/react,iOSDevBlog/react,jontewks/react,camsong/react,atom/react,thomasboyt/react,Galactix/react,10fish/react,Instrument/react,pze/react,bestwpw/react,albulescu/react,scottburch/react,bhamodi/react,jbonta/react,gougouGet/react,agideo/react,ropik/react,dariocravero/react,orneryhippo/react,jeromjoy/react,ipmobiletech/react,elquatro/react,apaatsio/react,luomiao3/react,BreemsEmporiumMensToiletriesFragrances/react,mtsyganov/react,jasonwebster/react,easyfmxu/react,cpojer/react,roylee0704/react,nathanmarks/react,kay-is/react,jbonta/react,Jericho25/react,rickbeerendonk/react,phillipalexander/react,guoshencheng/react,brigand/react,iOSDevBlog/react,inuscript/react,ianb/react,bruderstein/server-react,salzhrani/react,quip/react,zigi74/react,jmacman007/react,easyfmxu/react,ABaldwinHunter/react-classic,ledrui/react,gfogle/react,RReverser/react,JungMinu/react,AlexJeng/react,k-cheng/react,Jericho25/react,KevinTCoughlin/react,linmic/react,iamchenxin/react,vjeux/react,cesine/react,empyrical/react,chinakids/react,skyFi/react,claudiopro/react,pdaddyo/react,slongwang/react,ABaldwinHunter/react-engines,howtolearntocode/react,andreypopp/react,afc163/react,Rafe/react,wmydz1/react,vincentism/react,vikbert/react,wjb12/react,zhangwei001/react,mcanthony/react,jontewks/react,chippieTV/react,alwayrun/react,cody/react,jordanpapaleo/react,supriyantomaftuh/react,roth1002/react,AlmeroSteyn/react,rgbkrk/react,jakeboone02/react,tzq668766/react,andrescarceller/react,patrickgoudjoako/react,benjaffe/react,iammerrick/react,kchia/react,jontewks/react,conorhastings/react,hejld/react,iammerrick/react,livepanzo/react,isathish/react,bestwpw/react,yasaricli/react,wmydz1/react,orzyang/react,cinic/react,linqingyicen/react,silvestrijonathan/react,mingyaaaa/react,linmic/react,Furzikov/react,mik01aj/react,slongwang/react,bitshadow/react,lyip1992/react,slongwang/react,laogong5i0/react,mardigtch/react,zenlambda/react,zofuthan/react,kakadiya91/react,sarvex/react,easyfmxu/react,felixgrey/react,musofan/react,nomanisan/react,jkcaptain/react,ManrajGrover/react,neusc/react,shergin/react,leohmoraes/react,ropik/react,kevinrobinson/react,jedwards1211/react,gougouGet/react,ZhouYong10/react,vjeux/react,kakadiya91/react,kolmstead/react,jedwards1211/react,juliocanares/react,TaaKey/react,kevinrobinson/react,zhangwei001/react,levibuzolic/react,studiowangfei/react,sarvex/react,neomadara/react,it33/react,niubaba63/react,yabhis/react,dgdblank/react,rlugojr/react,edmellum/react,flowbywind/react,spicyj/react,iamchenxin/react,ilyachenko/react,empyrical/react,chacbumbum/react,devonharvey/react,jessebeach/react,DJCordhose/react,bspaulding/react,psibi/react,kakadiya91/react,howtolearntocode/react,VukDukic/react,alvarojoao/react,ZhouYong10/react,STRML/react,prometheansacrifice/react,ZhouYong10/react,framp/react,zigi74/react,huanglp47/react,tom-wang/react,mjul/react,yut148/react,ajdinhedzic/react,sarvex/react,DJCordhose/react,zhengqiangzi/react,trungda/react,ouyangwenfeng/react,brillantesmanuel/react,qq316278987/react,anushreesubramani/react,richiethomas/react,KevinTCoughlin/react,chicoxyzzy/react,Furzikov/react,zhangwei001/react,alexanther1012/react,zeke/react,staltz/react,chrisbolin/react,1040112370/react,songawee/react,benchling/react,jfschwarz/react,eoin/react,huanglp47/react,yulongge/react,anushreesubramani/react,Flip120/react,musofan/react,chrismoulton/react,tjsavage/react,nickdima/react,tlwirtz/react,AnSavvides/react,mohitbhatia1994/react,bruderstein/server-react,dgreensp/react,inuscript/react,jkcaptain/react,jmptrader/react,ABaldwinHunter/react-engines,VukDukic/react,jmacman007/react,with-git/react,dilidili/react,andrerpena/react,sverrejoh/react,edvinerikson/react,tywinstark/react,ledrui/react,joecritch/react,S0lahart-AIRpanas-081905220200-Service/react,lhausermann/react,varunparkhe/react,gajus/react,rtfeldman/react,yisbug/react,sasumi/react,joshblack/react,hzoo/react,aickin/react,chenglou/react,1040112370/react,brigand/react,wushuyi/react,kieranjones/react,linalu1/react,Instrument/react,Simek/react,lonely8rain/react,jsdf/react,guoshencheng/react,zanjs/react,ameyms/react,miaozhirui/react,gregrperkins/react,prathamesh-sonpatki/react,tomocchino/react,livepanzo/react,billfeller/react,christer155/react,bleyle/react,howtolearntocode/react,conorhastings/react,hzoo/react,kevinrobinson/react,framp/react,1234-/react,linmic/react,davidmason/react,zhangwei900808/react,dgreensp/react,jzmq/react,TaaKey/react,ABaldwinHunter/react-classic,brian-murray35/react,mosoft521/react,andreypopp/react,scottburch/react,ouyangwenfeng/react,chenglou/react,bspaulding/react,dgreensp/react,Jericho25/react,kamilio/react,brian-murray35/react,dmitriiabramov/react,glenjamin/react,1234-/react,mjul/react,dortonway/react,IndraVikas/react,tako-black/react-1,angeliaz/react,isathish/react,yangshun/react,jameszhan/react,stevemao/react,jorrit/react,algolia/react,xiaxuewuhen001/react,tako-black/react-1,mcanthony/react,dittos/react,Jyrno42/react,flarnie/react,michaelchum/react,facebook/react,prathamesh-sonpatki/react,wesbos/react,pandoraui/react,greysign/react,jlongster/react,ramortegui/react,mcanthony/react,iOSDevBlog/react,alvarojoao/react,btholt/react,leohmoraes/react,gpazo/react,nickdima/react,AlexJeng/react,howtolearntocode/react,jlongster/react,bruderstein/server-react,odysseyscience/React-IE-Alt,Rafe/react,sitexa/react,ameyms/react,sebmarkbage/react,evilemon/react,zyt01/react,odysseyscience/React-IE-Alt,pandoraui/react,nickdima/react,joshbedo/react,OculusVR/react,james4388/react,albulescu/react,yut148/react,glenjamin/react,arush/react,richiethomas/react,chicoxyzzy/react,gregrperkins/react,songawee/react,Flip120/react,10fish/react,theseyi/react,ropik/react,rlugojr/react,zeke/react,nathanmarks/react,gfogle/react,neomadara/react,darobin/react,nLight/react,pyitphyoaung/react,kakadiya91/react,dilidili/react,jakeboone02/react,rricard/react,perterest/react,yangshun/react,lucius-feng/react,yungsters/react,mosoft521/react,joaomilho/react,soulcm/react,rgbkrk/react,wjb12/react,jonhester/react,miaozhirui/react,sasumi/react,terminatorheart/react,AlmeroSteyn/react,mardigtch/react,jordanpapaleo/react,laskos/react,JasonZook/react,rasj/react,concerned3rdparty/react,jfschwarz/react,tarjei/react,levibuzolic/react,kamilio/react | ---
+++
@@ -1,7 +1,8 @@
'use strict';
var rootIDs = [
- "React"
+ "React",
+ "ReactTransitionGroup"
];
var debug = { |
2d78ed41e309568eb0307769c58a3bbdad5d75f9 | app/assets/javascripts/assessment_form.js | app/assets/javascripts/assessment_form.js | $(document).ready(function() {
function updateAssessmentFormState() {
var numberOfQuestions = $('#assessment .legend').length;
var numberOfCheckedAnswers = $('#assessment input:checked').length;
var numberOfUnansweredQuestions = numberOfQuestions - numberOfCheckedAnswers;
var unansweredQuestionsBadge = $('#assessment .badge');
if (numberOfUnansweredQuestions > 0) {
var unansweredQuestionsBadgeText = numberOfUnansweredQuestions + ' unanswered question';
if (numberOfUnansweredQuestions > 1) {
unansweredQuestionsBadgeText += 's';
}
unansweredQuestionsBadge.text(unansweredQuestionsBadgeText);
} else {
unansweredQuestionsBadge.fadeOut();
$('#assessment input[type=submit]').removeAttr('disabled');
$('.touch #assessment .span4').addClass('collapse-height');
}
}
$('#assessment').on('click', 'input[type=radio]', updateAssessmentFormState);
var cancelButton = $('#assessment input[type=button]');
cancelButton.click(function() {
location.href = cancelButton.attr('data-course-path');
});
$('.touch #assessment label').click(function() {
$(this).children('input').attr('checked', 'checked');
updateAssessmentFormState();
});
}); | $(document).ready(function() {
function updateAssessmentFormState() {
var numberOfQuestions = $('#assessment .legend').length;
var numberOfCheckedAnswers = $('#assessment input:checked').length;
var numberOfUnansweredQuestions = numberOfQuestions - numberOfCheckedAnswers;
var unansweredQuestionsBadge = $('#assessment .badge');
if (numberOfUnansweredQuestions > 0) {
var unansweredQuestionsBadgeText = numberOfUnansweredQuestions + ' unanswered question';
if (numberOfUnansweredQuestions > 1) {
unansweredQuestionsBadgeText += 's';
}
unansweredQuestionsBadge.text(unansweredQuestionsBadgeText);
} else {
$('.touch #assessment .badge').hide();
unansweredQuestionsBadge.fadeOut();
$('#assessment input[type=submit]').removeAttr('disabled');
$('.touch #assessment .span4').addClass('collapse-height');
}
}
$('#assessment').on('click', 'input[type=radio]', updateAssessmentFormState);
var cancelButton = $('#assessment input[type=button]');
cancelButton.click(function() {
location.href = cancelButton.attr('data-course-path');
});
$('.touch #assessment label').click(function() {
$(this).children('input').attr('checked', 'checked');
updateAssessmentFormState();
});
}); | Hide (instead of fade out) badge on iPhone | Hide (instead of fade out) badge on iPhone
| JavaScript | mit | woople/woople-theme,woople/woople-theme | ---
+++
@@ -13,6 +13,8 @@
unansweredQuestionsBadge.text(unansweredQuestionsBadgeText);
} else {
+ $('.touch #assessment .badge').hide();
+
unansweredQuestionsBadge.fadeOut();
$('#assessment input[type=submit]').removeAttr('disabled');
|
627ea6e7175d3ec1fb89e0c896e123ed8bd3ee2b | bookWorm.js | bookWorm.js | $(document).ready(function() {
onCreatedChrome()
});
function onCreatedChrome() {
chrome.tabs.onCreated.addListener(function(tab) {
alert("hello");
});
}
| $(document).ready(function() {
onCreatedChrome();
});
function onCreatedChrome() {
chrome.tabs.onCreated.addListener(function(tab) {
chrome.bookmarks.getChildren("1", (bar) => {
chrome.bookmarks.remove(bar[bar.length - 1].id);
});
});
}
| Make function to eat bookmarks | Make function to eat bookmarks
| JavaScript | mit | tmashuang/BookWorm,tmashuang/BookWorm | ---
+++
@@ -1,9 +1,11 @@
$(document).ready(function() {
- onCreatedChrome()
+ onCreatedChrome();
});
function onCreatedChrome() {
chrome.tabs.onCreated.addListener(function(tab) {
- alert("hello");
+ chrome.bookmarks.getChildren("1", (bar) => {
+ chrome.bookmarks.remove(bar[bar.length - 1].id);
+ });
});
} |
f98e9ddd8fa02c5d16f7d94c8b811b21e2c39b8f | src/main/resources/web/js/tool-editor/constants.js | src/main/resources/web/js/tool-editor/constants.js | /**
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
define(function () {
"use strict"; // JS strict mode
/**
* Constants used by the tool - editor
*/
var constants = {
INITIAL_SOURCE_INSTRUCTIONS: "@App:name(\"SiddhiApp\")\n@App:description(\"Description of the plan\")\n\n" +
"-- Please refer to https://docs.wso2.com/display/SP400/Quick+Start+Guide " +
"on getting started with SP editor. \n\n"
};
return constants;
}); | /**
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
define(function () {
"use strict"; // JS strict mode
/**
* Constants used by the tool - editor
*/
var constants = {
INITIAL_SOURCE_INSTRUCTIONS: "@App:name(\"SiddhiApp\")\n@App:description(\"Description of the plan\")\n\n" +
"-- Please refer to https://siddhi.io/en/v5.0/docs/quick-start/ " +
"on getting started with Siddhi editor. \n\n"
};
return constants;
}); | Update Siddhi quick start guide link | Update Siddhi quick start guide link
| JavaScript | apache-2.0 | wso2/carbon-analytics,wso2/carbon-analytics,wso2/carbon-analytics,wso2/carbon-analytics,wso2/carbon-analytics | ---
+++
@@ -25,8 +25,8 @@
*/
var constants = {
INITIAL_SOURCE_INSTRUCTIONS: "@App:name(\"SiddhiApp\")\n@App:description(\"Description of the plan\")\n\n" +
- "-- Please refer to https://docs.wso2.com/display/SP400/Quick+Start+Guide " +
- "on getting started with SP editor. \n\n"
+ "-- Please refer to https://siddhi.io/en/v5.0/docs/quick-start/ " +
+ "on getting started with Siddhi editor. \n\n"
};
return constants; |
d602a2a4c9b2aca9ca330768025fd594ad2f0037 | lib/helpers.js | lib/helpers.js | var exec = require('child_process').exec,
_ = require('lodash')
module.exports.asyncIterate = function(array, callback, done) {
function iterate(idx) {
var current = array[idx]
if (current) {
callback(current, function() { iterate(idx+1) }, function(err) { done(err) })
} else {
done()
}
}
iterate(0)
}
module.exports.checkRunning = function(container, callback) {
exec('docker inspect ' + container.name, function(err, stdout) {
if (err) {
callback(false)
} else {
var info = _.head(JSON.parse(stdout))
var isRunning = info && info.State ? !!info.State.Running : false
callback(isRunning)
}
})
}
| var exec = require('child_process').exec,
_ = require('lodash')
module.exports.asyncIterate = function(array, callback, done) {
function iterate(idx) {
var current = array[idx]
if (current) {
callback(current, function() { iterate(idx+1) }, function(err) { done(err) })
} else {
done()
}
}
iterate(0)
}
module.exports.checkRunning = function(container, callback) {
exec('docker inspect ' + container.name, function(err, stdout) {
if (err) {
callback(false)
} else {
var info = _.head(JSON.parse(stdout))
var isRunning = info && info.State ? !!info.State.Running : false
callback(isRunning)
}
})
}
module.exports.checkCreated = function(container, callback) {
exec('docker inspect ' + container.name, function(err) {
var isCreated = err ? false : true
callback(isCreated)
})
}
| Add helper for container “created”-status checking | Add helper for container “created”-status checking | JavaScript | mit | mnylen/pig,mnylen/pig | ---
+++
@@ -28,3 +28,9 @@
})
}
+module.exports.checkCreated = function(container, callback) {
+ exec('docker inspect ' + container.name, function(err) {
+ var isCreated = err ? false : true
+ callback(isCreated)
+ })
+} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.