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 |
|---|---|---|---|---|---|---|---|---|---|---|
26a2a896c5333e286e16619bc8c9d268d30a814f | ruby_event_store-browser/elm/tailwind.config.js | ruby_event_store-browser/elm/tailwind.config.js | module.exports = {
theme: {
extend: {}
},
variants: {},
plugins: []
}
| module.exports = {
purge: ['./src/style/style.css'],
theme: {
extend: {}
},
variants: {},
plugins: []
}
| Purge tailwindcss classes not mentioned in apply | Purge tailwindcss classes not mentioned in apply
[#867]
| JavaScript | mit | arkency/rails_event_store,arkency/rails_event_store,RailsEventStore/rails_event_store,RailsEventStore/rails_event_store,RailsEventStore/rails_event_store,arkency/rails_event_store,arkency/rails_event_store,RailsEventStore/rails_event_store | ---
+++
@@ -1,4 +1,5 @@
module.exports = {
+ purge: ['./src/style/style.css'],
theme: {
extend: {}
}, |
b99b971210da9951ff468519bd1066a68d885c78 | server/config/middleware.js | server/config/middleware.js | var bodyParser = require('body-parser');
var db = require('../models/index');
module.exports = function (app, express) {
//Handle CORS
app.use(function(req, res, next) {
res.header('Access-Control-Allow-Origin', 'http://localhost:3000/');
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OP... | var bodyParser = require('body-parser');
var db = require('../models/index');
module.exports = function (app, express) {
//Handle CORS
app.use(function(req, res, next) {
res.header('Access-Control-Allow-Origin', 'http://localhost:3000/');
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OP... | Update static file directory to /public subfolder | Update static file directory to /public subfolder
| JavaScript | mit | benjaminhoffman/Encompass,benjaminhoffman/Encompass,benjaminhoffman/Encompass | ---
+++
@@ -13,7 +13,7 @@
//Serve up static files in client folder and other middleware
app.use(bodyParser.json());
- app.use(express.static(__dirname + '/../../client'));
+ app.use(express.static(__dirname + '/../../client/public'));
//For debugging. Log every request
app.use(function (req, res, ne... |
39fb8e8ef10506fb4ae401d2de1c6ef0e27086f0 | regulations/static/regulations/js/source/models/preamble-model.js | regulations/static/regulations/js/source/models/preamble-model.js | 'use strict';
var URI = require('urijs');
var _ = require('underscore');
var Backbone = require('backbone');
var MetaModel = require('./meta-model');
Backbone.PreambleModel = MetaModel.extend({
getAJAXUrl: function(id) {
var path = ['preamble'].concat(id.split('-'));
if (window.APP_PREFIX) {
path = [w... | 'use strict';
var URI = require('urijs');
var _ = require('underscore');
var Backbone = require('backbone');
var MetaModel = require('./meta-model');
Backbone.PreambleModel = MetaModel.extend({
getAJAXUrl: function(id) {
// window.APP_PREFIX always ends in a slash
var path = [window.APP_PREFIX + 'preamble']... | Fix logic around AJAXing in preamble sections | Fix logic around AJAXing in preamble sections
| JavaScript | cc0-1.0 | eregs/regulations-site,tadhg-ohiggins/regulations-site,tadhg-ohiggins/regulations-site,eregs/regulations-site,18F/regulations-site,18F/regulations-site,18F/regulations-site,18F/regulations-site,tadhg-ohiggins/regulations-site,eregs/regulations-site,eregs/regulations-site,tadhg-ohiggins/regulations-site | ---
+++
@@ -7,10 +7,8 @@
Backbone.PreambleModel = MetaModel.extend({
getAJAXUrl: function(id) {
- var path = ['preamble'].concat(id.split('-'));
- if (window.APP_PREFIX) {
- path = [window.APP_PREFIX].concat(path);
- }
+ // window.APP_PREFIX always ends in a slash
+ var path = [window.APP_PR... |
beef2838049f4d14fecd18ec19d8bc1ea183a036 | lib/validate-admin.js | lib/validate-admin.js | /**
* Middleware that only allows users to pass that have their isAdmin flag set.
*/
function validateToken (req, res, next) {
const user = req.decoded
if (!user.isAdmin) {
res.status(403).json({ success: false, message: `Permission denied: ${JSON.stringify(user.sub)}` })
return
}
next()
}
module.ex... | /**
* Middleware that only allows users to pass that have their isAdmin flag set.
*/
function validateAdmin (req, res, next) {
const user = req.decoded
if (!user.isAdmin) {
res.status(403).json({ success: false, message: `Permission denied: ${JSON.stringify(user.sub)}` })
return
}
next()
}
module.ex... | Rename module's function to reflect module name. | Rename module's function to reflect module name.
| JavaScript | agpl-3.0 | amos-ws16/amos-ws16-arrowjs-server,amos-ws16/amos-ws16-arrowjs-server | ---
+++
@@ -1,7 +1,7 @@
/**
* Middleware that only allows users to pass that have their isAdmin flag set.
*/
-function validateToken (req, res, next) {
+function validateAdmin (req, res, next) {
const user = req.decoded
if (!user.isAdmin) {
res.status(403).json({ success: false, message: `Permission d... |
1291e59bbf295918de6bcfc430d766717f46f5fa | stories/tab.js | stories/tab.js | import React from 'react'
import { storiesOf } from '@storybook/react'
import { action } from '@storybook/addon-actions'
import Tab from 'components/Tab/Tab'
import DraggableTab from 'components/Tab/DraggableTab'
import Icon from 'components/Tab/Icon'
import store from '../.storybook/mock-store'
const { tabs } = store... | import React from 'react'
import { storiesOf } from '@storybook/react'
import { action } from '@storybook/addon-actions'
import Tab from 'components/Tab/Tab'
import DraggableTab from 'components/Tab/DraggableTab'
import Icon from 'components/Tab/Icon'
import windows from '../.storybook/windows'
const tabs = [].concat(... | Fix story bug for Tab | Fix story bug for Tab
| JavaScript | mit | xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2 | ---
+++
@@ -4,9 +4,9 @@
import Tab from 'components/Tab/Tab'
import DraggableTab from 'components/Tab/DraggableTab'
import Icon from 'components/Tab/Icon'
-import store from '../.storybook/mock-store'
+import windows from '../.storybook/windows'
-const { tabs } = store.windowStore
+const tabs = [].concat(...wind... |
05864ed7dd4cf0cf8a0c19ba8c37bc73afb600c3 | build/builder-config.js | build/builder-config.js | /**
* Copyright (c) Ajay Sreedhar. All rights reserved.
*
* Licensed under the MIT License.
* Please see LICENSE file located in the project root for more information.
*/
'use strict';
const releaseConfig = {
appId: 'com.kongdash',
productName: 'KongDash',
copyright: 'Copyright (c) 2022 Ajay Sreedhar... | /**
* Copyright (c) Ajay Sreedhar. All rights reserved.
*
* Licensed under the MIT License.
* Please see LICENSE file located in the project root for more information.
*/
'use strict';
const releaseConfig = {
appId: 'com.kongdash',
productName: 'KongDash',
copyright: 'Copyright (c) 2022 Ajay Sreedhar... | Rename release directory name to Out | change: Rename release directory name to Out
| JavaScript | mit | ajaysreedhar/kongdash,ajaysreedhar/kongdash,ajaysreedhar/kongdash | ---
+++
@@ -18,17 +18,17 @@
buildDependenciesFromSource: false,
files: [
{
- from: 'dist/platform',
+ from: 'out/platform',
to: 'platform'
},
{
- from: 'dist/workbench',
+ from: 'out/workbench',
to: 'workbench'
... |
a77cae24fb8e0560d2e2bc86f6c08a62b7b36d9d | packages/basic-component-mixins/test/ShadowTemplate.tests.js | packages/basic-component-mixins/test/ShadowTemplate.tests.js | import { assert } from 'chai';
import ShadowTemplate from '../src/ShadowTemplate';
window.MyElement = class MyElement extends HTMLElement {
greet() {
return `Hello!`;
}
};
customElements.define('my-element', MyElement);
/* Element with a simple template */
class ElementWithStringTemplate extends ShadowTempla... | import { assert } from 'chai';
import ShadowTemplate from '../src/ShadowTemplate';
class MyElement extends HTMLElement {
greet() {
return `Hello!`;
}
}
customElements.define('my-element', MyElement);
/* Element with a simple template */
class ElementWithStringTemplate extends ShadowTemplate(HTMLElement) {
... | Remove global reference intended only for debugging. | Remove global reference intended only for debugging.
| JavaScript | mit | rlugojr/basic-web-components,basic-web-components/basic-web-components,basic-web-components/basic-web-components,rlugojr/basic-web-components | ---
+++
@@ -2,11 +2,11 @@
import ShadowTemplate from '../src/ShadowTemplate';
-window.MyElement = class MyElement extends HTMLElement {
+class MyElement extends HTMLElement {
greet() {
return `Hello!`;
}
-};
+}
customElements.define('my-element', MyElement);
/* Element with a simple template */ |
f9cb778aee192923d927d8f1cd2921e235485128 | packages/idyll-components/src/map.js | packages/idyll-components/src/map.js | const React = require('react');
const { mapChildren } = require('idyll-component-children');
import TextContainer from './text-container';
class Map extends React.Component {
render() {
const {
idyll,
hasError,
updateProps,
children,
value,
currentValue
} = this.props;
... | const React = require('react');
const { mapChildren } = require('idyll-component-children');
import TextContainer from './text-container';
class Map extends React.Component {
render() {
const { children, value, currentValue } = this.props;
if (children) {
return mapChildren(children, child => {
... | Update Map Component: remove TextContainer | Update Map Component: remove TextContainer
| JavaScript | mit | idyll-lang/idyll,idyll-lang/idyll | ---
+++
@@ -4,14 +4,7 @@
class Map extends React.Component {
render() {
- const {
- idyll,
- hasError,
- updateProps,
- children,
- value,
- currentValue
- } = this.props;
+ const { children, value, currentValue } = this.props;
if (children) {
return mapChild... |
f3865e87a30c9c93709a2e558e2e1de3c7712df8 | src/app/consumer/phantomrunner.js | src/app/consumer/phantomrunner.js | /**
* @fileoverview Run phantom bootstrapper jobs
* Spawns a child process to run the phantomjs job, with a callback on
* completion
*/
var childProcess = require('child_process'),
phantomjs = require('phantomjs'),
binPath = phantomjs.path,
config = require('../../config');
// Host mapping of environm... | /**
* @fileoverview Run phantom bootstrapper jobs
* Spawns a child process to run the phantomjs job, with a callback on
* completion
*/
var childProcess = require('child_process'),
phantomjs = require('phantomjs'),
binPath = phantomjs.path,
config = require('../../config');
// Host mapping of environm... | Add optional arguments to improve phantomjs rendering perf. | Add optional arguments to improve phantomjs rendering perf.
disk-cache=true will enable disk cache.
load-images=false will prevent phantomjs from having to wait for
slow image servers / cdns to be ready.
| JavaScript | mit | Livefyre/lfbshtml,Livefyre/lfbshtml,Livefyre/lfbshtml | ---
+++
@@ -25,13 +25,16 @@
data.host = (hostMap[config.environment.type] || 'zor') + '.livefyre.com';
var childArgs = [
+ '--load-images=false',
+ '--disk-cache=true',
__dirname + '/../../phantom/bootstrapper.js',
type,
encodeURIComponent(JSON.stringify(data))
... |
c09f44c763b69b86ec323bc0c7fb7506d47e9e34 | lib/io.js | lib/io.js | (function() {
'use strict';
this.IO = {
load: function(url, async) {
if (async) {
return this.loadAsync(url);
}
return this.loadSync(url);
},
loadAsync: function(url) {
var deferred = when.defer();
var xhr = new XMLHttpRequest();
xhr.overrideMimeType('text/p... | (function() {
'use strict';
this.IO = {
load: function(url, async) {
var deferred = when.defer();
var xhr = new XMLHttpRequest();
xhr.overrideMimeType('text/plain');
xhr.addEventListener('load', function() {
if (xhr.status == 200) {
deferred.resolve(xhr.responseText);
... | Simplify IO and fix the s/defer/deferred/ typo | Simplify IO and fix the s/defer/deferred/ typo
| JavaScript | apache-2.0 | zbraniecki/fluent.js,zbraniecki/fluent.js,projectfluent/fluent.js,mail-apps/l20n.js,projectfluent/fluent.js,Pike/l20n.js,l20n/l20n.js,mail-apps/l20n.js,projectfluent/fluent.js,stasm/l20n.js,Swaven/l20n.js,Pike/l20n.js,zbraniecki/l20n.js | ---
+++
@@ -3,12 +3,6 @@
this.IO = {
load: function(url, async) {
- if (async) {
- return this.loadAsync(url);
- }
- return this.loadSync(url);
- },
- loadAsync: function(url) {
var deferred = when.defer();
var xhr = new XMLHttpRequest();
xhr.overrideMimeTyp... |
490e5c6f3847ea49163e788bf25a3e808f45199f | src/server/modules/user/index.js | src/server/modules/user/index.js | import jwt from 'jsonwebtoken';
// Components
import UserDAO from './sql';
import schema from './schema.graphqls';
import createResolvers from './resolvers';
import { refreshTokens } from './auth';
import tokenMiddleware from './token';
import Feature from '../connector';
const SECRET = 'secret, change for productio... | import jwt from 'jsonwebtoken';
// Components
import UserDAO from './sql';
import schema from './schema.graphqls';
import createResolvers from './resolvers';
import { refreshTokens } from './auth';
import tokenMiddleware from './token';
import Feature from '../connector';
const SECRET = 'secret, change for productio... | Handle another corner case where refreshToken is undefined | Handle another corner case where refreshToken is undefined
| JavaScript | mit | sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit | ---
+++
@@ -22,7 +22,8 @@
if (
connectionParams &&
connectionParams.token &&
- connectionParams.token !== 'null'
+ connectionParams.token !== 'null' &&
+ connectionParams.token !== 'undefined'
) {
try {
const { user } = jwt.verify(connectionParams.token, SECRET); |
5601159d3578b952adeda6c7f87beefc86976724 | site/webpack.mix.js | site/webpack.mix.js | let argv = require('yargs').argv;
let command = require('node-cmd');
let jigsaw = require('./tasks/bin');
let mix = require('laravel-mix');
let AfterBuild = require('on-build-webpack');
let BrowserSync = require('browser-sync');
let BrowserSyncPlugin = require('browser-sync-webpack-plugin');
let Watch = require('webpa... | let argv = require('yargs').argv;
let command = require('node-cmd');
let jigsaw = require('./tasks/bin');
let mix = require('laravel-mix');
let AfterBuild = require('on-build-webpack');
let BrowserSync = require('browser-sync');
let BrowserSyncPlugin = require('browser-sync-webpack-plugin');
let Watch = require('webpa... | Allow webpack errors to be displayed (suppress browserSyncInstance.reload) | Allow webpack errors to be displayed (suppress browserSyncInstance.reload)
| JavaScript | mit | adamwathan/jigsaw,tightenco/jigsaw,tightenco/jigsaw,adamwathan/jigsaw,tightenco/jigsaw | ---
+++
@@ -18,7 +18,10 @@
new AfterBuild(() => {
command.get(jigsaw.path() + ' build ' + env, (error, stdout, stderr) => {
console.log(error ? stderr : stdout);
- browserSyncInstance.reload();
+
+ if (browserSyncInstance) {
+ browserSyncInstance.reload(... |
01955d0e5f99f71043ceb01a43a4888ff53565fe | packages/testing-utils/jest.config.js | packages/testing-utils/jest.config.js | const lernaAliases = require('lerna-alias').jest()
module.exports = {
testEnvironment: 'node',
moduleNameMapper: Object.assign(lernaAliases, {
'^redux-saga/effects$': lernaAliases['^redux-saga$'].replace(/index\.js$/, 'effects.js'),
}),
transform: {
'.js$': __dirname + '/babel-transformer.jest.js',
}... | const lernaAliases = require('lerna-alias').jest()
module.exports = {
testEnvironment: 'node',
moduleNameMapper: Object.assign(lernaAliases, {
'^redux-saga/effects$': lernaAliases['^redux-saga$'].replace(/index\.js$/, 'effects.js'),
'^@redux-saga/core/effects$': lernaAliases['^@redux-saga/core$'].replace(/... | Fix lerna alias in testing-utils | Fix lerna alias in testing-utils
| JavaScript | mit | yelouafi/redux-saga,yelouafi/redux-saga,redux-saga/redux-saga,redux-saga/redux-saga | ---
+++
@@ -4,6 +4,7 @@
testEnvironment: 'node',
moduleNameMapper: Object.assign(lernaAliases, {
'^redux-saga/effects$': lernaAliases['^redux-saga$'].replace(/index\.js$/, 'effects.js'),
+ '^@redux-saga/core/effects$': lernaAliases['^@redux-saga/core$'].replace(/index\.js$/, 'effects.js'),
}),
tra... |
036bbbe213ce0a80b56fc6448a86fdb49bf4ed55 | src/components/home/Team/index.js | src/components/home/Team/index.js | import React from "react"
import { StaticQuery, graphql } from "gatsby"
import Member from "./Member"
import "./index.module.css"
const Team = ({ members }) => (
<ul styleName="root">
{members.map((data, index) => (
<li key={index} styleName="member">
<Member {...data} />
</li>
))}
</... | import React from "react"
import { StaticQuery, graphql } from "gatsby"
import Member from "./Member"
import "./index.module.css"
const Team = ({ members }) => (
<ul styleName="root">
{members.map((data, index) => (
<li key={index}>
<Member {...data} />
</li>
))}
</ul>
)
export defau... | Fix Team component (missing style) | Fix Team component (missing style)
| JavaScript | mit | subvisual/subvisual.co,subvisual/subvisual.co | ---
+++
@@ -8,7 +8,7 @@
const Team = ({ members }) => (
<ul styleName="root">
{members.map((data, index) => (
- <li key={index} styleName="member">
+ <li key={index}>
<Member {...data} />
</li>
))} |
02896d4a839c87d319101023df1862b16e95f3fd | endpoints/hljomaholl/tests/integration_test.js | endpoints/hljomaholl/tests/integration_test.js | var request = require('request');
var assert = require('assert');
var helpers = require('../../../lib/test_helpers.js');
describe('hljomaholl', function() {
// The only thing that changes is the form attribute, so why not just re-use the object
var fieldsToCheckFor = [
'date', 'time', 'image', 'title', 'descri... | var request = require('request');
var assert = require('assert');
var helpers = require('../../../lib/test_helpers.js');
describe('hljomaholl', function() {
// The only thing that changes is the form attribute, so why not just re-use the object
var fieldsToCheckFor = [
'date', 'time', 'image', 'title', 'descri... | Allow hljomaholl results to be empty | Allow hljomaholl results to be empty
| JavaScript | mit | apis-is/apis | ---
+++
@@ -12,7 +12,7 @@
it ('should return an array of items with correct fields', function(done) {
var params = helpers.testRequestParams('/hljomaholl');
var resultHandler = helpers.testRequestHandlerForFields(
- done, fieldsToCheckFor, null
+ done, fieldsToCheckFor, null, true
);
... |
d694448e175c3c92d9f8ace88aa2c369026aa5bb | test/routes.js | test/routes.js | import mockReq from 'mock-require';
import chai from 'chai';
import { shallow } from 'enzyme';
import Match from 'react-router/Match';
chai.should();
global.OKAPI_URL = 'http://localhost:9130';
mockReq('stripes-loader!', { modules: {
app: [ {
displayName: 'someApp',
module: 'some-app',
getModule: () =... | import mockReq from 'mock-require';
import chai from 'chai';
import { shallow } from 'enzyme';
import Match from 'react-router/Match';
chai.should();
global.OKAPI_URL = 'http://localhost:9130';
mockReq('stripes-loader', { modules: {
app: [ {
displayName: 'someApp',
module: 'some-app',
getModule: () =>... | Update test to mock stripes-loader alias | Update test to mock stripes-loader alias
| JavaScript | apache-2.0 | folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core | ---
+++
@@ -8,7 +8,7 @@
global.OKAPI_URL = 'http://localhost:9130';
-mockReq('stripes-loader!', { modules: {
+mockReq('stripes-loader', { modules: {
app: [ {
displayName: 'someApp',
module: 'some-app', |
b339dc9664ace02351c981e9d05c20851aa165a9 | src/Button/index.js | src/Button/index.js | import React, { PropTypes } from 'react';
import styles from './Button.css';
const Button = (props) => {
const classNames = [styles.Button];
if (props.state) {
classNames.push(styles[`Button--state-${props.state}`]);
}
if (props.type) {
classNames.push(styles[`Button--type-${props.type}`]);
}
retur... | import React, { PropTypes } from 'react';
import styles from './Button.css';
const Button = (props) => {
const classNames = [styles.Button];
if (props.state) {
classNames.push(styles[`Button--state-${props.state}`]);
}
if (props.type) {
classNames.push(styles[`Button--type-${props.type}`]);
}
retur... | Extend props for handlers like onClick | Extend props for handlers like onClick
| JavaScript | mit | bufferapp/buffer-components,bufferapp/buffer-components | ---
+++
@@ -10,7 +10,7 @@
classNames.push(styles[`Button--type-${props.type}`]);
}
return (
- <button className={classNames.join(' ')}>
+ <button className={classNames.join(' ')} {...props}>
{props.children}
</button>
); |
513024b1add009b895acd5e12f60094f95fb14a7 | example/drummer/src/historyComponent/reduce.js | example/drummer/src/historyComponent/reduce.js | const way = require('senseway');
const historyDeleteFrame = (hist, t) => {
const newHist = way.clone(hist);
newHist.map((ch) => {
return ch.splice(t, 1);
});
return newHist;
};
const historyDuplicateFrame = (hist, t) => {
const newHist = way.clone(hist);
newHist.map((ch, i) => {
const cellValue = ... | const way = require('senseway');
module.exports = (model, ev) => {
switch (ev.type) {
case 'DELETE_HISTORY_CHANNEL': {
return Object.assign({}, model, {
history: way.dropChannel(model.history, ev.channel),
});
}
case 'DELETE_HISTORY_FRAME': {
return Object.assign({}, model, {
... | Use way.repeatAt .repeatChannel .dropChannel .dropAt .set | Use way.repeatAt .repeatChannel .dropChannel .dropAt .set
| JavaScript | mit | axelpale/lately,axelpale/lately | ---
+++
@@ -1,62 +1,35 @@
const way = require('senseway');
-
-const historyDeleteFrame = (hist, t) => {
- const newHist = way.clone(hist);
- newHist.map((ch) => {
- return ch.splice(t, 1);
- });
- return newHist;
-};
-
-const historyDuplicateFrame = (hist, t) => {
- const newHist = way.clone(hist);
- newHis... |
a9bf8a35794c94c6033f102b500ea10e78755513 | client/js/decompress.js | client/js/decompress.js | const continuationBit = 1 << 7;
const lowBitsMask = ~continuationBit & 0xff;
/**
* @template {ArrayBufferView} T
*
* @param {ReadableStream<Uint8Array>} stream
* @param {number} length of the returned ArrayBufferView
* @param {new (length: number) => T} Type
*
* @returns {T}
*/
export async function decompress... | const continuationBit = 1 << 7;
const lowBitsMask = ~continuationBit & 0xff;
/**
* Consume a readable stream of unsigned LEB128 encoded bytes, writing the
* results into the provided buffer
*
* @template {ArrayBufferView} T
* @param {ReadableStream<Uint8Array>} stream A stream of concatenated unsigned
* LEB128 e... | Bring your own buffer for leb128 | Bring your own buffer for leb128
| JavaScript | mit | Alexendoo/utf,Alexendoo/utf,Alexendoo/utf,Alexendoo/utf | ---
+++
@@ -2,19 +2,19 @@
const lowBitsMask = ~continuationBit & 0xff;
/**
+ * Consume a readable stream of unsigned LEB128 encoded bytes, writing the
+ * results into the provided buffer
+ *
* @template {ArrayBufferView} T
- *
- * @param {ReadableStream<Uint8Array>} stream
- * @param {number} length of the ret... |
7b1d235f444dc3edb8ac53bd8de3396e66a9b418 | RcmBrightCoveLib/public/keep-aspect-ratio.js | RcmBrightCoveLib/public/keep-aspect-ratio.js | /**
* This script keeps the height set on elements with regard to their
* width for a given aspect ratio. Great for "display:block" elements
*
* Example usage:
*
* <div data-keep-aspect-ratio="16:9">
*
* Author: Rod McNew
* License: BSD
*/
new function () {
var setHeights = function () {
$.each($(... | /**
* This script keeps the height set on elements with regard to their
* width for a given aspect ratio. Great for "display:block" elements
*
* Example usage:
*
* <div data-keep-aspect-ratio="16:9">
*
* Author: Rod McNew
* License: BSD
*/
new function () {
var setHeights = function () {
$.each($(... | Fix for brightcove player when orintation is changed | Fix for brightcove player when orintation is changed
| JavaScript | bsd-3-clause | innaDa/RcmPlugins,jerv13/RcmPlugins,bjanish/RcmPlugins,bjanish/RcmPlugins,innaDa/RcmPlugins,jerv13/RcmPlugins,bjanish/RcmPlugins,jerv13/RcmPlugins,innaDa/RcmPlugins | ---
+++
@@ -19,13 +19,22 @@
var width = ele.width();
var newHeight = width * ratioHeight / ratioWidth;
ele.css('height', newHeight);
+ ele.css('overflow', 'hidden');
+
+ ele.find("iframe").height(newHeight).width(width);
+ setTimeout(function() {... |
c75e162718129ce1038442dabd81f4915a238c53 | src/is/isArrayLike/isArrayLike.js | src/is/isArrayLike/isArrayLike.js | /**
* Checks if value is array-like.
* A value is considered array-like if it’s not a function and has a `value.length` that’s an
* integer greater than or equal to 0 and less than or equal to `Number.MAX_SAFE_INTEGER`.
* @param {*} value The value to check.
* @return {Boolean} Returns true if value is array-like,... | /**
* Checks if value is array-like.
* A value is considered array-like if it’s not a function and has a `value.length` that’s an
* integer greater than or equal to 0 and less than or equal to `Number.MAX_SAFE_INTEGER`.
* @param {*} value The value to check.
* @return {Boolean} Returns true if value is array-like,... | Fix issue that would cause a falsey value like 0 to pass the tests | [ci-skip] Fix issue that would cause a falsey value like 0 to pass the tests
| JavaScript | mit | georapbox/smallsJS,georapbox/smallsJS,georapbox/jsEssentials | ---
+++
@@ -9,7 +9,7 @@
'use strict';
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1,
- len = value && value.length;
+ len = !!value && value.length;
return value != null && typeof value !== 'function' &&
typeof len === 'number' && len > -1 && len % 1 =... |
fd57b24f7d186220436d779200d582856570f966 | src/js/lib/monetary/formatting.js | src/js/lib/monetary/formatting.js | define(function () {
return {
/**
* Format monetary to standard format with ISO 4217 code.
*/
format: function (m) {
if (m.isInvalid()) {
return "Invalid monetary!";
}
return m.currency() + " " + m.amount();
}
};
});
| define(function () {
return {
/**
* Format monetary to standard format with ISO 4217 code.
*/
format: function (m) {
if (m.isInvalid()) {
return "Invalid monetary!";
}
return m.currency() + " " + m.amount().toFixed(2);
}
};
});
| Add temporary monetary rounding fix | Add temporary monetary rounding fix
| JavaScript | mit | davidknezic/bitcoin-trade-guard | ---
+++
@@ -9,7 +9,7 @@
return "Invalid monetary!";
}
- return m.currency() + " " + m.amount();
+ return m.currency() + " " + m.amount().toFixed(2);
}
};
}); |
684fe7ced5ac9a43adb7c6f4f1698327c2a3a521 | src/common/index.js | src/common/index.js | // We faced a bug in babel so that transform-runtime with export * from 'x' generates import statements in transpiled code
// Tracked here : https://github.com/babel/babel/issues/2877
// We tested the workaround given here https://github.com/babel/babel/issues/2877#issuecomment-270700000 with success so far
import _... | // We faced a bug in babel so that transform-runtime with export * from 'x' generates import statements in transpiled code
// Tracked here : https://github.com/babel/babel/issues/2877
// We tested the workaround given here https://github.com/babel/babel/issues/2877#issuecomment-270700000 with success so far
import _... | Make buildUrl return a non-encoded url by default | Make buildUrl return a non-encoded url by default
| JavaScript | mit | kalisio/kCore | ---
+++
@@ -15,11 +15,16 @@
return `${baseUrl}${prefix}${parameter}=${Array.isArray(value) ? JSON.stringify(value) : value}`
}
-// Build an encoded URL from a given set of parameters
+// Build an URL from a given set of parameters
export function buildUrl(baseUrl, parameters) {
let url = baseUrl
_.forOwn... |
d58636faa24ace56822cda4254a1b765935ac3fe | test/client/ui-saucelabs.conf.js | test/client/ui-saucelabs.conf.js | exports.config = {
specs: ['ui/**/*.spec.js'],
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY,
baseUrl: 'http://localhost:3000',
capabilities: {
'browserName': 'chrome',
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
'build': process.env.TRAVIS_B... | exports.config = {
specs: ['ui/**/*.spec.js'],
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY,
baseUrl: 'http://localhost:3000',
capabilities: {
'browserName': 'firefox',
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
'build': process.env.TRAVIS_... | Correct commands are sent to Saucelabs, but they are misinterpreted. Maybe the Firefox driver works better? | Correct commands are sent to Saucelabs, but they are misinterpreted. Maybe the Firefox driver works better?
| JavaScript | mit | agilejs/2015-06-team-3,agilejs/2015-06-team-1,agilejs/2015-04-team-1,agilejs/2015-06-team-4,agilejs/2015-06-team-6,agilejs/2015-06-team-5,agilejs/2015-04-team-1,agilejs/2014-10-Dinatriumdihydrogendiphosphat,agilejs/2015-06-team-3,agilejs/2015-06-team-2,agilejs/2014-10-typesafe,agilejs/2014-10-floppy,agilejs/2015-06-tea... | ---
+++
@@ -4,7 +4,7 @@
sauceKey: process.env.SAUCE_ACCESS_KEY,
baseUrl: 'http://localhost:3000',
capabilities: {
- 'browserName': 'chrome',
+ 'browserName': 'firefox',
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
'build': process.env.TRAVIS_BUILD_NUMBER,
'name': '... |
b51c70f2afce34680298088182bb92c7e26b7420 | configs/knexfile.js | configs/knexfile.js | const path = require('path');
module.exports = {
development: {
client: 'pg',
connection: 'postgres://localhost/envelopresent',
migrations: {
directory: path.join(__dirname, '..', 'datasource', 'migrations'),
tableName: 'knex_migrations'
}
},
production: {
client: 'pg',
conn... | const path = require('path');
module.exports = {
development: {
client: 'pg',
connection: 'postgres://localhost/envelopresent',
migrations: {
directory: path.join(__dirname, '..', 'datasource', 'migrations'),
tableName: 'knex_migrations'
}
},
production: {
client: 'ps',
conn... | Revert "Fix DB vendor alias" | Revert "Fix DB vendor alias"
This reverts commit 695b5998b3e7aa0d2a6e10737fca263e85bcc304.
| JavaScript | mit | chikh/envelopresent | ---
+++
@@ -12,7 +12,7 @@
},
production: {
- client: 'pg',
+ client: 'ps',
connection: process.env.DATABASE_URL,
pool: {
min: 2, |
d79f633547008f6add566ea5c39794046dacd90c | examples/face-detection-rectangle.js | examples/face-detection-rectangle.js | var cv = require('../lib/opencv');
var COLOR = [0, 255, 0]; // default red
var thickness = 2; // default 1
cv.readImage('./files/mona.png', function(err, im) {
if (err) throw err;
if (im.width() < 1 || im.height() < 1) throw new Error('Image has no size');
im.detectObject('../data/haarcascade_frontalface_alt2.... | var cv = require('../lib/opencv');
var COLOR = [0, 255, 0]; // default red
var thickness = 2; // default 1
cv.readImage('./files/mona.png', function(err, im) {
if (err) throw err;
if (im.width() < 1 || im.height() < 1) throw new Error('Image has no size');
im.detectObject('../data/haarcascade_frontalface_alt2.... | Fix mistake in face detection example | Fix mistake in face detection example
Fixed #274 by changing the x2,y2 second array when drawing the rectangle to width,height (see Matrix.cc) | JavaScript | mit | qgustavor/node-opencv,mvines/node-opencv,piercus/node-opencv,julianduque/node-opencv,keeganbrown/node-opencv,lntitbk/node-opencv,dropfen/node-opencv,webcats/node-opencv,akshonesports/node-opencv,akshonesports/node-opencv,peterbraden/node-opencv,piercus/node-opencv,jainanshul/node-opencv,Queuecumber/node-opencv,cascade2... | ---
+++
@@ -12,7 +12,7 @@
for (var i = 0; i < faces.length; i++) {
face = faces[i];
- im.rectangle([face.x, face.y], [face.x + face.width, face.y + face.height], COLOR, 2);
+ im.rectangle([face.x, face.y], [face.width, face.height], COLOR, 2);
}
im.save('./tmp/face-detection-rectan... |
66b391ff1a66e9ae160cfadf54fd94e088348a46 | angular-typescript-webpack-jasmine/webpack/webpack.build.js | angular-typescript-webpack-jasmine/webpack/webpack.build.js | var loaders = require("./loaders");
var preloaders = require("./preloaders");
var HtmlWebpackPlugin = require('html-webpack-plugin');
var webpack = require('webpack');
module.exports = {
entry: ['./src/index.ts'],
output: {
filename: 'build.js',
path: 'dist'
},
devtool: '',
resolve:... | const loaders = require("./loaders");
const preloaders = require("./preloaders");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const webpack = require("webpack");
module.exports = {
context: path.join(__dirname, ".."),
entry: ["./src/index.ts"],
output: {
filename: "build.js",
... | Replace single quotes -> double quotes, var -> const | Refactoring: Replace single quotes -> double quotes, var -> const
| JavaScript | mit | var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training | ---
+++
@@ -1,18 +1,19 @@
-var loaders = require("./loaders");
-var preloaders = require("./preloaders");
-var HtmlWebpackPlugin = require('html-webpack-plugin');
-var webpack = require('webpack');
+const loaders = require("./loaders");
+const preloaders = require("./preloaders");
+const HtmlWebpackPlugin = require("... |
74c5a0a45de24850b7d506c6af17218709e5ecbe | tests/unit/services/user-test.js | tests/unit/services/user-test.js | import Ember from 'ember';
import { moduleFor, test } from 'ember-qunit';
import { Offline } from 'ember-flexberry-data';
import startApp from 'dummy/tests/helpers/start-app';
let App;
moduleFor('service:user', 'Unit | Service | user', {
needs: [
'model:i-c-s-soft-s-t-o-r-m-n-e-t-security-agent',
],
before... | import Ember from 'ember';
import { moduleFor, test } from 'ember-qunit';
import { Offline } from 'ember-flexberry-data';
import startApp from 'dummy/tests/helpers/start-app';
let App;
moduleFor('service:user', 'Unit | Service | user', {
needs: [
'model:i-c-s-soft-s-t-o-r-m-n-e-t-security-agent',
],
before... | Test user service until better times | Test user service until better times
| JavaScript | mit | Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data | ---
+++
@@ -23,17 +23,7 @@
});
test('it works', function(assert) {
- assert.expect(4);
- let done = assert.async();
+ // TODO: Replace this with your real tests.
let service = this.subject(App.__container__.ownerInjection());
-
- Ember.run(() => {
- service.getCurrentUser().then((user) => {
- asser... |
511ddc7dcb44c54c24fa09fda91475bd0f5326bc | doubly-linked-list.js | doubly-linked-list.js | "use strict";
// DOUBLY-LINKED LIST
// define constructor
function Node(val) {
this.data = val;
this.previous = null;
this.next = null;
}
function DoublyLinkedList() {
this._length = 0;
this.head = null;
this.tail = null;
}
// add node to doubly linked list
DoublyLinkedList.prototype.add = function(val) {
va... | "use strict";
// DOUBLY-LINKED LIST
// define constructor
function Node(val) {
this.data = val;
this.previous = null;
this.next = null;
}
function DoublyLinkedList() {
this._length = 0;
this.head = null;
this.tail = null;
}
// add node to doubly linked list
DoublyLinkedList.prototype.add = function(val) {
va... | Add search-node method to doubly linked list | Add search-node method to doubly linked list
| JavaScript | mit | derekmpham/interview-prep,derekmpham/interview-prep | ---
+++
@@ -32,3 +32,45 @@
return node;
}
+
+// search nodes at specific positions in doubly linked list
+DoublyLinkedList.prototype.searchNodeAt = function(position) {
+ var currentNode = this.head,
+ length = this._length,
+ count = 1,
+ message = {failure: 'Failure: non-existent node in this list'};
+
+ //... |
f8309803daacc51a59daa8fb17096c666a4b615b | ottawa/celebration-park/local.js | ottawa/celebration-park/local.js | var southWest = L.latLng(45.36638, -75.73674),
northEast = L.latLng(45.36933, -75.73316),
bounds = L.latLngBounds(southWest, northEast);
var map = L.map('map', {
center: [45.36806, -75.73408],
zoom: 18,
minZoom: 18,
maxZoom: 19,
maxBounds: bounds,
});
L.tileLayer('http://{s}.tile.osm.org/{... | var southWest = L.latLng(45.36638, -75.73674),
northEast = L.latLng(45.36933, -75.73316),
bounds = L.latLngBounds(southWest, northEast);
var map = L.map('map', {
center: [45.36806, -75.73408],
zoom: 18,
minZoom: 18,
maxZoom: 19,
maxBounds: bounds,
});
L.tileLayer('http://{s}.tiles.wmflabs.... | Use black and white basemap | Use black and white basemap
Signed-off-by: Thanh Ha <09ea4d3a79c8bee41a16519f6a431f6bc0fd8d6f@alumni.carleton.ca>
| JavaScript | mit | zxiiro/maps,zxiiro/maps | ---
+++
@@ -10,6 +10,6 @@
maxBounds: bounds,
});
-L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map); |
eed9e520f02ca0a9b42a8ace3b3eb2b90ad3f4b1 | javascript/word-count/words.js | javascript/word-count/words.js | function Words(sentence){
"use strict";
sentence = sentence.toLowerCase();
var wordMatches = sentence.match(/\w+/g);
var result = {};
for(var idx = 0 ; idx < wordMatches.length ; idx++) {
result[wordMatches[idx]] = (result[wordMatches[idx]] || 0) + 1;
}
return { count: result };
};
... | function Words(sentence){
"use strict";
return { count: countWords(sentence) };
function countWords(sentence){
sentence = sentence.toLowerCase();
var wordMatches = sentence.match(/\w+/g);
var result = {};
for(var idx = 0 ; idx < wordMatches.length ; idx++) {
... | Use a separate counting function. | Use a separate counting function.
| JavaScript | mit | driis/exercism,driis/exercism,driis/exercism | ---
+++
@@ -1,12 +1,17 @@
function Words(sentence){
"use strict";
- sentence = sentence.toLowerCase();
- var wordMatches = sentence.match(/\w+/g);
- var result = {};
- for(var idx = 0 ; idx < wordMatches.length ; idx++) {
- result[wordMatches[idx]] = (result[wordMatches[idx]] || 0) + 1;
+ ... |
0c374abc35fbefa915834d8bde05d030a9b48e22 | js/services/searchService.js | js/services/searchService.js | 'use strict';
var SearchService = function($http, $q) {
this.search = function(query) {
var deferred = $q.defer();
var from = query.from ? '&from=' + query.from : "";
var size = query.size ? '&size=' + query.size : "";
var facetlist = "&facet=resource.provenance&facet=resource.types";
// facet values in... | 'use strict';
var SearchService = function($http, $q) {
this.search = function(query) {
var deferred = $q.defer();
var from = query.from ? '&from=' + query.from : "";
var size = query.size ? '&size=' + query.size : "";
var facetlist = "&facet=resource.provenance&facet=resource.types";
// facet values in... | Make sure exists filter values are sent to backend | Make sure exists filter values are sent to backend
| JavaScript | apache-2.0 | dainst/chronontology-frontend,dainst/chronontology-frontend | ---
+++
@@ -20,7 +20,16 @@
fq = "&fq=resource." + fq.join("&fq=resource.");
}
- var uri = '/data/period/?q=' + query.q + from + size + facetlist + fq;
+ var exists = query.exists;
+ if (exists == null) {
+ exists = "";
+ } else if (typeof exists === 'string') {
+ exists = "&exists=resource."+ex... |
3a8d487334bf1b623d5c93503c33fb0334a11c0d | server.js | server.js | var express = require('express')
var vhost = require('vhost')
var app2014 = require('./2014/app')
var app2015 = require('./2015/app')
var app2016 = require('./2016/app')
var appSplash = require('./splash/app')
//var redirect = express()
//redirect.get('/', function (req, res) {
// res.redirect(301, 'https://2016.co... | var express = require('express')
var vhost = require('vhost')
var app2014 = require('./2014/app')
var app2015 = require('./2015/app')
var app2016 = require('./2016/app')
var appSplash = require('./splash/app')
var redirect = express()
redirect.get('/', function (req, res) {
res.redirect(301, 'https://2016.coldfront... | Fix broken redirects and serving of older websites | Fix broken redirects and serving of older websites
| JavaScript | mit | auchenberg/coldfront.co,auchenberg/coldfront.co | ---
+++
@@ -6,19 +6,19 @@
var app2016 = require('./2016/app')
var appSplash = require('./splash/app')
-//var redirect = express()
+var redirect = express()
-//redirect.get('/', function (req, res) {
-// res.redirect(301, 'https://2016.coldfrontconf.com')
-//})
+redirect.get('/', function (req, res) {
+ res.red... |
72b3933fbcc1f0ce1cee85ecf6064a5be6a251ea | server.js | server.js | var hapi = require('hapi');
var moonboots = require('moonboots_hapi');
var config = require('getconfig');
var templatizer = require('templatizer');
var Good = require('good');
var ElectricFence = require('electricfence');
var server = hapi.createServer(8080, 'localhost');
server.pack.register([
{
plugin: m... | var hapi = require('hapi');
var moonboots = require('moonboots_hapi');
var config = require('getconfig');
var templatizer = require('templatizer');
//var Good = require('good');
var ElectricFence = require('electricfence');
var server = hapi.createServer(8080, 'localhost');
server.pack.register([
{
plugin:... | Disable Good cause pm2 pukes | Disable Good cause pm2 pukes
| JavaScript | mit | wraithgar/lift.zone,wraithgar/lift.zone,wraithgar/lift.zone | ---
+++
@@ -2,7 +2,7 @@
var moonboots = require('moonboots_hapi');
var config = require('getconfig');
var templatizer = require('templatizer');
-var Good = require('good');
+//var Good = require('good');
var ElectricFence = require('electricfence');
var server = hapi.createServer(8080, 'localhost');
@@ -23,13 ... |
55b92a8ebd70e4c30d50610884a1b890f57ae82b | server.js | server.js | var express = require('express');
var app = express();
var port = process.env.PORT || 3000;
// Asset paths first
app.get('/js/:file', serveFile.bind(null, 'dist/js'));
app.get('/css/:file', serveFile.bind(null, 'dist/css'));
app.get('/img/:file', serveFile.bind(null, 'dist/img'));
app.get('/templates/:file', serveFile... | var express = require('express');
var app = express();
var port = process.env.PORT || 3000;
// Asset paths first
app.get('/js/:file', serveFile.bind(null, 'dist/js'));
app.get('/css/:file', serveFile.bind(null, 'dist/css'));
app.get('/img/:file', serveFile.bind(null, 'dist/img'));
app.get('/templates/:file', serveFile... | Set timer for app so it will retrieve the data from heroku every 4.5 min | Set timer for app so it will retrieve the data from heroku every 4.5 min
| JavaScript | apache-2.0 | ilitvak/Pomodoro-App,ilitvak/Pomodoro-App | ---
+++
@@ -23,3 +23,12 @@
function serveFile( root, req, res ) {
res.sendFile(req.params.file, { root: root });
}
+
+// Sets a timer to retrieve data from Heroku so the app doesnt sleep
+
+var https = require("https");
+
+setInterval(function(){
+ https.get("https://pomodoro-app-timer.herokuapp.com/");
+ ... |
da1bf2e70b7c1dc2005f38d69e186a1043b0cab7 | src/configs/webpack/rules/default.js | src/configs/webpack/rules/default.js | // Licensed under the Apache License, Version 2.0 (the “License”); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed unde... | // Licensed under the Apache License, Version 2.0 (the “License”); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed unde... | Update asset loader path resolution | Update asset loader path resolution
| JavaScript | apache-2.0 | ctrine/webpack-settings,ctrine/webpack-settings | ---
+++
@@ -10,17 +10,41 @@
// License for the specific language governing permissions and limitations under
// the License.
+import {
+ getProjectDir,
+ TOOLBOX_DIR,
+} from '../../../paths'
+
+import {isPathSubDirOf} from '../../../utils'
import {relative, sep} from 'path'
-import {getProjectDir} from '../..... |
8bf302fb83764ce1e8bf9fd39fc4099067aee203 | lib/isomorphic/html-styles.js | lib/isomorphic/html-styles.js | import React from 'react'
import { prefixLink } from './gatsby-helpers'
if (process.env.NODE_ENV === `production`) {
let stylesStr
try {
stylesStr = require(`!raw!public/styles.css`)
} catch (e) {
// ignore
}
}
const htmlStyles = (args = {}) => {
if (process.env.NODE_ENV === `production`) {
if (... | import React from 'react'
import { prefixLink } from './gatsby-helpers'
let stylesStr
if (process.env.NODE_ENV === `production`) {
try {
stylesStr = require(`!raw!public/styles.css`)
} catch (e) {
// ignore
}
}
const htmlStyles = (args = {}) => {
if (process.env.NODE_ENV === `production`) {
if (ar... | Move variable declaration up a level to ensure it exists later | Move variable declaration up a level to ensure it exists later
| JavaScript | mit | 0x80/gatsby,mingaldrichgan/gatsby,fabrictech/gatsby,Khaledgarbaya/gatsby,mingaldrichgan/gatsby,fk/gatsby,fk/gatsby,danielfarrell/gatsby,okcoker/gatsby,fk/gatsby,gatsbyjs/gatsby,mickeyreiss/gatsby,okcoker/gatsby,Khaledgarbaya/gatsby,gatsbyjs/gatsby,mickeyreiss/gatsby,mingaldrichgan/gatsby,chiedo/gatsby,chiedo/gatsby,gat... | ---
+++
@@ -1,8 +1,8 @@
import React from 'react'
import { prefixLink } from './gatsby-helpers'
+let stylesStr
if (process.env.NODE_ENV === `production`) {
- let stylesStr
try {
stylesStr = require(`!raw!public/styles.css`)
} catch (e) { |
532d3eab820b4ffa3eb00c81f650c1c4686c871d | examples/share-window.js | examples/share-window.js | var media = require('rtc-media');
var h = require('hyperscript');
var crel = require('crel');
var screenshare = require('..')({
chromeExtension: 'rtc.io screenshare',
version: '^1.0.0'
});
var buttons = {
install: h('button', 'Install Extension', { onclick: function() {
chrome.webstore.install();
}}),
c... | var media = require('rtc-media');
var h = require('hyperscript');
var crel = require('crel');
var screenshare = require('..')({
chromeExtension: 'rtc.io screenshare',
version: '^1.0.0'
});
var buttons = {
install: h('button', 'Install Extension', { onclick: function() {
chrome.webstore.install();
}}),
c... | Include code the cancels the request after 5s | Include code the cancels the request after 5s
| JavaScript | apache-2.0 | rtc-io/rtc-screenshare | ---
+++
@@ -26,6 +26,9 @@
target: document.getElementById('main')
});
});
+
+ // you better select something quick or this will be cancelled!!!
+ setTimeout(screenshare.cancel, 5e3);
}
// detect whether the screenshare plugin is available and matches |
831351123815f125adcdb17efe7c5e467f0ad42d | tests.js | tests.js | Tinytest.add('meteor-assert', function (test) {
var isDefined = false;
try {
assert;
isDefined = true;
}
catch (e) {
}
test.isTrue(isDefined, "assert is not defined");
test.throws(function () {
assert.equal('a', 'b');
});
if (Meteor.isServer) {
console.log("Meteor.isServer");
test.... | Tinytest.add('meteor-assert', function (test) {
var isDefined = false;
try {
assert;
isDefined = true;
}
catch (e) {
}
test.isTrue(isDefined, "assert is not defined");
test.throws(function () {
assert.equal('a', 'b');
});
}); | Revert "Test for Travis CI." | Revert "Test for Travis CI."
This reverts commit 6a840248036cf030994cfb23f1f7d81baba1d600.
| JavaScript | bsd-3-clause | peerlibrary/meteor-assert | ---
+++
@@ -10,12 +10,4 @@
test.throws(function () {
assert.equal('a', 'b');
});
- if (Meteor.isServer) {
- console.log("Meteor.isServer");
- test.equal(1, 2);
- }
- else {
- console.log("Meteor.isClient");
- test.equal(1, 3);
- }
}); |
28600218226a9efc2d8099b16949c8d585e08aa6 | frontend/src/page/archive/index.js | frontend/src/page/archive/index.js | import React from 'react';
import Archive from '../../component/archive/archive-list-container';
import PropTypes from 'prop-types';
const render = ({ match }) => <Archive name={match.params.name} />;
render.propTypes = {
match: PropTypes.object,
};
export default render;
| import React from 'react';
import Archive from '../../component/archive/archive-list-container';
import PropTypes from 'prop-types';
const render = ({ match: { params }, history }) => <Archive name={params.name} history={history} />;
render.propTypes = {
match: PropTypes.object,
history: PropTypes.object,
};
... | Add 'history' prop to the archive-list. | fix(router): Add 'history' prop to the archive-list.
| JavaScript | apache-2.0 | Unleash/unleash,Unleash/unleash,Unleash/unleash,Unleash/unleash | ---
+++
@@ -2,9 +2,10 @@
import Archive from '../../component/archive/archive-list-container';
import PropTypes from 'prop-types';
-const render = ({ match }) => <Archive name={match.params.name} />;
+const render = ({ match: { params }, history }) => <Archive name={params.name} history={history} />;
render.prop... |
53eaf9062d4495d5309325c2db3038595e1d4bd8 | Libraries/Components/LazyRenderer.js | Libraries/Components/LazyRenderer.js | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... | Replace local copy of TimerMixin with module from npm. | Replace local copy of TimerMixin with module from npm.
Reviewed By: spicyj, davidaurelio
Differential Revision: D3819543
fbshipit-source-id: 69d68a7653fce05a31cbfd61e48878b7a0a2ab51
| JavaScript | bsd-3-clause | farazs/react-native,cosmith/react-native,doochik/react-native,kesha-antonov/react-native,adamjmcgrath/react-native,imjerrybao/react-native,negativetwelve/react-native,kesha-antonov/react-native,Purii/react-native,salanki/react-native,hoastoolshop/react-native,jaggs6/react-native,exponent/react-native,ankitsinghania94/r... | ---
+++
@@ -11,7 +11,7 @@
'use strict';
var React = require('React');
-var TimerMixin = require('TimerMixin');
+var TimerMixin = require('react-timer-mixin');
var LazyRenderer = React.createClass({
mixin: [TimerMixin], |
179d721407ce581079427a07a7e18e7cb5535b2a | lumify-web-war/src/main/webapp/js/util/withFileDrop.js | lumify-web-war/src/main/webapp/js/util/withFileDrop.js | define([], function() {
'use strict';
return withFileDrop;
function withFileDrop() {
this.after('initialize', function() {
var self = this;
if (!this.handleFilesDropped) {
return console.warn('Implement handleFilesDropped');
}
this... | define([], function() {
'use strict';
return withFileDrop;
function withFileDrop() {
this.after('initialize', function() {
var self = this;
if (!this.handleFilesDropped) {
return console.warn('Implement handleFilesDropped');
}
this... | Fix issue in detail pane where dragging entities to empty space in detail pane would cause it to stay there | Fix issue in detail pane where dragging entities to empty space in detail pane would cause it to stay there
| JavaScript | apache-2.0 | j-bernardo/lumify,RavenB/lumify,bings/lumify,dvdnglnd/lumify,TeamUDS/lumify,bings/lumify,j-bernardo/lumify,lumifyio/lumify,bings/lumify,Steimel/lumify,TeamUDS/lumify,dvdnglnd/lumify,Steimel/lumify,Steimel/lumify,RavenB/lumify,lumifyio/lumify,j-bernardo/lumify,dvdnglnd/lumify,RavenB/lumify,RavenB/lumify,lumifyio/lumify,... | ---
+++
@@ -22,12 +22,14 @@
$(this).removeClass('file-hover'); return false;
};
this.node.ondrop = function(e) {
- e.preventDefault();
- e.stopPropagation();
+ if (e.dataTransfer && e.dataTransfer.files) {
+ e.... |
7c4d61814b2512f977ed13a793479ad801d693d7 | lib/orbit/query/context.js | lib/orbit/query/context.js | import { Class } from '../lib/objects';
import { isQueryExpression } from './expression';
export default Class.extend({
evaluator: null,
init(evaluator) {
this.evaluator = evaluator;
},
evaluate(expression) {
if (isQueryExpression(expression)) {
let operator = this.evaluator.operators[expressio... | import { isQueryExpression } from './expression';
export default class QueryContext {
constructor(evaluator) {
this.evaluator = evaluator;
}
evaluate(expression) {
if (isQueryExpression(expression)) {
let operator = this.evaluator.operators[expression.op];
if (!operator) { throw new Error('... | Convert QueryContext to ES class. | Convert QueryContext to ES class. | JavaScript | mit | orbitjs/orbit-core,jpvanhal/orbit-core,orbitjs/orbit.js,jpvanhal/orbit.js,orbitjs/orbit.js,jpvanhal/orbit-core,SmuliS/orbit.js,jpvanhal/orbit.js,SmuliS/orbit.js | ---
+++
@@ -1,12 +1,9 @@
-import { Class } from '../lib/objects';
import { isQueryExpression } from './expression';
-export default Class.extend({
- evaluator: null,
-
- init(evaluator) {
+export default class QueryContext {
+ constructor(evaluator) {
this.evaluator = evaluator;
- },
+ }
evaluate(ex... |
b4af69796c13cf832d0ff53d5bcc2c9d51d79394 | packages/non-core/bundle-visualizer/package.js | packages/non-core/bundle-visualizer/package.js | Package.describe({
version: '1.1.2',
summary: 'Meteor bundle analysis and visualization.',
documentation: 'README.md',
});
Npm.depends({
"d3-selection": "1.0.5",
"d3-shape": "1.0.6",
"d3-hierarchy": "1.1.4",
"d3-transition": "1.0.4",
"d3-collection": "1.0.4",
"pretty-bytes": "4.0.2",
});
Package.onU... | Package.describe({
version: '1.1.3',
summary: 'Meteor bundle analysis and visualization.',
documentation: 'README.md',
});
Npm.depends({
"d3-selection": "1.0.5",
"d3-shape": "1.0.6",
"d3-hierarchy": "1.1.4",
"d3-transition": "1.0.4",
"d3-collection": "1.0.4",
"pretty-bytes": "4.0.2",
});
Package.onU... | Make bundle-visualizer depend on webapp, since it imports meteor/webapp. | Make bundle-visualizer depend on webapp, since it imports meteor/webapp.
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | ---
+++
@@ -1,5 +1,5 @@
Package.describe({
- version: '1.1.2',
+ version: '1.1.3',
summary: 'Meteor bundle analysis and visualization.',
documentation: 'README.md',
});
@@ -19,6 +19,7 @@
'ecmascript',
'dynamic-import',
'http',
+ 'webapp',
]);
api.mainModule('server.js', 'server');
... |
775b805e56bbc1aa9962e0c37a82a47b4a23ff9f | src/lib/libraries/decks/translate-image.js | src/lib/libraries/decks/translate-image.js | /**
* @fileoverview
* Utility functions for handling tutorial images in multiple languages
*/
import {enImages as defaultImages} from './en-steps.js';
let savedImages = {};
let savedLocale = '';
const loadSpanish = () =>
import(/* webpackChunkName: "es-steps" */ './es-steps.js')
.then(({esImages: imag... | /**
* @fileoverview
* Utility functions for handling tutorial images in multiple languages
*/
import {enImages as defaultImages} from './en-steps.js';
let savedImages = {};
let savedLocale = '';
const loadSpanish = () =>
import(/* webpackChunkName: "es-steps" */ './es-steps.js')
.then(({esImages: imag... | Make Spanish tutorial images also load for Latinamerican Spanish | Make Spanish tutorial images also load for Latinamerican Spanish
| JavaScript | bsd-3-clause | LLK/scratch-gui,LLK/scratch-gui | ---
+++
@@ -13,7 +13,8 @@
.then(({esImages: imageData}) => imageData);
const translations = {
- es: () => loadSpanish()
+ 'es': () => loadSpanish(),
+ 'es-419': () => loadSpanish()
};
const loadImageData = locale => { |
85cb638499d7930ce9c4c119e7ccd15d7adef7f8 | dotjs.js | dotjs.js | var hostname = location.hostname.replace(/^www\./, '');
var style = document.createElement('link');
style.rel = 'stylesheet';
style.href = chrome.extension.getURL('styles/' + hostname + '.css');
document.documentElement.appendChild(style);
var defaultStyle = document.createElement('link');
defaultStyle.rel = 'stylesh... | var hostname = location.hostname.replace(/^www\./, '');
var appendScript = function(path){
var xhr = new XMLHttpRequest();
xhr.onload = function(){
eval(this.responseText);
}
xhr.open('GET', chrome.extension.getURL(path));
xhr.send();
}
var defaultStyle = document.createElement('link');
defaultStyle.rel = 'sty... | Revert back to evaluating scripts | Revert back to evaluating scripts
- Rather this than including jQuery manually resulting in potential duplicates
| JavaScript | mit | p3lim/dotjs-universal,p3lim/dotjs-universal | ---
+++
@@ -1,19 +1,23 @@
var hostname = location.hostname.replace(/^www\./, '');
+
+var appendScript = function(path){
+ var xhr = new XMLHttpRequest();
+ xhr.onload = function(){
+ eval(this.responseText);
+ }
+ xhr.open('GET', chrome.extension.getURL(path));
+ xhr.send();
+}
+
+var defaultStyle = document.create... |
21082cb80f8c77c2a90d5f032193a4feda2edcf4 | lib/adapter.js | lib/adapter.js | import callbacks from 'ember-encore/mixins/adapter-callbacks';
export default DS.RESTAdapter.extend(callbacks, {
defaultSerializer: '-encore',
pathForType: function(type) {
return Ember.String.pluralize(Ember.String.underscore(type));
},
ajaxError: function(jqXHR) {
var error = this._super(jqXHR);
... | import callbacks from 'ember-encore/mixins/adapter-callbacks';
export default DS.RESTAdapter.extend(callbacks, {
defaultSerializer: '-encore',
pathForType: function(type) {
return Ember.String.pluralize(Ember.String.underscore(type));
},
ajaxError: function(jqXHR) {
var error = this._super(jqXHR);
... | Fix errors format to when creating a DS.InvalidError object | Fix errors format to when creating a DS.InvalidError object
| JavaScript | bsd-3-clause | mirego/ember-encore | ---
+++
@@ -13,7 +13,7 @@
if (jqXHR && jqXHR.status === 422) {
var errors = data.errors.reduce(function(memo, errorGroup) {
- memo[errorGroup.field] = errorGroup.types[0];
+ memo[errorGroup.field] = errorGroup.types;
return memo;
}, {});
|
ec555d651c1748b793dc12ef901af806b6d09dde | server/client/containers/RunAdHocExperiment/DepVars.js | server/client/containers/RunAdHocExperiment/DepVars.js | // import React and Redux dependencies
var React = require('react');
var connect = require('react-redux').connect;
var $ = require('jquery');
var DepVar = require('./DepVar');
function mapStatetoProps (state, ownProps) {
return {
depVars: state.Experiments.getIn([ownProps.expId, 'depVars']).toJS()
};
}
var D... | // import React and Redux dependencies
var React = require('react');
var connect = require('react-redux').connect;
var _ = require('underscore');
var $ = require('jquery');
require('jquery-serializejson');
var DepVar = require('./DepVar');
function mapStatetoProps (state, ownProps) {
return {
depVars: state.Exp... | Add support for multiple IndVars | Add support for multiple IndVars
| JavaScript | mit | Agnition/agnition,marcusbuffett/agnition,Agnition/agnition,marcusbuffett/agnition | ---
+++
@@ -1,30 +1,47 @@
// import React and Redux dependencies
var React = require('react');
var connect = require('react-redux').connect;
+var _ = require('underscore');
var $ = require('jquery');
+require('jquery-serializejson');
var DepVar = require('./DepVar');
function mapStatetoProps (state, ownProp... |
22076933adbf6a17cdd664ac18c612a35a1df234 | lib/objects.js | lib/objects.js | 'use strict';
let rpc = require('./rpc');
let util = require('./util');
let idKey = util.idKey;
let realmKey = util.realmKey;
let registeredConstructors = {};
exports.create = create;
exports.registerConstructors = registerConstructors;
function create(realmId, info) {
let schema = info.schema;
let construc... | 'use strict';
let rpc = require('./rpc');
let util = require('./util');
let idKey = util.idKey;
let realmKey = util.realmKey;
let registeredConstructors = {};
exports.create = create;
exports.registerConstructors = registerConstructors;
function create(realmId, info) {
let schema = info.schema;
let construc... | Fix "const" search and replace | Fix "const" search and replace
| JavaScript | apache-2.0 | realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js | ---
+++
@@ -33,8 +33,8 @@
return object;
}
-function registerletructors(realmId, letructors) {
- registeredletructors[realmId] = letructors;
+function registerConstructors(realmId, constructors) {
+ registeredConstructors[realmId] = constructors;
}
function getterForProperty(name) { |
190210feb2f3f134e227055e7e8e631372c4dd7c | app/scripts/reducers/infiniteList.js | app/scripts/reducers/infiniteList.js | import update from 'immutability-helper'
import ActionTypes from '../actionTypes'
const initialState = {
currentPageIndex: 0,
isLoading: false,
listItems: [],
totalPageCount: 0,
}
export default (state = initialState, action) => {
switch (action.type) {
case ActionTypes.INFINITE_LIST_INITIALIZE:
retu... | import update from 'immutability-helper'
import ActionTypes from '../actionTypes'
const initialState = {
currentPageIndex: 0,
isLoading: false,
listItems: [],
totalPageCount: 0,
}
export default (state = initialState, action) => {
switch (action.type) {
case ActionTypes.INFINITE_LIST_INITIALIZE:
retu... | Fix wrong counting of total pages for infinite lists | Fix wrong counting of total pages for infinite lists
| JavaScript | agpl-3.0 | adzialocha/hoffnung3000,adzialocha/hoffnung3000 | ---
+++
@@ -28,7 +28,7 @@
isLoading: { $set: false },
listItems: { $push: action.payload.data },
totalPageCount: {
- $set: Math.floor(action.payload.total / action.payload.limit),
+ $set: Math.ceil(action.payload.total / action.payload.limit),
},
})
case ActionTypes.I... |
5a22dbf7d62117b3e9349b41ccc3f5ef2dc9ff71 | src/browser/extension/background/contextMenus.js | src/browser/extension/background/contextMenus.js | import openDevToolsWindow from './openWindow';
const menus = [
{ id: 'devtools-left', title: 'To left' },
{ id: 'devtools-right', title: 'To right' },
{ id: 'devtools-bottom', title: 'To bottom' },
{ id: 'devtools-panel', title: 'In panel' }
];
let pageUrl;
let pageTab;
let shortcuts = {};
chrome.commands.get... | import openDevToolsWindow from './openWindow';
const menus = [
{ id: 'devtools-left', title: 'To left' },
{ id: 'devtools-right', title: 'To right' },
{ id: 'devtools-bottom', title: 'To bottom' },
{ id: 'devtools-panel', title: 'In panel' }
];
let pageUrl;
let pageTab;
let shortcuts = {};
chrome.commands.get... | Fix missing page action (popup icon) on page reload | Fix missing page action (popup icon) on page reload
Related to #25.
| JavaScript | mit | zalmoxisus/redux-devtools-extension,zalmoxisus/redux-devtools-extension | ---
+++
@@ -17,7 +17,9 @@
});
export default function createMenu(forUrl, tabId) {
- if (typeof tabId !== 'number' || tabId === pageTab) return;
+ if (typeof tabId !== 'number') return; // It is an extension's background page
+ chrome.pageAction.show(tabId);
+ if (tabId === pageTab) return;
let url = forU... |
d3924ba8fa88a13044cf9150616c5660847e06d0 | src/containers/profile/components/EditProfile.js | src/containers/profile/components/EditProfile.js | import React, { PropTypes } from 'react';
import Immutable from 'immutable';
import { Button } from 'react-bootstrap';
import styles from '../styles.module.css';
const EditProfile = ({onSubmit}) => {
return(
<div>
<div>EditProfileComponent!</div>
<Button onClick={onSubmit}>Submit</Button>
</div>
... | import React, { PropTypes } from 'react';
import Immutable from 'immutable';
import { Button } from 'react-bootstrap';
import DocumentTitle from 'react-document-title';
import Page from '../../../components/page/Page';
import styles from '../styles.module.css';
const EditProfile = ({ userDetails, onSubmit }) => {
re... | Add document title and page header | Add document title and page header
| JavaScript | apache-2.0 | dataloom/gallery,kryptnostic/gallery,kryptnostic/gallery,dataloom/gallery | ---
+++
@@ -1,14 +1,21 @@
import React, { PropTypes } from 'react';
import Immutable from 'immutable';
import { Button } from 'react-bootstrap';
+import DocumentTitle from 'react-document-title';
+import Page from '../../../components/page/Page';
import styles from '../styles.module.css';
-const EditProfile = (... |
5c34ebb081bb40d15daf595e642cfe0dc14f4f55 | test/specs/route.js | test/specs/route.js | /*globals PushStateTree, it, expect */
describe('ObjectEvent should', function() {
'use strict';
it('be available on global scope', function() {
expect(PushStateTree).toBeDefined();
});
it('throw an error if not using "new" operator', function() {
expect(PushStateTree).toThrow();
});
});
| /*globals PushStateTree, it, expect */
describe('PushStateTree should', function() {
'use strict';
it('be available on global scope', function() {
expect(PushStateTree).toBeDefined();
});
it('throw an error if not using "new" operator', function() {
expect(PushStateTree).toThrow();
});
it('constr... | Test for element instance creating | Test for element instance creating
| JavaScript | mit | gartz/pushStateTree,gartz/pushStateTree | ---
+++
@@ -1,5 +1,5 @@
/*globals PushStateTree, it, expect */
-describe('ObjectEvent should', function() {
+describe('PushStateTree should', function() {
'use strict';
it('be available on global scope', function() {
@@ -10,4 +10,8 @@
expect(PushStateTree).toThrow();
});
+ it('construct and became... |
4580c5feca6b28b4afe46f4ad58aa3cb7b6c7b17 | website/server/server.js | website/server/server.js | "use strict";
let fs = require("fs");
let path = require("path");
let Q = require("q");
let express = require("express");
let bodyParser = require("body-parser");
let restify = require("restify");
function Server() {
Q.longStackSupport = true;
this.__setup();
};
Server.prototype.__setup = funct... | "use strict";
let fs = require("fs");
let path = require("path");
let Q = require("q");
let express = require("express");
let bodyParser = require("body-parser");
let restify = require("restify");
function Server() {
Q.longStackSupport = true;
this.__setup();
};
Server.prototype.__setup = funct... | Add rest endpoint for beacon data | Add rest endpoint for beacon data
| JavaScript | mit | pankrator/Beacon-Spam,pankrator/Beacon-Spam | ---
+++
@@ -23,7 +23,27 @@
this.app.listen(8080);
};
+let handleBeaconInfo = function (req, res) {
+ /**
+ * {
+ * id: ....,
+ * name: ...,
+ * txPower: ....,
+ * samples: [{rssi: ...., timestamp: .....}]
+ * }
+ */
+ var beaconData = {
+ id: req.body.id,
+ ... |
2305a450851dbaf03f6f0583b7b12e290ac79f0b | lib/web/angular-base-workaround.js | lib/web/angular-base-workaround.js | if ('angular' in window) {
angular.module('ng').run(['$rootScope', '$window', function ($rootScope, window) {
$rootScope.$watch(function() {
return $window.location.pathname + $window.location.search;
}, function (newUrl, oldUrl) {
if (newUrl === oldUrl) {
return;
}
var evt... | if ('angular' in window) {
angular.module('ng').run(['$rootScope', '$window', function ($rootScope, $window) {
$rootScope.$watch(function() {
return $window.location.pathname + $window.location.search;
}, function (newUrl, oldUrl) {
if (newUrl === oldUrl) {
return;
}
var evt = do... | Watch location update instead of listening events since there is no event when $locatoin update is failed: window -> $window typo | Watch location update instead of listening events since there is no event when $locatoin update is failed: window -> $window typo
| JavaScript | mit | kisenka/svg-sprite-loader,kisenka/webpack-svg-sprite-loader,princed/webpack-svg-sprite-loader | ---
+++
@@ -1,5 +1,5 @@
if ('angular' in window) {
- angular.module('ng').run(['$rootScope', '$window', function ($rootScope, window) {
+ angular.module('ng').run(['$rootScope', '$window', function ($rootScope, $window) {
$rootScope.$watch(function() {
return $window.location.pathname + $window.location... |
6113b3bf024e578bb920713470c94d5e9853c684 | src/app/utils/notification/NotificationProviderLibNotify.js | src/app/utils/notification/NotificationProviderLibNotify.js | import NotificationProvider from "./NotificationProvider";
import LibNotify from "node-notifier/notifiers/notifysend";
import which from "utils/node/fs/which";
import UTIL from "util";
function NotificationProviderLibNotify() {
this.provider = new LibNotify();
}
UTIL.inherits( NotificationProviderLibNotify, Notific... | import NotificationProvider from "./NotificationProvider";
import LibNotify from "node-notifier/notifiers/notifysend";
import which from "utils/node/fs/which";
import UTIL from "util";
function NotificationProviderLibNotify() {
this.provider = new LibNotify({
// don't run `which notify-send` twice
suppressOsdChe... | Disable node-notifier's which call of notify-send | Disable node-notifier's which call of notify-send
| JavaScript | mit | chhe/livestreamer-twitch-gui,bastimeyer/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,streamlink/streamlink-twitch-gui,bastimeyer/livestreamer-twitch-gui,bastimeyer/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui | ---
+++
@@ -5,7 +5,10 @@
function NotificationProviderLibNotify() {
- this.provider = new LibNotify();
+ this.provider = new LibNotify({
+ // don't run `which notify-send` twice
+ suppressOsdCheck: true
+ });
}
UTIL.inherits( NotificationProviderLibNotify, NotificationProvider ); |
4b5965328d8dc4388793fd7dfbbc0df3b5d9ca73 | grunt.js | grunt.js | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
test: {
files: ['test/**/*.js']
},
lint: {
files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js']
},
watch: {
files: '<config:lint.files>',
tasks: 'default'
},... | 'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
test: {
files: ['test/**/*.js']
},
lint: {
files: ['lib/**/*.js', 'test/**/*.coffee']
},
watch: {
files: ['<config:coffee.app.src>', 'src/**/*.jade'],
... | Set up for compilation from src to lib | Set up for compilation from src to lib
| JavaScript | mit | ddubyah/thumblr | ---
+++
@@ -1,3 +1,4 @@
+'use strict';
module.exports = function(grunt) {
// Project configuration.
@@ -7,11 +8,29 @@
files: ['test/**/*.js']
},
lint: {
- files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js']
+ files: ['lib/**/*.js', 'test/**/*.coffee']
},
watch: {
- files... |
605e59e704422fd780fa23a757a17225c8400255 | index.js | index.js | connect = require('connect');
serveServer = require('serve-static');
jade = require("./lib/processor/jade.js");
function miniharp(root) {
//console.log(root);
var app = connect()
.use(serveServer(root))
.use(jade(root));
return app;
};
module.exports = miniharp; | connect = require('connect');
serveServer = require('serve-static');
jade = require("./lib/processor/jade.js");
less = require("./lib/processor/less.js");
function miniharp(root) {
//console.log(root);
var app = connect()
.use(serveServer(root))
.use(jade(root))
.use(less(root));
return app;
};
modu... | Add less preprocessor to the mini-harp app | Add less preprocessor to the mini-harp app
| JavaScript | mit | escray/besike-nodejs-harp,escray/besike-nodejs-harp | ---
+++
@@ -1,12 +1,14 @@
connect = require('connect');
serveServer = require('serve-static');
jade = require("./lib/processor/jade.js");
+less = require("./lib/processor/less.js");
function miniharp(root) {
//console.log(root);
var app = connect()
.use(serveServer(root))
- .use(jade(root));
+ ... |
75e55d7bd009fcc0bd670c592a34319c8b2655ed | index.js | index.js | 'use strict';
var got = require('got');
var cheerio = require('cheerio');
var md = require('html-md');
module.exports = function(id, callback) {
var url = 'http://www.stm.dk/_p_' + id + '.html';
got(url, function(err, data){
var $ = cheerio.load(data);
var meta = $('meta[name="created"]');
var speec... | 'use strict';
var got = require('got');
var cheerio = require('cheerio');
var md = require('html-md');
module.exports = function(id, callback) {
var url = 'http://www.stm.dk/_p_' + id + '.html';
got(url, function(err, data){
var $ = cheerio.load(data);
var meta = $('meta[name="created"]');
var speec... | Add image property to callback data | Add image property to callback data
| JavaScript | mit | matiassingers/statsministeriet-speeches-scraper | ---
+++
@@ -22,6 +22,11 @@
html: speech.html(),
markdown: md(speech.html(), {inline: true}).replace(/\\/gi, '')
};
+ var image = speech.find('.a110051').find('img').attr('src');
+ if(image){
+ speech.find('.a110051').remove();
+ image = 'http://www.stm.dk/' + image;
+ }
va... |
3a89935c293c8133ad9dd48c0be01949083a9c4a | client/js/libs/handlebars/colorClass.js | client/js/libs/handlebars/colorClass.js | "use strict";
// Generates a string from "color-1" to "color-32" based on an input string
module.exports = function(str) {
let hash = 0;
for (let i = 0; i < str.length; i++) {
hash += str.charCodeAt(i);
}
return "color-" + (1 + hash % 32);
};
| "use strict";
// Generates a string from "color-1" to "color-32" based on an input string
module.exports = function(str) {
let hash = 0;
for (let i = 0; i < str.length; i++) {
hash += str.charCodeAt(i);
}
/*
Modulo 32 lets us be case insensitive for ascii
due to A being ascii 65 (100 0001)
while a being... | Add reminder that ascii is awesome. | Add reminder that ascii is awesome.
| JavaScript | mit | thelounge/lounge,MaxLeiter/lounge,realies/lounge,realies/lounge,williamboman/lounge,ScoutLink/lounge,williamboman/lounge,thelounge/lounge,FryDay/lounge,MaxLeiter/lounge,realies/lounge,FryDay/lounge,ScoutLink/lounge,ScoutLink/lounge,MaxLeiter/lounge,williamboman/lounge,FryDay/lounge | ---
+++
@@ -8,5 +8,10 @@
hash += str.charCodeAt(i);
}
+ /*
+ Modulo 32 lets us be case insensitive for ascii
+ due to A being ascii 65 (100 0001)
+ while a being ascii 97 (110 0001)
+ */
return "color-" + (1 + hash % 32);
}; |
854e8f71d40d7d2a077a208f3f6f33f9a0dc23f4 | index.js | index.js | // http://stackoverflow.com/questions/11935175/sampling-a-random-subset-from-an-array
var featureCollection = require('turf-featurecollection');
/**
* Takes a {@link FeatureCollection} and returns a FeatureCollection with given number of {@link Feature|features} at random.
*
* @module turf/sample
* @category data
... | // http://stackoverflow.com/questions/11935175/sampling-a-random-subset-from-an-array
var featureCollection = require('turf-featurecollection');
/**
* Takes a {@link FeatureCollection} and returns a FeatureCollection with given number of {@link Feature|features} at random.
*
* @module turf/sample
* @category data
... | Switch doc to closure compiler templating | Switch doc to closure compiler templating
| JavaScript | mit | Turfjs/turf-sample | ---
+++
@@ -6,9 +6,9 @@
*
* @module turf/sample
* @category data
- * @param {FeatureCollection} features a FeatureCollection of any type
- * @param {number} n number of features to select
- * @return {FeatureCollection} a FeatureCollection with `n` features
+ * @param {FeatureCollection<(Point|LineString|Polygo... |
024de1e7eff4e4f688266d14abfe0dbcaedf407e | index.js | index.js | require('./env');
var http = require('http');
var koa = require('koa');
var app = koa();
app.use(require('koa-bodyparser')());
app.use(function *(next) {
if (typeof this.request.body === 'undefined' || this.request.body === null) {
this.request.body = {};
}
yield next;
});
app.use(require('koa-views')('view... | require('./env');
var mount = require('koa-mount');
var koa = require('koa');
var app = koa();
app.use(require('koa-bodyparser')());
app.use(function *(next) {
if (typeof this.request.body === 'undefined' || this.request.body === null) {
this.request.body = {};
}
yield next;
});
app.use(mount('/build', requ... | Use koa-static to serve static files | Use koa-static to serve static files
| JavaScript | mit | luin/doclab,luin/doclab | ---
+++
@@ -1,5 +1,5 @@
require('./env');
-var http = require('http');
+var mount = require('koa-mount');
var koa = require('koa');
var app = koa();
@@ -10,6 +10,8 @@
}
yield next;
});
+
+app.use(mount('/build', require('koa-static')('build', { defer: true })));
app.use(require('koa-views')('views', { ... |
3b9847a61da0b294ddfee133cda962fa393f914d | client/components/Reaction.js | client/components/Reaction.js | import React, {Component} from 'react'
import './Reaction.sass'
class Reaction extends Component {
constructor() {
super();
this.state = { React: false };
}
componentDidMount() {
var thiz = this;
setTimeout(function () {
thiz.setState({ React: true });
}, Math.random()*5000);
}
r... | import React, {Component} from 'react'
import './Reaction.sass'
class Reaction extends Component {
constructor() {
super();
this.state = { React: false };
}
componentDidMount() {
var thiz = this;
setTimeout(function () {
thiz.setState({ React: true });
}, Math.random()*5000);
}
get... | Add OnClick and Onload for reaction and create times | Add OnClick and Onload for reaction and create times
| JavaScript | mit | Jeffrey-Meesters/React-Shoot,Jeffrey-Meesters/React-Shoot | ---
+++
@@ -15,15 +15,43 @@
}, Math.random()*5000);
}
+getReactionTime(event) {
+ let reactionTime = Date.now();
+ console.log(reactionTime);
+ return reactionTime;
+}
+
+getCreate(event) {
+ let create = Date.now();
+ console.log(create);
+ return create;
+
+}
+
+reactionTimePlayer() {
+ let timePla... |
59d6f506b93982816e2f98a76b361b2a9ebd57ac | index.js | index.js | 'use strict';
require('./patch/functionName');
(function (window, document, undefined) {
var oldMappy = window.Mappy
var Mappy = require('./lib/main')
//Node style module export
if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = Mappy;
}
/**
* Resets the window.Mappy variabl... | 'use strict';
(function (window, document, undefined) {
var oldMappy = window.Mappy
var Mappy = require('./lib/main')
//Node style module export
if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = Mappy;
}
/**
* Resets the window.Mappy variable to its original state and return... | Remove function constructor name patch | Remove function constructor name patch
| JavaScript | mit | mediasuitenz/mappy,mediasuitenz/mappy | ---
+++
@@ -1,6 +1,4 @@
'use strict';
-
-require('./patch/functionName');
(function (window, document, undefined) {
var oldMappy = window.Mappy |
65bb0ff4fce04e58febe70936adf503d432f9d41 | index.js | index.js | #!/usr/bin/env node
var program = require('commander');
var userArgs = process.argv.splice(2);
var message = userArgs.join(' ');
if (message.length > 140) {
console.log('Message was too long. Can only be 140 characters. It was: ', message.length);
process.exit(1);
}
console.log(message);
| #!/usr/bin/env node
var program = require('commander');
var userArgs = process.argv.splice(2);
var message = userArgs.join(' ');
var confluenceUrl = process.env.CONFLUENCE_URL
if (message.length > 140) {
console.log('Message was too long. Can only be 140 characters. It was: ', message.length);
process.exit(1);
}
... | Read confluence url from env | Read confluence url from env
| JavaScript | mit | tylerpeterson/confluence-user-status | ---
+++
@@ -3,10 +3,16 @@
var program = require('commander');
var userArgs = process.argv.splice(2);
var message = userArgs.join(' ');
+var confluenceUrl = process.env.CONFLUENCE_URL
if (message.length > 140) {
console.log('Message was too long. Can only be 140 characters. It was: ', message.length);
proc... |
6ec2bff81999a815fe44f1ddf3a02c9edc46829c | index.js | index.js | /*
* gaze
* https://github.com/shama/gaze
*
* Copyright (c) 2014 Kyle Robinson Young
* Licensed under the MIT license.
*/
try {
// Attempt to resolve optional pathwatcher
require('bindings')('pathwatcher.node');
var version = process.versions.node.split('.');
module.exports = (version[0] === '0' && versi... | /*
* gaze
* https://github.com/shama/gaze
*
* Copyright (c) 2014 Kyle Robinson Young
* Licensed under the MIT license.
*/
// If on node v0.8, serve gaze04
var version = process.versions.node.split('.');
if (version[0] === '0' && version[1] === '8') {
module.exports = require('./lib/gaze04.js');
} else {
try ... | Determine whether pathwatcher built without running it. Ref GH-98. | Determine whether pathwatcher built without running it. Ref GH-98.
| JavaScript | mit | bevacqua/gaze,modulexcite/gaze,bevacqua/gaze,prodatakey/gaze,modulexcite/gaze,bevacqua/gaze,prodatakey/gaze,modulexcite/gaze,prodatakey/gaze | ---
+++
@@ -6,14 +6,18 @@
* Licensed under the MIT license.
*/
-try {
- // Attempt to resolve optional pathwatcher
- require('bindings')('pathwatcher.node');
- var version = process.versions.node.split('.');
- module.exports = (version[0] === '0' && version[1] === '8')
- ? require('./lib/gaze04.js')
- ... |
0d0bc8deee992e72d593ec6e4f2cb038eff22614 | index.js | index.js | var httpProxy = require('http-proxy');
var http = require('http');
var CORS_HEADERS = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'HEAD, POST, GET, PUT, PATCH, DELETE',
'Access-Control-Max-Age': '86400',
'Access-Control-Allow-Headers': "X-Requested-With, X-HTTP-Method-Override, Conten... | var httpProxy = require('http-proxy');
var http = require('http');
var CORS_HEADERS = {
'access-control-allow-origin': '*',
'access-control-allow-methods': 'HEAD, POST, GET, PUT, PATCH, DELETE',
'access-control-max-age': '86400',
'access-control-allow-headers': "X-Requested-With, X-HTTP-Method-Override, Conten... | Fix CORS handling for POST and DELETE | Fix CORS handling for POST and DELETE
| JavaScript | mpl-2.0 | yourcelf/gspreadsheets-cors-proxy | ---
+++
@@ -2,10 +2,10 @@
var http = require('http');
var CORS_HEADERS = {
- 'Access-Control-Allow-Origin': '*',
- 'Access-Control-Allow-Methods': 'HEAD, POST, GET, PUT, PATCH, DELETE',
- 'Access-Control-Max-Age': '86400',
- 'Access-Control-Allow-Headers': "X-Requested-With, X-HTTP-Method-Override, Content-Ty... |
c722da297169e89fc6d79860c2c305dc3b4a1c60 | index.js | index.js | 'use strict'
var path = require('path')
module.exports = function (file) {
var segments = file.split(path.sep)
var index = segments.lastIndexOf('node_modules')
if (index === -1) return
if (!segments[index + 1]) return
var scoped = segments[index + 1].indexOf('@') === 0
var name = scoped ? segments[index +... | 'use strict'
var path = require('path')
module.exports = function (file) {
var segments = file.split(path.sep)
var index = segments.lastIndexOf('node_modules')
if (index === -1) return
if (!segments[index + 1]) return
var scoped = segments[index + 1][0] === '@'
var name = scoped ? segments[index + 1] + '/... | Improve speed of detection of scoped packages | Improve speed of detection of scoped packages
| JavaScript | mit | watson/module-details-from-path | ---
+++
@@ -7,7 +7,7 @@
var index = segments.lastIndexOf('node_modules')
if (index === -1) return
if (!segments[index + 1]) return
- var scoped = segments[index + 1].indexOf('@') === 0
+ var scoped = segments[index + 1][0] === '@'
var name = scoped ? segments[index + 1] + '/' + segments[index + 2] : seg... |
66de12f38c0d0021dad895070e9b823d99d433e4 | index.js | index.js | 'use strict';
const YQL = require('yql');
const _ = require('lodash');
module.exports = (opts, callback) => {
opts = opts || [];
let query;
if (_.isEmpty(opts)) {
query = new YQL('select * from weather.forecast where woeid in (select woeid from geo.places(1) where text="Dhaka, Bangladesh")');
} else {
query... | 'use strict';
const axios = require('axios');
const API_URL = 'https://micro-weather.now.sh';
module.exports = (opts) => {
let city = opts[0] || 'Dhaka';
let country = opts[1] || 'Bangladesh';
return axios.get(`${API_URL}?city=${city}&country=${country}`);
};
| Refactor main weather module to use API | Refactor main weather module to use API
Signed-off-by: Riyadh Al Nur <d7e60315016355bdcd32d48dde148183e3d8bb86@verticalaxisbd.com>
| JavaScript | mit | riyadhalnur/weather-cli | ---
+++
@@ -1,24 +1,11 @@
'use strict';
-const YQL = require('yql');
-const _ = require('lodash');
+const axios = require('axios');
+const API_URL = 'https://micro-weather.now.sh';
-module.exports = (opts, callback) => {
- opts = opts || [];
+module.exports = (opts) => {
+ let city = opts[0] || 'Dhaka';
+ let ... |
69a1ac6f09fef4f7954677a005ebfe32235ed5cd | index.js | index.js | import React from 'react';
import Match from 'react-router/Match';
import Miss from 'react-router/Miss';
import Users from './Users';
class UsersRouting extends React.Component {
NoMatch() {
return <div>
<h2>Uh-oh!</h2>
<p>How did you get to <tt>{this.props.location.pathname}</tt>?</p>
</div>
}... | import React from 'react';
import Match from 'react-router/Match';
import Miss from 'react-router/Miss';
import Users from './Users';
class UsersRouting extends React.Component {
constructor(props){
super(props);
this.connectedUsers = props.connect(Users);
}
NoMatch() {
return <div>
<h2>Uh-oh!... | Call connect() on the Users component only once, and cache the result. This seems to fix STRIPES-97 at last! | Call connect() on the Users component only once, and cache the result. This seems to fix STRIPES-97 at last!
| JavaScript | apache-2.0 | folio-org/ui-users,folio-org/ui-users | ---
+++
@@ -4,6 +4,11 @@
import Users from './Users';
class UsersRouting extends React.Component {
+ constructor(props){
+ super(props);
+ this.connectedUsers = props.connect(Users);
+ }
+
NoMatch() {
return <div>
<h2>Uh-oh!</h2>
@@ -18,9 +23,9 @@
return <div>
<h1>Users module... |
9a7bada461b9c2096b282952333eb6869aa613cb | index.js | index.js | /* jshint node: true */
'use strict';
module.exports = {
name: 'ember-ui-sortable',
included: function(app) {
app.import(app.bowerDirectory + '/jquery-ui/ui/version.js');
app.import(app.bowerDirectory + '/jquery-ui/ui/data.js');
app.import(app.bowerDirectory + '/jquery-ui/ui/ie.js');
app.import(ap... | /* jshint node: true */
'use strict';
module.exports = {
name: 'ember-ui-sortable',
included: function(app) {
app.import(app.bowerDirectory + '/jquery-ui/ui/version.js');
app.import(app.bowerDirectory + '/jquery-ui/ui/data.js');
app.import(app.bowerDirectory + '/jquery-ui/ui/ie.js');
app.import(ap... | Update dependencies to be an exact copy of jquery-ui's custom download option | Update dependencies to be an exact copy of jquery-ui's custom download option
| JavaScript | mit | 12StarsMedia/ember-ui-sortable,12StarsMedia/ember-ui-sortable | ---
+++
@@ -11,8 +11,10 @@
app.import(app.bowerDirectory + '/jquery-ui/ui/safe-active-element.js');
app.import(app.bowerDirectory + '/jquery-ui/ui/safe-blur.js');
app.import(app.bowerDirectory + '/jquery-ui/ui/scroll-parent.js');
+ app.import(app.bowerDirectory + '/jquery-ui/ui/plugin.js');
app... |
3c660bb65805957ef71481c97277c0093cae856a | tests/integration/lambda-invoke/lambdaInvokeHandler.js | tests/integration/lambda-invoke/lambdaInvokeHandler.js | 'use strict'
const { config, Lambda } = require('aws-sdk')
const { stringify } = JSON
config.update({
accessKeyId: 'ABC',
secretAccessKey: 'SECRET',
})
const lambda = new Lambda({
apiVersion: '2015-03-31',
endpoint: 'http://localhost:3000',
})
exports.noPayload = async function noPayload() {
const params... | 'use strict'
const { config, Lambda } = require('aws-sdk')
const { stringify } = JSON
config.update({
accessKeyId: 'ABC',
secretAccessKey: 'SECRET',
})
const lambda = new Lambda({
apiVersion: '2015-03-31',
endpoint: 'http://localhost:3000',
})
exports.noPayload = async function noPayload() {
const params... | Fix lambda invoke with no payload | Fix lambda invoke with no payload
| JavaScript | mit | dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline | ---
+++
@@ -32,7 +32,7 @@
const params = {
FunctionName: 'lambda-invoke-tests-dev-invokedHandler',
InvocationType: 'RequestResponse',
- Payload: stringify({ event: { foo: 'bar' } }),
+ Payload: stringify({ foo: 'bar' }),
}
const response = await lambda.invoke(params).promise() |
9a38407db4740cb027f40cf2dbd7c4fbf3996816 | test/e2e/view-offender-manager-overview.js | test/e2e/view-offender-manager-overview.js | const expect = require('chai').expect
const dataHelper = require('../helpers/data/aggregated-data-helper')
var workloadOwnerId
var workloadOwnerGrade
describe('View overview', function () {
before(function () {
return dataHelper.selectIdsForWorkloadOwner()
.then(function (results) {
var workloadO... | const expect = require('chai').expect
const dataHelper = require('../helpers/data/aggregated-data-helper')
var workloadOwnerId
var workloadOwnerGrade
describe('View overview', function () {
before(function () {
return dataHelper.selectIdsForWorkloadOwner()
.then(function (results) {
var workloadO... | Use the first workload owner id in e2e test | Use the first workload owner id in e2e test
| JavaScript | mit | ministryofjustice/wmt-web,ministryofjustice/wmt-web | ---
+++
@@ -10,7 +10,7 @@
return dataHelper.selectIdsForWorkloadOwner()
.then(function (results) {
var workloadOwnerIds = results.filter((item) => item.table === 'workload_owner')
- workloadOwnerId = workloadOwnerIds[workloadOwnerIds.length - 1].id
+ workloadOwnerId = workloadOwnerI... |
72be6e08669779cbd6a6ed55d56cfb45b857dc95 | share/spice/tfl_status/tfl_status.js | share/spice/tfl_status/tfl_status.js | (function (env) {
"use strict";
env.ddg_spice_tfl_status = function(api_result){
Spice.add({
id: "tfl_status",
name: "Travel",
data: api_result,
meta: {
sourceName: "tfl.gov.uk",
sourceUrl: 'http://tfl.gov.uk/tube-dlr-overground/stat... | (function (env) {
"use strict";
env.ddg_spice_tfl_status = function(api_result){
Spice.add({
id: "tfl_status",
name: "Travel",
data: api_result,
meta: {
sourceName: "tfl.gov.uk",
sourceUrl: 'http://tfl.gov.uk/tube-dlr-overground/stat... | Fix for the "More at..." link to correct lineId | Fix for the "More at..." link to correct lineId
The sourceUrl link which controls the "More at tfl.gov.uk" href is now
fixed to link to the correct anchor for the line in question. This will
open the further information accordion and zoom the SVG map to the
correct line. (There appears to be an issue with the lineIds ... | JavaScript | apache-2.0 | sagarhani/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,navjotahuja92/zeroclicki... | ---
+++
@@ -8,7 +8,7 @@
data: api_result,
meta: {
sourceName: "tfl.gov.uk",
- sourceUrl: 'http://tfl.gov.uk/tube-dlr-overground/status/#line-' + api_result.id,
+ sourceUrl: 'http://tfl.gov.uk/tube-dlr-overground/status/#line-' + api_result[0].id,
},
... |
798f0a318578df8f91744accf1ec1a55310ee6ef | docs/ember-cli-build.js | docs/ember-cli-build.js | /*jshint node:true*/
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
// Add options here
});
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you ... | /*jshint node:true*/
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
fingerprint: {
prepend: '/Julz.jl/'
}
});
// Use `app.import` to add additional libraries to the generated
// out... | Prepend ember fingerprints with Julz.jl path | Prepend ember fingerprints with Julz.jl path | JavaScript | mit | djsegal/julz,djsegal/julz | ---
+++
@@ -4,7 +4,9 @@
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
- // Add options here
+ fingerprint: {
+ prepend: '/Julz.jl/'
+ }
});
// Use `app.import` to add additional libraries to the generated |
b1d90a138b7d285c0764d930b5b430b4e49ac2b0 | milliseconds-to-iso-8601-duration.js | milliseconds-to-iso-8601-duration.js | (function (millisecondsToISO8601Duration) {
'use strict';
millisecondsToISO8601Duration.iso8601duration = function(milliseconds) {
var offset = Math.floor(milliseconds);
var milliseconds = offset % 1000;
offset = Math.floor(offset / 1000);
var seconds = offset % 60;
offset = Math.floor(offset / 60);
var ... | (function (millisecondsToISO8601Duration) {
'use strict';
millisecondsToISO8601Duration.iso8601duration = function(milliseconds) {
var offset = Math.floor(milliseconds);
var milliseconds = offset % 1000;
offset = Math.floor(offset / 1000);
var seconds = offset % 60;
offset = Math.floor(offset / 60);
var ... | Handle zero-padding for millisecond component | Handle zero-padding for millisecond component
Fixes tests for 1 and 12 milliseconds.
| JavaScript | mit | wking/milliseconds-to-iso-8601-duration,wking/milliseconds-to-iso-8601-duration | ---
+++
@@ -26,6 +26,10 @@
if (seconds || milliseconds) {
parts.push(seconds);
if (milliseconds) {
+ milliseconds = milliseconds.toString();
+ while (milliseconds.length < 3) {
+ milliseconds = '0' + milliseconds;
+ }
parts.push('.' + milliseconds);
}
parts.push('S'); |
955e8af495b9e43585fd088c8ed21fa92fb6307b | imports/api/events.js | imports/api/events.js | import { Mongo } from 'meteor/mongo';
export const Events = new Mongo.Collection('events');
| import { Mongo } from 'meteor/mongo';
import { ValidatedMethod } from 'meteor/mdg:validated-method';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
export const Events = new Mongo.Collection('events');
Events.deny({
insert() {
return true;
},
update() {
return true;
},
remove() {
re... | Add method to create an event | Add method to create an event
| JavaScript | mit | f-martinez11/ActiveU,f-martinez11/ActiveU | ---
+++
@@ -1,3 +1,43 @@
import { Mongo } from 'meteor/mongo';
+import { ValidatedMethod } from 'meteor/mdg:validated-method';
+import { SimpleSchema } from 'meteor/aldeed:simple-schema';
export const Events = new Mongo.Collection('events');
+
+Events.deny({
+ insert() {
+ return true;
+ },
+ update() {
+ ... |
c335e4816d0d7037dc2d9ea3fb02005612e16d9a | rollup.config.js | rollup.config.js | import uglify from "rollup-plugin-uglify"
export default {
plugins: [
uglify()
]
}
| import uglify from "rollup-plugin-uglify"
export default {
plugins: [
uglify({
compress: {
collapse_vars: true,
pure_funcs: ["Object.defineProperty"]
}
})
]
}
| Optimize uglifyjs's output via options. | Optimize uglifyjs's output via options.
| JavaScript | mit | jbucaran/hyperapp,hyperapp/hyperapp,hyperapp/hyperapp | ---
+++
@@ -2,7 +2,11 @@
export default {
plugins: [
- uglify()
+ uglify({
+ compress: {
+ collapse_vars: true,
+ pure_funcs: ["Object.defineProperty"]
+ }
+ })
]
}
- |
fd9b4b9c8f7196269f84a77522bf3fd90ee360ff | www/js/load-ionic.js | www/js/load-ionic.js | (function () {
var options = (function () {
// Holy shit
var optionsArray = location.href.split('?')[1].split('#')[0].split('=')
var result = {}
optionsArray.forEach(function (value, index) {
// 0 is a property name and 1 the value of 0
if (index % 2 === 1) {
return
}
... | (function () {
var options = (function () {
// Holy shit
var optionsArray
var result = {}
try {
optionsArray = location.href.split('?')[1].split('#')[0].split('=')
} catch (e) {
return {}
}
optionsArray.forEach(function (value, index) {
// 0 is a property name and 1 th... | Fix error `cannot read split of undefined` | Fix error `cannot read split of undefined`
| JavaScript | mit | IonicBrazil/ionic-garden,Jandersoft/ionic-garden,IonicBrazil/ionic-garden,Jandersoft/ionic-garden | ---
+++
@@ -2,8 +2,14 @@
var options = (function () {
// Holy shit
- var optionsArray = location.href.split('?')[1].split('#')[0].split('=')
+ var optionsArray
var result = {}
+
+ try {
+ optionsArray = location.href.split('?')[1].split('#')[0].split('=')
+ } catch (e) {
+ return ... |
7571f2b5b4ecca329cf508ef07dd113e6dbe53fc | resources/assets/js/bootstrap.js | resources/assets/js/bootstrap.js |
window._ = require('lodash');
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
window.$ = window.jQuery = require('jquery');
require('boot... |
window._ = require('lodash');
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
window.$ = window.jQuery = require('jquery');
require('boot... | Use module name instead of path | Use module name instead of path | JavaScript | apache-2.0 | zhiyicx/thinksns-plus,beautifultable/phpwind,cbnuke/FilesCollection,orckid-lab/dashboard,zeropingheroes/lanyard,slimkit/thinksns-plus,tinywitch/laravel,hackel/laravel,cbnuke/FilesCollection,zhiyicx/thinksns-plus,zeropingheroes/lanyard,remxcode/laravel-base,hackel/laravel,orckid-lab/dashboard,beautifultable/phpwind,zero... | ---
+++
@@ -8,7 +8,7 @@
*/
window.$ = window.jQuery = require('jquery');
-require('bootstrap-sass/assets/javascripts/bootstrap');
+require('bootstrap-sass');
/**
* Vue is a modern JavaScript library for building interactive web interfaces |
b26c2afa7c54ead6d5c3ed608bc45a31e9d51e0f | addon/components/scroll-to-here.js | addon/components/scroll-to-here.js | import Ember from 'ember';
import layout from '../templates/components/scroll-to-here';
export default Ember.Component.extend({
layout: layout
});
| import Ember from 'ember';
import layout from '../templates/components/scroll-to-here';
let $ = Ember.$;
function Window() {
let w = $(window);
this.top = w.scrollTop();
this.bottom = this.top + (w.prop('innerHeight') || w.height());
}
function Target(selector) {
let target = $(selector);
this.isEmpty = ... | Add scroll to here logic | Add scroll to here logic
| JavaScript | mit | ember-montevideo/ember-cli-scroll-to-here,ember-montevideo/ember-cli-scroll-to-here | ---
+++
@@ -1,6 +1,45 @@
import Ember from 'ember';
import layout from '../templates/components/scroll-to-here';
+let $ = Ember.$;
+
+function Window() {
+ let w = $(window);
+
+ this.top = w.scrollTop();
+ this.bottom = this.top + (w.prop('innerHeight') || w.height());
+}
+
+function Target(selector) {
+ let... |
e5350251a99d92dc75c3db04674ed6044029f920 | addon/initializers/simple-token.js | addon/initializers/simple-token.js | import TokenAuthenticator from '../authenticators/token';
export function initialize(application) {
application.register('authenticator:token', TokenAuthenticator);
}
export default {
name: 'simple-token',
initialize
};
| import TokenAuthenticator from '../authenticators/token';
import TokenAuthorizer from '../authorizers/token';
export function initialize(application) {
application.register('authenticator:token', TokenAuthenticator);
application.register('authorizer:token', TokenAuthorizer);
}
export default {
name: 'simple-tok... | Fix authorizer missing from container | Fix authorizer missing from container
Using routes with authorization was failing because the container didn't
contain a definition for the factory. Adding the authorizer in the
initialization fixes this.
Fixes issue #6
| JavaScript | mit | datajohnny/ember-simple-token,datajohnny/ember-simple-token | ---
+++
@@ -1,7 +1,9 @@
import TokenAuthenticator from '../authenticators/token';
+import TokenAuthorizer from '../authorizers/token';
export function initialize(application) {
application.register('authenticator:token', TokenAuthenticator);
+ application.register('authorizer:token', TokenAuthorizer);
}
e... |
6ba02cc85b13ddd89ef7a787feee9398dff24c68 | scripts/start.js | scripts/start.js | // This script is used to serve the built files in production and proxy api requests to the service.
// Would be preferrable to replace with apache.
const express = require('express');
const proxy = require('express-http-proxy');
const compression = require('compression');
const path = require('path');
const app = ex... | // This script is used to serve the built files in production and proxy api requests to the service.
// Would be preferrable to replace with apache.
const express = require('express');
const proxy = require('express-http-proxy');
const compression = require('compression');
const path = require('path');
const app = ex... | Remove acme challenge and enable forcing https | Remove acme challenge and enable forcing https
| JavaScript | mit | TulevaEE/onboarding-client,TulevaEE/onboarding-client,TulevaEE/onboarding-client | ---
+++
@@ -8,20 +8,17 @@
const app = express();
-// function forceHttps(request, response, next) {
-// if (request.headers['x-forwarded-proto'] !== 'https') {
-// return response.redirect(301, `https://${request.get('host')}${request.url}`);
-// }
-// return next();
-// }
+function forceHttps(request,... |
0095363683a71a75de3da3470fc65fe4aa7da5ab | src/client/js/controllers/plusMin.js | src/client/js/controllers/plusMin.js | import app from '../app';
import '../services/PlusMinClient';
app.controller('plusMinController', function ($element, $scope, $http, PlusMinClient) {
let client = PlusMinClient;
$scope.state = 'loading';
$scope.toState = function (state) {
$scope.state = state;
};
$scope.openList = function (list) {
... | import app from '../app';
import '../services/PlusMinClient';
app.controller('plusMinController', function ($element, $scope, $http, PlusMinClient) {
let client = PlusMinClient;
$scope.state = 'loading';
$scope.toState = function (state) {
$scope.state = state;
};
$scope.openList = function (list) {
... | Add list editor and list selector | Add list editor and list selector
| JavaScript | mit | LuudJanssen/plus-min-list,LuudJanssen/plus-min-list,LuudJanssen/plus-min-list | ---
+++
@@ -33,16 +33,8 @@
if (lists.length === 0) {
$scope.list = {
new: true,
- positives: [{
- title: 'Positief dingetje 1'
- }, {
- title: 'Positief dingetje 2'
- }, {
- title: 'Positief dingetje 3'
- }],
- ne... |
1adbfa5376dc39faacbc4993a64c599409aadff4 | static/js/order_hardware_software.js | static/js/order_hardware_software.js | $(document).ready(function () {
if (!id_category_0.checked && !id_category_1.checked){
$("#id_institution").parents('.row').hide();
$("#id_department").parents('.row').hide();
}
$("#id_category_0").click(function () {
$("#id_institution").parents('.row').show();
$("#id_depart... | $(document).ready(function () {
if (!id_category_0.checked && !id_category_1.checked){
$("#id_institution").parents('.row').hide();
$("#id_department").parents('.row').hide();
}
$("#id_category_0").click(function () {
$("#id_institution").parents('.row').show();
$("#id_depart... | Hide fields if "Consumption items" is selected | Hide fields if "Consumption items" is selected
| JavaScript | mpl-2.0 | neuromat/nira,neuromat/nira,neuromat/nira | ---
+++
@@ -11,6 +11,10 @@
$("#id_institution").parents('.row').hide();
$("#id_department").parents('.row').hide();
});
+ if (id_category_1.checked){
+ $("#id_institution").parents('.row').hide();
+ $("#id_department").parents('.row').hide();
+ }
});
function ajax_filter... |
17f3f1fb9967f3db50d0997d7be480726aaf0219 | server/models/user.js | server/models/user.js | module.exports = (sequelize, DataTypes) => {
const User = sequelize.define('User', {
username: {
type: DataTypes.STRING,
allowNull: false,
unique: true,
},
password: {
type: DataTypes.STRING,
allowNull: false,
},
email: {
type: DataTypes.STRING,
allowNull:... | module.exports = (sequelize, DataTypes) => {
const User = sequelize.define('User', {
username: {
type: DataTypes.STRING,
allowNull: false,
unique: true,
},
password: {
type: DataTypes.STRING,
allowNull: false,
},
email: {
type: DataTypes.STRING,
allowNull:... | Edit model associations using new syntax | Edit model associations using new syntax
| JavaScript | mit | 3m3kalionel/PostIt,3m3kalionel/PostIt | ---
+++
@@ -15,20 +15,17 @@
unique: true
},
salt: DataTypes.STRING
- }, {
- classMethods: {
- associate(models) {
- User.hasMany(models.Message, {
- foreignKey: 'userId',
- as: 'userMessages'
- });
- User.belongsToMany(models.Group, {
- as: 'Me... |
ff3993c6583b331bd5326aeaa6a710517c6bdab6 | packages/npm-bcrypt/package.js | packages/npm-bcrypt/package.js | Package.describe({
summary: "Wrapper around the bcrypt npm package",
version: "0.9.2",
documentation: null
});
Npm.depends({
bcryptjs: "2.3.0"
});
Package.onUse(function (api) {
api.use("modules@0.7.5", "server");
api.mainModule("wrapper.js", "server");
api.export("NpmModuleBcrypt", "server");
});
| Package.describe({
summary: "Wrapper around the bcrypt npm package",
version: "0.9.2",
documentation: null
});
Npm.depends({
bcryptjs: "2.3.0"
});
Package.onUse(function (api) {
api.use("modules", "server");
api.mainModule("wrapper.js", "server");
api.export("NpmModuleBcrypt", "server");
});
| Remove pinned version of `modules` from `npm-bcrypt`. | Remove pinned version of `modules` from `npm-bcrypt`.
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | ---
+++
@@ -9,7 +9,7 @@
});
Package.onUse(function (api) {
- api.use("modules@0.7.5", "server");
+ api.use("modules", "server");
api.mainModule("wrapper.js", "server");
api.export("NpmModuleBcrypt", "server");
}); |
7ffd6936bd40a5a47818f51864a6eb86ed286e56 | packages/phenomic/src/index.js | packages/phenomic/src/index.js | /**
* @flow
*/
import path from "path"
import flattenConfiguration from "./configuration/flattenConfiguration"
import start from "./commands/start"
import build from "./commands/build"
function normalizeConfiguration(config: PhenomicInputConfig): PhenomicConfig {
return {
path: config.path || process.cwd(),
... | /**
* @flow
*/
import path from "path"
import flattenConfiguration from "./configuration/flattenConfiguration"
import start from "./commands/start"
import build from "./commands/build"
const normalizePlugin = (plugin) => {
if (!plugin) {
throw new Error(
"phenomic: You provided an undefined plugin"
... | Add poor validation for plugins | Add poor validation for plugins
| JavaScript | mit | MoOx/statinamic,MoOx/phenomic,phenomic/phenomic,MoOx/phenomic,pelhage/phenomic,phenomic/phenomic,MoOx/phenomic,phenomic/phenomic | ---
+++
@@ -7,13 +7,33 @@
import start from "./commands/start"
import build from "./commands/build"
+const normalizePlugin = (plugin) => {
+ if (!plugin) {
+ throw new Error(
+ "phenomic: You provided an undefined plugin"
+ )
+ }
+
+ if (typeof plugin !== "function") {
+ throw new Error(
+ "... |
4d9a9d30326bda7d88b4877a9e75c94949df79ca | plugins/kalabox-core/events.js | plugins/kalabox-core/events.js | 'use strict';
module.exports = function(kbox) {
var events = kbox.core.events;
var deps = kbox.core.deps;
var envs = [];
// EVENT: pre-engine-create
events.on('pre-engine-create', function(createOptions, done) {
var codeRoot = deps.lookup('globalConfig').codeDir;
var kboxCode = 'KBOX_CODEDIR=' + co... | 'use strict';
var _ = require('lodash');
module.exports = function(kbox) {
var events = kbox.core.events;
var deps = kbox.core.deps;
// EVENT: pre-engine-create
events.on('pre-engine-create', function(createOptions, done) {
var envs = [];
var codeRoot = deps.lookup('globalConfig').codeDir;
var k... | Fix some ENV add bugs | Fix some ENV add bugs
| JavaScript | mit | kalabox/kalabox-cli,rabellamy/kalabox,ManatiCR/kalabox,RobLoach/kalabox,RobLoach/kalabox,ari-gold/kalabox,rabellamy/kalabox,oneorangecat/kalabox,ManatiCR/kalabox,oneorangecat/kalabox,ari-gold/kalabox,kalabox/kalabox-cli | ---
+++
@@ -1,13 +1,15 @@
'use strict';
+
+var _ = require('lodash');
module.exports = function(kbox) {
var events = kbox.core.events;
var deps = kbox.core.deps;
- var envs = [];
// EVENT: pre-engine-create
events.on('pre-engine-create', function(createOptions, done) {
+ var envs = [];
va... |
cd841f91370e770e73992e3bf8cd0930c4fa4e82 | assets/javascript/head.scripts.js | assets/javascript/head.scripts.js | /**
* head.script.js
*
* Essential scripts, to be loaded in the head of the document
* Use gruntfile.js to include the necessary script files.
*/
// Load respimage if <picture> element is not supported
if(!window.HTMLPictureElement){
enhance.loadJS('/assets/javascript/lib/polyfills/respimage.min.js');
}
| /**
* head.script.js
*
* Essential scripts, to be loaded in the head of the document
* Use gruntfile.js to include the necessary script files.
*/
// Load respimage if <picture> element is not supported
if(!window.HTMLPictureElement) {
document.createElement('picture');
enhance.loadJS('/assets/javascript/lib/pol... | Create hidden picture element when respimage is loaded. | Create hidden picture element when respimage is loaded.
Seen in this example: https://github.com/fabianmichael/kirby-imageset#23-template-setup.
| JavaScript | mit | jolantis/artlantis,jolantis/artlantis | ---
+++
@@ -6,6 +6,7 @@
*/
// Load respimage if <picture> element is not supported
-if(!window.HTMLPictureElement){
+if(!window.HTMLPictureElement) {
+ document.createElement('picture');
enhance.loadJS('/assets/javascript/lib/polyfills/respimage.min.js');
} |
b62647e8f52c9646d7f4f6eb789db1b84c94228a | scripts/replace-slack-link.js | scripts/replace-slack-link.js | // slack invite links expire after 30 days and you can't(at least as far as i can tell) create tokens for things like slackin anymore
const fs = require('fs')
const slackInviteLink = process.argv[2]
const siteHeaderPath = `${__dirname}/../site/src/components/SiteHeader.js`
const readmePath = `${__dirname}/../README.... | // slack invite links expire after 30 days and you can't(at least as far as i can tell) create tokens for things like slackin anymore
const fs = require('fs')
const slackInviteLink = process.argv[2]
const siteHeaderPath = `${__dirname}/../site/src/components/SiteHeader.js`
const readmePath = `${__dirname}/../README.... | Fix regex to comply with no-useless-escape ESLint rule | Fix regex to comply with no-useless-escape ESLint rule
| JavaScript | mit | tkh44/emotion,emotion-js/emotion,tkh44/emotion,emotion-js/emotion,emotion-js/emotion,emotion-js/emotion | ---
+++
@@ -7,7 +7,7 @@
const siteHeaderPath = `${__dirname}/../site/src/components/SiteHeader.js`
const readmePath = `${__dirname}/../README.md`
-const slackInviteLinkRegex = /https:\/\/join\.slack\.com\/t\/emotion-slack\/shared_invite\/[^\/]+\//
+const slackInviteLinkRegex = /https:\/\/join\.slack\.com\/t\/emot... |
7292d5c3db9d8a274567735d6bde06e8dcbd2b7b | src/clincoded/static/libs/render_variant_title.js | src/clincoded/static/libs/render_variant_title.js | 'use strict';
import React from 'react';
/**
* Method to display the title of a variant.
* 1st option is the ClinVar Preferred Title if it's present.
* 2nd alternative is a string constructed with the canonical transcript, gene symbol and protein change.
* The fallback is the GRCh38 NC_ HGVS name.
* @param {objec... | 'use strict';
import React from 'react';
/**
* Method to display the title of a variant.
* 1st option is the ClinVar Preferred Title if it's present.
* 2nd alternative is a string constructed with the canonical transcript, gene symbol and protein change.
* The fallback is the GRCh38 NC_ HGVS name.
* @param {objec... | Add option to only return a string instead of JSX | Add option to only return a string instead of JSX
| JavaScript | mit | ClinGen/clincoded,ClinGen/clincoded,ClinGen/clincoded,ClinGen/clincoded,ClinGen/clincoded | ---
+++
@@ -7,8 +7,9 @@
* 2nd alternative is a string constructed with the canonical transcript, gene symbol and protein change.
* The fallback is the GRCh38 NC_ HGVS name.
* @param {object} variant - A variant object
+ * @param {boolean} stringOnly - Whether the output should be just string
*/
-export functi... |
cbec0d253d7b451cb5584329b21900dbbce7ab19 | src/components/common/SourceOrCollectionWidget.js | src/components/common/SourceOrCollectionWidget.js | import PropTypes from 'prop-types';
import React from 'react';
import { Col } from 'react-flexbox-grid/lib';
import { DeleteButton } from './IconButton';
const SourceOrCollectionWidget = (props) => {
const { object, onDelete, onClick, children } = props;
const isCollection = object.tags_id !== undefined;
const ... | import PropTypes from 'prop-types';
import React from 'react';
import { Col } from 'react-flexbox-grid/lib';
import { DeleteButton } from './IconButton';
const SourceOrCollectionWidget = (props) => {
const { object, onDelete, onClick, children } = props;
const isCollection = object.tags_id !== undefined;
const ... | Handle list of media/collections that aren't clickable | Handle list of media/collections that aren't clickable
| JavaScript | apache-2.0 | mitmedialab/MediaCloud-Web-Tools,mitmedialab/MediaCloud-Web-Tools,mitmedialab/MediaCloud-Web-Tools,mitmedialab/MediaCloud-Web-Tools | ---
+++
@@ -10,17 +10,22 @@
const typeClass = isCollection ? 'collection' : 'source';
const objectId = object.id || (isCollection ? object.tags_id : object.media_id);
const name = isCollection ? (object.name || object.label || object.tag) : (object.name || object.label || object.url);
+ // link the text if ... |
1960321adb5c7fcc17fea23e0e313c94bb34de2e | TabBar.js | TabBar.js | 'use strict';
import React, {
Animated,
Platform,
StyleSheet,
View,
} from 'react-native';
import Layout from './Layout';
export default class TabBar extends React.Component {
static propTypes = {
...View.propTypes,
shadowStyle: View.propTypes.style,
};
render() {
return (
<Animated.... | 'use strict';
import React, {
Animated,
Platform,
StyleSheet,
View,
} from 'react-native';
import Layout from './Layout';
export default class TabBar extends React.Component {
static propTypes = {
...Animated.View.propTypes,
shadowStyle: View.propTypes.style,
};
render() {
return (
<... | Use 'Animated.View.propTypes' to avoid warnings. | Use 'Animated.View.propTypes' to avoid warnings.
The propTypes Validation must be based on `Animated.View.propTypes` instead of just `View.propTypes`
otherwise a Warning is displayed when passing Animated values to TabBar. | JavaScript | mit | exponentjs/react-native-tab-navigator | ---
+++
@@ -11,7 +11,7 @@
export default class TabBar extends React.Component {
static propTypes = {
- ...View.propTypes,
+ ...Animated.View.propTypes,
shadowStyle: View.propTypes.style,
};
|
89b7985d0b21fe006d54f613ea7dc6625d5525f5 | src/server/modules/counter/subscriptions_setup.js | src/server/modules/counter/subscriptions_setup.js | export default {
countUpdated: () => ({
// Run the query each time count updated
countUpdated: () => true
})
};
| export default {
countUpdated: () => ({
// Run the query each time count updated
countUpdated: {
filter: () => {
return true;
}
}
})
};
| Fix Counter subscription filter definition | Fix Counter subscription filter definition
| JavaScript | mit | sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit | ---
+++
@@ -1,6 +1,10 @@
export default {
countUpdated: () => ({
// Run the query each time count updated
- countUpdated: () => true
+ countUpdated: {
+ filter: () => {
+ return true;
+ }
+ }
})
}; |
cb1a3ff383ef90b56d3746f4ed9ea193402a08b9 | web_client/models/AnnotationModel.js | web_client/models/AnnotationModel.js | import _ from 'underscore';
import Model from 'girder/models/Model';
import ElementCollection from '../collections/ElementCollection';
import convert from '../annotations/convert';
export default Model.extend({
resourceName: 'annotation',
defaults: {
'annotation': {}
},
initialize() {
... | import _ from 'underscore';
import Model from 'girder/models/Model';
import ElementCollection from '../collections/ElementCollection';
import convert from '../annotations/convert';
export default Model.extend({
resourceName: 'annotation',
defaults: {
'annotation': {}
},
initialize() {
... | Update annotation on reset events | Update annotation on reset events
| JavaScript | apache-2.0 | girder/large_image,DigitalSlideArchive/large_image,DigitalSlideArchive/large_image,girder/large_image,girder/large_image,DigitalSlideArchive/large_image | ---
+++
@@ -17,7 +17,7 @@
);
this._elements.annotation = this;
- this.listenTo(this._elements, 'change add remove', () => {
+ this.listenTo(this._elements, 'change add remove reset', () => {
// copy the object to ensure a change event is triggered
var annota... |
aaf220bd9c37755bcf3082098c3df96d7a197001 | webpack/webpack.config.base.babel.js | webpack/webpack.config.base.babel.js | import path from 'path';
const projectRoot = path.join(__dirname, '..');
export default {
cache: true,
entry: [
path.join(projectRoot, 'src', 'hibp.js'),
],
output: {
library: 'hibp',
libraryTarget: 'umd',
path: path.join(projectRoot, 'dist'),
},
module: {
rules: [
{
test... | import path from 'path';
const projectRoot = path.join(__dirname, '..');
export default {
cache: true,
entry: [
path.join(projectRoot, 'src', 'hibp.js'),
],
output: {
library: 'hibp',
libraryTarget: 'umd',
umdNamedDefine: true,
path: path.join(projectRoot, 'dist'),
},
module: {
rul... | Set the AMD module name in the UMD build | Set the AMD module name in the UMD build
| JavaScript | mit | wKovacs64/hibp,wKovacs64/hibp,wKovacs64/hibp | ---
+++
@@ -10,6 +10,7 @@
output: {
library: 'hibp',
libraryTarget: 'umd',
+ umdNamedDefine: true,
path: path.join(projectRoot, 'dist'),
},
module: { |
3b9cebffb70d2fc08b8cf48f86ceb27b42d8d9b4 | migrations/20131122023554-make-user-table.js | migrations/20131122023554-make-user-table.js | var dbm = require('db-migrate');
var type = dbm.dataType;
exports.up = function(db, callback) {
db.createTable('users', {
columns: {
id: { type: 'int', primaryKey: true, autoIncrement: true },
firstName: { type: 'string', notNull: true},
lastName: { type: 'string', notNull: true},
... | var dbm = require('db-migrate');
var type = dbm.dataType;
exports.up = function(db, callback) {
db.createTable('users', {
columns: {
id: { type: 'int', primaryKey: true, autoIncrement: true },
firstName: { type: 'string', notNull: true},
lastName: { type: 'string', notNull: true},
... | Call user migrate down callback | Call user migrate down callback
| JavaScript | bsd-3-clause | t3mpus/tempus-api | ---
+++
@@ -16,5 +16,6 @@
};
exports.down = function(db, callback) {
-
+ console.log('not dropping table users');
+ callback();
}; |
aa35d4f0801549420ae01f0be3c9dececaa6c345 | core/devMenu.js | core/devMenu.js | "use strict";
const electron = require("electron");
const {app} = electron;
const {Menu} = electron;
const {BrowserWindow} = electron;
module.exports.setDevMenu = function () {
var devMenu = Menu.buildFromTemplate([{
label: "Development",
submenu: [{
label: "Reload",
accele... | "use strict";
const electron = require("electron");
const {app} = electron;
const {Menu} = electron;
const {BrowserWindow} = electron;
module.exports.setDevMenu = function () {
var devMenu = Menu.buildFromTemplate([{
label: "Development",
submenu: [{
label: "Reload",
accele... | Change development reload shortcut to F5 | Change development reload shortcut to F5
This prevents interference when using bash's Ctrl-R command
| JavaScript | mit | petschekr/Chocolate-Shell,petschekr/Chocolate-Shell | ---
+++
@@ -10,7 +10,7 @@
label: "Development",
submenu: [{
label: "Reload",
- accelerator: "CmdOrCtrl+R",
+ accelerator: "F5",
click: function () {
BrowserWindow.getFocusedWindow().reload();
} |
0b54a083f4c1a3bdeb097fbf2462aa6d6bc484d5 | basis/jade/syntax_samples/index.js | basis/jade/syntax_samples/index.js | #!/usr/bin/env node
var assert = require('assert');
var jade = require('jade');
var source = [
'each v, i in list',
' div #{v},#{i}'
].join('\n');
var fn = jade.compile(source);
var html = fn({ list:['a', 'b', 'c'] });
assert.strictEqual(html, '<div>a,0</div><div>b,1</div><div>c,2</div>');
| #!/usr/bin/env node
var assert = require('assert');
var jade = require('jade');
var source = [
'each v, i in list',
' div #{v},#{i}'
].join('\n');
var fn = jade.compile(source);
var html = fn({ list:['a', 'b', 'c'] });
assert.strictEqual(html, '<div>a,0</div><div>b,1</div><div>c,2</div>');
// #{} と !{}
var sour... | Add a sample of jade | Add a sample of jade
| JavaScript | mit | kjirou/nodejs-codes | ---
+++
@@ -13,3 +13,15 @@
var html = fn({ list:['a', 'b', 'c'] });
assert.strictEqual(html, '<div>a,0</div><div>b,1</div><div>c,2</div>');
+
+
+// #{} と !{}
+var source = [
+'|#{str}',
+'|!{str}'
+].join('\n');
+
+var fn = jade.compile(source);
+var text = fn({ str:'a&b' });
+
+assert.strictEqual(text, 'a&b\... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.