commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
39d0a239aa6b93a2853269a1280c5e838128b34b
gulpfile.babel.js
gulpfile.babel.js
import gulp from 'gulp'; import babel from 'gulp-babel'; import nodemon from 'gulp-nodemon'; import mocha from 'gulp-mocha'; import istanbul from 'gulp-babel-istanbul'; import injectModules from 'gulp-inject-modules'; import dotenv from 'dotenv'; dotenv.config(); process.env.NODE_ENV = 'test'; gulp.task('coverage', ...
import gulp from 'gulp'; import babel from 'babel-core/register'; import nodemon from 'gulp-nodemon'; import mocha from 'gulp-mocha'; import istanbul from 'gulp-babel-istanbul'; import injectModules from 'gulp-inject-modules'; import dotenv from 'dotenv'; dotenv.config(); process.env.NODE_ENV = 'test'; gulp.task('co...
Edit test task for gulp
Edit test task for gulp
JavaScript
mit
3m3kalionel/PostIt,3m3kalionel/PostIt
e2c853b43aabfb6e4cd8dd5f47276fa43dc2a56a
src/components/Specimen/Specimen.js
src/components/Specimen/Specimen.js
// Higher-order Specimen which provides theme import React, {PropTypes} from 'react'; import Span from './Span'; import parseSpecimenOptions from '../../utils/parseSpecimenOptions'; import parseSpecimenBody from '../../utils/parseSpecimenBody'; const identity = (v) => v; export default function Specimen(mapBodyToPro...
// Higher-order Specimen which provides theme import React, {PropTypes} from 'react'; import Span from './Span'; import parseSpecimenOptions from '../../utils/parseSpecimenOptions'; import parseSpecimenBody from '../../utils/parseSpecimenBody'; const identity = (v) => v; export default function Specimen(mapBodyToPro...
Rename generated specimen component to make eslint happy
Rename generated specimen component to make eslint happy
JavaScript
bsd-3-clause
interactivethings/catalog,interactivethings/catalog,interactivethings/catalog,interactivethings/catalog
05a0daad952ce7b54f9890fbdb809026b97c235b
thermocouple/thermocouple.js
thermocouple/thermocouple.js
var PythonShell = require('python-shell'); module.exports = function(RED) { function AdafruitMax31855Node(config) { RED.nodes.createNode(this,config); var node = this; var scriptPath = './spi_read.py' var args = [] console.log("Adafruit MAX 31855: Checking for muxi...
var PythonShell = require('python-shell'); module.exports = function(RED) { function AdafruitMax31855Node(config) { RED.nodes.createNode(this,config); var node = this; var scriptPath = './spi_read.py' var args = [] console.log("Adafruit MAX 31855: Checking for muxi...
Add more to debug message.
Add more to debug message.
JavaScript
mit
Heatworks/node-red-contrib-adafruit-max31855,Heatworks/node-red-contrib-adafruit-max31855,Heatworks/node-red-contrib-adafruit-max31855
e854df9ae0f9362cac92a9961b2480cbf555fd10
logic/setting/subcampaign/subcampaignSettingModelCheckerLogic.js
logic/setting/subcampaign/subcampaignSettingModelCheckerLogic.js
var configuration = require('../../../config/configuration.json') var campaignModelCheckerLogic = require('../../campaign/campaignModelCheckerLogic') var subcampaignModelCheckerLogic = require('../../subcampaign/subcampaignModelCheckerLogic') module.exports = { checksubCampaignSettingModelForExistence: function (red...
var configuration = require('../../../config/configuration.json') var subcampaignModelCheckerLogic = require('../../subcampaign/subcampaignModelCheckerLogic') module.exports = { checksubCampaignSettingModelForExistence: function (redisClient, accountHashID, campaignHashID, subCampaignHashID, callback) { subcampa...
Fix Existence and NotExistence Chain in Logics
Fix Existence and NotExistence Chain in Logics
JavaScript
mit
Flieral/Announcer-Service,Flieral/Announcer-Service
0e02fd4894915601b3ca3985c6591ded97df2af0
migrations/20211201111510_add-context-column-to-group-widgets.js
migrations/20211201111510_add-context-column-to-group-widgets.js
exports.up = async function (knex) { await knex.schema.table('group_widgets', t => { t.string('context') }) const now = new Date().toISOString() await knex.raw(` INSERT INTO "public"."widgets"("id","name","created_at") VALUES (15,E'opportunities_to_collaborate','${now}'), (16,E'farm_map','${now...
exports.up = async function (knex) { await knex.schema.table('group_widgets', t => { t.string('context') }) const now = new Date().toISOString() await knex.raw(` INSERT INTO "public"."widgets"("id","name","created_at") VALUES (15,E'opportunities_to_collaborate','${now}'), (16,E'farm_map','${now...
Add extra widgets to db
Add extra widgets to db
JavaScript
apache-2.0
Hylozoic/hylo-node,Hylozoic/hylo-node
38cd2a7cbe0c9f58153a5feb16ced610216c3f76
app/serializers/preprint.js
app/serializers/preprint.js
import OsfSerializer from 'ember-osf/serializers/osf-serializer'; export default OsfSerializer.extend({ serialize(snapshot) { // Normal OSF serializer strips out relationships. We need to add back primaryFile for this endpoint let res = this._super(...arguments); res.data.relationships = { ...
import OsfSerializer from 'ember-osf/serializers/osf-serializer'; export default OsfSerializer.extend({ serialize(snapshot) { // Normal OSF serializer strips out relationships. We need to add back primaryFile for this endpoint let res = this._super(...arguments); res.data.relationships = { ...
Update payload to match new parser for file relationship
Update payload to match new parser for file relationship
JavaScript
apache-2.0
caneruguz/ember-preprints,hmoco/ember-preprints,laurenrevere/ember-preprints,CenterForOpenScience/ember-preprints,baylee-d/ember-preprints,pattisdr/ember-preprints,CenterForOpenScience/ember-preprints,hmoco/ember-preprints,baylee-d/ember-preprints,laurenrevere/ember-preprints,pattisdr/ember-preprints,caneruguz/ember-pr...
b80b33a53fd38e6e50748cfc144a9fc7079adeb3
tests/modules/rule-loader.js
tests/modules/rule-loader.js
// auth0 rules rely on a configuration object, which is a set of secrets stored inside auth0, so we need to // hoist them. Mozilla-IAM also uses a "global" object that is normally at the top of the rules list, and is // contained inside global.js, which is a pruned down copy of Global-Function-Declarations.js const fs ...
// auth0 rules rely on a configuration object, which is a set of secrets stored inside auth0, so we need to // hoist them. Mozilla-IAM also uses a "global" object that is normally at the top of the rules list, and is // contained inside global.js, which is a pruned down copy of Global-Function-Declarations.js const fs ...
Add protection against accidents in tests
Add protection against accidents in tests
JavaScript
mpl-2.0
mozilla-iam/auth0-deploy,mozilla-iam/auth0-deploy
53751c08dd39be467ad48fc8a618f6be90d30530
compiler/getCurrentCommit.js
compiler/getCurrentCommit.js
const fs = require('fs-extra') const { exec } = require('child_process') const path = require('path') module.exports = function getCurrentCommit (directory, callback) { // If not a git repository, return null. if (!fs.existsSync(path.join(directory, '.git'))) { callback(null) } // ...
const fs = require('fs-extra') const { exec } = require('child_process') const path = require('path') module.exports = function getCurrentCommit (directory, callback) { // If not a git repository, return null. if (!fs.existsSync(path.join(directory, '.git'))) { callback(null) retur...
Fix duplicate simultaneous build initiation.
Fix duplicate simultaneous build initiation.
JavaScript
unlicense
marquee/static-sdk
0eb88bef5fcb9e746a682120d649131cce03728e
library/CM/FormField/Text.js
library/CM/FormField/Text.js
/** * @class CM_FormField_Text * @extends CM_FormField_Abstract */ var CM_FormField_Text = CM_FormField_Abstract.extend({ _class: 'CM_FormField_Text', /** @type Boolean */ _skipTriggerChange: false, /** @type String */ _valueLast: null, events: { 'blur input, textarea': function() { this.tri...
/** * @class CM_FormField_Text * @extends CM_FormField_Abstract */ var CM_FormField_Text = CM_FormField_Abstract.extend({ _class: 'CM_FormField_Text', /** @type Boolean */ _skipTriggerChange: false, /** @type String */ _valueLast: null, events: { 'blur input, textarea': function() { this.tri...
Replace value even if not change event is triggered
Replace value even if not change event is triggered
JavaScript
mit
tomaszdurka/CM,tomaszdurka/CM,vogdb/cm,njam/CM,fauvel/CM,fauvel/CM,cargomedia/CM,zazabe/cm,alexispeter/CM,njam/CM,vogdb/cm,vogdb/cm,fauvel/CM,alexispeter/CM,cargomedia/CM,njam/CM,cargomedia/CM,mariansollmann/CM,mariansollmann/CM,zazabe/cm,njam/CM,fvovan/CM,fvovan/CM,zazabe/cm,njam/CM,tomaszdurka/CM,vogdb/cm,fvovan/CM,m...
fb55eb2a4888a47bd144932358d9637b08319540
lib/actionClass.js
lib/actionClass.js
var instanceConfig = require('./config').getActiveInstanceConfig(); var request = require('request'); var utils = require('./utils'); function Action(actionPath, payload) { var actionPathBase = [ 'http://', instanceConfig.username + ':', instanceConfig.password + '@', instanceConfig.host + ':', instanceConf...
#!/usr/bin/env node var request = require('request'); var utils = require('./utils'); var instanceConfig = utils.getConfig().getActiveInstanceConfig(); function Action(actionPath, payload) { var actionPathBase = [ 'http://', instanceConfig.username + ':', instanceConfig.password + '@', instanceConfig.host +...
Use utils to get config and add shebang
Use utils to get config and add shebang
JavaScript
mit
drewbrokke/liferay-web-services-cli
56ed8915ab3e02723cd70298b0e01c1e47a78861
js/views/Columns.js
js/views/Columns.js
'use strict'; import PureComponent from '../PureComponent'; var React = require('react'); class ColumnsWrapper extends React.Component { render() { var {children, widgetProps, append, ...optProps} = this.props; return ( <div {...optProps} className="Columns"> {children} {append} </div>); } } var ...
'use strict'; import PureComponent from '../PureComponent'; var React = require('react'); class ColumnsWrapper extends React.Component { render() { var {children, append, onClick} = this.props; return ( <div onClick={onClick} className="Columns"> {children} {append} </div>); } } var getColumns = ...
Drop unknown props from div.
Drop unknown props from div.
JavaScript
apache-2.0
ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client
1d71e7304b8829e30cefdd192deacb70ba8de210
lib/parser-task.js
lib/parser-task.js
'use babel'; /** * This has to be done in a separate task since gulp depends * on stuff that does unsafe evals. We don't want, and are not * allowed to do this in the context of the Atom application. */ export default (path, file) => { try { const gulp = require(`${path}/node_modules/gulp`); /* eslint-...
'use babel'; /** * This has to be done in a separate task since gulp depends * on stuff that does unsafe evals. We don't want, and are not * allowed to do this in the context of the Atom application. */ export default (path, file) => { try { const gulp = require(`${path}/node_modules/gulp`); /* eslint-...
Disable `document` object in parser task context
Disable `document` object in parser task context This should fix #5
JavaScript
mit
noseglid/atom-build-gulp,noseglid/atom-build-gulp,noseglid/atom-build-gulp,AtomBuild/atom-build-gulp,AtomBuild/atom-build-gulp,AtomBuild/atom-build-gulp
2db2eedb5ff1ce9f3db207d71d67c2438e7394c6
lib/quill/usage.js
lib/quill/usage.js
/* * usage.js: Text for `jitsu help`. * * (C) 2010, Nodejitsu Inc. * */ var colors = require('colors'); module.exports = [ ' ___'.cyan, ' / / / / / / /'.cyan, ' /_\\/ /__/ / /__ /__'.cyan, '', 'Flawless configuration of your cloud', '', 'Usage:'.cyan.bold.underline, '', ' quill <reso...
/* * usage.js: Text for `jitsu help`. * * (C) 2010, Nodejitsu Inc. * */ var colors = require('colors'); module.exports = [ ' ___'.cyan, ' / / / / / / /'.cyan, ' /_\\/ /__/ / /__ /__'.cyan, '', 'Flawless configuration of your cloud', '', 'Usage:'.cyan.bold.underline, '', ' quill <reso...
Add `quill users` to common commands
[doc] Add `quill users` to common commands
JavaScript
mit
opsmezzo/quill
440581409b6a3b9b5b56823ecd9f6f683c8bd0ac
webpack.production.config.js
webpack.production.config.js
var webpack = require('webpack'); var precss = require('precss'); var autoprefixer = require('autoprefixer'); var postcssGradientFixer = require('postcss-gradientfixer') module.exports = { entry: [ './src/js/main.js' ], module: { loaders: [ { test: /\.css$/, loader: 'style-loader!css-loader!postcss...
var webpack = require('webpack'); var precss = require('precss'); var autoprefixer = require('autoprefixer'); module.exports = { entry: [ './src/js/main.js' ], module: { loaders: [ { test: /\.css$/, loader: 'style-loader!css-loader!postcss-loader' }, { test: /\.js$/, exclude: ...
Remove useless dependency in webpack
Remove useless dependency in webpack
JavaScript
mit
UNECE/Model-Explorer,UNECE/Model-Explorer
94462ed61e538152a7aca5d764c6a4a93835050d
client/js/hah-app/helpers.js
client/js/hah-app/helpers.js
const R = require('ramda') const hahSoftwareEngineers = ['Karen Rose', 'Kate Sills', 'Bhavya Bharti'] export const shouldShowFeature = userDisplayName => { return R.contains(userDisplayName, hahSoftwareEngineers) }
const R = require('ramda') const hahSoftwareEngineers = ['Karen Rose', 'Kate Sills', 'Bhavya Bharti', 'Valery Zajkov'] export const shouldShowFeature = userDisplayName => { return R.contains(userDisplayName, hahSoftwareEngineers) }
Add Valery to dev list
Add Valery to dev list
JavaScript
mit
HelpAssistHer/help-assist-her,HelpAssistHer/help-assist-her,HelpAssistHer/help-assist-her,HelpAssistHer/help-assist-her
a3d1d37b589129bd89eb3734ddd4a98fa780915d
fsr-logger.js
fsr-logger.js
var moment = require('moment'), sprintf = require('sprintf'), fsr = require('file-stream-rotator'); function create_simple_config(name, frequency, verbosity) { var config = {} config.filename = name || './log/activity.log'; config.frequency = frequency || 'daily'; config.verbose = verbosity || false; } ...
var moment = require('moment'), sprintf = require('sprintf'), fsr = require('file-stream-rotator'); function create_simple_config (name, frequency, verbosity) { var config = {} config.filename = name || './log/activity.log'; config.frequency = frequency || 'daily'; config.verbose = verbosity || false; ...
Fix some minor silly mistakes
Fix some minor silly mistakes
JavaScript
mit
jasonlotito/fsr-logger
5eea51d30294f1871ce9be1dfc4d81249dce954c
workshop/www/js/favorites.js
workshop/www/js/favorites.js
$(document).ready(function(){ $('#favorites-form').on('submit', function(event) { event.preventDefault(); $.ajax({ type: "POST", url: "http://10.0.2.89:3000/favorites", data: { bigOvenId: 123, userName: "dan" } }); }); });
$(document).ready(function(){ $('#favorites-form').on('submit', function(event) { event.preventDefault(); $.ajax({ type: "POST", url: "http://10.0.2.89:3000/favorites", data: { bigOvenId: 126, userName: "dan" } }).then(function(response){ $('body').append(response.status); }); ...
Write simple script to test with Sinatra server
Write simple script to test with Sinatra server Wrote favorites.js with a simple ajax call to persist favorites to our DB via sinatra server. Was able to communicate to and from server in JSON successfully.
JavaScript
mit
danasselin/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,danasselin/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves...
77c5b6f9729e41b7129f91ee72f5c934b925a244
client/src/teams/AddTeam.js
client/src/teams/AddTeam.js
import React from 'react' import { connect } from 'react-redux' import { addTeam } from './actionCreators' const AddTeam = React.createClass({ getInitialState: function() { return { value: '' } }, char: function(e) { this.setState({value: e.target.value}) }, add: function() { this.pro...
import React from 'react' import { connect } from 'react-redux' import { addTeam } from './actionCreators' const AddTeam = React.createClass({ keyDown: function(e) { if (e.key === 'Enter') this.props.addTeam(e.target.value) }, render: function() { return ( <div> <input type='text' o...
Allow the usr to add a team by pressing Enter
Allow the usr to add a team by pressing Enter
JavaScript
mit
xpsurgery/shopping-cart,xpsurgery/shopping-cart,xpsurgery/shopping-cart
780adb9f73d0c69ddef080618122c71392b02d3e
client/templates/helpers.js
client/templates/helpers.js
Template.login.events({ 'submit .login-user': function(event) { var email = event.target.email.value; var password = event.target.password.value; Meteor.loginWithPassword(email, password, function(err) { if (err) { event.target.email.value = email; ...
Template.login.events({ 'submit .login-user': function(event) { var email = event.target.email.value; var password = event.target.password.value; Meteor.loginWithPassword(email, password, function(err) { if (err) { event.target.email.value = email; ...
Add some global tpl vars
Add some global tpl vars
JavaScript
mit
pH-7/pH7Ortfolio,pH-7/pH7Ortfolio
430453587adb0cfe2edb5fee7f447c488b166921
src/js/HomeController.js
src/js/HomeController.js
/** * Angular.js application controller * * @author eugene.trounev(a)gmail.com */ angular.module('app') .controller('HomeCtrl', ['$scope', '$colorSerice', '$timeout', function($scope, $colorSerice, $timeout) { $scope.palette = ['#05668D', '#028090', '#00A896', '#02C39A']; $sco...
/** * Angular.js application controller * * @author eugene.trounev(a)gmail.com */ angular.module('app') .controller('HomeCtrl', [ '$scope', '$colorSerice', '$routeParams', '$location', 'uiDialog', function($scope, $colorSerice, $routeParams, $location, uiDialo...
Add management and export functions
Add management and export functions
JavaScript
mit
it-s/pal-pal,it-s/pal-pal
faeb3f75733e6f40e0545ed8ec93593415e8e951
scripts/game.js
scripts/game.js
import mutate from './mutate' const game = () => { let state = { nowPlaying: 0, board: [], won: false } let subscribers = [] const subscribe = (callback) => { subscribers.push({ callback }) } const dispatch = (action) => { state = mutate(action, state) notify(action, state) } ...
import mutate from './mutate' const game = () => { let state = { nowPlaying: 0, board: [], won: false } let subscribers = [] const subscribe = (callback, actions = []) => { subscribers.push({ callback, actions }) } const dispatch = (action) => { state = mutate(action,...
Revert "removed quasi-middleware-listeners filter something"
Revert "removed quasi-middleware-listeners filter something" This reverts commit a9d4cef9d3c231fc05a0cb0fe8bf8873293891b3.
JavaScript
mit
harunsmrkovic/tic-tac-toe,harunsmrkovic/tic-tac-toe
460a2ab1a9195e91c63c37e706771bc52ef265eb
lib/connection.js
lib/connection.js
'use babel' import {CompositeDisposable, Emitter} from 'atom' import {readFile} from './helpers' import WebSocket from 'reconnectingwebsocket' export default class Connection { constructor(projectPath, manifest) { this.subscriptions = new CompositeDisposable() this.emitter = new Emitter() this.projectPa...
'use babel' import {CompositeDisposable, Emitter} from 'atom' import {readFile} from './helpers' import WebSocket from 'reconnectingwebsocket' export default class Connection { constructor(projectPath, manifest) { this.subscriptions = new CompositeDisposable() this.emitter = new Emitter() this.projectPa...
Set websocket retry interval to 5 seconds
:new: Set websocket retry interval to 5 seconds
JavaScript
mit
motion/atom,flintjs/atom,steelbrain/steel-flint
e66e1a8a6627a40ed04f434bcda55a42ebef1e9b
test/mocha-bootload.js
test/mocha-bootload.js
// Global configuration uese for tests. require('babel/register')({ optional: ['runtime', 'es7.asyncFunctions'] }); const chai = require('chai'); const sinon = require('sinon'); const sinonChai = require('sinon-chai'); const chaiSubset = require('chai-subset'); chai.use(chaiSubset); chai.use(sinonChai); const React ...
// Global configuration uese for tests. require('babel/register')({ optional: ['runtime', 'es7.asyncFunctions'] }); const chai = require('chai'); const sinon = require('sinon'); const sinonChai = require('sinon-chai'); const chaiSubset = require('chai-subset'); chai.use(chaiSubset); chai.use(sinonChai); const Reac...
Add jsdom init prop to global
[test] Add jsdom init prop to global
JavaScript
mit
sebez/focus-components,KleeGroup/focus-components,KleeGroup/focus-components,asimsir/focus-components,JabX/focus-components,asimsir/focus-components,get-focus/focus-components,sebez/focus-components,JabX/focus-components
9a998f1ed23d72e7e6b5bc38592a8da2918183d3
lib/node/index.js
lib/node/index.js
// For browserify, export riot.js var self = module.exports = require('../../riot') // For node, export riot+compiler.js if(!process.browser) self.compiler = require('../../riot+compiler')
module.exports = process.browser // Browserify? Export riot.js ? require('../../riot') // Node? Export compiler.js : { compile: require('../../lib/compiler').compile }
Fix module to return a compiler in Node
Fix module to return a compiler in Node
JavaScript
mit
rasata/riot,a-moses/riot,rasata/riot,xtity/riot,txchen/riotjs,stonexer/riot,laomu1988/riot,qrb/riotjs,tao-zeng/riot,AndrewSwerlick/riot,ListnPlay/riotjs,chetanism/riot,baysao/riot,dp-lewis/riot,thepian/riot,mike-ward/riot,stonexer/riot,marciojcoelho/riotjs,txchen/riotjs,ListnPlay/riotjs,madlordory/riot,joshcartme/riot,...
2210b0f267d580082a81fea79d45e4423c5f5cbf
wrappers/json.js
wrappers/json.js
import React, { PropTypes } from 'react'; import Helmet from 'react-helmet'; import { Link } from 'react-router'; import { prefixLink } from 'gatsby-helpers'; import { config } from 'config'; class JsonWrapper extends React.Component { render() { const data = this.props.route.page.data; return ( <div> <He...
import React, { PropTypes } from 'react'; import Helmet from 'react-helmet'; import { Link } from 'react-router'; import { prefixLink } from 'gatsby-helpers'; import { config } from 'config'; class JsonWrapper extends React.Component { render() { const data = this.props.route.page.data; return ( <div> <He...
Clear talk page of temp data
Clear talk page of temp data
JavaScript
mit
Intergen-NZ/intergen-level-up
f1cede5570d90a32c4068eda0cdac0a2f97b4984
mac/resources/open_VWSC.js
mac/resources/open_VWSC.js
define(function() { 'use strict'; return function(item) { return item.getBytes().then(function(bytes) { var dv = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); if (dv.getUint32(0, false) !== bytes.length) { return Promise.reject('length does not match data'); } ...
define(function() { 'use strict'; return function(item) { return item.getBytes().then(function(bytes) { var dv = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); if (dv.getUint32(0, false) !== bytes.length) { return Promise.reject('length does not match data'); } ...
Change flat array to array of arrays
Change flat array to array of arrays
JavaScript
mit
radishengine/drowsy,radishengine/drowsy
c1c5e5f3cad8b7ee6faf40926c1e5b569b0bae73
lib/text-align.js
lib/text-align.js
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-text-align/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-text-align/tachyons-text-align.min.css', 'utf8') var mod...
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-text-align/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-text-align/tachyons-text-align.min.css', 'utf8') var mod...
Add site footer to each documentation generator
Add site footer to each documentation generator
JavaScript
mit
topherauyeung/portfolio,topherauyeung/portfolio,getfrank/tachyons,cwonrails/tachyons,matyikriszta/moonlit-landing-page,pietgeursen/pietgeursen.github.io,fenderdigital/css-utilities,fenderdigital/css-utilities,tachyons-css/tachyons,topherauyeung/portfolio
320d62e2c3324343904aee9e6f8e2c4b0623fec6
lib/index.js
lib/index.js
/** * Copyright 2012-2016, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; /* * This file is browserify'ed into a standalone 'Plotly' object. */ var Core = require('./core'); // Load ...
/** * Copyright 2012-2016, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; /* * This file is browserify'ed into a standalone 'Plotly' object. */ var Core = require('./core'); // Load ...
Revert "[tmp commit] add example transforms to ./lib/ Plotly for testing"
Revert "[tmp commit] add example transforms to ./lib/ Plotly for testing" This reverts commit a06441a2b32bf42334cd65bb397eec0d3c6d84fb.
JavaScript
mit
iongroup/plotly.js,plotly/plotly.js,etpinard/plotly.js,asolagmbh/plotly.js,aburato/plotly.js,plotly/plotly.js,plotly/plotly.js,asolagmbh/plotly.js,iongroup/plotly.js,asolagmbh/plotly.js,etpinard/plotly.js,iongroup/plotly.js,plotly/plotly.js,aburato/plotly.js,etpinard/plotly.js
aee02521f257a555bfe8cb2ef06a6ba858ca234e
test/test-creation.js
test/test-creation.js
/*global describe, beforeEach, it*/ 'use strict'; var path = require('path'); var helpers = require('yeoman-generator').test; describe('bespoke generator', function () { beforeEach(function (done) { helpers.testDirectory(path.join(__dirname, 'temp'), function (err) { if (err) { return done(err...
/*global describe, beforeEach, it*/ 'use strict'; var path = require('path'); var helpers = require('yeoman-generator').test; describe('bespoke generator', function () { beforeEach(function (done) { helpers.testDirectory(path.join(__dirname, 'temp'), function (err) { if (err) { return done(err...
Update test to reflect renamed 'js' and 'css' dirs
Update test to reflect renamed 'js' and 'css' dirs
JavaScript
mit
bespokejs/generator-bespoke,mikemaccana/generator-bespoke,bespokejs/generator-bespoke,markdalgleish/generator-bespoke,bguiz/generator-bespoke,markdalgleish/generator-bespoke,bespokejs/generator-bespoke,markdalgleish/generator-bespoke,pimterry/generator-bespoke
680a6672d30bce6d4ae67e7e156231fd43b116c8
resources/js/load-snippets.js
resources/js/load-snippets.js
(function($){ var location = 'resources/snippets/'; console.log("loading snippets"); $(".clojure").each(function(index, element){ var url = location + $(element).data("snippet"); $.ajax(url).done(function(data){ $(element).html(data); }); }); })(jQuery);
(function($){ $.fn.load_snippets = function(options){ console.log("loading snippets"); var settings = $.extend({ location: 'resources/snippets/', data: 'snippet' }, options); this.each(function(index, element){ var url = settings.location + $(eleme...
Create and use a jQuery plugin loading snippets
Create and use a jQuery plugin loading snippets
JavaScript
mit
fifth-postulate/Clojure.eXchange.2016,fifth-postulate/Clojure.eXchange.2016,fifth-postulate/Clojure.eXchange.2016
078b2b1f37ba58e64dba138dc5a49946722cc785
models/tripUtils.js
models/tripUtils.js
/*jslint node: true */ 'use strict'; var config = require('../config/config'); module.exports = { validateFields: function(next) { if (!this.title) { return next(new Error('Trip is missing a title')); } if (!Array.isArray(this.ideas)) { return next(new Error('Trip ideas have invalid format'...
/*jslint node: true */ 'use strict'; var config = require('../config/config'); module.exports = { validateFields: function(next) { if (!this.title) { return next(new Error('Trip is missing a title')); } if (!Array.isArray(this.ideas)) { return next(new Error('Trip ideas have invalid format'...
Add validation for trip visibility field
Add validation for trip visibility field Only allow trip visibilities set to `public` or `private`. [Finishes #129677289]
JavaScript
mit
heymanhn/journey-backend
95e3bb93effe0644d9d203db7ef9ce356caaafa8
js/scripts.js
js/scripts.js
// DOM Ready $(function() { // www.conditionizr.com // Legacy content and retina scripts and styles $('head').conditionizr({ ieLessThan : { active: true, version: '9', scripts: false, styles: false, classes: true, customScript: 'WORDPRESS_THEME_DIRECTORY_HERE/js/mediaqueries.min.js' } }); ...
// DOM Ready $(function() { // www.conditionizr.com // Legacy content and retina scripts and styles $('head').conditionizr({ ieLessThan : { active: true, version: '9', scripts: false, styles: false, classes: true, customScript: 'WORDPRESS_THEME_DIRECTORY_HERE/js/mediaqueries.min.js' } }); ...
Remove iPhone scrollbar onload script
Remove iPhone scrollbar onload script Sometimes jilts the page back to top if you've already scrolled down. Not a necessary feature.
JavaScript
mit
martinleopold/prcs-website,martinleopold/prcs-website
37e625c31e9334d8dd66a6e105d848937ebc9005
casper.js
casper.js
var command = (process.platform === 'win32') ? 'casperjs.cmd' : 'casperjs'; exports.find = function(args, successFind) { var spawn = require('child_process').spawn(command, args); var info = new Object(); spawn.stdout.on('data', function(data) { info = JSON.parse(data); }); spawn.stderr.on('data', function(da...
var command = (process.platform === 'win32') ? 'casperjs.cmd' : 'casperjs'; exports.find = function(args, successFind) { var spawn = require('child_process').spawn(command, args); var info = new Object(); spawn.stdout.on('data', function(data) { info = JSON.parse(data); }); spawn.stderr.on('data', function(da...
Add a function to download the source solved by Casper.
Add a function to download the source solved by Casper.
JavaScript
mit
ISKU/BOJ-AutoCommit
f4b78e6bfb6028cf70ba209672ca3ba19b934123
packages/ui-postcss/index.js
packages/ui-postcss/index.js
'use-strict'; const path = require('path'); const postcss = require('postcss'); const cssImport = require('postcss-import'); const atRulesVars = require('postcss-at-rules-variables'); const each = require('postcss-each'); const mixins = require('postcss-mixins'); const nested = require('postcss-nested'); const customP...
'use-strict'; const path = require('path'); const postcss = require('postcss'); const cssImport = require('postcss-import'); const atRulesVars = require('postcss-at-rules-variables'); const each = require('postcss-each'); const mixins = require('postcss-mixins'); const nested = require('postcss-nested'); const customP...
Fix error when mixinsDir option is not defined in psotcss preset
Fix error when mixinsDir option is not defined in psotcss preset
JavaScript
isc
WeAreGenki/wag-ui
1059b52657ec66097abbcf779e2e14ccf732239c
karma.conf.js
karma.conf.js
module.exports = function(config) { var SRC = [ 'dist/autocompleteList.js', 'src/**/*.spec.js' ]; var DEPENDENCIES = [ 'node_modules/angular/angular.js', 'node_modules/angular-animate/angular-animate.js', 'node_modules/angular-aria/angular-aria.js', 'node_modules/angular-mocks/angular-mo...
module.exports = function(config) { var SRC = [ 'dist/autocompleteList.js', 'src/**/*.spec.js' ]; var DEPENDENCIES = [ 'node_modules/angular/angular.js', 'node_modules/angular-animate/angular-animate.js', 'node_modules/angular-aria/angular-aria.js', 'node_modules/angular-mocks/angular-mo...
Add Firefox to test browser list
Add Firefox to test browser list
JavaScript
mit
jamesfer/angular-material-autocomplete-list,jamesfer/angular-material-autocomplete-list
287b79a567c3a35da4703610872fd14512b49755
server/import/server_sync.js
server/import/server_sync.js
var Event = require('../models/Event.js'); var Venue = require('../models/Venue.js'); exports.sync = function(events) { events.map(function(evt) { var eventquery = { 'title': evt.title, 'startAt': evt.startAt }; Event.findOne( eventquery, func...
var Event = require('../models/Event.js'); var Venue = require('../models/Venue.js'); exports.sync = function(events) { events.map(function(evt) { var eventquery = { 'title': evt.title, 'startAt': evt.startAt }; Event.findOne( eventquery, func...
Fix duplicates in imported venues
Fix duplicates in imported venues
JavaScript
apache-2.0
Studentmediene/Barteguiden,Studentmediene/Barteguiden
b7b54400701e9c2ee0587a635d2b7fbfc2f554a4
server/helpers/helpers.js
server/helpers/helpers.js
// error message handler const handleError = (err, res) => { switch (err.code) { case 401: return res.status(401).json(err.message); case 404: return res.status(404).json(err.message); default: return res.status(400).json(err); } }; // success message handler const handleSuccess = (cod...
// error message handler const handleError = (err, res) => { switch (err.code) { case 401: return res.status(401).json({ status: 401, message: err.message }); case 404: return res.status(404).json({ status: 404, message: err.message }); default: return res.status(400).json({ status: 400,...
Change error handlers to objects
Change error handlers to objects
JavaScript
mit
johadi10/PostIt,johadi10/PostIt
1241843320abcd17ab55796e0d105abbe98dd997
orienteer-core/src/main/resources/org/orienteer/core/component/ajax-indicator.js
orienteer-core/src/main/resources/org/orienteer/core/component/ajax-indicator.js
function showAjaxIndicator() { $('#${componentId}').show(); } function hideAjaxIndicator() { $('#${componentId}').hide(); } Wicket.Event.subscribe('/ajax/call/beforeSend', function( attributes, jqXHR, settings ) { showAjaxIndicator() }); Wicket.Event.subscribe('/ajax/call/complete', function( attributes, j...
'use strict'; var timeoutID; var needShow = false; function showAjaxIndicator() { needShow = true; timeoutID = window.setTimeout(function () { if (needShow) $('#${componentId}').show(); }, 100); } function hideAjaxIndicator() { needShow = false; window.clearTimeout(timeoutID); $('#${compone...
Create delay before show AjaxIndicator
Create delay before show AjaxIndicator
JavaScript
apache-2.0
OrienteerBAP/Orienteer,OrienteerDW/Orienteer,OrienteerBAP/Orienteer,WeaxMe/Orienteer,OrienteerBAP/Orienteer,OrienteerDW/Orienteer,WeaxMe/Orienteer,OrienteerBAP/Orienteer,WeaxMe/Orienteer,OrienteerDW/Orienteer
c63f301f2b77e13cb589e3ae746a009b0c12d7f0
app/initialize.js
app/initialize.js
var Application = require('application'); module.exports = (function() { function prepareDOM() { document.body.appendChild(document.createElement('gelato-application')); document.body.appendChild(document.createElement('gelato-dialogs')); document.body.appendChild(document.createElement('g...
var Application = require('application'); module.exports = (function() { function start() { document.body.appendChild(document.createElement('gelato-application')); new Application().start(); } if (location.protocol === 'file:') { $.ajax({ url: 'cordova.js', ...
Remove adding of app to the window on initialization.
Remove adding of app to the window on initialization.
JavaScript
mit
jernung/gelato,jernung/gelato,mcfarljw/gelato-framework,mcfarljw/backbone-gelato,mcfarljw/gelato-framework,mcfarljw/backbone-gelato
6ecba0069859fe440d5d8b5675a0543bc8242e04
config.js
config.js
module.exports = { API_URL: process.env.USE_LOCAL ? 'http://localhost:5000' : 'https://cofacts-api.hacktabl.org', // If is dev but connet to production api, don't use appId = RUMORS_SITE. // Use RUMORS_SITE only on production, or when connecting to local dev server // APP_ID: process.env.USE_LOCAL || process...
module.exports = { API_URL: process.env.USE_LOCAL ? 'http://localhost:5000' : 'https://cofacts-api.g0v.tw', // If is dev but connet to production api, don't use appId = RUMORS_SITE. // Use RUMORS_SITE only on production, or when connecting to local dev server // APP_ID: process.env.USE_LOCAL || process.env.N...
Use cofacts-api.g0v.tw as API endpoint
Use cofacts-api.g0v.tw as API endpoint
JavaScript
mit
cofacts/rumors-site,cofacts/rumors-site
c1557f0104b1ec1f34422c0d45da9135e25dcf05
server/misure/publications.js
server/misure/publications.js
Meteor.publish("misureBySito", function (sitoId) { check(sitoId, String); var sito = Siti.findOne({_id: new Mongo.ObjectID(sitoId)}); return sito && Misure.find({pod: sito.pod}); });
Meteor.publish("misureBySito", function (sitoId) { check(sitoId, String); var sito = Siti.findOne({$or: [ {_id: new Mongo.ObjectID(sitoId)}, {_id: sitoId} ]}); return sito && Misure.find({pod: sito.pod}); });
Select siti using either a string or an ObjectId as _id
Select siti using either a string or an ObjectId as _id
JavaScript
apache-2.0
innowatio/iwwa-back,innowatio/iwwa-back
1f1c7baa0ae1bf77f59a7bae8ff7ca4a51950f28
js/app/models/searchResults.js
js/app/models/searchResults.js
define(['jquery', 'underscore', 'backbone', 'model_search_item'], function($, _, Backbone, Models) { Models.SearchResults = Backbone.Collection.extend({ model: Models.SearchItem, initialize: function() { this.fetch(); }, parse: function(response, options) { return response.result.results; } }); retur...
define(['jquery', 'underscore', 'backbone', 'model_search_item'], function($, _, Backbone, Models) { Models.SearchResults = Backbone.Collection.extend({ model: Models.SearchItem, url: '/service/products/search/', initialize: function() { this.fetch(); }, parse: function(response, options) { return resp...
Add URL back to Models.SearchResults.
Add URL back to Models.SearchResults.
JavaScript
mit
burnflare/CrowdBuy,burnflare/CrowdBuy
ef43019e56c55aa6982715b70b80fd52b7b1a05d
src/Website/karma.conf.js
src/Website/karma.conf.js
// Copyright (c) Martin Costello, 2016. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. const puppeteer = require("puppeteer"); process.env.CHROME_BIN = puppeteer.executablePath(); module.exports = function (config) { config.set...
// Copyright (c) Martin Costello, 2016. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. const puppeteer = require("puppeteer"); process.env.CHROME_BIN = puppeteer.executablePath(); module.exports = function (config) { config.set...
Fix Chrome headless when root on Linux
Fix Chrome headless when root on Linux Fix Chrome headless when running as root by adding --no-sandbox.
JavaScript
apache-2.0
martincostello/website,martincostello/website,martincostello/website,martincostello/website
2f2258821e4e9ece0b06f70874f956b01ca1b7d1
app/static/js/DigitCanvas.js
app/static/js/DigitCanvas.js
'use strict'; function DigitCanvas(element, width, height) { this.canvas = document.getElementById(element); this.canvas.width = width; this.canvas.height = height; this.context = this.canvas.getContext('2d'); this.gridWidth = this.canvas.width/28; this.gridHeight = this.canvas.height/28; ...
'use strict'; var Utils = require('./Utils'); function DigitCanvas(element, width, height) { this.canvas = document.getElementById(element); this.canvas.width = width; this.canvas.height = height; this.context = this.canvas.getContext('2d'); this.gridWidth = this.canvas.width/28; this.gridHei...
Add object for drawing digits with canvas
Add object for drawing digits with canvas
JavaScript
mit
starcalibre/MNIST3D,starcalibre/MNIST3D,starcalibre/MNIST3D
644f74f1c8ceca5f89a7d5d56f523ff297e8c804
config/deprecation-workflow.js
config/deprecation-workflow.js
window.deprecationWorkflow = window.deprecationWorkflow || {}; window.deprecationWorkflow.config = { workflow: [ { handler: "silence", matchId: "ember-application.app-instance-container"}, { handler: "silence", matchId: "ember-htmlbars.ember-handlebars-safestring"}, { handler: "silence", matchId: "ember-g...
window.deprecationWorkflow = window.deprecationWorkflow || {}; window.deprecationWorkflow.config = { workflow: [ ] };
Remove deprecations that have been resolved
Remove deprecations that have been resolved These were all issues in our dependencies and they have been fixed or removed.
JavaScript
mit
jrjohnson/frontend,thecoolestguy/frontend,dartajax/frontend,thecoolestguy/frontend,ilios/frontend,ilios/frontend,djvoa12/frontend,dartajax/frontend,jrjohnson/frontend,djvoa12/frontend
5c3a3ebef253d368d72588d70ab461de4f2c37e7
v3/src/sound/webaudio/WebAudioSpriteSound.js
v3/src/sound/webaudio/WebAudioSpriteSound.js
var Class = require('../../utils/Class'); var WebAudioSound = require('./WebAudioSound'); var WebAudioSpriteSound = new Class({ Extends: WebAudioSound, initialize: function WebAudioSpriteSound(manager, key, config) { if (config === void 0) { config = {}; } WebAudioSound.call(this, manager, key, ...
var Class = require('../../utils/Class'); var WebAudioSound = require('./WebAudioSound'); var WebAudioSpriteSound = new Class({ Extends: WebAudioSound, initialize: function WebAudioSpriteSound(manager, key, config) { if (config === void 0) { config = {}; } WebAudioSound.call(this, manager, key, ...
Improve readability with local variable
Improve readability with local variable
JavaScript
mit
TukekeSoft/phaser,spayton/phaser,spayton/phaser,photonstorm/phaser,TukekeSoft/phaser,photonstorm/phaser,TukekeSoft/phaser,BeanSeed/phaser,englercj/phaser,mahill/phaser,mahill/phaser,pixelpicosean/phaser,BeanSeed/phaser,rblopes/phaser
a42e67cb98658cefdaf16ee655e73b3affa25514
select/operations/index.js
select/operations/index.js
var Select = require('./../index'); Select.prototype._select = function(option, index) { this.model.set('value', option[this.key]); this.model.set('selected', option); this.model.set('selectedIndex', index); this._closeOptions(); }; Select.prototype._willSelect = function() { this.model.set('selectOptions...
var Select = require('./../index'); Select.prototype._select = function(option, index) { this.model.set('value', option[this.key]); this.model.set('selected', option); this.model.set('selectedIndex', index); this._closeOptions(); }; Select.prototype._willSelect = function() { this.model.set('selectOptions...
Fix fieldname could be path so validation not working
Fix fieldname could be path so validation not working
JavaScript
mit
BBWeb/d-md-components,BBWeb/d-md-components
31853171dd61838a567a688855d2c565b21f01f4
assets/js/main.js
assets/js/main.js
$(function() { // Calculate top of sidebar container in relation to window var stickyTop = $('.sidebar-container').offset().top; // Calculate the current position of window top (will change as user scrolls) $(window).scroll(function(){ var windowTop = $(window).scrollTop(); if (stickyTop < windowTop) { $(...
$(document).ready(function(){ $('#postcontent li').each(function(){ $(this).after('<hr/>'); }); $('#postcontent li').each(function(){ $(this).addClass('row'); }); $('#postcontent li p').each(function(){ $(this).addClass('col-xs-12 col-md-6'); }); });
Add grid class responsiveness to paragraphs.
Add grid class responsiveness to paragraphs.
JavaScript
apache-2.0
uhm-coe/assist,uhm-coe/assist,uhm-coe/assist,uhm-coe/assist
61452df97173f95cdac80815bed69efd638a37bd
lib/router.js
lib/router.js
Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', waitOn: function() { return Meteor.userId() ? Meteor.subscribe('Notifications', Meteor.userId()) : null } }); Router.route('/', { name: 'projectsList', waitOn: function() { return...
Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', waitOn: function() { return Meteor.userId() ? Meteor.subscribe('Notifications', Meteor.userId()) : null } }); Router.route('/', { name: 'projectsList', waitOn: function() { return [...
Add waitOn to subscription of requests
Add waitOn to subscription of requests
JavaScript
mit
PUMATeam/puma,PUMATeam/puma
d805096f0bc3ed803cdde2a18556fc3a4d863073
src/logic/transformPageFromHumanToProgrammer.js
src/logic/transformPageFromHumanToProgrammer.js
// @flow /** * Переводит номер страницы с человеческого на программистский * @param {number} page человеческий номер * @returns {number} программистский номер */ function transformPageFromHumanToProgrammer(page: number): number { return page - 1; } export { transformPageFromHumanToProgrammer as default };
// @flow /** * Переводит номер страницы с человеческого на программистский * @param {number} page человеческий номер * @returns {number} программистский номер */ function transformPageFromHumanToProgrammer(page: number): number { return page <= 0 ? 0 : page - 1; } export { transformPageFromHumanToProgrammer as...
Fix bottom border for page
Fix bottom border for page
JavaScript
mit
moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0
2f93ba447eefff1ebf1b1e7578e8cc13bfeb6544
lib/forever/plugins/logger.js
lib/forever/plugins/logger.js
var fs = require('fs'); exports.name = 'logger'; exports.attach = function (options) { options = options || {}; var monitor = this; if (options.outFile) { monitor.stdout = options.stdout || fs.createWriteStream(options.outFile, { flags: monitor.append ? 'a+' : 'w+', encoding: 'utf8', mo...
var fs = require('fs'); exports.name = 'logger'; exports.attach = function (options) { options = options || {}; var monitor = this; if (options.outFile) { monitor.stdout = options.stdout || fs.createWriteStream(options.outFile, { flags: monitor.append ? 'a+' : 'w+', encoding: 'utf8', mo...
Destroy log file streams in a more intelligent way.
[fix] Destroy log file streams in a more intelligent way.
JavaScript
mit
yyx990803/forever,kethle/forever,saisai/forever,jotham/forever,nguyen-tien-mulodo/forever,foreverjs/forever,nguyen-tien-mulodo/forever,ryan321/forever,vcarrera/forever,rakyll/forever,jotham/forever,ryan321/forever,JJediny/forever,ContinuumIO/forever,arnabsinha4u/demo-documentation,saisai/forever,Jonekee/forever,vcarrer...
130d37fcbb1f00b5d1b7d5ecdc6c662c3fc61957
app/containers/new/controller.js
app/containers/new/controller.js
import Ember from 'ember'; export default Ember.Controller.extend({ queryParams: ['environmentId','containerId'], environmentId: null, containerId: null, editing: false, actions: { done() { this.send('goToPrevious'); }, cancel() { this.send('goToPrevious'); }, } });
import Ember from 'ember'; export default Ember.Controller.extend({ queryParams: ['environmentId','containerId','hostId'], hostId: null, environmentId: null, containerId: null, editing: false, actions: { done() { this.send('goToPrevious'); }, cancel() { this.send('goToPrevious'); ...
Fix add container to specific host
Fix add container to specific host
JavaScript
apache-2.0
rancher/ui,rancher/ui,ubiquityhosting/rancher_ui,westlywright/ui,lvuch/ui,vincent99/ui,rancher/ui,lvuch/ui,westlywright/ui,lvuch/ui,rancherio/ui,nrvale0/ui,pengjiang80/ui,nrvale0/ui,ubiquityhosting/rancher_ui,pengjiang80/ui,westlywright/ui,nrvale0/ui,vincent99/ui,ubiquityhosting/rancher_ui,rancherio/ui,pengjiang80/ui,v...
b6f251c7cb200208911a39fa2f75bd50fc440bb7
app/utils/getParamsFromUrl.js
app/utils/getParamsFromUrl.js
// Convert params from url into JSON object export default function getParamsFromUrl(url) { const params = {}; const { searchParams } = new URL(url); for (const [key, value] of searchParams.entries()) { params[key] = value; } return params; }
// Convert params from url into JSON object export default function getParamsFromUrl(url) { const params = {}; const urlObj = new URL(url); const { searchParams, hostname } = urlObj; if (hostname === 'youtu.be') { const { pathname, search } = urlObj; const videoId = pathname.substring(1); const vide...
Fix edge case where video id is given in different format
Fix edge case where video id is given in different format
JavaScript
mit
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
56c70b6f11e2a13a84d2632cb5169f28f03f6c5f
client/src/components/BackButton.js
client/src/components/BackButton.js
import React from 'react' import {withRouter} from 'react-router-dom' import '../styles/App.css' const BackButton = ({history}) => ( <p className="back" onClick={() => history.goBack()}> &lt; &lt; Back</p> ) export default withRouter(BackButton)
import React from 'react' import {withRouter} from 'react-router-dom' import '../styles/App.css' const BackButton = ({history}) => ( <p> <span className="back" onClick={() => history.goBack()}> &lt; &lt; Back </span> | <span className="back" onClick={() => history.push('/newsfeed')}> Home </span> </p> ) e...
Move Home navigation to Back button
Move Home navigation to Back button
JavaScript
mit
kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed
92d65c536d17821a56a59fa9b39a69b645a8744c
public/javascripts/lookup.js
public/javascripts/lookup.js
"use strict"; $("[data-react-class]").each(function() { var componentName = this.getAttribute("data-react-class"), constructor = window[componentName], propsJson = this.getAttribute("data-react-props"), props = propsJson && JSON.parse(propsJson); ReactDOM.render( React.createElement( c...
"use strict"; function attachReactComponents() { var nodes = document.querySelectorAll("[data-react-class]"), index; for (index = 0; index < nodes.length; ++index) { var node = nodes[index], componentName = node.getAttribute("data-react-class"), constructor = window[componentName], ...
Stop using jQuery to attach React components
Stop using jQuery to attach React components
JavaScript
mit
nhsalpha/gp-lookup,nhsalpha/gp-lookup,nhsalpha/gp-lookup
172e14c37af32a636a2eb660e4be1cdc8a205cfb
src/DotNetStatus/Gruntfile.js
src/DotNetStatus/Gruntfile.js
/// <binding BeforeBuild='bower, concat' ProjectOpened='bower:install' /> /* This file in the main entry point for defining grunt tasks and using grunt plugins. Click here to learn more. http://go.microsoft.com/fwlink/?LinkID=513275&clcid=0x409 */ module.exports = function (grunt) { grunt.initConfig({ bower...
/// <binding BeforeBuild='bower, concat' ProjectOpened='bower:install' /> /* This file in the main entry point for defining grunt tasks and using grunt plugins. Click here to learn more. http://go.microsoft.com/fwlink/?LinkID=513275&clcid=0x409 */ module.exports = function (grunt) { grunt.initConfig({ bower...
Add concat step to default grunt task
Add concat step to default grunt task
JavaScript
mit
Microsoft/dotnet-apiweb,conniey/dotnet-apiweb,conniey/dotnet-apiweb,Microsoft/dotnet-apiweb
fe1819f587ae3e9e8a12fb98d7b7760eec3ea527
static/index.js
static/index.js
window.onload = function() { var path = require('path'); var ipc = require('ipc'); try { // Skip "?loadSettings=". var loadSettings = JSON.parse(decodeURIComponent(location.search.substr(14))); // Start the crash reporter before anything else. if (process.platform != 'win32') require('crash...
window.onload = function() { var path = require('path'); var ipc = require('ipc'); try { // Skip "?loadSettings=". var loadSettings = JSON.parse(decodeURIComponent(location.search.substr(14))); // Start the crash reporter before anything else. require('crash-reporter').start({ productName: ...
Revert "Don't start crash reporter on Windows."
Revert "Don't start crash reporter on Windows." This reverts commit 684f15ab89eae5088688955721876271798d9b38.
JavaScript
mit
acontreras89/atom,n-riesco/atom,githubteacher/atom,dannyflax/atom,Galactix/atom,ObviouslyGreen/atom,constanzaurzua/atom,hakatashi/atom,brumm/atom,rjattrill/atom,sxgao3001/atom,Rychard/atom,atom/atom,kjav/atom,ardeshirj/atom,tony612/atom,n-riesco/atom,hharchani/atom,ykeisuke/atom,Jandersoft/atom,Jdesk/atom,Jonekee/atom,...
3190844c1724c8cb2af85bd978f66ce6f63303db
server/plugins/MessageRepeat.js
server/plugins/MessageRepeat.js
/* MessageRepeat plugin - Desigened to forward incomming messages to another server */ var request = require('request') var logger = require('../log') function run (trigger, scope, data, config, callback) { if (config.repeatURI) { var uri = config.repeatURI var apikey = config.repeatAPIKEY var messageD...
/* MessageRepeat plugin - Desigened to forward incomming messages to another server */ var request = require('request') var logger = require('../log') function run (trigger, scope, data, config, callback) { if (config.repeatURI) { var uri = config.repeatURI var apikey = config.repeatAPIKEY var messageD...
Format everything nicely + cleanup
Format everything nicely + cleanup
JavaScript
unlicense
davidmckenzie/pagermon,davidmckenzie/pagermon,davidmckenzie/pagermon,davidmckenzie/pagermon
5597e67f82774a36cc20c61149551b0ffb37d03d
src/tools/courseraTool.js
src/tools/courseraTool.js
var http = require('http'); var courseraHttpHandler = function(url, processor, callback) { http.get(url, function(response) { var str = ''; response.on('data', function (chunk) { str += chunk; }); response.on('end', function () { var processedStr = str.trim(...
var http = require('http'); var courseraHttpHandler = function(url, lineProcessor, callback) { http.get(url, function(response) { var str = ''; response.on('data', function (chunk) { str += chunk; }); response.on('end', function () { var processedStr = str.t...
Refactor variable name, use regex instead of string for split parameter.
Refactor variable name, use regex instead of string for split parameter. lzhoucs|G580|Mint17|WebStorm10
JavaScript
apache-2.0
lzhoucs/cs-algorithms
79059c5e597a1eb801806412e593a0d51b0fa340
lib/reporters/null-reporter.js
lib/reporters/null-reporter.js
var Reporter = require('../reporter'); /** * NullReporter outputs nothing * @class NullReporter * @param {Object} options hash of options interpreted by reporter */ module.exports = Reporter.extend({ report: function(/* coverageData */) { } });
var Reporter = require('../reporter'); /** * NullReporter outputs nothing * @class NullReporter * @param {Object} options hash of options interpreted by reporter */ module.exports = Reporter.extend({ report: function(/* coverageData */) { }, processOptions: function(/* options */) { } });
Fix so null reporter builds again.
Fix so null reporter builds again.
JavaScript
mit
jschilli/ember-cli-blanket,calderas/ember-cli-blanket,dwickern/ember-cli-blanket,notmessenger/ember-cli-blanket,elwayman02/ember-cli-blanket,notmessenger/ember-cli-blanket,calderas/ember-cli-blanket,sglanzer/ember-cli-blanket,elwayman02/ember-cli-blanket,yagni/ember-cli-blanket,dwickern/ember-cli-blanket,mike-north/emb...
e6b004c60357ad06ec22a1b7335ec07764a26d39
webpack/test.config.js
webpack/test.config.js
const webpack = require("webpack"); module.exports = { target: "node", externals: ["jquery", "moment"], resolve: { extensions: [".ts", ".js"] }, devtool: "#inline-cheap-module-source-map", module: { loaders: [ { test: /\.ts$/, loader: "ts-loader" }, { test: /\.scss$/, loaders: ['css-loa...
const webpack = require("webpack"); module.exports = { target: "node", externals: ["jquery", "moment"], resolve: { extensions: [".ts", ".js"] }, devtool: "#inline-cheap-module-source-map", module: { loaders: [ { test: /\.ts$/, loader: "ts-loader" }, { test: /\.scss$/, loaders: ['css-loa...
Update Test Confiig Plugins to Maybe Fix JQuery Module
Update Test Confiig Plugins to Maybe Fix JQuery Module Remove something from the test config to see if it helps find the jquery module in travis.
JavaScript
mit
cgelon/master-notifications,cgelon/master-notifications,cgelon/master-notifications
dc4c32b2f07a67a30ee83b446716d57e43baa268
client/helpers/document-ready.js
client/helpers/document-ready.js
'use strict'; var Promise = require('bluebird') module.exports = new Promise(function(resolve) { if (document.readyState === 'complete') { resolve() } else { function onReady() { resolve() document.removeEventListener('DOMContentLoaded', onReady, true) window.removeEventListener('load', onReady, true) ...
'use strict'; var Promise = require('bluebird') module.exports = new Promise(function(resolve) { function onReady() { resolve() document.removeEventListener('DOMContentLoaded', onReady, true) window.removeEventListener('load', onReady, true) } if (document.readyState === 'complete') { resolve() } else { ...
Move where onReady is declared to shut up JSHint
Move where onReady is declared to shut up JSHint
JavaScript
agpl-3.0
hawkrives/gobbldygook,hawkrives/gobbldygook,hawkrives/gobbldygook
7a8092db0d6eef16756666779fcf3691f3f0185d
troposphere/static/js/components/projects/detail/tableData/volume/Status.react.js
troposphere/static/js/components/projects/detail/tableData/volume/Status.react.js
/** @jsx React.DOM */ define( [ 'react', 'backbone' ], function (React, Backbone) { return React.createClass({ propTypes: { volume: React.PropTypes.instanceOf(Backbone.Model).isRequired, instances: React.PropTypes.instanceOf(Backbone.Collection).isRequired }, rend...
/** @jsx React.DOM */ define( [ 'react', 'backbone' ], function (React, Backbone) { return React.createClass({ propTypes: { volume: React.PropTypes.instanceOf(Backbone.Model).isRequired, instances: React.PropTypes.instanceOf(Backbone.Collection).isRequired }, rend...
Add message when volume attached to instance outside project
Add message when volume attached to instance outside project
JavaScript
apache-2.0
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
54d0eaac5745f3e1526c9b80c32341a25a6c7e82
src/engine/VisualServer.js
src/engine/VisualServer.js
import settings from './settings'; import { SCALE_MODES } from './const'; import { is_webgl_supported } from './utils/index'; import { loader_use_procs } from 'engine/registry'; import WebGLRenderer from './renderers/WebGLRenderer'; import texture_parser from 'engine/textures/texture_parser'; // Texture parser is mand...
import settings from './settings'; import { SCALE_MODES } from './const'; import { is_webgl_supported } from './utils/index'; import { loader_use_procs } from 'engine/registry'; import WebGLRenderer from './renderers/WebGLRenderer'; import texture_parser from 'engine/textures/texture_parser'; import spritesheet_parser ...
Load spritesheet middleware for atlas support
Load spritesheet middleware for atlas support
JavaScript
mit
pixelpicosean/voltar,pixelpicosean/voltar
941ad2d30e708e0846cb90e8fe1081c80b13a598
src/entity.js
src/entity.js
/* * @module Entity */ 'use strict'; var Node = require('./node') var util = require('./util.js') /** * @class Entity * @extends Node * @see [Node](./node.md) * @see [Constructor Conventions](../conventions-constructor.md) * @param {Object} opts Relevant opts: _none_. Rest passed to `Node`. */ class Entity e...
/* * @module Entity */ 'use strict'; var Node = require('./node') var util = require('./util') /** * @class Entity * @extends Node * @see [Node](./node.md) * @see [Constructor Conventions](../conventions-constructor.md) */ class Entity extends Node { constructor() { var defaults = { } ...
Clean up and prepare Entity class
Clean up and prepare Entity class
JavaScript
mit
leftees/scene-scroller,leftees/scene-scroller
1cba3cedca3bc14b2a700152d1e665bb93d0147c
src/TypeAhead/SelectTrigger.js
src/TypeAhead/SelectTrigger.js
import React, { Component } from 'react' export default (props) => { let { selectedOption, selectedLabel, placeholder, disabled, onClick, handleOnChange, handleKeyDown, handleOnFocus, } = props let value = props.searchTerm if (value === null) { value = selectedOption ? (sel...
import React, { Component } from 'react' export default (props) => { let { selectedOption, selectedLabel, placeholder, disabled, onClick, handleOnChange, handleKeyDown, handleOnFocus, } = props let value = props.searchTerm if (value === null) { value = '' if (selectedO...
Allow selectedLabel to be func
Allow selectedLabel to be func
JavaScript
mit
selvagsz/react-power-select,selvagsz/react-power-select
bc846caef25c81b2a4bd231cb37933ed6dacec84
src/components/search_bar.js
src/components/search_bar.js
import React, { Component } from 'react' //class-based component (ES6) class SearchBar extends Component { constructor(props) { super(props); this.state = { searchInput: '' } //This is the only time we set state like this. We usually use setState } render() { //method definition in ES6 return ( ...
import React, { Component } from 'react' //class-based component (ES6) class SearchBar extends Component { constructor(props) { super(props); this.state = { searchInput: 'Starting value' } //This is the only time we set state like this. We usually use setState } render() { //method definition in ES6 ...
Make it a controlled component
Make it a controlled component
JavaScript
mit
phirefly/react-redux-starter,phirefly/react-redux-starter
84ccaf3b349cc0f3e7eea39c4a04c94a19335e50
src/lib/commentsMap.es6.js
src/lib/commentsMap.es6.js
function commentsMap(comment, parent, op, score=4, nthSibling=0, nthNest=0, siblingHidden=false) { var i = 0; var length; if (comment == undefined) { return; } // Start degrading score--; // Show longer threads involving op if (comment.author == op || comment.gilded) { score++; // Show long...
function commentsMap(comment, parent, op, score=4, nthSibling=0, nthNest=0, siblingHidden=false) { var i = 0; var length; if (comment == undefined) { return; } // Start degrading score--; // Show longer threads involving op if (comment.author == op || comment.gilded) { score++; // Show long...
Fix break in commentmap where first sibling is null
Fix break in commentmap where first sibling is null
JavaScript
mit
uzi/reddit-mobile,gynsolomon/reddit-mobile,danehansen/reddit-mobile,madbook/reddit-mobile,kieranjones/reddit-mobile,DogPawHat/reddit-mobile,curioussavage/reddit-mobile,muratsu/reddit-mobile,curioussavage/reddit-mobile,dwick/reddit-mobile,madbook/reddit-mobile,devypt/reddit-mobile,uzi/reddit-mobile,DogPawHat/reddit-mobi...
c73dd7a7ffbc4bf8f4bf44c4547ba803dddbce71
package/rules/node_modules.js
package/rules/node_modules.js
const { join } = require('path') const { cache_path: cachePath } = require('../config') const { nodeEnv } = require('../env') // Compile standard ES features for JS in node_modules with Babel. module.exports = { test: /\.(js|mjs)$/, exclude: /@babel(?:\/|\\{1,2})runtime/, use: [ { loader: 'babel-loader...
const { join } = require('path') const { cache_path: cachePath } = require('../config') const { nodeEnv } = require('../env') // Compile standard ES features for JS in node_modules with Babel. module.exports = { test: /\.(js|mjs)$/, include: /node_modules/, exclude: /@babel(?:\/|\\{1,2})runtime/, use: [ { ...
Configure the nodeModules loader to do what its name suggests
Configure the nodeModules loader to do what its name suggests Fixes #1892 Closes #1893
JavaScript
mit
gauravtiwari/webpacker,gauravtiwari/webpacker,gauravtiwari/webpacker,rails/webpacker,rails/webpacker,rossta/webpacker,rossta/webpacker,rossta/webpacker,rossta/webpacker
edf1a4d4ae1204c68b90c97ef57bff6733349c2e
src/components/list/index.js
src/components/list/index.js
import React, {Component} from 'react'; import {connect} from 'react-redux'; import './list.css'; export class List extends Component { render() { return ( <ul className="c-list"> {this.props.countries.map(country => { return ( <li cla...
import React, {Component} from 'react'; import {connect} from 'react-redux'; import './list.css'; export class List extends Component { render() { return ( <ul className="c-list"> {this.props.countries.map(country => { return ( <li cla...
Add alt tag to image
Add alt tag to image
JavaScript
mit
jackblackCH/zululo,jackblackCH/zululo
95d33167c25165d6ed2dfce9ba11404b0099f718
features/specs.js
features/specs.js
'use strict'; function Specs() { //console.log('After:', this.World); this.Given(/^I am a thingamabob client on port (\d*)$/, function(port, callback) { this.createClient(port, callback); }); this.Given(/^a thingamabob server on port (\d*)$/, function(port, callback) { this.createServ...
'use strict'; function Specs() { //console.log('After:', this.World); this.Given(/^I am a thingamabob client on port (\d*)$/, function(port, callback) { this.createClient(port, callback); }); this.Given(/^a thingamabob server on port (\d*)$/, function(port, callback) { this.createServ...
Add setTimeout to the Then step to ensure processing before assert.
Add setTimeout to the Then step to ensure processing before assert.
JavaScript
mit
REAANDREW/thingamabob,REAANDREW/thingamabob
f43267831449b4979d403ada903c3291abea0d06
api/user/index.js
api/user/index.js
'use strict'; var express = require('express'); var controller = require('./user.controller'); var config = require('../../config/environment'); var auth = require('../../auth/auth.service'); var router = express.Router(); router.get('/', auth.hasRole('admin'), controller.index); router.delete('/:id', auth.hasRole('...
'use strict'; var express = require('express'); var controller = require('./user.controller'); var config = require('../../config/environment'); var auth = require('../../auth/auth.service'); var router = express.Router(); router.get('/', auth.isAuthenticated(), controller.index); router.delete('/:id', auth.hasRole(...
Change users API auth rules
Change users API auth rules
JavaScript
mit
youka-project/youka-server,youka-project/youka-server
5a8acac1647b9f3b73086a5eafb91912aa00f7ee
packages/seed/karma.config.js
packages/seed/karma.config.js
module.exports = function(config) { config.set({ frameworks: ['mocha', 'chai', 'karma-typescript', 'sinon'], browsers: ['ChromeHeadless', 'FirefoxHeadless'], files: [ './node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js', { pattern: 'src/*.ts' }, { pattern: 'test...
module.exports = function(config) { config.set({ frameworks: ['mocha', 'chai', 'karma-typescript', 'sinon'], browsers: ['ChromeHeadless', 'FirefoxHeadless'], files: [ './node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js', { pattern: 'src/*.ts' }, { pattern: 'test...
Update karma typescript es6 transform presets
Update karma typescript es6 transform presets
JavaScript
mit
abraham/nutmeg-cli,abraham/nutmeg-cli,abraham/nutmeg-cli
eb54c3040c68014422b49f31b6afcb8d3bc706a9
app/render_png.js
app/render_png.js
define([ 'http', 'url' ], function (http, url) { var renderPng = function (req, res) { var options = url.parse(renderPng.getScreenshotPath(req.url)); http.get(options, function (screenshot) { res.status(screenshot.statusCode); for (var i in screenshot.headers) { res.setHeader(i, screen...
define([ 'http', 'url' ], function (http, url) { var renderPng = function (req, res) { var options = url.parse(renderPng.getScreenshotPath(req.url)); http.get(options, function (screenshot) { res.status(screenshot.statusCode); for (var i in screenshot.headers) { res.setHeader(i, screen...
Use native DOM commands for screenshot ready expression
Use native DOM commands for screenshot ready expression Instead of using jQuery, use document.querySelector. This avoids warning messages in screenshot-as-a-service.
JavaScript
mit
alphagov/spotlight,tijmenb/spotlight,alphagov/spotlight,keithiopia/spotlight,keithiopia/spotlight,keithiopia/spotlight,tijmenb/spotlight,tijmenb/spotlight,alphagov/spotlight
3d6095a6a367bec42a5fdf0cda994179ed891cfa
src/parser.js
src/parser.js
let AnnotationApi = require('./annotation'); let ScssCommentParser = require('scss-comment-parser'); export default class Parser { constructor (config) { this.annotations = new AnnotationApi(); this.scssParser = new ScssCommentParser(this.annotations.list, config); this.scssParser.commentParser.on('warn...
import AnnotationApi from './annotation'; let ScssCommentParser = require('scss-comment-parser'); export default class Parser { constructor (config) { this.annotations = new AnnotationApi(); this.scssParser = new ScssCommentParser(this.annotations.list, config); this.scssParser.commentParser.on('warning...
Use `import` for ES6 modules
Use `import` for ES6 modules
JavaScript
mit
SassDoc/sassdoc
a34ca531561d7bf5ac609af653887c758eb75e4c
src/lib/isFakeSubreddit.es6.js
src/lib/isFakeSubreddit.es6.js
const randomSubs = ['random', 'randnsfw', 'myrandom']; const fakeSubs = ['all', 'mod', 'friends'].concat(randomSubs); export { fakeSubs, randomSubs }; export default function isFakeSubreddit(subredditName) { return !!subredditName && (subredditName.indexOf('+') > -1 || fakeSubs.includes(subredditName)); }
const randomSubs = ['random', 'randnsfw', 'myrandom']; const fakeSubs = ['all', 'mod', 'friends'].concat(randomSubs); export { fakeSubs, randomSubs }; export default function isFakeSubreddit(subredditName) { return !!subredditName && ( subredditName.indexOf('+') > -1 || subredditName.indexOf('-') > -1 || ...
Revert "Revert "Count filtered r/all as a fake subreddit""
Revert "Revert "Count filtered r/all as a fake subreddit"" This reverts commit 2d8b5dc24fdc677d634edb9ae24f35cdcc8d9aa6.
JavaScript
mit
madbook/reddit-mobile,madbook/reddit-mobile,uzi/reddit-mobile,uzi/reddit-mobile,uzi/reddit-mobile,madbook/reddit-mobile
82fed52c1caa1d635a0b02716e68fa8387525bd3
src/SerialQueue.js
src/SerialQueue.js
;(function (name, definition) { var theModule = definition(), hasDefine = typeof define === 'function' && define.amd, hasExports = typeof module !== 'undefined' && module.exports; if(hasDefine) // AMD Module define(theModule); else if(hasExports) // Node.js Module module.exports = t...
;(function (name, definition) { var theModule = definition(), hasDefine = typeof define === 'function' && define.amd, hasExports = typeof module !== 'undefined' && module.exports; if(hasDefine) // AMD Module define(theModule); else if(hasExports) // Node.js Module module.exports = t...
Add support for task-specific workers
Add support for task-specific workers
JavaScript
unlicense
nischu7/SerialQueue.js
b244c04058afd767d6092ea16c10bc3c4c13f4ed
test/model.js
test/model.js
var async = require("async"); var bay6 = require("../lib/"); var expect = require("chai").expect; var mongoose = require("mongoose"); var request = require("supertest"); describe("Model", function() { var app; var model; beforeEach(function() { app = bay6(); app.options.prefix = ""; model = app.mode...
var async = require("async"); var bay6 = require("../lib/"); var expect = require("chai").expect; var mongoose = require("mongoose"); var request = require("supertest"); describe("Model", function() { var app; var server; var model; beforeEach(function() { app = bay6(); app.options.prefix = ""; mo...
Move populate/get into its own method
Move populate/get into its own method Signed-off-by: Ian Macalinao <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@ian.pw>
JavaScript
mit
simplyianm/bay6
c0ebcd87bff4b9130e594b7a233a7918b40b8346
tests/main.js
tests/main.js
var chai = require("chai"); var expect = chai.expect; var inspect = require("util").inspect; var Cluster = require('../cluster'); var cluster; describe("Init Test Suite", function() { it('should construct an instance', function() { cluster = new Cluster(); }); it('should deploy a worker per CPU co...
var chai = require("chai"); var expect = chai.expect; var inspect = require("util").inspect; var Cluster = require('../cluster'); var cluster; describe("Init Test Suite", function() { it('should construct an instance', function() { cluster = new Cluster(); }); it('should deploy a worker per CPU co...
Set no. of cores test to available CPU cores
Set no. of cores test to available CPU cores
JavaScript
mit
schahriar/supertask-cluster
11bf65be2ff648149e97480a91d787304b9d6cbe
src/server/models/Migration.js
src/server/models/Migration.js
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const database = require('./database'); const db = database.db; const sqlFile = database.sqlFile; class Migratio...
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const database = require('./database'); const db = database.db; const sqlFile = database.sqlFile; class Migratio...
Modify migration model to be correct
Modify migration model to be correct
JavaScript
mpl-2.0
OpenEnergyDashboard/OED,OpenEnergyDashboard/OED,beloitcollegecomputerscience/OED,beloitcollegecomputerscience/OED,OpenEnergyDashboard/OED,beloitcollegecomputerscience/OED,beloitcollegecomputerscience/OED,OpenEnergyDashboard/OED
165bf3fade77f6d05798aaed3d935ffd80b6936b
src/commands/js.js
src/commands/js.js
const config = require("./../config.json"); const MSS = require("./../functions/"); const Sandbox = require("sandbox"); module.exports = function(message) { var s = new Sandbox; if(message.author.id === config.MSS.sysadmin) { let input = message.content.replace (/\n/g, "").split(" "); input[0] = input[0].substr...
const config = require("./../config.json"); const MSS = require("./../functions/"); const Sandbox = require("sandbox"); module.exports = function(message) { var s = new Sandbox; if(message.author.id === config.MSS.sysadmin) { let input = message.content.replace (/\n/g, " ").split(" "); input[0] = input[0].subst...
Put both output and console
Put both output and console
JavaScript
mit
moustacheminer/MSS-Discord,moustacheminer/MSS-Discord,moustacheminer/MSS-Discord
454009f2d6e96859412dbbc288bbf168a6383bb1
src/redux/modules/board.js
src/redux/modules/board.js
import { List } from 'immutable'; import { PLAY_CARD } from './hand'; import { HIT_MINION } from './minion'; // const MAX_CARDS_ON_BOARD = 7; const initialState = new List; function damageMinion(minion, damage) { return minion.set('defense', minion.defense - damage); } export default function boardReducer(state = ...
import { List } from 'immutable'; import { PLAY_CARD } from './hand'; // const MAX_CARDS_ON_BOARD = 7; const initialState = new List; export default function boardReducer(state = initialState, action) { switch (action.type) { case PLAY_CARD: return state.insert(action.boardIndex, action.card.id); defa...
Replace Minions on Board with only id's
Replace Minions on Board with only id's
JavaScript
mit
inooid/react-redux-card-game,inooid/react-redux-card-game
5bde41a567063ba0b17b996e0ef8a1f3e8294eed
src/models/rule.js
src/models/rule.js
'use strict' const ElectronConfig = require('electron-config') const storage = new ElectronConfig() const Rules = require('./rules') class Rule { constructor(key) { this.key = key } exists() { return storage.has(this.key) } retrieve() { if (this.exists()) { return storage.get(this.key) ...
'use strict' const ElectronConfig = require('electron-config') const storage = new ElectronConfig() const Rules = require('./rules') class Rule { constructor(key) { this.key = key } exists() { return storage.has(this.key) } retrieve() { if (this.exists()) { return storage.get(this.key) ...
Add delete to Rule model
Add delete to Rule model
JavaScript
mit
cheshire137/gh-notifications-snoozer,cheshire137/gh-notifications-snoozer
0bdc598f6850b723bd3df79735da5c209404ca32
www/js/RecipeListView.js
www/js/RecipeListView.js
var RecipeListView = function (recipes) { this.initialize = function() { this.$el = $('#content'); if(recipes[0] !== undefined) this.render(); }; this.render = function() { this.$el.html(this.template(recipes)); return this; }; this.initialize(); }
var RecipeListView = function (recipes) { this.initialize = function() { this.$el = $('#content'); if(recipes && recipes[0] !== undefined) this.render(); }; this.render = function() { this.$el.html(this.template(recipes)); return this; }; this.initializ...
Check if recipes are present in recipe list view
Check if recipes are present in recipe list view
JavaScript
mit
enoliglesias/wpreader,enoliglesias/wpreader
127c566cd55400e7eca5d581ed227bc1d8cd1a8e
src/typeChecker.js
src/typeChecker.js
export default function(tokens) { const items = tokens.body; function walk(token) { // If no type exists, continue if (!token || !token.valueType || token.valueType === "let") { return; } const type = token.valueType; const values = token.value; for (let i = 0; i < values.length; i+...
export default function(tokens) { const items = tokens.body; function walk(token) { // If no type exists, continue if (!token || !token.valueType || token.valueType === "let") { return; } const type = token.valueType; const values = token.value; for (let i = 0; i < values.length; i+...
Clean up exception error message
Clean up exception error message
JavaScript
mit
ganderzz/DyLang,ganderzz/DyLang
812f15574f94b0882c99d520b25483c6e777e3c5
bench.js
bench.js
var TIMEOUT = 1000000; module.exports = function (name, options) { describe('', function () { var bench; var title = this.fullTitle(); beforeEach(function () { options = typeof options === 'function' ? { fn: options } : options; options.name = title + name; bench = new Benchmark(option...
var TIMEOUT = 1000000; function hasArguments (fn) { var fnStr = fn.toString(); return (fnStr.indexOf('(') + 1) < fnStr.indexOf(')'); } module.exports = function (name, options) { describe('', function () { var title = this.fullTitle(); if (typeof options === 'function') { options = { fn: options ...
Add ability to specify an async test the same way you do in Mocha except for the fact that it's a deferred object not a function because we can't change that.
Add ability to specify an async test the same way you do in Mocha except for the fact that it's a deferred object not a function because we can't change that.
JavaScript
mit
skatejs/build,skatejs/build
6f2ebba012fce9350c0496e2e1f44796a9273e87
sto-areas/index.js
sto-areas/index.js
import major from './major' import concentration from './concentration' import emphasis from './emphasis' import degree from './degree' export {major, concentration, emphasis, degree}
import major from './major' import concentration from './concentration' import emphasis from './emphasis' import degree from './degree' import _ from 'lodash' let areas = [major, concentration, emphasis, degree] let allAreas = _(areas).map(_.toArray).flatten().value() // console.log(allAreas) /** * Finds an area of ...
Make an initial pass at allowing searching of areas on metadata
Make an initial pass at allowing searching of areas on metadata
JavaScript
agpl-3.0
hawkrives/gobbldygook,hawkrives/gobbldygook,hawkrives/gobbldygook
ae1005556a2a97ec70e4700d73a2b8c8ab8cc061
test/spec/views/layout/main.js
test/spec/views/layout/main.js
(function() { 'use strict'; var root = this; root.define([ 'views/layout/main' ], function(Main) { describe('Main Layout', function () { it('should be an instance of Main Layout', function () { var main = new Main(); expect(main).to.be.an.instanceof(Main); ...
(function() { 'use strict'; var root = this; root.define([ 'views/layout/main' ], function(Main) { describe('Main Layout', function () { it('should be an instance of Main Layout', function () { var main = new Main(); expect(main).to.be.an.instanceof(Main); ...
Fix Main Layout tests run issue.
Fix Main Layout tests run issue.
JavaScript
mit
ssidorchick/game-of-life
c7f53e39646a6b31eb4b73ed952e9927c6619cb7
assets/js/modules/analytics-4/datastore/index.js
assets/js/modules/analytics-4/datastore/index.js
/** * `modules/analytics-4` data store * * Site Kit by Google, Copyright 2021 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/LICEN...
/** * `modules/analytics-4` data store * * Site Kit by Google, Copyright 2021 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/LICEN...
Add properties datastore to the module datastore.
Add properties datastore to the module datastore.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
71571df2dbda5f05d25ea7abd62c9a6b493dd0d3
src/routes/Togglol/components/Togglol.js
src/routes/Togglol/components/Togglol.js
/* @flow */ import React from 'react' import classes from './Togglol.scss' import TogglolCalendar from './TogglolCalendar' import ApiKeyInput from './ApiKeyInput' import type { TimeEntryObject } from '../interfaces/togglol' import type { ProjectObject } from '../interfaces/togglol' type Props = { time_entries:...
/* @flow */ import React from 'react' import TogglolCalendar from './TogglolCalendar' import ApiKeyInput from './ApiKeyInput' import type { TimeEntryObject } from '../interfaces/togglol' import type { ProjectObject } from '../interfaces/togglol' type Props = { time_entries: Array<TimeEntryObject>, user_loade...
Remove ref to deleted file
:ambulance: Remove ref to deleted file
JavaScript
mit
gazab/togglol,gazab/togglol
d57f1892947d079cfa59d36032dd79d9d889f55c
core/client/app/session-stores/application.js
core/client/app/session-stores/application.js
import AdaptiveStore from 'ember-simple-auth/session-stores/adaptive'; export default AdaptiveStore.extend({ localStorageKey: 'ghost:session', cookieName: 'ghost:session' });
import AdaptiveStore from 'ember-simple-auth/session-stores/adaptive'; import ghostPaths from 'ghost/utils/ghost-paths'; const paths = ghostPaths(); const keyName = `ghost${(paths.subdir.indexOf('/') === 0 ? `-${paths.subdir.substr(1)}` : ``) }:session`; export default AdaptiveStore.extend({ localStorageKey: keyN...
Set localStorage key based on subdir
Set localStorage key based on subdir closes #6326
JavaScript
mit
Elektro1776/javaPress,JulienBrks/Ghost,rizkyario/Ghost,vainglori0us/urban-fortnight,JohnONolan/Ghost,Xibao-Lv/Ghost,letsjustfixit/Ghost,janvt/Ghost,jomahoney/Ghost,NovaDevelopGroup/Academy,ballPointPenguin/Ghost,bosung90/Ghost,leonli/ghost,letsjustfixit/Ghost,Trendy/Ghost,sunh3/Ghost,barbastan/Ghost,PeterCxy/Ghost,epic...
1eb7aabd82e458e3480f4af3159727a1ec9aefb4
src/static/MainNavNew/data/aboutItems.js
src/static/MainNavNew/data/aboutItems.js
const items = [ { menu: { header: 'Our Story', link: '/about', activeName: 'about', } }, { menu: { header: 'Team', link: '/about/team', activeName: 'team', } }, { menu: { header: 'Careers', link: '/careers', activeName: 'careers', }...
const items = [ { menu: { header: 'Our Story', link: '/about', activeName: 'about', } }, { menu: { header: 'Team', link: '/about/team', activeName: 'team', } }, { menu: { header: 'Careers', link: '/careers', activeName: 'careers', }...
Add partnerships to main nav
Add partnerships to main nav
JavaScript
mit
policygenius/athenaeum,policygenius/athenaeum,policygenius/athenaeum
4ccc4f1fd6f95b1c7aff9a6780e5e25ca3977cd3
test/matryoshka.js
test/matryoshka.js
var should = require('should'), Matryoshka = require('../lib/').Matryoshka, langs; describe('Matryoshka Packer API', function () { it('should have static method languagePackers to collect packers based on language', function (done) { Matryoshka.languagePackers('js').then(function (cPackers) { cPackers....
var should = require('should'), Matryoshka = require('../lib/').Matryoshka, langs; describe('Matryoshka Packer API', function () { it('should have static method languagePackers to collect packers based on language', function (done) { Matryoshka.languagePackers('js').then(function (cPackers) { cPackers....
Add done to collectLanguages test
Add done to collectLanguages test
JavaScript
unlicense
nodar-chkuaselidze/matryoshka
65cad4789dc6a124dafbf59be431fa5f7bda43ea
src/config/index.js
src/config/index.js
const path = require('path'); const android = require('./android'); const ios = require('./ios'); const findAssets = require('./findAssets'); const getRNPMConfig = (folder) => require(path.join(folder, './package.json')).rnpm || {}; /** * Returns project config from the current working directory * @return {Objec...
const path = require('path'); const android = require('./android'); const ios = require('./ios'); const findAssets = require('./findAssets'); const getRNPMConfig = (folder) => require(path.join(folder, './package.json')).rnpm || {}; /** * Returns project config from the current working directory * @return {Objec...
Allow users to define project assets
Allow users to define project assets
JavaScript
mit
rnpm/rnpm
6588647a124aec308e24008d2801924c711a72da
app/assets/javascripts/views/components/Editor/AlloyEditorComponent.js
app/assets/javascripts/views/components/Editor/AlloyEditorComponent.js
import React, {Component, PropTypes} from 'react'; import AlloyEditor from 'alloyeditor'; export default class AlloyEditorComponent extends Component { componentDidMount() { this._editor = AlloyEditor.editable(this.props.container, this.props.alloyEditorConfig); this._nativeEditor = this._editor.ge...
import React, {Component, PropTypes} from 'react'; import AlloyEditor from 'alloyeditor'; export default class AlloyEditorComponent extends Component { componentDidMount() { this._editor = AlloyEditor.editable(this.props.container, this.props.alloyEditorConfig); this._nativeEditor = this._editor.ge...
Fix bug with alloy deployed to dialog
Fix bug with alloy deployed to dialog
JavaScript
apache-2.0
First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui
9da5d7cf7bc47bafb6b9260c94361484ebbc1286
app/client/templates/projects/activities_buttons/activities_buttons.js
app/client/templates/projects/activities_buttons/activities_buttons.js
/*****************************************************************************/ /* ActivitiesButtons: Event Handlers */ /*****************************************************************************/ Template.ActivitiesButtons.events({ }); /*****************************************************************************/...
import { Activities } from '../../../../lib/collections/activities.js'; /*****************************************************************************/ /* ActivitiesButtons: Event Handlers */ /*****************************************************************************/ Template.ActivitiesButtons.events({ // Laun...
Fix button for activity tabular
Fix button for activity tabular
JavaScript
agpl-3.0
openp2pdesign/OpenMetaDesign,openp2pdesign/OpenMetaDesign,openp2pdesign/OpenMetaDesign
a31a10ba386bbc0129c078791bba05ce1de34e2d
logging_config.js
logging_config.js
/* eslint-disable no-unused-vars, no-var */ // Logging configuration var loggingConfig = { // default log level for the app and lib-jitsi-meet defaultLogLevel: 'trace', // Option to disable LogCollector (which stores the logs on CallStats) // disableLogCollector: true, // The following are too ve...
/* eslint-disable no-unused-vars, no-var */ // Logging configuration var loggingConfig = { // default log level for the app and lib-jitsi-meet defaultLogLevel: 'trace', // Option to disable LogCollector (which stores the logs on CallStats) // disableLogCollector: true, // The following are too ve...
Set the log level to debug again. Plan is to make the Strophe logs more restrictive. Revert "fix(logging) reduce overly vebose logging"
fix(logging): Set the log level to debug again. Plan is to make the Strophe logs more restrictive. Revert "fix(logging) reduce overly vebose logging" This reverts commit 09af88088ded3ab5e8343f6ebedeffc8d752f95f.
JavaScript
apache-2.0
gpolitis/jitsi-meet,gpolitis/jitsi-meet,jitsi/jitsi-meet,gpolitis/jitsi-meet,jitsi/jitsi-meet,gpolitis/jitsi-meet,jitsi/jitsi-meet,gpolitis/jitsi-meet,jitsi/jitsi-meet,jitsi/jitsi-meet,gpolitis/jitsi-meet,jitsi/jitsi-meet,jitsi/jitsi-meet,jitsi/jitsi-meet,gpolitis/jitsi-meet,gpolitis/jitsi-meet
5443fddebddf8f0e8d2ae5a82227710aec42af69
lib/orion/entities/content-pages.js
lib/orion/entities/content-pages.js
// Available sections for content pages var sections = [ {slug: 'about', label: "About"} ]; orion.addEntity('contentPages', { // sectionSlug and slug are used for very simple routing of content pages, see router.js sectionSlug: { type: String, label: 'Section', optional: true, autoform: { t...
// Available sections for content pages var sections = [ {slug: 'about', label: "About"}, {slug: 'donate', label: "Donate"} ]; orion.addEntity('contentPages', { // sectionSlug and slug are used for very simple routing of content pages, see router.js sectionSlug: { type: String, label: 'Section', op...
Add Donate section to admin section selector
Add Donate section to admin section selector
JavaScript
apache-2.0
GeoMakers/geomakers.org,GeoMakers/geomakers.org
f059c9e4b4a84ee6775005261fdf27b5c54f87f9
lib/hash/sha1.js
lib/hash/sha1.js
'use strict'; var Stream = require('stream'); var Transform = Stream.Transform; var crypto = require('crypto'); var ALGORITHM = 'sha1'; var ENCODING = 'hex'; function Sha1Stream() { Transform.call(this); this._hash = crypto.createHash(ALGORITHM); } require('util').inherits(Sha1Stream, Transform); Sha1Stream.p...
'use strict'; var Stream = require('stream'); var Transform = Stream.Transform; var crypto = require('crypto'); var ALGORITHM = 'sha1'; var ENCODING = 'hex'; function Sha1Stream() { Transform.call(this, { objectMode: true }); this._hash = crypto.createHash(ALGORITHM); } require('util').inherits(Sha1Strea...
Fix Sha1Stream return raw buffer
Fix Sha1Stream return raw buffer
JavaScript
mit
aulphar/hexo,DevinLow/DevinLow.github.io,ppker/hexo,leelynd/tapohuck,amobiz/hexo,kywk/hexi,ppker/hexo,hexojs/hexo,iamprasad88/hexo,wangjordy/wangjordy.github.io,hexojs/hexo,noikiy/hexo,wangjordy/wangjordy.github.io,zhipengyan/hexo,kywk/hexi,zhipengyan/hexo,DevinLow/DevinLow.github.io,magicdawn/hexo
8c190b6a4cab04b94ce0646aa20489cbf43d9383
test/spec/NotifierSpec.js
test/spec/NotifierSpec.js
/*global describe, it, expect, TourabuEx, beforeEach */ describe('notifier', function () { 'use strict'; var n = TourabuEx.Notifier; beforeEach(function (done) { var ps = n.defaultParam(); ps.timeout = 2000; ps.onClosed = function () { done(); }; n(ps); ...
/*global describe, it, expect, TourabuEx, beforeEach describe('notifier', function () { 'use strict'; var n = TourabuEx.Notifier; beforeEach(function (done) { var ps = n.defaultParam(); ps.timeout = 2000; ps.onClosed = function () { done(); }; n(ps); ...
Remove the tests that depends on chrome
Remove the tests that depends on chrome
JavaScript
mit
ayachigin/tourabu-extension,ayachigin/tourabu-extension,ayachigin/tourabu-extension