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 |
|---|---|---|---|---|---|---|---|---|---|
743f896c562cd8cc9089937fc69c2d89e62f2466 | src/bin/scry-css.js | src/bin/scry-css.js | #! /usr/bin/env node
const program = require('commander')
const PipelineRunner = require('../pipeline/runner')
program
.version('scry-css 0.2.0')
.usage('[options] <type> <dir> <file...>')
.option('-r --reporter [reporter]', 'Reporter', /^(console|json)$/i)
.parse(process.argv)
if (!program.args.length) {
... | #! /usr/bin/env node
const program = require('commander')
const PipelineRunner = require('../pipeline/runner')
program
.version('scry-css 0.2.1')
.usage('[options] <type> <dir> <file...>')
.option(
'-r --reporter [reporter]',
'reporter (json/console), defaults to console', /^(console|json)$/i
)
.par... | Fix version and improve help message. | Fix version and improve help message.
| JavaScript | mit | ovidiubute/scry-css |
6a654de28eee0b37505e7623ddffcd3d1164a07d | middleware/index.js | middleware/index.js | var fs = require('fs'),
path = require('path')
files = fs.readdirSync(__dirname);
// load in each file within this directory and attach it to exports
files.forEach(function(file) {
var name = path.basename(file, '.js');
if (name === 'index') return;
module.exports[name] = require('./' + name);
}); | var fs = require('fs'),
path = require('path')
files = fs.readdirSync(__dirname);
// load in each file within this directory and attach it to exports
files.forEach(function(file) {
var name = path.basename(file, '.js'),
regex = new RegExp(/^_/);
if (name === 'index' || name.match(regex) !== null) {
... | Update middleware loader to ignore any files with a leading '_'. | Update middleware loader to ignore any files with a leading '_'.
| JavaScript | mit | linzjs/linz,linzjs/linz,linzjs/linz |
763798205711ef7b14876f47cda4dd63aaf21427 | devmgmtV2/index.js | devmgmtV2/index.js | "use strict"
let express = require("express");
let bodyParser = require('body-parser');
let cors = require('cors');
let app = express();
let { exec } = require('child_process')
app.use(cors())
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: true }));
// parse application/json
app... | "use strict"
let express = require("express");
let bodyParser = require('body-parser');
let cors = require('cors');
let app = express();
let { exec } = require('child_process')
app.use(cors())
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: true }));
// parse application/json
app... | Fix init scripts and add NODE_PATH | Fix init scripts and add NODE_PATH
| JavaScript | mit | projectOpenRAP/OpenRAP,projectOpenRAP/OpenRAP,projectOpenRAP/OpenRAP,projectOpenRAP/OpenRAP,projectOpenRAP/OpenRAP |
f1e796076afa93d9f8a4e0b44434cd20695f3e29 | template/_footer.js | template/_footer.js | // Expose Raven to the world
window.Raven = Raven;
})(window);
|
// Expose Raven to the world
if (typeof define === 'function' && define.amd) {
define(function() { return Raven; });
} else {
window.Raven = Raven;
}
})(this);
| Make Raven compatible with CommonJS | Make Raven compatible with CommonJS
| JavaScript | bsd-3-clause | samgiles/raven-js,clara-labs/raven-js,PureBilling/raven-js,grelas/raven-js,danse/raven-js,getsentry/raven-js,danse/raven-js,getsentry/raven-js,samgiles/raven-js,benoitg/raven-js,eaglesjava/raven-js,housinghq/main-raven-js,getsentry/raven-js,vladikoff/raven-js,clara-labs/raven-js,Mappy/raven-js,hussfelt/raven-js,iodine/... |
61506b4ba4eb6ed3aadb5a02d802a92dfd520d36 | client/src/components/main/index.js | client/src/components/main/index.js | import React, { Component } from 'react';
import { connect } from 'react-redux'
import SearchBar from 'material-ui-search-bar'
import _ from 'lodash'
import './index.css'
import SearchResults from '../searchresults'
import { searchTomos } from '../../redux/ducks/tomos'
class Main extends Component {
onChange = (se... | import React, { Component } from 'react';
import { connect } from 'react-redux'
import SearchBar from 'material-ui-search-bar'
import _ from 'lodash'
import './index.css'
import SearchResults from '../searchresults'
import { searchTomos } from '../../redux/ducks/tomos'
class Main extends Component {
constructor(pr... | Load all datasets by default | Load all datasets by default
| JavaScript | bsd-3-clause | OpenChemistry/materialsdatabank,OpenChemistry/materialsdatabank,OpenChemistry/materialsdatabank,OpenChemistry/materialsdatabank |
4ae5004078a0e79ce44b61f8f63d88cb87c6fab2 | toc_view.js | toc_view.js | "use strict";
var View = require("substance-application").View;
var $$ = require("substance-application").$$;
var Data = require("substance-data");
var Index = Data.Graph.Index;
var _ = require("underscore");
// Substance.TOC.View
// ==========================================================================
var TOCV... | "use strict";
var View = require("substance-application").View;
var $$ = require("substance-application").$$;
var Data = require("substance-data");
var Index = Data.Graph.Index;
var _ = require("underscore");
// Substance.TOC.View
// ==========================================================================
var TOCV... | Read document structure dynamically to be able to react on structural changes. | Read document structure dynamically to be able to react on structural changes.
| JavaScript | mit | substance/toc |
bf6d7c1082b2a9c7e80fdce81f2b3c159f4bc61a | custom/loggers/winston/index.js | custom/loggers/winston/index.js | //Winston Logger Module
const winston = require('winston');
let logLevel = "info"; //default
if (process.env.NODE_ENV === "production") {
logLevel = "error"; //logs error
}
else if (process.env.NODE_ENV === "staging") {
logLevel = "info"; //logs info and error
}
const logger = new winston.Logger({
transpo... | //Winston Logger Module
const winston = require('winston');
let logLevel = "info"; //default
if (process.env.NODE_ENV === "production") {
logLevel = "error"; //logs error
}
else if (process.env.NODE_ENV === "staging") {
logLevel = "info"; //logs info and error
}
const logger = new winston.Logger({
transpo... | Disable file logging by default | Disable file logging by default
| JavaScript | bsd-3-clause | renonick87/sdl_server,smartdevicelink/sdl_server,smartdevicelink/sdl_server,smartdevicelink/sdl_server,renonick87/sdl_server |
a27f39fbdb3a23d2d4a8264bfa4f3ee4f7b2c701 | lib/commands/ember-cli-yuidoc.js | lib/commands/ember-cli-yuidoc.js | 'use strict';
var Y = require('yuidocjs');
var rsvp = require('rsvp');
var optsGenerator = require('../options');
module.exports = {
name: 'ember-cli-yuidoc',
description: 'Generates html documentation using YUIDoc',
run: function(opts, rawArgs) {
var options = optsGenerator.generate(... | 'use strict';
module.exports = {
name: 'ember-cli-yuidoc',
description: 'Generates html documentation using YUIDoc',
run: function(opts, rawArgs) {
var Y = require('yuidocjs');
var rsvp = require('rsvp');
var optsGenerator = require('../options');
var options = optsG... | Move require statements to the run command | Move require statements to the run command
Yuidoc now requires an internet connection to work, and since this addon
is required even if you're not using it at the moment, it was preventing
users to work offline.
TODO: Fix yuidoc itself. Having local assets would also fix #14
| JavaScript | mit | cibernox/ember-cli-yuidoc,cibernox/ember-cli-yuidoc,mixonic/ember-cli-yuidoc,mixonic/ember-cli-yuidoc,greyhwndz/ember-cli-yuidoc,greyhwndz/ember-cli-yuidoc,VladimirTyrin/ember-cli-yuidoc,VladimirTyrin/ember-cli-yuidoc |
70b48677ffeb89bdc83cfd6dd0e645a613d2593c | website/src/components/Home.js | website/src/components/Home.js | import React from 'react';
import LoadingContainer from '../containers/LoadingContainer';
import PathResultsContainer from '../containers/PathResultsContainer';
import ErrorMessageContainer from '../containers/ErrorMessageContainer';
import SearchButtonContainer from '../containers/SearchButtonContainer';
import ToArt... | import React from 'react';
import LoadingContainer from '../containers/LoadingContainer';
import PathResultsContainer from '../containers/PathResultsContainer';
import ErrorMessageContainer from '../containers/ErrorMessageContainer';
import SearchButtonContainer from '../containers/SearchButtonContainer';
import ToArt... | Fix wrong input component order | Fix wrong input component order
| JavaScript | mit | jwngr/sdow,jwngr/sdow,jwngr/sdow,jwngr/sdow |
6adaa4847545b2ba7564bfc952a542d1ac9d5629 | web/static/codesearch.js | web/static/codesearch.js | "use strict";
var Codesearch = function() {
return {
socket: null,
delegate: null,
connect: function(delegate) {
if (Codesearch.socket !== null)
return;
console.log("Connecting...");
Codesearch.remote = null;
Codesearch.delegate = delegate;
var socket = io.connect(doc... | "use strict";
var Codesearch = function() {
return {
socket: null,
delegate: null,
connect: function(delegate) {
if (Codesearch.socket !== null)
return;
console.log("Connecting...");
Codesearch.remote = null;
Codesearch.delegate = delegate;
var socket = io.connect("ht... | Use a full URL for socket.io. | Use a full URL for socket.io.
| JavaScript | bsd-2-clause | lekkas/livegrep,paulproteus/livegrep,wfxiang08/livegrep,wfxiang08/livegrep,paulproteus/livegrep,wfxiang08/livegrep,lekkas/livegrep,lekkas/livegrep,lekkas/livegrep,lekkas/livegrep,paulproteus/livegrep,paulproteus/livegrep,lekkas/livegrep,paulproteus/livegrep,paulproteus/livegrep,wfxiang08/livegrep,wfxiang08/livegrep,wfx... |
6a04d1e2fee23066f9647a4caa38bea3395a4bf2 | tools/pre-commit.js | tools/pre-commit.js | 'use strict';
var exec = require('child_process').exec;
function fail() {
process.stdout.write(
'Style check failed (see the above output).\n' +
'If you still wish to commit your code, run git commit -n to skip this check.\n'
);
process.exit(1);
}
exec('git diff --staged --name-status', function (error, stdou... | 'use strict';
var exec = require('child_process').exec;
var path = require('path');
function fail() {
process.stdout.write(
'Style check failed (see the above output).\n' +
'If you still wish to commit your code, run git commit -n to skip this check.\n'
);
process.exit(1);
}
exec('git diff --staged --name-sta... | Convert Unix path to Windows path in jshint command (in node_modules) | Convert Unix path to Windows path in jshint command (in node_modules)
Story #103
| JavaScript | mit | GooTechnologies/goojs,GooTechnologies/goojs,GooTechnologies/goojs |
70dbfc53eecaa00ffc91c1b4c7dc63ae9a4ac653 | test/unit/layout.js | test/unit/layout.js |
describe('layout tests', function () {
it('Should have MaterialLayout globally available', function () {
expect(MaterialLayout).to.be.a('function');
});
it('Should be upgraded to a MaterialLayout successfully', function () {
var el = document.createElement('div');
el.innerHTML = '<div... |
describe('layout tests', function () {
it('Should have MaterialLayout globally available', function () {
expect(MaterialLayout).to.be.a('function');
});
it('Should be upgraded to a MaterialLayout successfully', function () {
var el = document.createElement('div');
el.innerHTML = '<div... | Update MaterialLayout unit test with chai-jquery | Update MaterialLayout unit test with chai-jquery
| JavaScript | apache-2.0 | Ubynano/material-design-lite,NaveenNs123/material-design-lite,wonder-coders/material-design-lite,Mannaio/javascript-course,manohartn/material-design-lite,francisco-filho/material-design-lite,Creepypastas/material-design-lite,Ninir/material-design-lite,suman28/material-design-lite,rvanmarkus/material-design-lite,samthor... |
0cf9aa8f61ccfc3720de7a2d9d017c97c1b79205 | filter-truncate.js | filter-truncate.js | /**
* Return a truncated version of a string
* @param {string} input
* @param {integer} length
* @param {boolean} killwords
* @param {string} end
* @return {string}
*/
PolymerExpressions.prototype.truncate = function (input, length, killwords, end) {
var orig = input;
lengt... | /**
* Return a truncated version of a string
* @param {string} input
* @param {integer} length
* @param {boolean} killwords
* @param {string} end
* @return {string}
*/
PolymerExpressions.prototype.truncate = function (input, length, killwords, end) {
var orig = input;
length = length || 255;
if(!... | Add check to ensure truncate does not error | Add check to ensure truncate does not error
- check if input exists before acting on it
- silences thrown error
- spirit of template filter, do nothing rather than fail if input is incorrect
| JavaScript | apache-2.0 | addyosmani/polymer-filters,eumendoza/polymer-filters,addyosmani/polymer-filters,eumendoza/polymer-filters |
94e178e8e3cea8c4f0ebd32b7b47ffea9da6ee78 | src/RowSizeControls/index.js | src/RowSizeControls/index.js | import React, { Component } from 'react';
class RowSizeControls extends Component {
render() {
return (
<div style={{textAlign: 'center'}}>
<label>Images per row</label>
<input
style={{
display: 'block',
margin: '0 auto',
}}
type="range"... | import React, { Component } from 'react';
class RowSizeControls extends Component {
render() {
return (
<div style={{textAlign: 'center'}}>
<label>{this.props.value} images per row</label>
<input
style={{
display: 'block',
margin: '0 auto',
}}
... | Add rowLength to slider label | Add rowLength to slider label
| JavaScript | mit | stevula/gallery,stevula/gallery |
6053b42bcf2d2cfe9604f9923b06b9a0151f3b15 | lib/index.js | lib/index.js | 'use strict';
module.exports = function(html, attachments) {
attachments.forEach(function(attachment) {
attachment.applied = false;
var regexps = [
(attachment.fileName) ? new RegExp('<img[^>]*cid:' + attachment.fileName + '[@"\'][^>]*>', 'ig') : undefined,
(attachment.contentId) ? new RegExp('<... | 'use strict';
module.exports = function(html, attachments) {
attachments.forEach(function(attachment) {
attachment.applied = false;
var regexps = [
(attachment.fileName) ? new RegExp('<img[^>]*cid:' + attachment.fileName.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&") + '[@"\'][^>]*>', 'ig') : undefine... | Fix a bug in removing cid img without attachments | Fix a bug in removing cid img without attachments
| JavaScript | mit | AnyFetch/npm-cid |
f114a28c3c2d724712d992f7a81efa3604bcc224 | lib/index.js | lib/index.js | 'use strict'
const _ = require('lodash')
const hasLoop = (flow) => {
if (Array.isArray(flow)) {
return _validate(flow)
} else if (flow.states) {
return _validate(flow.states)
}
return {
status: "error",
message: "Flow not found!"
}
}
const _validate = (states) => {
const paths = states.r... | 'use strict'
const _ = require('lodash')
const hasLoop = (flow) => {
if (Array.isArray(flow)) {
return _validate(flow)
} else if (flow.states) {
return _validate(flow.states)
}
return {
status: "error",
message: "Flow not found!"
}
}
const _validate = (states) => {
const paths = states.r... | Fix return acc when not push a state | [UPDATE] Fix return acc when not push a state
| JavaScript | mit | josemanu/flowx-loop-validator |
28a68feafafc98c1fa981751785c4319fd64ac60 | lib/index.js | lib/index.js | var debug = require('debug')('metalsmith-copy'),
path = require('path'),
cloneDeep = require('lodash').cloneDeep;
minimatch = require('minimatch');
module.exports = plugin;
function plugin(options) {
return function(files, metalsmith, done) {
if (!options.directory && !options.extension && !options.... | var debug = require('debug')('metalsmith-copy'),
path = require('path'),
cloneDeep = require('lodash').cloneDeep,
minimatch = require('minimatch');
module.exports = plugin;
function plugin(options) {
return function(files, metalsmith, done) {
if (!options.directory && !options.extension && !options.... | Fix imports that broke when running in strict mode | Fix imports that broke when running in strict mode
The badly place semicolon triggered "undefined variable" errors.
| JavaScript | mit | mattwidmann/metalsmith-copy |
ffcf2e2ff94d8abc2e2b047ccd975be7449ee198 | lib/index.js | lib/index.js | var easymongo = require('easymongo');
module.exports = function(options) {
var mongo = new easymongo(options);
return {
find: function(collection, params, options) {
return function(fn) {
mongo.find(collection, params, options, fn);
};
},
save: function(collection, params) {
... | var EasyMongo = require('easymongo');
module.exports = function(server, options) {
var mongo = new EasyMongo(server, options);
return {
find: function(table, params, options) {
return function(fn) {
mongo.find(table, params, options, fn);
};
},
findById: function(table, id) {
... | Add constructor arguments. Fix deprecated API. Add findById, removeById and count methods. | Add constructor arguments. Fix deprecated API. Add findById, removeById and count methods.
| JavaScript | mit | meritt/co-easymongo |
6c527183631acd6398ed279cb2f054a8672600c1 | tests/specs/extensible/auto-transport/main.js | tests/specs/extensible/auto-transport/main.js |
seajs.on('compiled', function(mod) {
if (mod.uri.indexOf('jquery.js') > -1) {
window.jQuery = window.$ = mod.exports
}
})
seajs.on('compile', function(mod) {
if (mod.uri.indexOf('cookie.js') > -1) {
mod.exports = $.cookie
}
})
seajs.config({
preload: ['./auto-transport/jquery']
}).use('./auto-trans... |
seajs.on('compiled', function(mod) {
if (mod.uri.indexOf('jquery.js') > -1) {
global.jQuery = global.$ = mod.exports
}
})
seajs.on('compile', function(mod) {
if (mod.uri.indexOf('cookie.js') > -1) {
mod.exports = $.cookie
}
})
seajs.config({
preload: ['./auto-transport/jquery']
}).use('./auto-trans... | Change window to global for Node.js | Change window to global for Node.js
| JavaScript | mit | coolyhx/seajs,yern/seajs,longze/seajs,MrZhengliang/seajs,lee-my/seajs,baiduoduo/seajs,liupeng110112/seajs,ysxlinux/seajs,yern/seajs,angelLYK/seajs,wenber/seajs,evilemon/seajs,wenber/seajs,miusuncle/seajs,lee-my/seajs,yuhualingfeng/seajs,LzhElite/seajs,121595113/seajs,judastree/seajs,wenber/seajs,twoubt/seajs,eleanors/S... |
1610d0389c7e0a7a10988d191e6dd3a08ea8712d | src/js/modules_enabled.js | src/js/modules_enabled.js | /*=include modules/accessor.js */
/*=include modules/ajax.js */
/*=include modules/calculation_colums.js */
/*=include modules/clipboard.js */
/*=include modules/download.js */
/*=include modules/edit.js */
/*=include modules/filter.js */
/*=include modules/format.js */
/*=include modules/frozen_columns.js */
/*=includ... | /*=include modules/accessor.js */
/*=include modules/ajax.js */
/*=include modules/calculation_colums.js */
/*=include modules/clipboard.js */
/*=include modules/download.js */
/*=include modules/edit.js */
/*=include modules/filter.js */
/*=include modules/format.js */
/*=include modules/frozen_columns.js */
/*=includ... | Fix improper case from 'KeyBindings' to keybindings causing build failures on linux. | Fix improper case from 'KeyBindings' to keybindings causing build failures on linux.
| JavaScript | mit | olifolkerd/tabulator |
0a2be4064b2ec75d428f55861f2c8d35727a0ee5 | lib/tools.js | lib/tools.js |
var tools = module.exports = exports = {},
debug = require('debug')('turnkey');
tools.default_cfg = function() {
var cfg = {
// Required Options --------------------------------------------------------
router: undefined, /* Express JS Router */
model: undefined, /* Mongoose model */
... |
var tools = module.exports = exports = {},
debug = require('debug')('turnkey');
tools.default_cfg = function() {
var cfg = {
// Required Options --------------------------------------------------------
router: undefined, /* Express JS Router */
model: undefined, /* Mongoose model */
... | Modify default deserialize user function | Modify default deserialize user function
| JavaScript | mit | uhray/turnkey |
038c140deb2618833172bd48c59adb7f21e49205 | gulp/tasks/configure.sandbox.js | gulp/tasks/configure.sandbox.js | 'use strict';
const gulp = require('gulp');
const helper = require('gulp/helper');
gulp.task('configure:sandbox', cb => {
const isNotEmpty = helper.validators.isNotEmpty;
const questions = [
{
type: 'input',
name: 'url',
message: 'What is your Profile URL address?',
default: 'https://w... | 'use strict';
const gulp = require('gulp');
const helper = require('gulp/helper');
gulp.task('configure:sandbox', cb => {
const isNotEmpty = helper.validators.isNotEmpty;
const questions = [
{
type: 'input',
name: 'url',
message: 'What is your Profile URL address?',
default: 'https://w... | Use 'password' type for a field with a token value. | Use 'password' type for a field with a token value.
| JavaScript | mit | radekk/webtask-mfa-monitor,radekk/mfa-monitor,radekk/webtask-tfa-monitor |
9dcfc85a24e0ea81397c7a7541375d6f8aac98a3 | src/es6/Machete.js | src/es6/Machete.js | export class Machete {
// TODO: Implement polyfills
/**
* Utility function to get an element from the DOM.
* It is needed because everytime we get an element from the DOM,
* we reset its style to make sure code works as needed.
* @param string selector CSS selector
* @return Elem... | export class Machete {
// TODO: Implement polyfills
/**
* Utility function to get an element from the DOM.
* It is needed because everytime we get an element from the DOM,
* we reset its style to make sure code works as needed.
* @param string selector CSS selector
* @return Elem... | Split DOM element selection and style reset | machete: Split DOM element selection and style reset
| JavaScript | mpl-2.0 | Technohacker/machete |
263f22fb4a56ede32e07f455db8a0e5a02e5dab2 | .eslintrc.js | .eslintrc.js | /* eslint-env node */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'jest', 'react-hooks', 'prettier'],
extends: [
'eslint:recommended',... | /* eslint-env node */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'jest', 'react-hooks', 'prettier'],
extends: [
'eslint:recommended',... | Use updated prettier ESLint config | Use updated prettier ESLint config
| JavaScript | mit | hugo/hugo.github.com,hugo/hugo.github.com |
f581907321b60c1bfc0db9dff09b9028a8b7f0f6 | src/styles/theme.js | src/styles/theme.js | const theme = {
color: {
grey: '#DDDDDD',
black: '#111111',
},
font: {
sans: `'Lora', sans-serif`,
serif: `'Raleway', serif`,
},
};
export default theme;
| const theme = {
color: {
grey: '#DDDDDD',
black: '#111111',
},
font: {
sans: `'Lora', sans-serif`,
serif: `'Raleway', serif`,
},
sizes: {
mobileS: '320px',
mobileM: '375px',
mobileL: '425px',
tablet: '768px',
laptop: '1024px',
laptopL: '1440px',
desktop: '2560px',
... | Add sizes to make it easier @medias | Add sizes to make it easier @medias
| JavaScript | mit | raulfdm/cv |
25a08afe9810fdd9299e5f8a51445344de560e11 | src/lib/expand-department.js | src/lib/expand-department.js | const departments = new Map(Object.entries({
AR: 'ART',
AS: 'ASIAN',
BI: 'BIO',
CH: 'CHEM',
CS: 'CSCI',
EC: 'ECON',
ES: 'ENVST',
HI: 'HIST',
MU: 'MUSIC',
PH: 'PHIL',
PS: 'PSCI',
RE: 'REL',
SA: 'SOAN',
}))
export default function expandDepartment(dept) {
if (departments.has(dept)) {
return departments.g... | const departments = new Map(Object.entries({
AR: 'ART',
AS: 'ASIAN',
BI: 'BIO',
CH: 'CHEM',
CS: 'CSCI',
EC: 'ECON',
EN: 'ENGL',
ES: 'ENVST',
HI: 'HIST',
MU: 'MUSIC',
PH: 'PHIL',
PS: 'PSCI',
RE: 'REL',
SA: 'SOAN',
}))
export default function expandDepartment(dept) {
if (departments.has(dept)) {
return ... | Add "EN" as a valid department shorthand | Add "EN" as a valid department shorthand
for the EN/LI 250 course. | JavaScript | agpl-3.0 | hawkrives/gobbldygook,hawkrives/gobbldygook,hawkrives/gobbldygook |
2fd60c6d2599d991c8d05ad101844ea840bc1528 | js/style-select.js | js/style-select.js | /*
* style-select.js
* https://github.com/savetheinternet/Tinyboard/blob/master/js/style-select.js
*
* Changes the stylesheet chooser links to a <select>
*
* Released under the MIT license
* Copyright (c) 2013 Michael Save <savetheinternet@tinyboard.org>
*
* Usage:
* $config['additional_javascript'][] = 'js... | /*
* style-select.js
* https://github.com/savetheinternet/Tinyboard/blob/master/js/style-select.js
*
* Changes the stylesheet chooser links to a <select>
*
* Released under the MIT license
* Copyright (c) 2013 Michael Save <savetheinternet@tinyboard.org>
*
* Usage:
* $config['additional_javascript'][] = 'js... | Select chosen stylesheet on load | Select chosen stylesheet on load
| JavaScript | mit | kimoi/Tinyboard,savetheinternet/Tinyboard,kimoi/Tinyboard,kimoi/Tinyboard,savetheinternet/Tinyboard,savetheinternet/Tinyboard,kimoi/Tinyboard |
e661eea9ec561302f48d24dd6b8ed05d262240ad | add-jira-links-to-description.js | add-jira-links-to-description.js | (() => {
const $input = document.querySelector('#pull_request_body');
if (!$input || $input.textLength > 0) {
return;
}
jiraLinks = [];
document.querySelectorAll('.commit-message').forEach((commitMessage) => {
commitMessage.textContent.match(/BSD-\d+/g).forEach((jiraId) => {
jiraLinks.push(`[${... | (() => {
const $title = document.querySelector('#pull_request_title');
const $description = document.querySelector('#pull_request_body');
if (!$title || !$description) {
return;
}
const idSet = new Set()
document.querySelectorAll('.commit-message').forEach((commitMessage) => {
match = commitMessage... | Fix title handling for multiple tags | Fix title handling for multiple tags
| JavaScript | mit | marionm/pivotal-github-chrome,marionm/pivotal-github-chrome |
e67bf05ecc75244b5b54020939f177b715168f70 | src/components/Checkbox.js | src/components/Checkbox.js | import React from 'react'
export const Checkbox = ({ id, nodes, onToggle }) => {
const node = nodes[id]
const { key, childIds, checked } = node
const handleChange = () => {
onToggle(id)
}
return (
<React.Fragment key={id}>
{key &&
<li>
<input type='checkbox' checked={checked... | import React from 'react'
export const Checkbox = ({ id, nodes, onToggle }) => {
const node = nodes[id]
const { key, childIds, checked } = node
const handleChange = () => onToggle(id)
return (
<React.Fragment key={id}>
{key &&
<li>
<input type='checkbox' checked={checked} classNam... | Remove braces for one line functions | Remove braces for one line functions
| JavaScript | mit | joelgeorgev/react-checkbox-tree,joelgeorgev/react-checkbox-tree |
e06d0ff85d4989a0e981fb33f836baef23d1bc3d | app/assets/javascripts/events.js | app/assets/javascripts/events.js | $(document).ready(function() {
$('#upload_form').change(function () {
$('#upload_form_label').hide();
$('#upload_form').hide();
$('#upload_progress').show();
$('#upload_form').submit();
});
$('#propagate_races').live('ajax:beforeSend', function() {
$('#propagate_races').hide();
$('#p... | $(document).ready(function() {
$('#upload_form').change(function () {
$('#upload_form_label').hide();
$('#upload_form').hide();
$('#upload_progress').show();
$('#upload_form').submit();
});
$('#propagate_races').bind('ajax:beforeSend', function() {
$('#propagate_races').hide();
$('#p... | Use jquery-rails bind() in place of live() | Use jquery-rails bind() in place of live()
| JavaScript | mit | scottwillson/racing_on_rails,scottwillson/racing_on_rails,scottwillson/racing_on_rails,scottwillson/racing_on_rails |
73464c8f531da3aa082f681fc263c1debcc7ad3f | app/reducers/modal/index.test.js | app/reducers/modal/index.test.js | import reducer from './';
describe('Modal reducer', () => {
let initialState;
let state;
let actionType;
let payload;
const callReducer = () => reducer(state, { type: actionType, payload });
beforeEach(() => {
initialState = {
isOpen: false,
modalName: '',
modalOptions: {}
};
... | import reducer from './';
describe('Modal reducer', () => {
let initialState;
let state;
let actionType;
let payload;
const callReducer = () => reducer(state, { type: actionType, payload });
beforeEach(() => {
initialState = {
isOpen: false,
modalName: '',
modalOptions: {}
};
... | Use initialState in Modal reducer spec | Use initialState in Modal reducer spec
| JavaScript | mit | fs/react-base,fs/react-base,fs/react-base |
354ace46a5860a938fb163b316e9c86dc60deae7 | build/dev.sugar.js | build/dev.sugar.js | // webpack config file for develop sugar.js
module.exports = {
'entry': './src/main/index',
'output': {
'path': './bundle',
'library': 'Sugar',
'libraryTarget': 'umd',
'filename': 'sugar.js'
},
'module': {
'loaders': [
{
'test': /\.js$/,
'exclude': /(node_modules|bower_components)/,
'loade... | // webpack config file for develop sugar.js
module.exports = {
'entry': './src/main/index',
'output': {
'path': './bundle',
'library': 'Sugar',
'libraryTarget': 'umd',
'filename': 'sugar.js'
},
'module': {
'loaders': [
{
'test': /\.js$/,
'exclude': /(node_modules|bower_components)/,
'loade... | Change webpack devtool to source-map. | Change webpack devtool to source-map.
| JavaScript | mit | tangbc/sugar,tangbc/sugar,tangbc/sugar |
c593ba742b86fceb8fdb13a7aac7adfa0ea9a95f | lib/environment.js | lib/environment.js | daysUntilExpiration = function() {
var daysToWait = 1;
var daysAgo = new Date();
daysAgo.setDate(daysAgo.getDate()-daysToWait);
return daysAgo;
} | daysUntilExpiration = function() {
var daysToWait = 90;
var daysAgo = new Date();
daysAgo.setDate(daysAgo.getDate()-daysToWait);
return daysAgo;
} | Change expiration to 90 days | Change expiration to 90 days
| JavaScript | mit | tizol/wework,kaoskeya/wework,BENSEBTI/wework,chrisshayan/wework,num3a/wework,inderpreetsingh/wework,kaoskeya/wework,tizol/wework,EtherCasts/wework,nate-strauser/wework,princesust/wework,princesust/wework,chrisshayan/wework,BENSEBTI/wework,nate-strauser/wework,inderpreetsingh/wework,num3a/wework,EtherCasts/wework |
9de35c415a1cb7d976e674cffe46d9e5fac7f149 | web/assets/scripts/index.js | web/assets/scripts/index.js | /**
* Created by ogiba on 20.08.2017.
*/
window.addEventListener("DOMContentLoaded", function () {
setupScrollListener();
setupAlertListener();
});
function setupScrollListener() {
var navBar = $('#nav-bar');
var titleBar = $('.app-title');
var distance = navBar.offset().top;
var titleBarDis... | /**
* Created by ogiba on 20.08.2017.
*/
window.addEventListener("DOMContentLoaded", function () {
setupScrollListener();
setupAlertListener();
});
function setupScrollListener() {
var navBar = $('#nav-bar');
var titleBar = $('.app-title');
var distance = navBar.offset().top;
var titleBarDis... | Fix setting close event error that ocurred when alert was not placed in view | [CookiesInfo] Fix setting close event error that ocurred when alert was not placed in view
| JavaScript | bsd-2-clause | ogiba/FamilyTree,ogiba/FamilyTree,ogiba/FamilyTree |
1eb106bba3da496ff732ccf02a69e72c43d55e58 | client/app/match/match.js | client/app/match/match.js | angular.module( 'moviematch.match', [] )
.controller( 'MatchController', function( $scope, Match ) {
$scope.movie = {};
$scope.session = {};
$scope.user = {};
$scope.user.name = "Julie";
$scope.session.name = "Girls Night Out";
$scope.movie = {
name: "Gone With The Wind",
year: "1939",
ratin... | angular.module( 'moviematch.match', [] )
.controller( 'MatchController', function( $scope, Match ) {
$scope.movie = {};
$scope.session = {};
$scope.user = {};
$scope.user.name = "Julie";
$scope.session.name = "Girls Night Out";
$scope.movie = {
name: "Gone With The Wind",
year: "1939",
ratin... | Make yes/no function definitions rather than function executions | Make yes/no function definitions rather than function executions
| JavaScript | mpl-2.0 | RubiginousChanticleer/rubiginouschanticleer,CantillatingZygote/rubiginouschanticleer,RubiginousChanticleer/rubiginouschanticleer,CantillatingZygote/rubiginouschanticleer |
b2fb0e989f5e76838766b4a36572155d9c1b0847 | plugins/relay_force_routing.js | plugins/relay_force_routing.js | // relay_force_routing
// documentation via: haraka -h plugins/relay_force_routing
exports.register = function() {
this.register_hook('get_mx', 'force_routing');
this.domain_ini = this.config.get('relay_dest_domains.ini', 'ini');
};
exports.force_routing = function (next, hmail, domain) {
var force_route... | // relay_force_routing
// documentation via: haraka -h plugins/relay_force_routing
exports.hook_get_mx = function (next, hmail, domain) {
var domain_ini = this.config.get('relay_dest_domains.ini', 'ini');
var force_route = lookup_routing(domain_ini['domains'], domain);
if (force_route != "NOTFOUND" ){
... | Change around so config is loaded when changed | Change around so config is loaded when changed
| JavaScript | mit | AbhilashSrivastava/haraka_sniffer,danucalovj/Haraka,Dexus/Haraka,haraka/Haraka,typingArtist/Haraka,msimerson/Haraka,abhas/Haraka,jjz/Haraka,niteoweb/Haraka,danucalovj/Haraka,MignonCornet/Haraka,baudehlo/Haraka,bsmr-x-script/Haraka,zombified/Haraka,MignonCornet/Haraka,Synchro/Haraka,fredjean/Haraka,MignonCornet/Haraka,b... |
3dc61cf44f794cce36c4b008aeaa035cf37c8c76 | client/src/AudioButton.js | client/src/AudioButton.js | function AudioButton() {
var that = this;
this.position = {
x: 15.5,
y: 0.5
};
if (typeof localStorage.soundActivated === 'undefined') {
localStorage.soundActivated = "1";
}
this.on = !!localStorage.soundActivated;
setTimeout(function() {
createjs.Sound.setMute(!that.on);
mm.music.vo... | function AudioButton() {
var that = this;
this.position = {
x: 15.5,
y: 0.4
};
if (typeof localStorage.soundActivated === 'undefined') {
localStorage.soundActivated = "1";
}
this.on = !!localStorage.soundActivated;
setTimeout(function() {
createjs.Sound.setMute(!that.on);
mm.music.vo... | Adjust audio button position, size | Adjust audio button position, size
| JavaScript | apache-2.0 | ninjadev/globalgamejam2016,ninjadev/globalgamejam2016 |
ce4d683bf0d7a47782646fcd140db12a10583c8f | .storybook/styles.js | .storybook/styles.js | export const baseStyles = {};
export const centerStyles = {
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
};
| export const baseStyles = {
};
export const centerStyles = {
margin: '24px auto',
maxWidth: '90%',
};
| Modify baseStyles & centerStyles for a better centering of the content without flexbox | Modify baseStyles & centerStyles for a better centering of the content without flexbox
| JavaScript | mit | teamleadercrm/teamleader-ui |
bf87ac15b529447a0906f47fdeeb842faa5739ff | src/components/Cards/ImageCard.js | src/components/Cards/ImageCard.js | import React, { PropTypes } from 'react';
import { Card } from '../UI';
import styles from './ImageCard.css';
export default class ImageCard extends React.Component {
render() {
const { onClick, onImageLoaded, image, text, description } = this.props;
return (
<Card onClick={onClick} className={styles.... | import React, { PropTypes } from 'react';
import { Card } from '../UI';
import styles from './ImageCard.css';
export default class ImageCard extends React.Component {
render() {
const { onClick, onImageLoaded, image, text, description } = this.props;
return (
<Card onClick={onClick} className={styles.... | Make cards have h2s not h1s | Make cards have h2s not h1s
| JavaScript | mit | dopry/netlify-cms,Aloomaio/netlify-cms,Aloomaio/netlify-cms,netlify/netlify-cms,netlify/netlify-cms,dopry/netlify-cms,netlify/netlify-cms,netlify/netlify-cms |
feeaac41b60172495adb7d60779ff0f1330dfa6f | lib/formatters/codeclimate.js | lib/formatters/codeclimate.js | 'use strict';
module.exports = function (err, data) {
if (err) {
return 'Debug output: %j' + data + '\n' + JSON.stringify(err);
}
if (!data.length) {
return;
}
var returnString = '';
for (var i = 0, il = data.length; i < il; ++i) {
returnString += JSON.stringify({
type: 'issue',
... | 'use strict';
module.exports = function (err, data) {
if (err) {
return 'Debug output: %j' + data + '\n' + JSON.stringify(err);
}
if (!data.length) {
return;
}
var returnString = '';
for (var i = 0, il = data.length; i < il; ++i) {
returnString += JSON.stringify({
type: 'issue',
... | Add Remediation Points to issues | Add Remediation Points to issues
| JavaScript | apache-2.0 | chetanddesai/nsp,nodesecurity/nsp,requiresafe/cli,ABaldwinHunter/nsp-classic,ABaldwinHunter/nsp |
0bc1c4e2a0802a90b35a438c79eee23830ee9878 | lib/worker/app-worker-info.js | lib/worker/app-worker-info.js | var AppWorkerInfo = function(appSpec, listenPort, logFilePath, exitPromise) {
this.appSpec = appSpec;
this.listenPort = listenPort;
this.logFilePath = logFilePath;
this.exitPromise = exitPromise;
};
module.exports = AppWorkerInfo;
(function() {
}).call(AppWorkerInfo.prototype); | var events = require('events');
var util = require('util');
var AppWorkerInfo = function(appSpec, listenPort, logFilePath, exitPromise) {
events.EventEmitter.call(this);
this.appSpec = appSpec;
this.listenPort = listenPort;
this.logFilePath = logFilePath;
this.exitPromise = exitPromise;
this.$refCount = 0... | Add acquire/release to worker info | Add acquire/release to worker info
| JavaScript | agpl-3.0 | githubfun/shiny-server,nvoron23/shiny-server,joequant/shiny-server,ekergy/shiny-ekergy,dpryan79/shiny-server,ekergy/shiny-ekergy,sneumann/shiny-server,nvoron23/shiny-server,sneumann/shiny-server,dpryan79/shiny-server,sneumann/shiny-server,trestletech/shiny-server,dpryan79/shiny-server,dpryan79/shiny-server,githubfun/sh... |
6e60972f8c2fc04cfe34e5afcf793e9170fe0356 | scripts/pugbomb.js | scripts/pugbomb.js | module.exports = function(robot){
var pugBombReplies = [
'There will be no more of that. Take your {{number}} pugs elsewhere.',
'Nope. Nobody needs to see that many pugs.',
'Why do you think we all need to see {{number}} pugs?',
'No pugs for you!',
'{{number}} pugs... {{number}} PUGS?? Absolutely not.'
... | module.exports = function(robot){
var pugBombReplies = [
'There will be no more of that. Take your {{number}} pugs elsewhere.',
'Nope. Nobody needs to see that many pugs.',
'Why do you think we all need to see {{number}} pugs?',
'No pugs for you!',
'{{number}} pugs... {{number}} PUGS?? Absolutely not.',
... | Add lumberg meme to pug bomb replies | Add lumberg meme to pug bomb replies
| JavaScript | mit | BallinOuttaControl/bocbot,BallinOuttaControl/bocbot |
030839d136309e814d9da289c88662c025da833f | src/extendables/SendAliases.js | src/extendables/SendAliases.js | const { APIMessage } = require('discord.js');
const { Extendable } = require('klasa');
const { TextChannel, DMChannel, GroupDMChannel, User } = require('discord.js');
module.exports = class extends Extendable {
constructor(...args) {
super(...args, { appliesTo: [TextChannel, DMChannel, GroupDMChannel, User] });
}... | const { APIMessage } = require('discord.js');
const { Extendable } = require('klasa');
const { TextChannel, DMChannel, GroupDMChannel, User } = require('discord.js');
module.exports = class extends Extendable {
constructor(...args) {
super(...args, { appliesTo: [TextChannel, DMChannel, GroupDMChannel, User] });
}... | Fix [object Object] in sendLocale extendable | Fix [object Object] in sendLocale extendable
#494 | JavaScript | mit | dirigeants/klasa |
e2eca91cfe4a7a13fa825b40815d0749cc11f989 | src/foam/nanos/menu/SubMenu.js | src/foam/nanos/menu/SubMenu.js | /**
* @license
* Copyright 2017 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
package: 'foam.nanos.menu',
name: 'SubMenu',
extends: 'foam.nanos.menu.AbstractMenu',
requires: [ 'foam.nanos.menu.SubMenuView' ],
methods: [
// Code below is for conv... | /**
* @license
* Copyright 2017 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
package: 'foam.nanos.menu',
name: 'SubMenu',
extends: 'foam.nanos.menu.AbstractMenu',
requires: [ 'foam.nanos.menu.SubMenuView' ],
methods: [
function launch() { /** N... | Fix for my last menu fix. | Fix for my last menu fix.
| JavaScript | apache-2.0 | jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2 |
9e734eca0da3e455a11460b9e27b78254fa43809 | core/build/webpack.client.config.js | core/build/webpack.client.config.js | const webpack = require('webpack')
const merge = require('webpack-merge')
const base = require('./webpack.base.config')
const path = require('path')
const VueSSRClientPlugin = require('vue-server-renderer/client-plugin')
const config = merge(base, {
output: {
path: path.resolve(__dirname, '../../dist'),
publ... | const webpack = require('webpack')
const merge = require('webpack-merge')
const base = require('./webpack.base.config')
const path = require('path')
const VueSSRClientPlugin = require('vue-server-renderer/client-plugin')
const config = merge(base, {
optimization: {
splitChunks: {
cacheGroups: {
co... | Revert "Minor - webpack client filename change" | Revert "Minor - webpack client filename change"
This reverts commit 8a687defb70b7c4bab6c5aac3be8867d8efd7542.
| JavaScript | mit | DivanteLtd/vue-storefront,pkarw/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront |
8286e9787c23e67c714918dd794b67e45c140128 | src/modules/news.js | src/modules/news.js | const axios = require('axios');
const chalk = require('chalk');
const helpers = require('../helpers');
exports.listArticles = function (argv) {
const articleCount = argv.limit > 1 ? argv.limit : 1;
axios.get('https://api.spaceflightnewsapi.net/articles/', {
params: {
limit: articleCount
}
}).then... | const axios = require('axios');
const chalk = require('chalk');
const helpers = require('../helpers');
exports.listArticles = function (argv) {
const articleCount = argv.limit > 1 ? argv.limit : 1;
axios.get('https://api.spaceflightnewsapi.net/articles/', {
params: {
limit: articleCount
}
}).then... | Fix new line being included in an anchor | Fix new line being included in an anchor
| JavaScript | mit | Belar/space-cli |
a5dbd6f84a5acc166dea63c4643ee543e5ec48a1 | src/native/index.js | src/native/index.js | import 'react-native-browser-polyfill';
import App from './app/App.react';
import Component from 'react-pure-render/component';
import React, { AppRegistry, Platform } from 'react-native';
import config from './config';
import configureStore from '../common/configureStore';
import createEngine from 'redux-storage-engin... | import 'react-native-browser-polyfill';
import App from './app/App.react';
import Component from 'react-pure-render/component';
import React, { AppRegistry, Platform } from 'react-native';
import config from './config';
import configureStore from '../common/configureStore';
import createEngine from 'redux-storage-engin... | Add missing initialNow for native | Add missing initialNow for native
| JavaScript | mit | TheoMer/este,vacuumlabs/este,christophediprima/este,TheoMer/Gyms-Of-The-World,christophediprima/este,skallet/este,este/este,steida/este,robinpokorny/este,syroegkin/mikora.eu,este/este,este/este,amrsekilly/updatedEste,robinpokorny/este,christophediprima/este,SidhNor/este-cordova-starter-kit,steida/este,TheoMer/Gyms-Of-T... |
f389dd376c8fc90e92eb643583afbc0a49dc8930 | src/render-queue.js | src/render-queue.js | import options from './options';
import { defer } from './util';
import { renderComponent } from './vdom/component';
/** Managed queue of dirty components to be re-rendered */
// items/itemsOffline swap on each rerender() call (just a simple pool technique)
let items = [],
itemsOffline = [];
export function enqueue... | import options from './options';
import { defer } from './util';
import { renderComponent } from './vdom/component';
/** Managed queue of dirty components to be re-rendered */
// items/itemsOffline swap on each rerender() call (just a simple pool technique)
let items = [],
itemsOffline = [];
export function enqueue... | Remove unnecessary early exit for a condition that rarely/never occurs. | Remove unnecessary early exit for a condition that rarely/never occurs.
| JavaScript | mit | neeharv/preact,developit/preact,gogoyqj/preact,neeharv/preact,developit/preact |
34bf08d08b111fd67b2a346f8bcae1658fe68a51 | src/routes/index.js | src/routes/index.js | /* eslint-disable no-unused-vars*/
import React from 'react';
/* eslint-enable no-unused-vars*/
import { Router, Route, IndexRoute } from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import App from 'containers/App/';
import Home from 'containers/Home/';
const Routes = () => (
... | /* eslint-disable no-unused-vars*/
import React from 'react';
/* eslint-enable no-unused-vars*/
import { Router, Route, IndexRoute } from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import App from './App/';
import Home from './Home/';
const Routes = () => (
<Router history=... | Change import path of routes | Change import path of routes
| JavaScript | mit | pl12133/pl12133.github.io,pl12133/pl12133.github.io |
bf4bd191015a4f8994fa138bc95fec6fdd012e6b | docs/_js/examples/todo.js | docs/_js/examples/todo.js | var TODO_COMPONENT = `
var TodoList = React.createClass({
render: function() {
var createItem = function(itemText, index) {
return <li key={index + itemText}>{itemText}</li>;
};
return <ul>{this.props.items.map(createItem)}</ul>;
}
});
var TodoApp = React.createClass({
getInitialState: function(... | var TODO_COMPONENT = `
var TodoList = React.createClass({
render: function() {
var createItem = function(item) {
return <li key={item.id}>{item.text}</li>;
};
return <ul>{this.props.items.map(createItem)}</ul>;
}
});
var TodoApp = React.createClass({
getInitialState: function() {
return {ite... | Use id for TodoApp example | [docs] Use id for TodoApp example
| JavaScript | bsd-3-clause | AlmeroSteyn/react,reactkr/react,chippieTV/react,claudiopro/react,roth1002/react,airondumael/react,tomocchino/react,TheBlasfem/react,claudiopro/react,cody/react,TheBlasfem/react,terminatorheart/react,trueadm/react,jzmq/react,STRML/react,yangshun/react,ABaldwinHunter/react-engines,salzhrani/react,TheBlasfem/react,maxschm... |
8d40f4d706fa898002ea3b8cc33b38ab377befcb | addon/classes/row.js | addon/classes/row.js | import ObjectProxy from '@ember/object/proxy';
import { merge } from '@ember/polyfills';
/**
* @class Row
* @extends Ember.ObjectProxy
* @namespace SemanticUI
*/
const Row = ObjectProxy.extend({
/**
* Whether the row is currently selected.
*
* @property selected
* @type Boolean
* @default false
... | import ObjectProxy from '@ember/object/proxy';
import { assign } from '@ember/polyfills';
/**
* @class Row
* @extends Ember.ObjectProxy
* @namespace SemanticUI
*/
const Row = ObjectProxy.extend({
/**
* Whether the row is currently selected.
*
* @property selected
* @type Boolean
* @default false
... | Replace usage of merge with assign | Replace usage of merge with assign
| JavaScript | mit | quantosobra/ember-semantic-ui-table,quantosobra/ember-semantic-ui-table |
43646a6e0b8503ed8a6422037d25614a738b94e6 | addon/errors/load.js | addon/errors/load.js | /**
* A simple Error type to represent an error that occured while loading a
* resource.
*
* @class LoadError
* @extends Error
*/
export default class LoadError extends Error {
/**
* Constructs a new LoadError with a supplied error message and an instance
* of the AssetLoader service to use when retrying ... | function ExtendBuiltin(klass) {
function ExtendableBuiltin() {
klass.apply(this, arguments);
}
ExtendableBuiltin.prototype = Object.create(klass.prototype);
ExtendableBuiltin.prototype.constructor = ExtendableBuiltin;
return ExtendableBuiltin;
}
/**
* A simple Error type to represent an error that occu... | Make it possible to extend from `Error` in Babel 6. | Make it possible to extend from `Error` in Babel 6.
| JavaScript | mit | ember-engines/ember-asset-loader,trentmwillis/ember-asset-loader,trentmwillis/ember-asset-loader,trentmwillis/ember-asset-loader,ember-engines/ember-asset-loader,ember-engines/ember-asset-loader |
6d78bdca94ff5e35edf2e09e228ad534c57008c6 | public/dist/js/voter-login.js | public/dist/js/voter-login.js | $(document).ready(function() {
$('#voterloginbox').submit(function(event) {
var formData = {
'voter_token' : $('input[name=voter_token]').val(),
'_csrf' : $('input[name=_csrf]').val(),
'g-recaptcha-response' : $('textarea[name=g-recaptcha-response]... | $(document).ready(function() {
$("#voter_token").keyup(function(event){
if(event.keyCode == 13){
$("#next_btn").click();
}
});
$('#voterloginbox').submit(function(event) {
var formData = {
'voter_token' : $('input[name=voter_token]').val(),
... | Test out having enter press bring up modal | Test out having enter press bring up modal | JavaScript | agpl-3.0 | WireShoutLLC/votehaus,WireShoutLLC/votehaus,WireShoutLLC/votehaus,WireShoutLLC/votehaus |
63fc607d48bf8e5439e6addc1cf3fc45adb444d4 | fp.js | fp.js | module.exports = {
"extends": [
"./index.js",
],
plugins: ["fp"],
rules: {
"fp/no-arguments": "error",
"fp/no-class": "warn",
"fp/no-delete": "error",
"fp/no-events": "error",
"fp/no-get-set": "error",
"fp/no-let": "error",
"fp/no-loops": "error",
"fp/no-mutating-assign": "... | module.exports = {
"extends": [
"./index.js",
],
plugins: ["fp"],
rules: {
"fp/no-arguments": "error",
"fp/no-class": "warn",
"fp/no-delete": "error",
"fp/no-events": "error",
"fp/no-get-set": "error",
"fp/no-let": "error",
"fp/no-loops": "error",
"fp/no-mutating-assign": "... | Add a warning for sorting keys | Add a warning for sorting keys
| JavaScript | mit | momentumft/eslint-config-momentumft |
540ec2d5e090e0e9740e00c90d4b4fd9ff09ca55 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... | Add jquery ui to app.js | Add jquery ui to app.js
| JavaScript | mit | dma315/ambrosia,dma315/ambrosia,dma315/ambrosia |
82322ac222c9a0c6b3534270d38f063a3c67cf50 | addon/change-gate.js | addon/change-gate.js | import Em from 'ember';
let get = Em.get;
let defaultFilter = function(value) { return value; };
export default function(dependentKey, filter) {
filter = filter || defaultFilter;
let computed = Em.computed(function handler(key) {
let lastValueKey = `__changeGate${key}LastValue`;
let isFirstRun = !this.h... | import Em from 'ember';
let get = Em.get;
let defaultFilter = function(value) { return value; };
export default function(dependentKey, filter) {
filter = filter || defaultFilter;
let computed = Em.computed(function handler(key) {
let lastValueKey = `__changeGate${key}LastValue`;
let isFirstRun = !this.h... | Use Ember.isEqual instead of direct equality | Use Ember.isEqual instead of direct equality | JavaScript | mit | GavinJoyce/ember-computed-change-gate,givanse/ember-computed-change-gate,GavinJoyce/ember-computed-change-gate,givanse/ember-computed-change-gate |
fd1c12db210589a285b5917353e40714ca23e4b2 | app/models/league.js | app/models/league.js | import CoreObject from 'fantasy-weather/models/_core/core-object';
import Team from 'fantasy-weather/models/team';
let League = CoreObject.extend({
// Set defaults and stub out properties
_defaults() {
return {
name: "",
teams: []
};
},
addTeam(team) {
let teams = this.get('teams');
... | import CoreObject from 'fantasy-weather/models/_core/core-object';
import Team from 'fantasy-weather/models/team';
let League = CoreObject.extend({
// Set defaults and stub out properties
_defaults() {
return {
name: "",
teams: []
};
},
addTeam(team) {
let teams = this.get('teams');
... | Add methods to find team/stadium by abbreviation | Add methods to find team/stadium by abbreviation
| JavaScript | mit | rjhilgefort/nfl-weather,rjhilgefort/nfl-weather,rjhilgefort/nfl-weather |
ad65d3a5d5419132635f188e90b3aa4e25626064 | scripts/assertion-messages.js | scripts/assertion-messages.js | #!/usr/bin/env node
var recast = require('recast');
var messages = require('./transform/messages');
var exec = require('child_process').exec;
var fs = require('fs');
var glob = require('glob');
var usage = [
'Usage: assertion-messages.js "globbing expression"',
'To generate assertion messages for a set of test files,... | #!/usr/bin/env node
var recast = require('recast');
var messages = require('./transform/messages');
var exec = require('child_process').exec;
var fs = require('fs');
var glob = require('glob');
var usage = [
'Usage: assertion-messages.js "globbing expression"',
'To generate assertion messages for a set of test files,... | Allow script to be invoke from any directory | Allow script to be invoke from any directory
| JavaScript | mit | bocoup/test262-v8-machinery,bocoup/test262-v8-machinery |
d6e3cdc458867d1aa90197b1b8b9a10ce65b9118 | src/MentionMenu.js | src/MentionMenu.js | import React from "react";
import portal from "react-portal-hoc";
const MentionMenu = props => {
const {
active,
className,
item: Item,
options,
top,
left,
hoverItem,
selectItem,
style = {}
} = props;
const menuStyle = {
...style,
left,
top,
position: "absolute... | import React from "react";
import portal from "react-portal-hoc";
class MentionMenu extends React.Component {
constructor(props) {
super(props);
this.state = {
left: props.left,
top: props.top
};
}
componentWillReceiveProps(nextProps) {
if (nextProps.left != this.state.left || nextPro... | Improve menu positioning to keep it from going off screen | Improve menu positioning to keep it from going off screen
tries to keep the menu from going off the bottom or right of screen | JavaScript | mit | mattkrick/react-githubish-mentions |
23557892e740c28ea38304874636b3295e99a68c | test/scripts/cli.js | test/scripts/cli.js | 'use strict';
var opbeat = require('../../');
var inquirer = require('inquirer');
var questions = [
{ name: 'app_id', message: 'App ID' },
{ name: 'organization_id', message: 'Organization ID' },
{ name: 'secret_token', message: 'Secret token' }
];
var test = function (options) {
options.env = 'production';
... | 'use strict';
var opbeat = require('../../');
var inquirer = require('inquirer');
var questions = [
{ name: 'app_id', message: 'App ID' },
{ name: 'organization_id', message: 'Organization ID' },
{ name: 'secret_token', message: 'Secret token' }
];
var test = function (options) {
options.env = 'production';
... | Improve error names when running integration test | Improve error names when running integration test
| JavaScript | bsd-2-clause | opbeat/opbeat-node,driftyco/opbeat-node,opbeat/opbeat-node |
428785e0bbcb9b61b87eddf79e76e04d896be710 | src/Components/pages/Index.js | src/Components/pages/Index.js | import React, { Component } from 'react'
import { Link } from 'react-router'
import Header from 'Components/Header'
import Footer from 'Components/Footer'
import zhcn from '../../../intl/zh-cn'
import en from '../../../intl/en'
import 'styles/pages/index.scss'
const format = (locale) => {
return (key) => {
let ... | import React, { Component } from 'react'
import { Link } from 'react-router'
import Header from 'Components/Header'
import Footer from 'Components/Footer'
import zhcn from '../../../intl/zh-cn'
import en from '../../../intl/en'
import 'styles/pages/index.scss'
const format = (locale) => {
return (key) => {
let ... | Fix redirect when switch language. | Fix redirect when switch language.
| JavaScript | mit | jsconfcn/ningjs,jsconfcn/ningjs |
e9e8eb0a238a641c190f200b684fb3549b5a276d | src/objects/mob.js | src/objects/mob.js | // namespace
var App = App || {};
App.Mob = (function () {
"use strict";
var fn = function (game, username, x, y) {
Phaser.Sprite.call(this, game, x, y, 'alienBlue');
this.game.physics.arcade.enable(this);
this.frame = 0;
this.scale.setTo(.7, .7);
this.animations.add('r... | // namespace
var App = App || {};
App.Mob = (function () {
"use strict";
var fn = function (game, username, x, y) {
Phaser.Sprite.call(this, game, x, y, 'alienBlue');
this.game.physics.arcade.enable(this);
this.frame = 0;
this.scale.setTo(.7, .7);
this.animations.add('r... | Add arcade.collide logic to App.Mob objects. | Add arcade.collide logic to App.Mob objects.
| JavaScript | mit | hookbot/multi-player,hookbot/multi-player |
f9331ee186f212290d771fb10e45e1628b89b49f | species-explorer/app/services/species.service.js | species-explorer/app/services/species.service.js | /* global angular */
angular
.module('speciesApp')
.factory('SpeciesService', [
'API_BASE_URL',
'$resource',
SpeciesService
])
function SpeciesService (API_BASE_URL, $resource) {
return $resource(
API_BASE_URL,
null,
{
getKingdoms: {
method: 'GET',
isArray: false,... | /* global angular */
angular
.module('speciesApp')
.factory('SpeciesService', [
'API_BASE_URL',
'$resource',
SpeciesService
])
function SpeciesService (API_BASE_URL, $resource) {
return $resource(
API_BASE_URL,
null,
{
getKingdoms: {
method: 'GET',
isArray: false,... | Add an action to get species by family | Add an action to get species by family
| JavaScript | mit | stivaliserna/scripts,stivaliserna/scripts |
9b31522d4d65b8f1b0e8b0133914b9059bd81787 | src/constants/action_types.js | src/constants/action_types.js | export const START_DATE_CHANGE = 'START_DATE_CHANGE';
export const END_DATE_CHANGE = 'END_DATE_CHANGE';
export const FILTER_BY_AREA = 'FILTER_BY_AREA';
export const FILTER_BY_IDENTIFIER = 'FILTER_BY_IDENTIFIER';
export const FILTER_BY_TYPE_INJURY = 'FILTER_BY_TYPE_INJURY';
export const FILTER_BY_TYPE_FATALITY = 'FILT... | export const START_DATE_CHANGE = 'START_DATE_CHANGE';
export const END_DATE_CHANGE = 'END_DATE_CHANGE';
export const FILTER_BY_AREA = 'FILTER_BY_AREA';
export const FILTER_BY_IDENTIFIER = 'FILTER_BY_IDENTIFIER';
export const FILTER_BY_TYPE_INJURY = 'FILTER_BY_TYPE_INJURY';
export const FILTER_BY_TYPE_FATALITY = 'FILT... | Fix typo in action types for filter by type fatality | Fix typo in action types for filter by type fatality
| JavaScript | mit | clhenrick/nyc-crash-mapper,clhenrick/nyc-crash-mapper,clhenrick/nyc-crash-mapper |
086b7eafeefb761f3883b9eeccb231152dfdbda0 | src/filters/filter-builder.js | src/filters/filter-builder.js | import { cloneDeep } from 'lodash'
import filters from './index'
import { boolMerge } from '../utils'
export default class FilterBuilder {
constructor () {
this._filters = {}
}
/**
* Apply a filter of a given type providing all the necessary arguments,
* passing these arguments directly to the specifie... | import { cloneDeep } from 'lodash'
import filters from './index'
import { boolMerge } from '../utils'
export default class FilterBuilder {
constructor () {
this._filters = {}
}
/**
* Apply a filter of a given type providing all the necessary arguments,
* passing these arguments directly to the specifie... | Annotate jsdoc for FilterBuilder class as private | Annotate jsdoc for FilterBuilder class as private
| JavaScript | mit | node-packages/bodybuilder,node-packages/bodybuilder,ShareIQ/bodybuilder,ShareIQ/bodybuilder,danpaz/bodybuilder,danpaz/bodybuilder,danpaz/bodybuilder |
d6f71748d574a0d8d00de034328224d0c28e6b22 | src/gfx/modes/LicoriceMode.js | src/gfx/modes/LicoriceMode.js | /* eslint-disable no-magic-numbers */
import LabeledMode from './LabeledMode';
class LicoriceMode extends LabeledMode {
static id = 'LC';
constructor(opts) {
super(opts);
}
calcAtomRadius(_atom) {
return this.opts.bond;
}
calcStickRadius() {
return this.opts.bond;
}
calcSpaceFraction() {... | /* eslint-disable no-magic-numbers */
import LabeledMode from './LabeledMode';
class LicoriceMode extends LabeledMode {
static id = 'LC';
constructor(opts) {
super(opts);
}
calcAtomRadius(_atom) {
return this.opts.bond;
}
calcStickRadius() {
return this.opts.bond;
}
calcSpaceFraction() {... | Fix typo in Licorice Mode name assignment | Fix typo in Licorice Mode name assignment
| JavaScript | mit | epam/miew,epam/miew,epam/miew,epam/miew,epam/miew |
cb20cbe08c0e52613124e18ec8991a216949a11b | Resources/public/js/emails.js | Resources/public/js/emails.js | jQuery(document).ready(function () {
jQuery('#add-another-email').click(function () {
var emailList = jQuery('#email-fields-list');
var newWidget = emailList.attr('data-prototype');
newWidget = newWidget.replace(/__name__/g, emailCount);
emailCount++;
var newDiv = jQuery('<di... | $(document).ready(function () {
$('#add-another-email').click(function () {
var emailList = $('#email-fields-list');
var newWidget = emailList.attr('data-prototype');
newWidget = newWidget.replace(/__name__/g, emailCount);
emailCount++;
var newDiv = $('<div></div>').html(newW... | Add design to email collection | BAP-251: Add design to email collection
| JavaScript | mit | geoffroycochard/platform,orocrm/platform,umpirsky/platform,trustify/oroplatform,hugeval/platform,mszajner/platform,akeneo/platform,Djamy/platform,northdakota/platform,2ndkauboy/platform,morontt/platform,ramunasd/platform,trustify/oroplatform,umpirsky/platform,hugeval/platform,akeneo/platform,hugeval/platform,northdakot... |
2c62380798476a22bbb50dd7780fbf4f24e02b5c | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
options: {
includePaths: ['app/bower_components/foundation/scss']
},
dist: {
options: {
outputStyle: 'default'
},
files: {
'app/app.css... | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
options: {
includePaths: ['app/bower_components/foundation/scss']
},
dist: {
options: {
outputStyle: 'default'
},
files: {
'app/app.css... | Exclude testing files from deploy | Exclude testing files from deploy
| JavaScript | mit | regdoug/solartime |
ac7fa80dbd84e31a06dc99a65e268de7c69e0924 | Gruntfile.js | Gruntfile.js | module.exports = function( grunt ) {
"use strict";
grunt.initConfig({
bump: {
options: {
files: [ "package.json" ],
// Commit
commit: true,
commitMessage: "Release v%VERSION%",
commitFiles: [ "package.json" ],
... | module.exports = function( grunt ) {
"use strict";
grunt.initConfig({
bump: {
options: {
files: [ "package.json" ],
// Commit
commit: true,
commitMessage: "Release v%VERSION%",
commitFiles: [ "package.json" ],
... | Simplify definition of jscs task | Simplify definition of jscs task
| JavaScript | mit | markelog/grunt-checker,jscs-dev/grunt-jscs,BridgeAR/grunt-jscs |
1dfe8b60b598e9f1ed87f1087c1a43a49d57dbe0 | postcss.config.js | postcss.config.js | /* eslint global-require:0 */
module.exports = {
map: { inline: true },
plugins: [
require('postcss-custom-properties')({
importFrom: 'src/css/00_variables.css'
}),
]
};
| /* eslint global-require:0 */
module.exports = {
map: { inline: true },
plugins: [
require('postcss-custom-properties')({
preserve: false,
importFrom: 'src/css/00_variables.css'
}),
]
};
| Add preserve: false to dev as well | Add preserve: false to dev as well
| JavaScript | mit | frippz/frippz.se,frippz/frippz.se,frippz/frippz.se |
470860f96e1b2b2c866d41690ae9769ad30f89a7 | Themeleon.js | Themeleon.js | 'use strict';
var path = require('path');
/**
* Themeleon helper constructor.
*
* See the functions from `factory.js` for variables signification.
*
* This constructor has an empty prototype (except the `use` method) since
* Themeleon works only with mixins. There's a main mixin in `main.js`
* containing the b... | 'use strict';
var fs = require('fs');
var path = require('path');
var q = require('q');
var mkdir = q.denodeify(fs.mkdir);
/**
* Themeleon helper constructor.
*
* See the functions from `factory.js` for variables signification.
*
* This constructor has an empty prototype (except the `use` method) since
* Theme... | Create destination directory if not exists | Create destination directory if not exists
| JavaScript | unlicense | themeleon/themeleon,themeleon/themeleon |
bac5bacb594b772b07f42ce321626337c19dde0b | TrackAnnot/app/view/Viewport.js | TrackAnnot/app/view/Viewport.js | Ext.define('TrackAnnot.view.Viewport', {
renderTo: Ext.getBody(),
extend: 'Ext.container.Viewport',
items: [{
xtype: 'toolbar',
items: [{
text: 'Metrics',
menu: {
xtype: 'menu',
items: [{
text: 'Video',
checked: false
}, {
... | Ext.define('TrackAnnot.view.Viewport', {
renderTo: Ext.getBody(),
extend: 'Ext.container.Viewport',
items: [{
xtype: 'toolbar',
items: ['<b>A</b>nnotation <b>M</b>ovement <b>A</b>ccelerometer', {
text: 'Metrics',
menu: {
xtype: 'menu',
items: [{
... | Add placeholders for new metrics. | Add placeholders for new metrics.
| JavaScript | apache-2.0 | NLeSC/eEcology-Annotation-UI,NLeSC/eEcology-Annotation-UI,NLeSC/eEcology-Annotation-UI |
3501a2a8868b0e2c9594555de00d2ed6279696d1 | app/data/bookshelf/migrate.js | app/data/bookshelf/migrate.js | import Knex from 'knex';
import config from '../../config/config.json';
const knex = Knex.initialize(config.bookshelf.postgresql);
export default function () {
knex.migrate.latest(config.bookshelf.migrations)
.then(function () {
knex.destroy();
});
}
| import Knex from 'knex';
import config from '../../config/config.json';
const knex = Knex(config.bookshelf.postgresql);
export default function () {
knex.migrate.latest(config.bookshelf.migrations)
.then(function () {
knex.destroy();
});
}
| Stop using the deprecated knex.initialize | Stop using the deprecated knex.initialize
| JavaScript | mit | wellsam/nerd,Xantier/nerd-stack,Xantier/nerd-stack,wellsam/nerd,isp1r0/nerd-stack,isp1r0/nerd-stack |
1a93325776c6ae619d85239a0336cb06d40682fb | conkeror/bindings.js | conkeror/bindings.js | define_key(text_keymap, "C-w", "cmd_deleteWordBackward");
define_key(content_buffer_normal_keymap, "c", "copy", $browser_object = browser_object_dom_node);
| function history_clear () {
var history = Cc["@mozilla.org/browser/nav-history-service;1"]
.getService(Ci.nsIBrowserHistory);
history.removeAllPages();
}
interactive("history-clear", "Clear the history.", history_clear);
define_key(text_keymap, "C-w", "cmd_deleteWordBackward");
define_key(content_buffer_norm... | Add a history-clear function to conkeror | Add a history-clear function to conkeror
| JavaScript | bsd-3-clause | pjones/emacsrc |
04cf346847f0472555407997f5167cf233ba6e0e | cli.js | cli.js | #!/usr/bin/env node
'use strict';
var assertSchema = require('./index');
var yargs = require('yargs');
var opts = yargs
.demand(1)
.usage(
'Usage: $0 [ -d database url ] <schema>\n' +
'Asserts the existence of schema, creating it if necessary'
)
.option('d', {
alias: 'database_url',
type: 'st... | #!/usr/bin/env node
'use strict';
var assertSchema = require('./index');
var yargs = require('yargs');
var opts = yargs
.demand(1)
.usage(
'Usage: $0 [ -d database url ] <schema>\n' +
'Asserts the existence of schema, creating it if necessary'
)
.option('d', {
alias: 'database_url',
type: 'st... | Allow DATABASE_URL to override passed option | Allow DATABASE_URL to override passed option
| JavaScript | mit | apechimp/node-pg-assert-schema |
520e87c145d4b659affd67936ea9cd86d4e100ee | app/index.js | app/index.js |
var util = require('util'),
yeoman = require('yeoman-generator');
// mocha:app generator
//
// Setup the test/ directory.
//
module.exports = Generator;
function Generator(args, options, config) {
yeoman.generators.Base.apply(this, arguments);
this.option('assert-framework', {
type: String,
defaults... | 'use strict';
// mocha:app generator
//
// Sets up the test/ directory
//
var Generator = module.exports = function (args, options) {
this.option('assert-framework', {
type: String,
defaults: 'chai',
desc: 'Choose your prefered assertion library'
});
this.option('assert-style', {
desc: 'Choose th... | Convert generator to the simple format | Convert generator to the simple format
| JavaScript | bsd-2-clause | yeoman/generator-mocha,yeoman/generator-mocha |
17aab292abe123e4812a09c41e3a68762213f432 | src/victory-primitives/box.js | src/victory-primitives/box.js | import React from "react";
import PropTypes from "prop-types";
import { assign } from "lodash";
import CommonProps from "./common-props";
export default class Box extends React.Component {
static propTypes = {
...CommonProps,
groupComponent: PropTypes.element,
horizontal: PropTypes.bool,
width: PropT... | import React from "react";
import PropTypes from "prop-types";
import { assign } from "lodash";
import CommonProps from "./common-props";
export default class Box extends React.Component {
static propTypes = {
...CommonProps,
groupComponent: PropTypes.element,
height: PropTypes.number,
width: PropTyp... | Add missing height prop to PropTypes. | Add missing height prop to PropTypes.
| JavaScript | mit | FormidableLabs/victory-core,FormidableLabs/victory-core |
b4c12ea5777db86718f7bcbf17836e53070f7ed8 | lib/ember-addon.js | lib/ember-addon.js | var path = require('path');
var fs = require('fs');
var mergeTrees = require('broccoli-merge-trees');
var manifest = require('./manifest');
module.exports = {
name: 'broccoli-manifest',
initializeOptions: function() {
var defaultOptions = {
enabled: this.app.env === 'production',
appcacheFile: "... | var path = require('path');
var fs = require('fs');
var mergeTrees = require('broccoli-merge-trees');
var fileRemover = require('broccoli-file-remover');
var manifest = require('./manifest');
module.exports = {
name: 'broccoli-manifest',
initializeOptions: function() {
var defaultOptions = {
enabled: ... | Exclude index.html and tests from manifest | Exclude index.html and tests from manifest | JavaScript | mit | racido/broccoli-manifest,arenoir/broccoli-manifest,nybblr/broccoli-manifest,matthewlehner/broccoli-manifest |
97fa03ff3bf49d09cbd774fc9846b3298d11b2f2 | scripts/chris.js | scripts/chris.js | var audio = document.getElementById("chris");
function pauseChris() {
audio.pause();
}
function playChris() {
audio.currentTime = 952;
audio.play();
setTimeout(pauseChris, 331000);
}
function addChrisButton() {
var div = document.getElementById("audioContainer");
var button = document.createElement("BUTTON");
... | var audio = document.getElementById("chris");
function pauseChris() {
if (audio.currentTime >= 331000) {
audio.pause();
}
}
function playChris() {
audio.currentTime = 952;
audio.play();
var interval = setInterval(pauseChris, 1000);
}
function clearInterval() {
clearInterval(interval)
}
function addChrisButt... | Use interval in Chris button | Use interval in Chris button
| JavaScript | mit | nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io |
2609a05dec6e32991e1375ad7991e17dae9d262b | server-config.js | server-config.js | module.exports = {
port: 3000,
internalClientPort: 3001,
authKey: 'ASDASD'
};
| const fs = require('fs');
module.exports = {
port: 3000,
internalClientPort: 3001,
authKey: process.env.AUTH_KEY || fs.readFileSync('/run/secrets/authkey', { encoding: 'utf-8' }).trim()
};
| Make server auth key configurable | Make server auth key configurable
Can be provided with an env var or with a Docker secret named "authkey".
| JavaScript | mit | mikko/CentralIntelligence-server |
72360c8d6f8c868c9ea88f5f9018e7ff01ad3fb9 | lib/methods/raw.js | lib/methods/raw.js | "use strict";
var Base = require('../base')
/**
* @function raw converts the Base object into a normal javascript wObject, removing internal properties.
* It also converts nested objects and rebuilds arrays from objects with nothing but integer keys.
* @memberOf Base#
* @param {object} [options]
* @param {bool... | "use strict";
var Base = require('../base')
var isLikeNumber =require('../util').isLikeNumber
/**
* @function raw converts the Base object into a normal javascript wObject, removing internal properties.
* It also converts nested objects and rebuilds arrays from objects with nothing but integer keys.
* @memberOf Bas... | Use `!util/isLikeNumber(key)` instead of `key.match(/\D/)` | Use `!util/isLikeNumber(key)` instead of `key.match(/\D/)`
| JavaScript | isc | vigour-io/vjs |
f9421ab35aecdede1ca8454e231043e9f94edba6 | server/config.js | server/config.js | path = require('path');
module.exports = {
mongo: {
dbUrl: 'https://api.mongolab.com/api/1', // The base url of the MongoLab DB server
apiKey: 'gubV4zs5yN-ItUUQDpgUx0pUA98K3MYH', // Our MongoLab API key
dbPath: 'mongodb://root:4DaysKillerDemo@ds029979.mongolab.com:29979/paymymeeting'... | path = require('path');
module.exports = {
mongo: {
dbUrl: 'https://api.mongolab.com/api/1', // The base url of the MongoLab DB server
apiKey: 'gubV4zs5yN-ItUUQDpgUx0pUA98K3MYH', // Our MongoLab API key
//dbPath: 'mongodb://root:4DaysKillerDemo@ds029979.mongolab.com:29979/paymymeetin... | Add localhost path for MongoDB | Add localhost path for MongoDB
| JavaScript | mit | PythagoreLab/PayMyMeeting |
8848878d6341abee73b0afcd6670988aeb37ad58 | index.js | index.js | var clientio = require("socket.io-client");
var client = clientio.connect(process.env.HOST + ":" + process.env.PORT);
var Gpio = require("onoff").Gpio;
var slot = {}
slot.led1 = new Gpio(14, "out");
client.emit("join-end");
client.on("command", function(data){
console.log("change " + data.key + " status to : " + ... | var clientio = require("socket.io-client");
var hostname = process.env.HOST || "localhost";
var port = process.env.PORT || 3001;
var client = clientio.connect(host + ":" + port.toString());
var Gpio = require("onoff").Gpio;
var slot = {}
slot.led1 = new Gpio(14, "out");
client.emit("join-end");
client.on("command", ... | Fix typo, optional condition for hostname & port | Fix typo, optional condition for hostname & port
| JavaScript | mit | herpiko/nf-iot-end |
fed7876c125287523fed18c0053f5d4456cacdbd | source/Divider.js | source/Divider.js | (function (enyo, scope) {
/**
* {@link moon.Divider} is a simply styled component that may be used as a separator
* between groups of components.
*
* @class moon.Divider
* @mixes moon.MarqueeSupport
* @mixes moon.MarqueeItem
* @ui
* @public
*/
enyo.kind(
/** @lends moon.Divider.prototype */ {
/**
* @p... | (function (enyo, scope) {
/**
* {@link moon.Divider} is a simply styled component that may be used as a separator
* between groups of components.
*
* @class moon.Divider
* @mixes moon.MarqueeSupport
* @mixes moon.MarqueeItem
* @ui
* @public
*/
enyo.kind(
/** @lends moon.Divider.prototype */ {
/**
* @p... | Set content property before DOM is updated. | BHV-12598: Set content property before DOM is updated.
Enyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>
| JavaScript | apache-2.0 | enyojs/moonstone,mcanthony/moonstone,mcanthony/moonstone,mcanthony/moonstone |
ad43d8c6a4c83b67b5ca95edbf9093bc89e16882 | client/webpack.base.config.js | client/webpack.base.config.js | const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
inject: 'true',
template: 'app/index.html'
});
const extractLess = new ExtractTextPlugin({
filename: "... | const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
inject: 'true',
template: 'app/index.html'
});
const extractLess = new ExtractTextPlugin({
filename: "... | Make webpack dev server work for nested route paths. | Make webpack dev server work for nested route paths.
| JavaScript | mit | katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming |
f22d12a06b8b90506f2ad6bbaf165948df145f60 | src/js/weapon.js | src/js/weapon.js | (function() {
'use strict';
function Weapon(game, x, y, coolDown, bulletSpeed, bullets, damage) {
this.game = game;
this.x = x;
this.y = y;
this.coolDown = coolDown;
this.nextFire = 0;
this.bullets = bullets;
this.bulletSpeed = bulletSpeed;
this.damage = damage;
}
Weapon.protot... | (function() {
'use strict';
function Weapon(game, x, y, coolDown, bulletSpeed, bullets, damage) {
this.game = game;
this.x = x;
this.y = y;
this.coolDown = coolDown;
this.nextFire = 0;
this.bullets = bullets;
this.bulletSpeed = bulletSpeed;
this.damage = damage;
}
Weapon.protot... | Make fire take coordinates, add function for aiming | Make fire take coordinates, add function for aiming
| JavaScript | mit | werme/DATX02 |
36b0096973cbcdfb00aa5f2562d075a70df6e4a0 | src/background.js | src/background.js | 'use strict';
chrome.app.runtime.onLaunched.addListener(function() {
chrome.runtime.getPlatformInfo(function(info) {
// don't render statusbar over app UI on iOS
if (info.os === 'cordova-ios' && window.StatusBar) {
window.StatusBar.overlaysWebView(false);
}
// open chr... | 'use strict';
chrome.app.runtime.onLaunched.addListener(function() {
chrome.runtime.getPlatformInfo(function(info) {
// don't render statusbar over app UI on iOS
if (info.os === 'cordova-ios' && window.StatusBar) {
window.StatusBar.overlaysWebView(false);
}
// open chr... | Add id to chrome.window api to remember position and size | Add id to chrome.window api to remember position and size
| JavaScript | mit | clochix/mail-html5,halitalf/mail-html5,sheafferusa/mail-html5,sheafferusa/mail-html5,b-deng/mail-html5,whiteout-io/mail-html5,b-deng/mail-html5,whiteout-io/mail,halitalf/mail-html5,clochix/mail-html5,whiteout-io/mail,kalatestimine/mail-html5,tanx/hoodiecrow,sheafferusa/mail-html5,whiteout-io/mail-html5,whiteout-io/mail... |
fcf75a1589637715c76accbcfc7bb6dd9605ed31 | src/background.js | src/background.js | 'use strict';
function createTask(chrome, title, note) {
let task = 'twodo://x-callback-url/add?task=' + encodeURI(title) + '¬e=' + encodeURI(note);
chrome.tabs.update({
url: task
});
}
chrome.browserAction.onClicked.addListener(function(aTab) {
chrome.tabs.executeScript(aTab.id, {
code: "window.get... | 'use strict';
function createTask(chrome, title, note, url) {
let task = 'twodo://x-callback-url/add?task=' + encodeURI(title) + '¬e=' + encodeURI(note) + '&action=url:' + encodeURI(url);
chrome.tabs.update({
url: task
});
}
chrome.browserAction.onClicked.addListener(function(aTab) {
chrome.tabs.executeS... | Set URL action in newly created 2Do Task | Set URL action in newly created 2Do Task
Still add any selected text as a note, but use the current tab's URL as the
2Do action instead.
| JavaScript | mit | mkleucker/2do-webextension |
79b6179285a28efaad30ba45648a0a871e598324 | esnext.js | esnext.js | 'use strict';
const path = require('path');
module.exports = {
extends: path.join(__dirname, 'index.js'),
rules: {
'no-var': 'error',
'object-shorthand': [
'error',
'always'
],
'prefer-arrow-callback': [
'error',
{
allowNamedFunctions: true
}
],
'prefer-const': [
'error',
{
d... | 'use strict';
const path = require('path');
module.exports = {
extends: path.join(__dirname, 'index.js'),
rules: {
'no-var': 'error',
'object-shorthand': [
'error',
'always'
],
'prefer-arrow-callback': [
'error',
{
allowNamedFunctions: true
}
],
'prefer-const': [
'error',
{
d... | Disable the `prefer-named-capture-group` rule temporarily | Disable the `prefer-named-capture-group` rule temporarily
| JavaScript | mit | sindresorhus/eslint-config-xo |
c3aeac1fd9568ea064f88e92cf16425ba7050f1b | test/app.spec.js | test/app.spec.js | 'use strict';
var expect = require('chai').expect;
var App = require('../app/scripts/app');
describe('app', function () {
it('should initialize app with no arguments', function () {
var app = new App();
expect(app).to.have.property('variables');
expect(app.variables).to.have.length(2);
expect(app).... | 'use strict';
var expect = require('chai').expect;
var App = require('../app/scripts/app');
describe('app', function () {
it('should initialize app with no arguments', function () {
var app = new App();
expect(app).to.have.property('variables');
expect(app.variables).to.have.length(2);
expect(app).... | Add test for initializing app with arguments | Add test for initializing app with arguments
| JavaScript | mit | caleb531/truthy,caleb531/truthy |
e0d8b2aa93bf72a99893e6aaccb8dfbb23085dc2 | components/ProgramLine/index.js | components/ProgramLine/index.js | import React from 'react'
import PropTypes from 'prop-types'
import Moment from 'react-moment'
import Link from 'next/link'
import generateUrl from 'utils/urlGenerator'
import EditButton from 'containers/EditButton'
import stylesheet from './style.scss'
const ProgramLine = (props) => (
<div className='program-line... | import React from 'react'
import PropTypes from 'prop-types'
import Moment from 'react-moment'
import Link from 'next/link'
import Head from 'next/head'
import generateUrl from 'utils/urlGenerator'
import EditButton from 'containers/EditButton'
import stylesheet from './style.scss'
const ProgramLine = (props) => (
... | Move ProgramLine style into head | Move ProgramLine style into head
| JavaScript | mit | bmagic/acdh-client |
4fe711dc8b18d93b711b5872f92593c37dfe9d7c | static/js/chat.js | static/js/chat.js | "use strict";
function Chat (p_session) {
var _session;
var self = this;
this._queue = [];
this.initialize = function (p_session) {
// register chat to session
p_session.register_chat(self);
// attach submit event
$("#send-message-form").submit(function(event){
... | "use strict";
function Chat (p_session) {
var _session;
var self = this;
this._queue = [];
this.initialize = function (p_session) {
// register chat to session
p_session.register_chat(self);
// initialize list of users for the send message form
if (0 < p_session.othe... | Initialize the select element for sending a message. | Initialize the select element for sending a message.
| JavaScript | agpl-3.0 | mose/poietic-generator,mose/poietic-generator,mose/poietic-generator |
f284b16e5bb43deb3f00a947d5515b515162cfcf | test/rpc-spec.js | test/rpc-spec.js | var assert = require('assert');
var producer = require('../index')().producer;
var consumer = require('../index')().consumer;
var uuid = require('node-uuid');
var fixtures = {
queues: ['test-queue-0']
};
describe('Producer/Consumer RPC messaging:', function() {
before(function (done) {
return consumer.connect... | var assert = require('assert');
var producer = require('../index')().producer;
var consumer = require('../index')().consumer;
var uuid = require('node-uuid');
var fixtures = {
queues: ['rpc-queue-0']
};
describe('Producer/Consumer RPC messaging:', function() {
before(function (done) {
return consumer.connect(... | Rename rpc test queue and change rpc message | Rename rpc test queue and change rpc message
| JavaScript | mit | dial-once/node-bunnymq |
78ad3613e02ed2ab7c848d33d6ff9ad40a0789ff | client/scripts/sw.js | client/scripts/sw.js | const toolbox = require('sw-toolbox');
// Try network but fallback to cache
toolbox.router.default = toolbox.networkFirst;
// Data should query the network first
toolbox.router.any('/api/*', toolbox.networkOnly);
// Data should query the network first
toolbox.router.any('/auth/*', toolbox.networkOnly);
| import {router} from 'sw-toolbox';
// Try network but fallback to cache
router.default = toolbox.networkFirst;
// Data should query the network first
router.any('/api/*', toolbox.networkOnly);
// Data should query the network first
router.any('/auth/*', toolbox.networkOnly);
| Use import rather than require | Use import rather than require
| JavaScript | mit | AdaRoseEdwards/81,AdaRoseEdwards/81,AdaRoseEdwards/81 |
74bd38f424fbdea30488ab5ef33afe5036be6018 | script/mylowyat.user.js | script/mylowyat.user.js | // ==UserScript==
// @author sk3dsu(Fadli Ishak)
// @name MyLowyat
// @version 0.2.1
// @description Removing some elements of the forum to be a bit cleaner for SFW.
// @namespace https://github.com/mfadliishak/lowyatAvatars
// @icon https://forum.lowyat.net/favicon.ico
// @ma... | // ==UserScript==
// @author sk3dsu(Fadli Ishak)
// @name MyLowyat
// @version 0.2.2
// @description Removing some elements of the forum to be a bit cleaner for SFW.
// @namespace https://github.com/mfadliishak/lowyatAvatars
// @icon https://forum.lowyat.net/favicon.ico
// @ma... | Fix Remove banner still showing, use inline css instead. | Fix Remove banner still showing, use inline css instead.
| JavaScript | mit | mfadliishak/mylowyat |
22f41b9cfcf10af245b9bb185d9eb04c2fa82da6 | lib/rules/space-after-comma.js | lib/rules/space-after-comma.js | 'use strict';
var helpers = require('../helpers');
module.exports = {
'name': 'space-after-comma',
'defaults': {
'include': true
},
'detect': function (ast, parser) {
var result = [];
ast.traverseByTypes(['operator', 'delimiter'], function (operator, i, parent) {
var next;
if (operat... | 'use strict';
var helpers = require('../helpers');
module.exports = {
'name': 'space-after-comma',
'defaults': {
'include': true
},
'detect': function (ast, parser) {
var result = [];
ast.traverseByTypes(['operator', 'delimiter'], function (operator, i, parent) {
var next,
doubleN... | Refactor rule to work with gonzales 3.2.1 | :art: Refactor rule to work with gonzales 3.2.1
| JavaScript | mit | sasstools/sass-lint,flacerdk/sass-lint,bgriffith/sass-lint,sktt/sass-lint,srowhani/sass-lint,DanPurdy/sass-lint,sasstools/sass-lint,srowhani/sass-lint |
b909320915b98e7906a6753da3ec68c5a0567a22 | net/data/proxy_resolver_v8_unittest/ends_with_comment.js | net/data/proxy_resolver_v8_unittest/ends_with_comment.js | function FindProxyForURL(url, host) {
return "PROXY success:80";
}
// We end the script with a comment (and no trailing newline).
// This used to cause problems, because internally ProxyResolverV8
// would append some functions to the script; the first line of
// those extra functions was being considered part of th... | function FindProxyForURL(url, host) {
return "PROXY success:80";
}
// We end the script with a comment (and no trailing newline).
// This used to cause problems, because internally ProxyResolverV8
// would append some functions to the script; the first line of
// those extra functions was being considered part of th... | Set the mime-type on a test data file to binary. | Set the mime-type on a test data file to binary.
I just checked this file in, and it shouldn't have a trailing newline.
However when I checked it out, SVN seems to have put back an LF at the end.
Hopefully this will prevent that from happening.
BUG=http://crbug.com/22864
TBR=cpu
Review URL: http://codereview.chromium... | JavaScript | bsd-3-clause | adobe/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,Crystalnix... |
a39aa576808891460fd674345162cecf57a45ee8 | examples/configs/webpack-base.config.js | examples/configs/webpack-base.config.js | /* eslint-disable global-require */
const path = require('path');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
const babelConfig = require(... | /* eslint-disable global-require */
const path = require('path');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
const babelConfig = require(... | Remove babel-polyfill from vendor bundle | build(webpack): Remove babel-polyfill from vendor bundle
| JavaScript | mit | nickjohnson-dev/dawww |
57079e22ece4cde0aef427eee163810a141c4731 | config/assets/cloud-foundry.js | config/assets/cloud-foundry.js | 'use strict';
module.exports = {
client: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
],
js: [
'public/lib/angular/angular.min.js',
'public/lib/angular-resource/angular-resource.min.js... | 'use strict';
module.exports = {};
| Remove non CF specific files | Remove non CF specific files
| JavaScript | mit | duppercloud/mean,edwardt4482/customerRates,Karma-Tech-Consulting/recipes,NicolasKovalsky/mean,amoundr/doctorNet,mc-funk/exostie-device-sim-js,shteeven/scradio,cleargif/mean,lirantal/vault,ChristopherJones72521/KHE2015,spacetag/TechEx_Josiah_2,devypt/mean,Boonda-P/newmean,ryanjbaxter/mean,helaili/automatic-octo-spork,et... |
466ab72d4d10df22740968461398b588b13cc909 | tempLog_server.js | tempLog_server.js | var fs = require('fs');
var intervalId = setInterval(function() {
fs.readFile('/sys/class/thermal/thermal_zone0/temp', function(err, data) {
var date = new Date();
var temp = data / 1000;
var newData = date + ',' + temp + '\n';
fs.appendFile('./data-log.csv', newData, function(err) ... | var fs = require('fs');
var intervalId = setInterval(function() {
fs.readFile('/sys/class/thermal/thermal_zone0/temp', function(err, data) {
var date = new Date();
var temp = data / 1000;
var newData = date + ',' + temp + '\n';
fs.appendFile('./data-log.csv', newData, function(err) ... | Remove the count and added a feedback when started | Remove the count and added a feedback when started
| JavaScript | mit | DevinCarr/piTemp,DevinCarr/piTemp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.