commit stringlengths 40 40 | old_file stringlengths 4 236 | new_file stringlengths 4 236 | old_contents stringlengths 1 3.26k | new_contents stringlengths 16 4.43k | subject stringlengths 16 624 | message stringlengths 17 3.29k | lang stringclasses 5
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
53c000c7c048f8a8ccbd66415f94f7d079598961 | middleware/cors.js | middleware/cors.js | const leancloudHeaders = require('leancloud-cors-headers');
module.exports = function() {
return function(req, res, next) {
res.setHeader('Access-Control-Allow-Origin', req.headers.origin || '*');
if (req.method.toLowerCase() === 'options') {
res.statusCode = 200;
res.setHeader('Access-Control-M... | const leancloudHeaders = require('leancloud-cors-headers');
module.exports = function() {
return function(req, res, next) {
res.setHeader('Access-Control-Allow-Origin', req.headers.origin || '*');
if (req.method.toLowerCase() === 'options') {
res.statusCode = 200;
res.setHeader('Access-Control-M... | Fix Access-Control-Allow-Headers to single line | :rotating_light: Fix Access-Control-Allow-Headers to single line
| JavaScript | mit | leancloud/leanengine-node-sdk,sdjcw/leanengine-node-sdk |
4c44ced323cd3efba9b6590ceaa99e3915cf9f69 | code-generator-utils.js | code-generator-utils.js | define(function (require, exports, module) {
'use strict';
function CodeWriter(indentString) {
this.lines = [];
this.indentString = (indentString ? indentString : ' ');
this.indentations = [];
}
CodeWriter.prototype.indent = function () {
this.indentations.push(this.indentString);
};
Cod... | define(function (require, exports, module) {
'use strict';
function CodeWriter(indentString) {
this.lines = [];
this.indentString = (indentString ? indentString : ' ');
this.indentations = [];
}
CodeWriter.prototype.indent = function () {
this.indentations.push(this.indentString);
};
Cod... | Add function to generate general Ruby file name | Add function to generate general Ruby file name
| JavaScript | mit | meisyal/staruml-ruby |
60e6634acab3e41f3cee688b9379e21040763254 | public/js/index.js | public/js/index.js | $(document).ready(function(){
$('.log-btn').click(function(){
$('.log-status').addClass('wrong-entry');
$('.alert').fadeIn(500);
setTimeout( "$('.alert').fadeOut(1500);",3000 );
});
$('.form-control').keypress(function(){
$('.log-status').removeClass('wrong-entry');
});
});
function get... | $(document).ready(function(){
$('.log-btn').click(function(){
$('.log-status').addClass('wrong-entry');
$('.alert').fadeIn(500);
setTimeout( "$('.alert').fadeOut(1500);",3000 );
});
$('.form-control').keypress(function(){
$('.log-status').removeClass('wrong-entry');
});
});
function get... | Set the coutdown min and sec values to 00 when the deadline time has been reached. | Set the coutdown min and sec values to 00 when the deadline time has been reached.
| JavaScript | apache-2.0 | KalenWessel/lockandkey,KalenWessel/lockandkey,KalenWessel/lockandkey |
2dfa337cd2ccaf9bdd98c47c99b5180846285e57 | mods/lowtierrandom/formats-data.js | mods/lowtierrandom/formats-data.js | exports.BattleFormatsData = {
kangaskhanmega: {
randomBattleMoves: ["fakeout","return","suckerpunch","earthquake","poweruppunch","crunch"],
randomDoubleBattleMoves: ["fakeout","return","suckerpunch","earthquake","facade","poweruppunch","crunch"],
tier: "Uber"
}
};
| exports.BattleFormatsData = {
kangaskhanmega: {
randomBattleMoves: ["fakeout","return","suckerpunch","earthquake","poweruppunch","crunch"],
randomDoubleBattleMoves: ["fakeout","return","suckerpunch","earthquake","doubleedge","poweruppunch","crunch","protect"],
tier: "Uber"
},
altariamega: {
randomBattleMoves... | Remove various BL Megas from Low Tier Random | Remove various BL Megas from Low Tier Random | JavaScript | mit | lFernanl/Mudkip-Server,MayukhKundu/Technogear,MayukhKundu/Pokemon-Domain,yashagl/pokemon-showdown,TheManwithskills/DS,yashagl/pokemon,MayukhKundu/Flame-Savior,yashagl/yash-showdown,SkyeTheFemaleSylveon/Mudkip-Server,MayukhKundu/Flame-Savior,MayukhKundu/Technogear-Final,MayukhKundu/Mudkip-Server,MayukhKundu/Pokemon-Doma... |
04ad49650b7aca55d03a7a90097a038d6195345a | client/src/components/advancedSelectWidget/AdvancedSingleSelect.js | client/src/components/advancedSelectWidget/AdvancedSingleSelect.js | import AdvancedSelect, {
propTypes as advancedSelectPropTypes
} from "components/advancedSelectWidget/AdvancedSelect"
import { AdvancedSingleSelectOverlayTable } from "components/advancedSelectWidget/AdvancedSelectOverlayTable"
import * as FieldHelper from "components/FieldHelper"
import _isEmpty from "lodash/isEmpty... | import AdvancedSelect, {
propTypes as advancedSelectPropTypes
} from "components/advancedSelectWidget/AdvancedSelect"
import { AdvancedSingleSelectOverlayTable } from "components/advancedSelectWidget/AdvancedSelectOverlayTable"
import * as FieldHelper from "components/FieldHelper"
import _isEmpty from "lodash/isEmpty... | Fix required value prop failing on null values | Fix required value prop failing on null values
| JavaScript | mit | NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet |
361ae111b35cc261cfad3f1b37477b93dc15cbda | client/src/components/Form.js | client/src/components/Form.js | import React from 'react'
const Form = ({fields, handleChange, handleSubmit, submitValue, message}) => {
const formFields = fields.map(field => {
return (
<div>
<label>{field.label} </label>
<input type={field.type} name={field.name} value={field.value} onChange={handleChange} /><br />
... | import React from 'react'
const Form = ({fields, handleChange, handleSubmit, submitValue, message}) => {
const formFields = fields.map(field => {
return (
<div>
<label>{field.label} </label>
<input type={field.type} name={field.name} value={field.value} onChange={handleChange} /><br />
... | Add message prop and display | Add message prop and display
| JavaScript | mit | kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed |
7bc420a4da3b05819b57737b37d1fc8bae6f729b | coderstats/data/coderstats.js | coderstats/data/coderstats.js | var link = document.getElementsByClassName('octicon-link')[0],
path = document.location.pathname,
details,
login,
url;
if (m = path.match(/^\/([\w-]+)\??.*?/)) {
login = m[1].trim();
if (-1 === ['timeline', 'languages', 'blog', 'explore'].indexOf(login)) {
url = 'http://coderstats.net/g... | var path = document.location.pathname,
details,
login,
url;
if (m = path.match(/^\/([\w-]+)\??.*?/)) {
login = m[1].trim();
if (-1 === ['timeline', 'languages', 'blog', 'explore'].indexOf(login)) {
url = 'http://coderstats.net/github/' + login + '/';
details = document.getElementsBy... | Append CoderStats link rather than cloning posibly non-existing link item. Don't listen on DOMSubtreeModified event | Append CoderStats link rather than cloning posibly non-existing link item.
Don't listen on DOMSubtreeModified event
| JavaScript | mit | coderstats/fxt_coderstats |
2087652170835f7542746d81f2e693738dce1210 | packages/vulcan-lib/lib/server/utils.js | packages/vulcan-lib/lib/server/utils.js | import sanitizeHtml from 'sanitize-html';
import { Utils } from '../modules';
import { throwError } from './errors.js';
Utils.sanitizeAllowedTags = [
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul',
'ol', 'nl', 'li', 'b', 'i', 'u', 'strong', 'em', 'strike',
'code', 'hr', 'br', 'div', 'table', 't... | import sanitizeHtml from 'sanitize-html';
import { Utils } from '../modules';
import { throwError } from './errors.js';
Utils.sanitizeAllowedTags = [
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul',
'ol', 'nl', 'li', 'b', 'i', 'u', 'strong', 'em', 'strike',
'code', 'hr', 'br', 'div', 'table', 't... | Allow srcset attribute on images | Allow srcset attribute on images
| JavaScript | mit | Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2 |
47e8d2692ea40a3a8d31433f53ac530c8bea85cf | tests/dummy/app/routes/nodes/detail/draft-registrations/detail.js | tests/dummy/app/routes/nodes/detail/draft-registrations/detail.js | import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
let node = this.modelFor('nodes.detail');
this.store.adapterFor('draft-registration').set('namespace', 'v2/nodes/' + node.id);
var draft = this.store.findRecord('draft-registration', params.draft_registration_id)... | import Ember from 'ember';
import config from 'ember-get-config';
export default Ember.Route.extend({
model(params) {
let node = this.modelFor('nodes.detail');
this.store.adapterFor('draft-registration').set('namespace', config.OSF.apiNamespace + '/nodes/' + node.id);
var draft = this.store... | Use config.OSF.apiNamespace instead of hardcoding original namespace. | Use config.OSF.apiNamespace instead of hardcoding original namespace.
| JavaScript | apache-2.0 | chrisseto/ember-osf,binoculars/ember-osf,jamescdavis/ember-osf,cwilli34/ember-osf,hmoco/ember-osf,baylee-d/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,hmoco/ember-osf,cwilli34/ember-osf,pattisdr/ember-osf,CenterForOpenScience/ember-osf,binoculars/ember-osf,pattisdr/ember-osf,jamescdavis/ember-osf,crcres... |
d19531fe58474652b45f133fcc8cf34724c6e965 | tests/integration/components/maintenance-banner/component-test.js | tests/integration/components/maintenance-banner/component-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('maintenance-banner', 'Integration | Component | maintenance banner', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('maintenance-banner', 'Integration | Component | maintenance banner', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
... | Test no longer checks for blank, checks that it spits out somehting | Test no longer checks for blank, checks that it spits out somehting
| JavaScript | apache-2.0 | jamescdavis/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,binoculars/ember-osf,jamescdavis/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,binoculars/ember-osf |
26e7eb17fcdc93d0356d7a8ef60d3ab5a430d394 | app/lib/db.js | app/lib/db.js | const path = require('path');
const fs = require('fs');
const streamsql = require('streamsql');
const config = require('./config');
const configStore = require('../../lib/config.js');
const dbm = require('db-migrate')
var env = config('DATABASE_ENVIRONMENT', 'dev');
dbm.config.load(path.join(__dirname, '../../database... | const path = require('path');
const fs = require('fs');
const streamsql = require('streamsql');
const config = require('./config');
const configStore = require('config-store');
const dbm = require('db-migrate')
var env = config('DATABASE_ENVIRONMENT', 'dev');
dbm.config.load(path.join(__dirname, '../../database.json')... | Use lib from npm instead of ./lib | Use lib from npm instead of ./lib
| JavaScript | mpl-2.0 | phusion/openbadges-badgekit,larssvekis/openbadges-badgekit,mozilla/openbadges-badgekit,larssvekis/openbadges-badgekit,friedger/openbadges-badgekit,friedger/openbadges-badgekit,mozilla/openbadges-badgekit,phusion/openbadges-badgekit,bethadele/openbadges-badgekit,bethadele/openbadges-badgekit |
8c0c4f4f3016cca574878c27be9ecbeebc4e844d | app/routes.js | app/routes.js | import React from 'react';
import { Route } from 'react-router';
import App from 'containers/App';
import HomePage from 'containers/HomePage';
import LoginPage from 'containers/LoginPage';
import UserReservationsPage from 'containers/UserReservationsPage';
import NotFoundPage from 'containers/NotFoundPage';
import Res... | import React from 'react';
import { Route } from 'react-router';
import App from 'containers/App';
import HomePage from 'containers/HomePage';
import LoginPage from 'containers/LoginPage';
import UserReservationsPage from 'containers/UserReservationsPage';
import NotFoundPage from 'containers/NotFoundPage';
import Res... | Fix Facebook "_=_" appended hash issue | Fix Facebook "_=_" appended hash issue
Refs #104.
| JavaScript | mit | fastmonkeys/respa-ui |
664d631ff80e2d1adf29138cb0ccfbb3c3412155 | src/config/index.js | src/config/index.js | var defaults = require('./defaults.json'),
_ = require('lodash'),
path = require('path'),
fs = require('fs'),
mkpath = require('mkpath'),
home = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'],
configDir = path.join(home, ".config"),
configPath = path.join(configDir, "ymklogue.json"),
... | var defaults = require('./defaults.json'),
_ = require('lodash'),
path = require('path'),
fs = require('fs'),
mkpath = require('mkpath'),
home = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'],
configDir = path.join(home, ".config"),
configPath = path.join(configDir, "ymklogue.json"),
... | Fix small issue with contsantly copying over the hidden chans | Fix small issue with contsantly copying over the hidden chans
| JavaScript | mit | YaManicKill/ymklogue,YaManicKill/ymklogue |
332a33c2f48a1cca5ad01eb3a18600fc9c0e28f1 | web/static/js/views/insight_chart_view.js | web/static/js/views/insight_chart_view.js | App.InsightChartView = Em.View.extend({
classNames: ["chart"],
thumbNailBinding: "controller.thumbNail",
width:null,
height: null,
viz: null,
specUpdated: function(){
var spec = this.get("controller.spec"),
element = this.get("element"),
documents = this.get("controller.controllers.q... | App.InsightChartView = Em.View.extend({
classNames: ["chart"],
thumbNailBinding: "controller.thumbNail",
width:null,
height: null,
viz: null,
updateProps: ["controller.spec", "controller.controllers.query.records.@each"],
specUpdated: function(){
var spec = this.get("controller.spec"),
el... | Stop observing value changes when the view is unloaded. | Stop observing value changes when the view is unloaded. | JavaScript | mpl-2.0 | mozilla/caravela,mozilla/caravela,mozilla/caravela,mozilla/caravela |
82ab743f3c119e1036151c7a68d506c35bd6396e | components/link/Link.js | components/link/Link.js | import React, { Fragment, PureComponent } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import theme from './theme.css';
class Link extends PureComponent {
render() {
const { children, className, icon, iconPlacement, element, inherit, ...others } = this.props;
const classNam... | import React, { Fragment, PureComponent } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import theme from './theme.css';
class Link extends PureComponent {
render() {
const { children, className, icon, iconPlacement, element, inherit, ...others } = this.props;
const classNam... | Add 'onMouseLeave' & 'onMouseUp' props | Add 'onMouseLeave' & 'onMouseUp' props
| JavaScript | mit | teamleadercrm/teamleader-ui |
05056d99ade4e113419db11c4897fd1157774d81 | src/Home.js | src/Home.js | import React, {Component} from "react";
import RaisedButton from "material-ui/RaisedButton";
const styles = {
button: {
margin: 12,
},
}
class Home extends Component {
render() {
return (
<div className="buttons">
<h1>Gregory N. Katchmar</h1>
<h2>JavaScript Developer</h2>
... | import React, {Component} from "react";
import RaisedButton from "material-ui/RaisedButton";
const styles = {
button: {
margin: 12,
},
}
class Home extends Component {
render() {
return (
<div className="buttons">
<h1>Gregory N. Katchmar</h1>
<h2>JavaScript Developer</h2>
... | Update date change for build | Update date change for build
| JavaScript | isc | gnkatchmar/new-gkatchmar,gnkatchmar/new-gkatchmar |
db7c53d359e9bc56fcddea038e0dc7acb1cdaffb | src/components/Lane/LaneHeader.js | src/components/Lane/LaneHeader.js | import React from 'react'
import PropTypes from 'prop-types'
import EditableLabel from 'components/widgets/EditableLabel'
import {Title, LaneHeader, RightContent } from 'styles/Base'
import LaneMenu from './LaneHeader/LaneMenu'
const LaneHeaderComponent = ({
updateTitle, canAddLanes, onDelete, onDoubleClick, inline... | import React from 'react'
import PropTypes from 'prop-types'
import EditableLabel from 'components/widgets/EditableLabel'
import {Title, LaneHeader, RightContent } from 'styles/Base'
import LaneMenu from './LaneHeader/LaneMenu'
const LaneHeaderComponent = ({
updateTitle, canAddLanes, onDelete, onDoubleClick, inline... | Remove style hardcoding (margin: '-5px') in Title component | Remove style hardcoding (margin: '-5px') in Title component
| JavaScript | mit | rcdexta/react-trello,rcdexta/react-trello |
68f2a223588cf0be920427ca4f39124a063d0a30 | public/js/admin.js | public/js/admin.js | jQuery(function($) {
$('.setting .js-save-on-change').each(function () {
var $field = $(this);
$field.closest('.setting').data('old', $field.val());
});
$(document).on('change', '.js-save-on-change', function() {
var $field = $(this);
var name = $field.attr('name');
var... | jQuery(function($) {
$('.setting .js-save-on-change').each(function () {
var $field = $(this);
$field.closest('.setting').data('old', $field.val());
});
$(document).on('change', '.js-save-on-change', function() {
var $field = $(this);
var name = $field.attr('name');
var... | Reset setting fields when saving fails. | Reset setting fields when saving fails.
| JavaScript | mit | fluxbb/core,fluxbb/core |
5760b9bc06813d6411b9d575d5f7d918e49217d3 | public/js/index.js | public/js/index.js | "use strict";
var router = new VueRouter({
routes: [
{ path: "/search", component: Vue.component("main-search") },
{ path: "/tags", component: Vue.component("main-tags") },
{ path: "/upload", component: Vue.component("main-upload") },
{ path: "/options", component: Vue.component("ma... | "use strict";
var router = new VueRouter({
routes: [
{ path: "/search", component: Vue.component("main-search") },
{ path: "/tags", component: Vue.component("main-tags") },
{ path: "/upload", component: Vue.component("main-upload") },
{ path: "/options", component: Vue.component("ma... | Store the options in the local storage | Store the options in the local storage
| JavaScript | mit | Dexesttp/jsbooru,Dexesttp/jsbooru |
9869d0cf8a88e3d5c88c5f0cb49c1b3debf16c02 | src/components/floating-button/FloatingButton.js | src/components/floating-button/FloatingButton.js | 'use strict';
import React, { Component } from 'react';
import ReactCSS from 'reactcss';
class FloatingButton extends Component {
classes() {
return {
'default': {
},
};
}
render() {
return <div>
<button>Item</button>
</div>;
}
}
export default ReactCSS(FloatingButton);
| 'use strict';
import React, { Component } from 'react';
import ReactCSS from 'reactcss';
class FloatingButton extends Component {
classes() {
return {
'default': {
},
};
}
handleClick = () => this.props.onClick && this.props.onClick();
render() {
return <div onClick={ this.handleCli... | Update floating button to use handleClick callback | Update floating button to use handleClick callback
| JavaScript | mit | henryboldi/felony,tobycyanide/felony,tobycyanide/felony,henryboldi/felony |
12d0f923a9d8f45d131aa54d8a92784a743449db | server.js | server.js | 'use strict';
var express = require('express')
, logger = require('morgan')
, mongoose = require('mongoose')
, path = require('path')
, messages = require('./routes/messages')
, users = require('./routes/users')
, config = require('./lib/config')
, app
;
app = express();
mongoose.connect(config.mongo... | 'use strict';
var express = require('express')
, logger = require('morgan')
, mongoose = require('mongoose')
, path = require('path')
, messages = require('./routes/messages')
, users = require('./routes/users')
, config = require('./lib/config')
, app
;
app = express();
mongoose.connect(config.mongo... | Print stack trace on all errors that have it | Print stack trace on all errors that have it
| JavaScript | mit | Hilzu/SecureChat |
44465f21591a5497a687e2cceecaef5cb278833e | server.js | server.js | var express = require('express'),
routes = require(__dirname + '/app/routes.js'),
app = express(),
port = (process.env.PORT || 3000);
// Application settings
app.engine('html', require(__dirname + '/lib/template-engine.js').__express);
app.set('view engine', 'html');
app.set('vendorViews', __dirname + '/go... | var express = require('express'),
routes = require(__dirname + '/app/routes.js'),
app = express(),
port = (process.env.PORT || 3000);
// Application settings
app.engine('html', require(__dirname + '/lib/template-engine.js').__express);
app.set('view engine', 'html');
app.set('vendorViews', __dirname + '/go... | Add Middleware to serve static assets | Add Middleware to serve static assets
| JavaScript | mit | joelanman/govuk_elements,joelanman/govuk_elements |
35debf8c05fb5233841374331ae40853ec851437 | server.js | server.js | var express = require('express');
var redis = require('ioredis');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/endpoints');
var users = require('./routes/users');
var api = express();
// var redis = new Redis('/tmp... | var express = require('express');
var redis = require('ioredis');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/endpoints');
var users = require('./routes/users');
var api = express();
// var redis = new Redis('/tmp... | Add api to module exports | Add api to module exports
| JavaScript | mit | nathansmyth/node-stack,nathansmyth/node-stack |
3a5c59ddecc7e5948d93afb00e2487c9001d64f3 | app/assets/javascripts/peoplefinder/help-area.js | app/assets/javascripts/peoplefinder/help-area.js | $('.help-content').hide()
$('.help-toggle').click(function(){
$(this).toggleClass('open').next('.help-content').slideToggle('slow');
}); | /* global $ */
$('.help-content').hide();
$('.help-toggle').click(function(){
$(this).toggleClass('open').next('.help-content').slideToggle('slow');
});
| Tweak JavaScript to pass lint | Tweak JavaScript to pass lint
| JavaScript | mit | MjAbuz/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,MjAbuz/peoplefinder,MjAbuz/peoplefinder,MjAbuz/peoplefinder,ministryofjustice/peoplefinder |
f7443077399ae76499cb339afcbef5db45c5ace8 | app/components/shared/Panel/intro-with-button.js | app/components/shared/Panel/intro-with-button.js | import React from "react";
class IntroWithButton extends React.Component {
static displayName = "Panel.IntroWithButton";
static propTypes = {
children: React.PropTypes.node.isRequired
};
render() {
return (
<div className="py3 px3 flex">
{this.props.children[0]}
<div className="... | import React from "react";
class IntroWithButton extends React.Component {
static displayName = "Panel.IntroWithButton";
static propTypes = {
children: React.PropTypes.node.isRequired
};
render() {
let children = React.Children.toArray(this.props.children);
let intro;
let button;
if(chil... | Handle case where IntroWithButton has no button | Handle case where IntroWithButton has no button
| JavaScript | mit | buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend |
ee33df0c5c35339239ce82662d295dc2204035a5 | assets/scripts/bookmark/controller/BookMark.js | assets/scripts/bookmark/controller/BookMark.js | angular.module('caco.bookmark.crtl', ['caco.bookmark.REST'])
.controller('BookMarkCrtl', function ($rootScope, $scope, $stateParams, $location, BookMarkREST) {
$rootScope.module = 'bookmark';
if ($stateParams.id) {
BookMarkREST.one({id: $stateParams.id}, function (data) {
... | angular.module('caco.bookmark.crtl', ['caco.bookmark.REST'])
.controller('BookMarkCrtl', function ($rootScope, $scope, $stateParams, $location, BookMarkREST) {
$rootScope.module = 'bookmark';
if ($stateParams.id) {
BookMarkREST.one({id: $stateParams.id}, function (data) {
... | Save one request on bookmark delete. | Save one request on bookmark delete.
| JavaScript | mit | Cacodaimon/CacoCloud,Cacodaimon/CacoCloud,Cacodaimon/CacoCloud,Cacodaimon/CacoCloud |
57ec8ec0afca5b79742deecddb4fe4a509b05918 | commons/js/index.js | commons/js/index.js | (function main() {
var active = $('ul.nav li.active');
$('#ART').add('#credits').show(900);
$('ul.nav').on('click', 'li', function() {
$(active.removeClass('active')
.find('a')
.attr('href')).hide(300);
$((active = $(this)).addClass('active')
.find('a')
... | (function main() {
var active = $('ul.nav li.active');
$('#ART').add('#credits').fadeIn(900);
$('ul.nav').on('click', 'li', function() {
$(active.removeClass('active')
.find('a')
.attr('href')).fadeOut(300);
$((active = $(this)).addClass('active')
.find('a')
... | Use fadeIn/Out instead of show/hide since the latter are laggy in weaker machines | Use fadeIn/Out instead of show/hide since the latter are laggy in weaker machines
| JavaScript | mit | artbytrie/artbytrie.github.io,artbytrie/artbytrie.github.io |
068b8cb55fb5f0ab6e51f9a19e202c88f1cc1210 | src/js/weapon/bow.js | src/js/weapon/bow.js | 'use strict';
Darwinator.Bow = function(game, coolDown, bulletSpeed, bullets, damage, owner) {
Darwinator.Weapon.call(this, game, coolDown, bulletSpeed, damage, owner);
this.bullets.createMultiple(30, 'arrow');
this.bullets.setAll('anchor.x', 0.5);
this.bullets.setAll('anchor.y', 0.5);
this.bullets.setAll('o... | 'use strict';
Darwinator.Bow = function(game, coolDown, bulletSpeed, bullets, damage, owner) {
Darwinator.Weapon.call(this, game, coolDown, bulletSpeed, damage, owner);
this.bullets.createMultiple(30, 'arrow');
this.bullets.setAll('anchor.x', 0.5);
this.bullets.setAll('anchor.y', 0.5);
this.bullets.setAll('o... | Make bullets keep track of their weapons owners | Make bullets keep track of their weapons owners
| JavaScript | mit | werme/DATX02 |
f2354cb75e3413130d53ae7fe81572d1d43a46c1 | lib/exposure/exposure.config.schema.js | lib/exposure/exposure.config.schema.js | import createGraph from '../query/lib/createGraph.js';
import {Match} from 'meteor/check';
export const ExposureDefaults = {
blocking: false,
method: true,
publication: true,
};
export const ExposureSchema = {
firewall: Match.Maybe(
Match.OneOf(Function, [Function])
),
maxLimit: Match.... | import createGraph from '../query/lib/createGraph.js';
import {Match} from 'meteor/check';
export const ExposureDefaults = {
blocking: false,
method: true,
publication: true,
};
export const ExposureSchema = {
firewall: Match.Maybe(
Match.OneOf(Function, [Function])
),
maxLimit: Match.... | Allow functions in global exposure bodies | Allow functions in global exposure bodies | JavaScript | mit | cult-of-coders/grapher |
470493391503d7884774348909dc78b2c0f3cb06 | data.js | data.js | var async = require('async');
var pingdom = require('./pingdom');
function checks(config, limit, done) {
var api = pingdom(config);
api.checks(function(err, checks) {
if(err) return console.error(err);
async.map(checks, function(check, cb) {
api.results(function(err, results) {
... | var async = require('async');
var pingdom = require('./pingdom');
function checks(config, limit, done) {
var api = pingdom(config);
api.checks(function(err, checks) {
if(err) return console.error(err);
async.map(checks, function(check, cb) {
api.results(function(err, results) {
... | Convert time to JS format | Convert time to JS format
JS uses ms instead of s provided by the API.
| JavaScript | mit | bebraw/cdnperf,cdnperf/cdnperf,cdnperf/cdnperf,bebraw/cdnperf |
0f0e4153ad6041a834d06a7947662e6e15e3eca4 | schema/settings.js | schema/settings.js | const mongoose = require('mongoose');
const Schema = mongoose.Schema;
var SettingSchema = new Schema({
modLogID: {
type: Number,
required: false
},
filterInvites: {
type: Boolean,
required: false,
default: false
}
});
module.exports = SettingSchema; | const mongoose = require('mongoose');
const Schema = mongoose.Schema;
var SettingSchema = new Schema({
modLogID: {
type: Number,
required: false
},
muteRoleID: {
type: Number,
required: false
},
filterInvites: {
type: Boolean,
required: false,
... | Add support for mute role | Add support for mute role
| JavaScript | mit | steamboat-dev/shared |
779fdd103374a6edb27d555e23aaace7a6f7caa3 | public/assets/default/js/thread.js | public/assets/default/js/thread.js |
$(document).ready(function(){
var simplemde = new SimpleMDE({
element: $("#postreply")[0],
autosave: {
enabled: true,
delay: 2000,
unique_id: "thread-" + window.thread_id // save drafts based on thread id
},
spellChecker: false
});
});
|
$(document).ready(function(){
var simplemde = new SimpleMDE({
element: $("#postreply")[0],
// Autosave disabled temporarily because it keeps it's content even after submitting (Clearboard will use a custom AJAX submit function)
/*autosave: {
enabled: true,
delay: 200... | Disable SimpleMDE autosaving, as it retains it would retain it's content after posting | Disable SimpleMDE autosaving, as it retains it would retain it's content after posting
| JavaScript | mit | clearboard/clearboard,mitchfizz05/clearboard,mitchfizz05/clearboard,clearboard/clearboard |
45dfb547c46f25255759f6ebcdc95f59cf1d9c75 | commonjs/cookie-opt.js | commonjs/cookie-opt.js | var componentEvent = require('kwf/component-event');
var cookies = require('js-cookie');
var CookieOpt = {};
CookieOpt.getDefaultOpt = function() {
return 'in'; // TODO get from baseProperty
};
CookieOpt.isSetOpt = function() {
return !!cookies.get('cookieOpt');
};
CookieOpt.getOpt = function() {
if (Co... | var componentEvent = require('kwf/component-event');
var cookies = require('js-cookie');
var $ = require('jQuery');
var CookieOpt = {};
CookieOpt.getDefaultOpt = function() {
var defaultOpt = $('body').data('cookieDefaultOpt');
if (defaultOpt != 'in' && defaultOpt != 'out') defaultOpt = 'in';
return defau... | Read default cookie opt setting from body data tag | Read default cookie opt setting from body data tag
| JavaScript | bsd-2-clause | koala-framework/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework |
ba9c863de909906382b55309e1cfe0e0ce935308 | spec/html/QueryStringSpec.js | spec/html/QueryStringSpec.js | describe("QueryString", function() {
describe("#setParam", function() {
it("sets the query string to include the given key/value pair", function() {
var windowLocation = {
search: ""
},
queryString = new j$.QueryString({
getWindowLocation: function() { return windowLoca... | describe("QueryString", function() {
describe("#setParam", function() {
it("sets the query string to include the given key/value pair", function() {
var windowLocation = {
search: ""
},
queryString = new j$.QueryString({
getWindowLocation: function() { return windowLocat... | Add spec to verify custom query params are left alone | Add spec to verify custom query params are left alone
[#29578495]
| JavaScript | mit | faizalpribadi/jasmine,danielalexiuc/jasmine,GerHobbelt/jasmine,Contagious06/jasmine,tsaikd/jasmine,negherbon/jasmine,soycode/jasmine,mashroomxl/jasmine,mashroomxl/jasmine,WY08271/jasmine,GerHobbelt/jasmine,songshuangkk/jasmine,rlugojr/jasmine,paulcbetts/jasmine,IveWong/jasmine,leahciMic/jasmine,morsdyce/jasmine,daniela... |
585467648d0ec67da6cde967a1e17b07014638b8 | src/native/app/components/Text.react.js | src/native/app/components/Text.react.js | import React, { Component, PropTypes } from 'react';
import theme from '../theme';
import { StyleSheet, Text } from 'react-native';
const styles = StyleSheet.create({
text: {
color: theme.textColor,
fontFamily: theme.fontFamily,
fontSize: theme.fontSize,
},
});
// Normalize multiline strings because T... | import React, { Component, PropTypes } from 'react';
import theme from '../theme';
import { StyleSheet, Text } from 'react-native';
const styles = StyleSheet.create({
text: { // eslint-disable-line react-native/no-unused-styles
color: theme.textColor,
fontFamily: theme.fontFamily,
fontSize: theme.fontSiz... | Fix native Text computed lineHeight | Fix native Text computed lineHeight
| JavaScript | mit | este/este,robinpokorny/este,TheoMer/Gyms-Of-The-World,skallet/este,christophediprima/este,robinpokorny/este,cjk/smart-home-app,christophediprima/este,TheoMer/Gyms-Of-The-World,TheoMer/este,christophediprima/este,christophediprima/este,steida/este,TheoMer/este,TheoMer/este,sikhote/davidsinclair,sikhote/davidsinclair,est... |
9692dfc1f91f9fe3c87a1afe4df8d613f78f885c | bin/startBot.js | bin/startBot.js | const RoundpiecesBot = require('./../src/roundpiecesbot');
const token = process.env.ROUNDPIECES_API_KEY;
const adminUserName = process.env.ROUNDPIECES_ADMIN_USERNAME;
const listPath = process.env.ROUNDPIECES_LIST_PATH;
const startSearch = '00 * * * * *';
const endSearch = '30 * * * * *';
const resetSearch = '55 * * ... | const RoundpiecesBot = require('./../src/roundpiecesbot');
const token = process.env.ROUNDPIECES_API_KEY;
const adminUserName = process.env.ROUNDPIECES_ADMIN_USERNAME;
const listPath = process.env.ROUNDPIECES_LIST_PATH;
const startSearch = '00 00 9 * * 4'; // 09.00 Thursdays
const endSearch = '00 00 12 * * 4'; // 12.... | Set cron ranges to match real arrangement times | Set cron ranges to match real arrangement times
| JavaScript | mit | jbroni/roundpieces-slackbot |
cc033abb20799f36b170e607ce95297491781eda | utility.js | utility.js | const path = require( 'path' )
const fs = require( 'fs' )
// Create a new path from arguments.
const getAbsolutePath = ( ...args ) => path.resolve( path.join.apply( null, args ) )
const isExist = filePath => {
try {
fs.statSync( path.resolve( filePath ) )
return true
} catch( error ){
return false
... | const path = require( 'path' )
const fs = require( 'fs' )
// Create a new path from arguments.
const getAbsolutePath = ( ...args ) => path.resolve( path.join.apply( null, args ) )
const isExist = filePath => {
try {
fs.statSync( path.resolve( filePath ) )
return true
} catch( error ){
return false
... | Add method to read and write | Add method to read and write
| JavaScript | mit | Yacona/yacona |
f55703a7a027651e141b753058abec7cbdf28e89 | test/jsx-no-logical-expression.js | test/jsx-no-logical-expression.js | import test from 'ava';
import avaRuleTester from 'eslint-ava-rule-tester';
import rule from '../src/rules/jsx-no-logical-expression';
const ruleTester = avaRuleTester(test, {
parserOptions: {
ecmaVersion: 2018,
ecmaFeatures: {
jsx: true
}
}
});
const ruleId = 'jsx-no-logical-expression';
const ... | import test from 'ava';
import avaRuleTester from 'eslint-ava-rule-tester';
import rule from '../src/rules/jsx-no-logical-expression';
const ruleTester = avaRuleTester(test, {
parserOptions: {
ecmaVersion: 2018,
ecmaFeatures: {
jsx: true
}
}
});
const ruleId = 'jsx-no-logical-expression';
const ... | Add another invalid use case | Add another invalid use case
| JavaScript | mit | CoorpAcademy/eslint-plugin-coorpacademy |
d05e4d520f627b555fc52f243db307275eb7ca39 | tests/unit/adapters/github-release-test.js | tests/unit/adapters/github-release-test.js | import { moduleFor, test } from 'ember-qunit';
moduleFor('adapter:github-release', 'Unit | Adapter | github release', {
// Specify the other units that are required for this test.
// needs: ['serializer:foo']
});
// Replace this with your real tests.
test('it exists', function(assert) {
let adapter = this.subje... | import { moduleFor, test } from 'ember-qunit';
moduleFor('adapter:github-release', 'Unit | Adapter | github release', {
// Specify the other units that are required for this test.
// needs: ['serializer:foo']
});
test('it exists', function(assert) {
let adapter = this.subject();
assert.ok(adapter);
});
test(... | Remove the boilerplate comment now that we have more tests. | Remove the boilerplate comment now that we have more tests.
| JavaScript | mit | elwayman02/ember-data-github,jimmay5469/ember-data-github,elwayman02/ember-data-github,jimmay5469/ember-data-github |
0b13a34c60150e8eee5394b61233d451c7a933cb | assets/js/app.js | assets/js/app.js | $( document ).ready(function() {
/* Sidebar height set */
$('.sidebar').css('min-height',$(document).height());
/* Secondary contact links */
var scontacts = $('#contact-list-secondary');
var contact_list = $('#contact-list');
scontacts.hide();
contact_list.mouseenter(function(){ scontacts.fadeIn(); });
... | $( document ).ready(function() {
/* Sidebar height set */
$('.sidebar').css('min-height',$(document).height());
/* Secondary contact links */
var scontacts = $('#contact-list-secondary');
var contact_list = $('#contact-list');
scontacts.hide();
contact_list.mouseenter(function(){ scontacts.fadeIn(); });
... | Add target _blank on article links | Add target _blank on article links
| JavaScript | mit | meumobi/meumobi.github.io,meumobi/meumobi.github.io,meumobi/meumobi.github.io |
49d8d01a14fb235c999473915667144d890e125b | src/components/video_list.js | src/components/video_list.js | import React from 'react'
import VideoListItem from './video_list_item'
const VideoList = (props) => {
const videoItems = props.videos.map((video) => {
return <VideoListItem video={video} />
});
return (
<ul className="col-md-4 list-group">
{videoItems}
</ul>
);
};
export default VideoList... | import React from 'react'
import VideoListItem from './video_list_item'
const VideoList = (props) => {
const videoItems = props.videos.map((video) => {
return <VideoListItem key={video.etag} video={video} />
});
return (
<ul className="col-md-4 list-group">
{videoItems}
</ul>
);
};
export ... | Add etag as unique key | Add etag as unique key
Finish 25
| JavaScript | mit | fifiteen82726/ReduxSimpleStarter,fifiteen82726/ReduxSimpleStarter |
60b20d83f4fdc9c625b56a178c93af1533b82a60 | src/redux/modules/card.js | src/redux/modules/card.js | import uuid from 'uuid';
import { Record as record } from 'immutable';
export class CardModel extends record({
name: '',
mana: null,
attack: null,
defense: null,
portrait: null,
}) {
constructor(obj) {
super(obj);
this.id = uuid.v4();
}
}
| // import uuid from 'uuid';
import { Record as record } from 'immutable';
export const CardModel = record({
id: null,
name: '',
mana: null,
attack: null,
defense: null,
portrait: null,
});
| Remove id from Record and add id field | Remove id from Record and add id field
Reason: on CardModel.update() it doesn’t keep the id field, so shit
crashes
| JavaScript | mit | inooid/react-redux-card-game,inooid/react-redux-card-game |
153b9121bc2971e916ddc78045ebc6afc8a8ec5e | src/acorn_plugin/skipBlockComment.js | src/acorn_plugin/skipBlockComment.js | export default function skipSpace() {
// https://github.com/ternjs/acorn/blob/master/src/tokenize.js#L100-L116
return function ha(endSign) {
const endS = endSign ? endSign : '*/';
let startLoc = this.options.onComment && this.curPosition();
let start = this.pos, end = this.input.indexOf(endS, this.pos +... | // eslint-disable
export default function skipSpace() {
// https://github.com/ternjs/acorn/blob/master/src/tokenize.js#L100-L116
return function ha(endSign) {
const endS = endSign ? endSign : '*/';
let startLoc = this.options.onComment && this.curPosition();
let start = this.pos,
end = this.inp... | Disable eslint for this for now. | Disable eslint for this for now. | JavaScript | mit | laosb/hatp |
670dff868d04ab149bd252b6835b224a202a5bd1 | lib/provider.js | lib/provider.js | 'use babel';
import {filter} from 'fuzzaldrin';
import commands from './commands';
import variables from './variables';
export const selector = '.source.cmake';
export const disableForSelector = '.source.cmake .comment';
export const inclusionPriority = 1;
function existy(value) {
return value != null;
}
functi... | 'use babel';
import {filter} from 'fuzzaldrin';
import commands from './commands';
import variables from './variables';
export const selector = '.source.cmake';
export const disableForSelector = '.source.cmake .comment';
export const inclusionPriority = 1;
function existy(value) {
return value != null;
}
functi... | Move cursor left on function completion. | Move cursor left on function completion.
| JavaScript | mit | NealRame/autocomplete-cmake |
5a3b4b8010d20793c0ffcb36caeb27283aef61c5 | src/components/Members/NavbarLink.js | src/components/Members/NavbarLink.js | import React from 'react';
import { Link } from 'react-router';
function NavbarLink({to, href, className, component, children}) {
const Comp = component || Link;
return (
<span>
{ href ?
<a href={href}>Yo</a>
:
<Comp to={to} className={className} activeStyle={{
color: '... | import React from 'react';
import { Link } from 'react-router';
function NavbarLink({ children, className, component, href, to }) {
const Comp = component || Link;
let Linkelement = (
<Comp to={to} className={className} activeStyle={{
color: '#A94545',
}}>
{children}
</Comp>
);
if (hre... | Modify link generation to allow off site links | Modify link generation to allow off site links
| JavaScript | cc0-1.0 | cape-io/acf-client,cape-io/acf-client |
f6b0174625f669cef151cf8ef702d38b509fe95a | src/components/finish-order/index.js | src/components/finish-order/index.js | import { Component } from 'preact';
import style from './style';
export default class FinishOrder extends Component {
constructor(props) {
super(props);
}
render(props, state) {
return (
<div class="container">
<p class="">
Děkujeme, za Vaši objednávku. Budeme Vás kontaktovat. Detaily ... | import { Component } from 'preact';
import style from './style';
export default class FinishOrder extends Component {
constructor(props) {
super(props);
}
render(props, state) {
return (
<div class="container">
<p class="">
Děkujeme, za Vaši objednávku. Budeme Vás kontaktovat. Detaily ... | Disable redirect button on finish order page | Disable redirect button on finish order page
| JavaScript | agpl-3.0 | MakersLab/custom-print |
741414856087c820963d3e688d5bbf88f5edf82a | src/components/googlemap/TaskPlot.js | src/components/googlemap/TaskPlot.js | import React, { PropTypes } from 'react';
import { List } from 'immutable';
import Polyline from './Polyline';
import Marker from './Marker';
class TaskPlot extends React.Component {
shouldComponentUpdate(nextProps) {
return (this.props.map !== nextProps.map) ||
(this.props.googlemaps !== nextProps.google... | import React, { PropTypes } from 'react';
import { List } from 'immutable';
import Polyline from './Polyline';
import Marker from './Marker';
import * as icons from './icons';
class TaskPlot extends React.Component {
shouldComponentUpdate(nextProps) {
return (this.props.map !== nextProps.map) ||
(this.pro... | Add labels to task markers. | Add labels to task markers.
| JavaScript | mit | alistairmgreen/soaring-analyst,alistairmgreen/soaring-analyst |
d456e2986d4b99f09fa291c990dff7c8d6a0d9d9 | src/utils/draw/reset_g.js | src/utils/draw/reset_g.js | // remove all children of the main `g` element
// prepare for re-drawing (e.g. during resize) with margins
export default ({
g,
margin
}) => {
g.selectAll('*').remove()
g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
}
| // remove all children of the main `g` element
// and all children of the base `element` that are flagged with a css class named `--delete-on-update`
// prepare for re-drawing (e.g. during resize) with margins
export default ({
g,
element,
margin
}) => {
element.selectAll('.--delete-on-update').remove()
g.sel... | Add flag to remove stuff outside of `g` element on resize & update. | Add flag to remove stuff outside of `g` element on resize & update.
| JavaScript | mit | simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks |
8d94ee098cbde06564c72cbd44574bd47fd207a5 | vmdb/app/assets/javascripts/application.js | vmdb/app/assets/javascripts/application.js | //= require cfme_application
//= require dialog_import_export
//= require widget_import_export
//= require jquery.jqplot
//= require jqplot-plugins/jqplot.pieRenderer
//= require jqplot-plugins/jqplot.barRenderer
//= require jqplot-plugins/jqplot.categoryAxisRenderer
//= require jqplot-plugins/jqplot.highlighter
//= re... | //= require cfme_application
//= require dialog_import_export
//= require widget_import_export
//= require excanvas
//= require jquery.jqplot
//= require jqplot-plugins/jqplot.pieRenderer
//= require jqplot-plugins/jqplot.barRenderer
//= require jqplot-plugins/jqplot.categoryAxisRenderer
//= require jqplot-plugins/jqpl... | Enable jqplot charts to be visible in IE8 | Enable jqplot charts to be visible in IE8
https://bugzilla.redhat.com/show_bug.cgi?id=1058261
| JavaScript | apache-2.0 | juliancheal/manageiq,jvlcek/manageiq,jameswnl/manageiq,djberg96/manageiq,maas-ufcg/manageiq,josejulio/manageiq,fbladilo/manageiq,romanblanco/manageiq,lpichler/manageiq,agrare/manageiq,romanblanco/manageiq,NaNi-Z/manageiq,aufi/manageiq,jntullo/manageiq,tinaafitz/manageiq,tinaafitz/manageiq,mfeifer/manageiq,branic/manage... |
50ff129e6e3a02a03aa63a26e5c7d782a722db0e | src/bacon.react.js | src/bacon.react.js | import Bacon from "baconjs"
import React from "react"
export default React.createClass({
getInitialState() {
return {}
},
tryDispose() {
const {dispose} = this.state
if (dispose) {
dispose()
this.replaceState({})
}
},
trySubscribe(tDOM) {
this.tryDispose()
if (tDOM)
... | import Bacon from "baconjs"
import React from "react"
export default React.createClass({
getInitialState() {
return {}
},
tryDispose() {
const {dispose} = this.state
if (dispose) {
dispose()
this.replaceState({})
}
},
trySubscribe(props) {
this.tryDispose()
const {children... | Support className & id attrs and stream of arrays. | Support className & id attrs and stream of arrays.
| JavaScript | mit | polytypic/bacon.react |
02e191dabf4485f305c09c37592fcdfdf477553b | src/base/Button.js | src/base/Button.js |
mi2JS.comp.add('base/Button', 'Base', '',
// component initializer function that defines constructor and adds methods to the prototype
function(proto, superProto, comp, superComp){
proto.construct = function(el, tpl, parent){
superProto.construct.call(this, el, tpl, parent);
this.lastClick = 0;
this.listen(... |
mi2JS.comp.add('base/Button', 'Base', '',
// component initializer function that defines constructor and adds methods to the prototype
function(proto, superProto, comp, superComp){
proto.construct = function(el, tpl, parent){
superProto.construct.call(this, el, tpl, parent);
this.lastClick = 0;
this.listen(... | Use __propName as default action for button | Use __propName as default action for button
| JavaScript | mit | hrgdavor/mi2js,hrgdavor/mi2js,hrgdavor/mi2js |
4d949a2bc8f628dcc66ee62161ae3680b21766d0 | bin/pep-proxy.js | bin/pep-proxy.js | #!/usr/bin/env node
var proxy = require('../lib/fiware-orion-pep'),
config = require('../config');
proxy.start(function (error, proxyObj) {
if (error) {
process.exit();
} else {
var module;
console.log('Loading middlewares');
module = require('../' + config.middlewares.req... | #!/usr/bin/env node
var proxy = require('../lib/fiware-orion-pep'),
config = require('../config');
proxy.start(function(error, proxyObj) {
var module;
if (error) {
process.exit();
} else {
console.log('Loading middlewares');
module = require('../' + config.middlewares.require)... | FIX Move the module definition to the top of the function | FIX Move the module definition to the top of the function
| JavaScript | agpl-3.0 | telefonicaid/fiware-pep-steelskin,telefonicaid/fiware-pep-steelskin,agroknow/fiware-pep-steelskin,telefonicaid/fiware-pep-steelskin,telefonicaid/fiware-pep-steelskin,agroknow/fiware-pep-steelskin,agroknow/fiware-pep-steelskin,agroknow/fiware-pep-steelskin |
a439b552acbd586615b15b86d79ed003979aeaed | static/js/sh_init.js | static/js/sh_init.js | var codes = document.getElementsByTagName("code");
var title, elTitle, elPre;
for (var i=0, l=codes.length ; i<l ; i++) {
elPre = codes[i].parentNode;
if (elPre.tagName != "PRE") continue;
// Prepare for highlighting
// elPre.className = elPre.className.replace("sourceCode ","");
if (elPre.className.match("s... | var codes = document.getElementsByTagName("code");
var title, elTitle, elPre;
for (var i=0, l=codes.length ; i<l ; i++) {
elPre = codes[i].parentNode;
if (elPre.tagName != "PRE") continue;
// Prepare for highlighting
// elPre.className = elPre.className.replace("sourceCode ","");
if (elPre.className.match("s... | Add java to automatic conversions | Add java to automatic conversions
| JavaScript | bsd-3-clause | MasseR/Blog,MasseR/Blog |
c06c26a6987da66dc1722be92625065cacf73603 | src/json-chayns-call/json-calls.js | src/json-chayns-call/json-calls.js | import * as jsonCallFunctions from './calls/index';
const jsonCalls = {
1: jsonCallFunctions.toggleWaitCursor,
2: jsonCallFunctions.selectTapp,
4: jsonCallFunctions.showPictures,
14: jsonCallFunctions.requestGeoLocation,
15: jsonCallFunctions.showVideo,
16: jsonCallFunctions.showAlert,
18:... | import * as jsonCallFunctions from './calls/index';
const jsonCalls = {
1: jsonCallFunctions.toggleWaitCursor,
2: jsonCallFunctions.selectTapp,
4: jsonCallFunctions.showPictures,
14: jsonCallFunctions.requestGeoLocation,
15: jsonCallFunctions.showVideo,
16: jsonCallFunctions.showAlert,
18:... | Add support for chayns-call 52 | Add support for chayns-call 52
| JavaScript | mit | TobitSoftware/chayns-web-light,TobitSoftware/chayns-web-light |
e13f0ea5f5e21d63d367e61f4b247ba2a60cfd48 | 5.AdvancedReactAndRedux/test/test_helper.js | 5.AdvancedReactAndRedux/test/test_helper.js | // Set up testing enviroment to run like a browser in the command line
// Build 'renderComponent' helper that should render a given react class
// Build helper for simulating events
// Set up chai-jquery | import jsdom from 'jsdom';
import jquery from 'jquery';
import TestUtils from 'react-addons-test-utils';
// Set up testing enviroment to run like a browser in the command line
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
global.window = global.document.defaultView;
const $ = _$(global.w... | Set up running like browser in command line, build renderComponent helper function | Set up running like browser in command line, build renderComponent helper function
| JavaScript | mit | Branimir123/Learning-React,Branimir123/Learning-React |
61a7bad245a6b365ff7162421545b9004d79b2d5 | firecares/firestation/static/firestation/js/controllers/home.js | firecares/firestation/static/firestation/js/controllers/home.js |
'use strict';
(function() {
angular.module('fireStation.homeController', [])
.controller('home', function($scope, map, $filter) {
var homeMap = map.initMap('map', {scrollWheelZoom: false});
homeMap.setView([40, -90], 4);
var headquartersIcon = L.FireCARESMarkers.headquarte... |
'use strict';
(function() {
angular.module('fireStation.homeController', [])
.controller('home', function($scope, map, $filter) {
var homeMap = map.initMap('map', {scrollWheelZoom: false});
homeMap.setView([40, -90], 4);
var headquartersIcon = L.FireCARESMarkers.headquartersmarker();
... | Update js to bust compressor cache. | Update js to bust compressor cache.
| JavaScript | mit | meilinger/firecares,HunterConnelly/firecares,garnertb/firecares,FireCARES/firecares,ROGUE-JCTD/vida,garnertb/firecares,HunterConnelly/firecares,ROGUE-JCTD/vida,ROGUE-JCTD/vida,ROGUE-JCTD/vida,HunterConnelly/firecares,FireCARES/firecares,meilinger/firecares,garnertb/firecares,FireCARES/firecares,FireCARES/firecares,Fire... |
6a97907ccc0ceeadcbbef6c66fda080e926c42b2 | packages/ember-metal/lib/error_handler.js | packages/ember-metal/lib/error_handler.js | import Logger from 'ember-console';
import { isTesting } from './testing';
let onerror;
// Ember.onerror getter
export function getOnerror() {
return onerror;
}
// Ember.onerror setter
export function setOnerror(handler) {
onerror = handler;
}
let dispatchOverride;
// dispatch error
export function dispatchError(... | import Logger from 'ember-console';
import { isTesting } from './testing';
// To maintain stacktrace consistency across browsers
let getStack = function(error) {
var stack = error.stack;
var message = error.message;
if (stack.indexOf(message) === -1) {
stack = message + '\n' + stack;
}
return stack;
};... | Fix Error object's stacktrace inconsistency across browsers | Fix Error object's stacktrace inconsistency across browsers
| JavaScript | mit | johanneswuerbach/ember.js,elwayman02/ember.js,kanongil/ember.js,patricksrobertson/ember.js,intercom/ember.js,Patsy-issa/ember.js,sivakumar-kailasam/ember.js,thoov/ember.js,mixonic/ember.js,kennethdavidbuck/ember.js,sivakumar-kailasam/ember.js,bekzod/ember.js,rfsv/ember.js,kaeufl/ember.js,pixelhandler/ember.js,mike-nort... |
a0045dd29b77217ed86dbf2f1d26925d5416b0ad | example_test.js | example_test.js | var util = require('util'),
webdriver = require('selenium-webdriver'),
chrome = require('selenium-webdriver/chrome'),
retry = require('./index.js');
var driver = chrome.createDriver(
new webdriver.Capabilities({'browserName': 'chrome'}),
new chrome.ServiceBuilder('./chromedriver').build());
driver... | var util = require('util'),
webdriver = require('selenium-webdriver'),
chrome = require('selenium-webdriver/chrome'),
retry = require('./index.js');
// Assumes that there is a chromedriver binary in the same directory.
var driver = chrome.createDriver(
new webdriver.Capabilities({'browserName': 'chrome... | Make the example test run without requiring local server | Make the example test run without requiring local server
| JavaScript | mit | bbc/webdriverjs-retry,bbc/webdriverjs-retry,juliemr/webdriverjs-retry |
0f3a4183d62b62f288cc9614fe52bc03ba33d01b | test/directory.js | test/directory.js | /* global beforeEach, describe, it */
var watch = require('..');
var join = require('path').join;
var fs = require('fs');
var rimraf = require('rimraf');
require('should');
function fixtures(glob) {
return join(__dirname, 'fixtures', glob);
}
describe.skip('directories', function () {
beforeEach(function () ... | /* global beforeEach, describe, it */
var watch = require('..');
var join = require('path').join;
var fs = require('fs');
var rimraf = require('rimraf');
require('should');
function fixtures(glob) {
return join(__dirname, 'fixtures', glob);
}
describe.skip('directories', function () {
beforeEach(function () ... | Add comment in directories test | Add comment in directories test
| JavaScript | mit | devm33/gulp-watch,UltCombo/gulp-watch,operatino/gulp-watch,moander/gulp-watch,floatdrop/gulp-watch |
cd70ccc9aeb8cb3e26315cd627863ff67e5759f5 | rules/inject-local-id.js | rules/inject-local-id.js | /**
* Adds the ID of the user object stored on our database
* to the token returned from Auth0
*/
function (user, context, callback) {
var namespace = 'https://techbikers.com/';
context.idToken[namespace + 'user_id'] = user.app_metadata.id;
callback(null, user, context);
}
| /**
* Adds the ID of the user object stored on our database
* to the token returned from Auth0
*/
function (user, context, callback) {
var namespace = 'https://techbikers.com/';
// If the user has app_metadata then inject the ID into the token
if (user.app_metadata) {
context.idToken[namespace + 'user_id'... | Check to make sure app_metadata exists | Check to make sure app_metadata exists
There shouldn’t be cases where app_metadata doesn’t exist but if it doesn’t then it will cause an error that prevents the user from being logged in.
Signed-off-by: Michael Willmott <4063ad43ea4e0ae77bf35022808393a246bdfa61@gmail.com>
| JavaScript | mit | Techbikers/authentication |
e4b0d2b5ef01904c7206e855f730a5f3b31a0988 | examples/01-add-user.js | examples/01-add-user.js | // use level-dyno and open a new datastore
var dyno = require('../level-dyno.js');
var flake = require('flake')('eth0');
// open a new database
var db = dyno('/tmp/users');
// do the above sequence
db.putItem('chilts', { nick : 'chilts', email : 'me@example.com' }, flake(), function(err) {
console.log('putItem():... | // use level-dyno and open a new datastore
var dyno = require('../level-dyno.js');
var flake = require('flake')('eth0');
// open a new database
var db = dyno('/tmp/users');
var user = 'chilts';
// do the above sequence
db.putItem(user, { nick : 'chilts', email : 'me@example.com' }, flake(), function(err) {
conso... | Make the example a bit nicer | Make the example a bit nicer
| JavaScript | mit | chilts/modb-dyno-leveldb |
6bbea72f596cfa83b8cf50d3f546fff1bb3ff900 | src/nls/de/urls.js | src/nls/de/urls.js | /*
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the ri... | /*
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the ri... | Add third-party and CC-BY license URLs for 'de' locale | Add third-party and CC-BY license URLs for 'de' locale
| JavaScript | mit | Cartman0/brackets,ralic/brackets,MantisWare/brackets,y12uc231/brackets,Mosoc/brackets,iamchathu/brackets,nucliweb/brackets,flukeout/brackets,sophiacaspar/brackets,fronzec/brackets,pkdevbox/brackets,riselabs-ufba/RiPLE-HC-ExperimentalData,zaggino/brackets-electron,mjurczyk/brackets,82488059/brackets,2youyouo2/cocoslite,... |
7e84c0227dd793591188454e9cc1e3b63d6b8b9f | examples/example.tls.js | examples/example.tls.js | 'use strict';
var spdyPush = require('..')
, spdy = require('spdy')
, express = require('express')
, path = require('path')
, fs = require('fs');
var app = express();
app.use(spdyPush.referrer());
app.use(express.static(path.join(__dirname, '../test/site')));
var options = {
key: fs.readFileSync(path.join(_... | 'use strict';
var spdyPush = require('..')
, spdy = require('spdy')
, express = require('express')
, path = require('path')
, fs = require('fs');
var app = express();
app.use(spdyPush.referrer());
app.use(express.static(path.join(__dirname, '../test/site')));
var options = {
key: fs.readFileSync(path.join(_... | Fix location of SSL key and certificate | Fix location of SSL key and certificate
| JavaScript | mit | halvards/spdy-referrer-push |
54315706195e9280beccdaa7e7cffadef1cecdee | website/static/js/filerenderer.js | website/static/js/filerenderer.js | /*
* Refresh rendered file through mfr
*/
'use strict';
var $ = require('jquery');
var $osf = require('js/osfHelpers');
var FileRenderer = {
start: function(url, selector){
this.url = url;
this.tries = 0;
this.ALLOWED_RETRIES = 10;
this.element = $(selector);
this.getCac... | /*
* Refresh rendered file through mfr
*/
var $ = require('jquery');
var $osf = require('js/osfHelpers');
function FileRenderer(url, selector) {
var self = this;
self.url = url;
self.tries = 0;
self.selector = selector;
self.ALLOWED_RETRIES = 10;
self.element = $(selector);
self.start... | Refactor to OOP ish design | Refactor to OOP ish design
| JavaScript | apache-2.0 | wearpants/osf.io,monikagrabowska/osf.io,KAsante95/osf.io,cosenal/osf.io,doublebits/osf.io,abought/osf.io,mluo613/osf.io,ticklemepierce/osf.io,GageGaskins/osf.io,billyhunt/osf.io,KAsante95/osf.io,chennan47/osf.io,ZobairAlijan/osf.io,GageGaskins/osf.io,acshi/osf.io,ticklemepierce/osf.io,ckc6cz/osf.io,mluo613/osf.io,bayle... |
fb8ff704821e18be2a8aef117f69e32f408cfc5b | models/index.js | models/index.js | /*
* Copyright (c) 2014-2020 Bjoern Kimminich.
* SPDX-License-Identifier: MIT
*/
/* jslint node: true */
const fs = require('fs')
const path = require('path')
const sequelizeNoUpdateAttributes = require('sequelize-noupdate-attributes')
const Sequelize = require('sequelize')
const sequelize = new Sequelize('database... | /*
* Copyright (c) 2014-2020 Bjoern Kimminich.
* SPDX-License-Identifier: MIT
*/
/* jslint node: true */
const fs = require('fs')
const path = require('path')
const sequelizeNoUpdateAttributes = require('sequelize-noupdate-attributes')
const Sequelize = require('sequelize')
const sequelize = new Sequelize('database... | Revert SQLite to file-based instead of in-memory | Revert SQLite to file-based instead of in-memory | JavaScript | mit | bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop |
2b37f7f163fa4eec831e72e1f876ffad3894e1df | pipeline/app/assets/javascripts/app.js | pipeline/app/assets/javascripts/app.js | 'use strict';
var pathwayApp = angular.module('pathwayApp', ['ui.router', 'templates']);
pathwayApp.config(function($stateProvider, $urlRouterProvider, $locationProvider) {
//Default route
$urlRouterProvider.otherwise('/');
$locationProvider.html5Mode(true);
$stateProvider
.state('home', {
url: '/',
... | 'use strict';
var pathwayApp = angular.module('pathwayApp', ['ui.router', 'templates']);
pathwayApp.config(function($stateProvider, $urlRouterProvider, $locationProvider) {
//Default route
$urlRouterProvider.otherwise('/');
$locationProvider.html5Mode(true);
$stateProvider
.state('home', {
url: '/',
... | Add logout and register state, remove incorrect templateUrl | Add logout and register state, remove incorrect templateUrl
| JavaScript | mit | aattsai/Pathway,aattsai/Pathway,aattsai/Pathway |
884def1c71c748655bc294e2b3084c627973a848 | test/db-helpers.js | test/db-helpers.js | const fs = require('fs');
const { promisify } = require('util');
const mongodb = require('mongodb');
const request = require('request');
async function readMongoDocuments(file) {
const ISODate = (d) => new Date(d);
const ObjectId = (id) => mongodb.ObjectID.createFromHexString(id);
return eval(await fs.promises.r... | const fs = require('fs');
const { promisify } = require('util');
const mongodb = require('mongodb');
const request = require('request');
async function readMongoDocuments(file) {
const ISODate = (d) => new Date(d);
const ObjectId = (id) => mongodb.ObjectID.createFromHexString(id);
return eval(await fs.promises.r... | Allow importing test data for any db collection | fix(tests): Allow importing test data for any db collection
| JavaScript | mit | openwhyd/openwhyd,openwhyd/openwhyd,openwhyd/openwhyd,openwhyd/openwhyd,openwhyd/openwhyd |
4a9a3246f633c3ddb358d3e79a38b39bb2a61bb1 | src/fetch-error.js | src/fetch-error.js |
/**
* fetch-error.js
*
* FetchError interface for operational errors
*/
/**
* Create FetchError instance
*
* @param String message Error message for human
* @param String type Error type for machine
* @param String systemError For Node.js system error
* @return FetchError... |
/**
* fetch-error.js
*
* FetchError interface for operational errors
*/
/**
* Create FetchError instance
*
* @param String message Error message for human
* @param String type Error type for machine
* @param String systemError For Node.js system error
* @return FetchError... | Remove dependency on Node.js' util module | Remove dependency on Node.js' util module
Closes #194.
| JavaScript | mit | jkantr/node-fetch,bitinn/node-fetch |
e5c01d6b96b1aec411017bf20069d6706623ff60 | test/markup-frame-test.js | test/markup-frame-test.js | import React from 'react';
import { expect } from 'chai';
import { mount } from 'enzyme';
import MarkupFrame from '../src';
describe( '<MarkupFrame />', () => {
it( 'renders an iframe', () => {
const wrapper = mount( <MarkupFrame markup="" /> );
expect( wrapper.some( 'iframe' ) ).to.equal( true );
} );
it( 'in... | import React from 'react';
import { expect } from 'chai';
import { mount } from 'enzyme';
import MarkupFrame from '../src';
describe( '<MarkupFrame />', function() {
it( 'renders an iframe', function() {
const wrapper = mount( <MarkupFrame markup="" /> );
expect( wrapper.find( 'iframe' ) ).to.have.length( 1 );
}... | Update tests to cover most common cases | Update tests to cover most common cases
They don't work, of course, because (I think) some mix of React, jsdom, and
iframes don't work correctly together.
| JavaScript | mit | sirbrillig/markup-frame |
9578954c6b1817ff7a8e8bfa0a4532835c8040e9 | client/js/app.js | client/js/app.js | console.log('Tokimeki Memorial'); | console.log('Tokimeki Memorial');
var host = window.document.location.host.replace(/:.*/, '');
var ws = new WebSocket('ws://' + host + ':8000');
ws.onmessage = function (event) {
//console.log(event);
//console.log(JSON.parse(event.data));
}; | Make WS connection in index page for testing purposes. | Make WS connection in index page for testing purposes.
| JavaScript | apache-2.0 | AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers |
cc0a3c204f59e1039cad5b592d969fac30c40fbf | src/components/Members/MemberDetail.js | src/components/Members/MemberDetail.js | import React, { Component, PropTypes } from 'react';
class MembersDetail extends Component {
render() {
const {displayName} = this.props;
return (
<div>
<h1>{displayName}</h1>
</div>
);
}
}
MembersDetail.propTypes = {
displayName: PropTypes.string.isRequired,
};
export default ... | import React, { Component, PropTypes } from 'react';
class MembersDetail extends Component {
render() {
const {displayName, image} = this.props;
return (
<div>
<h1>{displayName}</h1>
<img src={image.uri} style={{
display: 'inline-block',
paddingRight: '10px',
... | Add image and proptypes for member detail page | Add image and proptypes for member detail page
| JavaScript | cc0-1.0 | cape-io/acf-client,cape-io/acf-client |
d794502bfcc0204aa7fdbe6d9f103a1099919718 | kolibri/core/assets/src/state/modules/snackbar.js | kolibri/core/assets/src/state/modules/snackbar.js | export default {
state: {
isVisible: false,
options: {
text: '',
autoDismiss: true,
},
},
getters: {
snackbarIsVisible(state) {
return state.isVisible;
},
snackbarOptions(state) {
return state.options;
},
},
mutations: {
CORE_CREATE_SNACKBAR(state, snack... | export default {
state: {
isVisible: false,
options: {
text: '',
autoDismiss: true,
},
},
getters: {
snackbarIsVisible(state) {
return state.isVisible;
},
snackbarOptions(state) {
return state.options;
},
},
mutations: {
CORE_CREATE_SNACKBAR(state, snack... | Add comment about autodismiss options | Add comment about autodismiss options
| JavaScript | mit | lyw07/kolibri,indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,indirectlylit/kolibri,mrpau/kolibri,learningequality/kolibri,indirectlylit/kolibri,lyw07/kolibri,mrpau/kolibri,lyw07/kolibri,indirectlylit/kolibri,learningequality/kolibri,learningequality/kolibri,lyw07/kolibri |
23010015c762a1274597e2754d190fabad078cfe | src/components/SearchResultListItem.js | src/components/SearchResultListItem.js | import React from 'react';
import { connect } from 'react-redux';
const DocumentListItem = ({ title, collection, schema }) => (
<tr className={`result result--${schema}`}>
<td>{ title }</td>
<td className="result__collection">{ collection && collection.label }</td>
<td></td>
</tr>
);
const PersonListI... | import React from 'react';
import { connect } from 'react-redux';
const DocumentListItem = ({ title, collection, schema }) => (
<tr className={`result result--${schema}`}>
<td>{ title }</td>
<td className="result__collection">{ collection && collection.label }</td>
<td></td>
</tr>
);
const PersonListI... | Add placeholder for loading collection names | Add placeholder for loading collection names
| JavaScript | mit | alephdata/aleph,alephdata/aleph,pudo/aleph,pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph |
be3331f24e7693c41e012a2eb935d474de224f1f | frontend/web/js/main.js | frontend/web/js/main.js | $(document).ready(function() {
$('#global-modal-container').on('show.bs.modal', function (event) {
sourceUrl = $(event.relatedTarget).attr('href');
getGlobalModalHtml(sourceUrl);
});
});
function getGlobalModalHtml(url) {
$.ajax({
url: url,
type: "post",
success: fu... | $(document).ready(function() {
$('#global-modal-container').on('show.bs.modal', function (event) {
sourceUrl = $(event.relatedTarget).attr('href');
getGlobalModalHtml(sourceUrl);
$('.tooltip').hide();
});
});
function getGlobalModalHtml(url) {
$.ajax({
url: url,
type... | Hide all tooltips when showing a modal window | Hide all tooltips when showing a modal window | JavaScript | bsd-3-clause | gooGooGaJoob/banthecan,gooGooGaJoob/banthecan,gooGooGaJoob/banthecan |
1faf99e332f94ab27fcef68f05ef8760c219bf4c | static-routes/stylesheets.js | static-routes/stylesheets.js | const sass = require('node-sass');
const path = require('path');
const config = require('../config');
const fs = require('fs');
const imdino = require('imdi-no');
const development = config.env === 'development';
module.exports = {
"/stylesheets/main.css": function (callback) {
const opts = {
file: ... | const sass = require('node-sass');
const path = require('path');
const config = require('../config');
const fs = require('fs');
const imdino = require('imdi-no');
const development = config.env === 'development';
module.exports = {
"/stylesheets/main.css": function (callback) {
const opts = {
file: ... | Use require.resolve to locate main.scss | Use require.resolve to locate main.scss
| JavaScript | mit | bengler/imdikator,bengler/imdikator |
bd5644d859ccb3639666afe46fda03d3610bb374 | public/modules/slideshows/services/slideshows.client.service.js | public/modules/slideshows/services/slideshows.client.service.js | /*global angular*/
(function () {
'use strict';
//Slideshows service used to communicate Slideshows REST endpoints
angular.module('slideshows').factory('Slideshows', ['$resource',
function ($resource) {
return $resource('slideshows/:slideshowId',
{ slideshow... | /*global angular*/
(function () {
'use strict';
//Slideshows service used to communicate Slideshows REST endpoints
angular.module('slideshows').factory('Slideshows', ['$resource',
function ($resource) {
return $resource('slideshows/:slideshowId', {
slideshowId: '@_id'
... | Add name as parameter when geting devices for a slideshow | Add name as parameter when geting devices for a slideshow
| JavaScript | mit | tmol/iQSlideShow,tmol/iQSlideShow,tmol/iQSlideShow |
dbee31c17ab6f6376683e97cb1904820d37fcd65 | website/src/html.js | website/src/html.js | import React from 'react'
import PropTypes from 'prop-types'
export default function HTML(props) {
return (
<html {...props.htmlAttributes}>
<head>
<meta charSet="utf-8" />
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
<meta
... | import React from 'react'
import PropTypes from 'prop-types'
export default function HTML(props) {
return (
<html {...props.htmlAttributes}>
<head>
<meta charSet="utf-8" />
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
<meta
... | Revert "Move DocSearch styles before headComponents" | Revert "Move DocSearch styles before headComponents"
This reverts commit 1232ccbc0ff6c5d9e80de65cefb352c404973e2f.
| JavaScript | mit | spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,honnibal/spaCy |
b8f6446ee6a1eb0a149a4f69182f2004b09500ea | app/angular/controllers/games_controller.js | app/angular/controllers/games_controller.js | 'use strict';
module.exports = function(app) {
app.controller('GamesController', ['$scope', 'UserService', 'FriendService', 'GameService', 'SearchService', function($scope, UserService, FriendService, GameService, SearchService) {
let ctrl = this;
$scope.FriendService = FriendService;
$scope.allFriends ... | 'use strict';
module.exports = function(app) {
app.controller('GamesController', ['$scope', 'UserService', 'FriendService', 'GameService', 'SearchService', function($scope, UserService, FriendService, GameService, SearchService) {
let ctrl = this;
$scope.FriendService = FriendService;
$scope.allFriends ... | Remove catch from createGame method. Errors are handled by service layer of app. | Remove catch from createGame method. Errors are handled by service layer of app.
| JavaScript | mit | sendjmoon/GolfFourFriends,sendjmoon/GolfFourFriends |
2acffe782320c79648816c3a181138b71babb60c | config/webpack.common.js | config/webpack.common.js | const webpack = require('webpack');
const helpers = require('./helpers');
module.exports = {
entry: {
'index': './src/index.js',
// 'test': './src/test.js'
},
output: {
path: helpers.root('dist'),
filename: '[name].js',
chunkFilename: '[id].chunk.js',
libraryTar... | const webpack = require('webpack');
const helpers = require('./helpers');
module.exports = {
entry: {
'index': './src/index.js',
// 'test': './src/test.js'
},
output: {
path: helpers.root('dist'),
filename: '[name].js',
chunkFilename: '[id].chunk.js',
libraryTar... | Update UMD Named define to true | Update UMD Named define to true
| JavaScript | mit | maniator/servable,maniator/servable |
fc2c58045d1015187ab6c9cad4532238e6c90736 | next-migrations/src/migrations/20180605215102_users.js | next-migrations/src/migrations/20180605215102_users.js | exports.up = function(knex, Promise) {
return Promise.all([
knex.schema.createTable('next_users', table => {
table.bigIncrements()
table.string('email')
table.string('name')
table.string('password')
table.string('origin')
table.string('baseurl')
table.string('phone')
... | exports.up = function(knex, Promise) {
return Promise.all([
knex.schema.createTable('next_users', table => {
table.bigIncrements()
table.string('email')
table.string('name')
table.string('password')
table.string('origin')
table.string('baseurl')
table.string('phone')
... | Revert to using timestamps in database. | TeikeiNext: Revert to using timestamps in database.
| JavaScript | agpl-3.0 | teikei/teikei,teikei/teikei,teikei/teikei |
aecf231cb6310fba9af5a07ffbcced2e084a799d | config/ember-try.js | config/ember-try.js | module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-release',
dependencies: {
'ember': 'components/ember#release'
},
resolutions: {
'ember': 'release'
}
},
{
name: 'ember-beta',
dependencies: {... | module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember 1.13',
dependencies: {
'ember': '1.13.8'
},
resolutions: {
'ember': '1.13.8'
}
},
{
name: 'ember-release',
dependencies: {
'ember': '... | Add 1.13 to the test matrix | Add 1.13 to the test matrix
| JavaScript | mit | cibernox/ember-power-select,chrisgame/ember-power-select,cibernox/ember-power-select,cibernox/ember-power-select,Dremora/ember-power-select,chrisgame/ember-power-select,esbanarango/ember-power-select,cibernox/ember-power-select,esbanarango/ember-power-select,Dremora/ember-power-select,esbanarango/ember-power-select |
405acc213c0861d4aab21a568c5419d4a48a2b57 | test/testHelper.js | test/testHelper.js | require("babel/register")({
stage: 1,
ignore: /node_modules/
});
global.Promise = require('bluebird')
global.Promise.onPossiblyUnhandledRejection((e) => { throw e; });
global.Promise.config({
// Enable warnings.
warnings: false,
// Enable long stack traces.
longStackTraces: true,
// Enable cancellation.... | require("babel/register")({
stage: 1,
ignore: /node_modules/
});
global.Promise = require('bluebird')
global.Promise.onPossiblyUnhandledRejection((e) => { throw e; });
global.Promise.config({
// Enable warnings.
warnings: false,
// Enable long stack traces.
longStackTraces: true,
// Enable cancellation.... | Add postgres connection and knex to global test variables. | Add postgres connection and knex to global test variables.
| JavaScript | mit | golozubov/freefeed-server,golozubov/freefeed-server,SiTLar/freefeed-server,FreeFeed/freefeed-server,FreeFeed/freefeed-server,SiTLar/freefeed-server |
79865e36fa70a52d04f586b24da14a216b883432 | test/media-test.js | test/media-test.js | /* Global Includes */
var testCase = require('mocha').describe;
var pre = require('mocha').before;
var preEach = require('mocha').beforeEach;
var post = require('mocha').after;
var postEach = require('mocha').afterEach;
var assertions = require('mocha').it;
var assert = require('chai').assert;
v... | /* Global Includes */
var testCase = require('mocha').describe;
var pre = require('mocha').before;
var preEach = require('mocha').beforeEach;
var post = require('mocha').after;
var postEach = require('mocha').afterEach;
var assertions = require('mocha').it;
var assert = require('chai').assert;
v... | Use time duration of test to measure the success | Media: Use time duration of test to measure the success
Signed-off-by: Vaibhav Singh <c267fbcdc94c01eb807238c388b92f321583d99b@samsung.com>
| JavaScript | mit | hoondol/artik-sdk,hoondol/artik-sdk |
a16b17307bd5658f6ce9eaea4002e7860cea908b | webpack.config.js | webpack.config.js | // Copyright 2018 Google LLC
//
// 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
//
// <https://www.apache.org/licenses/LICENSE-2.0>
//
// Unless required by applicable law or agreed to i... | // Copyright 2018 Google LLC
//
// 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
//
// <https://www.apache.org/licenses/LICENSE-2.0>
//
// Unless required by applicable law or agreed to i... | Support older JavaScript engine shells. | Support older JavaScript engine shells.
| JavaScript | apache-2.0 | v8/promise-performance-tests |
d251916fa362ce6064bbcef28eaa009294e2271a | app/components/summer-note.js | app/components/summer-note.js | /*
This is just a proxy file requiring the component from the /addon folder and
making it available to the dummy application!
*/
import SummerNoteComponent from 'ember-cli-bootstrap3-wysiwyg/components/bs-wysihtml5';
export default SummerNoteComponent; | /*
This is just a proxy file requiring the component from the /addon folder and
making it available to the dummy application!
*/
import SummerNoteComponent from 'ember-cli-summernote/components/summer-note';
export default SummerNoteComponent; | Fix the import path error. | Fix the import path error.
| JavaScript | mit | Flightlogger/ember-cli-summernote,brett-anderson/ember-cli-summernote,vsymguysung/ember-cli-summernote,Flightlogger/ember-cli-summernote,wzowee/ember-cli-summernote,wzowee/ember-cli-summernote,emoryy/ember-cli-summernote,vsymguysung/ember-cli-summernote,emoryy/ember-cli-summernote,brett-anderson/ember-cli-summernote |
9a521faa76fd26b762f7b45096d5dc8ec1608429 | assets/js/vendor/sb-admin-2.js | assets/js/vendor/sb-admin-2.js | $(function() {
$('#side-menu').metisMenu();
});
//Loads the correct sidebar on window load,
//collapses the sidebar on window resize.
// Sets the min-height of #page-wrapper to window size
$(function() {
$(window).bind("load resize", function() {
topOffset = 50;
width = (this.window.innerWidt... | $(function() {
$('#side-menu').metisMenu();
});
//Loads the correct sidebar on window load,
//collapses the sidebar on window resize.
// Sets the min-height of #page-wrapper to window size
$(function() {
$(window).bind("load resize", function() {
topOffset = 50;
width = (this.window.innerWidt... | Fix highlighting of menu points for sub-routes. | Fix highlighting of menu points for sub-routes.
| JavaScript | mit | kumpelblase2/modlab,kumpelblase2/modlab |
3ba0a0fd6bacacb7328fbab9ef335d7697ebb1cb | js/lowlight.js | js/lowlight.js | "use strict";
/*
NOT a general purpose escaper! Only valid when *content* of a tag, not within an attribute.
*/
function escape(code) {
return code
.replace("&", "&", "g")
.replace("<", "<", "g")
.replace(">", ">", "g");
}
function lowlight(lang, lexer, code) {
var ret = "... | "use strict";
/*
NOT a general purpose escaper! Only valid when *content* of a tag, not within an attribute.
*/
function escape(code) {
return code
.replace("&", "&", "g")
.replace("<", "<", "g")
.replace(">", ">", "g");
}
function lowlight(lang, lexer, code) {
var ret = "... | Add span content as content attribute | Add span content as content attribute
This allows styles to use it in CSS `.foo[content*=bar]` selectors.
| JavaScript | apache-2.0 | lucaswerkmeister/ColorTrompon,lucaswerkmeister/ColorTrompon |
707e854d6213dd9580c22a08a7e694f3923c723d | src/url_handler.js | src/url_handler.js | import { flashURLHandler } from './urlhandlers/flash_url_handler';
import { nodeURLHandler } from './urlhandlers/mock_node_url_handler';
import { XHRURLHandler } from './urlhandlers/xhr_url_handler';
function get(url, options, cb) {
// Allow skip of the options param
if (!cb) {
if (typeof options === 'function... | import { flashURLHandler } from './urlhandlers/flash_url_handler';
import { nodeURLHandler } from './urlhandlers/mock_node_url_handler';
import { XHRURLHandler } from './urlhandlers/xhr_url_handler';
function get(url, options, cb) {
// Allow skip of the options param
if (!cb) {
if (typeof options === 'function... | Remove useless check from default urlhandler | [util] Remove useless check from default urlhandler
| JavaScript | mit | dailymotion/vast-client-js |
f5078515f9eea811adb79def7748350c37306c0a | packages/react-hot-boilerplate/webpack.config.js | packages/react-hot-boilerplate/webpack.config.js | var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./scripts/index'
],
output: {
path: __dirname + '/scripts/',
filename: 'bundle.js',
publicPath: '/scripts/'
},
plugins: [... | var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./scripts/index'
],
output: {
path: path.join(__dirname, 'build'),
filename: 'bundle.js',
publicP... | Use include over exclude so npm link works | Use include over exclude so npm link works
| JavaScript | mit | gaearon/react-hot-loader,gaearon/react-hot-loader |
fa03a474f29e26078d0a9cd8700eca18c3107e50 | js/stopwatch.js | js/stopwatch.js | (function(stopwatch){
var Game = stopwatch.Game = function(seconds){
this.target = 1000 * seconds; // in milliseconds
};
Game.prototype.current = function(){
return 0;
};
};
var GameView = stopwatch.GameView = function(game, container){
this.game = game;
this.con... | (function(stopwatch){
var Game = stopwatch.Game = function(seconds){
this.target = 1000 * seconds; // in milliseconds
this.started = false;
this.stopped = false;
};
Game.prototype.current = function(){
if (this.started) {
return (this.stopped ? this.stopTime: this... | Create a start and stop method | Create a start and stop method
| JavaScript | mit | dvberkel/StopWatch,dvberkel/StopWatch |
3c9cf063b0578c85362a81d76b5e84bb6faae9b2 | const_and_let.js | const_and_let.js | #!/usr/bin/env node
const constMessage = "Hello, World!";
console.log(constMessage);
let letMessage = "Hello, World!";
console.log(letMessage);
letMessage = "Goodbye, World!";
console.log(letMessage);
| #!/usr/bin/env node
const constMessage = "Hello, World!";
console.log(constMessage);
let letMessage = "Hello, World!";
console.log(letMessage);
letMessage = "Goodbye, World!";
console.log(letMessage);
const é = "Accented";
console.log(é);
const 学习 = "Learn";
console.log(学习);
// const ∃ = "There exists"; CRASH
// con... | Add weird variable names to let and const example | Add weird variable names to let and const example
| JavaScript | apache-2.0 | peopleware/js-training-node-scripting,peopleware/js-training-node-scripting |
06f6f2ff1dc60897f707e8a482a8ff1084ae8f7a | src/components/user/repo/trashbin.repo.js | src/components/user/repo/trashbin.repo.js | const { model: trashbinModel } = require('./db/trashbin.schema');
const createUserTrashbin = (userId) => {
// access trashbin model
const trashbin = trashbinModel({
userId,
});
return trashbin.save();
};
const updateUserTrashbin = (userId, data = {}) => {
// access trashbin model
return trashbinModel.updateOn... | const { model: trashbinModel } = require('./db/trashbin.schema');
const createUserTrashbin = (userId) => {
// access trashbin model
const trashbin = trashbinModel({
userId,
});
return trashbin.save();
};
const updateUserTrashbin = async (id, data = {}) => {
// access trashbin model
const trashbin = await tras... | Use Mongoose functions for updating | Use Mongoose functions for updating
| JavaScript | agpl-3.0 | schul-cloud/schulcloud-server,schul-cloud/schulcloud-server,schul-cloud/schulcloud-server |
2f5b013afcc40bd90ba26aed33c9c5c142237016 | packages/soya-next/src/pages/createBasePage.js | packages/soya-next/src/pages/createBasePage.js | import React from "react";
import { compose } from "react-apollo";
import hoistStatics from "hoist-non-react-statics";
import BaseProvider from "../components/BaseProvider";
import applyRedirect from "../router/applyRedirect";
import withCookies from "../cookies/withCookiesPage";
import withLocale from "../i18n/withLoc... | import React from "react";
import { compose } from "redux";
import hoistStatics from "hoist-non-react-statics";
import BaseProvider from "../components/BaseProvider";
import applyRedirect from "../router/applyRedirect";
import withCookies from "../cookies/withCookiesPage";
import withLocale from "../i18n/withLocalePage... | Replace react-apollo with redux compose | Replace react-apollo with redux compose
| JavaScript | mit | traveloka/soya-next |
015f85622b33df01971ffc784f0f7594da30c889 | app/controllers/name.controller.js | app/controllers/name.controller.js | 'use strict';
angular.module('houseBand')
.controller('NameCtrl', function($state){
this.roomCheck = function(room){
if(room){
return $state.go('home', {room: room})
}
alert('Please name your band')
return false
}
});
| 'use strict';
angular.module('houseBand')
.controller('NameCtrl', function($state){
this.roomCheck = function(room){
if(room){
return $state.go('home', {room: room.toLowerCase()})
}
alert('Please name your band');
return false
}
});
| Make room name lower case | Make room name lower case
| JavaScript | mit | HouseBand/client,HouseBand/client |
55e138a77becada80430cc7795bbb6bd23a66843 | lib/index.js | lib/index.js | 'use strict';
module.exports = (...trackers) => {
const tracker = {};
tracker.createEvent = (eventName, eventData) => {
trackers.forEach((tk) => {
tk.createEvent(eventName, eventData);
});
return tracker;
};
return tracker;
};
| 'use strict';
module.exports = function eventTracker() {
const tracker = {};
const trackers = Array.prototype.slice.call(arguments);
tracker.createEvent = (eventName, eventData) => {
trackers.forEach((tk) => {
tk.createEvent(eventName, eventData);
});
return tracker;
};
return tracker;
};
| Remove destructuring and add arguments | Remove destructuring and add arguments
| JavaScript | mit | ZimpFidelidade/universal-event-tracker |
9f8fa2f067e7b91cac796268dbabacdce5a3fc6c | test/boost-field-test.js | test/boost-field-test.js | var mongoose = require('mongoose')
, elastical = require('elastical')
, esClient = new(require('elastical').Client)
, should = require('should')
, config = require('./config')
, Schema = mongoose.Schema
, ObjectId = Schema.ObjectId
, mongoosastic = require('../lib/mongoosastic');
var TweetSc... | var mongoose = require('mongoose')
, elastical = require('elastical')
, esClient = new(require('elastical').Client)
, should = require('should')
, config = require('./config')
, Schema = mongoose.Schema
, ObjectId = Schema.ObjectId
, mongoosastic = require('../lib/mongoosastic');
var TweetSc... | Correct boost test field (support ES 0.9 and 1.0). | Correct boost test field (support ES 0.9 and 1.0).
In my tests, the mapping format returned by the getMapping function is
not the same between 0.90.11 and 1.0
| JavaScript | mit | mongoosastic/mongoosastic,teambition/mongoosastic,ennosol/mongoosastic,francesconero/mongoosastic,ennosol/mongoosastic,guumaster/mongoosastic,francesconero/mongoosastic,mongoosastic/mongoosastic,avastms/mongoosastic,guumaster/mongoosastic,teambition/mongoosastic,mallzee/mongoosastic,guumaster/mongoosastic,mallzee/mongo... |
1569457c708195ea017fb047beab7ade7ed918ab | common/components/constants/ProjectConstants.js | common/components/constants/ProjectConstants.js | export const Locations = {
OTHER: "Other",
PRESET_LOCATIONS: [
"Seattle, WA",
"Redmond, WA",
"Kirkland, WA",
"Bellevue, WA",
"Tacoma, WA",
"Olympia, WA",
"Bay Area, CA",
"Baltimore, MD",
"Other"
]
}; | export const Locations = {
OTHER: "Other",
PRESET_LOCATIONS: [
"Seattle, WA",
"Redmond, WA",
"Kirkland, WA",
"Bellevue, WA",
"Tacoma, WA",
"Olympia, WA",
"Portland, OR",
"Bay Area, CA",
"Baltimore, MD",
"Other"
]
}; | Add Portland, OR to location list | Add Portland, OR to location list
| JavaScript | mit | DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange |
38eb816b54300fec9ccf2ed3978f0dc66624981a | lib/index.js | lib/index.js | module.exports = {
'Unit': require('./unit'),
'Lexer': require('./lexer'),
};
| module.exports = {
// Objects
'Unit': require('./unit'),
'Lexer': require('./lexer'),
// Methods
'math': require('./math'),
};
| Add math & clean up. | Add math & clean up.
| JavaScript | mit | jamen/craze |
51ca67b91d6256ce48171b912e649a08ec7638c1 | cosmoz-bottom-bar-view.js | cosmoz-bottom-bar-view.js | /*global Polymer, Cosmoz*/
(function () {
'use strict';
Polymer({
is: 'cosmoz-bottom-bar-view',
behaviors: [
Cosmoz.ViewInfoBehavior,
Polymer.IronResizableBehavior
],
properties: {
overflowing: {
type: Boolean,
value: false,
reflectToAttribute: true
},
scroller: {
type: ... | /*global Polymer, Cosmoz*/
(function () {
'use strict';
Polymer({
is: 'cosmoz-bottom-bar-view',
behaviors: [
Cosmoz.ViewInfoBehavior,
Polymer.IronResizableBehavior
],
properties: {
overflowing: {
type: Boolean,
value: false,
reflectToAttribute: true
},
scroller: {
type: ... | Fix bug where the placeholder would flex out | Fix bug where the placeholder would flex out
Might be related to shady DOM or <slot> hybrid mode.
| JavaScript | apache-2.0 | Neovici/cosmoz-bottom-bar,Neovici/cosmoz-bottom-bar |
d1c78416c722a0cf8e1107c8b3a640129f19197a | js/lib/get-absolute-url.js | js/lib/get-absolute-url.js | export function getAbsoluteUrl({ path, getSassFileGlobPattern, glob }, url, includePaths = []) {
const { dir, base } = path.parse(url);
const baseGlobPattern = getSassFileGlobPattern(base);
includePaths.some((includePath) => {
glob.sync(path.resolve(includePath, dir, baseGlobPattern));
return false;
});... | import globModule from 'glob';
import pathModule from 'path';
import getSassFileGlobPatternModule from './get-sass-file-glob-pattern';
export function getAbsoluteUrl({ path, getSassFileGlobPattern, glob }, url, includePaths = []) {
const { dir, base } = path.parse(url);
const baseGlobPattern = getSassFileGlobPatt... | Implement the simplified testable module pattern. | Implement the simplified testable module pattern.
Read more about the pattern here: https://markus.oberlehner.net/blog/2017/02/the-testable-module-pattern/
| JavaScript | mit | maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.