commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 624 | message stringlengths 15 4.7k | lang stringclasses 3
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
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 |
7361ad915b14e267ac9848cc3c88f37fd3404849 | server/scoring.js | server/scoring.js | // TODO: should the baseScore be stored, and updated at vote time?
// This interface should change and become more OO, this'll do for now
var Scoring = {
// re-run the scoring algorithm on a single object
updateObject: function(object) {
if(isNaN(object.score)){
object.score=0;
}
// just count t... | // TODO: should the baseScore be stored, and updated at vote time?
// This interface should change and become more OO, this'll do for now
var Scoring = {
// re-run the scoring algorithm on a single object
updateObject: function(object) {
if(isNaN(object.score)){
object.score=0;
}
// just count t... | Change to updating every 10s | Change to updating every 10s | JavaScript | mit | IQ2022/Telescope,basehaar/sumocollect,jparyani/Telescope,GeoffAbbott/dfl,STANAPO/Telescope,gzingraf/GreenLight-Pix,Daz2345/dhPulse,sethbonnie/StartupNews,eruwinu/presto,jkuruzovich/projecthunt,TribeMedia/Screenings,Leeibrah/telescope,jonmc12/heypsycho,dima7b/stewardsof,cydoval/Telescope,aichane/digigov,liamdarmody/tele... |
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 |
35f06cce46eef1d1dadd3c7b512dd2378d1ea9d5 | src/jokes.js | src/jokes.js | define(['lib/def', 'handler'], function(Def, Handler) {
var Jokes = Def.type(Handler, function(source) {
this.constructor.__super__.call(this);
this.def_prop('source', source);
});
Jokes.def_method(function next() {
return this.source.next();
});
Jokes.def_method(function match(msg) {
retur... | define(['lib/def', 'handler'], function(Def, Handler) {
var Jokes = Def.type(Handler, function(source) {
this.constructor.__super__.call(this);
this.def_prop('source', source);
});
Jokes.def_method(function next() {
return this.source.next();
});
Jokes.def_method(function match(msg) {
retur... | Fix bug where Jokes.on_message did not pass on non-matching messages. | Fix bug where Jokes.on_message did not pass on non-matching messages.
| JavaScript | mit | bassettmb/slack-bot-dev |
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 |
f439ac809210f9dbfaf176bdff00569f7dcc4fa6 | source/helpers.js | source/helpers.js | /**
* Truncate a string to the given length.
*
* @param string The string to truncate.
* @param length The length to truncate by.
*
* @returns {string}
*/
export const truncateString = (string, length) => {
return string.slice(0, length) + '...';
};
export const formatRant = (rant) => {
return {
... | /**
* Truncate a string to the given length.
*
* @param string The string to truncate.
* @param length The length to truncate by.
*
* @returns {string}
*/
export const truncateString = (string, length) => {
return string.slice(0, length) + '...';
};
export const formatRant = (rant) => {
return {
... | Change link URLs to avoid redirect | Change link URLs to avoid redirect
| JavaScript | mit | nblackburn/devrant-bot |
8a77f3189ac621c3530c006500f8b5e89a365585 | src/app/logger.js | src/app/logger.js | /* global DEBUG */
/* eslint-disable no-console */
import { argv } from "nwjs/argv";
import Logger from "utils/Logger";
const { logDebug, logError } = new Logger( "Application" );
const onError = async ( type, err, debug ) => {
if ( DEBUG ) {
console.error( type, err, debug );
}
try {
await logError( type ? ... | /* global DEBUG */
/* eslint-disable no-console */
import Ember from "ember";
import { argv } from "nwjs/argv";
import Logger from "utils/Logger";
const { logDebug, logError } = new Logger( "Application" );
const onError = async ( type, err, debug ) => {
if ( DEBUG ) {
console.error( type, err, debug );
}
try ... | Fix ErrorEvent logging + add Ember error listener | Fix ErrorEvent logging + add Ember error listener
| JavaScript | mit | streamlink/streamlink-twitch-gui,streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui |
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 |
4da6eb8cee0e4463bd7436da58c1caf352ae6c31 | test-loader.js | test-loader.js | /* globals requirejs, require */
QUnit.config.urlConfig.push({ id: 'nojshint', label: 'Disable JSHint'});
// TODO: load based on params
for (var moduleName in requirejs.entries) {
var shouldLoad;
if (moduleName.match(/-test$/)) { shouldLoad = true; }
if (!QUnit.urlParams.nojshint && moduleName.match(/\.jshint$... | /* globals requirejs, require */
QUnit.config.urlConfig.push({ id: 'nojshint', label: 'Disable JSHint'});
// TODO: load based on params
for (var moduleName in requirejs.entries) {
var shouldLoad;
if (moduleName.match(/[-_]test$/)) { shouldLoad = true; }
if (!QUnit.urlParams.nojshint && moduleName.match(/\.jshi... | Allow tests to be underscored. | Allow tests to be underscored.
This is to support legacy projects that are still using underscored
names (looking at you backburner).
| JavaScript | mit | ember-cli/ember-cli-test-loader |
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 |
848ee33109b35c83ac846a91d106e9268d1336d4 | test/app.spec.js | test/app.spec.js | import { expect } from 'chai';
describe('smoke test', () => {
it('run a test', () => {
expect(true).to.equal(true);
});
});
| import { expect } from 'chai';
describe('smoke test', () => {
it('run a test', () => {
expect(true).to.equal(false);
});
});
| Make the fail the test to demo CircleCI | CSRA-000: Make the fail the test to demo CircleCI
| JavaScript | mit | noms-digital-studio/csra-app,noms-digital-studio/csra-app,noms-digital-studio/csra-app |
eb3311239dac49183579a91ad99d9f1e6733e0bc | test/fixtures.js | test/fixtures.js | 'use strict'
const packageJson = require('../package')
const channelHeader = `Node.js-${process.version}-SDK-v${packageJson.version}`
module.exports = {
reqWithBody: {
reqheaders: {
'X-App-Id': 'node-sdk-test-id',
'X-App-Token': 'node-sdk-test-secret',
'X-Voucherify-Channel': channelHeader,
... | 'use strict'
// FIXME leaving var to satisfy tests for node v0.10 and v0.12
var packageJson = require('../package')
var channelHeader = `Node.js-${process.version}-SDK-v${packageJson.version}`
module.exports = {
reqWithBody: {
reqheaders: {
'X-App-Id': 'node-sdk-test-id',
'X-App-Token': 'node-sdk-te... | Use var to satisfy tests for prehistoric nodejs versions | Use var to satisfy tests for prehistoric nodejs versions
| JavaScript | mit | voucherifyio/voucherify-nodejs-sdk,rspective/voucherify-nodejs-sdk |
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 |
df476029bd49caf6de34eeee05ef3af83649173b | bin/m3u-export.js | bin/m3u-export.js | #!/usr/bin/env node
var LineReader = require('line-by-line'),
minimist = require('minimist'),
exec = require('exec'),
path = require('path'),
fs = require('fs');
var filenames = minimist(process.argv.slice(2))._;
filenames.forEach(function (filename) {
if (!fs.existsSync(filen... | #!/usr/bin/env node
var LineReader = require('line-by-line'),
minimist = require('minimist'),
exec = require('exec'),
path = require('path'),
fs = require('fs'),
// Get all the arguments that don't have an option associated with them
filenames = minimist(process.argv.slic... | Write output m3u to local directory Regardless of whether source m3u is in local dir or not | Write output m3u to local directory
Regardless of whether source m3u is in local dir or not
| JavaScript | mit | rowanoulton/m3u-export |
dcc87fda6efccbc88a74ef556c1a5a5868500cf2 | lib/resource/client/Company.js | lib/resource/client/Company.js | 'use strict';
//var P = require('bluebird');
var Resource = require('../Resource');
function Company(primus)
{
Resource.call(this, primus, 'Company');
this._cache = { // contains Promises
all: null
};
}
require('inherits')(Company, Resource);
module.exports = Company;
Compan... | 'use strict';
//var P = require('bluebird');
var Resource = require('../Resource');
function Company(primus)
{
Resource.call(this, primus, 'Company');
this._cache = { // contains Promises
all: null
};
}
require('inherits')(Company, Resource);
module.exports = Company;
Compan... | Update cache after an edit | Update cache after an edit
| JavaScript | agpl-3.0 | dealport/dealport |
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 |
5871c8b7077eaeaf04049135142d7e34f6130e30 | lib/flatten.js | lib/flatten.js | /*
Copyright (c) 2014, Ryuichi Okumura. All rights reserved.
Code licensed under the BSD License:
https://github.com/okuryu/package-json-flatten/blob/master/LICENSE.md
*/
"use strict";
/*
Based on order of the NPM official package.json reference.
https://www.npmjs.org/doc/package.json.html
*/
var priorityKeys =... | /*
Copyright (c) 2014, Ryuichi Okumura. All rights reserved.
Code licensed under the BSD License:
https://github.com/okuryu/package-json-flatten/blob/master/LICENSE.md
*/
"use strict";
/*
Based on order of the NPM official package.json reference.
https://www.npmjs.org/doc/package.json.html
*/
var priorityKeys =... | Move out checking by using hasOwnProperty() | Move out checking by using hasOwnProperty()
| JavaScript | bsd-3-clause | okuryu/package-json-flatten |
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 |
62e3f095c37976d67d28a16056b188ac643124a4 | static/js/main.js | static/js/main.js | (function($) {
"use strict";
var apiUrl = "http://redjohn.herokuapp.com/api/tweets";
function addScoresToSuspects(response) {
_.each(response.results, function(mentions, suspect) {
$("#" + suspect).find(".mentions").text(mentions);
});
}
function addTotal(response) {
... | (function($) {
"use strict";
var apiUrl = "http://redjohn.herokuapp.com/api/tweets/";
function addScoresToSuspects(response) {
_.each(response.results, function(mentions, suspect) {
$("#" + suspect).find(".mentions").text(mentions);
});
}
function addTotal(response) {... | Add a trailing slash to the base API URL | Add a trailing slash to the base API URL
| JavaScript | mit | AnSavvides/redjohn,AnSavvides/redjohn |
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 |
775bf364fc17512bd16827526bd7745352c015a6 | src/js/models/model-timeline-base.js | src/js/models/model-timeline-base.js | YUI.add("model-timeline-base", function(Y) {
"use strict";
var models = Y.namespace("Falco.Models"),
TimelineBase;
TimelineBase = Y.Base.create("timeline", Y.Model, [], {
initializer : function(config) {
var tweets;
config || (confi... | YUI.add("model-timeline-base", function(Y) {
"use strict";
var models = Y.namespace("Falco.Models"),
TimelineBase;
TimelineBase = Y.Base.create("timeline", Y.Model, [], {
initializer : function(config) {
var tweets;
if(!config) {
... | Clean up how timelines respond to tweets | Clean up how timelines respond to tweets
| JavaScript | mit | tivac/falco,tivac/falco |
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 |
d6cb6adf103ace89ee6a3ab8c249a953cc0052ba | bin/bot.js | bin/bot.js | // Include needed files
var fluffbot = require('../lib/fluffbot')
var discord = require('discord.js')
var event = require('../lib/event')
// Instantiate bots
var fluffbot = new fluffbot()
discord = new discord.Client({autoReconnect:true})
discord.login(fluffbot.settings.bot_token)
// Initiate the playing game to say... | // Include needed files
var fluffbot = require('../lib/fluffbot')
var discord = require('discord.js')
var event = require('../lib/event')
// Instantiate bots
var fluffbot = new fluffbot()
discord = new discord.Client({autoReconnect:true})
discord.login(fluffbot.settings.bot_token)
// Initiate the playing game to say... | Use method instead of property | Use method instead of property
| JavaScript | mit | FluffyMatt/fluffbot |
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 |
a416b0a1f674d8ab05472c961da780d69df8aa5b | packages/lambda/src/api/dbCreateItems/index.js | packages/lambda/src/api/dbCreateItems/index.js | import response from 'cfn-response'
import SNS from 'aws/sns'
import { Settings } from 'model/settings'
export async function handle (event, context, callback) {
if (event.RequestType === 'Update' || event.RequestType === 'Delete') {
response.send(event, context, response.SUCCESS)
return
}
const {
A... | import response from 'cfn-response'
import SNS from 'aws/sns'
import { Settings } from 'model/settings'
export async function handle (event, context, callback) {
if (event.RequestType === 'Update' || event.RequestType === 'Delete') {
response.send(event, context, response.SUCCESS)
return
}
const {
A... | Create new API key on launching a new stack | Create new API key on launching a new stack
| JavaScript | apache-2.0 | ks888/LambStatus,ks888/LambStatus,ks888/LambStatus |
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 |
c47361846c3a0e8051f7e08fa5bc0478b8104bce | server/methods/residencies.js | server/methods/residencies.js | import newResidentAndResidencySchema from '/both/schemas/newResidentAndResidencySchema';
Meteor.methods({
addNewResidentAndResidency (document) {
// set up validation context based on new resident and residency schama
const validationContext = newResidentAndResidencySchema.newContext();
// Check if subm... | import newResidentAndResidencySchema from '/both/schemas/newResidentAndResidencySchema';
Meteor.methods({
addNewResidentAndResidency (document) {
// set up validation context based on new resident and residency schama
const validationContext = newResidentAndResidencySchema.newContext();
// Check if subm... | Use object destructuring for resident attributes | Use object destructuring for resident attributes
| JavaScript | agpl-3.0 | brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing |
cdeca36337d76404cb8ea02f90e84ed9d0ca0c4e | scripts/models/graphs-model.js | scripts/models/graphs-model.js | // TODO: This is not a real model or controller
App.Graphs = Ember.Controller.extend({
graph: function(emberId, entityName, entityType, numSeries) {
entityName = entityName.replace(/\./g, '-');
var url = ((!localStorage.apiDomain) ? '' : '//' + localStorage.apiDomain) + '/api/v1/graphs?entityType=' + entityTy... | // TODO: This is not a real model or controller
App.Graphs = Ember.Controller.extend({
graph: function(emberId, entityName, entityType, numSeries) {
entityName = entityName.replace(/\./g, '-');
var url = ((!localStorage.apiDomain) ? '' : '//' + localStorage.apiDomain) + '/api/v1/graphs?entityType=' + entityTy... | Use brighter colors in contextual Graphite graphs | Use brighter colors in contextual Graphite graphs
| JavaScript | apache-2.0 | vine77/saa-ui,vine77/saa-ui,vine77/saa-ui |
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 |
242705eae5ed23fbc1b10c7e3b6dc1f187433082 | webpack.config.js | webpack.config.js | module.exports = {
entry: "./src/ko-calendar.js",
output: {
filename: "./ko-calendar.js",
libraryTarget: "commonjs2"
}
} | module.exports = {
entry: "./src/ko-calendar.js",
output: {
filename: "./ko-calendar.js",
libraryTarget: "commonjs"
}
} | Change webpack library target to commonjs | Change webpack library target to commonjs
| JavaScript | mit | Seikho/ko-calendar,Seikho/ko-calendar,Seikho/ko-calendar |
5e5072ced3b8fcec76b91f6fa7addaedb6702a35 | configs/biomes.js | configs/biomes.js | var biomes = {
"riverLand": {
probability: 0.8,
tiles: {
"bambooBush": 0.8,
"rockCluster": 0.2
}
},
"forest": {
probability: 0.5,
tiles: {
"loneTree": 0.25,
"rockCluster": 0.75
}
},
"desert": {
probabilit... | var biomes = {
"riverLand": {
probability: 0,
tiles: {
"bambooBush": 0,
"rockCluster": 0.2
}
},
"forest": {
probability: 0.5,
tiles: {
"loneTree": 0.25,
"rockCluster": 0.75
}
},
"desert": {
probability: 0... | Set bamboo generation percent to 0 until water is ready | Set bamboo generation percent to 0 until water is ready
| JavaScript | mit | zkingston/coroga,zkingston/coroga |
cace74599168013eb66cf9e9ab2623fb1ad392e3 | webpack.config.js | webpack.config.js | /* eslint-env node */
/* eslint-disable no-console */
const webpack = require('webpack');
const debug = require('debug')('app:webpack');
const isDev = process.env.NODE_ENV !== 'production';
debug(`Running in ${(isDev ? 'development' : 'production')} mode`);
module.exports = {
entry: {
'main': './src/browser/ma... | /* eslint-env node */
/* eslint-disable no-console */
const webpack = require('webpack');
const debug = require('debug')('app:webpack');
const isDev = process.env.NODE_ENV !== 'production';
debug(`Running in ${(isDev ? 'development' : 'production')} mode`);
module.exports = {
entry: {
'main': './src/browser/ma... | Fix error "The provided value ... is not an absolute path!" | Fix error "The provided value ... is not an absolute path!"
| JavaScript | mit | frosas/lag,frosas/lag,frosas/lag |
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 |
7d9539421b17495570f779494d81ebb0b5cda7f8 | webpack.config.js | webpack.config.js | const { resolve } = require('path')
module.exports = {
mode: 'production',
entry: './dist.browser/index.js',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
},
{
test: /\.js$/,
loader: 'file-replace-loader',
opt... | const { resolve } = require('path')
module.exports = {
mode: 'production',
entry: './dist.browser/browser/index.js',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
},
{
test: /\.js$/,
loader: 'file-replace-loader',
... | Revert webpack entry point change | Revert webpack entry point change
| JavaScript | mpl-2.0 | ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereum/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm |
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 |
8c075d8c2dd3231309cdff9d9363fcd9b8cb5457 | webpack.config.js | webpack.config.js | module.exports = {
devtool: 'source-map',
entry: './src/Home.jsx',
output: {
path: './public',
filename: './js/app.js',
publicPath: '/'
},
devServer: {
inline: true,
contentBase: './public',
},
module: {
loaders: [
{
... | module.exports = {
devtool: 'source-map',
entry: './src/browser.jsx',
output: {
path: './public',
filename: './js/app.js',
publicPath: '/'
},
devServer: {
inline: true,
contentBase: './public',
},
module: {
loaders: [
{
... | Include browser file as entry point | Include browser file as entry point
| JavaScript | mit | Juan1ll0/es6-react-server-side-render,Juan1ll0/es6-react-server-side-render |
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... |
9da51749c48c09bcd443b3a32ea51734dc34d60a | src/pages/_document.js | src/pages/_document.js | /* eslint-disable react/no-danger */
import Document, { Head, Main, NextScript } from 'next/document'
import React from 'react'
// The document (which is SSR-only) needs to be customized to expose the locale
// data for the user's locale for React Intl to work in the browser.
export default class IntlDocument extends... | /* eslint-disable react/no-danger */
import Document, { Head, Main, NextScript } from 'next/document'
import React from 'react'
// The document (which is SSR-only) needs to be customized to expose the locale
// data for the user's locale for React Intl to work in the browser.
export default class IntlDocument extends... | Update polyfill url to include default | Update polyfill url to include default | JavaScript | agpl-3.0 | uzh-bf/klicker-react,uzh-bf/klicker-react |
423bbaf03c83313d327b6c84e6b77ad6787de9e4 | generators/client/templates/src/main/webapp/app/account/social/_social.service.js | generators/client/templates/src/main/webapp/app/account/social/_social.service.js | (function() {
'use strict';
angular
.module('<%=angularAppName%>')
.factory('SocialService', SocialService);
SocialService.$inject = ['$document'];
function SocialService ($document) {
var socialService = {
getProviderSetting: getProviderSetting,
getPro... | (function() {
'use strict';
angular
.module('<%=angularAppName%>')
.factory('SocialService', SocialService);
SocialService.$inject = ['$document', '$http', '$cookies'];
function SocialService ($document, $http, $cookies) {
var socialService = {
getProviderSetting: ... | Use $cookies to retrive CSRF cookie token value | Use $cookies to retrive CSRF cookie token value
| JavaScript | apache-2.0 | rifatdover/generator-jhipster,baskeboler/generator-jhipster,JulienMrgrd/generator-jhipster,ziogiugno/generator-jhipster,vivekmore/generator-jhipster,vivekmore/generator-jhipster,mosoft521/generator-jhipster,gmarziou/generator-jhipster,baskeboler/generator-jhipster,dimeros/generator-jhipster,PierreBesson/generator-jhips... |
a47277dc01719beb91bbe71e5bfcf33eefbfa2b9 | server.js | server.js | const Hapi = require('@hapi/hapi');
const routes = require('./routes');
const auth = require('./auth');
module.exports = async (elastic, config, cb) => {
const server = new Hapi.Server({ port: config.port, routes: { cors: true, log: { collect: true } } });
server.route(routes(elastic, config));
if (config.auth... | const Hapi = require('@hapi/hapi');
const routes = require('./routes');
const auth = require('./auth');
module.exports = async (elastic, config, cb) => {
const server = new Hapi.Server({ port: config.port, routes: { cors: { origin: "ignore" }, log: { collect: true } } });
server.route(routes(elastic, config));
... | Enable CORS ignore orgin header | Enable CORS ignore orgin header
| JavaScript | mit | TheScienceMuseum/collectionsonline,TheScienceMuseum/collectionsonline |
9ba37879aab75e4817ab7673a144521a86464580 | src/server/xhr-proxy.js | src/server/xhr-proxy.js | // Copyright (c) Microsoft Corporation. All rights reserved.
var http = require('http'),
url = require('url');
module.exports.attach = function (app) {
app.all('/xhr_proxy', function proxyXHR(request, response) {
var requestURL = url.parse(unescape(request.query.rurl));
request.headers.host =... | // Copyright (c) Microsoft Corporation. All rights reserved.
var http = require('http'),
https = require('https'),
url = require('url');
module.exports.attach = function (app) {
app.all('/xhr_proxy', function proxyXHR(request, response) {
var requestURL = url.parse(unescape(request.query.rurl));
... | Support for HTTPS in XHR proxy. | Support for HTTPS in XHR proxy.
| JavaScript | mit | TimBarham/cordova-simulate,Microsoft/taco-simulate-server,Microsoft/taco-simulate-server,TimBarham/cordova-simulate |
44d44c1a110f66a5cfd51608d3fb463cc87705f0 | gulpfile.js | gulpfile.js | var gulp = require("gulp");
var browserify = require("browserify");
var source = require("vinyl-source-stream");
var buffer = require("vinyl-buffer");
var reactify = require("reactify");
var watch = require("gulp-watch");
var plumber = require("gulp-plumber");
var uglify = require('gulp-uglify');
gulp.task("browserify... | var gulp = require("gulp");
var browserify = require("browserify");
var source = require("vinyl-source-stream");
var buffer = require("vinyl-buffer");
var reactify = require("reactify");
var watch = require("gulp-watch");
var plumber = require("gulp-plumber");
var uglify = require('gulp-uglify');
gulp.task("browserify... | Change to show error message when browserify failed | Change to show error message when browserify failed
| JavaScript | mit | Sixeight/iwai,Sixeight/iwai,Sixeight/iwai |
7c867bc44d695ab15ecf63bdcf71db4088893551 | sketch.js | sketch.js | const WIDTH = 800;
const HEIGHT = 600;
var setup = function() {
createCanvas(WIDTH, HEIGHT);
background(0);
fill(255);
angleMode(DEGREES);
stroke(255);
strokeWeight(1);
strokeCap(SQUARE);
}
var draw = function() {
translate(200, 200);
rotate(45);
rect(-50, -25, 100, 50);
}
| const WIDTH = 800;
const HEIGHT = 600;
var setup = function() {
createCanvas(WIDTH, HEIGHT);
background(0);
fill(255);
angleMode(DEGREES);
stroke(255);
strokeWeight(1);
strokeCap(SQUARE);
}
var draw = function() {
push();
translate(200, 200);
rotate(45);
rect(-50, -25, 100, 50);
pop();
pu... | Use push and pop for different rectangles | Use push and pop for different rectangles
| JavaScript | mit | SimonHFrost/my-p5,SimonHFrost/my-p5 |
dbc8ad8b2a0bcd6229585910611808ae7c29791d | js/songz.js | js/songz.js | const songs = [...document.querySelectorAll('.songList li')];
const currentSong = document.querySelector('#currentSong');
songs.map((s) => {
s.addEventListener('click', () => {
currentSong.setAttribute('src', "https://archive.org/download/plays_some_standards/" + s.textContent.toLowerCase().replace(/\s/g, '_') + ... | const songs = [...document.querySelectorAll('.songList li')];
const currentSong = document.querySelector('#currentSong');
songs.map((s) => {
s.addEventListener('click', () => {
currentSong.setAttribute('src', "https://archive.org/download/plays_some_standards/" + s.textContent.toLowerCase().replace(/\s/g, '_') + ... | Add underline to playing song. | Add underline to playing song. | JavaScript | mpl-2.0 | ryanpcmcquen/ryanpcmcquen.github.io,ryanpcmcquen/ryanpcmcquen.github.io |
46bf3ad1bee7ac96ccf23c26033b69b2d6394220 | src/utils/convertToMoment.js | src/utils/convertToMoment.js | import moment from 'moment';
import {has} from 'ramda';
export default (newProps, momentProps) => {
const dest = {};
momentProps.forEach(key => {
const value = newProps[key];
if (value === null || value === undefined) {
dest[key] = null;
if (key === 'initial_visible_m... | import moment from 'moment';
import {has} from 'ramda';
export default (newProps, momentProps) => {
const dest = {};
momentProps.forEach(key => {
const value = newProps[key];
if (value === null || value === undefined) {
dest[key] = null;
if (key === 'initial_visible_m... | Fix problem with moment conversion | Fix problem with moment conversion
| JavaScript | mit | plotly/dash-core-components |
0825096862510c43b937ddac5c83b58a7a133f47 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var gutil = require('gulp-util');
var bower = require('bower');
var concat = require('gulp-concat');
var sh = require('shelljs');
var del = require('del');
var copyHTML = require('ionic-gulp-html-copy');
var requireDir = require('require-dir');
var gulpTask = requireDir('./gulp');
gulp.task... | var gulp = require('gulp');
var gutil = require('gulp-util');
var bower = require('bower');
var concat = require('gulp-concat');
var sh = require('shelljs');
var del = require('del');
var copyHTML = require('ionic-gulp-html-copy');
var requireDir = require('require-dir');
var gulpTask = requireDir('./gulp');
gulp.task... | Add watch task to default | Add watch task to default
| JavaScript | mit | naratipud/ionic-ts-sample,naratipud/ionic-ts-sample,naratipud/ionic-ts-sample |
14537e283e19802f2decfae2f269caf0c8860b20 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var elm = require('gulp-elm');
var plumber = require('gulp-plumber');
var del = require('del');
var browserSync = require('browser-sync');
// builds elm files and static resources (i.e. html and css) from src to dist folder
var paths = {
dest: 'dist',
elm: 'src/*.elm',
staticAss... | var gulp = require('gulp');
var elm = require('gulp-elm');
var plumber = require('gulp-plumber');
var del = require('del');
var browserSync = require('browser-sync');
// builds elm files and static resources (i.e. html and css) from src to dist folder
var paths = {
dest: 'dist',
elm: 'src/*.elm',
staticAss... | Disable notification in browser-sync as it caused issues with layout | Disable notification in browser-sync as it caused issues with layout
| JavaScript | mit | martin-kolinek/elm-dashboard,martin-kolinek/elm-dashboard |
14909c3d779edddad99b5f08ad5b17a4802abc13 | app/assets/javascripts/profile.js | app/assets/javascripts/profile.js | const checkStatus = () => {
fetch("/load_status", {
credentials: "same-origin"
})
.then(response => {
return response.text();
})
.then(data => {
document.getElementById("repo-alert").style.display = "block";
if (data === "true") {
document.getElementById("repo-load-info").i... | const checkStatus = () => {
fetch("/repositories/load_status", {
credentials: "same-origin"
})
.then(response => {
return response.text();
})
.then(data => {
document.getElementById("repo-alert").style.display = "block";
if (data === "true") {
document.getElementById("repo-... | Use correct load_status path in JS | Use correct load_status path in JS
| JavaScript | mit | schneidmaster/gitreports.com,schneidmaster/gitreports.com,schneidmaster/gitreports.com |
c67221a0661795471bc5c650292d3e6321e623a8 | gulpfile.js | gulpfile.js | var gulp = require('gulp')
var browserify = require('browserify')
var source = require('vinyl-source-stream')
var serve = require('gulp-serve')
var concat = require('gulp-concat')
// Static file server
gulp.task('server', serve({
root: ['example', 'dist'],
port: 7000
}))
gulp.task('build', function () {
return ... | var gulp = require('gulp')
var source = require('vinyl-source-stream')
var serve = require('gulp-serve')
var rename = require('gulp-rename')
var browserify = require('browserify')
var buffer = require('vinyl-buffer')
var uglify = require('gulp-uglify')
var taskListing = require('gulp-task-listing')
// Static file serv... | Add gulp release script to generate minified build. | Add gulp release script to generate minified build. | JavaScript | mit | opbeat/opbeat-react,opbeat/opbeat-angular,opbeat/opbeat-react,opbeat/opbeat-angular,opbeat/opbeat-js-core,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-js-core,jahtalab/opbeat-js,jahtalab/opbeat-js,opbeat/opbeat-angular |
b9f206997eed1fbadfdeea81dd165fb17750f6a4 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var less = require('gulp-less');
var plumber = require("gulp-plumber");
var browserSync = require('browser-sync').create();
gulp.task('run', function() {
browserSync.init({
server: "./"
});
gulp.watch(['komforta.less', 'less/*.less'], ['compile']);
gulp.watch('*.css').on('change... | var gulp = require('gulp');
var less = require('gulp-less');
var plumber = require("gulp-plumber");
var browserSync = require('browser-sync').create();
gulp.task('run', function() {
browserSync.init({
server: "./"
});
gulp.watch(['komforta.less', 'less/*.less'], ['compile']);
gulp.watch('*.css').on('change... | Add settings when error occured | Add settings when error occured
| JavaScript | mit | rochefort/hatena-blog-theme-komforta,rochefort/hatena-blog-theme-komforta |
9f4144ee6c33e14aa5e824b117450083c3296ec9 | target.js | target.js | Target = function(x, y) {
this.x = x;
this.y = y;
this.life = 11;
this.size = 12;
return this;
}
Target.prototype.render = function() {
var x = this.x - gCamera.x;
var y = this.y - gCamera.y;
// Only render if within the camera's bounds
if (gCamera.isInView(this)) {
renderPath([['a... | Target = function(x, y, type) {
this.x = x;
this.y = y;
this.life = 11;
this.size = 12;
this.type = typeof type === 'string' ? type : 'circle';
return this;
}
Target.prototype.render = function() {
var x = this.x - gCamera.x;
var y = this.y - gCamera.y;
// Only render if within the came... | Update Target to accept different types | Update Target to accept different types
| JavaScript | mit | peternatewood/shmup,peternatewood/shmup,peternatewood/shmup |
89ad381b6aa24b12ab02c3de9a049806bd1bd20a | patches/promise.js | patches/promise.js | 'use strict';
function PromiseWrap() {}
module.exports = function patchPromise() {
const hooks = this._hooks;
const state = this._state;
const Promise = global.Promise;
const oldThen = Promise.prototype.then;
Promise.prototype.then = wrappedThen;
function makeWrappedHandler(fn, handle, uid) {
if ('f... | 'use strict';
function PromiseWrap() {}
module.exports = function patchPromise() {
const hooks = this._hooks;
const state = this._state;
const Promise = global.Promise;
/* As per ECMAScript 2015, .catch must be implemented by calling .then, as
* such we need needn't patch .catch as well. see:
* http:/... | Add comment explaining why it is unnecessary to patch .catch | Add comment explaining why it is unnecessary to patch .catch
| JavaScript | mit | AndreasMadsen/async-hook |
d2d24f2c3a0daf1db0bc75f598fce9e17d87e675 | tests/dummy/app/app.js | tests/dummy/app/app.js | import Ember from 'ember';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
let App;
Ember.MODEL_FACTORY_INJECTIONS = true;
App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePre... | import Ember from 'ember';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
let App;
App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
});
loadInitializers(Ap... | Fix Model Factory Injections Deprecation | Fix Model Factory Injections Deprecation
Fix ember-metal.model-factory-injections deprecation by removing
code that set the MODEL_FACTORY_INJECTIONS flag, which is no longer
needed.
| JavaScript | mit | OCTRI/ember-i18next,OCTRI/ember-i18next |
a08eccf9b84b5754f7cf09c06292a76ea3f1a6bb | testem.js | testem.js | 'use strict';
let isCI = !!process.env.CI;
let smokeTests = !!process.env.SMOKE_TESTS;
let config = {
framework: 'qunit',
test_page: smokeTests ? 'tests/index.html?smoke_tests=true' : 'tests/index.html?hidepassed',
disable_watching: true,
browser_start_timeout: smokeTests ? 300000 : 30000,
browser_args: {
... | 'use strict';
let isCI = !!process.env.CI;
let smokeTests = !!process.env.SMOKE_TESTS;
let config = {
framework: 'qunit',
test_page: smokeTests ? 'tests/index.html?smoke_tests=true' : 'tests/index.html?hidepassed',
disable_watching: true,
browser_start_timeout: smokeTests ? 300000 : 30000,
browser_disconnec... | Increase browser disconnect timeout in smoke tests | Increase browser disconnect timeout in smoke tests
| JavaScript | mit | glimmerjs/glimmer-vm,tildeio/glimmer,glimmerjs/glimmer-vm,tildeio/glimmer,tildeio/glimmer,glimmerjs/glimmer-vm |
ca287bf5f22637d98af2ea9c78b499c7fc058766 | busstops/static/js/global.js | busstops/static/js/global.js | /*jslint browser: true*/
if (navigator.serviceWorker && location.protocol === 'https://') {
try {
navigator.serviceWorker.register('/serviceworker.js', {
scope: '/'
});
window.addEventListener('load', function () {
if (navigator.serviceWorker.controller) {
... | /*jslint browser: true*/
if (navigator.serviceWorker && location.host !== 'localhost:8000') {
navigator.serviceWorker.register('/serviceworker.js', {
scope: '/'
});
window.addEventListener('load', function () {
if (navigator.serviceWorker.controller) {
navigator.serviceWorker.co... | Revert "catch service worker error?" | Revert "catch service worker error?"
This reverts commit c14cfe8917c1f1c23ccd4bbd25a7b40d6c5d6b2b.
| JavaScript | mpl-2.0 | jclgoodwin/bustimes.org.uk,jclgoodwin/bustimes.org.uk,jclgoodwin/bustimes.org.uk,jclgoodwin/bustimes.org.uk |
96a7e42c5ee0226dee571e9aa0ef9774d2eb4c77 | topics/about_numbers.js | topics/about_numbers.js |
module("About Numbers (topics/about_numbers.js)");
test("types", function() {
var typeOfIntegers = typeof(6);
var typeOfFloats = typeof(3.14159);
equal(__, typeOfIntegers === typeOfFloats, 'are ints and floats the same type?');
equal(__, typeOfIntegers, 'what is the javascript numeric type?');
equ... |
module("About Numbers (topics/about_numbers.js)");
test("types", function() {
var typeOfIntegers = typeof(6);
var typeOfFloats = typeof(3.14159);
equal(true, typeOfIntegers === typeOfFloats, 'are ints and floats the same type?');
equal('number', typeOfIntegers, 'what is the javascript numeric type?');... | Complete numbers tests to pass | Complete numbers tests to pass
| JavaScript | mit | supportbeam/javascript_koans,supportbeam/javascript_koans |
6c66286a761072fd7b69aabd85a7d75a93b7c80c | lib/initial.js | lib/initial.js | /*!
* stylus-initial
* Copyright (c) 2014 Pierre-Antoine "Leny" Delnatte <info@flatland.be>
* (Un)Licensed
*/
"use strict";
var utils = require( "stylus" ).utils,
rInitial = /([a-z\-]+)\s*:\s*(initial);/gi,
oInitialValues = require( "./values.json" );
var plugin = function() {
return function( stylus... | /*!
* stylus-initial
* Copyright (c) 2014 Pierre-Antoine "Leny" Delnatte <info@flatland.be>
* (Un)Licensed
*/
"use strict";
var utils = require( "stylus" ).utils,
rInitial = /([a-z\-]+)\s*:\s*(initial);/gi,
oInitialValues = require( "./values.json" );
var plugin = function() {
return function( stylus... | Refactor the code to be a pre-processing task. | Refactor the code to be a pre-processing task.
| JavaScript | unlicense | leny/stylus-initial |
28141a5f615c5d11151e850beb7b6541045daeab | src/utils/general.js | src/utils/general.js | const getTaggedTemplateLiteralContent = require('./tagged-template-literal').getTaggedTemplateLiteralContent
const getCSS = (node) => `
.selector {
${getTaggedTemplateLiteralContent(node)}
}
`
const getKeyframes = (node) => `
@keyframes {
${getTaggedTemplateLiteralContent(node)}
}
`
exports.getKeyframes = getKey... | const getTaggedTemplateLiteralContent = require('./tagged-template-literal').getTaggedTemplateLiteralContent
const getCSS = (node) => `.selector {${getTaggedTemplateLiteralContent(node)}}\n`
const getKeyframes = (node) => `@keyframes {${getTaggedTemplateLiteralContent(node)}}\n`
exports.getKeyframes = getKeyframes
e... | Fix whitespace in generated CSS | Fix whitespace in generated CSS
| JavaScript | mit | styled-components/stylelint-processor-styled-components |
92510dc784b2ee72684b33668614d43e278542f5 | src/lib/config.example.js | src/lib/config.example.js | module.exports = {
SESSION_TOKEN_KEY: 'SESSION_TOKEN_KEY',
backend: {
hapiRemote: true,
hapiLocal: false,
parseRemote: false,
parseLocal: false
},
HAPI: {
local: {
url: 'http://localhost:5000'
},
remote: {
url: 'https://snowflakeserver-bartonhammond.rhcloud.com/'
}
... | module.exports = {
SESSION_TOKEN_KEY: 'SESSION_TOKEN_KEY',
backend: {
hapiRemote: false,
hapiLocal: false,
parseRemote: true,
parseLocal: false
},
HAPI: {
local: {
url: 'http://localhost:5000'
},
remote: {
url: 'https://snowflakeserver-bartonhammond.rhcloud.com/'
}
... | Change default remote server to a working one | Change default remote server to a working one
| JavaScript | mit | mkurutin/snowflake,mkurutin/snowflake,mkurutin/snowflake,mkurutin/snowflake |
56f1f0c255d80f21d55828ba0c7d40bdeb62431b | src/main/webapp/js/app.js | src/main/webapp/js/app.js | 'use strict';
/* App Module */
angular.module('nestorshop', ['nestorshopServices']).
config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/products', {templateUrl: 'partials/product-list.html', controller: ProductListCtrl}).
when('/products/:productId', {templateUrl: 'partials/... | 'use strict';
/* App Module */
angular.module('nestorshop', ['nestorshopServices'], function($httpProvider) {
// Use x-www-form-urlencoded Content-Type
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
// Override $http service's default transformReques... | Change POST of angular to send values in FormData (for jersey to read) | Change POST of angular to send values in FormData (for jersey to read)
By default it sends parameters as Request Payload, and jersey ignores
them.
Read :
http://victorblog.com/2012/12/20/make-angularjs-http-service-behave-like-jquery-ajax/
| JavaScript | apache-2.0 | nestorpina/nestor-shop,IGZnestorpina/nestor-shop,nestorpina/nestor-shop,IGZnestorpina/nestor-shop,nestorpina/nestor-shop,IGZnestorpina/nestor-shop |
ed1ef7efea65c12f77551044f11feab4f4aeb291 | src/main/webapp/search.js | src/main/webapp/search.js | // Copyright 2019 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 in ... | // Copyright 2019 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 in ... | Change response to text instead of json | Change response to text instead of json
| JavaScript | apache-2.0 | googleinterns/step132-2020,googleinterns/step132-2020,googleinterns/step132-2020 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.