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 |
|---|---|---|---|---|---|---|---|---|---|---|
b2fb0e989f5e76838766b4a36572155d9c1b0847 | plugins/relay_force_routing.js | plugins/relay_force_routing.js | // relay_force_routing
// documentation via: haraka -h plugins/relay_force_routing
exports.register = function() {
this.register_hook('get_mx', 'force_routing');
this.domain_ini = this.config.get('relay_dest_domains.ini', 'ini');
};
exports.force_routing = function (next, hmail, domain) {
var force_route... | // relay_force_routing
// documentation via: haraka -h plugins/relay_force_routing
exports.hook_get_mx = function (next, hmail, domain) {
var domain_ini = this.config.get('relay_dest_domains.ini', 'ini');
var force_route = lookup_routing(domain_ini['domains'], domain);
if (force_route != "NOTFOUND" ){
... | Change around so config is loaded when changed | Change around so config is loaded when changed
| JavaScript | mit | AbhilashSrivastava/haraka_sniffer,danucalovj/Haraka,Dexus/Haraka,haraka/Haraka,typingArtist/Haraka,msimerson/Haraka,abhas/Haraka,jjz/Haraka,niteoweb/Haraka,danucalovj/Haraka,MignonCornet/Haraka,baudehlo/Haraka,bsmr-x-script/Haraka,zombified/Haraka,MignonCornet/Haraka,Synchro/Haraka,fredjean/Haraka,MignonCornet/Haraka,b... | ---
+++
@@ -2,30 +2,25 @@
// documentation via: haraka -h plugins/relay_force_routing
-exports.register = function() {
- this.register_hook('get_mx', 'force_routing');
- this.domain_ini = this.config.get('relay_dest_domains.ini', 'ini');
-};
-
-exports.force_routing = function (next, hmail, domain) {
- ... |
3dc61cf44f794cce36c4b008aeaa035cf37c8c76 | client/src/AudioButton.js | client/src/AudioButton.js | function AudioButton() {
var that = this;
this.position = {
x: 15.5,
y: 0.5
};
if (typeof localStorage.soundActivated === 'undefined') {
localStorage.soundActivated = "1";
}
this.on = !!localStorage.soundActivated;
setTimeout(function() {
createjs.Sound.setMute(!that.on);
mm.music.vo... | function AudioButton() {
var that = this;
this.position = {
x: 15.5,
y: 0.4
};
if (typeof localStorage.soundActivated === 'undefined') {
localStorage.soundActivated = "1";
}
this.on = !!localStorage.soundActivated;
setTimeout(function() {
createjs.Sound.setMute(!that.on);
mm.music.vo... | Adjust audio button position, size | Adjust audio button position, size
| JavaScript | apache-2.0 | ninjadev/globalgamejam2016,ninjadev/globalgamejam2016 | ---
+++
@@ -2,7 +2,7 @@
var that = this;
this.position = {
x: 15.5,
- y: 0.5
+ y: 0.4
};
if (typeof localStorage.soundActivated === 'undefined') {
@@ -19,7 +19,7 @@
AudioButton.prototype.render = function() {
var sprite = this.on ? this.sprite_on : this.sprite_off;
ctx.save();
- var s... |
ce4d683bf0d7a47782646fcd140db12a10583c8f | .storybook/styles.js | .storybook/styles.js | export const baseStyles = {};
export const centerStyles = {
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
};
| export const baseStyles = {
};
export const centerStyles = {
margin: '24px auto',
maxWidth: '90%',
};
| Modify baseStyles & centerStyles for a better centering of the content without flexbox | Modify baseStyles & centerStyles for a better centering of the content without flexbox
| JavaScript | mit | teamleadercrm/teamleader-ui | ---
+++
@@ -1,7 +1,7 @@
-export const baseStyles = {};
+export const baseStyles = {
+};
export const centerStyles = {
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center'
+ margin: '24px auto',
+ maxWidth: '90%',
}; |
bf87ac15b529447a0906f47fdeeb842faa5739ff | src/components/Cards/ImageCard.js | src/components/Cards/ImageCard.js | import React, { PropTypes } from 'react';
import { Card } from '../UI';
import styles from './ImageCard.css';
export default class ImageCard extends React.Component {
render() {
const { onClick, onImageLoaded, image, text, description } = this.props;
return (
<Card onClick={onClick} className={styles.... | import React, { PropTypes } from 'react';
import { Card } from '../UI';
import styles from './ImageCard.css';
export default class ImageCard extends React.Component {
render() {
const { onClick, onImageLoaded, image, text, description } = this.props;
return (
<Card onClick={onClick} className={styles.... | Make cards have h2s not h1s | Make cards have h2s not h1s
| JavaScript | mit | dopry/netlify-cms,Aloomaio/netlify-cms,Aloomaio/netlify-cms,netlify/netlify-cms,netlify/netlify-cms,dopry/netlify-cms,netlify/netlify-cms,netlify/netlify-cms | ---
+++
@@ -9,7 +9,7 @@
return (
<Card onClick={onClick} className={styles.root}>
<img src={image} onLoad={onImageLoaded} />
- <h1>{text}</h1>
+ <h2>{text}</h2>
{description ? <p>{description}</p> : null}
</Card> |
feeaac41b60172495adb7d60779ff0f1330dfa6f | lib/formatters/codeclimate.js | lib/formatters/codeclimate.js | 'use strict';
module.exports = function (err, data) {
if (err) {
return 'Debug output: %j' + data + '\n' + JSON.stringify(err);
}
if (!data.length) {
return;
}
var returnString = '';
for (var i = 0, il = data.length; i < il; ++i) {
returnString += JSON.stringify({
type: 'issue',
... | 'use strict';
module.exports = function (err, data) {
if (err) {
return 'Debug output: %j' + data + '\n' + JSON.stringify(err);
}
if (!data.length) {
return;
}
var returnString = '';
for (var i = 0, il = data.length; i < il; ++i) {
returnString += JSON.stringify({
type: 'issue',
... | Add Remediation Points to issues | Add Remediation Points to issues
| JavaScript | apache-2.0 | chetanddesai/nsp,nodesecurity/nsp,requiresafe/cli,ABaldwinHunter/nsp-classic,ABaldwinHunter/nsp | ---
+++
@@ -17,6 +17,7 @@
check_name: 'Vulnerable module "' + data[i].module + '" identified',
description: '`' + data[i].module + '` ' + data[i].title,
categories: ['Security'],
+ remediation_points: 300000,
content: {
body: data[i].content
}, |
0bc1c4e2a0802a90b35a438c79eee23830ee9878 | lib/worker/app-worker-info.js | lib/worker/app-worker-info.js | var AppWorkerInfo = function(appSpec, listenPort, logFilePath, exitPromise) {
this.appSpec = appSpec;
this.listenPort = listenPort;
this.logFilePath = logFilePath;
this.exitPromise = exitPromise;
};
module.exports = AppWorkerInfo;
(function() {
}).call(AppWorkerInfo.prototype); | var events = require('events');
var util = require('util');
var AppWorkerInfo = function(appSpec, listenPort, logFilePath, exitPromise) {
events.EventEmitter.call(this);
this.appSpec = appSpec;
this.listenPort = listenPort;
this.logFilePath = logFilePath;
this.exitPromise = exitPromise;
this.$refCount = 0... | Add acquire/release to worker info | Add acquire/release to worker info
| JavaScript | agpl-3.0 | githubfun/shiny-server,nvoron23/shiny-server,joequant/shiny-server,ekergy/shiny-ekergy,dpryan79/shiny-server,ekergy/shiny-ekergy,sneumann/shiny-server,nvoron23/shiny-server,sneumann/shiny-server,dpryan79/shiny-server,sneumann/shiny-server,trestletech/shiny-server,dpryan79/shiny-server,dpryan79/shiny-server,githubfun/sh... | ---
+++
@@ -1,11 +1,41 @@
+var events = require('events');
+var util = require('util');
+
var AppWorkerInfo = function(appSpec, listenPort, logFilePath, exitPromise) {
+ events.EventEmitter.call(this);
this.appSpec = appSpec;
this.listenPort = listenPort;
this.logFilePath = logFilePath;
this.exitPromise... |
6e60972f8c2fc04cfe34e5afcf793e9170fe0356 | scripts/pugbomb.js | scripts/pugbomb.js | module.exports = function(robot){
var pugBombReplies = [
'There will be no more of that. Take your {{number}} pugs elsewhere.',
'Nope. Nobody needs to see that many pugs.',
'Why do you think we all need to see {{number}} pugs?',
'No pugs for you!',
'{{number}} pugs... {{number}} PUGS?? Absolutely not.'
... | module.exports = function(robot){
var pugBombReplies = [
'There will be no more of that. Take your {{number}} pugs elsewhere.',
'Nope. Nobody needs to see that many pugs.',
'Why do you think we all need to see {{number}} pugs?',
'No pugs for you!',
'{{number}} pugs... {{number}} PUGS?? Absolutely not.',
... | Add lumberg meme to pug bomb replies | Add lumberg meme to pug bomb replies
| JavaScript | mit | BallinOuttaControl/bocbot,BallinOuttaControl/bocbot | ---
+++
@@ -5,7 +5,8 @@
'Nope. Nobody needs to see that many pugs.',
'Why do you think we all need to see {{number}} pugs?',
'No pugs for you!',
- '{{number}} pugs... {{number}} PUGS?? Absolutely not.'
+ '{{number}} pugs... {{number}} PUGS?? Absolutely not.',
+ 'http://i.imgur.com/cUJd5aO.jpg'
];
... |
030839d136309e814d9da289c88662c025da833f | src/extendables/SendAliases.js | src/extendables/SendAliases.js | const { APIMessage } = require('discord.js');
const { Extendable } = require('klasa');
const { TextChannel, DMChannel, GroupDMChannel, User } = require('discord.js');
module.exports = class extends Extendable {
constructor(...args) {
super(...args, { appliesTo: [TextChannel, DMChannel, GroupDMChannel, User] });
}... | const { APIMessage } = require('discord.js');
const { Extendable } = require('klasa');
const { TextChannel, DMChannel, GroupDMChannel, User } = require('discord.js');
module.exports = class extends Extendable {
constructor(...args) {
super(...args, { appliesTo: [TextChannel, DMChannel, GroupDMChannel, User] });
}... | Fix [object Object] in sendLocale extendable | Fix [object Object] in sendLocale extendable
#494 | JavaScript | mit | dirigeants/klasa | ---
+++
@@ -27,7 +27,7 @@
sendLocale(key, args = [], options = {}) {
if (!Array.isArray(args)) [options, args] = [args, []];
const language = this.guild ? this.guild.language : this.client.languages.default;
- return this.send({ content: language.get(key, ...args), ...options });
+ return this.send(language... |
e2eca91cfe4a7a13fa825b40815d0749cc11f989 | src/foam/nanos/menu/SubMenu.js | src/foam/nanos/menu/SubMenu.js | /**
* @license
* Copyright 2017 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
package: 'foam.nanos.menu',
name: 'SubMenu',
extends: 'foam.nanos.menu.AbstractMenu',
requires: [ 'foam.nanos.menu.SubMenuView' ],
methods: [
// Code below is for conv... | /**
* @license
* Copyright 2017 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
package: 'foam.nanos.menu',
name: 'SubMenu',
extends: 'foam.nanos.menu.AbstractMenu',
requires: [ 'foam.nanos.menu.SubMenuView' ],
methods: [
function launch() { /** N... | Fix for my last menu fix. | Fix for my last menu fix.
| JavaScript | apache-2.0 | jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2 | ---
+++
@@ -12,6 +12,7 @@
requires: [ 'foam.nanos.menu.SubMenuView' ],
methods: [
+ function launch() { /** NOP **/ }
// Code below is for conventional style menus which pop-up,
// which no longer happens as opening a menu just opens the tree view.
/* |
9e734eca0da3e455a11460b9e27b78254fa43809 | core/build/webpack.client.config.js | core/build/webpack.client.config.js | const webpack = require('webpack')
const merge = require('webpack-merge')
const base = require('./webpack.base.config')
const path = require('path')
const VueSSRClientPlugin = require('vue-server-renderer/client-plugin')
const config = merge(base, {
output: {
path: path.resolve(__dirname, '../../dist'),
publ... | const webpack = require('webpack')
const merge = require('webpack-merge')
const base = require('./webpack.base.config')
const path = require('path')
const VueSSRClientPlugin = require('vue-server-renderer/client-plugin')
const config = merge(base, {
optimization: {
splitChunks: {
cacheGroups: {
co... | Revert "Minor - webpack client filename change" | Revert "Minor - webpack client filename change"
This reverts commit 8a687defb70b7c4bab6c5aac3be8867d8efd7542.
| JavaScript | mit | DivanteLtd/vue-storefront,pkarw/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront | ---
+++
@@ -5,11 +5,6 @@
const VueSSRClientPlugin = require('vue-server-renderer/client-plugin')
const config = merge(base, {
- output: {
- path: path.resolve(__dirname, '../../dist'),
- publicPath: '/dist/',
- filename: '[name].js'
- },
optimization: {
splitChunks: {
cacheGroups: { |
8286e9787c23e67c714918dd794b67e45c140128 | src/modules/news.js | src/modules/news.js | const axios = require('axios');
const chalk = require('chalk');
const helpers = require('../helpers');
exports.listArticles = function (argv) {
const articleCount = argv.limit > 1 ? argv.limit : 1;
axios.get('https://api.spaceflightnewsapi.net/articles/', {
params: {
limit: articleCount
}
}).then... | const axios = require('axios');
const chalk = require('chalk');
const helpers = require('../helpers');
exports.listArticles = function (argv) {
const articleCount = argv.limit > 1 ? argv.limit : 1;
axios.get('https://api.spaceflightnewsapi.net/articles/', {
params: {
limit: articleCount
}
}).then... | Fix new line being included in an anchor | Fix new line being included in an anchor
| JavaScript | mit | Belar/space-cli | ---
+++
@@ -22,7 +22,7 @@
const readSource = `Read on ${article.url}`;
const dayArticles = byDate[publishedAt] = byDate[publishedAt] || [];
- dayArticles.push(`${articleDetails} | ${title}\n${readSource}\n`);
+ dayArticles.push(`${articleDetails} | ${title}\n${readSource} \n`);
retu... |
a5dbd6f84a5acc166dea63c4643ee543e5ec48a1 | src/native/index.js | src/native/index.js | import 'react-native-browser-polyfill';
import App from './app/App.react';
import Component from 'react-pure-render/component';
import React, { AppRegistry, Platform } from 'react-native';
import config from './config';
import configureStore from '../common/configureStore';
import createEngine from 'redux-storage-engin... | import 'react-native-browser-polyfill';
import App from './app/App.react';
import Component from 'react-pure-render/component';
import React, { AppRegistry, Platform } from 'react-native';
import config from './config';
import configureStore from '../common/configureStore';
import createEngine from 'redux-storage-engin... | Add missing initialNow for native | Add missing initialNow for native
| JavaScript | mit | TheoMer/este,vacuumlabs/este,christophediprima/este,TheoMer/Gyms-Of-The-World,christophediprima/este,skallet/este,este/este,steida/este,robinpokorny/este,syroegkin/mikora.eu,este/este,este/este,amrsekilly/updatedEste,robinpokorny/este,christophediprima/este,SidhNor/este-cordova-starter-kit,steida/este,TheoMer/Gyms-Of-T... | ---
+++
@@ -19,6 +19,7 @@
intl: {
// TODO: Detect native current locale.
currentLocale: config.defaultLocale,
+ initialNow: Date.now(),
locales: config.locales,
messages
}, |
f389dd376c8fc90e92eb643583afbc0a49dc8930 | src/render-queue.js | src/render-queue.js | import options from './options';
import { defer } from './util';
import { renderComponent } from './vdom/component';
/** Managed queue of dirty components to be re-rendered */
// items/itemsOffline swap on each rerender() call (just a simple pool technique)
let items = [],
itemsOffline = [];
export function enqueue... | import options from './options';
import { defer } from './util';
import { renderComponent } from './vdom/component';
/** Managed queue of dirty components to be re-rendered */
// items/itemsOffline swap on each rerender() call (just a simple pool technique)
let items = [],
itemsOffline = [];
export function enqueue... | Remove unnecessary early exit for a condition that rarely/never occurs. | Remove unnecessary early exit for a condition that rarely/never occurs.
| JavaScript | mit | neeharv/preact,developit/preact,gogoyqj/preact,neeharv/preact,developit/preact | ---
+++
@@ -16,7 +16,6 @@
export function rerender() {
- if (!items.length) return;
let currentItems = items,
p; |
34bf08d08b111fd67b2a346f8bcae1658fe68a51 | src/routes/index.js | src/routes/index.js | /* eslint-disable no-unused-vars*/
import React from 'react';
/* eslint-enable no-unused-vars*/
import { Router, Route, IndexRoute } from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import App from 'containers/App/';
import Home from 'containers/Home/';
const Routes = () => (
... | /* eslint-disable no-unused-vars*/
import React from 'react';
/* eslint-enable no-unused-vars*/
import { Router, Route, IndexRoute } from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import App from './App/';
import Home from './Home/';
const Routes = () => (
<Router history=... | Change import path of routes | Change import path of routes
| JavaScript | mit | pl12133/pl12133.github.io,pl12133/pl12133.github.io | ---
+++
@@ -4,8 +4,8 @@
import { Router, Route, IndexRoute } from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
-import App from 'containers/App/';
-import Home from 'containers/Home/';
+import App from './App/';
+import Home from './Home/';
const Routes = () => (
<Rou... |
bf4bd191015a4f8994fa138bc95fec6fdd012e6b | docs/_js/examples/todo.js | docs/_js/examples/todo.js | var TODO_COMPONENT = `
var TodoList = React.createClass({
render: function() {
var createItem = function(itemText, index) {
return <li key={index + itemText}>{itemText}</li>;
};
return <ul>{this.props.items.map(createItem)}</ul>;
}
});
var TodoApp = React.createClass({
getInitialState: function(... | var TODO_COMPONENT = `
var TodoList = React.createClass({
render: function() {
var createItem = function(item) {
return <li key={item.id}>{item.text}</li>;
};
return <ul>{this.props.items.map(createItem)}</ul>;
}
});
var TodoApp = React.createClass({
getInitialState: function() {
return {ite... | Use id for TodoApp example | [docs] Use id for TodoApp example
| JavaScript | bsd-3-clause | AlmeroSteyn/react,reactkr/react,chippieTV/react,claudiopro/react,roth1002/react,airondumael/react,tomocchino/react,TheBlasfem/react,claudiopro/react,cody/react,TheBlasfem/react,terminatorheart/react,trueadm/react,jzmq/react,STRML/react,yangshun/react,ABaldwinHunter/react-engines,salzhrani/react,TheBlasfem/react,maxschm... | ---
+++
@@ -1,8 +1,8 @@
var TODO_COMPONENT = `
var TodoList = React.createClass({
render: function() {
- var createItem = function(itemText, index) {
- return <li key={index + itemText}>{itemText}</li>;
+ var createItem = function(item) {
+ return <li key={item.id}>{item.text}</li>;
};
... |
8d40f4d706fa898002ea3b8cc33b38ab377befcb | addon/classes/row.js | addon/classes/row.js | import ObjectProxy from '@ember/object/proxy';
import { merge } from '@ember/polyfills';
/**
* @class Row
* @extends Ember.ObjectProxy
* @namespace SemanticUI
*/
const Row = ObjectProxy.extend({
/**
* Whether the row is currently selected.
*
* @property selected
* @type Boolean
* @default false
... | import ObjectProxy from '@ember/object/proxy';
import { assign } from '@ember/polyfills';
/**
* @class Row
* @extends Ember.ObjectProxy
* @namespace SemanticUI
*/
const Row = ObjectProxy.extend({
/**
* Whether the row is currently selected.
*
* @property selected
* @type Boolean
* @default false
... | Replace usage of merge with assign | Replace usage of merge with assign
| JavaScript | mit | quantosobra/ember-semantic-ui-table,quantosobra/ember-semantic-ui-table | ---
+++
@@ -1,5 +1,5 @@
import ObjectProxy from '@ember/object/proxy';
-import { merge } from '@ember/polyfills';
+import { assign } from '@ember/polyfills';
/**
* @class Row
@@ -57,7 +57,7 @@
* @static
*/
create(content, options = {}) {
- let _options = merge({ content }, options);
+ const _op... |
43646a6e0b8503ed8a6422037d25614a738b94e6 | addon/errors/load.js | addon/errors/load.js | /**
* A simple Error type to represent an error that occured while loading a
* resource.
*
* @class LoadError
* @extends Error
*/
export default class LoadError extends Error {
/**
* Constructs a new LoadError with a supplied error message and an instance
* of the AssetLoader service to use when retrying ... | function ExtendBuiltin(klass) {
function ExtendableBuiltin() {
klass.apply(this, arguments);
}
ExtendableBuiltin.prototype = Object.create(klass.prototype);
ExtendableBuiltin.prototype.constructor = ExtendableBuiltin;
return ExtendableBuiltin;
}
/**
* A simple Error type to represent an error that occu... | Make it possible to extend from `Error` in Babel 6. | Make it possible to extend from `Error` in Babel 6.
| JavaScript | mit | ember-engines/ember-asset-loader,trentmwillis/ember-asset-loader,trentmwillis/ember-asset-loader,trentmwillis/ember-asset-loader,ember-engines/ember-asset-loader,ember-engines/ember-asset-loader | ---
+++
@@ -1,3 +1,13 @@
+function ExtendBuiltin(klass) {
+ function ExtendableBuiltin() {
+ klass.apply(this, arguments);
+ }
+
+ ExtendableBuiltin.prototype = Object.create(klass.prototype);
+ ExtendableBuiltin.prototype.constructor = ExtendableBuiltin;
+ return ExtendableBuiltin;
+}
+
/**
* A simple Err... |
6d78bdca94ff5e35edf2e09e228ad534c57008c6 | public/dist/js/voter-login.js | public/dist/js/voter-login.js | $(document).ready(function() {
$('#voterloginbox').submit(function(event) {
var formData = {
'voter_token' : $('input[name=voter_token]').val(),
'_csrf' : $('input[name=_csrf]').val(),
'g-recaptcha-response' : $('textarea[name=g-recaptcha-response]... | $(document).ready(function() {
$("#voter_token").keyup(function(event){
if(event.keyCode == 13){
$("#next_btn").click();
}
});
$('#voterloginbox').submit(function(event) {
var formData = {
'voter_token' : $('input[name=voter_token]').val(),
... | Test out having enter press bring up modal | Test out having enter press bring up modal | JavaScript | agpl-3.0 | WireShoutLLC/votehaus,WireShoutLLC/votehaus,WireShoutLLC/votehaus,WireShoutLLC/votehaus | ---
+++
@@ -1,4 +1,10 @@
$(document).ready(function() {
+ $("#voter_token").keyup(function(event){
+ if(event.keyCode == 13){
+ $("#next_btn").click();
+ }
+ });
+
$('#voterloginbox').submit(function(event) {
var formData = {
'voter_token' : $('i... |
63fc607d48bf8e5439e6addc1cf3fc45adb444d4 | fp.js | fp.js | module.exports = {
"extends": [
"./index.js",
],
plugins: ["fp"],
rules: {
"fp/no-arguments": "error",
"fp/no-class": "warn",
"fp/no-delete": "error",
"fp/no-events": "error",
"fp/no-get-set": "error",
"fp/no-let": "error",
"fp/no-loops": "error",
"fp/no-mutating-assign": "... | module.exports = {
"extends": [
"./index.js",
],
plugins: ["fp"],
rules: {
"fp/no-arguments": "error",
"fp/no-class": "warn",
"fp/no-delete": "error",
"fp/no-events": "error",
"fp/no-get-set": "error",
"fp/no-let": "error",
"fp/no-loops": "error",
"fp/no-mutating-assign": "... | Add a warning for sorting keys | Add a warning for sorting keys
| JavaScript | mit | momentumft/eslint-config-momentumft | ---
+++
@@ -27,5 +27,6 @@
"no-magic-numbers": [2, { "ignore": [0,1] }],
"no-unused-expressions": 2, // disallow usage of expressions in statement position
"no-lonely-if": 2, // disallow if as the only statement in an else block
+ "sort-keys": [1, "asc", {"caseSensitive": true, "natural": fal... |
540ec2d5e090e0e9740e00c90d4b4fd9ff09ca55 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... | Add jquery ui to app.js | Add jquery ui to app.js
| JavaScript | mit | dma315/ambrosia,dma315/ambrosia,dma315/ambrosia | ---
+++
@@ -11,6 +11,7 @@
// about supported directives.
//
//= require jquery
+//= require jquery-ui
//= require jquery_ujs
//= require jquery.kinetic
//= require_tree . |
82322ac222c9a0c6b3534270d38f063a3c67cf50 | addon/change-gate.js | addon/change-gate.js | import Em from 'ember';
let get = Em.get;
let defaultFilter = function(value) { return value; };
export default function(dependentKey, filter) {
filter = filter || defaultFilter;
let computed = Em.computed(function handler(key) {
let lastValueKey = `__changeGate${key}LastValue`;
let isFirstRun = !this.h... | import Em from 'ember';
let get = Em.get;
let defaultFilter = function(value) { return value; };
export default function(dependentKey, filter) {
filter = filter || defaultFilter;
let computed = Em.computed(function handler(key) {
let lastValueKey = `__changeGate${key}LastValue`;
let isFirstRun = !this.h... | Use Ember.isEqual instead of direct equality | Use Ember.isEqual instead of direct equality | JavaScript | mit | GavinJoyce/ember-computed-change-gate,givanse/ember-computed-change-gate,GavinJoyce/ember-computed-change-gate,givanse/ember-computed-change-gate | ---
+++
@@ -17,7 +17,7 @@
let newValue = filter.call(this, get(this, dependentKey));
let lastValue = this[lastValueKey];
- if(newValue !== lastValue) {
+ if(!Em.isEqual(newValue, lastValue)) {
this[lastValueKey] = newValue;
this.notifyPropertyChange(key);
... |
fd1c12db210589a285b5917353e40714ca23e4b2 | app/models/league.js | app/models/league.js | import CoreObject from 'fantasy-weather/models/_core/core-object';
import Team from 'fantasy-weather/models/team';
let League = CoreObject.extend({
// Set defaults and stub out properties
_defaults() {
return {
name: "",
teams: []
};
},
addTeam(team) {
let teams = this.get('teams');
... | import CoreObject from 'fantasy-weather/models/_core/core-object';
import Team from 'fantasy-weather/models/team';
let League = CoreObject.extend({
// Set defaults and stub out properties
_defaults() {
return {
name: "",
teams: []
};
},
addTeam(team) {
let teams = this.get('teams');
... | Add methods to find team/stadium by abbreviation | Add methods to find team/stadium by abbreviation
| JavaScript | mit | rjhilgefort/nfl-weather,rjhilgefort/nfl-weather,rjhilgefort/nfl-weather | ---
+++
@@ -20,7 +20,18 @@
addTeams(teams) {
_.forEach(teams, this.addTeam.bind(this));
return teams;
+ },
+
+ findTeamByAbbr(abbr) {
+ let teams = this.get('teams');
+ return _.find(teams, { abbr });
+ },
+
+ findStadiumByAbbr(abbr) {
+ let team = this.findTeamByAbbr(abbr);
+ return _.ge... |
ad65d3a5d5419132635f188e90b3aa4e25626064 | scripts/assertion-messages.js | scripts/assertion-messages.js | #!/usr/bin/env node
var recast = require('recast');
var messages = require('./transform/messages');
var exec = require('child_process').exec;
var fs = require('fs');
var glob = require('glob');
var usage = [
'Usage: assertion-messages.js "globbing expression"',
'To generate assertion messages for a set of test files,... | #!/usr/bin/env node
var recast = require('recast');
var messages = require('./transform/messages');
var exec = require('child_process').exec;
var fs = require('fs');
var glob = require('glob');
var usage = [
'Usage: assertion-messages.js "globbing expression"',
'To generate assertion messages for a set of test files,... | Allow script to be invoke from any directory | Allow script to be invoke from any directory
| JavaScript | mit | bocoup/test262-v8-machinery,bocoup/test262-v8-machinery | ---
+++
@@ -7,7 +7,8 @@
var usage = [
'Usage: assertion-messages.js "globbing expression"',
'To generate assertion messages for a set of test files, provide a valid glob expression.',
- 'File search begins at `../test262/test/`'
+ 'File search is relative to the `test/` sub-directory of the local',
+ 'Test262 re... |
d6e3cdc458867d1aa90197b1b8b9a10ce65b9118 | src/MentionMenu.js | src/MentionMenu.js | import React from "react";
import portal from "react-portal-hoc";
const MentionMenu = props => {
const {
active,
className,
item: Item,
options,
top,
left,
hoverItem,
selectItem,
style = {}
} = props;
const menuStyle = {
...style,
left,
top,
position: "absolute... | import React from "react";
import portal from "react-portal-hoc";
class MentionMenu extends React.Component {
constructor(props) {
super(props);
this.state = {
left: props.left,
top: props.top
};
}
componentWillReceiveProps(nextProps) {
if (nextProps.left != this.state.left || nextPro... | Improve menu positioning to keep it from going off screen | Improve menu positioning to keep it from going off screen
tries to keep the menu from going off the bottom or right of screen | JavaScript | mit | mattkrick/react-githubish-mentions | ---
+++
@@ -1,35 +1,63 @@
import React from "react";
import portal from "react-portal-hoc";
-const MentionMenu = props => {
- const {
- active,
- className,
- item: Item,
- options,
- top,
- left,
- hoverItem,
- selectItem,
- style = {}
- } = props;
- const menuStyle = {
- ...styl... |
23557892e740c28ea38304874636b3295e99a68c | test/scripts/cli.js | test/scripts/cli.js | 'use strict';
var opbeat = require('../../');
var inquirer = require('inquirer');
var questions = [
{ name: 'app_id', message: 'App ID' },
{ name: 'organization_id', message: 'Organization ID' },
{ name: 'secret_token', message: 'Secret token' }
];
var test = function (options) {
options.env = 'production';
... | 'use strict';
var opbeat = require('../../');
var inquirer = require('inquirer');
var questions = [
{ name: 'app_id', message: 'App ID' },
{ name: 'organization_id', message: 'Organization ID' },
{ name: 'secret_token', message: 'Secret token' }
];
var test = function (options) {
options.env = 'production';
... | Improve error names when running integration test | Improve error names when running integration test
| JavaScript | bsd-2-clause | opbeat/opbeat-node,driftyco/opbeat-node,opbeat/opbeat-node | ---
+++
@@ -21,17 +21,17 @@
});
console.log('Capturing error...');
- client.captureError(new Error('captureError()'), function (err, url) {
+ client.captureError(new Error('This is an Error object'), function (err, url) {
if (err) console.log('Something went wrong:', err.message);
console.log('The... |
428785e0bbcb9b61b87eddf79e76e04d896be710 | src/Components/pages/Index.js | src/Components/pages/Index.js | import React, { Component } from 'react'
import { Link } from 'react-router'
import Header from 'Components/Header'
import Footer from 'Components/Footer'
import zhcn from '../../../intl/zh-cn'
import en from '../../../intl/en'
import 'styles/pages/index.scss'
const format = (locale) => {
return (key) => {
let ... | import React, { Component } from 'react'
import { Link } from 'react-router'
import Header from 'Components/Header'
import Footer from 'Components/Footer'
import zhcn from '../../../intl/zh-cn'
import en from '../../../intl/en'
import 'styles/pages/index.scss'
const format = (locale) => {
return (key) => {
let ... | Fix redirect when switch language. | Fix redirect when switch language.
| JavaScript | mit | jsconfcn/ningjs,jsconfcn/ningjs | ---
+++
@@ -24,7 +24,7 @@
changeLang(lang) {
let {pathname, query} = this.props.location
query.locale = lang
- this.context.router.replace({pathname: location.pathname, query})
+ this.context.router.replace({pathname: pathname, query})
}
render() { |
e9e8eb0a238a641c190f200b684fb3549b5a276d | src/objects/mob.js | src/objects/mob.js | // namespace
var App = App || {};
App.Mob = (function () {
"use strict";
var fn = function (game, username, x, y) {
Phaser.Sprite.call(this, game, x, y, 'alienBlue');
this.game.physics.arcade.enable(this);
this.frame = 0;
this.scale.setTo(.7, .7);
this.animations.add('r... | // namespace
var App = App || {};
App.Mob = (function () {
"use strict";
var fn = function (game, username, x, y) {
Phaser.Sprite.call(this, game, x, y, 'alienBlue');
this.game.physics.arcade.enable(this);
this.frame = 0;
this.scale.setTo(.7, .7);
this.animations.add('r... | Add arcade.collide logic to App.Mob objects. | Add arcade.collide logic to App.Mob objects.
| JavaScript | mit | hookbot/multi-player,hookbot/multi-player | ---
+++
@@ -24,6 +24,7 @@
fn.prototype.update = function () {
this.usernameText.x = this.x;
this.usernameText.y = this.y + 60;
+ this.game.physics.arcade.collide(this, this.game.global.forest.layers.collisionLayer);
};
return fn; |
f9331ee186f212290d771fb10e45e1628b89b49f | species-explorer/app/services/species.service.js | species-explorer/app/services/species.service.js | /* global angular */
angular
.module('speciesApp')
.factory('SpeciesService', [
'API_BASE_URL',
'$resource',
SpeciesService
])
function SpeciesService (API_BASE_URL, $resource) {
return $resource(
API_BASE_URL,
null,
{
getKingdoms: {
method: 'GET',
isArray: false,... | /* global angular */
angular
.module('speciesApp')
.factory('SpeciesService', [
'API_BASE_URL',
'$resource',
SpeciesService
])
function SpeciesService (API_BASE_URL, $resource) {
return $resource(
API_BASE_URL,
null,
{
getKingdoms: {
method: 'GET',
isArray: false,... | Add an action to get species by family | Add an action to get species by family
| JavaScript | mit | stivaliserna/scripts,stivaliserna/scripts | ---
+++
@@ -36,6 +36,14 @@
params: {
op: 'getfamilynames'
}
+ },
+ getSpecies: {
+ method: 'GET',
+ isArray: false,
+ cache: true,
+ params: {
+ op: 'getspecies'
+ }
}
}
) |
9b31522d4d65b8f1b0e8b0133914b9059bd81787 | src/constants/action_types.js | src/constants/action_types.js | export const START_DATE_CHANGE = 'START_DATE_CHANGE';
export const END_DATE_CHANGE = 'END_DATE_CHANGE';
export const FILTER_BY_AREA = 'FILTER_BY_AREA';
export const FILTER_BY_IDENTIFIER = 'FILTER_BY_IDENTIFIER';
export const FILTER_BY_TYPE_INJURY = 'FILTER_BY_TYPE_INJURY';
export const FILTER_BY_TYPE_FATALITY = 'FILT... | export const START_DATE_CHANGE = 'START_DATE_CHANGE';
export const END_DATE_CHANGE = 'END_DATE_CHANGE';
export const FILTER_BY_AREA = 'FILTER_BY_AREA';
export const FILTER_BY_IDENTIFIER = 'FILTER_BY_IDENTIFIER';
export const FILTER_BY_TYPE_INJURY = 'FILTER_BY_TYPE_INJURY';
export const FILTER_BY_TYPE_FATALITY = 'FILT... | Fix typo in action types for filter by type fatality | Fix typo in action types for filter by type fatality
| JavaScript | mit | clhenrick/nyc-crash-mapper,clhenrick/nyc-crash-mapper,clhenrick/nyc-crash-mapper | ---
+++
@@ -5,7 +5,7 @@
export const FILTER_BY_IDENTIFIER = 'FILTER_BY_IDENTIFIER';
export const FILTER_BY_TYPE_INJURY = 'FILTER_BY_TYPE_INJURY';
-export const FILTER_BY_TYPE_FATALITY = 'FILTER_BY_TYPE_HARM';
+export const FILTER_BY_TYPE_FATALITY = 'FILTER_BY_TYPE_FATALITY';
export const FILTER_BY_NO_INJURY_FATA... |
086b7eafeefb761f3883b9eeccb231152dfdbda0 | src/filters/filter-builder.js | src/filters/filter-builder.js | import { cloneDeep } from 'lodash'
import filters from './index'
import { boolMerge } from '../utils'
export default class FilterBuilder {
constructor () {
this._filters = {}
}
/**
* Apply a filter of a given type providing all the necessary arguments,
* passing these arguments directly to the specifie... | import { cloneDeep } from 'lodash'
import filters from './index'
import { boolMerge } from '../utils'
export default class FilterBuilder {
constructor () {
this._filters = {}
}
/**
* Apply a filter of a given type providing all the necessary arguments,
* passing these arguments directly to the specifie... | Annotate jsdoc for FilterBuilder class as private | Annotate jsdoc for FilterBuilder class as private
| JavaScript | mit | node-packages/bodybuilder,node-packages/bodybuilder,ShareIQ/bodybuilder,ShareIQ/bodybuilder,danpaz/bodybuilder,danpaz/bodybuilder,danpaz/bodybuilder | ---
+++
@@ -10,6 +10,8 @@
* Apply a filter of a given type providing all the necessary arguments,
* passing these arguments directly to the specified filter builder. Merges
* existing filter(s) with the new filter.
+ *
+ * @private
*
* @param {String} type Name of the filter type.
* @par... |
d6f71748d574a0d8d00de034328224d0c28e6b22 | src/gfx/modes/LicoriceMode.js | src/gfx/modes/LicoriceMode.js | /* eslint-disable no-magic-numbers */
import LabeledMode from './LabeledMode';
class LicoriceMode extends LabeledMode {
static id = 'LC';
constructor(opts) {
super(opts);
}
calcAtomRadius(_atom) {
return this.opts.bond;
}
calcStickRadius() {
return this.opts.bond;
}
calcSpaceFraction() {... | /* eslint-disable no-magic-numbers */
import LabeledMode from './LabeledMode';
class LicoriceMode extends LabeledMode {
static id = 'LC';
constructor(opts) {
super(opts);
}
calcAtomRadius(_atom) {
return this.opts.bond;
}
calcStickRadius() {
return this.opts.bond;
}
calcSpaceFraction() {... | Fix typo in Licorice Mode name assignment | Fix typo in Licorice Mode name assignment
| JavaScript | mit | epam/miew,epam/miew,epam/miew,epam/miew,epam/miew | ---
+++
@@ -47,7 +47,7 @@
}
LicoriceMode.prototype.id = 'LC';
-LicoriceMode.prototype.hortName = 'Licorice';
+LicoriceMode.prototype.name = 'Licorice';
LicoriceMode.prototype.shortName = 'Licorice';
LicoriceMode.prototype.depGroups = [
'AtomsSpheres', |
cb20cbe08c0e52613124e18ec8991a216949a11b | Resources/public/js/emails.js | Resources/public/js/emails.js | jQuery(document).ready(function () {
jQuery('#add-another-email').click(function () {
var emailList = jQuery('#email-fields-list');
var newWidget = emailList.attr('data-prototype');
newWidget = newWidget.replace(/__name__/g, emailCount);
emailCount++;
var newDiv = jQuery('<di... | $(document).ready(function () {
$('#add-another-email').click(function () {
var emailList = $('#email-fields-list');
var newWidget = emailList.attr('data-prototype');
newWidget = newWidget.replace(/__name__/g, emailCount);
emailCount++;
var newDiv = $('<div></div>').html(newW... | Add design to email collection | BAP-251: Add design to email collection
| JavaScript | mit | geoffroycochard/platform,orocrm/platform,umpirsky/platform,trustify/oroplatform,hugeval/platform,mszajner/platform,akeneo/platform,Djamy/platform,northdakota/platform,2ndkauboy/platform,morontt/platform,ramunasd/platform,trustify/oroplatform,umpirsky/platform,hugeval/platform,akeneo/platform,hugeval/platform,northdakot... | ---
+++
@@ -1,17 +1,17 @@
-jQuery(document).ready(function () {
- jQuery('#add-another-email').click(function () {
- var emailList = jQuery('#email-fields-list');
+$(document).ready(function () {
+ $('#add-another-email').click(function () {
+ var emailList = $('#email-fields-list');
var ... |
2c62380798476a22bbb50dd7780fbf4f24e02b5c | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
options: {
includePaths: ['app/bower_components/foundation/scss']
},
dist: {
options: {
outputStyle: 'default'
},
files: {
'app/app.css... | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
options: {
includePaths: ['app/bower_components/foundation/scss']
},
dist: {
options: {
outputStyle: 'default'
},
files: {
'app/app.css... | Exclude testing files from deploy | Exclude testing files from deploy
| JavaScript | mit | regdoug/solartime | ---
+++
@@ -30,7 +30,7 @@
copy: {
main: {
files: [
- {expand: true, cwd: 'app/', src: ['**'], dest: '../solartime-pages/'}
+ {expand: true, cwd: 'app/', src: ['**','!**/*_test.js','!index-async.html'], dest: '../solartime-pages/'}
]
}
... |
ac7fa80dbd84e31a06dc99a65e268de7c69e0924 | Gruntfile.js | Gruntfile.js | module.exports = function( grunt ) {
"use strict";
grunt.initConfig({
bump: {
options: {
files: [ "package.json" ],
// Commit
commit: true,
commitMessage: "Release v%VERSION%",
commitFiles: [ "package.json" ],
... | module.exports = function( grunt ) {
"use strict";
grunt.initConfig({
bump: {
options: {
files: [ "package.json" ],
// Commit
commit: true,
commitMessage: "Release v%VERSION%",
commitFiles: [ "package.json" ],
... | Simplify definition of jscs task | Simplify definition of jscs task
| JavaScript | mit | markelog/grunt-checker,jscs-dev/grunt-jscs,BridgeAR/grunt-jscs | ---
+++
@@ -28,14 +28,7 @@
all: [ "Gruntfile.js", "tasks/*.js", "test/*.js" ]
},
jscs: {
- all: {
- files: {
- src: "<%= jshint.all %>"
- },
- options: {
- junit: "jscs-output.xml"
- ... |
1dfe8b60b598e9f1ed87f1087c1a43a49d57dbe0 | postcss.config.js | postcss.config.js | /* eslint global-require:0 */
module.exports = {
map: { inline: true },
plugins: [
require('postcss-custom-properties')({
importFrom: 'src/css/00_variables.css'
}),
]
};
| /* eslint global-require:0 */
module.exports = {
map: { inline: true },
plugins: [
require('postcss-custom-properties')({
preserve: false,
importFrom: 'src/css/00_variables.css'
}),
]
};
| Add preserve: false to dev as well | Add preserve: false to dev as well
| JavaScript | mit | frippz/frippz.se,frippz/frippz.se,frippz/frippz.se | ---
+++
@@ -4,6 +4,7 @@
map: { inline: true },
plugins: [
require('postcss-custom-properties')({
+ preserve: false,
importFrom: 'src/css/00_variables.css'
}),
] |
470860f96e1b2b2c866d41690ae9769ad30f89a7 | Themeleon.js | Themeleon.js | 'use strict';
var path = require('path');
/**
* Themeleon helper constructor.
*
* See the functions from `factory.js` for variables signification.
*
* This constructor has an empty prototype (except the `use` method) since
* Themeleon works only with mixins. There's a main mixin in `main.js`
* containing the b... | 'use strict';
var fs = require('fs');
var path = require('path');
var q = require('q');
var mkdir = q.denodeify(fs.mkdir);
/**
* Themeleon helper constructor.
*
* See the functions from `factory.js` for variables signification.
*
* This constructor has an empty prototype (except the `use` method) since
* Theme... | Create destination directory if not exists | Create destination directory if not exists
| JavaScript | unlicense | themeleon/themeleon,themeleon/themeleon | ---
+++
@@ -1,6 +1,10 @@
'use strict';
+var fs = require('fs');
var path = require('path');
+var q = require('q');
+
+var mkdir = q.denodeify(fs.mkdir);
/**
* Themeleon helper constructor.
@@ -28,6 +32,9 @@
// Shortcut to push a promise
this.push = this.tasks.push.bind(this.tasks);
+
+ // Create dir... |
bac5bacb594b772b07f42ce321626337c19dde0b | TrackAnnot/app/view/Viewport.js | TrackAnnot/app/view/Viewport.js | Ext.define('TrackAnnot.view.Viewport', {
renderTo: Ext.getBody(),
extend: 'Ext.container.Viewport',
items: [{
xtype: 'toolbar',
items: [{
text: 'Metrics',
menu: {
xtype: 'menu',
items: [{
text: 'Video',
checked: false
}, {
... | Ext.define('TrackAnnot.view.Viewport', {
renderTo: Ext.getBody(),
extend: 'Ext.container.Viewport',
items: [{
xtype: 'toolbar',
items: ['<b>A</b>nnotation <b>M</b>ovement <b>A</b>ccelerometer', {
text: 'Metrics',
menu: {
xtype: 'menu',
items: [{
... | Add placeholders for new metrics. | Add placeholders for new metrics.
| JavaScript | apache-2.0 | NLeSC/eEcology-Annotation-UI,NLeSC/eEcology-Annotation-UI,NLeSC/eEcology-Annotation-UI | ---
+++
@@ -3,25 +3,39 @@
extend: 'Ext.container.Viewport',
items: [{
xtype: 'toolbar',
- items: [{
+ items: ['<b>A</b>nnotation <b>M</b>ovement <b>A</b>ccelerometer', {
text: 'Metrics',
menu: {
xtype: 'menu',
items: [{
- text: 'Video',
- ... |
3501a2a8868b0e2c9594555de00d2ed6279696d1 | app/data/bookshelf/migrate.js | app/data/bookshelf/migrate.js | import Knex from 'knex';
import config from '../../config/config.json';
const knex = Knex.initialize(config.bookshelf.postgresql);
export default function () {
knex.migrate.latest(config.bookshelf.migrations)
.then(function () {
knex.destroy();
});
}
| import Knex from 'knex';
import config from '../../config/config.json';
const knex = Knex(config.bookshelf.postgresql);
export default function () {
knex.migrate.latest(config.bookshelf.migrations)
.then(function () {
knex.destroy();
});
}
| Stop using the deprecated knex.initialize | Stop using the deprecated knex.initialize
| JavaScript | mit | wellsam/nerd,Xantier/nerd-stack,Xantier/nerd-stack,wellsam/nerd,isp1r0/nerd-stack,isp1r0/nerd-stack | ---
+++
@@ -1,6 +1,6 @@
import Knex from 'knex';
import config from '../../config/config.json';
-const knex = Knex.initialize(config.bookshelf.postgresql);
+const knex = Knex(config.bookshelf.postgresql);
export default function () {
knex.migrate.latest(config.bookshelf.migrations) |
1a93325776c6ae619d85239a0336cb06d40682fb | conkeror/bindings.js | conkeror/bindings.js | define_key(text_keymap, "C-w", "cmd_deleteWordBackward");
define_key(content_buffer_normal_keymap, "c", "copy", $browser_object = browser_object_dom_node);
| function history_clear () {
var history = Cc["@mozilla.org/browser/nav-history-service;1"]
.getService(Ci.nsIBrowserHistory);
history.removeAllPages();
}
interactive("history-clear", "Clear the history.", history_clear);
define_key(text_keymap, "C-w", "cmd_deleteWordBackward");
define_key(content_buffer_norm... | Add a history-clear function to conkeror | Add a history-clear function to conkeror
| JavaScript | bsd-3-clause | pjones/emacsrc | ---
+++
@@ -1,2 +1,11 @@
+function history_clear () {
+ var history = Cc["@mozilla.org/browser/nav-history-service;1"]
+ .getService(Ci.nsIBrowserHistory);
+ history.removeAllPages();
+}
+
+interactive("history-clear", "Clear the history.", history_clear);
+
+
define_key(text_keymap, "C-w", "cmd_deleteWordBackw... |
04cf346847f0472555407997f5167cf233ba6e0e | cli.js | cli.js | #!/usr/bin/env node
'use strict';
var assertSchema = require('./index');
var yargs = require('yargs');
var opts = yargs
.demand(1)
.usage(
'Usage: $0 [ -d database url ] <schema>\n' +
'Asserts the existence of schema, creating it if necessary'
)
.option('d', {
alias: 'database_url',
type: 'st... | #!/usr/bin/env node
'use strict';
var assertSchema = require('./index');
var yargs = require('yargs');
var opts = yargs
.demand(1)
.usage(
'Usage: $0 [ -d database url ] <schema>\n' +
'Asserts the existence of schema, creating it if necessary'
)
.option('d', {
alias: 'database_url',
type: 'st... | Allow DATABASE_URL to override passed option | Allow DATABASE_URL to override passed option
| JavaScript | mit | apechimp/node-pg-assert-schema | ---
+++
@@ -14,11 +14,10 @@
.option('d', {
alias: 'database_url',
type: 'string',
- default: process.env.DATABASE_URL,
- describe: 'database url (defaults to $DATABASE_URL)'
+ describe: 'database url (overriden by $DATABASE_URL)'
})
.help('h')
.alias('h', 'help')
.argv;
-assertSche... |
520e87c145d4b659affd67936ea9cd86d4e100ee | app/index.js | app/index.js |
var util = require('util'),
yeoman = require('yeoman-generator');
// mocha:app generator
//
// Setup the test/ directory.
//
module.exports = Generator;
function Generator(args, options, config) {
yeoman.generators.Base.apply(this, arguments);
this.option('assert-framework', {
type: String,
defaults... | 'use strict';
// mocha:app generator
//
// Sets up the test/ directory
//
var Generator = module.exports = function (args, options) {
this.option('assert-framework', {
type: String,
defaults: 'chai',
desc: 'Choose your prefered assertion library'
});
this.option('assert-style', {
desc: 'Choose th... | Convert generator to the simple format | Convert generator to the simple format
| JavaScript | bsd-2-clause | yeoman/generator-mocha,yeoman/generator-mocha | ---
+++
@@ -1,18 +1,9 @@
-
-var util = require('util'),
- yeoman = require('yeoman-generator');
-
+'use strict';
// mocha:app generator
//
-// Setup the test/ directory.
+// Sets up the test/ directory
//
-
-module.exports = Generator;
-
-function Generator(args, options, config) {
-
- yeoman.generators.Base.app... |
17aab292abe123e4812a09c41e3a68762213f432 | src/victory-primitives/box.js | src/victory-primitives/box.js | import React from "react";
import PropTypes from "prop-types";
import { assign } from "lodash";
import CommonProps from "./common-props";
export default class Box extends React.Component {
static propTypes = {
...CommonProps,
groupComponent: PropTypes.element,
horizontal: PropTypes.bool,
width: PropT... | import React from "react";
import PropTypes from "prop-types";
import { assign } from "lodash";
import CommonProps from "./common-props";
export default class Box extends React.Component {
static propTypes = {
...CommonProps,
groupComponent: PropTypes.element,
height: PropTypes.number,
width: PropTyp... | Add missing height prop to PropTypes. | Add missing height prop to PropTypes.
| JavaScript | mit | FormidableLabs/victory-core,FormidableLabs/victory-core | ---
+++
@@ -7,7 +7,7 @@
static propTypes = {
...CommonProps,
groupComponent: PropTypes.element,
- horizontal: PropTypes.bool,
+ height: PropTypes.number,
width: PropTypes.number,
x: PropTypes.number,
y: PropTypes.number |
b4c12ea5777db86718f7bcbf17836e53070f7ed8 | lib/ember-addon.js | lib/ember-addon.js | var path = require('path');
var fs = require('fs');
var mergeTrees = require('broccoli-merge-trees');
var manifest = require('./manifest');
module.exports = {
name: 'broccoli-manifest',
initializeOptions: function() {
var defaultOptions = {
enabled: this.app.env === 'production',
appcacheFile: "... | var path = require('path');
var fs = require('fs');
var mergeTrees = require('broccoli-merge-trees');
var fileRemover = require('broccoli-file-remover');
var manifest = require('./manifest');
module.exports = {
name: 'broccoli-manifest',
initializeOptions: function() {
var defaultOptions = {
enabled: ... | Exclude index.html and tests from manifest | Exclude index.html and tests from manifest | JavaScript | mit | racido/broccoli-manifest,arenoir/broccoli-manifest,nybblr/broccoli-manifest,matthewlehner/broccoli-manifest | ---
+++
@@ -1,6 +1,7 @@
var path = require('path');
var fs = require('fs');
var mergeTrees = require('broccoli-merge-trees');
+var fileRemover = require('broccoli-file-remover');
var manifest = require('./manifest');
@@ -22,6 +23,9 @@
},
postprocessTree: function (type, tree) {
if (type === 'all'... |
97fa03ff3bf49d09cbd774fc9846b3298d11b2f2 | scripts/chris.js | scripts/chris.js | var audio = document.getElementById("chris");
function pauseChris() {
audio.pause();
}
function playChris() {
audio.currentTime = 952;
audio.play();
setTimeout(pauseChris, 331000);
}
function addChrisButton() {
var div = document.getElementById("audioContainer");
var button = document.createElement("BUTTON");
... | var audio = document.getElementById("chris");
function pauseChris() {
if (audio.currentTime >= 331000) {
audio.pause();
}
}
function playChris() {
audio.currentTime = 952;
audio.play();
var interval = setInterval(pauseChris, 1000);
}
function clearInterval() {
clearInterval(interval)
}
function addChrisButt... | Use interval in Chris button | Use interval in Chris button
| JavaScript | mit | nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io | ---
+++
@@ -1,20 +1,28 @@
var audio = document.getElementById("chris");
function pauseChris() {
- audio.pause();
+ if (audio.currentTime >= 331000) {
+ audio.pause();
+ }
}
function playChris() {
audio.currentTime = 952;
audio.play();
- setTimeout(pauseChris, 331000);
+ var interval = setInterval(pauseCh... |
2609a05dec6e32991e1375ad7991e17dae9d262b | server-config.js | server-config.js | module.exports = {
port: 3000,
internalClientPort: 3001,
authKey: 'ASDASD'
};
| const fs = require('fs');
module.exports = {
port: 3000,
internalClientPort: 3001,
authKey: process.env.AUTH_KEY || fs.readFileSync('/run/secrets/authkey', { encoding: 'utf-8' }).trim()
};
| Make server auth key configurable | Make server auth key configurable
Can be provided with an env var or with a Docker secret named "authkey".
| JavaScript | mit | mikko/CentralIntelligence-server | ---
+++
@@ -1,5 +1,7 @@
+const fs = require('fs');
+
module.exports = {
port: 3000,
internalClientPort: 3001,
- authKey: 'ASDASD'
+ authKey: process.env.AUTH_KEY || fs.readFileSync('/run/secrets/authkey', { encoding: 'utf-8' }).trim()
}; |
72360c8d6f8c868c9ea88f5f9018e7ff01ad3fb9 | lib/methods/raw.js | lib/methods/raw.js | "use strict";
var Base = require('../base')
/**
* @function raw converts the Base object into a normal javascript wObject, removing internal properties.
* It also converts nested objects and rebuilds arrays from objects with nothing but integer keys.
* @memberOf Base#
* @param {object} [options]
* @param {bool... | "use strict";
var Base = require('../base')
var isLikeNumber =require('../util').isLikeNumber
/**
* @function raw converts the Base object into a normal javascript wObject, removing internal properties.
* It also converts nested objects and rebuilds arrays from objects with nothing but integer keys.
* @memberOf Bas... | Use `!util/isLikeNumber(key)` instead of `key.match(/\D/)` | Use `!util/isLikeNumber(key)` instead of `key.match(/\D/)`
| JavaScript | isc | vigour-io/vjs | ---
+++
@@ -1,6 +1,6 @@
"use strict";
var Base = require('../base')
-
+var isLikeNumber =require('../util').isLikeNumber
/**
* @function raw converts the Base object into a normal javascript wObject, removing internal properties.
* It also converts nested objects and rebuilds arrays from objects with nothing ... |
f9421ab35aecdede1ca8454e231043e9f94edba6 | server/config.js | server/config.js | path = require('path');
module.exports = {
mongo: {
dbUrl: 'https://api.mongolab.com/api/1', // The base url of the MongoLab DB server
apiKey: 'gubV4zs5yN-ItUUQDpgUx0pUA98K3MYH', // Our MongoLab API key
dbPath: 'mongodb://root:4DaysKillerDemo@ds029979.mongolab.com:29979/paymymeeting'... | path = require('path');
module.exports = {
mongo: {
dbUrl: 'https://api.mongolab.com/api/1', // The base url of the MongoLab DB server
apiKey: 'gubV4zs5yN-ItUUQDpgUx0pUA98K3MYH', // Our MongoLab API key
//dbPath: 'mongodb://root:4DaysKillerDemo@ds029979.mongolab.com:29979/paymymeetin... | Add localhost path for MongoDB | Add localhost path for MongoDB
| JavaScript | mit | PythagoreLab/PayMyMeeting | ---
+++
@@ -4,7 +4,8 @@
mongo: {
dbUrl: 'https://api.mongolab.com/api/1', // The base url of the MongoLab DB server
apiKey: 'gubV4zs5yN-ItUUQDpgUx0pUA98K3MYH', // Our MongoLab API key
- dbPath: 'mongodb://root:4DaysKillerDemo@ds029979.mongolab.com:29979/paymymeeting'
+ //dbPath... |
8848878d6341abee73b0afcd6670988aeb37ad58 | index.js | index.js | var clientio = require("socket.io-client");
var client = clientio.connect(process.env.HOST + ":" + process.env.PORT);
var Gpio = require("onoff").Gpio;
var slot = {}
slot.led1 = new Gpio(14, "out");
client.emit("join-end");
client.on("command", function(data){
console.log("change " + data.key + " status to : " + ... | var clientio = require("socket.io-client");
var hostname = process.env.HOST || "localhost";
var port = process.env.PORT || 3001;
var client = clientio.connect(host + ":" + port.toString());
var Gpio = require("onoff").Gpio;
var slot = {}
slot.led1 = new Gpio(14, "out");
client.emit("join-end");
client.on("command", ... | Fix typo, optional condition for hostname & port | Fix typo, optional condition for hostname & port
| JavaScript | mit | herpiko/nf-iot-end | ---
+++
@@ -1,5 +1,7 @@
var clientio = require("socket.io-client");
-var client = clientio.connect(process.env.HOST + ":" + process.env.PORT);
+var hostname = process.env.HOST || "localhost";
+var port = process.env.PORT || 3001;
+var client = clientio.connect(host + ":" + port.toString());
var Gpio = require("onof... |
fed7876c125287523fed18c0053f5d4456cacdbd | source/Divider.js | source/Divider.js | (function (enyo, scope) {
/**
* {@link moon.Divider} is a simply styled component that may be used as a separator
* between groups of components.
*
* @class moon.Divider
* @mixes moon.MarqueeSupport
* @mixes moon.MarqueeItem
* @ui
* @public
*/
enyo.kind(
/** @lends moon.Divider.prototype */ {
/**
* @p... | (function (enyo, scope) {
/**
* {@link moon.Divider} is a simply styled component that may be used as a separator
* between groups of components.
*
* @class moon.Divider
* @mixes moon.MarqueeSupport
* @mixes moon.MarqueeItem
* @ui
* @public
*/
enyo.kind(
/** @lends moon.Divider.prototype */ {
/**
* @p... | Set content property before DOM is updated. | BHV-12598: Set content property before DOM is updated.
Enyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>
| JavaScript | apache-2.0 | enyojs/moonstone,mcanthony/moonstone,mcanthony/moonstone,mcanthony/moonstone | ---
+++
@@ -42,8 +42,8 @@
*/
contentChanged: enyo.inherit(function (sup) {
return function () {
+ this.content = this.content.split(' ').map(enyo.cap).join(' ');
sup.apply(this, arguments);
- this.content = this.content.split(' ').map(enyo.cap).join(' ');
};
})
}); |
ad43d8c6a4c83b67b5ca95edbf9093bc89e16882 | client/webpack.base.config.js | client/webpack.base.config.js | const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
inject: 'true',
template: 'app/index.html'
});
const extractLess = new ExtractTextPlugin({
filename: "... | const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
inject: 'true',
template: 'app/index.html'
});
const extractLess = new ExtractTextPlugin({
filename: "... | Make webpack dev server work for nested route paths. | Make webpack dev server work for nested route paths.
| JavaScript | mit | katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming | ---
+++
@@ -15,6 +15,7 @@
entry: './app/app.jsx',
output: Object.assign({
path: path.resolve(__dirname, "build"),
+ publicPath: "/"
}, options.output),
module: {
loaders: [ |
f22d12a06b8b90506f2ad6bbaf165948df145f60 | src/js/weapon.js | src/js/weapon.js | (function() {
'use strict';
function Weapon(game, x, y, coolDown, bulletSpeed, bullets, damage) {
this.game = game;
this.x = x;
this.y = y;
this.coolDown = coolDown;
this.nextFire = 0;
this.bullets = bullets;
this.bulletSpeed = bulletSpeed;
this.damage = damage;
}
Weapon.protot... | (function() {
'use strict';
function Weapon(game, x, y, coolDown, bulletSpeed, bullets, damage) {
this.game = game;
this.x = x;
this.y = y;
this.coolDown = coolDown;
this.nextFire = 0;
this.bullets = bullets;
this.bulletSpeed = bulletSpeed;
this.damage = damage;
}
Weapon.protot... | Make fire take coordinates, add function for aiming | Make fire take coordinates, add function for aiming
| JavaScript | mit | werme/DATX02 | ---
+++
@@ -16,24 +16,23 @@
updateManually: function(x, y){
this.x = x;
this.y = y;
- this.game.physics.angleToPointer(this);
- if (this.game.input.activePointer.isDown){
- this.fire();
+ },
+
+ fire: function(x, y){
+ if (this.game.time.now > this.nextFire && this.bulle... |
36b0096973cbcdfb00aa5f2562d075a70df6e4a0 | src/background.js | src/background.js | 'use strict';
chrome.app.runtime.onLaunched.addListener(function() {
chrome.runtime.getPlatformInfo(function(info) {
// don't render statusbar over app UI on iOS
if (info.os === 'cordova-ios' && window.StatusBar) {
window.StatusBar.overlaysWebView(false);
}
// open chr... | 'use strict';
chrome.app.runtime.onLaunched.addListener(function() {
chrome.runtime.getPlatformInfo(function(info) {
// don't render statusbar over app UI on iOS
if (info.os === 'cordova-ios' && window.StatusBar) {
window.StatusBar.overlaysWebView(false);
}
// open chr... | Add id to chrome.window api to remember position and size | Add id to chrome.window api to remember position and size
| JavaScript | mit | clochix/mail-html5,halitalf/mail-html5,sheafferusa/mail-html5,sheafferusa/mail-html5,b-deng/mail-html5,whiteout-io/mail-html5,b-deng/mail-html5,whiteout-io/mail,halitalf/mail-html5,clochix/mail-html5,whiteout-io/mail,kalatestimine/mail-html5,tanx/hoodiecrow,sheafferusa/mail-html5,whiteout-io/mail-html5,whiteout-io/mail... | ---
+++
@@ -10,9 +10,10 @@
// open chrome app in new window
chrome.app.window.create('index.html', {
- 'bounds': {
- 'width': 1280,
- 'height': 800
+ id: '0',
+ innerBounds: {
+ width: 1280,
+ height: 800
... |
fcf75a1589637715c76accbcfc7bb6dd9605ed31 | src/background.js | src/background.js | 'use strict';
function createTask(chrome, title, note) {
let task = 'twodo://x-callback-url/add?task=' + encodeURI(title) + '¬e=' + encodeURI(note);
chrome.tabs.update({
url: task
});
}
chrome.browserAction.onClicked.addListener(function(aTab) {
chrome.tabs.executeScript(aTab.id, {
code: "window.get... | 'use strict';
function createTask(chrome, title, note, url) {
let task = 'twodo://x-callback-url/add?task=' + encodeURI(title) + '¬e=' + encodeURI(note) + '&action=url:' + encodeURI(url);
chrome.tabs.update({
url: task
});
}
chrome.browserAction.onClicked.addListener(function(aTab) {
chrome.tabs.executeS... | Set URL action in newly created 2Do Task | Set URL action in newly created 2Do Task
Still add any selected text as a note, but use the current tab's URL as the
2Do action instead.
| JavaScript | mit | mkleucker/2do-webextension | ---
+++
@@ -1,7 +1,7 @@
'use strict';
-function createTask(chrome, title, note) {
- let task = 'twodo://x-callback-url/add?task=' + encodeURI(title) + '¬e=' + encodeURI(note);
+function createTask(chrome, title, note, url) {
+ let task = 'twodo://x-callback-url/add?task=' + encodeURI(title) + '¬e=' + encod... |
79b6179285a28efaad30ba45648a0a871e598324 | esnext.js | esnext.js | 'use strict';
const path = require('path');
module.exports = {
extends: path.join(__dirname, 'index.js'),
rules: {
'no-var': 'error',
'object-shorthand': [
'error',
'always'
],
'prefer-arrow-callback': [
'error',
{
allowNamedFunctions: true
}
],
'prefer-const': [
'error',
{
d... | 'use strict';
const path = require('path');
module.exports = {
extends: path.join(__dirname, 'index.js'),
rules: {
'no-var': 'error',
'object-shorthand': [
'error',
'always'
],
'prefer-arrow-callback': [
'error',
{
allowNamedFunctions: true
}
],
'prefer-const': [
'error',
{
d... | Disable the `prefer-named-capture-group` rule temporarily | Disable the `prefer-named-capture-group` rule temporarily
| JavaScript | mit | sindresorhus/eslint-config-xo | ---
+++
@@ -48,6 +48,8 @@
}
],
'no-useless-catch': 'error',
- 'prefer-named-capture-group': 'error'
+
+ // Disabled for now as Firefox doesn't support named capture groups and I'm tired of getting issues about the use of named capture groups...
+ // 'prefer-named-capture-group': 'error'
}
}; |
c3aeac1fd9568ea064f88e92cf16425ba7050f1b | test/app.spec.js | test/app.spec.js | 'use strict';
var expect = require('chai').expect;
var App = require('../app/scripts/app');
describe('app', function () {
it('should initialize app with no arguments', function () {
var app = new App();
expect(app).to.have.property('variables');
expect(app.variables).to.have.length(2);
expect(app).... | 'use strict';
var expect = require('chai').expect;
var App = require('../app/scripts/app');
describe('app', function () {
it('should initialize app with no arguments', function () {
var app = new App();
expect(app).to.have.property('variables');
expect(app.variables).to.have.length(2);
expect(app).... | Add test for initializing app with arguments | Add test for initializing app with arguments
| JavaScript | mit | caleb531/truthy,caleb531/truthy | ---
+++
@@ -13,4 +13,20 @@
expect(app.expressions).to.have.length(3);
});
+ it('should initialize app with arguments', function () {
+ var app = new App({
+ variables: {items: [{name: 'a'}, {name: 'b'}, {name: 'c'}]},
+ expressions: {items: [{string: 'a xor b'}, {string: 'a nand b'}]}
+ });... |
e0d8b2aa93bf72a99893e6aaccb8dfbb23085dc2 | components/ProgramLine/index.js | components/ProgramLine/index.js | import React from 'react'
import PropTypes from 'prop-types'
import Moment from 'react-moment'
import Link from 'next/link'
import generateUrl from 'utils/urlGenerator'
import EditButton from 'containers/EditButton'
import stylesheet from './style.scss'
const ProgramLine = (props) => (
<div className='program-line... | import React from 'react'
import PropTypes from 'prop-types'
import Moment from 'react-moment'
import Link from 'next/link'
import Head from 'next/head'
import generateUrl from 'utils/urlGenerator'
import EditButton from 'containers/EditButton'
import stylesheet from './style.scss'
const ProgramLine = (props) => (
... | Move ProgramLine style into head | Move ProgramLine style into head
| JavaScript | mit | bmagic/acdh-client | ---
+++
@@ -2,6 +2,7 @@
import PropTypes from 'prop-types'
import Moment from 'react-moment'
import Link from 'next/link'
+import Head from 'next/head'
import generateUrl from 'utils/urlGenerator'
import EditButton from 'containers/EditButton'
@@ -10,7 +11,9 @@
const ProgramLine = (props) => (
<div class... |
4fe711dc8b18d93b711b5872f92593c37dfe9d7c | static/js/chat.js | static/js/chat.js | "use strict";
function Chat (p_session) {
var _session;
var self = this;
this._queue = [];
this.initialize = function (p_session) {
// register chat to session
p_session.register_chat(self);
// attach submit event
$("#send-message-form").submit(function(event){
... | "use strict";
function Chat (p_session) {
var _session;
var self = this;
this._queue = [];
this.initialize = function (p_session) {
// register chat to session
p_session.register_chat(self);
// initialize list of users for the send message form
if (0 < p_session.othe... | Initialize the select element for sending a message. | Initialize the select element for sending a message.
| JavaScript | agpl-3.0 | mose/poietic-generator,mose/poietic-generator,mose/poietic-generator | ---
+++
@@ -10,6 +10,14 @@
this.initialize = function (p_session) {
// register chat to session
p_session.register_chat(self);
+
+ // initialize list of users for the send message form
+ if (0 < p_session.other_users.length) {
+ var select = $("#send-message-form-to");
... |
f284b16e5bb43deb3f00a947d5515b515162cfcf | test/rpc-spec.js | test/rpc-spec.js | var assert = require('assert');
var producer = require('../index')().producer;
var consumer = require('../index')().consumer;
var uuid = require('node-uuid');
var fixtures = {
queues: ['test-queue-0']
};
describe('Producer/Consumer RPC messaging:', function() {
before(function (done) {
return consumer.connect... | var assert = require('assert');
var producer = require('../index')().producer;
var consumer = require('../index')().consumer;
var uuid = require('node-uuid');
var fixtures = {
queues: ['rpc-queue-0']
};
describe('Producer/Consumer RPC messaging:', function() {
before(function (done) {
return consumer.connect(... | Rename rpc test queue and change rpc message | Rename rpc test queue and change rpc message
| JavaScript | mit | dial-once/node-bunnymq | ---
+++
@@ -4,7 +4,7 @@
var uuid = require('node-uuid');
var fixtures = {
- queues: ['test-queue-0']
+ queues: ['rpc-queue-0']
};
describe('Producer/Consumer RPC messaging:', function() {
@@ -24,20 +24,20 @@
.then(done);
});
- it('should be able to create a consumer that returns true if called as... |
78ad3613e02ed2ab7c848d33d6ff9ad40a0789ff | client/scripts/sw.js | client/scripts/sw.js | const toolbox = require('sw-toolbox');
// Try network but fallback to cache
toolbox.router.default = toolbox.networkFirst;
// Data should query the network first
toolbox.router.any('/api/*', toolbox.networkOnly);
// Data should query the network first
toolbox.router.any('/auth/*', toolbox.networkOnly);
| import {router} from 'sw-toolbox';
// Try network but fallback to cache
router.default = toolbox.networkFirst;
// Data should query the network first
router.any('/api/*', toolbox.networkOnly);
// Data should query the network first
router.any('/auth/*', toolbox.networkOnly);
| Use import rather than require | Use import rather than require
| JavaScript | mit | AdaRoseEdwards/81,AdaRoseEdwards/81,AdaRoseEdwards/81 | ---
+++
@@ -1,10 +1,10 @@
-const toolbox = require('sw-toolbox');
+import {router} from 'sw-toolbox';
// Try network but fallback to cache
-toolbox.router.default = toolbox.networkFirst;
+router.default = toolbox.networkFirst;
// Data should query the network first
-toolbox.router.any('/api/*', toolbox.networkO... |
74bd38f424fbdea30488ab5ef33afe5036be6018 | script/mylowyat.user.js | script/mylowyat.user.js | // ==UserScript==
// @author sk3dsu(Fadli Ishak)
// @name MyLowyat
// @version 0.2.1
// @description Removing some elements of the forum to be a bit cleaner for SFW.
// @namespace https://github.com/mfadliishak/lowyatAvatars
// @icon https://forum.lowyat.net/favicon.ico
// @ma... | // ==UserScript==
// @author sk3dsu(Fadli Ishak)
// @name MyLowyat
// @version 0.2.2
// @description Removing some elements of the forum to be a bit cleaner for SFW.
// @namespace https://github.com/mfadliishak/lowyatAvatars
// @icon https://forum.lowyat.net/favicon.ico
// @ma... | Fix Remove banner still showing, use inline css instead. | Fix Remove banner still showing, use inline css instead.
| JavaScript | mit | mfadliishak/mylowyat | ---
+++
@@ -1,12 +1,13 @@
// ==UserScript==
// @author sk3dsu(Fadli Ishak)
// @name MyLowyat
-// @version 0.2.1
+// @version 0.2.2
// @description Removing some elements of the forum to be a bit cleaner for SFW.
// @namespace https://github.com/mfadliishak/lowyatAvatars
/... |
22f41b9cfcf10af245b9bb185d9eb04c2fa82da6 | lib/rules/space-after-comma.js | lib/rules/space-after-comma.js | 'use strict';
var helpers = require('../helpers');
module.exports = {
'name': 'space-after-comma',
'defaults': {
'include': true
},
'detect': function (ast, parser) {
var result = [];
ast.traverseByTypes(['operator', 'delimiter'], function (operator, i, parent) {
var next;
if (operat... | 'use strict';
var helpers = require('../helpers');
module.exports = {
'name': 'space-after-comma',
'defaults': {
'include': true
},
'detect': function (ast, parser) {
var result = [];
ast.traverseByTypes(['operator', 'delimiter'], function (operator, i, parent) {
var next,
doubleN... | Refactor rule to work with gonzales 3.2.1 | :art: Refactor rule to work with gonzales 3.2.1
| JavaScript | mit | sasstools/sass-lint,flacerdk/sass-lint,bgriffith/sass-lint,sktt/sass-lint,srowhani/sass-lint,DanPurdy/sass-lint,sasstools/sass-lint,srowhani/sass-lint | ---
+++
@@ -11,18 +11,25 @@
var result = [];
ast.traverseByTypes(['operator', 'delimiter'], function (operator, i, parent) {
- var next;
+ var next,
+ doubleNext;
if (operator.content === ',') {
- next = parent.content[i + 1];
+ next = parent.content[i + 1] || fal... |
b909320915b98e7906a6753da3ec68c5a0567a22 | net/data/proxy_resolver_v8_unittest/ends_with_comment.js | net/data/proxy_resolver_v8_unittest/ends_with_comment.js | function FindProxyForURL(url, host) {
return "PROXY success:80";
}
// We end the script with a comment (and no trailing newline).
// This used to cause problems, because internally ProxyResolverV8
// would append some functions to the script; the first line of
// those extra functions was being considered part of th... | function FindProxyForURL(url, host) {
return "PROXY success:80";
}
// We end the script with a comment (and no trailing newline).
// This used to cause problems, because internally ProxyResolverV8
// would append some functions to the script; the first line of
// those extra functions was being considered part of th... | Set the mime-type on a test data file to binary. | Set the mime-type on a test data file to binary.
I just checked this file in, and it shouldn't have a trailing newline.
However when I checked it out, SVN seems to have put back an LF at the end.
Hopefully this will prevent that from happening.
BUG=http://crbug.com/22864
TBR=cpu
Review URL: http://codereview.chromium... | JavaScript | bsd-3-clause | adobe/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,Crystalnix... | |
a39aa576808891460fd674345162cecf57a45ee8 | examples/configs/webpack-base.config.js | examples/configs/webpack-base.config.js | /* eslint-disable global-require */
const path = require('path');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
const babelConfig = require(... | /* eslint-disable global-require */
const path = require('path');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
const babelConfig = require(... | Remove babel-polyfill from vendor bundle | build(webpack): Remove babel-polyfill from vendor bundle
| JavaScript | mit | nickjohnson-dev/dawww | ---
+++
@@ -10,7 +10,6 @@
entry: {
app: path.join(__dirname, '../index.js'),
vendor: [
- 'babel-polyfill',
'lodash',
],
}, |
57079e22ece4cde0aef427eee163810a141c4731 | config/assets/cloud-foundry.js | config/assets/cloud-foundry.js | 'use strict';
module.exports = {
client: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
],
js: [
'public/lib/angular/angular.min.js',
'public/lib/angular-resource/angular-resource.min.js... | 'use strict';
module.exports = {};
| Remove non CF specific files | Remove non CF specific files
| JavaScript | mit | duppercloud/mean,edwardt4482/customerRates,Karma-Tech-Consulting/recipes,NicolasKovalsky/mean,amoundr/doctorNet,mc-funk/exostie-device-sim-js,shteeven/scradio,cleargif/mean,lirantal/vault,ChristopherJones72521/KHE2015,spacetag/TechEx_Josiah_2,devypt/mean,Boonda-P/newmean,ryanjbaxter/mean,helaili/automatic-octo-spork,et... | ---
+++
@@ -1,23 +1,3 @@
'use strict';
-module.exports = {
- client: {
- lib: {
- css: [
- 'public/lib/bootstrap/dist/css/bootstrap.min.css',
- 'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
- ],
- js: [
- 'public/lib/angular/angular.min.js',
- 'public/lib/a... |
466ab72d4d10df22740968461398b588b13cc909 | tempLog_server.js | tempLog_server.js | var fs = require('fs');
var intervalId = setInterval(function() {
fs.readFile('/sys/class/thermal/thermal_zone0/temp', function(err, data) {
var date = new Date();
var temp = data / 1000;
var newData = date + ',' + temp + '\n';
fs.appendFile('./data-log.csv', newData, function(err) ... | var fs = require('fs');
var intervalId = setInterval(function() {
fs.readFile('/sys/class/thermal/thermal_zone0/temp', function(err, data) {
var date = new Date();
var temp = data / 1000;
var newData = date + ',' + temp + '\n';
fs.appendFile('./data-log.csv', newData, function(err) ... | Remove the count and added a feedback when started | Remove the count and added a feedback when started
| JavaScript | mit | DevinCarr/piTemp,DevinCarr/piTemp | ---
+++
@@ -8,7 +8,8 @@
fs.appendFile('./data-log.csv', newData, function(err) {
console.log('File Appended: ' + date + ' at ' + temp);
if (err) throw err;
- count++;
});
});
}, 3600000);
+
+console.log('Log running...'); |
af50546f56a995ae69158bed8679eed9a2b69894 | app/assets/party/profile.js | app/assets/party/profile.js | 'use strict';
app.controller('party/profile', [
'$scope', 'displayService', 'party', 'pageService',
function ($scope, display, party, page) {
$scope.clickUser = function(user){
_.each($scope.volumes, function(v, i){
$scope.volumes[i].selectedClass = (v.users.indexOf(user.id) > -1) ? "volumeSelec... | 'use strict';
app.controller('party/profile', [
'$scope', 'displayService', 'party', 'pageService',
function ($scope, display, party, page) {
// This function takes in a user, and loops through
// volumes, and attaches a "volumeSelected" class
// to all the pertinent volumes.
$scope.clickUser ... | Add comments and fix formatting. | Add comments and fix formatting.
| JavaScript | agpl-3.0 | databrary/databrary,databrary/databrary,databrary/databrary,databrary/databrary | ---
+++
@@ -3,14 +3,21 @@
app.controller('party/profile', [
'$scope', 'displayService', 'party', 'pageService',
function ($scope, display, party, page) {
- $scope.clickUser = function(user){
- _.each($scope.volumes, function(v, i){
+
+ // This function takes in a user, and loops through
+ // volu... |
f084957ab6edc9c70333bc83637271730cf3c036 | src/finalisers/shared/getExportBlock.js | src/finalisers/shared/getExportBlock.js | function propertyAccess ( name ) {
return name === 'default' ? `['default']` : `.${name}`;
}
export default function getExportBlock ( bundle, exportMode, mechanism = 'return' ) {
if ( exportMode === 'default' ) {
const defaultExportName = bundle.exports.lookup( 'default' ).name;
return `${mechanism} ${defaultEx... | function wrapAccess ( id ) {
return ( id.originalName !== 'default' && id.module && id.module.isExternal ) ?
id.module.name + propertyAccess( id.originalName ) : id.name;
}
function propertyAccess ( name ) {
return name === 'default' ? `['default']` : `.${name}`;
}
export default function getExportBlock ( bundle,... | Access reexports of externals safely when needed. | Access reexports of externals safely when needed.
| JavaScript | mit | lukeapage/rollup,Victorystick/rollup,alalonde/rollup,Permutatrix/rollup,corneliusweig/rollup | ---
+++
@@ -1,22 +1,24 @@
+function wrapAccess ( id ) {
+ return ( id.originalName !== 'default' && id.module && id.module.isExternal ) ?
+ id.module.name + propertyAccess( id.originalName ) : id.name;
+}
+
function propertyAccess ( name ) {
return name === 'default' ? `['default']` : `.${name}`;
}
export def... |
f29302c93dfb5b6e41193a14e82552a04cc9177e | MUMPSCompiler.js | MUMPSCompiler.js | 'use strict';
const fs = require('fs');
const util = require('util');
const _ = require('lodash');
const LineTokens = require('./LineTokens');
const AbstractSyntaxTree = require('./AbstractSyntaxTree');
class MUMPSCompiler {
readFile(fileName) {
return fs.readFileSync(fileName, 'utf8').split('\n');
}
... | 'use strict';
const fs = require('fs');
const util = require('util');
const _ = require('lodash');
const LineTokens = require('./LineTokens');
const AbstractSyntaxTree = require('./AbstractSyntaxTree');
class MUMPSCompiler {
readFile(fileName) {
return fs.readFileSync(fileName, 'utf8').split('\n');
}
... | Restructure the creation of the AST | Restructure the creation of the AST
| JavaScript | apache-2.0 | mfuroyama/mumps-compiler | ---
+++
@@ -13,8 +13,8 @@
compile(fileName) {
this.lines = this.readFile(fileName);
this.tokens = this.lines.map((line, index) => (new LineTokens(line, index)));
- this.abstractSyntaxTrees = this.tokens.map(tokens => (new AbstractSyntaxTree(tokens)));
- console.log(util.inspect(th... |
102b402570437fa38dfbd4d5afb94115aaa495dc | public/test/spec/config_spec.js | public/test/spec/config_spec.js | define(['config'],
function(config) {
'use strict';
describe('config module', function() {
it('should allow values to be functions with returns', function() {
config.option('fn_test', function() { return (1 + 2 + 3) / 4; });
expect(config.fn_test).toEqual(1.5);
});
it('should force boolean... | define(['config'],
function(config) {
'use strict';
describe('config module', function() {
it('should allow values to be functions with returns', function() {
config._priv.set_option('fn_test', function() { return (1 + 2 + 3) / 4; });
expect(config.fn_test).toEqual(1.5);
});
it('should for... | Fix config unit tests with methods moved to _priv (see commit ef68784) | Fix config unit tests with methods moved to _priv (see commit ef68784)
| JavaScript | mit | gavinhungry/debugger.io,gavinhungry/debugger.io | ---
+++
@@ -4,16 +4,16 @@
describe('config module', function() {
it('should allow values to be functions with returns', function() {
- config.option('fn_test', function() { return (1 + 2 + 3) / 4; });
+ config._priv.set_option('fn_test', function() { return (1 + 2 + 3) / 4; });
expect(confi... |
0dd80408bb9b2ab204f984b8f16f964cef6ab629 | src/test/integration-test.js | src/test/integration-test.js | !function (assert, path) {
'use strict';
require('vows').describe('Integration test').addBatch({
'When minifying a CSS file': {
topic: function () {
var callback = this.callback,
topic;
require('publishjs')({
cache: fa... | !function (assert, path) {
'use strict';
require('vows').describe('Integration test').addBatch({
'When minifying a CSS file': {
topic: function () {
var callback = this.callback,
topic;
require('publishjs')({
cache: fa... | Use build() result for test | Use build() result for test
| JavaScript | mit | candrholdings/publishjs-less,candrholdings/publishjs-less | ---
+++
@@ -13,7 +13,7 @@
processors: {
less: require('../index')
}
- }).build(function (pipe) {
+ }).build(function (pipe, callback) {
pipe.from(path.resolve(path.dirname(module.filename), 'integrati... |
6a5bac62634300a1f34977694840d1cfa1154fd6 | assets/js/adminselection.js | assets/js/adminselection.js | function editselection(adminname, adminusername, adminpassword, adminid){
document.getElementById("inputadminname").value = adminname;
document.getElementById("inputadminusername").value = adminusername;
document.getElementById("inputadminpassword").value = adminpassword;
document.getElementById("inputadminadminid"... | function editselection(adminname, adminusername, adminpassword, adminid){
document.getElementById("inputadminname").value = adminname;
document.getElementById("inputadminusername").value = adminusername;
document.getElementById("inputadminpassword").value = adminpassword;
document.getElementById("inputadminadminid"... | Add changeyear() and commented on selected functions. | Add changeyear() and commented on selected functions.
| JavaScript | mit | altusgerona/cmsc127project,altusgerona/cmsc127project,altusgerona/cmsc127project | ---
+++
@@ -18,11 +18,16 @@
}
function changeday(){
- var day = document.getElementById("dayselect").value;
- document.getElementById("daychange").value = day;
+ var day = document.getElementById("dayselect").value; //Get the value from the day select
+ document.getElementById("daychange").value = day; //Change t... |
8dc69b9f6571baaff8dad5ff61debd0c10cfb0f3 | app/initializers/honeybadger.js | app/initializers/honeybadger.js | import Ember from 'ember';
import ENV from '../config/environment';
export function initialize() {
$.getScript('//js.honeybadger.io/v0.2/honeybadger.min.js').then(function() {
if (window.Honeybadger) {
var apiKey = Ember.get(ENV, 'honeybadger.apiKey');
var environment = Ember.get(ENV, 'honeyba... | import Ember from 'ember';
import ENV from '../config/environment';
export function initialize() {
Ember.$.getScript('//js.honeybadger.io/v0.2/honeybadger.min.js').then(function() {
if (window.Honeybadger) {
var apiKey = Ember.get(ENV, 'honeybadger.apiKey');
var environment = Ember.get(ENV, 'h... | Use Ember alias for jQuery | Use Ember alias for jQuery
| JavaScript | mit | webnuts/ember-cli-honeybadger,webnuts/ember-cli-honeybadger | ---
+++
@@ -2,7 +2,7 @@
import ENV from '../config/environment';
export function initialize() {
- $.getScript('//js.honeybadger.io/v0.2/honeybadger.min.js').then(function() {
+ Ember.$.getScript('//js.honeybadger.io/v0.2/honeybadger.min.js').then(function() {
if (window.Honeybadger) {
var apiKey = E... |
a7c61ddb11083242d38c64e6db4f6de2e0dd76d1 | app/lib/stub-router-context.js | app/lib/stub-router-context.js | import _ from 'lodash';
import React from 'react/addons';
var stubRouterContext = (Component, props, stubs) => {
return React.createClass({
childContextTypes: {
getCurrentPath: React.PropTypes.func,
getCurrentRoutes: React.PropTypes.func,
getCurrentPathname: React.PropTypes.func,
getCurre... | import _ from 'lodash';
import React from 'react/addons';
var stubRouterContext = (Component, props, stubs) => {
return React.createClass({
childContextTypes: {
getCurrentPath: React.PropTypes.func,
getCurrentRoutes: React.PropTypes.func,
getCurrentPathname: React.PropTypes.func,
getCurre... | Add ref to stub router component for accessibility | Add ref to stub router component for accessibility | JavaScript | isc | jeffreymoya/sprintly-kanban,pipermerriam/sprintly-kanban,pipermerriam/sprintly-kanban,florapdx/sprintly-kanban,datachand/sprintly-kanban,sprintly/sprintly-kanban,datachand/sprintly-kanban,sprintly/sprintly-kanban,whitebird08/sprintly-kanban,whitebird08/sprintly-kanban,jeffreymoya/sprintly-kanban,florapdx/sprintly-kanba... | ---
+++
@@ -22,7 +22,8 @@
},
render: function() {
- return <Component {...props} />;
+
+ return <Component ref='stub' {...props} />;
}
});
}; |
fd0b38cd3e80b84fc0d9965d61e849d507203e41 | app/assets/javascripts/views/user/mega_drop.js | app/assets/javascripts/views/user/mega_drop.js | Teikei.module("User", function(User, App, Backbone, Marionette, $, _) {
User.MegaDropView = Marionette.View.extend({
el: "#mega-drop",
ui: {
toggle: ".toggle",
slider: ".slider",
toggleText: ".toggle b"
},
isOpen: false,
events: {
"click .toggle": "toggleDropdown",
... | Teikei.module("User", function(User, App, Backbone, Marionette, $, _) {
User.MegaDropView = Marionette.View.extend({
el: "#mega-drop",
ui: {
toggle: ".toggle-button",
slider: ".slider",
toggleText: ".toggle-button b"
},
isOpen: false,
events: {
"click .toggle-button": ... | Fix a bug in the mega-drop that prevented it opening. | Fix a bug in the mega-drop that prevented it opening.
| JavaScript | agpl-3.0 | sjockers/teikei,sjockers/teikei,teikei/teikei,sjockers/teikei,teikei/teikei,teikei/teikei | ---
+++
@@ -5,15 +5,15 @@
el: "#mega-drop",
ui: {
- toggle: ".toggle",
+ toggle: ".toggle-button",
slider: ".slider",
- toggleText: ".toggle b"
+ toggleText: ".toggle-button b"
},
isOpen: false,
events: {
- "click .toggle": "toggleDropdown",
+ "click... |
e2c43007eec0e388425f4fc07693fae1b33fa775 | webpack.config.js | webpack.config.js | const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
module.exports = {
entry: './client/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
plugins: [new HtmlWebpackPlugin({
title: 'Beer.ly'
})]
} | const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
module.exports = {
entry: './client/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
plugins: [new HtmlWebpackPlugin({
title: 'Beer.ly',
template: './client/index.ejs',
... | Add HtmlWebpackPlugin options for template and script injection | Add HtmlWebpackPlugin options for template and script injection
| JavaScript | mit | ntoung/beer.ly,ntoung/beer.ly | ---
+++
@@ -8,6 +8,8 @@
filename: 'bundle.js'
},
plugins: [new HtmlWebpackPlugin({
- title: 'Beer.ly'
+ title: 'Beer.ly',
+ template: './client/index.ejs',
+ inject: 'body' // inject all script files at the bottom of the body
})]
} |
576da3b37112a0eba4ff1ab61f0029c66a8a66a4 | app/javascript/app/pages/ndcs/ndcs-reducers.js | app/javascript/app/pages/ndcs/ndcs-reducers.js | export const initialState = {
loading: false,
loaded: false,
error: false,
data: {}
};
const setLoading = (state, loading) => ({ ...state, loading });
const setError = (state, error) => ({ ...state, error });
const setLoaded = (state, loaded) => ({ ...state, loaded });
export default {
fetchNDCSInit: state ... | export const initialState = {
loading: false,
loaded: false,
error: false,
data: {}
};
const setLoading = (state, loading) => ({ ...state, loading });
const setError = (state, error) => ({ ...state, error });
const setLoaded = (state, loaded) => ({ ...state, loaded });
export default {
fetchNDCSInit: state ... | Create mapCategories on ndcs reducer | Create mapCategories on ndcs reducer
| JavaScript | mit | Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch | ---
+++
@@ -18,6 +18,7 @@
...state,
data: {
categories: payload.categories,
+ mapCategories: state.data.mapCategories || {},
sectors: payload.sectors,
mapIndicators: state.data.mapIndicators || [],
indicators: payload.indicators
@@ -... |
e60823af502d8fb5a51be7d41c177f5b2fab5055 | src/index.js | src/index.js | function wrap(res, fn) {
return function(...args) {
if (res.timedout) {
return res;
} else {
return fn.apply(res, args);
}
};
}
export default (timeoutValue) => {
return (req, res, next) => {
const {send, sendStatus, status} = res;
res.setTime... | function wrap(res, fn) {
return function(...args) {
if (res.timedout) {
return res;
} else {
return fn.apply(res, args);
}
};
}
export default (timeoutValue) => {
return (req, res, next) => {
const {send, sendStatus, status} = res;
res.setTime... | Change from 408 to 503 since it is a server error | Change from 408 to 503 since it is a server error
| JavaScript | mit | fjodorekstrom/timeout-middleware | ---
+++
@@ -15,7 +15,7 @@
res.on('timeout', () => {
res.timedout = true;
if (!res.headersSent) {
- res.statusCode = 408;
+ res.statusCode = 503;
res.type('txt');
send.apply(res, ['Request Timeout']);
} |
05b841b505d91a974a06bb20ae78652cbb9b48e6 | src/index.js | src/index.js | import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { Router, Route } from 'react-router'
import config from 'react-global-configuration'
//views
import HomePage from './views/Home'
import ListPageContainer from './views/List'
//store
import { store, history } fr... | import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { Router, Route } from 'react-router'
import config from 'react-global-configuration'
//views
import HomePage from './views/Home'
import ListPageContainer from './views/List'
//store
import { store, history } fr... | Update config for plugin (still needs moving outside this lib) | Update config for plugin (still needs moving outside this lib)
| JavaScript | mit | aerian-studios/react-crud | ---
+++
@@ -16,9 +16,9 @@
{
baseUrl: '/api',
entities: {
- ids: ['package'],
+ ids: ['plugin'],
byId: {
- 'package': {},
+ 'plugin': {},
}
}
} |
74ee10552c8791941df3c436dddf25ba2680cc78 | tests/integration/components/permission-language-test.js | tests/integration/components/permission-language-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('permission-language', 'Integration | Component | permission language', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value')... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import Ember from 'ember';
moduleForComponent('permission-language', 'Integration | Component | permission language', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this... | Add Component testing for permission-language component. The test passes three provider names to the component and verify that the returned results is correct. | Add Component testing for permission-language component. The test passes three provider names to the component and verify that the returned results is correct.
Ticket ID: EOSF-403
| JavaScript | apache-2.0 | CenterForOpenScience/ember-preprints,laurenrevere/ember-preprints,caneruguz/ember-preprints,CenterForOpenScience/ember-preprints,baylee-d/ember-preprints,baylee-d/ember-preprints,caneruguz/ember-preprints,laurenrevere/ember-preprints | ---
+++
@@ -1,5 +1,6 @@
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
+import Ember from 'ember';
moduleForComponent('permission-language', 'Integration | Component | permission language', {
integration: true
@@ -10,9 +11,28 @@
// Set any properties w... |
907f0b008587aadbcaf1da93491662e874a0301d | share/spice/canistreamit/spice.js | share/spice/canistreamit/spice.js | function ddg_spice_canistreamit(movies) {
// console.log(xk);
var result,img,snippet,link,div;
var items = new Array();
for(var i = 0; i<movies.length; i++)
{
result = movies[i];
// Make title for header
var header = result.title + " ("+result.year+")";
... | function ddg_spice_canistreamit(movies) {
// console.log(xk);
var result,img,snippet,link,div;
var items = new Array();
for(var i = 0; i<movies.length; i++)
{
result = movies[i];
// Make title for header
var header = 'Watch ' + result.title + " ("+result.yea... | Add watch to Canistreamit header. | Add watch to Canistreamit header.
| JavaScript | apache-2.0 | andrey-p/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,soleo/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,deserted/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,mr-karan/zer... | ---
+++
@@ -8,7 +8,7 @@
result = movies[i];
// Make title for header
- var header = result.title + " ("+result.year+")";
+ var header = 'Watch ' + result.title + " ("+result.year+")";
// Call nra function as per Spice Plugin Guidelines
|
c63cc693b7854745c2abdd8eea55dd695c669821 | Core/BaseLoader.js | Core/BaseLoader.js | const fetch = require('node-fetch');
class BaseLoader {
constructor(APIToken, baseURL) {
this.APIToken = APIToken;
this.fetch = fetch
this.baseURL = baseURL
}
get fetchConfiguration() {
const headers = {
Authorization: `Bearer ${this.APIToken}`,
};
const configuration = {
me... | const fetch = require("node-fetch");
class BaseLoader {
constructor(APIToken, baseURL) {
this.APIToken = APIToken;
this.fetch = fetch;
this.baseURL = baseURL;
}
get fetchConfiguration() {
const headers = {
Authorization: `Bearer ${this.APIToken}`
};
const configuration = {
me... | Add status code check for error handling | Add status code check for error handling
| JavaScript | mit | dbsystel/1BahnQL | ---
+++
@@ -1,45 +1,61 @@
-const fetch = require('node-fetch');
+const fetch = require("node-fetch");
class BaseLoader {
-
constructor(APIToken, baseURL) {
this.APIToken = APIToken;
- this.fetch = fetch
- this.baseURL = baseURL
+ this.fetch = fetch;
+ this.baseURL = baseURL;
}
get fetch... |
e12a57b8d5c005bbb4e7a4f4f98638aa70df3562 | web/static/js/components/game/header.js | web/static/js/components/game/header.js | import React, {PropTypes} from 'react';
export default class Header extends React.Component {
_renderContent() {
const { game } = this.props;
return (
<h1>Place your ships</h1>
);
}
render() {
return (
<header id="game_header">{::this._renderContent()}</header>
);
}
}
| import React, {PropTypes} from 'react';
export default class Header extends React.Component {
_renderContent() {
const { game } = this.props;
const title = this._titleText(game);
return (
<h1>{::this._titleText(game)}</h1>
);
}
_titleText(game) {
const { my_board, opponents_board } = ... | Set title depending on boards statuses | Set title depending on boards statuses
| JavaScript | mit | bigardone/phoenix-battleship,bigardone/phoenix-battleship | ---
+++
@@ -4,9 +4,22 @@
_renderContent() {
const { game } = this.props;
+ const title = this._titleText(game);
return (
- <h1>Place your ships</h1>
+ <h1>{::this._titleText(game)}</h1>
);
+ }
+
+ _titleText(game) {
+ const { my_board, opponents_board } = game;
+
+ if (!my_boa... |
f65d07bd4493f4af71e30722f496bbef8f37832c | src/js/utils/code-list-utils.js | src/js/utils/code-list-utils.js | export function nbCodesFromId(codeListById, id) {
return id ? nbCodes(codeListById[id]) : 0
}
function nbCodes({ isSpec, isLoaded, codes }) {
return isSpec && !isLoaded ? 10 : codes.length
} | /**
* Returns the number of code in a code list from its `id`
*
* For a code list specification, it returns `1`.
* If the `id` is not provided, it returns `1`.
*
* Explanations :
*
* For a code list specification which has not been loaded yet, we do not know
* the number of codes in the code list. We need this... | Use 1 as a default value for the number of codes in a code list | Use 1 as a default value for the number of codes in a code list
This number is used to build the right number of responses when serializing the questionnaire. If we work with a code list specification, It's not trivial to get this information: we need to load the code list specificaiton before serializing the question... | JavaScript | mit | Zenika/Pogues,Zenika/Pogues,InseeFr/Pogues,InseeFr/Pogues,InseeFr/Pogues,Zenika/Pogues | ---
+++
@@ -1,7 +1,48 @@
+/**
+ * Returns the number of code in a code list from its `id`
+ *
+ * For a code list specification, it returns `1`.
+ * If the `id` is not provided, it returns `1`.
+ *
+ * Explanations :
+ *
+ * For a code list specification which has not been loaded yet, we do not know
+ * the number of... |
1df6a847d47cee94cbc2c761a794521a66f2392c | src/block/selection.js | src/block/selection.js | define([], function() {
var saveSelection, restoreSelection;
if (window.getSelection && document.createRange) {
saveSelection = function(el) {
var sel = window.getSelection && window.getSelection();
if (sel && sel.rangeCount > 0) {
return sel.getRangeAt(0);
... | define([], function() {
var saveSelection, restoreSelection;
if (window.getSelection && document.createRange) {
saveSelection = function(el) {
var sel = window.getSelection && window.getSelection();
if (sel && sel.rangeCount > 0) {
return sel.getRangeAt(0);
... | Fix typo startContanier should be startContainer. | Fix typo startContanier should be startContainer.
| JavaScript | mit | mervick/emojionearea | ---
+++
@@ -25,7 +25,7 @@
restoreSelection = function(el, sel) {
var textRange = document.body.createTextRange();
textRange.moveToElementText(el);
- textRange.setStart(sel.startContanier, sel.startOffset);
+ textRange.setStart(sel.startContainer, sel.startOffse... |
97290f01c55a2426856d4c9fe095760bf2483e44 | src/components/Menu.js | src/components/Menu.js | import React from 'react';
import {
Link
} from 'react-router';
import './Menu.css';
import User from './User';
import language from '../language/language';
const menuLanguage = language.components.menu;
let Menu = React.createClass ({
getInitialState() {
return { showUser: false };
},
onClick(e) {
... | import React from 'react';
import {
Link
} from 'react-router';
import './Menu.css';
import User from './User';
import language from '../language/language';
const menuLanguage = language.components.menu;
let Menu = React.createClass ({
getInitialState() {
return { showUser: false };
},
toggleUser(e) {
... | Rename click handler function so it’s more explicit what it does | Rename click handler function so it’s more explicit what it does
| JavaScript | bsd-3-clause | jeromelachaud/Last.fm-Activities-React,jeromelachaud/Last.fm-Activities-React | ---
+++
@@ -14,7 +14,7 @@
return { showUser: false };
},
- onClick(e) {
+ toggleUser(e) {
e.preventDefault(e);
if (!this.state.showUser) {
this.setState({showUser : true});
@@ -55,7 +55,7 @@
<li>
<Link
className="Menu__item"
- onClick={t... |
bf7b3c5fb899a1f7b7fef673f691bf20cae94571 | src/main/resources/static/mp.js | src/main/resources/static/mp.js | angular.module('webapp').factory('mp', function($q, $rootScope, $timeout, host) {
var socket = new WebSocket("ws://" + host + ":8080/stomp");
var stompClient = Stomp.over(socket);
//stompClient.debug = angular.noop();
var connectedDeferred = $q.defer();
var connected = connectedDeferred.promise;
stompClient.co... | angular.module('webapp').factory('mp', function($q, $rootScope, $timeout, host) {
var socket = new WebSocket("ws://" + host + ":8080/stomp");
var stompClient = Stomp.over(socket);
stompClient.debug = angular.noop();
var connectedDeferred = $q.defer();
var connected = connectedDeferred.promise;
stompClient.conn... | Revert accidental commit of debug logging | Revert accidental commit of debug logging
| JavaScript | apache-2.0 | gillius/lunchbus,gillius/lunchbus | ---
+++
@@ -2,7 +2,7 @@
var socket = new WebSocket("ws://" + host + ":8080/stomp");
var stompClient = Stomp.over(socket);
- //stompClient.debug = angular.noop();
+ stompClient.debug = angular.noop();
var connectedDeferred = $q.defer();
var connected = connectedDeferred.promise; |
bd26a8c14f8f1f44a6ad745cf93af2a9898299e7 | src/main/webapp/scripts/main.js | src/main/webapp/scripts/main.js | $().ready(() => {
loadContentSection().then(() =>{
$("#loader").addClass("hide");
$("#real-body").removeClass("hide");
$("#real-body").addClass("body");
$(".keyword").click(function() {
$(this).addClass("active");
$(".base").hide(200);
$("#real-body").addClass("focus");
});
... | $().ready(() => {
loadContentSection().then(() =>{
$("#loader").addClass("hide");
$("#real-body").removeClass("hide");
$("#real-body").addClass("body");
$(".keyword").click(function() {
$(this).addClass("active");
$(".base").hide(200);
$("#real-body").addClass("focus");
$(".a... | Fix redirecting and back button bug | Fix redirecting and back button bug
| JavaScript | apache-2.0 | googleinterns/step36-2020,googleinterns/step36-2020,googleinterns/step36-2020 | ---
+++
@@ -8,6 +8,11 @@
$(this).addClass("active");
$(".base").hide(200);
$("#real-body").addClass("focus");
+ $(".active .item").click(function() {
+ $(".item").off("click");
+ const url = $(this).attr("data-url");
+ window.location.href = url;
+ });
});
... |
fe88f534341eabeff89313ae046a2be48043833f | client/src/components/NavBar.js | client/src/components/NavBar.js | import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { logoutUser } from '../../redux/actions';
const NavBar = ({ isAuthenticated, logoutUser }) => (
<ul className="navbar">
<li className="navbar__link"><Link to="/">Home</Link></li>
{ is... | import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { logoutUser } from '../../redux/actions';
const NavBar = ({ isAuthenticated, logoutUser }) => (
<ul className="navbar">
<li key={0} className="navbar__link"><Link to="/">Home</Link></li>
... | Fix React missing key iterator warning | Fix React missing key iterator warning
| JavaScript | mit | mbchoa/presence,mbchoa/presence | ---
+++
@@ -6,24 +6,24 @@
const NavBar = ({ isAuthenticated, logoutUser }) => (
<ul className="navbar">
- <li className="navbar__link"><Link to="/">Home</Link></li>
+ <li key={0} className="navbar__link"><Link to="/">Home</Link></li>
{ isAuthenticated &&
[
- ... |
942b75631721f83ac139bf08eb4712718630d552 | main.js | main.js | var STATUSES = {
UP: 0,
DOWN: 1
}
var mouseStatus = {
left: STATUSES.UP,
right: STATUSES.UP
}
var BUTTONS = {
LEFT: 1,
RIGHT: 3
};
document.onmousedown = function(event) {
if (event.which === BUTTONS.LEFT) {
mouseStatus.left = STATUSES.DOWN;
if (mouseStatus.right === STATUSES.DOWN) {
chrom... | var STATUSES = {
UP: 0,
DOWN: 1
}
var mouseStatus = {
left: STATUSES.UP,
right: STATUSES.UP
}
var BUTTONS = {
LEFT: 1,
RIGHT: 3
};
document.addEventListener('mousedown', function(event) {
if (event.which === BUTTONS.LEFT) {
mouseStatus.left = STATUSES.DOWN;
if (mouseStatus.right === STATUSES.DOW... | Use addEventListener instead of setting old onmouse* properties | Use addEventListener instead of setting old onmouse* properties
| JavaScript | isc | wendorf/mousetures,wendorf/mousetures | ---
+++
@@ -12,7 +12,7 @@
RIGHT: 3
};
-document.onmousedown = function(event) {
+document.addEventListener('mousedown', function(event) {
if (event.which === BUTTONS.LEFT) {
mouseStatus.left = STATUSES.DOWN;
if (mouseStatus.right === STATUSES.DOWN) {
@@ -31,22 +31,22 @@
});
}
}
-};
+... |
1b63df7382dea64feaa9d22ba415b141837277fc | main.js | main.js | define(['mathlive/mathlive'],
function(mLive) {
MathLive = mLive;
MathLive.renderMathInDocument();
TheActiveMathField = MathLive.makeMathField(
document.getElementById('mathEditorActive'),
{//commandbarToggle: 'hidden',
overrideDefaultInlineShortcuts: false,
onSelectionDidChange: Updat... | define(['mathlive/mathlive'],
function(mLive) {
MathLive = mLive;
MathLive.renderMathInDocument();
TheActiveMathField = MathLive.makeMathField(
document.getElementById('mathEditorActive'),
{commandbarToggle: 'hidden',
overrideDefaultInlineShortcuts: false,
onSelectionDidChange: UpdateP... | Add handler for cntl+backspace/delete to be a crossout | Add handler for cntl+backspace/delete to be a crossout
| JavaScript | mit | NSoiffer/ProceduralMathEditor,NSoiffer/ProceduralMathEditor | ---
+++
@@ -4,10 +4,11 @@
MathLive.renderMathInDocument();
TheActiveMathField = MathLive.makeMathField(
document.getElementById('mathEditorActive'),
- {//commandbarToggle: 'hidden',
+ {commandbarToggle: 'hidden',
overrideDefaultInlineShortcuts: false,
- onSelectionDidChange: UpdatePalette
+ o... |
e92ff29bd378db3d07fa389d9b950834234dbc61 | main.js | main.js | const {app, BrowserWindow} = require('electron')
const path = require('path')
const url = require('url')
let win
function createWindow () {
win = new BrowserWindow({width: 650, height: 450})
win.loadURL(url.format({
pathname: path.join(__dirname, 'public/index.html'),
protocol: 'file:',
slashes: true... | const {app, shell, BrowserWindow, Menu} = require('electron')
const path = require('path')
const url = require('url')
let win
process.env.PATH = `${process.env.PATH}:/usr/local/bin`
const menu = Menu.buildFromTemplate([
{
label: app.getName(),
submenu: [{
label: 'About',
click() {
shell... | Add menu to open dev tools | :wheelchair: Add menu to open dev tools
| JavaScript | apache-2.0 | jysperm/elecpass,jysperm/elecpass | ---
+++
@@ -1,10 +1,33 @@
-const {app, BrowserWindow} = require('electron')
+const {app, shell, BrowserWindow, Menu} = require('electron')
const path = require('path')
const url = require('url')
let win
+process.env.PATH = `${process.env.PATH}:/usr/local/bin`
+
+const menu = Menu.buildFromTemplate([
+ {
+ ... |
426fc75610582bbcfad0a8d1cac575e400419326 | lib/store.js | lib/store.js | var uuid = require('node-uuid');
var JSData = require('js-data');
var store;
var adapter;
var Report;
function error(msg) {
return new Promise(function(resolve, reject) {
return resolve({ error: msg });
});
}
function get(id) {
if (!id) return error('No id specified.');
if (!adapter) {
return new Pr... | var uuid = require('node-uuid');
var JSData = require('js-data');
var store;
var adapter;
var Report;
function error(msg) {
return new Promise(function(resolve, reject) {
return resolve({ error: msg });
});
}
function get(id) {
if (!id) return error('No id specified.');
if (!adapter) {
return new Pr... | Add more data to the report | Add more data to the report
| JavaScript | mit | zalmoxisus/remotedev-server,zalmoxisus/remotedev-server | ---
+++
@@ -31,7 +31,14 @@
var obj = {
id: uuid.v4(),
type: data.type,
- payload: data.payload
+ title: data.title,
+ description: data.description,
+ failed: data.failed,
+ payload: data.payload,
+ screen: data.screen,
+ user: data.user,
+ isLog: !!data.isLog,
+ added: Date.no... |
be3833211473eaa2f24e4f8ef20af9969d2bd0d0 | webpack.config.js | webpack.config.js | const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const path = require("path");
module.exports = {
mode: "development",
devtool: "inline-source-map",
entry: {
IntelliSearch: "./src/SearchClient.ts",
"IntelliSearch.min": "./src/SearchClient.ts"
},
output: {
path: pat... | const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const path = require("path");
module.exports = {
mode: "development",
devtool: "inline-source-map",
entry: {
IntelliSearch: "./src/SearchClient.ts",
"IntelliSearch.min": "./src/SearchClient.ts"
},
output: {
path: pat... | Remove comments and source-map from the minified version. | Remove comments and source-map from the minified version.
| JavaScript | mit | IntelliSearch/search-client,IntelliSearch/search-client | ---
+++
@@ -22,7 +22,8 @@
},
plugins: [
new UglifyJsPlugin({
- sourceMap: true,
+ sourceMap: false,
+ extractComments: true,
include: /\.min\.js$/
})
], |
68e3266af5daacee80d207b14ea123898c201b0b | webpack.config.js | webpack.config.js | var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
index: './src/main/index.js'
},
output: {
path: './target/out',
filename: '[name].js',
libraryTarget: 'commonjs'
},
externals: [
{
'react': true,
'react-dom': true
}
],
plugins:... | var path = require('path'),
ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
index: [
'./src/main/index.js',
'./src/main/index.less'
]
},
output: {
path: './target/out',
filename: '[name].js',
libraryTarget: 'commonjs'
},
externals: [... | Build styles apart from JS code | Build styles apart from JS code
| JavaScript | mit | smikhalevski/react-text-input,smikhalevski/react-text-input | ---
+++
@@ -1,8 +1,12 @@
-var ExtractTextPlugin = require('extract-text-webpack-plugin');
+var path = require('path'),
+ ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
- index: './src/main/index.js'
+ index: [
+ './src/main/index.js',
+ './src/main/ind... |
5113f6ac77db5315c9b311505f86a3dc1e627204 | fetch.js | fetch.js | const fs = require('fs');
const path = require('path');
const exec = require('child_process').exec;
const version = process.versions.v8;
const tmpfile = path.join(__dirname, version+'.flags.json');
if (!fs.existsSync(tmpfile)) {
exec('node --v8-options', function (execErr, result) {
var flags;
if (execErr) ... | const fs = require('fs');
const path = require('path');
const exec = require('child_process').exec;
const nodepath = process.env._;
const version = process.versions.v8;
const tmpfile = path.join(__dirname, version+'.flags.json');
if (!fs.existsSync(tmpfile)) {
exec(nodepath+' --v8-options', function (execErr, resul... | Use node path from process.env._ | Fix: Use node path from process.env._
| JavaScript | mit | tkellen/js-v8flags,js-cli/js-v8flags | ---
+++
@@ -2,11 +2,12 @@
const path = require('path');
const exec = require('child_process').exec;
+const nodepath = process.env._;
const version = process.versions.v8;
const tmpfile = path.join(__dirname, version+'.flags.json');
if (!fs.existsSync(tmpfile)) {
- exec('node --v8-options', function (execErr,... |
72a8fa47e9f43325b1eb78afda1abea84f79d3fb | jslib/controlNode.js | jslib/controlNode.js | // Modules
var http = require('http'),
urllib = require('url'),
RPCHandler = require('jsonrpc').RPCHandler,
scheduler = require('./schedulerRpcWrapper');
// Configuration
var cfg = require('config')('ControlNode', {
port: 46212,
address: "",
jsonRpcPath: "/jsonrpc",
debugRpc: false
});
// Local va... | // Modules
var http = require('http'),
urllib = require('url'),
RPCHandler = require('jsonrpc').RPCHandler,
scheduler = require('./schedulerRpcWrapper');
// Configuration
var cfg = require('config')('ControlNode', {
port: 46212,
address: "",
jsonRpcPath: "/jsonrpc",
debugRpc: false
});
// Local va... | Change version string in control node. | Change version string in control node.
| JavaScript | apache-2.0 | anthony-kolesov/kts46,anthony-kolesov/kts46,anthony-kolesov/kts46,anthony-kolesov/kts46 | ---
+++
@@ -13,8 +13,8 @@
});
// Local variables
-var version = "0.1.4"
- versionString = "ControlNode " + version + " on node.js";
+var version = "0.1.5",
+ versionString = ["ControlNode;v", version, ";node.js ", process.version].join("");
var schedulerWrapper = new scheduler.Wrapper(cfg.mongodbAddress)... |
1a55d508fdb0c9f3fc5bf9a74aea73ab922f287b | packages/core/lib/debug/compiler.js | packages/core/lib/debug/compiler.js | const { Compile } = require("@truffle/compile-solidity");
class DebugCompiler {
constructor(config) {
this.config = config;
}
async compile(sources = undefined) {
const compileConfig = this.config.with({ quiet: true });
const { compilations } = sources
? await Compile.sources({ sources, optio... | const { Compile } = require("@truffle/compile-solidity");
const WorkflowCompile = require("@truffle/workflow-compile");
class DebugCompiler {
constructor(config) {
this.config = config;
}
async compile(sources = undefined) {
const compileConfig = this.config.with({ quiet: true });
const { compilati... | Allow CLI debugger to compile non-Solidity sources | Allow CLI debugger to compile non-Solidity sources
| JavaScript | mit | ConsenSys/truffle | ---
+++
@@ -1,4 +1,5 @@
const { Compile } = require("@truffle/compile-solidity");
+const WorkflowCompile = require("@truffle/workflow-compile");
class DebugCompiler {
constructor(config) {
@@ -10,7 +11,10 @@
const { compilations } = sources
? await Compile.sources({ sources, options: compileConfi... |
ca7e4f4c5d6ba470b557e87c47b7f298ce40437e | audio_channel.js | audio_channel.js | var AudioChannel = function(args) {
this.context = AudioContext ? new AudioContext() : new webkitAudioContext();
this.oscill = this.context.createOscillator();
this.gain = this.context.createGain();
if(args) {
this.frequency = args.freq ? args.freq : 220;
this.wave = args.wave ? args.wave : "triangle";... | var AudioChannel = function(args) {
this.context = AudioContext ? new AudioContext() : new webkitAudioContext();
this.oscill = this.context.createOscillator();
this.gain = this.context.createGain();
var args = args ? args : {};
this.frequency = args.freq ? args.freq : 220;
this.wave = args.wave ? args.wav... | Update AudioChannel.playSong to use noteToFreq | Update AudioChannel.playSong to use noteToFreq
| JavaScript | mit | peternatewood/pac-man-replica,peternatewood/pac-man-replica | ---
+++
@@ -3,11 +3,11 @@
this.oscill = this.context.createOscillator();
this.gain = this.context.createGain();
- if(args) {
- this.frequency = args.freq ? args.freq : 220;
- this.wave = args.wave ? args.wave : "triangle";
- this.volume = args.gain ? args.gain : 0.05;
- }
+ var args = args ? args ... |
b44662de07df147bc64fb439db554f5d045cbb5e | api/models/Image.js | api/models/Image.js | /**
* Image.js
*
* @description :: This represents a product image with file paths for different variations (original, thumb, ...).
* @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models
*/
module.exports = {
attributes: {
width: {
type: 'integer',
min: 0
},
... | /**
* Image.js
*
* @description :: This represents a product image with file paths for different variations (original, thumb, ...).
* @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models
*/
module.exports = {
attributes: {
width: {
type: 'integer',
min: 0
},
... | Fix bug where images could not be created | Fix bug where images could not be created
| JavaScript | mit | joschaefer/online-shop-api | ---
+++
@@ -63,10 +63,19 @@
beforeUpdate: function (values, next) {
+ if (obj.thumb && obj.thumb.indexOf('http') === 0) {
+ delete obj.thumb;
+ }
+
+ if (obj.medium && obj.medium.indexOf('http') === 0) {
+ delete obj.medium;
+ }
+
+ if (obj.large && obj.large.indexOf('http') === 0) {
+... |
1eede171c8f8d0d8e141832414d258708fac9579 | lib/index.js | lib/index.js | "use strict";
function createDefaultFormatter() {
return function defaultFormatter(ctx, errors) {
ctx.body = {};
if (errors && errors.length) {
ctx.status = 500;
if (errors.length === 1) {
ctx.status = errors[0].status;
}
ctx.body['ok'] = 0;
ctx.body['status'] = ctx.stat... | "use strict";
function createDefaultFormatter() {
return function defaultFormatter(ctx, errors) {
ctx.body = {};
if (errors && errors.length) {
ctx.status = 500;
if (errors.length === 1) {
ctx.status = errors[0].status || ctx.status;
}
ctx.body['ok'] = 0;
ctx.body['statu... | Add status fallback when an error does not expose one | Add status fallback when an error does not expose one
| JavaScript | mit | njakob/koa-formatter | ---
+++
@@ -6,7 +6,7 @@
if (errors && errors.length) {
ctx.status = 500;
if (errors.length === 1) {
- ctx.status = errors[0].status;
+ ctx.status = errors[0].status || ctx.status;
}
ctx.body['ok'] = 0;
ctx.body['status'] = ctx.status; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.