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
5b43248bc50450d0b46f4f98a373168e27cb3d26
generators/jekyll/templates/build.js
generators/jekyll/templates/build.js
'use strict'; const gulp = require('gulp'); const shell = require('shelljs'); const size = require('gulp-size'); const argv = require('yargs').argv; // 'gulp jekyll:tmp' -- copies your Jekyll site to a temporary directory // to be processed gulp.task('site:tmp', () => gulp.src(['src/**/*', '!src/assets/**/*', '!src/...
'use strict'; const gulp = require('gulp'); const shell = require('shelljs'); const size = require('gulp-size'); const argv = require('yargs').argv; // 'gulp jekyll:tmp' -- copies your Jekyll site to a temporary directory // to be processed gulp.task('site:tmp', () => gulp.src(['src/**/*', '!src/assets/**/*', '!src/...
Include dotfiles when copying the site
Include dotfiles when copying the site Part one of fixing issue #141.
JavaScript
mit
sondr3/generator-jekyllized,sondr3/generator-jekyllized,sondr3/generator-jekyllized
6af99b14bdb5d52199e02724316dab6d7f89bccc
app/components/bd-arrival.js
app/components/bd-arrival.js
import Ember from 'ember'; import moment from 'moment'; import stringToHue from 'bus-detective/utils/string-to-hue'; var inject = Ember.inject; export default Ember.Component.extend({ tagName: 'li', clock: inject.service(), attributeBindings: ['style'], classNames: ['arrival'], classNameBindings: ['isPast:ar...
import Ember from 'ember'; import moment from 'moment'; import stringToHue from 'bus-detective/utils/string-to-hue'; var inject = Ember.inject; export default Ember.Component.extend({ tagName: 'li', clock: inject.service(), attributeBindings: ['style'], classNames: ['arrival'], classNameBindings: ['isPast:ar...
Format how time from now is displayed
Format how time from now is displayed
JavaScript
mit
bus-detective/web-client,bus-detective/web-client
b78f0d309bb99255aa229d9f99c94eac5b5b28d5
Gruntfile.js
Gruntfile.js
'use strict'; module.exports = function (grunt) { // Load the project's grunt tasks from a directory require('grunt-config-dir')(grunt, { configDir: require('path').resolve('tasks') }); /* * Register group tasks */ //npm install grunt.registerTask('npm_install', 'install d...
'use strict'; module.exports = function (grunt) { // Load the project's grunt tasks from a directory require('grunt-config-dir')(grunt, { configDir: require('path').resolve('tasks') }); /* * Register group tasks */ //npm install grunt.registerTask('npm_install', 'install d...
Update the zip task to dist and correct api task
Update the zip task to dist and correct api task
JavaScript
cc0-1.0
LinuxBozo/hmda-edit-check-api,cfpb/hmda-edit-check-api,porterbot/hmda-edit-check-api,cfpb/hmda-edit-check-api,LinuxBozo/hmda-edit-check-api
05e6a2d1a58f00a68e61daf0a770fc708835583f
Gruntfile.js
Gruntfile.js
"use strict"; module.exports = function (grunt) { grunt.initConfig({ bump: { options: { files: ["package.json"], commit: true, commitMessage: "Release %VERSION%", commitFiles: ["-a"], createTag: true, ...
"use strict"; module.exports = function (grunt) { grunt.initConfig({ bump: { options: { files: ["package.json"], commit: true, commitMessage: "Release %VERSION%", commitFiles: ["-a"], createTag: true, ...
Clean up node_modules after updating them
Clean up node_modules after updating them
JavaScript
bsd-2-clause
silverwind/droppy,jhliberty/droppy,jhliberty/droppy,silverwind/droppy,silverwind/droppy
a8f422db6e5bf535eee25785b646db9d83352adc
lib/core-components/famous-tests/webgl/custom-shader/fragment/fragment.js
lib/core-components/famous-tests/webgl/custom-shader/fragment/fragment.js
FamousFramework.scene('famous-tests:webgl:custom-shader:fragment', { behaviors: { '.sphere': { 'size': [200, 200], 'align': [0.5, 0.5], 'mount-point': [0.5, 0.5], 'base-color': { 'name': 'sphereFragment', 'glsl': 'vec4(0.0, 1.0,...
FamousFramework.scene('famous-tests:webgl:custom-shader:fragment', { behaviors: { '.sphere': { 'size': [200, 200], 'align': [0.5, 0.5], 'mount-point': [0.5, 0.5], 'base-color': { 'name': 'sphereFragment', 'glsl': 'vec4((v_normal...
Update to use v_normals for color
examples: Update to use v_normals for color
JavaScript
mit
infamous/framework,jeremykenedy/framework,jeremykenedy/framework,infamous/framework,ildarsamit/framework,tbossert/framework,woltemade/framework,SvitlanaShepitsena/shakou,SvitlanaShepitsena/framework-1,infamous/famous-framework,woltemade/framework,colllin/famous-framework,SvitlanaShepitsena/framework,Famous/framework,tb...
a1a20c06648c54a0990e15e532ea7c8bed0b75de
website/src/app/project/experiments/experiment/mc-experiment.component.js
website/src/app/project/experiments/experiment/mc-experiment.component.js
import {Experiment, ExperimentStep} from './experiment.model'; angular.module('materialscommons').component('mcExperiment', { templateUrl: 'app/project/experiments/experiment/mc-experiment.html', controller: MCExperimentComponentController }); /*@ngInject*/ function MCExperimentComponentController($scope, mov...
import {Experiment, ExperimentStep} from './experiment.model'; angular.module('materialscommons').component('mcExperiment', { templateUrl: 'app/project/experiments/experiment/mc-experiment.html', controller: MCExperimentComponentController }); /*@ngInject*/ function MCExperimentComponentController($scope, mov...
Hide the sidebar by default.
Hide the sidebar by default.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
540f0080e15daca76e32ab953d832e3ee057f5e1
src/programs/city/reboot.js
src/programs/city/reboot.js
'use strict' /** * Attempts to prevent stalled rooms by launching filler creeps at 300 energy. */ class CityReboot extends kernel.process { constructor (...args) { super(...args) this.priority = PRIORITIES_CITY_REBOOT } main () { if (!Game.rooms[this.data.room]) { return this.suicide() ...
'use strict' /** * Attempts to prevent stalled rooms by launching filler creeps at 300 energy. */ class CityReboot extends kernel.process { constructor (...args) { super(...args) this.priority = PRIORITIES_CITY_REBOOT } main () { if (!Game.rooms[this.data.room]) { return this.suicide() ...
Reboot when there are no fillers (as opposed to no creeps at all)
Reboot when there are no fillers (as opposed to no creeps at all)
JavaScript
mit
ScreepsQuorum/screeps-quorum
dc16bf8c7824869d86dada016d975f1b8f47370a
simple_model/index.js
simple_model/index.js
function simulateNumericDecision(fleet1, fleet2){ if (fleet1.ships > fleet2.ships) return fleet1; if (fleet1.ships < fleet2.ships) return fleet2; return null; } const orion = { name: 'orion', ships: 295 } const commonwealth = { name: 'commonwealth', ships: 300 } console.log('simulateNumericDecision \nw...
function simulateNumericDecision(fleet1, fleet2){ if (fleet1.ships > fleet2.ships) return fleet1; if (fleet1.ships < fleet2.ships) return fleet2; return null; } const orion = { name: 'orion', ships: 295 } const commonwealth = { name: 'commonwealth', ships: 300 } const hasle = { name: 'commonwealth', ...
Add additional simulations to show different results
Add additional simulations to show different results
JavaScript
mit
julianbei/CollisionModel
b1a2874921524c6ce40c588b114a0109ffc4a0b6
imports/modules/documents/lib/document-editor.js
imports/modules/documents/lib/document-editor.js
/* eslint-disable no-undef */ import { Bert } from 'meteor/themeteorchef:bert'; import { upsertDocument } from '/imports/api/documents/methods'; import '/imports/lib/validation'; let component; const handleUpsert = () => { const { doc, history } = component.props; const confirmation = doc && doc._id ? 'Document m...
/* eslint-disable no-undef */ import { Bert } from 'meteor/themeteorchef:bert'; import { upsertDocument } from '/imports/api/documents/methods'; import '/imports/lib/validation'; let component; const handleUpsert = () => { const { doc, history } = component.props; const confirmation = doc && doc._id ? 'Document m...
Correct french translation module documents
Correct french translation module documents
JavaScript
mit
ggallon/rock,ggallon/rock
f7d2e4b0acf849e850c26f2f45ac5f0850f0bcd1
api/resolver.js
api/resolver.js
module.exports = function(req, res) { console.log('req.body', req.body) var data = JSON.parse(req.body.params); if (!data) { res.status(403 /* Unauthorized */ ).send('Invalid params'); return; } var width = data.width > 600 ? 600 : data.width; var html = '<p><img style="max-width:100%;" src="' + da...
module.exports = function(req, res) { console.log('req.body', req.body) var data = JSON.parse(req.body.params); if (!data) { res.status(403 /* Unauthorized */ ).send('Invalid params'); return; } var width = data.width > 600 ? 600 : data.width; var html = '<img style="max-width:100%;" src="' + data....
Remove paragraph that adds too much padding.
Remove paragraph that adds too much padding.
JavaScript
mit
mixmaxhq/giphy-mixmax-app,mixmaxhq/giphy-mixmax-app
b7da2c005034388176b73e3b38dd4e06912e6ce3
demo-projects/blog/app/lib/init-apollo.js
demo-projects/blog/app/lib/init-apollo.js
import { ApolloClient, InMemoryCache } from 'apollo-boost'; import { createUploadLink } from 'apollo-upload-client'; import fetch from 'isomorphic-unfetch'; let apolloClient = null; let isBrowser = typeof window !== 'undefined'; function create(initialState) { return new ApolloClient({ connectToDevTools: isBro...
import { ApolloClient, InMemoryCache } from 'apollo-boost'; import { createUploadLink } from 'apollo-upload-client'; import fetch from 'isomorphic-unfetch'; let apolloClient = null; let isBrowser = typeof window !== 'undefined'; function create(initialState) { // TODO: server-side requests must have an absolute UR...
Fix apollo client in SSR mode
Fix apollo client in SSR mode
JavaScript
mit
keystonejs/keystone,keystonejs/keystone,keystonejs/keystone
dd0e909385711d3f0ab20e9d0aba3c3b04a2a3bb
assets/js/util/escape-uri.js
assets/js/util/escape-uri.js
/** * Escape URI components utility. * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE...
/** * Escape URI components utility. * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE...
Update jsdoc type for values param of the escapeURI function.
Update jsdoc type for values param of the escapeURI function. Co-authored-by: Evan Mattson <04b4a59aa52dbba0fe4139b6afe8885fd3fa41ec@10up.com>
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
46ae84b8945d2c3ce8585da29e5aedb387421bef
app/prelude2.js
app/prelude2.js
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};var R=(e)=>{var n=t[o][1][e];return s(n?n:e)};R.resolve=(m)=>{console.log('...
//based on https://github.com/substack/browser-pack/blob/01d39894f7168983f66200e727cdaadf881cd39d/prelude.js // modules are defined as an array // [ module function, map of requireuires ] // // map of requireuires is short require name -> numeric require // // anything defined in a previous bundle is accessed via the /...
Add verbose prelude from browser-pack
Add verbose prelude from browser-pack
JavaScript
mit
deathcap/nodeachrome,deathcap/nodeachrome,deathcap/nodeachrome
35fc0b0e4289b2487b485b908b888e584479d71e
modules/random.js
modules/random.js
module.exports = { commands: { random: { help: 'Selects a random choice or number', command: function (bot, msg) { if (msg.args.length > 2) { msg.args.shift() return msg.args[Math.floor(Math.random() * msg.args.length)] } else if (msg.args.length === 2) { ...
module.exports = { commands: { random: { help: 'Selects a random choice or number', command: function (bot, msg) { if (msg.args.length > 2) { msg.args.shift() return msg.args[Math.floor(Math.random() * msg.args.length)] } else if (msg.args.length === 2) { ...
Fix things the linter doesn't like
Fix things the linter doesn't like
JavaScript
isc
zuzakistan/civilservant,zuzakistan/civilservant
2a75acbd9f980e625949ae5238b5959e97b65ed6
lib/client/app/serverslist/serverslist.ctrl.js
lib/client/app/serverslist/serverslist.ctrl.js
class ServersListCtrl { constructor($scope, Servers, Socket) { this.$scope = $scope; this.Servers = Servers; this.socket = Socket; this.init(); } init() { this.servers = []; this.Servers.list() .then((servers) => { this.servers = servers; this.socket.on('server-creat...
class ServersListCtrl { constructor($scope, Servers, Socket) { this.$scope = $scope; this.Servers = Servers; this.socket = Socket; this.init(); } init() { this.servers = []; this.Servers.list() .then((servers) => { this.servers = servers; this.socket.on('server-creat...
Update servers list on remove
Update servers list on remove
JavaScript
mit
adonescunha/monithub,adonescunha/monithub
90aee5473e1911d7572d7af7b4d589d40c294039
test/unit/main.js
test/unit/main.js
'use strict'; describe('controllers', function(){ var scope; beforeEach(module('wallet')); beforeEach(inject(function($rootScope) { scope = $rootScope.$new(); })); it('should define more than 5 awesome things', inject(function($controller) { expect(scope.awesomeThings).toBeUndefined(); $contro...
'use strict'; describe('controllers', function () { var scope, ctrl; beforeEach(module('wallet')); describe('WalletCtrl', function () { beforeEach(inject(function ($rootScope, $controller) { scope = $rootScope.$new(); ctrl = $controller('WalletCtrl', { $scope: scope }); })); ...
Add a couple of unit tests.
Add a couple of unit tests.
JavaScript
mit
tvararu/wallet
cdf59e599720db5f2d66d7f1a76fe6034cabe0d0
src/deep-todo/tests/e2e/Tests/TaskEditing.spec.js
src/deep-todo/tests/e2e/Tests/TaskEditing.spec.js
'use strict'; var TaskList = require('../POMs/TasksList.js'); describe('Check that task name can be updated', function() { beforeAll(function() { TaskList.actionsBeforeAll(); }); it('Adding new task', function() { TaskList.addTask('protractor test task1'); //wait untill all task will be loaded ...
/* global browser */ /* global protractor */ 'use strict'; var TaskList = require('../POMs/TasksList.js'); var config = require('../protractor.config.js'); describe('Check that task name can be updated', function() { beforeAll(function() { TaskList.actionsBeforeAll(); }); it('Adding new task', function(...
Fix hound issues: [ci full]
Fix hound issues: [ci full]
JavaScript
mit
MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todo-app,MitocGroup/deep-microservices-todo-app,MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todo-app
7c049bc980375a3514fbe1091aa23b4eb6cd7e46
node/src/main/vcap-parser.js
node/src/main/vcap-parser.js
'use strict'; function Parser(plugins) { var filterPluginsForServices = function(serviceNames) { return plugins.filter(function (plugin) { return serviceNames.findIndex(function (serviceName) { return plugin.name === serviceName; }) !== -1; }); }...
'use strict'; function Parser(plugins) { var filterPluginsForServices = function(serviceNames) { return plugins.filter(function (plugin) { return serviceNames.findIndex(function (serviceName) { return plugin.name === serviceName; }) !== -1; }); }...
Refactor selecting the plugins to use for parsing.
Refactor selecting the plugins to use for parsing.
JavaScript
mit
mattunderscorechampion/vcap-services-parser
8f29607f0e34a4b3aca69bf51ec4a81dc9a2e4c5
src/main/webapp/js_src/gitana/GitanaAutoConfig.js
src/main/webapp/js_src/gitana/GitanaAutoConfig.js
(function(window) { // if we're running on the Cloud CMS hosted platform, we can auto-acquire the client key that we should use (function() { var uri = window.location.href; var z1 = uri.indexOf(window.location.pathname); z1 = uri.indexOf("/", z1 + 2); if (z1 > -1) { ...
(function(window) { // if we're running on the Cloud CMS hosted platform, we can auto-acquire the client key that we should use (function() { // check to make sure location exists (only available in browsers) if (typeof window.location != "undefined") { var uri = window.loc...
Check for window.location undefined on auto config setup
Check for window.location undefined on auto config setup
JavaScript
apache-2.0
gitana/gitana-javascript-driver,gitana/gitana-javascript-driver,gitana/gitana-javascript-driver
933531dd67dbb8c77e204418dc23149549b14863
javascript/ExternalContent.jquery.js
javascript/ExternalContent.jquery.js
/** * jQuery functionality used on the external content admin page */ ;(function ($, pt) { $().ready(function () { // bind the upload form $('#Form_EditForm_Migrate').click(function () { // we don't want this to be submitted via the edit form, as we want to do an ajax postback for this // and not tie up ...
/** * jQuery functionality used on the external content admin page */ ;(function ($, pt) { $().ready(function () { // bind the upload form $('#Form_EditForm_Migrate').livequery(function () { $(this).click(function () { // we don't want this to be submitted via the edit form, as we want to do an ajax pos...
Make sure to livequery the migrate button...
BUGFIX: Make sure to livequery the migrate button...
JavaScript
bsd-3-clause
nyeholt/silverstripe-external-content,nyeholt/silverstripe-external-content
2e5d48c7ef82bac81dde484c9be6f8c0f3bd7993
mrq/dashboard/static/js/config.js
mrq/dashboard/static/js/config.js
// Set the require.js configuration for your application. require.config({ // Initialize the application with the main application file. deps: ["main"], paths: { // Libraries. circliful: "/static/js/vendor/jquery.circliful.min", jquery: "/static/js/vendor/jquery-2.1.0.min", underscore: "/static...
// Set the require.js configuration for your application. require.config({ // Initialize the application with the main application file. deps: ["main"], paths: { // Libraries. circliful: "/static/js/vendor/jquery.circliful.min", jquery: "/static/js/vendor/jquery-2.1.0.min", underscore: "/static...
Disable cache busting for dashboard
Disable cache busting for dashboard
JavaScript
mit
pricingassistant/mrq,pricingassistant/mrq,pricingassistant/mrq,pricingassistant/mrq
0590c42aa8bc9992e49802863510f4e1a9b03910
server/db/models/UserUrl.js
server/db/models/UserUrl.js
var Sequelize = require("sequelize"); module.exports = function(sequelize, tableConfig) { return sequelize.define('UserUrl', { email: { type: Sequelize.STRING, allowNull: false }, webImage: { type: Sequelize.STRING }, cropImage: { type: Sequelize.STRING, allowNull: f...
var Sequelize = require("sequelize"); module.exports = function(sequelize, tableConfig) { return sequelize.define('UserUrl', { email: { type: Sequelize.STRING, allowNull: false }, webImage: { type: Sequelize.STRING }, cropImage: { type: Sequelize.STRING, allowNull: f...
Set status to default to true
[Refactor] Set status to default to true
JavaScript
mit
TheBlankArrays/Scrapinit,TheBlankArrays/Scrapinit,Nayigiziki/Scrapinit,chrisgrovers/loveBiscuits,Nayigiziki/Scrapinit,chrisgrovers/loveBiscuits
3d7ed00f30f86d4c7bd49fa442111b4668bc1719
packages/@sanity/cli/src/commands/init/initCommand.js
packages/@sanity/cli/src/commands/init/initCommand.js
import lazyRequire from '@sanity/util/lib/lazyRequire' const helpText = ` Options -y, --yes Use unattended mode, accepting defaults and using only flags for choices --project <projectId> Project ID to use for the studio --dataset <dataset> Dataset name for the studio --output-path <path> Path to write studio p...
import lazyRequire from '@sanity/util/lib/lazyRequire' const helpText = ` Options -y, --yes Use unattended mode, accepting defaults and using only flags for choices --project <projectId> Project ID to use for the studio --dataset <dataset> Dataset name for the studio --output-path <path> Path to write studio p...
Improve help text on init command
[cli] Improve help text on init command
JavaScript
mit
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
17168c992d498dba4ef80a23c0897d741e704a2e
frontend/js/components/icons/issueType.js
frontend/js/components/icons/issueType.js
import React from "react"; export const default_icon = "fa fa-circle-o"; export const un_ocha_icon_mapping = { "core-relief-item": "core-relief-item", shelter: "shelter", health: "health", nutrition: "nutrition", "sanitation-water-hygiene": "sanitation-water-hygiene", logistics: "logistics", protection: ...
import React from "react"; export const default_icon = "fa fa-circle-o"; export const un_ocha_icon_mapping = { "core-relief-item": "core-relief-item", shelter: "shelter", health: "health", nutrition: "nutrition", "sanitation-water-hygiene": "sanitation-water-hygiene", logistics: "logistics", protection: ...
Add correct icon class to issuetype
Add correct icon class to issuetype
JavaScript
mit
mcallistersean/b2-issue-tracker,mcallistersean/b2-issue-tracker,mcallistersean/b2-issue-tracker
e245acf55cfd96a2207c16e0d574953234c2cb9e
src/lwc/geFormRenderer/geFormRendererHelper.js
src/lwc/geFormRenderer/geFormRendererHelper.js
export function flatten(obj) { let flatObj = {}; for (const [key, value] of Object.entries(obj)) { if (value !== null && value !== undefined && value.hasOwnProperty('value')) { flatObj[key] = value.value; } else { flatObj[key] = value; } } return flatObj; ...
/** * @description Helper function used to convert an object that has key value pairs where * the value is an object with a value property, i.e. {value: {value:'', displayValue:''}}, * into an object that has primitives as values: {value: ''}. * @param obj The object that has value objects. * @returns An object th...
Add description to flatten function
Add description to flatten function
JavaScript
bsd-3-clause
SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus
5c98a2c1f036a9e9da5555ab7dc8346d84f27a41
public/js/mconsole.js
public/js/mconsole.js
var initMenu=function(){var e="li:not(.toggle-blade-helper)",n=function(e,t){var a=[];return e.children(t).map(function(e,o){var l={key:$(o).data("key")};$(o).children("ul").length>0&&(l.children=n($(o).children("ul"),t)),a.push(l)}),a},t=$("#main-menu");t.sortable({items:e,stop:function(a){var o=n(t,e);console.log(o),...
var initMenu=function(){var e="li:not(.toggle-blade-helper)",n=function(e,t){var a=[];return e.children(t).map(function(e,o){var l={key:$(o).data("key")};$(o).children("ul").length>0&&(l.children=n($(o).children("ul"),t)),a.push(l)}),a},t=$("#main-menu");t.sortable({containment:"parent",items:e,stop:function(a){var o=n...
Sort menus only in parent containment
Sort menus only in parent containment
JavaScript
mit
misterpaladin/mconsole,misterpaladin/mconsole,misterpaladin/mconsole
b94dc0ab580fe2c64e2cfad253b64fc041314b08
packages/sproutcore-runtime/tests/system/run_loop/run_test.js
packages/sproutcore-runtime/tests/system/run_loop/run_test.js
// ========================================================================== // Project: SproutCore Runtime // Copyright: ©2011 Strobe Inc. and contributors. // License: Licensed under MIT license (see license.js) // ========================================================================== module('system/run_loop...
// ========================================================================== // Project: SproutCore Runtime // Copyright: ©2011 Strobe Inc. and contributors. // License: Licensed under MIT license (see license.js) // ========================================================================== module('system/run_loop...
Add unit test for SC.run passing extra arguments to the method.
Add unit test for SC.run passing extra arguments to the method.
JavaScript
mit
amk221/ember.js,patricksrobertson/ember.js,KevinTCoughlin/ember.js,balinterdi/ember.js,omurbilgili/ember.js,szines/ember.js,mdehoog/ember.js,jackiewung/ember.js,zenefits/ember.js,rodrigo-morais/ember.js,emberjs/ember.js,nickiaconis/ember.js,wecc/ember.js,kiwiupover/ember.js,michaelBenin/ember.js,chadhietala/mixonic-emb...
2d96d1d6ab1622a3dd75e6c9cc046c27e40aa6a5
src/utils/isSurroundedBy.js
src/utils/isSurroundedBy.js
import findCounterpartCharacter from './findCounterpartCharacter'; /** * Determines whether a node is surrounded by a matching pair of grouping * characters. * * @param {Object} node * @param {string} left * @returns {boolean} */ export default function isSurroundedBy(node, left, source) { if (source[node.ran...
import findCounterpartCharacter from './findCounterpartCharacter'; /** * Determines whether a node is surrounded by a matching pair of grouping * characters. * * @param {Object} node * @param {string} left * @param {string} source * @returns {boolean} */ export default function isSurroundedBy(node, left, sourc...
Add a missing param doc.
Add a missing param doc.
JavaScript
mit
lunks/decaffeinate,alangpierce/decaffeinate,alangpierce/decaffeinate,greyhwndz/decaffeinate,decaffeinate/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate,eventualbuddha/decaffeinate,netei/decaffeinate,edi9999/decaffeinate,lunks/decaffeinate,eventualbuddha/decaffeinate,netei/decaffeinate
65048ea8efaab4a556347dfa47f5d449c578dace
bin/emblem2hbs.js
bin/emblem2hbs.js
#!/usr/bin/env node require('coffee-script').register() var fs = require('fs'), indentation = require('../lib/indentation'), buf, emblemFile, hbsFile, output; if (process.argv.length < 3) { if (process.stdin.isTTY) { console.log('USAGE: emblem2hbs filetoconvert.emblem or in piped format `pbcopy | emble...
#!/usr/bin/env node require('coffee-script').register() var fs = require('fs'), indentation = require('../lib/indentation'), buf, emblemFile, hbsFile, output; if (process.argv.length < 3) { if (process.stdin.isTTY) { console.log('USAGE: emblem2hbs filetoconvert.emblem or in piped format `pbcopy | emble...
Allow for 2nd argument to be destination filename
Allow for 2nd argument to be destination filename
JavaScript
mit
patientslikeme/emblem2hbs
9fa3bb738ec5261c8cfd263c6d8aa1d3d109c9d5
bin/massive.js
bin/massive.js
#!/usr/bin/env node var repl = require("repl"); var massive = require("../index"); var program = require('commander'); var assert = require("assert"); program .version('0.0.1') .option('-d, --database', 'The local db you want to connect to ') .option('-c, --connection', 'The full connection string') .parse(pr...
#!/usr/bin/env node var repl = require("repl"); var massive = require("../index"); var program = require('commander'); var assert = require("assert"); program .version('0.0.1') .option('-d, --database', 'The local db you want to connect to ') .option('-c, --connection', 'The full connection string') .parse(pr...
Add error handling to initial connection in repl
Add error handling to initial connection in repl
JavaScript
bsd-3-clause
robconery/massive-js
ab4d3f32db159b0c82cd0b734419755ddf738601
public/app/controllers/todo-list.controller.js
public/app/controllers/todo-list.controller.js
(function () { 'use strict'; angular .module('todoList') .controller('todoListCtrl', todoListCtrl); todoListCtrl.$inject = ['TodoListService']; function todoListCtrl(TodoListService) { var vm = this; var corkboard; vm.addTodo = addTodo; // Set up the draggable corkboard TodoLis...
(function () { 'use strict'; angular .module('todoList') .controller('todoListCtrl', todoListCtrl); todoListCtrl.$inject = ['TodoListService']; function todoListCtrl(TodoListService) { var vm = this; var corkboard; vm.addTodo = addTodo; // Set up the draggable corkboard TodoLis...
Fix cursor position on scroll
Fix cursor position on scroll
JavaScript
mit
kennethk91/To-Do-List,kennethk91/To-Do-List
3f3b198723c96cba46e64379813ad455ad6ae972
ajax.js
ajax.js
(function(window){ window.ajax = function(route, options) { var data = options.data || {}, success = options.success || function(response){}, error = options.error || function(response){}, request = new XMLHttpRequest(); request.open(route.method, route.u...
(function(window){ window.ajax = function(route, options) { var data = options.data || {}, success = options.success || function(response){}, error = options.error || function(response){}, request = new XMLHttpRequest(); request.open(route.method, route.u...
Send post data as form-urlencoded
Send post data as form-urlencoded
JavaScript
mit
marceloemanoel/desafioCeJs2014
75ae2b1388669a299ceff0e95ef19f6b522a7205
conf/webpack.prod.config.js
conf/webpack.prod.config.js
var webpack = require("webpack"); var Config = require("webpack-config").Config; module.exports = new Config().extend("conf/webpack.base.config.js").merge({ devtool: "#source-map", plugins: [ new webpack.optimize.DedupePlugin(), new webpack.optimize.OccurrenceOrderPlugin(), new webpack....
var webpack = require("webpack"); var Config = require("webpack-config").Config; module.exports = new Config().extend("conf/webpack.base.config.js").merge({ devtool: "#source-map", plugins: [ new webpack.optimize.DedupePlugin(), new webpack.optimize.OccurrenceOrderPlugin(), new webpack....
Disable Mangling as it does not play well with paralleljs
Disable Mangling as it does not play well with paralleljs
JavaScript
mit
MichaReiser/parallel-es-example,MichaReiser/parallel-es-example,MichaReiser/parallel-es-example,MichaReiser/parallel-es-example,MichaReiser/parallel-es-example
c12adbc809d4a3038be5be5cd72cab65ed236e93
src/app/templates/ts/react/config/webpack.prod.js
src/app/templates/ts/react/config/webpack.prod.js
const webpack = require('webpack'); const webpackMerge = require('webpack-merge'); const commonConfig = require('./webpack.common.js'); const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; module.exports = webpackMerge(commonConfig, { devtool: 'source-map', externals: { 'react': 'React',...
const webpack = require('webpack'); const webpackMerge = require('webpack-merge'); const commonConfig = require('./webpack.common.js'); const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; module.exports = webpackMerge(commonConfig, { devtool: 'source-map', externals: { 'react': 'React',...
Fix duplicate key in webpack config
Fix duplicate key in webpack config Fix that `compress` key appears twice in `webpack.optimize.UglifyJsPlugin` params.
JavaScript
mit
OfficeDev/generator-office
9ea68515b1371990d5353d7657444f7bf324d5a7
js/GameInit.js
js/GameInit.js
/* * Object that contains Game initialization data. */ export default class { constructor(canvasWidth, canvasHeight) { this.gameInits = {}; this._generateInitialSettings(canvasWidth, canvasHeight); } _generateInitialSettings(canvasWidth, canvasHeight) { this.gameInits.paddle = (()=> { let w...
/* * Object that contains Game initialization data. */ export default class { constructor(canvasWidth, canvasHeight) { this.gameInits = {}; this._generateInitialSettings(canvasWidth, canvasHeight); } _generateInitialSettings(canvasWidth, canvasHeight) { this.gameInits.paddle = (()=> { let w...
Make ball start by flying upwards
Make ball start by flying upwards
JavaScript
mit
BAJ-/robot-breakout,BAJ-/robot-breakout
2a27f0e7d82ba6a410d7183a15457719d4d5df15
js/settings.js
js/settings.js
$(document).ready(function(){ $("#backbtn-settings").click({ param: 'route_view' }, showView); // first button in settings is to reset favoritelist // an empty list gets assigned to the favoritelist in localforage $("#clearbtn").click(function(){ localforage.setItem("favList",[],function(err){}); ...
$(document).ready(function(){ $("#backbtn-settings").click({ param: 'route_view' }, showView); // first button in settings is to reset favoritelist // an empty list gets assigned to the favoritelist in localforage $("#clearbtn").click(function(){ localforage.setItem("favList",[],function(err){}); ...
Fix reload after FavList clear to show changes immediately.
Fix reload after FavList clear to show changes immediately.
JavaScript
apache-2.0
jonny-en/KoblenzBus,jonny-en/KoblenzBus
6a4c8185b053d82b4f3eef707a038262247102bd
bs-config.js
bs-config.js
module.exports = { // browser: 'google chrome', reloadDelay: 250, open: false, files: ['build/*.css', 'build/*.js', 'build/*.html'], server: { baseDir: './build', }, notify: false, }
module.exports = { // browser: 'google chrome', open: false, files: ['build/*.css', 'build/*.js', 'build/*.html'], server: { baseDir: './build', }, notify: false, }
Remove the browser-sync reload delay
Remove the browser-sync reload delay
JavaScript
agpl-3.0
hawkrives/gobbldygook,hawkrives/gobbldygook,hawkrives/gobbldygook
abb61893261347174fd6055ab2013f2113ed2472
test/rules/bodySelectors.js
test/rules/bodySelectors.js
exports.tests = [ { css: '.foo body > h2 {}', metrics: { redundantBodySelectors: 1 } }, { css: 'body ul li a {}', metrics: { redundantBodySelectors: 1 } }, { css: 'body#foo ul li a {}', metrics: { redundantBodySelectors: 1 } }, { css: 'body > h1 {}', metrics: { redundantBodySele...
exports.tests = [ { css: '.foo body > h2 {}', metrics: { redundantBodySelectors: 1 } }, { css: 'body ul li a {}', metrics: { redundantBodySelectors: 1 } }, { css: 'body#foo ul li a {}', metrics: { redundantBodySelectors: 1 } }, { css: 'body > h1 {}', metrics: { redundantBodySele...
Add a unit test case
Add a unit test case
JavaScript
bsd-2-clause
macbre/analyze-css,gmetais/analyze-css,macbre/analyze-css
5165725d3230135f16cf7cdd178d93be88c8dc7a
webpack.config.production.js
webpack.config.production.js
var Clean = require('clean-webpack-plugin'), ExtractTextPlugin = require('extract-text-webpack-plugin'), webpack = require('webpack'), webpackConfig = require('webpack-config'); var config = webpackConfig.fromCwd().merge({ output: { filename: 'videojs.chapter-thumbnail...
var Clean = require('clean-webpack-plugin'), ExtractTextPlugin = require('extract-text-webpack-plugin'), webpack = require('webpack'), webpackConfig = require('webpack-config'); var config = webpackConfig.fromCwd().merge({ output: { filename: 'videojs.chapter-thumbnail...
Remove comments from minified version.
chore(webpack): Remove comments from minified version.
JavaScript
mit
chemoish/videojs-chapter-thumbnails,chemoish/videojs-chapter-thumbnails
e80f8d4096642746c44bfb80540e65901360493b
options.js
options.js
"use strict"; if (typeof localStorage !== "undefined"){ for(var key in localStorage){ if (localStorage.hasOwnProperty(key) && key != "debug") exports[key] = localStorage[key]; } } exports.register = function(opt, ele, nopersist){ var field = ele.type == "checkbox" ? "checked" : "value"; if (exports[opt]) ele[fiel...
"use strict"; if (typeof localStorage !== "undefined"){ for(var key in localStorage){ if (localStorage.hasOwnProperty(key) && key != "debug") exports[key] = localStorage[key]; } } exports.register = function(opt, ele, nopersist){ var field = ele.type == "checkbox" ? "checked" : "value"; if (exports[opt]) ele[fiel...
Revert using input event, change seems good enough
Revert using input event, change seems good enough
JavaScript
mit
serprex/openEtG,serprex/openEtG
5ba467a94ebbb66c18786ed81604612956bdb615
packages/engine/src/markers/style.js
packages/engine/src/markers/style.js
import { camelToDash } from '@hybrids/core/src/utils'; import { error } from '../debug'; export default function style({ node, expr }, ...propertyNames) { if (!propertyNames.length) { return (list, { type: globalType, oldValue, changelog }) => { switch (globalType) { case 'modify': Object...
import { error } from '../debug'; function camelToDash(str) { return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); } export default function style({ node, expr }, ...propertyNames) { if (!propertyNames.length) { return (list, { type: globalType, oldValue, changelog }) => { switch (globalType) {...
Fix remove core source dependency
Fix remove core source dependency
JavaScript
mit
hybridsjs/hybrids
8b3d516638836e7a824b7ebbf03a5efe7564792f
test/unit/testDownload_2.js
test/unit/testDownload_2.js
'use strict'; var jf = require('../../'), expect = require('chai').expect, http = require('http'); var count = 0; function testValue(){ count ++; return { num: count } } let server = http.createServer( (request, response) => { response.writeHead(200, {'Content-Type': 'application/json'}); re...
'use strict'; var jf = require('../../'), expect = require('chai').expect, http = require('http'); var count = 0; function testValue(){ count ++; return { num: count } } let server = http.createServer( (request, response) => { response.writeHead(200, {'Content-Type': 'application/json'}); re...
Fix bug of test code
Fix bug of test code
JavaScript
bsd-3-clause
7k8m/json.filed,7k8m/json.filed
7e6b130061ea2d778ce6ac954329f7c0e63d7bec
client/4minitz.js
client/4minitz.js
import { Meteor } from 'meteor/meteor' Meteor.startup(function () { $.material.init(); }); Meteor.call("gitVersionInfoUpdate");
import { Meteor } from 'meteor/meteor' Meteor.call("gitVersionInfoUpdate");
Remove startup code because $.material is undefined
Remove startup code because $.material is undefined There is no material design yet and on the material design branch this is also deleted
JavaScript
mit
RobNeXX/4minitz,Huggle77/4minitz,4minitz/4minitz,4minitz/4minitz,4minitz/4minitz,Huggle77/4minitz,Huggle77/4minitz,RobNeXX/4minitz,RobNeXX/4minitz
a9a8631584407a0c67cd24c6f0a7a83be3d71585
app/assets/javascripts/components/verify-button.js
app/assets/javascripts/components/verify-button.js
ManageIQ.angular.app.component('verifyButton', { bindings: { validate: '<', enabled: '<', validateUrl: '@', restful: '<', valtype: '<', buttonLabels: '<', }, controllerAs: 'vm', controller: ['$scope', function($scope) { $scope.__ = __; var vm = this; vm.findScope = function(...
ManageIQ.angular.app.component('verifyButton', { bindings: { validate: '<', enabled: '<', validateUrl: '@', restful: '<', valtype: '<', buttonLabels: '<', }, controllerAs: 'vm', controller: ['$scope', function($scope) { $scope.__ = __; var vm = this; vm.findScope = function(...
Remove trailing comma syntax error
Remove trailing comma syntax error
JavaScript
apache-2.0
ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic
58adf61de75b551d72601eef7f2179897bf99732
src/game/GameScene.js
src/game/GameScene.js
var GameLayer = cc.Layer.extend({ ctor:function () { // this._super(); var gameLayer = ccs.load(res.GameScene_json); this.addChild(gameLayer.node) } }); var GameScene = cc.Scene.extend({ onEnter:function() { this._super(); var layer = new GameLayer(); this.addChild(layer); } });
var GameLayer = cc.Layer.extend({ ctor:function () { // this._super(); var bkg = new cc.LayerColor(cc.color.WHITE); this.addChild(bkg); var gameLayer = ccs.load(res.GameScene_json); this.addChild(gameLayer.node); } }); var GameScene = cc.Scene.extend({ onEnter:function() { this._super(); var laye...
Add background for game scene
Add background for game scene
JavaScript
mit
darkdukey/PeriodicQuest,darkdukey/PeriodicQuest
c8081bb7f8c20e59fe91b53191fb72e71df354ef
src/client/app/controllers/SearchController.js
src/client/app/controllers/SearchController.js
/*globals angular, console*/ /** * @author lattmann / https://github.com/lattmann */ angular.module('RequirementsApp').controller('SearchController', function (SearchService, $scope) { 'use strict'; var self = this; console.log('SearchController'); $scope.model = { data: {} }; $sc...
/*globals angular, console*/ /** * @author lattmann / https://github.com/lattmann */ angular.module('RequirementsApp').controller('SearchController', function (SearchService, $scope, $location) { 'use strict'; var self = this; console.log('SearchController'); $scope.model = { data: {} ...
Update search query in the url.
Update search query in the url.
JavaScript
mit
dynamics-team/requirements-editor,dynamics-team/requirements-editor,dynamics-team/requirements-editor,dynamics-team/requirements-editor
b2d9b294026e2d7d2cb1652fcf9f6e90a531f600
config-example.js
config-example.js
/** * Ripple Client Configuration * * Copy this file to config.js and edit to suit your preferences. */ var Options = { server: { "trusted" : true, "websocket_ip" : "127.0.0.1", "websocket_port" : 5006, "websocket_ssl" : false }, blobvault : "54.243.129.146:80", // If set, login will persis...
/** * Ripple Client Configuration * * Copy this file to config.js and edit to suit your preferences. */ var Options = { server: { "trusted" : true, "websocket_ip" : "s1.ripple.com", "websocket_port" : 51233, "websocket_ssl" : true // "websocket_ip" : "127.0.0.1", // "websocket_port" : 5006, ...
Add s1 as the default server in the example config.
Add s1 as the default server in the example config.
JavaScript
isc
xdv/ripple-client-desktop,thics/ripple-client-desktop,vhpoet/ripple-client,resilience-me/DEPRICATED_ripple-client,h0vhannes/ripple-client,MatthewPhinney/ripple-client,h0vhannes/ripple-client,arturomc/ripple-client,ripple/ripple-client,h0vhannes/ripple-client,darkdarkdragon/ripple-client,ripple/ripple-client-desktop,res...
46c62aa4945b646742815d42857cc6c661b246e3
.eslintrc.js
.eslintrc.js
module.exports = { parser: 'babel-eslint', extends: ['airbnb-base', 'prettier'], plugins: ['prettier'], globals: { Promise: true }, env: { node: true }, rules: { 'comma-dangle': 'off', 'import/prefer-default-export': ['warn'], 'function-paren-newline': ['error', 'consistent'], 'p...
module.exports = { parser: 'babel-eslint', extends: ['airbnb-base', 'prettier'], plugins: ['prettier'], globals: { Promise: true }, env: { jest: true, // https://stackoverflow.com/a/40265356/586382 node: true }, rules: { 'comma-dangle': 'off', 'import/prefer-default-export': ['warn'...
Remove linting errors due to `jest` globals
Remove linting errors due to `jest` globals
JavaScript
mit
jevakallio/redux-offline,redux-offline/redux-offline
2a66c8aff08e9638c31c94e64ef96151db56596b
client/reducers/index.js
client/reducers/index.js
import { combineReducers } from 'redux'; import { routerReducer } from 'react-router-redux'; const rootReducer = combineReducers({ routing: routerReducer }); export default rootReducer;
import { combineReducers } from 'redux'; import { routerReducer } from 'react-router-redux'; import { reducer as formReducer } from 'redux-form'; const rootReducer = combineReducers({ form: formReducer, routing: routerReducer }); export default rootReducer;
Create root reducer for the application
Create root reducer for the application
JavaScript
mit
amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books
d2ef89c404a03d1823d3aec4237509ba46e40cc5
.eslintrc.js
.eslintrc.js
module.exports = { root: true, parser: 'babel-eslint', parserOptions: { sourceType: 'module' }, // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style extends: 'standard', // required to lint *.vue files plugins: [ 'html' ], // add your custom rules here 'rule...
module.exports = { root: true, parser: 'babel-eslint', parserOptions: { sourceType: 'module' }, // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style extends: 'standard', // required to lint *.vue files plugins: [ 'html' ], // add your custom rules here 'rule...
Remove no-multi-spaces rule from eslint
Remove no-multi-spaces rule from eslint
JavaScript
mit
melonmanchan/reaktor-chat-client,melonmanchan/reaktor-chat-client
26cf0aef62fdadac3ea9697adc1242f4a2dc49ff
Kwc/Advanced/IntegratorTemplate/Embed/Component.js
Kwc/Advanced/IntegratorTemplate/Embed/Component.js
'use strict'; var $ = require('jQuery'); var onReady = require('kwf/on-ready'); var BaseUrl = require('kwf/base-url'); onReady.onRender('.kwcClass', function(el) { //if embed template is used turn all xhr into cross domain xhr $.ajaxPrefilter(function(options) { if (options.url.substr(0, 1) == '/') { ...
'use strict'; var $ = require('jQuery'); var onReady = require('kwf/on-ready'); var BaseUrl = require('kwf/base-url'); onReady.onRender('.kwcClass', function(el) { //if embed template is used turn all xhr into cross domain xhr $.ajaxPrefilter(function(options) { if (options.url.substr(0, 1) == '/') { ...
Fix getting baseUrl from component-div
Fix getting baseUrl from component-div
JavaScript
bsd-2-clause
koala-framework/koala-framework,koala-framework/koala-framework
c87d8ba8845e686e9323c99445bdd6ddf2627c74
.eslintrc.js
.eslintrc.js
module.exports = { extends: 'fyndiq', rules: { // This rules causes issues because of nested packages.json, disabling 'import/no-extraneous-dependencies': 0, 'jsx-a11y/label-has-for': ['error', { required: { every: ['nesting'], }, }], }, }
module.exports = { extends: 'fyndiq', rules: { // These rules causes issues because of nested packages.json, disabling 'import/no-extraneous-dependencies': 0, 'import/no-unresolved': [2, { ignore: ['@storybook/react'] }], 'import/extensions': [2, { ignorePackages: true }], 'jsx-a11y/label-has-f...
Tweak eslint config to ignore problematic packages
:see_no_evil: Tweak eslint config to ignore problematic packages
JavaScript
mit
fyndiq/fyndiq-ui,fyndiq/fyndiq-ui
e6a577658d1d06abfc8b3efa753575188b39812f
promise.js
promise.js
module.exports = global.Promise if (!module.exports) { try { module.exports = require('bluebird') } catch (_) {} }
try { module.exports = require('bluebird') } catch (_) { module.exports = global.Promise }
Add attempt to require bluebird first
Add attempt to require bluebird first
JavaScript
mit
rstacruz/native-or-bluebird,normalize/native-or-bluebird
078673dfa568f7ddf9c1dec8b19d91995da91b35
proxy_server.js
proxy_server.js
var Proxy = require('./proxy'); var RouterClient = require('./router_client'); var ServiceRegistryClient = require('./service_registry_client'); var VersionClient = require('./version_client'); var port = process.env.PORT || 4001; var opts = { host: process.env.COREOS_PRIVATE_IPV4 }; var serviceRegistryClient = ne...
var Proxy = require('./proxy'); var RouterClient = require('./router_client'); var ServiceRegistryClient = require('./service_registry_client'); var VersionClient = require('./version_client'); var port = process.env.PORT || 4001; var opts = { host: process.env.COREOS_PRIVATE_IPV4 }; // allow a list of peers to be...
Allow env option to pass in a list of etcd peers
Allow env option to pass in a list of etcd peers
JavaScript
apache-2.0
zettajs/link-router,zettajs/link-router
bc0cb8e9849b4f8f1866065436934203ef0ecc91
js/setListHeight.js
js/setListHeight.js
//Source: http://stackoverflow.com/questions/3837037/div-with-scrollbar-inside-div-with-positionfixed (function($) { $.fn.getPotentialHeight = function() { var $element = this; //heightOfParent is the height of parents content (inside the padding) var heightOfParent = $element.parent().height(...
//Source: http://stackoverflow.com/questions/3837037/div-with-scrollbar-inside-div-with-positionfixed (function($) { $.fn.getPotentialHeight = function() { var $element = this; //heightOfParent is the height of parents content (inside the padding) var heightOfParent = $element.parent().height(...
Set height info wrapper to 100%
Set height info wrapper to 100%
JavaScript
mit
sjbuysse/sessions-map,sjbuysse/sessions-map
dbfca4cb557ebe45e1b81ddbe37785e35b9513a8
webpack/webpack.build.js
webpack/webpack.build.js
var path = require("path"); var webpack = require("webpack"); var DtsBundlePlugin = require("./webpack.dts.plugin"); module.exports = { entry: { main: "./src/index", }, resolve: { extensions: [".ts"], }, output: { filename: "trapezium.js", }, module: { ru...
var path = require("path"); var webpack = require("webpack"); var DtsBundlePlugin = require("./webpack.dts.plugin"); module.exports = { entry: { main: "./src/index", }, resolve: { extensions: [".ts"], }, output: { filename: "trapezium.js", libraryTarget: "commonjs...
Add libraryTarget to make module exportable
Add libraryTarget to make module exportable
JavaScript
mit
Josh-ES/trapezium,Josh-ES/trapezium,Josh-ES/trapezium
1319e5d2f7010d68db5df3c090474aba190edaaf
queries.js
queries.js
const promise = require('bluebird'); const options = { promiseLib: promise }; const pgp = require('pg-promise')(options); const connectionString = 'postgres://localhost:5432/todos'; const db = pgp(connectionString); let getAllTodos = (req, res, next) => { db.any('SELECT * FROM todos') .then(data => { r...
Add function to get all todos
Add function to get all todos
JavaScript
mit
spencerdezartsmith/to-do-list-app,spencerdezartsmith/to-do-list-app
2f1a460b80e30451e3bb502079c9477889e271d9
src/knockout-hint.js
src/knockout-hint.js
(function(win, doc, $, ko){ var options = { hiddenClass: 'hidden' }; ko.bindingHandlers.hint = { init:function (element, valueAccessor, allBindingsAccessor) { var observable = valueAccessor(), hintOptions = allBindingsAccessor().hintOptions, cssCl...
(function(win, doc, $, ko){ var options = { hiddenClass: 'hidden' }; ko.bindingHandlers.hint = { init:function (element, valueAccessor, allBindingsAccessor) { var observable = valueAccessor(), hintOptions = allBindingsAccessor().hintOptions, cssCl...
Clean hint logic from copy/paste
Clean hint logic from copy/paste
JavaScript
mit
s-stude/knockout-hint
169ae6727f388814d211a4ac029d66560df2d6bb
src/ui-preferences/ContainerPreferenceGroup.js
src/ui-preferences/ContainerPreferenceGroup.js
import ContextualIdentities from '../ContextualIdentity'; import PreferenceGroup from './PreferenceGroup'; import ContainerPreference from './ContainerPreference'; /** * Contains a @see{ContainerPreference} for each existing container */ export default class ContainerPreferenceGroup extends PreferenceGroup { cons...
import ContextualIdentities from '../ContextualIdentity'; import PreferenceGroup from './PreferenceGroup'; import ContainerPreference from './ContainerPreference'; /** * Contains a @see{ContainerPreference} for each existing container */ export default class ContainerPreferenceGroup extends PreferenceGroup { cons...
Use the correct variable for ContainerPreference names
Use the correct variable for ContainerPreference names
JavaScript
mit
kintesh/containerise,kintesh/containerise
7002a6583915ad000faf0edb7f2943e768199d43
Identity/MonadIdentity.js
Identity/MonadIdentity.js
var Identity = require('./Identity'); module.exports = { pure : function(x){ return new Identity(x); }, copure : function(idx){ return idx.val; } }
var Identity = require('./Identity'); module.exports = { pure : function(x){ return new Identity(x); }, copure : function(idx){ if(!(idx instanceof Identity && idx.type === 'Identity')){ throw new Error('Expected type Identity in first argument of MonadIdentity.copure, but got ' + typeof idx); } ...
Add error detection in Identity.cobind
Add error detection in Identity.cobind
JavaScript
mit
5outh/famine
342a1a88d2cc9494ba9889465074ab45167b4cd2
lib/open-tests.js
lib/open-tests.js
'use babel'; import { CompositeDisposable } from 'atom'; import fs from 'fs'; export default { modalPanel: null, subscriptions: null, config: { shouldCreateFile: { type: 'boolean', default: true, }, testExtension: { type: 'string', default: '.spec', }, }, activate(s...
'use babel'; import { CompositeDisposable } from 'atom'; import fs from 'fs'; export default { modalPanel: null, subscriptions: null, config: { shouldCreateFile: { type: 'boolean', default: true, }, testExtension: { type: 'string', default: '.spec', }, }, activate(s...
Split code in separate function
refactor: Split code in separate function
JavaScript
mit
guilhermelimak/open-tests
c4c8f60870627a8790039073562b45c61d0f1b09
src/components/icons/Resume.js
src/components/icons/Resume.js
import React from 'react' export const ResumeIcon = ({ className, ...props }) => ( <svg {...props} className={`text-resume ${className}`} role="img" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" > <title>Resume</title> <path stro...
import React from 'react' export const ResumeIcon = ({ className, ...props }) => ( <svg {...props} className={`text-resume ${className}`} role="img" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" > <title>Resume PDF</title> <path ...
Change PDF to icon title
Change PDF to icon title
JavaScript
mit
dtjv/dtjv.github.io
ab91ec6c0a3a56c6741ea4ff872528d2062dcd14
tests/helpers/start-app.js
tests/helpers/start-app.js
import Ember from 'ember'; import Application from '../../app'; import config from '../../config/environment'; export default function startApp(attrs) { let application; // use defaults, but you can override let attributes = Ember.assign({}, config.APP, attrs); Ember.run(() => { application = Application...
import Ember from 'ember'; import Application from '../../app'; import config from '../../config/environment'; export default function startApp(attrs) { let application; let attributes = Ember.merge({}, config.APP); attributes = Ember.merge(attributes, attrs); // use defaults, but you can override; Ember.run...
Fix Ember 2.4 test failures
Fix Ember 2.4 test failures
JavaScript
mit
IvyApp/ivy-tabs,IvyApp/ivy-tabs
8734bf9d679646e4c01758698fce66dac62e4ca3
lib/xmlbuilder.js
lib/xmlbuilder.js
module.exports = require('xmlbuilder'); module.exports.XMLFragment = require('xmlbuilder/lib/XMLFragment'); module.exports.XMLFragment.prototype.addFragment = function(fragment) { fragment.parent = this; this.children.push(fragment); return this; }; // This is a workaround for the problem that text() does not w...
module.exports = require('xmlbuilder'); module.exports.XMLFragment = require('xmlbuilder/lib/XMLFragment'); module.exports.XMLFragment.prototype.addFragment = function(fragments) { if (fragments) { if (!Array.isArray(fragments)) fragments = [fragments]; fragments.forEach(function(fragment) { frag...
Support null and array for addFragment()
Support null and array for addFragment()
JavaScript
mit
groonga/gcs,groonga/gcs
70a62f0eda926daec87632849836c1b70fdcc554
tests/server/roles.spec.js
tests/server/roles.spec.js
// Write a test that validates that a new role created has a unique title. // Write a test that validates that all roles are returned when Roles.all is called. 'use strict'; const expect = require('chai').expect; const supertest = require('supertest'); const server = require('./../../index'); const api = ...
Implement basic tests for roles
Implement basic tests for roles
JavaScript
mit
andela-oolutola/document-management-system-api
2c5ddda8d285c33f45e63e487eb3086169a9b1d0
src/js/controllers/channels.js
src/js/controllers/channels.js
(function() { 'use strict'; angular.module('app.controllers.channels', []). controller('Channels', Channels); Channels.$inject = ['$rootScope', 'chat']; function Channels($rootScope, chat) { var vm = this; $rootScope.selected = '#roomtest'; vm.select = function(cha...
(function() { 'use strict'; angular.module('app.controllers.channels', []). controller('Channels', Channels); Channels.$inject = ['$rootScope', 'chat']; function Channels($rootScope, chat) { var vm = this; $rootScope.selected = '#roomtest'; vm.select = function(cha...
Fix vex dialog being off topic
Fix vex dialog being off topic
JavaScript
mit
BigRoom/mystique,BigRoom/mystique
a0a7b64abff749d6abc61529300a7d6416cc797b
src/plugins/index.js
src/plugins/index.js
module.exports = function(app) { require('./storage/url')(app); };
module.exports = function(app) { require('./storage/url')(app); require('./storage/s3')(app); require('./storage/dropbox')(app); };
Add links to storage providers.
Add links to storage providers.
JavaScript
mit
Kelsus/ngFormio,Kelsus/ngFormio,formio/ngFormio
cbc488e92500dbb534dde3f2535fd684c5b99016
src/server/router.js
src/server/router.js
'use strict'; const api = require('api'); const router = require('koa-router')(); router.get('/search/em', function*() { const value = +this.query.value; if (!value) { return error(this, 'missing value'); } const options = {}; if (this.query.limit) options.limit = +this.query.limit; i...
'use strict'; const api = require('api'); const router = require('koa-router')(); router.get('/search/em', function*() { const value = +this.query.value; if (!value) { return error(this, 'missing value'); } const options = {}; if (this.query.limit) options.limit = +this.query.limit; i...
Add route for molecule mf
Add route for molecule mf
JavaScript
mit
cheminfo/node-pubchem
6677136c15c7e81b8e295de68f6d3e1b551987c6
server/index.js
server/index.js
var express = require('express') , app = express() , http = require('http').Server(app) , Q = require('q'); var ROOT = GLOBAL.proj_root , SENDFILE_OPTS = { root: ROOT } , PORT = 55221 , START_TIMEOUT = 5; // Static content app.use('/components', express.static(ROOT + '/components')); app.use('/dist', express.st...
var express = require('express') , app = express() , http = require('http').Server(app) , Q = require('q'); var ROOT = GLOBAL.proj_root , SENDFILE_OPTS = { root: ROOT } , PORT = 55221 , START_TIMEOUT = 5; // Static content app.use('/components', express.static(ROOT + '/components')); app.use('/dist', express.st...
Make http server listen only on localhost
Make http server listen only on localhost
JavaScript
mit
cobalamin/dripdownode
a9a521aa44cd8e683b913df75d1b27123e0a66d0
timepiece/static/timepiece/js/chart/productivity_chart.js
timepiece/static/timepiece/js/chart/productivity_chart.js
var scripts = document.getElementsByTagName('script'), script = scripts[scripts.length - 1], report = JSON.parse(script.getAttribute('data-report')), type = script.getAttribute('data-type'); google.load('visualization', '1.0', {'packages':['corechart']}); google.setOnLoadCallback(drawChart); function draw...
var scripts = document.getElementsByTagName('script'), script = scripts[scripts.length - 1], report = JSON.parse(script.getAttribute('data-report')), type = script.getAttribute('data-type'); google.load('visualization', '1.0', {'packages':['corechart']}); google.setOnLoadCallback(drawChart); function draw...
Use default text when no data exists for query
Use default text when no data exists for query
JavaScript
mit
BocuStudio/django-timepiece,caktus/django-timepiece,dannybrowne86/django-timepiece,dannybrowne86/django-timepiece,josesanch/django-timepiece,arbitrahj/django-timepiece,caktus/django-timepiece,caktus/django-timepiece,arbitrahj/django-timepiece,gaga3966/django-timepiece,dannybrowne86/django-timepiece,gaga3966/django-time...
e7d43b2bc3acaf3d890bd37eca48bcc2bc728988
server.js
server.js
const express = require('express') const app = express() const path = require('path') const nunjucks = require('nunjucks') module.exports = app // Set up App const appViews = [ path.join(__dirname, '/app/views/'), path.join(__dirname, '/app/templates/') ] nunjucks.configure(appViews, { autoescape: true, expr...
const express = require('express') const app = express() const path = require('path') const nunjucks = require('nunjucks') module.exports = app // Set up App const appViews = [ path.join(__dirname, '/app/views/'), path.join(__dirname, '/app/templates/'), path.join(__dirname, '/app/components/') ] nunjucks.conf...
Configure app to include a components folder
Configure app to include a components folder
JavaScript
mit
alphagov/govuk_frontend_alpha,alphagov/govuk_frontend_alpha,alphagov/govuk_frontend_alpha
dc44b411fb78ac2b761e82b7f81011ec61d065c4
src/webui/src/main/webapp/js/loading.js
src/webui/src/main/webapp/js/loading.js
/** * */ $(document).ready(function() { var processCheckerUrl = 'AlignmentChecker?id=' + getUrlParameter('id'); (function poll() { $.ajax({ url : processCheckerUrl, type: "GET", success : function(responseText) { // TODO - redirect to correct page var redirectUrl = 'AligmentResultServ...
/** * */ $(document).ready(function() { var processCheckerUrl = 'AlignmentChecker?id=' + getUrlParameter('id'); (function poll() { $.ajax({ url : processCheckerUrl, type: "GET", statusCode: { 200: function (responseText) { // TODO - redirect to correct page var redire...
Manage only 200 success answer for show results
[FIX] Manage only 200 success answer for show results
JavaScript
apache-2.0
SALSA-W/M-SALSA,SALSA-W/M-SALSA,SALSA-W/M-SALSA,SALSA-W/M-SALSA,SALSA-W/M-SALSA
5426209388cd10500151cbd7136d8437fd36e483
src/bootstrap/createStore.js
src/bootstrap/createStore.js
import {applyMiddleware, compose, createStore as rawCreateStore} from 'redux'; import {persistStore, autoRehydrate} from 'redux-persist'; import createSagaMiddleware from 'redux-saga'; import createRootReducer from './createRootReducer'; import rootSaga from './rootSaga'; import {APP_NAME} from '../modules/common/const...
import {applyMiddleware, compose, createStore as rawCreateStore} from 'redux'; import {persistStore, autoRehydrate} from 'redux-persist'; import createSagaMiddleware from 'redux-saga'; import createRootReducer from './createRootReducer'; import rootSaga from './rootSaga'; import {APP_NAME} from '../modules/common/const...
Add persist language in local storage
Add persist language in local storage
JavaScript
mit
nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map
f963425d95973d726705835ec463003673f7c2a3
src/components/video_list.js
src/components/video_list.js
import React from 'react'; import VideoListItem from './video_list_item'; const VideoList = (props) => { const videoItems = props.videos.map((video) => { return <VideoListItem video = {video} /> }); return ( <ul className="col-md-4 list-group"> {videoItems} </ul> ); } export default VideoLi...
import React from 'react'; import VideoListItem from './video_list_item'; const VideoList = (props) => { const videoItems = props.videos.map((video) => { return <VideoListItem key={video.etag} video={video} /> }); return ( <ul className="col-md-4 list-group"> {videoItems} </ul> ); } export ...
Add keys to each video item
Add keys to each video item
JavaScript
mit
izabelka/redux-simple-starter,izabelka/redux-simple-starter
44128c849cdeb74ac658fb40cdad7259f4ebbf77
src/config.js
src/config.js
const env = process.env; export const nodeEnv = env.NODE_ENV || 'development'; export default { port: env.PORT || 3001, host: env.HOST || '0.0.0.0', get serverUrl() { return `http://${this.host}:${this.port}`; } };
const env = process.env; export const nodeEnv = env.NODE_ENV || 'development'; export default { port: env.API_PORT || 3001, host: env.API_HOST || '0.0.0.0', get serverUrl() { return (typeof window === 'undefined') ? `http://${this.host}:${this.port}` : ''; } };
Update server: split api & app
Update server: split api & app
JavaScript
mit
hrasoa/react-pwa,hrasoa/react-pwa,hrasoa/react-pwa
96f8fc68343389c15dc6cc02409485ce5fb60e81
src/components/PageRouter/index.js
src/components/PageRouter/index.js
import React from 'react'; import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; import { NavigationBar } from '../NavigationBar'; import { PageHome } from '../PageHome'; import { PageLogin } from '../PageLogin'; import { NoRouteMatch } from '../NoRouteMatch'; const PageRouter = () => ( ...
import React from 'react'; import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; import firebase from 'firebase'; import { NavigationBar } from '../NavigationBar'; import { PageHome } from '../PageHome'; import { PageLogin } from '../PageLogin'; import { NoRouteMatch } from '../NoRouteMatch';...
Add firebase auth event listener
Add firebase auth event listener
JavaScript
apache-2.0
nahody/biografia,nahody/biografia
b04bb087adc8914391d5bdebc1471d833c5e3c00
src/foam/swift/refines/Requires.js
src/foam/swift/refines/Requires.js
/** * @license * Copyright 2017 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ refines: 'foam.core.Requires', flags: ['swift'], requires: [ 'foam.swift.Argument', 'foam.swift.Method', ], properties: [ { name: 'swiftReturns', exp...
/** * @license * Copyright 2017 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ refines: 'foam.core.Requires', flags: ['swift'], requires: [ 'foam.swift.Argument', 'foam.swift.Method', ], properties: [ { name: 'swiftReturns', exp...
Add 2nd parameter to create that's generated for requires that allows you to overwrite context.
Add 2nd parameter to create that's generated for requires that allows you to overwrite context.
JavaScript
apache-2.0
foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2
8b1071b55c32343dc4c427924959361a127d970e
test/algorithms/math/testGCD.js
test/algorithms/math/testGCD.js
/* eslint-env mocha */ const gcd = require('../../../src').algorithms.math.gcd; const assert = require('assert'); describe('GCD', () => { it('should return 0 for either or both numbers as 0', () => { assert.equal(gcd(0, 10), 0); assert.equal(gcd(10, 0), 0); assert.equal(gcd(0, 0), 0); }); it('shoul...
/* eslint-env mocha */ const gcd = require('../../../src').algorithms.math.gcd; const assert = require('assert'); describe('GCD', () => { it('should return 0 for either or both numbers as 0', () => { assert.equal(gcd(0, 10), 0); assert.equal(gcd(10, 0), 0); assert.equal(gcd(0, 0), 0); }); it('shoul...
Test GCD: Tests handling of negative numbers
Test GCD: Tests handling of negative numbers
JavaScript
mit
ManrajGrover/algorithms-js
124541264f788091dfc754696df8448769c7a0a7
tasks/build.js
tasks/build.js
// imports var gulp = require('gulp'); var browserify = require('browserify'); var source = require('vinyl-source-stream'); var uglify = require('gulp-uglify'); var buffer = require('vinyl-buffer'); // build src gulp.task('browserify', function(cb){ return browserify('./src/app.js', { debug: ...
// imports var gulp = require('gulp'); var browserify = require('browserify'); var source = require('vinyl-source-stream'); var uglify = require('gulp-uglify'); var buffer = require('vinyl-buffer'); // build src gulp.task('browserify', function(cb){ return browserify('./src/app.js', { debug: ...
Update path fonts gulp task
Update path fonts gulp task
JavaScript
mit
microscope-mobile/ionic-firebase,microscope-mobile/ionic-firebase,microscope-mobile/ionic-firebase,microscope-mobile/ionic-firebase,microscope-mobile/ionic-firebase
aeb7aeeb4e335b885e71eec5da68819983d3402d
app/assets/javascripts/reducers/wikidata_labels.js
app/assets/javascripts/reducers/wikidata_labels.js
import { forEach } from 'lodash-es'; import { RECEIVE_WIKIDATA_LABELS } from '../constants'; const initialState = { labels: {} }; export default function wikidataLabels(state = initialState, action) { switch (action.type) { case RECEIVE_WIKIDATA_LABELS: { const newLabels = { ...state.labels }; for...
import { forEach } from 'lodash-es'; import { RECEIVE_WIKIDATA_LABELS } from '../constants'; const initialState = { labels: {} }; export default function wikidataLabels(state = initialState, action) { switch (action.type) { case RECEIVE_WIKIDATA_LABELS: { const newLabels = { ...state.labels }; for...
Fix error caused by a deleted Wikidata item
Fix error caused by a deleted Wikidata item If an edited item was deleted, the request for labels for that item will not include a `labels` property for it.
JavaScript
mit
WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard
38d94b51f8446e61a7adceac410ce0bff28de6fc
packages/sproutcore-handlebars/lib/controls/checkbox.js
packages/sproutcore-handlebars/lib/controls/checkbox.js
// ========================================================================== // Project: SproutCore Handlebar Views // Copyright: ©2011 Strobe Inc. and contributors. // License: Licensed under MIT license (see license.js) // ========================================================================== require("sprou...
// ========================================================================== // Project: SproutCore Handlebar Views // Copyright: ©2011 Strobe Inc. and contributors. // License: Licensed under MIT license (see license.js) // ========================================================================== require("sprou...
Fix SC.Checkbox bug in IE
Fix SC.Checkbox bug in IE
JavaScript
mit
code0100fun/ember.js,wecc/ember.js,JacobNinja/es6,xtian/ember.js,workmanw/ember.js,mfeckie/ember.js,Serabe/ember.js,jherdman/ember.js,paddyobrien/ember.js,Zagorakiss/ember.js,cbou/ember.js,kellyselden/ember.js,johanneswuerbach/ember.js,johnnyshields/ember.js,mrjavascript/ember.js,gfvcastro/ember.js,marcioj/ember.js,pix...
79e07cd02beb910d16c6f80210f1da1f905f1487
src/providers/domestika.org.js
src/providers/domestika.org.js
import JobProvider from './jobProvider' export default class extends JobProvider { constructor() { super({ id: 'dmtk', name: 'domestika.org', logo: 'http://4.bp.blogspot.com/-_ntAal9lU2I/T3XBljnauCI/AAAAAAAAAWo/kS3eJcZZQvs/s490/domestika-logo.gif', scope: 'ul.jobs-list li.job-item', ...
import JobProvider from './jobProvider' export default class extends JobProvider { constructor() { super({ id: 'dmtk', name: 'domestika.org', logo: 'http://4.bp.blogspot.com/-_ntAal9lU2I/T3XBljnauCI/AAAAAAAAAWo/kS3eJcZZQvs/s490/domestika-logo.gif', scope: 'ul.jobs-list li.job-item', ...
Fix on scrap link for domestika provider
Fix on scrap link for domestika provider
JavaScript
mit
xcafebabe/jobsify,xcafebabe/jobsify,xcafebabe/jobsify
66cee3efb8e1c9e4dfab6ca33f4534023909fbf6
react-native/react/constants/platform.native.desktop.js
react-native/react/constants/platform.native.desktop.js
import {OS_DESKTOP} from './platform.shared' import path from 'path' export const isDev = process.env.NODE_ENV === 'development' export const OS = OS_DESKTOP export const isMobile = false const runMode = process.env.KEYBASE_RUN_MODE || 'devel' const envedPathOSX = { staging: 'KeybaseStaging', devel: 'KeybaseDevel...
import {OS_DESKTOP} from './platform.shared' import path from 'path' export const isDev = process.env.NODE_ENV === 'development' export const OS = OS_DESKTOP export const isMobile = false const runMode = process.env.KEYBASE_RUN_MODE || 'devel' const envedPathOSX = { staging: 'KeybaseStaging', devel: 'KeybaseDevel...
Support prod runmode on Linux
Support prod runmode on Linux (On Linux the service doesn't append .prod if it's prod, for some reason.)
JavaScript
bsd-3-clause
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
e9d96c7a4af0c8a973dfed0a009da39cd30d06a9
resources/frontend/app/pods/tournament/matches/route.js
resources/frontend/app/pods/tournament/matches/route.js
import Ember from 'ember'; import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin'; export default Ember.Route.extend(ApplicationRouteMixin, { model() { const tournamentId = this.modelFor('tournament').get('id'); return this.store.query('match', {tournamentId}); }, setupControlle...
import Ember from 'ember'; import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin'; const { Route, RSVP } = Ember; export default Route.extend(ApplicationRouteMixin, { model() { const tournamentId = this.modelFor('tournament').get('id'); let rsvpHash = { matches: this.get('stor...
Load teams on the first load of the tournament matches page
Load teams on the first load of the tournament matches page
JavaScript
mit
nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf
1113d8d922fca15167d897decb5383569dff5c73
js/participantFilter/datasetView.directive.js
js/participantFilter/datasetView.directive.js
'use strict'; module.exports = DatasetView; /** @ngInject **/ function DatasetView() { return { scope: { participant: '=', dataset: '=', onEdit: '&' }, template: require('./datasetView.directive.html'), controllerAs: 'vm', bindToController: true, /** @ngInject **/ cont...
'use strict'; module.exports = DatasetView; /** @ngInject **/ function DatasetView() { return { scope: { participant: '=', dataset: '=', onEdit: '&' }, template: require('./datasetView.directive.html'), controllerAs: 'vm', bindToController: true, /** @ngInject **/ cont...
Fix labels using lookups (introduced in 0.0.4)
Fix labels using lookups (introduced in 0.0.4)
JavaScript
mit
spikeheap/labking,spikeheap/labking
a64fccdeb92494b9d500571c242969c2dada93bb
src/dataviews/category-dataview/category-model-range.js
src/dataviews/category-dataview/category-model-range.js
var _ = require('underscore'); var Model = require('../../core/model'); /** * This model is used for getting the total amount of values * from the category. * */ module.exports = Model.extend({ defaults: { url: '', totalCount: 0, categoriesCount: 0 }, url: function () { var url = this.get...
var _ = require('underscore'); var Model = require('../../core/model'); /** * This model is used for getting the total amount of values * from the category. * */ module.exports = Model.extend({ defaults: { url: '', totalCount: 0, categoriesCount: 0 }, url: function () { var url = this.get...
Fix widget url generation when missing apikey and authtoken
Fix widget url generation when missing apikey and authtoken
JavaScript
bsd-3-clause
splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js
8921a630e7b036cc6be4fa048ed493c98f44a776
extend.js
extend.js
/* Example usage: var A = Class(function() { var defaults = { foo: 'cat', bar: 'dum' } this.init = function(opts) { opts = std.extend(opts, defaults) this._foo = opts.foo this._bar = opts.bar } this.getFoo = function() { return this._foo } this.getBar = function() { return th...
/* Example usage: var A = Class(function() { var defaults = { foo: 'cat', bar: 'dum' } this.init = function(opts) { opts = std.extend(opts, defaults) this._foo = opts.foo this._bar = opts.bar } this.getFoo = function() { return this._foo } this.getBar = function() { return th...
Use copy instead of create for easier debugging
Use copy instead of create for easier debugging
JavaScript
mit
ASAPPinc/std.js,marcuswestin/std.js
f53acc88c6a492c4c50c779157f66882df8440f8
src/routes.js
src/routes.js
'use strict'; let Games = require('./games.js'); let uuid = require('node-uuid'); let games = new Games(uuid.v4); exports.registerRoutes = app => { app.get('/api/stats', (request, response) => { response.send(games.getAllPlayerStats()); }); app.post('/api/player', (request, response) => { ...
'use strict'; let Games = require('./games.js'); let uuid = require('node-uuid'); let games = new Games(uuid.v4); exports.registerRoutes = app => { app.get('/api', (request, response) => { response.send({ name: "REST Mastermind server", endpoints: [ { endpoint: '/api/stats', met...
Create base api endpoint and adjust player stats path
Create base api endpoint and adjust player stats path
JavaScript
mit
allan-stewart/rest-mastermind,allan-stewart/rest-mastermind
0b23fe3209f1f2fbdbfff533b512729902b58561
modules/utils/EnterLeaveCounter.js
modules/utils/EnterLeaveCounter.js
import union from 'lodash/array/union'; import without from 'lodash/array/without'; export default class EnterLeaveCounter { constructor() { this.entered = []; } enter(enteringNode) { this.entered = union( this.entered.filter(node => document.body.contains(node) && (!node.contains ...
import union from 'lodash/array/union'; import without from 'lodash/array/without'; export default class EnterLeaveCounter { constructor() { this.entered = []; } enter(enteringNode) { this.entered = union( this.entered.filter(node => document.documentElement.contains(node) && (!nod...
Fix an edge case when a file is dropped outside <body>
Fix an edge case when a file is dropped outside <body>
JavaScript
mit
cesarandreu/react-dnd,zetkin/react-dnd,jgable/react-dnd,konce/react-dnd,randrianov/react-dnd,ntdb/react-dnd,hiddentao/react-dnd,craigklem/react-dnd,globexdesigns/react-dnd,nagaozen/react-dnd,Reggino/react-dnd,zetkin/react-dnd,srajko/react-dnd,jowcy/react-dnd,colbyr/react-dnd,tylercollier/react-dnd-demo,pairyo/react-dnd...
00e5aed30567bdea05c21938dd28b1a534ab3c36
src/global/modules.js
src/global/modules.js
import logger from '../logger' const openedModules = {} const hotModules = {} const createHotModule = () => ({ instances: [], updateTimeout: 0 }) export const hotModule = moduleId => { if (!hotModules[moduleId]) { hotModules[moduleId] = createHotModule() } return hotModules[moduleId] } export const isOpe...
import logger from '../logger' const openedModules = {} const hotModules = {} const createHotModule = () => ({ instances: [], updateTimeout: 0 }) export const hotModule = moduleId => { if (!hotModules[moduleId]) { hotModules[moduleId] = createHotModule() } return hotModules[moduleId] } export const isOpe...
Fix grammar mistake in commment
Fix grammar mistake in commment
JavaScript
mit
gaearon/react-hot-loader,gaearon/react-hot-loader
a76f3e4211a34579e7e74a98643f39b2eba53196
entity.js
entity.js
const createTransform = require('./transform') const assert = require('assert') let entityId = 0 function Entity (components, tags, renderer) { assert(!tags || Array.isArray(tags), 'Entity tags must be an array or null') this.id = entityId++ this.tags = tags || [] this.renderer = renderer this.components =...
const createTransform = require('./transform') const assert = require('assert') let entityId = 0 function Entity (components, tags, renderer) { assert(!tags || Array.isArray(tags), 'Entity tags must be an array or null') this.id = entityId++ this.tags = tags || [] this.renderer = renderer this.components =...
Add hashmap for fast components lookups
Add hashmap for fast components lookups
JavaScript
mit
pex-gl/pex-renderer,pex-gl/pex-renderer
110063b2d89c89317f6a11ae045627ddaa58391e
backend/server/db/model/processes.spec.js
backend/server/db/model/processes.spec.js
describe('Processes', function() { 'use strict'; let atf = require('../../specs/atf'); let ropts = { db: 'mctest', port: 30815 }; let r = require('rethinkdbdash')(ropts); let p = require('./processes')(r); describe('#create', function() { it('should do something', f...
describe('Processes', function() { 'use strict'; let atf = require('../../specs/atf'); let ropts = { db: 'mctest', port: 30815 }; let r = require('rethinkdbdash')(ropts); let p = require('./processes')(r); describe('#create', function() { it('should create a process...
Set up a valid process to begin testing against.
Set up a valid process to begin testing against.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
f7f2386be131d66cbfe4e8ae6588171a1c511042
blueprints/ember-cli-tooltipster/index.js
blueprints/ember-cli-tooltipster/index.js
/*jshint node:true*/ module.exports = { description: 'ember-cli-tooltipster', normalizeEntityName: function() { // this prevents an error when the entityName is not specified }, afterInstall: function( /*options*/ ) { return this.addPackageToProject([{ name: 'tooltipster', target: '4.2.2' ...
/*jshint node:true*/ module.exports = { description: 'ember-cli-tooltipster', normalizeEntityName: function() { // this prevents an error when the entityName is not specified }, afterInstall: function( /*options*/ ) { return this.addPackagesToProject([{ name: 'tooltipster', target: '4.2.2' ...
Fix addPackagesToProject in blueprint afterInstall
Fix addPackagesToProject in blueprint afterInstall
JavaScript
mit
altrim/ember-cli-tooltipster,altrim/ember-cli-tooltipster
788d1d26a052fdbf2a6d5be5653c0cf0e2e7b2c1
server.js
server.js
// Copyright (c) Martin Costello, 2017. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. var AlexaAppServer = require("alexa-app-server"); var env = require("node-env-file"); env(__dirname + "/.env"); console.log("TfL App Id :", pro...
// Copyright (c) Martin Costello, 2017. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. var AlexaAppServer = require("alexa-app-server"); var env = require("node-env-file"); var path = require("path"); env(path.join(__dirname, ".env...
Use path instead of concatenation
Use path instead of concatenation Use path.join() instead of string concatenation.
JavaScript
apache-2.0
martincostello/alexa-london-travel
479582c83b164ef8802401b3bb1cde1beb75b44e
src/lib/lint.js
src/lib/lint.js
"use strict" import Context from "./context" import ShadowTree from "./shadowtree" class Lint { constructor(tree, filename = null, namespace = []) { Object.assign( this, { filename: filename, namespace: namespace, tree: tree, ...
"use strict" import Context from "./context" import ShadowTree from "./shadowtree" import PHPStrictError from "./phpstricterror" class Lint { static get PHPStrictError() { return PHPStrictError } static get ShadowTree() { return ShadowTree } constructor(tree, filename = null, names...
Use static properties for the sub-items
Use static properties for the sub-items
JavaScript
bsd-2-clause
jj101k/php-lint,jj101k/php-lint
4a07b40ee7010a4cff5d1d1a092cd657dfa0efa1
src/App.js
src/App.js
import React from 'react'; import axios from 'axios'; class App extends React.Component { render() { return ( <Abc/> ) } } class Abc extends React.Component { render() { return ( <div> <button onClick={this.getList}>get List</button> </div> ) } getList() { axio...
import React from 'react'; import axios from 'axios'; class App extends React.Component { render() { return ( <SiteList/> ) } } class SiteInfo extends React.Component { render() { return( <li>{this.props.rId} - {this.props.url}, {this.props.count}, {this.props.creation}, {th...
Add get list ui and feature
Add get list ui and feature
JavaScript
mit
junorouse/valid-xss-checker,junorouse/valid-xss-checker
ad7fe2e1971062b92355463655e4032df4f5590d
shared/docs.js
shared/docs.js
// Scans your stylesheet for pseudo classes and adds a class with the same name. // Thanks to Knyle Style Sheets for the idea. (function () { 'use strict'; var toArray = function(arr) { return Array.prototype.slice.call(arr, 0); }; var add = function(a, b) { return a + b; }; // Compile regular expression. var pse...
// Scans your stylesheet for pseudo classes and adds a class with the same name. // Thanks to Knyle Style Sheets for the idea. (function () { 'use strict'; var toArray = function(arr) { return Array.prototype.slice.call(arr, 0); }; var add = function(a, b) { return a + b; }; // Compile regular expression. var pseudo...
Remove bonzo and qwery dependencies
Remove bonzo and qwery dependencies
JavaScript
mit
trungnghia112/styledocco,paulwellnerbou/styledocco,paulwellnerbou/styledocco,jacobrask/styledocco,ooooooo-q/styledocco,ooooooo-q/styledocco,trungnghia112/styledocco
a8374d7bc31e55ca865952e96087860ba7c08cf3
test/spec/spec-smoothScroll.js
test/spec/spec-smoothScroll.js
describe('Smooth Scroll', function () { describe('init', function () { it('should include the smoothScroll module', function () { expect(!!smoothScroll).toBe(true); }); }); });
describe('Smooth Scroll', function () { describe('API', function () { it('should export the smoothScroll module', function () { expect(smoothScroll).toBeDefined(); }); it('should expose public functions', function () { expect(smoothScroll.init).toEqual(jasmine.any(F...
Add simple public API tests
Add simple public API tests
JavaScript
mit
iksi/smooth-scroll,krrg/smooth-scroll,outsourceage/smooth-scroll,fussinatto/smooth-scroll,cferdinandi/smooth-scroll,krrg/smooth-scroll,iksi/smooth-scroll,hadrienl/smooth-scroll,SevInf/smooth-scroll,zonayedpca/smooth-scroll,mig1098/smooth-scroll,fussinatto/smooth-scroll,SevInf/smooth-scroll,outsourceage/smooth-scroll,cf...
81b3bb412604f6d372389a02c09b0e23cb924b7a
Packages/ohif-measurements/client/lib/toggleLabelButton.js
Packages/ohif-measurements/client/lib/toggleLabelButton.js
import { Template } from 'meteor/templating'; import { Blaze } from 'meteor/blaze'; import { OHIF } from 'meteor/ohif:core'; const toolMap = { bidirectional: 'targets' }; OHIF.measurements.toggleLabelButton = options => { const removeButtonView = () => { if (!options.instance.buttonView) { ...
import { Template } from 'meteor/templating'; import { Blaze } from 'meteor/blaze'; import { OHIF } from 'meteor/ohif:core'; const toolMap = { bidirectional: 'targets' }; OHIF.measurements.toggleLabelButton = options => { const removeButtonView = () => { if (!options.instance.buttonView) { ...
Fix bug with loading measurement flow
LT-275: Fix bug with loading measurement flow
JavaScript
mit
OHIF/Viewers,OHIF/Viewers,OHIF/Viewers
0a9a3389c33e82b39c5ac19b132eef8fcbe1aee7
Gulpfile.js
Gulpfile.js
const gulp = require('gulp'); const config = require('config'); const runner = require('punchcard-runner'); const options = runner.config({ application: { library: { src: [ 'lib', 'config', 'content-types', 'input-plugins' ], } }, tasks: { nodemon: { ...
const gulp = require('gulp'); const config = require('config'); const runner = require('punchcard-runner'); const concat = require('gulp-concat'); const uglify = require('gulp-uglify'); const imagemin = require('gulp-imagemin'); const path = require('path'); const options = runner.config({ application: { library...
Fix Punchcard JS and images compilation
:bug: Fix Punchcard JS and images compilation
JavaScript
apache-2.0
punchcard-cms/demo,punchcard-cms/demo