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 |
|---|---|---|---|---|---|---|---|---|---|
740fe7c68a3dc0c66621ac83b04df579d7e0b180 | pages/about.js | pages/about.js | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import React, { Component } from 'react';
export default class extends Component {
render() {
return (
<div>
<h1>About Us</h1>
<p>We are a... | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import React, { Component } from 'react';
export default class extends Component {
render() {
return (
<div>
<h1>About Us</h1>
<p>We are a... | Revert "Added revert test line" | Revert "Added revert test line"
This reverts commit 493c18f25d20e16f044d7ec489f836f72151e3bb.
| JavaScript | mit | Princeton-SSI/organization-website |
33f0d928fa52c7bab202017d31bbed5be43bb57f | data/search-data.js | data/search-data.js | module.exports = function (models) {
const {
Photo,
User
} = models;
return {
searchPhotos(pattern) {
let regex = new RegExp(pattern, 'i');
return new Promise((resolve, reject) => {
Photo.find({
$or: [{
... | module.exports = function (models) {
const {
Photo,
User
} = models;
return {
searchPhotos(pattern) {
let regex = new RegExp(pattern, 'i');
return new Promise((resolve, reject) => {
Photo.find({
$or: [{
... | Tag searching now really works! | Tag searching now really works!
| JavaScript | mit | Bird-Shamaness/MuchPixels,Bird-Shamaness/MuchPixels |
dfaea825bc63b9930a3ed2ae4e170771981f9c0a | app.js | app.js | var RtmClient = require('@slack/client').RtmClient;
var RTM_CLIENT_EVENTS = require('@slack/client').CLIENT_EVENTS.RTM;
var RTM_EVENTS = require('@slack/client').RTM_EVENTS;
var Conversation = require('watson-developer-cloud/conversation/v1')
var conversation = new Conversation({
username: process.env.CONVERSATION_US... | var RtmClient = require('@slack/client').RtmClient;
var RTM_CLIENT_EVENTS = require('@slack/client').CLIENT_EVENTS.RTM;
var RTM_EVENTS = require('@slack/client').RTM_EVENTS;
var Conversation = require('watson-developer-cloud/conversation/v1')
var conversation = new Conversation({
username: process.env.CONVERSATION_US... | Fix history message user issue | Fix history message user issue
| JavaScript | mit | SinisterBlade/slackbot |
1348dbf2b3dc6150ed1939da81a630943eafe99c | lib/octobat-moss-service.js | lib/octobat-moss-service.js | 'use strict';
var rest = require('restler-q');
var q = require('q');
module.exports = function(options) {
return q.fcall(function() {
if (!options) {
throw new Error("options required");
}
var supplier = options.supplier;
var customer = options.customer;
if (!supplier || !customer) {
... | 'use strict';
var rest = require('restler-q');
var q = require('q');
module.exports = function(options) {
return q.fcall(function() {
if (!options) {
throw new Error("options required");
}
var supplier = options.supplier;
var customer = options.customer;
if (!supplier || !customer) {
... | Handle change to octobat service api. | Handle change to octobat service api.
| JavaScript | mit | gitterHQ/vat-calculator |
f60c3ffc40204c6c92581b96584a176d88fc21ec | lib/transport/demo/index.js | lib/transport/demo/index.js | "use babel";
import github from './github';
import git from './git';
export default {
github,
git,
make: function ({git, github}) {
let dup = Object.create(this);
if (git) {
let g = Object.create(this.git);
Object.keys(git).forEach((k) => {
g[k] = git[k];
});
dup.git ... | "use babel";
import github from './github';
import git from './git';
function validStub(name, real, stub) {
if (real === undefined) {
throw new Error(`Attempt to stub nonexistent property: ${name}`);
}
if (typeof real !== typeof stub) {
throw new Error(`Attempt to stub ${name} (${typeof real}) with ${t... | Validate stubs before permitting them. | Validate stubs before permitting them.
| JavaScript | mit | smashwilson/pull-request |
d27e66c219a2b0f175ea392ca41b074f25fdd4ef | source/moon-container-init.js | source/moon-container-init.js | (function (enyo, scope) {
enyo.kind({
name: 'moon.ContainerInitializer',
components: [
{kind: 'moon.Drawers', drawers: [{}], components: [
{kind: 'moon.Panels', pattern: 'activity', components: [
{components: [
{kind: 'moon.TooltipDecorator', components: [{kind: 'moon.Button'},{kind: 'moon.Toolti... | (function (enyo, scope) {
enyo.kind({
name: 'moon.ContainerInitializer',
components: [
{kind: 'moon.Drawers', drawers: [{}], components: [
{kind: 'moon.Panels', pattern: 'activity', components: [
{components: [
{kind: 'moon.TooltipDecorator', components: [{kind: 'moon.Button'},{kind: 'moon.Toolti... | Remove moon.Slider from set of pre-[initialized, rendered, destroyed] controls. | ENYO-373: Remove moon.Slider from set of pre-[initialized, rendered, destroyed] controls.
Enyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>
| JavaScript | apache-2.0 | mcanthony/moonstone,mcanthony/moonstone,mcanthony/moonstone,enyojs/moonstone |
120371b68002767acad1310860cbfaecef5dfd7d | server/routes/schema-info.js | server/routes/schema-info.js | require('../typedefs');
const router = require('express').Router();
const mustHaveConnectionAccess = require('../middleware/must-have-connection-access.js');
const ConnectionClient = require('../lib/connection-client');
const wrap = require('../lib/wrap');
/**
* @param {Req} req
* @param {Res} res
*/
async function... | require('../typedefs');
const router = require('express').Router();
const mustHaveConnectionAccess = require('../middleware/must-have-connection-access.js');
const ConnectionClient = require('../lib/connection-client');
const wrap = require('../lib/wrap');
/**
* @param {Req} req
* @param {Res} res
*/
async function... | Send schema info error as 400 | Send schema info error as 400
This assume schema info failure is due to user input, not application code. This could be that the server is unavailable however. Regardless it is something to be expected as opposed to an internal server error
| JavaScript | mit | rickbergfalk/sqlpad,rickbergfalk/sqlpad,rickbergfalk/sqlpad |
184d6265997ef8fd114e0a605a1a2b279c150543 | game/game-state-managers/instructionsState.js | game/game-state-managers/instructionsState.js | var instructionsState = {
create: function () {
_setBackgroundImage('instructions');
battleStateButton = new MenuButton(528, 175, "mainMenuButtons", "mapSelectState", "battleGround", "map", "army1", "army2", "battleButton", 0, 0, 1, 0);
campaignStateButton = new MenuButton(528, 275, "mainMenuButtons", "m... | var instructionsState = {
create: function () {
_setBackgroundImage('instructions');
battleStateButton = new MenuButton(175, 500, "mainMenuButtons", "mapSelectState", "battleGround", "map", "army1", "army2", "battleButton", 0, 0, 1, 0);
campaignStateButton = new MenuButton(450, 500, "mainMenuButtons", "m... | Adjust buttons on instructions page | Adjust buttons on instructions page
| JavaScript | mit | JohnP42/Fantasy-Wars,JohnP42/Fantasy-Wars |
d92515ee55752ab9054441ac2dc2ae7f2dd7fc07 | source/nestedSortableCtrl.js | source/nestedSortableCtrl.js | (function () {
'use strict';
angular.module('ui.nestedSortable')
.controller('NestedSortableController', ['$scope', '$attrs', 'nestedSortableConfig',
function ($scope, $attrs, nestedSortableConfig) {
$scope.sortableElement = null;
$scope.sortableModelValue = null;
$scope.callba... | (function () {
'use strict';
angular.module('ui.nestedSortable')
.controller('NestedSortableController', ['$scope', 'nestedSortableConfig',
function ($scope, nestedSortableConfig) {
$scope.sortableElement = null;
$scope.sortableModelValue = null;
$scope.callbacks = null;
... | Remove unexisting $attrs provider + unused itemScope parameter | Remove unexisting $attrs provider + unused itemScope parameter
| JavaScript | mit | joaocc/angular-ui-tree,TommyM/angular-ui-tree,akshath4u/akkutest,kotmatpockuh/angular-ui-tree,robertdamoc/angular-ui-tree,faceleg/angular-ui-tree,Movideo/angular-ui-tree,fmoliveira/angular-ui-tree,foglerek/angular-ui-tree,BlakeBrown/angular-ui-tree,albi34/angular-ui-tree,zachlysobey/angular-ui-tree,asciicode/angular-ui... |
07ceb4095f62f37ba36b401f8834706f9aeb712a | app.js | app.js | /*jslint node: true*/
"use strict";
var site = require("./lib/scraper").site;
site.
getRecipeUrls().
then(function (recipeUrls) {
return site.getRecipe(recipeUrls[0]);
}).
then(function (recipe) {
console.log(JSON.stringify(recipe));
});
| /*jslint node: true*/
"use strict";
var site = require("./lib/scraper").site;
site.
getRecipeUrls().
then(function (recipeUrls) {
return site.getRecipe(recipeUrls[0]);
}).
then(function (recipe) {
console.log(JSON.stringify(recipe));
}).
done();
| Make sure to call done to end the promise chain | Make sure to call done to end the promise chain
| JavaScript | mit | Koekelas/dagelijkse-kost,Koekelas/dagelijkse-kost |
d859978c912d6a49ca1d87f012647eccdd7378d9 | app.js | app.js | const Server = require('./server.heroku.js')
const port = (process.env.PORT || 8080)
const app = Server.app()
/*if (process.env.NODE_ENV !== 'production') {
const webpack = require('webpack')
const webpackDevMiddleware = require('webpack-dev-middleware')
const webpackHotMiddleware = require('webpack-hot-middlewa... | const Server = require('./server.heroku.js')
const port = (process.env.PORT || 8080)
const app = Server.app()
if (process.env.NODE_ENV !== 'production') {
const webpack = require('webpack')
const WebpackDevServer = require('webpack-dev-server');
const config = require('./webpack.config.js')
new WebpackDevServ... | Consolidate dev and prod server initialization | Consolidate dev and prod server initialization
| JavaScript | mit | kngroo/Kngr,kngroo/Kngr |
2a6d614b453c545bce4c8a8b0ef9d7548554c74b | app.js | app.js | var config = require('./config');
var express = require('express');
var bodyParser = require('body-parser');
var winston = require('winston');
winston.add(winston.transports.File, { filename: 'info.log', level: 'info' });
winston.remove(winston.transports.Console);
winston.add(winston.transports.Console, { level: 'info... | var config = require('./config');
var express = require('express');
var bodyParser = require('body-parser');
var winston = require('winston');
winston.add(winston.transports.File, { filename: 'info.log', level: 'info' });
winston.remove(winston.transports.Console);
winston.add(winston.transports.Console, { level: 'info... | Test serving static log file. | Test serving static log file.
| JavaScript | mit | membersheep/4bot |
75534b5dca41c6e5a36b34094ce50d72a23a3889 | app.js | app.js | var app = require('express')();
var server = require('http').Server(app);
var io = require('socket.io')(server);
var path = require('path');
var game = require('./game.js');
server.listen(3000, function() {
console.log("listening on port 3000");
});
app.set('views', path.join(__dirname, 'templates'));
app.set('view... | var express = require('express');
var http = require('http');
var socketIO = require('socket.io');
var path = require('path');
var game = require('./game.js');
var app = express();
var server = http.Server(app);
var io = socketIO(server);
app.set('views', path.join(__dirname, 'templates'));
app.set('view engine', 'ja... | Rename imports to get access to express | Rename imports to get access to express
| JavaScript | mit | vakila/net-set,vakila/net-set |
cc41abb3c8ea389bdf526c3fcafbc83b5b2a1785 | cli.js | cli.js | #!/usr/bin/env node
'use strict';
var meow = require('meow');
var w3counter = require('./');
var cli = meow({
help: [
'Usage',
' $ w3counter <type>',
'',
'Example',
' $ w3counter browser',
' $ w3counter country',
' $ w3counter os',
' $ w3counter res'
].join('\n')
});
if (!cli.input.length) {
... | #!/usr/bin/env node
'use strict';
var meow = require('meow');
var w3counter = require('./');
var cli = meow({
help: [
'Usage',
' $ w3counter <type>',
'',
'Example',
' $ w3counter browser',
' $ w3counter country',
' $ w3counter os',
' $ w3counter res'
].join('\n')
});
if (!cli.input.length) {
... | Add percentage to CLI output | Add percentage to CLI output
| JavaScript | mit | kevva/w3counter |
b5351acc81211a1f57362ed02283e8215a7feca3 | src/components/posts_show.js | src/components/posts_show.js | import React from 'react';
import connect from 'react-redux';
import { fetchPost } from '../actions';
class PostsShow extends React.Component {
componentDidMount() {
const { id } = this.props.match.params;
this.props.fetchPost(id);
}
render() {
return (
<div>
Posts Show
</div>
... | import React from 'react';
import connect from 'react-redux';
import { fetchPost } from '../actions';
class PostsShow extends React.Component {
componentDidMount() {
const { id } = this.props.match.params;
this.props.fetchPost(id);
}
render() {
const { post } = this.props;
return (
<div>
... | Add basic markup of single post | Add basic markup of single post
| JavaScript | mit | monsteronfire/redux-learning-blog,monsteronfire/redux-learning-blog |
6d4640854d6842b3c283cea18efd4a5f008d5121 | packages/core/module.js | packages/core/module.js | /**
* @copyright 2016-2019, Miles Johnson
* @license https://opensource.org/licenses/MIT
*/
// Our index re-exports TypeScript types, which Babel is unable to detect and omit.
// Because of this, Webpack and other bundlers attempt to import values that do not exist.
// To mitigate this issue, we need this mod... | /**
* @copyright 2016-2019, Miles Johnson
* @license https://opensource.org/licenses/MIT
*/
// Our index re-exports TypeScript types, which Babel is unable to detect and omit.
// Because of this, Webpack and other bundlers attempt to import values that do not exist.
// To mitigate this issue, we need this mod... | Add Element and Parser to esm index. | Add Element and Parser to esm index.
| JavaScript | mit | milesj/interweave,milesj/interweave,milesj/interweave |
e3726db6f132c4c170c892da74a542f9967bc1ff | server/migrations/20180201131052-create-shares.js | server/migrations/20180201131052-create-shares.js | 'use strict'
var Sequelize = require('sequelize')
var tableName = 'Shares'
var schema = {
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true
},
sharer: {
type: Sequelize.INTEGER,
allowNull: false
},
sharee: {
type: Sequelize.INTEGER,
allowNull: false
}
}
mod... | 'use strict'
var Sequelize = require('sequelize')
var tableName = 'Shares'
var schema = {
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true
},
sharer: {
type: Sequelize.INTEGER,
allowNull: false
},
sharee: {
type: Sequelize.INTEGER,
allowNull: false
}
}
mod... | Enable shares migration for all databases | Enable shares migration for all databases
| JavaScript | agpl-3.0 | BspbOrg/smartbirds-server,BspbOrg/smartbirds-server,BspbOrg/smartbirds-server |
0cb7904353a5b900e026d22df28a0357acad58b0 | server/services/signup/hooks/getSignupAndEvent.js | server/services/signup/hooks/getSignupAndEvent.js | const config = require('../../../../config/ilmomasiina.config'); // eslint-disable-line
const md5 = require('md5');
module.exports = () => (hook) => {
const models = hook.app.get('models');
const id = hook.id;
const editToken = hook.params.query.editToken;
if (editToken !== md5(`${`${hook.id}`}${config.editTo... | const _ = require('lodash');
const config = require('../../../../config/ilmomasiina.config'); // eslint-disable-line
const md5 = require('md5');
module.exports = () => (hook) => {
const models = hook.app.get('models');
const id = hook.id;
const editToken = hook.params.query.editToken;
const fields = [];
cons... | Add necessary data to server response and improve error handling | Add necessary data to server response and improve error handling
| JavaScript | mit | athenekilta/ilmomasiina,athenekilta/ilmomasiina |
d0768e1473108f14abeb9d2d29fdbceae87caf94 | playground/parseMson.js | playground/parseMson.js | import protagonist from 'protagonist';
export default function parseMson(mson, cb) {
protagonist.parse(mson.trim(), (err, parseResult) => {
let dataStructureElements;
if (err) {
return cb(err);
}
dataStructureElements = parseResult.content[0].content;
dataStructureElements = dataStructure... | import protagonist from 'protagonist';
export default function parseMson(mson, cb) {
protagonist.parse(mson.trim(), (err, parseResult) => {
let dataStructureElements;
if (err) {
return cb(err);
}
dataStructureElements = parseResult.content[0].content[0].content;
dataStructureElements = ... | Send a list of all data structure elements. | Send a list of all data structure elements.
| JavaScript | mit | apiaryio/attributes-kit,apiaryio/attributes-kit,apiaryio/attributes-kit |
58d6977d32d96b19bbf76d51f5612313b29fdc4a | src/plugins/plugin-shim.js | src/plugins/plugin-shim.js | /**
* Add shim config for configuring the dependencies and exports for
* older, traditional "browser globals" scripts that do not use define()
* to declare the dependencies and set a module value.
*/
(function(seajs, global) {
// seajs.config({
// shim: {
// "jquery": {
// src: "lib/jquery.js",
// ... | /**
* Add shim config for configuring the dependencies and exports for
* older, traditional "browser globals" scripts that do not use define()
* to declare the dependencies and set a module value.
*/
(function(seajs, global) {
// seajs.config({
// shim: {
// "jquery": {
// src: "lib/jquery.js",
// ... | Fix a bug in Node.js | Fix a bug in Node.js
| JavaScript | mit | LzhElite/seajs,Lyfme/seajs,seajs/seajs,miusuncle/seajs,imcys/seajs,tonny-zhang/seajs,miusuncle/seajs,lianggaolin/seajs,eleanors/SeaJS,evilemon/seajs,wenber/seajs,eleanors/SeaJS,treejames/seajs,coolyhx/seajs,MrZhengliang/seajs,JeffLi1993/seajs,uestcNaldo/seajs,Gatsbyy/seajs,liupeng110112/seajs,Lyfme/seajs,kuier/seajs,Mr... |
c8aefb887e233ad064db33ba87fe6b83a7b67338 | test/grunt-accessibility_test.js | test/grunt-accessibility_test.js | 'use strict';
var grunt = require('grunt');
exports.accessibilityTests = {
matchReports: function(test) {
var actual;
var expected;
test.expect(2);
actual = grunt.file.read('reports/txt/test.txt');
expected = grunt.file.read('test/expected/txt/test.txt');
test.equal(actual, expected, 'Sho... | 'use strict';
var grunt = require('grunt');
function readFile(file) {
var contents = grunt.file.read(file);
if (process.platform === 'win32') {
contents = contents.replace(/\r\n/g, '\n');
}
return contents;
}
exports.accessibilityTests = {
matchReports: function(test) {
var actual;
var expec... | Fix tests on Windows with autocrlf on. | Fix tests on Windows with autocrlf on.
| JavaScript | mit | yargalot/grunt-accessibility,yargalot/grunt-accessibility |
8341dad7f0ca21d296253c8668f99d9c27b9f175 | app/models/virtualMachines.js | app/models/virtualMachines.js | /*global Backbone*/
var URL = require('./URL');
var VirtualMachine = require('./virtualMachine');
//define a collection of virtual machines
module.exports = Backbone.Collection.extend({
model: VirtualMachine,
url: URL.virtualMachine
}); | /*global Backbone*/
//Dependencies.
var URL = require('./URL');
var VirtualMachine = require('./virtualMachine');
//define a collection of virtual machines
module.exports = Backbone.Collection.extend({
//A collection only need a model property in order to _Type_ each element of the collection.
model: VirtualMachine,... | Add the comments on the Virtual machine collection. | Add the comments on the Virtual machine collection.
| JavaScript | mit | KleeGroup/front-end-spa,pierr/front-end-spa,pierr/front-end-spa,KleeGroup/front-end-spa |
63743241a188b427c061bea2dc4572a208567daa | troposphere/static/js/components/modals/instance/launch/components/AdvancedOptionsFooter.react.js | troposphere/static/js/components/modals/instance/launch/components/AdvancedOptionsFooter.react.js | import React from 'react';
export default React.createClass({
render: function() {
let saveOptionsDisabled = this.props.saveOptionsDisabled ? "disabled" : "";
return (
<div className="modal-footer">
<button type="button"
disabled={this.props.saveOptio... | import React from 'react';
import Button from 'components/common/ui/Button.react';
export default React.createClass({
render: function() {
let saveOptionsDisabled = this.props.saveOptionsDisabled ? "disabled" : "";
return (
<div className="modal-footer">
<Button
... | Refactor to use new button and add tooltip message | Refactor to use new button and add tooltip message
| JavaScript | apache-2.0 | CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend |
4d11031607c718fb0ede81562c36b0e6cf50af13 | src/reducers/aboutReducer.js | src/reducers/aboutReducer.js | import * as actions from '../constants/actionTypes';
export default function(state = {}, action) {
switch(action.type) {
case actions.ABOUT_FETCH:
return Object.assign(...state, action.payload.data);
default:
return state;
}
} | import * as actions from '../constants/actionTypes';
import initialState from './initialState';
export default function(state = initialState.about, action) {
switch(action.type) {
case actions.ABOUT_FETCH:
return Object.assign(...state, action.payload.data);
default:
return state;
}
} | Update about reducer to use initial state | Update about reducer to use initial state
| JavaScript | mit | veryaustin/veryaustin-2017-frontend,veryaustin/veryaustin-2017-frontend |
679ce7c3942f7b6d150653ba3a8e9cfda3af1b99 | extensions/tools/targets/myCreeps.js | extensions/tools/targets/myCreeps.js | 'use strict';
var all = false;
var cache = {};
function getCache(room) {
if (all === false) {
all = [];
for (var i in Game.creeps) {
if (!Game.creeps.spawning) {
if (cache[Game.creeps[i].room] === undefined) {
cache[Game.creeps[i].room] = [Game.creep... | 'use strict';
var all = false;
var cache = {};
function getCache(room) {
if (all === false) {
all = [];
for (var i in Game.creeps) {
if (!Game.creeps.spawning) {
if (cache[Game.creeps[i].room.name] === undefined) {
cache[Game.creeps[i].room.name] = [... | Use room name as string, instead as object for key value | Use room name as string, instead as object for key value
| JavaScript | mit | avdg/screeps |
7cf0a253819661c84e593d4a8dade96d1f4f253c | ghost/admin/controllers/forgotten.js | ghost/admin/controllers/forgotten.js | /* jshint unused: false */
import ajax from 'ghost/utils/ajax';
import ValidationEngine from 'ghost/mixins/validation-engine';
var ForgottenController = Ember.Controller.extend(ValidationEngine, {
email: '',
submitting: false,
// ValidationEngine settings
validationType: 'forgotten',
a... | /* jshint unused: false */
import ajax from 'ghost/utils/ajax';
import ValidationEngine from 'ghost/mixins/validation-engine';
var ForgottenController = Ember.Controller.extend(ValidationEngine, {
email: '',
submitting: false,
// ValidationEngine settings
validationType: 'forgotten',
a... | Stop validation error notification stack | Stop validation error notification stack
closes #3383
- Calls closePassive() if a new validation error is thrown to display
only the latest validation error
| JavaScript | mit | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost |
4d491cc111a7084cae7069b26f597e7993acafa4 | web/app/themes/theme/assets/ng/events/directives/preview.directive.js | web/app/themes/theme/assets/ng/events/directives/preview.directive.js | angular
.module('events.preview.directive', ['ui.router'])
.directive('eventPreview', function () {
return {
restrict: 'E',
replace: true,
template: '<div class="event-preview__item">'+
'<div class="event-preview__image-overlay event-preview__image-overlay--gradient"></div>' ... | angular
.module('events.preview.directive', ['ui.router'])
.directive('eventPreview', function () {
return {
restrict: 'E',
replace: true,
template: '<div class="event-preview__item">'+
'<div class="event-preview__image-overlay event-preview__image-overlay--gradient"></div>' ... | Fix the preview image size | Fix the preview image size
| JavaScript | mit | rslnk/reimagine-belonging,rslnk/reimagine-belonging,rslnk/reimagine-belonging |
630f21ebededd3ab940137187925c47af789f2c6 | realtime/index.js | realtime/index.js | const io = require('socket.io'),
winston = require('winston');
winston.remove(winston.transports.Console);
winston.add(winston.transports.Console, {'timestamp': true});
const PORT = 3031;
winston.info('Rupture real-time service starting');
winston.info('Listening on port ' + PORT);
var socket = io.listen(PORT... | const io = require('socket.io'),
winston = require('winston'),
http = require('http');
winston.remove(winston.transports.Console);
winston.add(winston.transports.Console, {'timestamp': true});
const PORT = 3031;
winston.info('Rupture real-time service starting');
winston.info('Listening on port ' + PORT)... | Add get-work request from realtime to backend | Add get-work request from realtime to backend
| JavaScript | mit | esarafianou/rupture,dimriou/rupture,dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimriou/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,dion... |
7b9419174ef72b0ff19dd60657272d894d5fd165 | games/common/js/submit_score.js | games/common/js/submit_score.js | function submit_score(score) {
auth_data = get_auth_data()
submit_data = auth_data + "&" + score
call_api("set_score", submit_data)
}
function get_auth_data() {
hash = window.location.hash
return hash.substring(1, hash.indexOf("&"))
}
function call_api(name, data) {
request = new XMLHttpReques... | function submit_score(score) {
auth_data = get_auth_data()
submit_data = auth_data + "&" + score
call_api("set_score", submit_data)
}
function get_auth_data() {
hash = window.location.hash
auth_data = hash.substring(1)
additionalDataStart = auth_data.indexOf("&")
if (additionalDataStart > 0... | Fix get_auth_data when no additional data on hash | Fix get_auth_data when no additional data on hash
| JavaScript | apache-2.0 | alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games |
e743fab34e49352d902d8b027252bf013e039b40 | snippet.js | snippet.js | (function (instanceName) {
var i,
s,
z,
w = window,
d = document,
q = 'script',
f = ['config', 'track', 'identify', 'push', 'call'],
c = function () {
var self = this;
self._e = [];
for (i = 0; i < f.length; i++) {
... | (function (instanceName) {
var i,
s,
z,
w = window,
d = document,
q = 'script',
f = ['config', 'track', 'identify', 'visit', 'push', 'call'],
c = function () {
var self = this;
self._e = [];
for (i = 0; i < f.length; i++) {
... | Add 'visit' to tracker stub | Add 'visit' to tracker stub
| JavaScript | mit | Woopra/js-client-tracker,Woopra/js-client-tracker |
1194543426bba9f5620423f53920a0eaf96e1601 | client/mobilizations/paths.js | client/mobilizations/paths.js | import DefaultConfigServer from '~server/config'
export const mobilizations = () => '/'
export const mobilization = (mobilization, domain = DefaultConfigServer.appDomain) => {
if (domain && domain.indexOf('staging') !== -1) {
return `http://${mobilization.slug}.${domain}`
}
return mobilization.custom_domain... | import DefaultConfigServer from '~server/config'
export const mobilizations = () => '/mobilizations'
export const mobilization = (mobilization, domain = DefaultConfigServer.appDomain) => {
if (domain && domain.indexOf('staging') !== -1) {
return `http://${mobilization.slug}.${domain}`
}
return mobilization.... | Change mobilization root path to /mobilizations | Change mobilization root path to /mobilizations
| JavaScript | agpl-3.0 | nossas/bonde-client,nossas/bonde-client,nossas/bonde-client |
d9d6e8e84f038a08d4bdbf33256f7cf8f9d23cd0 | src/app.js | src/app.js | (function (window) {
'use strict';
var hearingTest = HearingTest;
var hearing = hearingTest.init();
var app = new Vue({
el: '#hearing-test-app',
data: {
frequency: 1000
},
methods: {
changeFrequency: function() {
hearing.sound.frequency.value = this.frequency;
}
}
});
}(window));
| (function (window) {
'use strict';
var hearingTest = HearingTest;
var hearing = hearingTest.init();
var app = new Vue({
el: '#hearing-test-app',
data: {
isPlaySound: false,
frequency: 1000
},
methods: {
changeFrequency: function() {
hearing.sound.frequency.value = this.frequency;
}
}
})... | Add a play sound flag | Add a play sound flag
| JavaScript | mit | kubosho/hearing-test-app |
aaa8f64c4ce06e67dc078cb417e085499fb4504d | scripts/views/quizz-view.js | scripts/views/quizz-view.js | var QuizzListView = Backbone.View.extend({
el: '#app',
templateHandlebars: Handlebars.compile(
$('#play-template-handlebars').html()
),
remove: function() {
this.$el.empty();
return this;
},
initialize: function() {
console.log('Initialize in quizz view');
this.myQuizzCollection = ne... | var QuizzListView = Backbone.View.extend({
el: '#app',
templateHandlebars: Handlebars.compile(
$('#play-template-handlebars').html()
),
remove: function() {
this.$el.empty();
return this;
},
shuffleArray: function (o){
for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x =... | Add random on quizz list | Add random on quizz list
| JavaScript | mit | KillianKemps/MovieQuizz,KillianKemps/MovieQuizz |
6a8cd955389226e749afd36b85641cc08ac54023 | feelings/client/lib/router.js | feelings/client/lib/router.js | Router.route('/', function () {
this.layout("layout")
this.render('feelings');
});
| Router.route('/', function () {
this.layout("layout")
this.render('feelings');
}, {name: 'feelings'});
Router.route('/results', function () {
this.layout("layout")
this.render('results');
}, {name: 'results'});
| Add results route; name routes | Add results route; name routes
| JavaScript | agpl-3.0 | GeriLife/feelings,GeriLife/feelings |
e9b59975ca5b1f3584a3fa0f828e015205be28be | app/controllers.js | app/controllers.js | 'use strict';
/* Controllers */
var recordControllers = angular.module('myApp.recordControllers', []);
recordControllers.controller('recordCtrl', ['$scope', '$http', '_',
function($scope, $http, _) {
// Initialize
$scope.distance = '25m';
$scope.style = '自由形';
$scope.submit = function() {
let... | 'use strict';
/* Controllers */
var recordControllers = angular.module('myApp.recordControllers', []);
recordControllers.controller('recordCtrl', ['$scope', '$http', '_',
function($scope, $http, _) {
// Initialize
$scope.distance = '25m';
$scope.style = '自由形';
$scope.submit = function() {
let... | Use relative path for db REST API access | Use relative path for db REST API access
| JavaScript | mit | chopstickexe/swimtrack,chopstickexe/swimtrack |
36e6a4eabfe79f7e0df25621e4380ad49697aba7 | external-ab-neuter/main.js | external-ab-neuter/main.js | 'use strict';
const release_type = process.config.target_defaults.default_configuration;
const ab_neuter = require(`./build/${release_type}/ab_neuter`);
module.exports = neuter;
function neuter(obj) {
ab_neuter.neuter(ArrayBuffer.isView(obj) ? obj.buffer : obj);
}
| 'use strict';
const ab_neuter = require('./build/Release/ab_neuter');
module.exports = neuter;
function neuter(obj) {
ab_neuter.neuter(ArrayBuffer.isView(obj) ? obj.buffer : obj);
}
| Support Release only to simplify webpack | Support Release only to simplify webpack
| JavaScript | mit | silklabs/silk,silklabs/silk,silklabs/silk,silklabs/silk,silklabs/silk,silklabs/silk |
658ba7209b07bb763e6e93592bfefdde9c9ce78a | server/src/app.js | server/src/app.js | const express = require('express')
const bodyParser = require('body-parser')
const cors = require('cors')
const morgan = require('morgan')
const app = express()
// Seting up middleware
app.use(morgan('combined'))
app.use(bodyParser.json())
app.use(cors())
app.get('/', (req, res) => {
res.send('Hello world')
})
app.... | const express = require('express')
const bodyParser = require('body-parser')
const cors = require('cors')
const morgan = require('morgan')
const app = express()
// Seting up middleware
app.use(morgan('combined'))
app.use(bodyParser.json())
app.use(cors())
app.get('/', (req, res) => {
res.send('Hello world')
})
app.... | Test post register response with Postman | Test post register response with Postman
| JavaScript | mit | rahman541/tab-tracker,rahman541/tab-tracker |
76c112da2263ea398e5da129e1f9663f727d031e | ember-cli-build.js | ember-cli-build.js | 'use strict';
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
const Project = require('ember-cli/lib/models/project');
module.exports = function(defaults) {
let project = Project.closestSync(process.cwd());
project.pkg['ember-addon'].paths = ['sandbox'];
defaults.project = project;
var ap... | 'use strict';
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
const Project = require('ember-cli/lib/models/project');
module.exports = function(defaults) {
let project = Project.closestSync(process.cwd());
project.pkg['ember-addon'].paths = ['sandbox'];
defaults.project = project;
var ap... | Stop including jquery and shims in the output | Stop including jquery and shims in the output
| JavaScript | mit | ember-learn/ember-cli-addon-docs,ember-learn/ember-cli-addon-docs,ember-learn/ember-cli-addon-docs |
14d9151ba1d0376b1ba9a86761c0aaf9e02d37f6 | ember-cli-build.js | ember-cli-build.js | 'use strict';
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
let app = new EmberAddon(defaults, {
// Import _all_ Froala Editor files
// for the "dummy" app
'ember-froala-editor': {
plugins : [
'align','char_counter','colors','emot... | 'use strict';
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
let app = new EmberAddon(defaults, {
'ember-froala-editor': {
plugins : [
'align','char_counter','colors','emoticons','entities','font_family','font_size',
'line_breaker'... | Remove comment about importing all plugins | Remove comment about importing all plugins
No longer the case
| JavaScript | mit | Panman8201/ember-froala-editor,Panman8201/ember-froala-editor,froala/ember-froala-editor,froala/ember-froala-editor |
0f5d2e7a73abf567750489748058a75cb6a4989b | ember-cli-build.js | ember-cli-build.js | /* eslint-env node */
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
// Add options here
});
/*
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This... | /* eslint-env node */
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
sourcemaps: {
enabled: false,
extensions: ['js'],
}
});
/*
This build file specifies the options for the dummy test app of th... | Disable source map in dev | Disable source map in dev
| JavaScript | mit | masonwan/ember-render-validate,masonwan/ember-render-validate |
e91126a3233e719eedba767dbcc656750ac0f523 | app/src/upgrade.js | app/src/upgrade.js | var path = require('path');
var fs = require('fs-extra');
function upgradeNeeded(config, callback) {
var oldSyncDir = syncDirWrong(config);
var needsUpgrade = oldSyncDir;
callback(needsUpgrade);
//return oldSyncDir;
}
function syncDirWrong(config) {
for (var r in config.roots) {
var old... | var path = require('path');
var fs = require('fs-extra');
function upgradeNeeded(config, callback) {
var oldSyncDir = syncDirWrong(config);
var needsUpgrade = oldSyncDir;
callback(needsUpgrade);
//return oldSyncDir;
}
function syncDirWrong(config) {
for (var r in config.roots) {
var old... | Add help for upgrading to latest version. | Add help for upgrading to latest version.
| JavaScript | mit | dynamicdan/filesync,dynamicdan/sn-filesync,Echo3ToEcho7/filesync |
90ab18f216757cb67af21d2b28d1da3cf4e8b1b4 | source/components/SiteHeader.js | source/components/SiteHeader.js | import React from 'react'
import { Link } from 'react-router-dom'
import Facebook from '../components/Facebook'
import SearchBox from '../components/SearchBox'
const SiteHeader = ({ user }) => (
<header className="site-header">
<div className="logo icon-axis">
<Link to="/"><b>Axis</b>RPG</Link>
</div>
... | import React from 'react'
import { Link } from 'react-router-dom'
import Facebook from '../components/Facebook'
import SearchBox from '../components/SearchBox'
const SiteHeader = ({ user }) => (
<header className="site-header">
<Link className="logo icon-axis" to="/">
<span className="name"><b>Axis</b>RPG<... | Add Axis icon to the clickable area of logo | Add Axis icon to the clickable area of logo
| JavaScript | mit | TroyAlford/axis-wiki,TroyAlford/axis-wiki |
5a26dfebaf9bf2a9604df92f6dd029c43ab9bddc | troposphere/static/js/components/modals/instance_launch/ProjectOption.react.js | troposphere/static/js/components/modals/instance_launch/ProjectOption.react.js | /** @jsx React.DOM */
define(
[
'react',
'backbone'
],
function (React, Backbone) {
return React.createClass({
propTypes: {
project: React.PropTypes.instanceOf(Backbone.Model).isRequired
},
render: function () {
var projectName = this.props.project.get('name');
... | /** @jsx React.DOM */
define(
[
'react',
'backbone'
],
function (React, Backbone) {
return React.createClass({
propTypes: {
project: React.PropTypes.instanceOf(Backbone.Model).isRequired
},
render: function () {
var project = this.props.project;
return (
... | Remove alternate statement for Default project | Remove alternate statement for Default project
| JavaScript | apache-2.0 | CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend |
30a571553b09a4e221445f9f0292fd9da449c3ce | app/assets/javascripts/student_profile/provided_by_educator_dropdown.js | app/assets/javascripts/student_profile/provided_by_educator_dropdown.js | (function() {
window.shared || (window.shared = {});
var dom = window.shared.ReactHelpers.dom;
var ProvidedByEducatorDropdown = window.shared.ProvidedByEducatorDropdown = React.createClass({
displayName: 'ProvidedByEducatorDropdown',
propTypes: {
educatorsForServicesDropdown: React.PropTypes.array... | (function() {
window.shared || (window.shared = {});
var dom = window.shared.ReactHelpers.dom;
var ProvidedByEducatorDropdown = window.shared.ProvidedByEducatorDropdown = React.createClass({
displayName: 'ProvidedByEducatorDropdown',
propTypes: {
educatorsForServicesDropdown: React.PropTypes.array... | Add placeholder text and suggest Last Name, First Name | Add placeholder text and suggest Last Name, First Name
| JavaScript | mit | studentinsights/studentinsights,jhilde/studentinsights,jhilde/studentinsights,jhilde/studentinsights,jhilde/studentinsights,studentinsights/studentinsights,erose/studentinsights,erose/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,erose/studentinsights,erose/studentinsights |
8f220780ef56b5b3c010c3368e83a86452ef3042 | assets/js/index.js | assets/js/index.js | function ready(fn) {
if (document.readyState != 'loading'){
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
function previousElementSibling( elem ) {
do {
elem = elem.previousSibling;
} while ( elem && elem.nodeType !== 1 );
return elem;
}
function pullPullQuotes(){
var... | function previousElementSibling( elem ) {
do {
elem = elem.previousSibling;
} while ( elem && elem.nodeType !== 1 );
return elem;
}
function pullPullQuotes(){
var pullquotes = document.getElementsByClassName('pullquote');
for (var i = 0; i < pullquotes.length; i++) {
var el = pullquotes[i];
for (... | Simplify js ready function (and make it work…) | Simplify js ready function (and make it work…)
| JavaScript | mit | curiositry/mnml-ghost-theme,omphalosskeptic/mnml-ghost-theme,omphalosskeptic/mnml-ghost-theme |
623da4bb405c483555eb97857be9b675437230bb | src/Store.js | src/Store.js | import Reflux from 'reflux';
import Actions from './Actions';
import Handlers from './Handlers';
export default class Store extends Reflux.Store {
constructor() {
super();
this.state = {
retrievingLocation: false,
fetchingData: false,
radius: process.env.REACT_APP_DEFAULT_RADIUS,
addr... | import Reflux from 'reflux';
import Actions from './Actions';
import Handlers from './Handlers';
export default class Store extends Reflux.Store {
constructor() {
super();
this.state = {
retrievingLocation: false,
fetchingData: false,
radius: process.env.REACT_APP_DEFAULT_RADIUS,
addr... | Remove useless var in store | Remove useless var in store
| JavaScript | mit | mdcarter/lunchfinder.io,mdcarter/lunchfinder.io |
73e797b3b9765455d66cdc7ee9edb67d2e321689 | BookShelf.Mobile/views/BookAdd.js | BookShelf.Mobile/views/BookAdd.js | BookShelf.BookAdd = function(params) {
return $.extend(BookShelf.BookForm(params), {
resetBook: function() {
this.book.title("");
this.book.author("");
},
save: function() {
BookShelf.db.books.add(this.getBook());
BookShelf.app.back();
... | BookShelf.BookAdd = function(params) {
return $.extend(BookShelf.BookForm(params), {
resetBook: function() {
this.book.title("");
this.book.author("");
this.book.status(params.status);
this.book.startDate(new Date());
this.book.finishDate(new Da... | Reset book status and start/finish dates on add form | Views: Reset book status and start/finish dates on add form
| JavaScript | mit | tabalinas/BookShelf,tabalinas/BookShelf |
b114afe32fdcbedc20af613e940bf8196b069b47 | src/index.js | src/index.js | import React, { Component } from 'react';
import ReactDom from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
// const API_KEY = 'PLACE_YOUR_API_KEY_HERE';
class App extends Component {
constructor (props) {
s... | import React, { Component } from 'react';
import ReactDom from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
import VideoDetail from './components/video_detail';
// const API_KEY = 'PLACE_YOUR_API_KEY_HERE';
cla... | Add the video detail component. | Add the video detail component.
| JavaScript | mit | JosephLeon/redux-simple-starter-tutorial,JosephLeon/redux-simple-starter-tutorial |
911f44c4a6ffc730060687e589cbf63d0a7be4fc | src/index.js | src/index.js | import { setItemsActionCreator as setItems } from './setItems'
import { rangeToActionCreator as rangeTo } from './rangeTo'
import { removeActionCreator as remove } from './remove'
import { removeAllActionCreator as removeAll } from './removeAll'
import { replaceActionCreator as replace } from './replace'
import { toggl... | import { setItemsActionCreator as setItems } from './setItems'
import { rangeToActionCreator as rangeTo } from './rangeTo'
import { removeActionCreator as remove } from './remove'
import { removeAllActionCreator as removeAll } from './removeAll'
import { replaceActionCreator as replace } from './replace'
import { toggl... | Remove code of old API | Remove code of old API
- bound `actions` and `selectors` will be provided by `bindToSelection`
| JavaScript | mit | actano/yourchoice-redux |
6254538340e9e0390f03fa810f5c06404e36e48f | src/index.js | src/index.js | // We load the Safari fix before document-register-element because DRE
// overrides attachShadow() and calls back the one it finds on HTMLElement.
import './fix/safari';
import 'document-register-element';
import '@webcomponents/shadydom';
import '@webcomponents/shadycss';
| // We load the Safari fix before document-register-element because DRE
// overrides attachShadow() and calls back the one it finds on HTMLElement.
import './fix/safari';
import 'document-register-element/build/document-register-element';
import '@webcomponents/shadydom';
import '@webcomponents/shadycss';
| Fix to import the browser version of document-register-element. | fix: Fix to import the browser version of document-register-element.
#26
| JavaScript | mit | skatejs/web-components |
74a4b20404fc506fef118a6553e171c0967f5f40 | src/preload.js | src/preload.js | 'use strict';
console.log('Loading preload script');
const { ipcRenderer } = require('electron');
const OldNotification = Notification;
Notification = function(title, options) {
const notificationSettings = ipcRenderer.sendSync('get-notification-settings', {
title,
body: options.body,
isDirect: !op... | 'use strict';
console.log('Loading preload script');
const { ipcRenderer } = require('electron');
const OldNotification = Notification;
Notification = function(title, options) {
const notificationSettings = ipcRenderer.sendSync('get-notification-settings', {
title,
body: options.body,
isDirect: !op... | Add empty close funciton to silence error | Add empty close funciton to silence error
| JavaScript | mit | Faithlife/FaithlifeMessages |
7510b80e8b5aa5c34b91825a29eb9443bf6387fa | src/components/VmDisks/utils.js | src/components/VmDisks/utils.js |
import { locale as appLocale } from '../../intl'
function localeCompare (a, b, locale = appLocale) {
return a.localeCompare(b, locale, { numeric: true })
}
/*
* Sort an Immutable List of Maps (set of disks) for display on the VmDisks list.
* Bootable drives sort first, then sorted number aware alphabetically.
*... |
import { locale as appLocale } from '../../intl'
function localeCompare (a, b, locale = appLocale) {
return a.localeCompare(b, locale, { numeric: true })
}
/*
* Sort an Immutable List of Maps (set of disks) for display on the VmDisks list.
* Bootable drives sort first, then sorted number aware alphabetically.
*... | Improve readability of ternary operator | Improve readability of ternary operator
| JavaScript | apache-2.0 | mareklibra/userportal,oVirt/ovirt-web-ui,mareklibra/userportal,oVirt/ovirt-web-ui,mareklibra/userportal,oVirt/ovirt-web-ui,mareklibra/userportal |
8bad7a944039d5b374bf963c97c3428c05eb7980 | jenkins-show-advanced.user.js | jenkins-show-advanced.user.js | /*
Copyright 2015 Ops For Developers
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 ... | /*
Copyright 2015 Ops For Developers
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 ... | Change the @match metadata to the */job/*/configure pattern to be as generic as possible | Change the @match metadata to the */job/*/configure pattern to be as generic as possible
| JavaScript | apache-2.0 | opsfordevelopers/jenkins-show-advanced |
23b1947d2b1aec2325178c8d426167c74e414e74 | jsbeautifierSettingsTweaks.js | jsbeautifierSettingsTweaks.js | /*! jsbeautifierSettingsTweaks.js v0.1.1 by ryanpcmcquen */
(function () {
'use strict';
window.addEventListener('load', function () {
// set any vars you want to change here
var jslintCheckbox = document.getElementById('jslint-happy');
var tabSize = document.getElementById('tabsize');
// set you... | /*! jsbeautifierSettingsTweaks.js v0.2.0 by ryanpcmcquen */
window.addEventListener('load', function () {
'use strict';
// Set any vars you want to change here:
var jslintCheckbox = document.getElementById('jslint-happy');
var tabSize = document.getElementById('tabsize');
var wrapLength = document.getElementB... | Add 80 character wrap length. | Add 80 character wrap length. | JavaScript | mpl-2.0 | ryanpcmcquen/jsbeautifierSettingsTweaks.js |
fa3bc8b524f281d8bae728aa556cba6bc45c0566 | src/webroot/js/quickSearch.js | src/webroot/js/quickSearch.js | //autocomplete for organism search
$("#search_organism").autocomplete({
position: {
my: "right top", at: "right bottom"
},
source: function (request, response) {
var $search = request.term;
$.ajax({
url: WebRoot.concat("/ajax/listing/Organisms"),
data: {term: ... | //autocomplete for organism search
$("#search_organism").autocomplete({
position: {
my: "right top", at: "right bottom"
},
source: function (request, response) {
var $search = request.term;
$.ajax({
url: WebRoot.concat("/ajax/listing/Organisms"),
data: {term: ... | Add onclick function for button. The function is called after submitting the search. It gets the value of the search field and get the data objects via ajax | Add onclick function for button. The function is called after submitting the search. It gets the value of the search field and get the data objects via ajax
| JavaScript | mit | molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec |
fded4d32e273e3d2183005c803bcecc68fa616e0 | spec/main-spec.js | spec/main-spec.js | 'use strict'
describe('StreamPromise', function() {
const StreamPromise = require('../')
const FS = require('fs')
it('works', function() {
waitsForPromise(function() {
return StreamPromise.create(FS.createReadStream(`${__dirname}/fixtures/something.txt`))
.then(function(contents) {
exp... | 'use strict'
describe('StreamPromise', function() {
const StreamPromise = require('../')
const FS = require('fs')
it('works', function() {
waitsForPromise(function() {
return StreamPromise.create(FS.createReadStream(`${__dirname}/fixtures/something.txt`))
.then(function(contents) {
exp... | Add specs for rejecting promise on stream error | :new: Add specs for rejecting promise on stream error
| JavaScript | mit | steelbrain/stream-promise |
13ddf46c44933bcc21a37fa626e723729d7768c2 | src/engine/scene/text/enable.js | src/engine/scene/text/enable.js | // Dependencies
import 'engine/scene/sprites/enable';
// Loader middleware
import bitmap_font_parser from './bitmap_font_parser';
import { loader_use_procs } from 'engine/registry';
loader_use_procs.push(bitmap_font_parser);
// Renderer
// Class
export { default as BitmapText } from './BitmapText';
export { default ... | // Dependencies
import 'engine/scene/sprites/enable';
// Loader middleware
import bitmap_font_parser from './bitmap_font_parser';
import { loader_use_procs } from 'engine/registry';
loader_use_procs.push(bitmap_font_parser);
// Register to global node class map
import { node_class_map } from 'engine/registry';
impor... | Add Text and BitmapText to node class map | Add Text and BitmapText to node class map
| JavaScript | mit | pixelpicosean/voltar,pixelpicosean/voltar |
97aeed066aee1b166e7c635755f275bf58eb530c | ngrinder-controller/src/main/resources/ngrinder_home_template/process_and_thread_policy.js | ngrinder-controller/src/main/resources/ngrinder_home_template/process_and_thread_policy.js | function getProcessCount(total) {
if (total < 2) {
return 1;
}
if (total > 80) {
return parseInt(total / 30);
}
return 2;
}
function getThreadCount(total) {
if (total < 2) {
return 1;
}
if (total > 80) {
return parseInt(total / (parseInt(total / 30)));
}
return parseInt(total / 2 ... | function getProcessCount(total) {
if (total < 2) {
return 1;
}
var processCount = 2;
if (total > 80) {
processCount = parseInt(total / 40) + 1;
}
if (processCount > 20) {
processCount = 20;
}
return processCount;
}
function getThreadCount(total) {
var processCount = getProcessCount(total);
return ... | Modify process and thread calc to support vuser more than 600. | [NGRINDER-495] Modify process and thread calc to support vuser more than
600. | JavaScript | apache-2.0 | bwahn/ngrinder,nanpa83/ngrinder,bwahn/ngrinder,SRCB-CloudPart/ngrinder,chengaomin/ngrinder,ropik/ngrinder,songeunwoo/ngrinder,chengaomin/ngrinder,SRCB-CloudPart/ngrinder,ropik/ngrinder,GwonGisoo/ngrinder,songeunwoo/ngrinder,bwahn/ngrinder,SRCB-CloudPart/ngrinder,ropik/ngrinder,SRCB-CloudPart/ngrinder,songeunwoo/ngrinde... |
ad8527e1d63d99f14f956b69a3a52e018b4b3058 | src/js/single/committee/edit.js | src/js/single/committee/edit.js | $(function () {
'use strict';
var $coordinator_select = $('#coordinator_id');
var $group_select = $('#group_id');
$coordinator_select.select2();
$group_select.select2();
function set_group_users() {
var group_id = $group_select.val();
$.get('/api/group/users/' + group_id, {},... | $(function () {
'use strict';
var $coordinator_select = $('#coordinator_id');
var $group_select = $('#group_id');
function set_group_users() {
var group_id = $group_select.val();
$.get('/api/group/users/' + group_id, {}, function (data) {
$coordinator_select.empty();
... | Remove select2 again, because that sucked | Remove select2 again, because that sucked
| JavaScript | mit | viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct |
3124a0955dbedcd57b78858a5c7af9f197bb3d68 | src/orm-tests.js | src/orm-tests.js | /* eslint-disable no-unused-expressions */
import { expect } from 'chai';
export default function orm (people, _ids, errors) {
describe('Feathers ORM Specific Tests', () => {
it('wraps an ORM error in a feathers error', () => {
return people.create({}).catch(error =>
expect(error instanceof errors... | /* eslint-disable no-unused-expressions */
import { expect } from 'chai';
export default function orm (people, errors, idProp = 'id') {
describe('Feathers ORM Common Tests', () => {
it('wraps an ORM error in a feathers error', () => {
return people.create({}).catch(error => {
expect(error instance... | Update ORM tests to ensure plain objects are returned | Update ORM tests to ensure plain objects are returned
| JavaScript | mit | feathersjs/feathers-service-tests |
d9d8003d5a91f8849b6d63e78c95a384f4643ef6 | bin/execbin.js | bin/execbin.js | #!/usr/bin/env node
var Janeway = require('../lib/init.js'),
libpath = require('path'),
main_file;
// Get the wanted file to require
main_file = libpath.resolve(process.cwd(), process.argv[2]);
// Remove janeway from the arguments array
process.argv.splice(1, 1);
// Start initializing janeway
Janeway.start(f... | #!/usr/bin/env node
var Janeway = require('../lib/init.js'),
libpath = require('path'),
main_file;
// Get the wanted file to require
if (process.argv[2]) {
main_file = libpath.resolve(process.cwd(), process.argv[2]);
}
// Remove janeway from the arguments array
process.argv.splice(1, 1);
// Start initializ... | Allow lauching without specifying main_file | Allow lauching without specifying main_file
| JavaScript | mit | skerit/janeway |
016209fd667a21ac2c9800c29efd3e2be4bae872 | Gulpfile.js | Gulpfile.js | var gulp = require('gulp');
gulp.task('test', function () {
require('./');
var mocha = require('gulp-mocha');
return gulp.src('test/**/*.es6', {
read: false
})
.pipe(mocha({
bail: true
}));
});
gulp.task('watch', ['default'], function () {
gulp.watch([
'index.js',
'... | var gulp = require('gulp');
gulp.task('test', function () {
require('babel/register')({
// All the subsequent files required by node with the extension of `.es6`
// will be transformed to ES5
extensions: ['.es6']
});
var mocha = require('gulp-mocha');
return gulp.src('test/**/*.es6', {
... | Enable Babel properly while testing | Enable Babel properly while testing
| JavaScript | mit | OEvgeny/postcss-assets,borodean/postcss-assets,justinanastos/postcss-assets,assetsjs/postcss-assets,glebmachine/postcss-assets |
a3c2fdadd697e0bcdece46a8d6ecf1affa5c572d | lib/core/src/server/config.js | lib/core/src/server/config.js | import path from 'path';
import loadPresets from './presets';
import serverRequire from './serverRequire';
function customPreset({ configDir }) {
return serverRequire(path.resolve(configDir, 'presets')) || [];
}
function getWebpackConfig(options, presets) {
const babelOptions = presets.extendBabel({}, options);
... | import path from 'path';
import { logger } from '@storybook/node-logger';
import loadPresets from './presets';
import serverRequire from './serverRequire';
function customPreset({ configDir }) {
const presets = serverRequire(path.resolve(configDir, 'presets'));
if (presets) {
logger.warn(
'"Custom prese... | Add warning about custom presets | Add warning about custom presets
| JavaScript | mit | storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook |
e939cdd71013934a26e477288d22e0240bd8bb7f | src/server/entrypoint-render.js | src/server/entrypoint-render.js | import prerender from './prerender'
// This is a wrapper to handle a single isomorphic render inside a child process
function startRender(context) {
prerender(context).then((result) => {
process.send(result, null, {}, () => {
process.exit(0)
})
}).catch(() => {
process.exit(1)
})
}
process.on... | import prerender from './prerender'
import { updateStrings as updateTimeAgoStrings } from './../lib/time_ago_in_words'
updateTimeAgoStrings({ about: '' })
// This is a wrapper to handle a single isomorphic render inside a child process
function startRender(context) {
prerender(context).then((result) => {
proce... | Add time ago in words to the server render | Add time ago in words to the server render
| JavaScript | mit | ello/webapp,ello/webapp,ello/webapp |
4ab6a6db8542d018ca1068808f83daa5f09bc3dc | src/client/es6/routers.js | src/client/es6/routers.js | export default function CartRouters($stateProvider, $urlRouterProvider) {
}
| function CartRouters($stateProvider, $urlRouterProvider) {
}
CartRouters.$inject = ['$stateProvider', '$urlRouterProvider'];
export default CartRouters;
| Use injector to do angular config function. | Use injector to do angular config function.
| JavaScript | mit | agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart |
4593b652c4791c7b30cacd9b60fe90fad0d1aa98 | lib/renderers/JsonRenderer.js | lib/renderers/JsonRenderer.js | function JsonRenderer() {
this._nrLogs = 0;
}
JsonRenderer.prototype.end = function (data) {
if (this._nrLogs) {
process.stderr.write(']\n');
}
if (data) {
process.stdout.write(this._stringify(data) + '\n');
}
};
JsonRenderer.prototype.error = function (err) {
err.id = err.cod... | function JsonRenderer() {
this._nrLogs = 0;
}
JsonRenderer.prototype.end = function (data) {
if (this._nrLogs) {
process.stderr.write(']\n');
}
if (data) {
process.stdout.write(this._stringify(data) + '\n');
}
};
JsonRenderer.prototype.error = function (err) {
var message = er... | Fix log of errors not rendering the error message/data in the JSON renderer. | Fix log of errors not rendering the error message/data in the JSON renderer.
| JavaScript | mit | mattpugh/bower,haolee1990/bower,Teino1978-Corp/bower,unilynx/bower,lukemelia/bower,angeliaz/bower,Jeremy017/bower,Teino1978-Corp/Teino1978-Corp-bower,jvkops/bower,pjump/bower,rajzshkr/bower,pwang2/bower,bower/bower,return02/bower,fernandomoraes/bower,wenyanw/bower,sanyueyu/bower,rlugojr/bower,supriyantomaftuh/bower,gri... |
d03a772f541090e8d9165314371cb222702d435d | test/queue/with_delay_test.js | test/queue/with_delay_test.js | 'use strict';
require('../helpers');
const assert = require('assert');
const Ironium = require('../..');
describe('Queue with delay', function() {
const captureQueue = Ironium.queue('capture');
// Capture processed jobs here.
const processed = [];
before(function() {
captureQueue.eachJob(function(job)... | 'use strict';
require('../helpers');
const assert = require('assert');
const Ironium = require('../..');
const ms = require('ms');
const TimeKeeper = require('timekeeper');
describe('Queue with delay', function() {
const captureQueue = Ironium.queue('capture');
// Capture processed jobs here.... | Update delayJob test to use TimeKeeper | Update delayJob test to use TimeKeeper
| JavaScript | mit | assaf/ironium |
bfc7ae42c589838f6ae04b3d2e944d585e8382bb | www/app/app.js | www/app/app.js | 'use strict';
/*
* Angular Seed - v0.1
* https://github.com/rachellcarbone/angular-seed/
* Copyright (c) 2015 Rachel L Carbone; Licensed MIT
*/
// Include modules, and run application.
angular.module('theApp', [
'ui.bootstrap',
'ui.bootstrap.showErrors',
'datatables',
'datatables.bootstrap',
... | 'use strict';
/*
* Angular Seed - v0.1
* https://github.com/rachellcarbone/angular-seed/
* Copyright (c) 2015 Rachel L Carbone; Licensed MIT
*/
// Include modules, and run application.
angular.module('theApp', [
'ui.bootstrap',
'ui.bootstrap.showErrors',
'datatables',
'datatables.bootstrap',
... | Include new libraries in the project. | Include new libraries in the project.
| JavaScript | mit | rachellcarbone/angular-seed,rachellcarbone/angular-seed,rachellcarbone/angular-seed |
012942d0f2d13ce7e3fe20b1fadecbf57248ce9f | src/space-case.js | src/space-case.js | const spaceCase = (a) => {
return a
.replace(/(_|-|\.)/g, ' ')
.replace(/([A-Z])/g, ' $1')
.replace(/\s+/g, ' ')
.replace(/^\s+/, '')
.replace(/\s$/, '');
};
export default spaceCase;
| const spaceCase = (a) => {
return a
.replace(/(_|-|\.)/g, ' ')
.replace(/([A-Z])/g, ' $1')
.replace(/\s+/g, ' ')
.replace(/(^\s|\s$)/g, '');
};
export default spaceCase;
| Refactor spaceCase to combine "ltrim/rtrim" into one regex | Refactor spaceCase to combine "ltrim/rtrim" into one regex
| JavaScript | mit | restrung/restrung-regex |
bf7e23827e2aa912b6431e906763ceaa871f7640 | commands/sa.js | commands/sa.js | 'use strict';
var exec = require('child_process').exec;
module.exports = function reboot(controller) {
controller.hears('technical assessment', ['direct_message','mention','direct_mention', 'message_received'], function(bot, message) {
bot.reply(message, 'May god have mercy on your souls...');
// console.lo... | 'use strict';
var exec = require('child_process').exec;
module.exports = function reboot(controller) {
controller.hears('technical assessment', ['direct_message','mention','direct_mention', 'message_received'], function(bot, message) {
bot.reply(message, 'no comment');
// console.log(message._client.channel... | Revert "Fixed the response to any mention of the technical (summary) assessment." | Revert "Fixed the response to any mention of the technical (summary) assessment."
This reverts commit 36ab954db67f20fbb0612d10d2017bb4df893878.
| JavaScript | mit | remotebeta/codybot |
86d34450e5e0268e24b86aadf23ca1182fd7f06e | modules/authorization/route.js | modules/authorization/route.js | var Series = require('hapi-next'),
Validator = require('modules/authorization/validator'),
Controller = require('modules/authorization/controller');
module.exports = {
login : {
method : 'POST',
path : '/login',
config : {
validate : Validator.validateReqLogin(),
handler : function(request,reply... | var Series = require('hapi-next'),
Validator = require('modules/authorization/validator'),
Controller = require('modules/authorization/controller');
module.exports = {
login : {
method : 'POST',
path : '/login',
config : {
validate : Validator.validateReqLogin(),
handler : function... | Update indentation to 2 spaces | Update indentation to 2 spaces
| JavaScript | mit | Pranay92/lets-chat,Pranay92/collaborate |
f01dc34ca41fcd59afd5da35b46b35659a835f55 | test/conductor.js | test/conductor.js | // Test runner
var runTests = require('./affixing-header-specs'),
browsers = [
{browserName: 'chrome'},
{browserName: 'firefox'}
];
// var browserConfig = require('./helpers/browser-config');
if (process.env.TRAVIS_JOB_NUMBER) {
browsers.push(
{browserName: 'Safari', version: '7'},... | // Test runner
var runTests = require('./affixing-header-specs'),
browsers = [
{browserName: 'chrome'},
{browserName: 'firefox'}
];
// var browserConfig = require('./helpers/browser-config');
if (process.env.TRAVIS_JOB_NUMBER) {
browsers.push(
{browserName: 'Safari', version: '7'},... | Use generic Android Emulator, add device-orientation | Use generic Android Emulator, add device-orientation
| JavaScript | cc0-1.0 | acusti/affixing-header,acusti/affixing-header |
ca33d145097d8c7bb4c022be010d0f939250bccc | workflows/createDeployment.js | workflows/createDeployment.js | 'use strict';
// workflows/createDeployment
var Joi = require('joi');
module.exports = {
schema: Joi.object({
deployerId: Joi.string().required(),
name: Joi.string().min(1).required(),
}).required().unknown(true),
version: '1.0',
decider: function(args) {
return {
createDeploymentDo... | 'use strict';
// workflows/createDeployment
var Joi = require('joi');
module.exports = {
schema: Joi.object({
deployerId: Joi.string().required(),
name: Joi.string().min(1).required(),
}).required().unknown(true),
version: '1.0',
decider: function(args) {
return {
createDeploymentDo... | Update examples to return env from output defined on parent workflow | Update examples to return env from output defined on parent workflow
| JavaScript | mit | f5itc/swf-graph,f5itc/swf-graph,f5itc/swf-graph |
093ab10177a6a70fdf073c63421346c442613647 | src/modules/spaceshipsDataReducer.js | src/modules/spaceshipsDataReducer.js | import { createAction, handleActions } from 'redux-actions'
export const INITIAL_DATA = 'INITIAL_DATA'
export const initialData = createAction(INITIAL_DATA)
const spaceshipsDataReducer = handleActions({
[INITIAL_DATA]: (state, action) => {
const { payload } = action
return {
...state,
spaceship... | import { createAction, handleActions } from 'redux-actions'
export const selectSpaceshipsData = state => state.spaceshipsData.spaceships
export const INITIAL_DATA = 'INITIAL_DATA'
export const initialData = createAction(INITIAL_DATA)
const spaceshipsDataReducer = handleActions({
[INITIAL_DATA]: (state, action) =>... | Move selectSpaceshipsData to global reducer | Move selectSpaceshipsData to global reducer
| JavaScript | mit | billdevcode/spaceship-emporium,billdevcode/spaceship-emporium |
39d5e9f4be50ba9ec8ca0bff4138c26e8ddeefe8 | lib/archive-tree.js | lib/archive-tree.js | module.exports = {
sortChildren (data) {
data.forEach((el) => {
if (el.parent) {
this.findNestedObject(data, el.parent[0].admin.uid).children.push(el);
}
});
return this.arrangeChildren(data[0]);
},
findNestedObject (objects, id) {
var found;
for (var i = 0; i < objects.le... | module.exports = {
sortChildren (data) {
data.forEach((el) => {
if (el.parent) {
if (this.findNestedObject(data, el.parent[0].admin.uid)) {
this.findNestedObject(data, el.parent[0].admin.uid).children.push(el);
}
}
});
return this.arrangeChildren(data[0]);
},
fin... | Check for element before tryign to retrive an attibiute of that element | Check for element before tryign to retrive an attibiute of that element
| JavaScript | mit | TheScienceMuseum/collectionsonline,TheScienceMuseum/collectionsonline |
c3b367a8c05ae7e21701c8d487d9e9e70f95d7f0 | lib/orbit-common.js | lib/orbit-common.js | import OC from 'orbit-common/main';
import Cache from 'orbit-common/cache';
import IdMap from 'orbit-common/id-map';
import Schema from 'orbit-common/schema';
import Serializer from 'orbit-common/serializer';
import Source from 'orbit-common/source';
import MemorySource from 'orbit-common/memory-source';
import { Opera... | import OC from 'orbit-common/main';
import Cache from 'orbit-common/cache';
import Schema from 'orbit-common/schema';
import Serializer from 'orbit-common/serializer';
import Source from 'orbit-common/source';
import MemorySource from 'orbit-common/memory-source';
import { OperationNotAllowed, RecordNotFoundException, ... | Remove IdMap from Orbit exports. | Remove IdMap from Orbit exports.
| JavaScript | mit | orbitjs/orbit.js,beni55/orbit.js,jpvanhal/orbit-core,opsb/orbit.js,orbitjs/orbit-core,ProlificLab/orbit.js,lytbulb/orbit.js,orbitjs/orbit.js,lytbulb/orbit.js,rollokb/orbit.js,jpvanhal/orbit.js,opsb/orbit-firebase,opsb/orbit-firebase,opsb/orbit-firebase,lytbulb/orbit-firebase,gnarf/orbit.js,ProlificLab/orbit.js,beni55/o... |
3fba933315cc62c0255ae52936f5e375813fbd3b | Omise/Payment/view/frontend/web/js/view/payment/method-renderer/omise-cc-method.js | Omise/Payment/view/frontend/web/js/view/payment/method-renderer/omise-cc-method.js | define(
[
'Magento_Payment/js/view/payment/cc-form'
],
function (Component) {
'use strict';
return Component.extend({
defaults: {
template: 'Omise_Payment/payment/omise-cc-form'
},
});
}
);
| define(
[
'Magento_Payment/js/view/payment/cc-form'
],
function (Component) {
'use strict';
return Component.extend({
defaults: {
template: 'Omise_Payment/payment/omise-cc-form'
},
getCode: function() {
return 'omis... | Add client side script functions to display the checkout form | Add client side script functions to display the checkout form | JavaScript | mit | omise/omise-magento,omise/omise-magento,omise/omise-magento |
c808428d7a8ff3accab13f944e62573a3ee38128 | registrar/models/university.js | registrar/models/university.js | 'use strict';
module.exports = function(sequelize, DataTypes) {
var University = sequelize.define("University", {
name: {
type: DataTypes.STRING,
allowNull: false,
},
country: {
type: DataTypes.STRING,
allowNull: false,
},
}, {
... | 'use strict';
module.exports = function(sequelize, DataTypes) {
var University = sequelize.define("University", {
name: {
type: DataTypes.STRING,
allowNull: false,
},
country: {
type: DataTypes.STRING,
allowNull: false,
},
}, {
... | Add University associations with User, School | Add University associations with User, School
| JavaScript | mit | dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet |
e96036e8dc450b8ddfccbda9c9c831aed64735d4 | functions/index.js | functions/index.js | const functions = require('firebase-functions');
const { getPullRequestsForUser } = require('./github.js');
exports.user = functions.https.onRequest(async (request, response) => {
try {
const data = await getPullRequestsForUser(request.params[0]);
response.send({
...data,
config: process.env.FIRE... | const functions = require('firebase-functions');
const { getPullRequestsForUser } = require('./github.js');
exports.user = functions.https.onRequest(async (request, response) => {
try {
const data = await getPullRequestsForUser(request.params[0]);
response.send(data);
} catch(error) {
response.send({
... | Remove firebase config from resp | Remove firebase config from resp
| JavaScript | mit | karanjthakkar/showmyprs.com |
5dcbf8c82bec5ccc94a1a3ee209697bfae0bc45c | js/components/content-header.js | js/components/content-header.js | (function(app) {
'use strict';
var jCore = require('jcore');
var helper = app.helper || require('../helper.js');
var ContentHeader = helper.inherits(function() {
ContentHeader.super_.call(this);
}, jCore.Component);
if (typeof module !== 'undefined' && module.exports)
module.exports = ContentHead... | (function(app) {
'use strict';
var jCore = require('jcore');
var helper = app.helper || require('../helper.js');
var ContentHeader = helper.inherits(function(props) {
ContentHeader.super_.call(this);
this.element = this.prop(props.element);
}, jCore.Component);
if (typeof module !== 'undefined' ... | Add property to access element of the content header | Add property to access element of the content header
| JavaScript | mit | ionstage/modular,ionstage/modular |
8eb04e26730dbaa622140a90b0d1f63bdbd5c65b | samples/templateweb/server.js | samples/templateweb/server.js |
var cobs = require('../..'),
http = require('http'),
fs = require('fs');
function compileFile(filename) {
var content = fs.readFileSync(filename).toString();
var code = cobs.compileTemplate(content);
var parser = new cobs.Parser(code);
var program = parser.parseProgram();
program.text = pr... |
var cobs = require('../..'),
http = require('http'),
fs = require('fs');
var program = cobs.compileTemplateFile('./factorial.cobp');
http.createServer(function(req, res) {
var runtime = {
display: function() {
if (arguments && arguments.length)
for (var k = 0; k < argu... | Refactor template web sample to use compileTemplateFile | Refactor template web sample to use compileTemplateFile
| JavaScript | mit | ajlopez/CobolScript |
0c02a02ce126113e7ea3a36a571f326b9c186cab | webpack.config.js | webpack.config.js | const path = require('path');
const context = path.join(__dirname, 'site');
const public = path.join(__dirname, 'public');
module.exports = {
context,
devServer: {
contentBase: public,
historyApiFallback: true,
open: true
},
devtool: 'source-map',
entry: './index.js',
module: {
rules: [
... | const path = require('path');
const context = path.join(__dirname, 'site');
const public = path.join(__dirname, 'public');
const webpack = require('webpack');
module.exports = {
context,
devServer: {
contentBase: public,
historyApiFallback: true,
open: true
},
devtool: 'source-map',
entry: './ind... | Add common chunks to dedupe common deps between lazy components. | Add common chunks to dedupe common deps between lazy components.
| JavaScript | mit | skatejs/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs,chrisdarroch/skatejs |
bdb390a1adfae17297c11de4395dca0c5fe7d9eb | app/scripts/components/openstack/openstack-tenant/appstore-field-select-openstack-tenant.js | app/scripts/components/openstack/openstack-tenant/appstore-field-select-openstack-tenant.js | import template from './appstore-field-select-openstack-tenant.html';
class AppstoreFieldSelectOpenstackTenantController {
// @ngInject
constructor(ncUtilsFlash, openstackTenantsService, currentStateService) {
this.ncUtilsFlash = ncUtilsFlash;
this.openstackTenantsService = openstackTenantsService;
thi... | import template from './appstore-field-select-openstack-tenant.html';
class AppstoreFieldSelectOpenstackTenantController {
// @ngInject
constructor(ncUtilsFlash, openstackTenantsService, currentStateService) {
this.ncUtilsFlash = ncUtilsFlash;
this.openstackTenantsService = openstackTenantsService;
thi... | Use backend_id instead of Waldur UUID for OpenStack | Use backend_id instead of Waldur UUID for OpenStack
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport |
2b29a5df0e61f49dcf2875b89b93c0dcfca13daf | webpack.config.js | webpack.config.js | const fs = require('fs');
const Encore = require('@symfony/webpack-encore');
const { paths, js: { entries, vendor } } = JSON.parse(fs.readFileSync('./package.json')).config;
const env = process.env.NODE_ENV === 'production' ? 'production' : 'dev';
Encore.configureRuntimeEnvironment(env);
Encore
// directory where ... | const fs = require('fs');
const Encore = require('@symfony/webpack-encore');
const { paths, js: { entries, vendor } } = JSON.parse(fs.readFileSync('./package.json')).config;
const env = process.env.NODE_ENV === 'production' ? 'production' : 'dev';
Encore.configureRuntimeEnvironment(env);
Encore
// directory whe... | Exit the process if there is a compile error in a production build | Exit the process if there is a compile error in a production build
| JavaScript | mit | e-sites/fe-boilerplate-poc,e-sites/fe-boilerplate-poc |
b766115ed6f960d5b488857129725a4faf5bec7c | src/SumoCoders/FrameworkCoreBundle/Resources/assets/js/Framework/Slider.js | src/SumoCoders/FrameworkCoreBundle/Resources/assets/js/Framework/Slider.js | import {PluginNotFound} from 'Exception/PluginNotFound';
export class Slider
{
constructor(element)
{
if (!$.isFunction($.fn.slider)) {
throw new PluginNotFound('Slider');
}
this.element = element;
this.initSlider();
}
initSlider()
{
this.element.slider(
{
min: 0,
... | import {PluginNotFound} from 'Exception/PluginNotFound';
export class Slider
{
constructor(element, min = 0, max = 50, values = [10, 40], range = true)
{
if (!$.isFunction($.fn.slider)) {
throw new PluginNotFound('Slider');
}
this.element = element;
this.min = min;
this.max = max;
th... | Set default values for slider | Set default values for slider
| JavaScript | mit | jonasdekeukelaere/Framework,sumocoders/Framework,sumocoders/Framework,jonasdekeukelaere/Framework,sumocoders/Framework,jonasdekeukelaere/Framework,sumocoders/Framework,jonasdekeukelaere/Framework |
c223f86f6878dc77a89ea64bb41811eac842e964 | packages/react-scripts/template/src/App.js | packages/react-scripts/template/src/App.js | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import { version, name } from '../package.json';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo... | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
... | Remove import package.json from template | Remove import package.json from template
| JavaScript | bsd-3-clause | iamdoron/create-react-app,iamdoron/create-react-app,iamdoron/create-react-app |
3e7b6c1be45cfa4adce0e3b6dfed80357ba5470d | webpack.config.js | webpack.config.js | const path = require('path')
module.exports = {
context: __dirname,
entry: './src/index.js',
devtool: 'source-map',
output: {
library: 'es2016-starter',
libraryTarget: 'umd',
path: path.resolve('dist'),
filename: 'es2015-starter.js',
},
resolve: {
extensions: ['.js'],
modules: [
... | const path = require('path')
const webpack = require('webpack')
module.exports = {
context: __dirname,
entry: './src/index.js',
devtool: 'source-map',
output: {
library: 'es2015-starter',
libraryTarget: 'umd',
path: path.resolve('dist'),
filename: 'es2015-starter.js',
},
resolve: {
ex... | Fix typo on output name, add module concat plugin. | Fix typo on output name, add module concat plugin.
| JavaScript | mit | kroogs/scanty,kroogs/yaemit |
a3b622643e4fcc2edc62327e8c9a33b2c6d419fa | ember-cli-build.js | ember-cli-build.js | /* eslint-env node */
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon')
module.exports = function (defaults) {
const app = new EmberAddon(defaults, {
babel: {
optional: ['es7.decorators']
},
'ember-cli-mocha': {
useLintTree: false
},
sassOptions: {
includePaths: [... | /* eslint-env node */
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon')
module.exports = function (defaults) {
const app = new EmberAddon(defaults, {
babel: {
optional: ['es7.decorators']
},
sassOptions: {
includePaths: [
'node_modules/ember-frost-css-core/scss',
... | Remove ember-cli-mocha useLintTree configuration option | Remove ember-cli-mocha useLintTree configuration option
| JavaScript | mit | ciena-blueplanet/ember-test-utils,sophypal/ember-test-utils,ciena-blueplanet/ember-test-utils,ciena-blueplanet/ember-test-utils,sophypal/ember-test-utils,sophypal/ember-test-utils |
3e887dd433998679c673b3900857d5e13d6dfbeb | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: {
home: path.join(__dirname, 'app/src/home'),
},
module: {
loaders: [
{
test: /\.sass$/,
loaders: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'],
},
{
te... | const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: {
home: path.join(__dirname, 'app/src/home'),
},
module: {
loaders: [
{
test: /\.sass$/,
loaders: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'],
},
{
te... | Remove inline serving from webpack dev server | Remove inline serving from webpack dev server
| JavaScript | mit | arkis/arkis.io,arkis/arkis.io |
072dbae8e4fb273a34a4c1d0ece641805d813fcc | webpack.config.js | webpack.config.js | var CopyWebpackPlugin = require('copy-webpack-plugin');
var path = require('path');
module.exports = [{
entry: {
horizontal: './shim/horizontal.js',
vertical: './shim/vertical.js'
},
output: {
library: 'ScratchBlocks',
libraryTarget: 'commonjs2',
path: path.resolve(__dirname, 'dist'),
fil... | var CopyWebpackPlugin = require('copy-webpack-plugin');
var path = require('path');
module.exports = [{
entry: {
horizontal: './shim/horizontal.js',
vertical: './shim/vertical.js'
},
output: {
library: 'ScratchBlocks',
libraryTarget: 'commonjs2',
path: path.resolve(__dirname, 'dist'),
fil... | Add UMD target for use without "require"/"import" | Add UMD target for use without "require"/"import"
| JavaScript | apache-2.0 | griffpatch/scratch-blocks,griffpatch/scratch-blocks,LLK/scratch-blocks,LLK/scratch-blocks,LLK/scratch-blocks,LLK/scratch-blocks,griffpatch/scratch-blocks,LLK/scratch-blocks,griffpatch/scratch-blocks,griffpatch/scratch-blocks |
a846b2b8aa57aa0e31080d10e6e92b793f19fb95 | webpack.config.js | webpack.config.js | const webpack = require('webpack');
module.exports = {
entry: `${__dirname}/src/index.js`,
output: {
path: `${__dirname}/build`,
publicPath: '/build/',
filename: 'bundle.js',
},
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' },
],
},
plugins:... | const webpack = require('webpack');
module.exports = {
entry: `${__dirname}/src/index.js`,
output: {
path: `${__dirname}/build`,
publicPath: '/build/',
filename: 'bundle.js',
},
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' },
],
},
plugins:... | Remove webpack plugin for node env production | Remove webpack plugin for node env production
Webpack 2 sets this automatically with the -p flag
| JavaScript | mit | ambershen/ambershen.github.io,ambershen/ambershen.github.io |
7922d5ea742c9e7eef5c317394b126bc5dc33784 | webpack.config.js | webpack.config.js | var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: {
'tree-chooser': './src/index.js',
'tree-chooser.min': './src/index.js'
},
output: {
path: './dist',
filename: '[name].js'
},
externals: {
... | var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: {
'tree-chooser': './src/index.js',
'tree-chooser.min': './src/index.js'
},
output: {
path: './dist',
filename: '[name].js',
library: 'tree-choo... | Make lodash an external for real | Make lodash an external for real
| JavaScript | apache-2.0 | randdusing/tree-chooser,albertian/tree-chooser,albertian/tree-chooser,randdusing/tree-chooser |
4fd065919b64297536ddbceed9d52aed81fa4b0e | yarn-recursive.js | yarn-recursive.js | #!/usr/bin/env node
const path = require('path');
const shell = require('shelljs');
const argv = require('yargs').argv;
const clc = require('cli-color');
function packageJsonLocations(dirname) {
return shell.find(dirname)
.filter(fname => !(fname.indexOf('node_modules') > -1 || fname[0] === '.') && path.basenam... | #!/usr/bin/env node
const path = require('path');
const shell = require('shelljs');
const argv = require('yargs').argv;
const clc = require('cli-color');
function packageJsonLocations(dirname) {
return shell.find(dirname)
.filter(fname => !(fname.indexOf('node_modules') > -1 || fname[0] === '.') && path.basenam... | Use platform-specific path separator in log messages. | Use platform-specific path separator in log messages.
| JavaScript | mit | nrigaudiere/yarn-recursive |
3914130255de502902fe35893fb435cbeb94e8c4 | .storybook/main.js | .storybook/main.js | module.exports = {
stories: ['../components/*.stories.js'],
addons: ['@storybook/addon-actions', '@storybook/addon-links', '@storybook/storyshots'],
};
| module.exports = {
stories: ['../components/*.stories.js'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
};
| Remove redundant storyshot plugin configuration | Remove redundant storyshot plugin configuration
| JavaScript | mit | cofacts/rumors-site,cofacts/rumors-site |
74bd30e8deee50bdc41fc21f9616df76ceb7a994 | www/js/BeerTap.js | www/js/BeerTap.js | define(['Twitter', 'TwitterConfirmer', 'TapsModel', 'JQMListView', 'ListPresenter', 'JQMEditView', 'EditPresenter', 'FollowingPresenter', 'SettingsPage'],
function(Twitter, TwitterConfirmer, TapsModel, JQMListView, ListPresenter, JQMEditView, EditPresenter, FollowingPresenter, SettingsPage) {
function BeerTap(twit... | define(['Twitter', 'TwitterConfirmer', 'TapsModel', 'JQMListView', 'ListPresenter', 'JQMEditView', 'EditPresenter', 'FollowingPresenter', 'SettingsPage'],
function(Twitter, TwitterConfirmer, TapsModel, JQMListView, ListPresenter, JQMEditView, EditPresenter, FollowingPresenter, SettingsPage) {
function BeerTap(twit... | Revert previous change to changePage() call - it's causing problems. | Revert previous change to changePage() call - it's causing problems.
| JavaScript | mit | coolhandmook/BeerTap,coolhandmook/BeerTap |
f6524d0f0f092258ff5d491138b6a78c4e4dc3b8 | example/app.js | example/app.js | var express = require('express');
var http = require('http');
var routes = require('./routes');
var app = express();
app.set('views', __dirname);
app.set('view engine', 'ejs');
if (app.get('env') === 'development') {
var browserSync = require('browser-sync');
var bs = browserSync({ logSnippet: false });
app.use... | var express = require('express');
var http = require('http');
var routes = require('./routes');
var app = express();
app.set('views', __dirname);
app.set('view engine', 'ejs');
if (app.get('env') === 'development') {
var browserSync = require('browser-sync');
var bs = browserSync.create().init({ logSnippet: false... | Use BrowserSync 2.0 form of initialization. | Use BrowserSync 2.0 form of initialization.
| JavaScript | mit | schmich/connect-browser-sync,schmich/connect-browser-sync |
aca697b17742b680cc6732ec2a9adae951b01ea0 | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
const buildEntryPoint = entryPoint => {
return [
'react-hot-loader/patch',
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
entryPoint
];
};
const plugins = [
new webpack.optimize.CommonsChunkPlugi... | const path = require('path');
const webpack = require('webpack');
const buildEntryPoint = entryPoint => {
return [
'react-hot-loader/patch',
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
entryPoint
];
};
const plugins = [
new webpack.optimize.CommonsChunkPlugi... | Clean up Webpack Dev Server Logs | Clean up Webpack Dev Server Logs
| JavaScript | mit | ibleedfilm/fcc-react-project,ibleedfilm/recipe-box,ibleedfilm/recipe-box,ibleedfilm/fcc-react-project |
f6af9188e6bbac4f9231fcceecf53c125e520ec7 | webpack.config.js | webpack.config.js | const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const WebpackAutoInject = require('webpack-auto-inject-version');
module.exports = {
entry: {
'typedjson': './src/typedjson.ts',
'typedjson.min': './src/typedjson.ts',
},
devtool: 'source-map',
module: {
rules:... | const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const WebpackAutoInject = require('webpack-auto-inject-version');
module.exports = {
entry: {
'typedjson': './src/typedjson.ts',
'typedjson.min': './src/typedjson.ts',
},
devtool: 'source-map',
module: {
rules:... | Change global to node compatible | Change global to node compatible
| JavaScript | mit | JohnWhiteTB/TypedJSON,JohnWhiteTB/TypedJSON,JohnWeisz/TypedJSON,JohnWeisz/TypedJSON,JohnWhiteTB/TypedJSON |
288ce5205edcf7e6c1afda5fa62d95c479aa6c30 | src/components/ProfilePage.js | src/components/ProfilePage.js | import React from 'react';
import { connect } from 'react-redux';
class ProfilePage extends React.Component {
constructor(props){
super(props);
this.logoff = this.logoff.bind(this);
}
logoff(){
localStorage.setItem('token', '');
this.props.history.push('/login');
}
render(){
return (
... | import React from 'react';
import { connect } from 'react-redux';
import { setChartAction } from '../actions/chartActions';
class ProfilePage extends React.Component {
constructor(props){
super(props);
this.logoff = this.logoff.bind(this);
}
logoff(){
localStorage.setItem('token', '');
this.prop... | Delete charts in store on logout | Delete charts in store on logout
| JavaScript | mit | MouseZero/voting-app,MouseZero/voting-app |
ddeb0918712169f45f744682279440d0a317032e | src/ol/format/XLink.js | src/ol/format/XLink.js | /**
* @module ol/format/XLink
*/
/**
* @const
* @type {string}
*/
const NAMESPACE_URI = 'http://www.w3.org/1999/xlink';
/**
* @param {Node} node Node.
* @return {boolean|undefined} Boolean.
*/
export function readHref(node) {
return node.getAttributeNS(NAMESPACE_URI, 'href');
}
| /**
* @module ol/format/XLink
*/
/**
* @const
* @type {string}
*/
const NAMESPACE_URI = 'http://www.w3.org/1999/xlink';
/**
* @param {Node} node Node.
* @return {string|undefined} href.
*/
export function readHref(node) {
return node.getAttributeNS(NAMESPACE_URI, 'href');
}
| Fix wrong return type for readHref function | Fix wrong return type for readHref function
| JavaScript | bsd-2-clause | mzur/ol3,fredj/ol3,tschaub/ol3,geekdenz/ol3,oterral/ol3,bjornharrtell/ol3,fredj/ol3,mzur/ol3,stweil/ol3,mzur/ol3,adube/ol3,tschaub/ol3,ahocevar/ol3,tschaub/ol3,geekdenz/openlayers,geekdenz/ol3,geekdenz/ol3,adube/ol3,ahocevar/openlayers,oterral/ol3,stweil/ol3,ahocevar/openlayers,stweil/openlayers,openlayers/openlayers,a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.