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
66c0d320a73c792dfeca3a7f783c9f8c180bb1b0
app/assets/javascripts/modules/enable-aria-controls.js
app/assets/javascripts/modules/enable-aria-controls.js
window.GOVUK = window.GOVUK || {} window.GOVUK.Modules = window.GOVUK.Modules || {}; (function (GOVUK) { 'use strict' GOVUK.Modules.EnableAriaControls = function EnableAriaControls () { this.start = function (element) { element.find('[data-aria-controls]').each(enableAriaControls) function enable...
window.GOVUK = window.GOVUK || {} window.GOVUK.Modules = window.GOVUK.Modules || {}; (function (GOVUK) { 'use strict' GOVUK.Modules.EnableAriaControls = function EnableAriaControls () { this.start = function (element) { var $controls = element[0].querySelectorAll('[data-aria-controls]') for (var i...
Remove JQuery from EnableAriaControls module
Remove JQuery from EnableAriaControls module We're using an old and unsupported version of jQuery for browser support reasons. Rather than upgrade, it's far better to remove our dependence. jQuery makes writing JavaScript easier, but it doesn't do anything that you can't do with vanilla JavaScript, because it's all w...
JavaScript
mit
alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend
557c5a62d82c86efed996e468183a4e0688ff987
meteor/client/helpers/router.js
meteor/client/helpers/router.js
/* ---------------------------------------------------- +/ ## Client Router ## Client-side Router. /+ ---------------------------------------------------- */ // Config Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', }); // Filters var filters = { my...
/* ---------------------------------------------------- +/ ## Client Router ## Client-side Router. /+ ---------------------------------------------------- */ // Config Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', }); // Filters var filters = { my...
Make the locations view the homepage
Make the locations view the homepage This is our main base.
JavaScript
mit
scimusmn/sd-scrapbook,scimusmn/sd-scrapbook,scimusmn/sd-scrapbook
51c5761d4d0d7ed74fef80ca9277d529912b862d
packages/babel-plugin-relay/getSchemaIntrospection.js
packages/babel-plugin-relay/getSchemaIntrospection.js
/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ 'use strict'; const fs = require('fs'); const path = require('path'); const {SCHEMA_EXTENSION} = require('./Gra...
/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ 'use strict'; const fs = require('fs'); const path = require('path'); const {SCHEMA_EXTENSION} = require('./Gra...
Remove support for parsing legacy interfaces
Remove support for parsing legacy interfaces Reviewed By: kassens Differential Revision: D6972027 fbshipit-source-id: 6af12e0fad969b8f0a8348c17347cec07f2047b2
JavaScript
mit
xuorig/relay,facebook/relay,cpojer/relay,xuorig/relay,freiksenet/relay,xuorig/relay,wincent/relay,iamchenxin/relay,cpojer/relay,facebook/relay,kassens/relay,dbslone/relay,voideanvalue/relay,josephsavona/relay,zpao/relay,dbslone/relay,facebook/relay,wincent/relay,atxwebs/relay,yungsters/relay,voideanvalue/relay,atxwebs/...
129b28981a813f8965c98f619cc220ca71468343
lib/deferredchain.js
lib/deferredchain.js
function DeferredChain() { var self = this; this.chain = new Promise(function(accept, reject) { self._accept = accept; self._reject = reject; }); this.await = new Promise(function() { self._done = arguments[0]; }); this.started = false; }; DeferredChain.prototype.then = function(fn) { var se...
function DeferredChain() { var self = this; this.chain = new Promise(function(accept, reject) { self._accept = accept; self._reject = reject; }); this.await = new Promise(function() { self._done = arguments[0]; self._error = arguments[1]; }); this.started = false; }; DeferredChain.prototyp...
Fix issue where errors aren't being propagated.
Fix issue where errors aren't being propagated.
JavaScript
mit
prashantpawar/truffle,DigixGlobal/truffle
eea12ffb865c76519476e8c339e2bbd56423ab4d
source/renderer/app/containers/static/AboutDialog.js
source/renderer/app/containers/static/AboutDialog.js
// @flow import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import ReactModal from 'react-modal'; import About from '../../components/static/About'; import styles from './AboutDialog.scss'; import type { InjectedDialogContainerProps } from '../../types/injectedPropsType'; type Pro...
// @flow import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import ReactModal from 'react-modal'; import About from '../../components/static/About'; import styles from './AboutDialog.scss'; import type { InjectedDialogContainerProps } from '../../types/injectedPropsType'; type Pro...
Implement new About dialog design
[DDW-608] Implement new About dialog design
JavaScript
apache-2.0
input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus
9118e1d29e4d3e9d0c6cfb12a02700c39ac8513b
etc/notebook/custom/custom.js
etc/notebook/custom/custom.js
/* JupyROOT JS */ // Terminal button $(document).ready(function() { var terminalURL = "/terminals/1"; var re = new RegExp(".+\/user\/([a-z0-9]+)\/.+", "g"); if (re.test(document.URL)) { // We have been spawned by JupyterHub, add the user name to the URL var user = document.URL.replace(re, "...
/* JupyROOT JS */ // Terminal button $(document).ready(function() { var terminalURL = "/terminals/1"; var re = new RegExp(".+\/user\/([a-z0-9]+)\/.+", "g"); if (re.test(document.URL)) { // We have been spawned by JupyterHub, add the user name to the URL var user = document.URL.replace(re, "...
Set %%cpp highlighting for root --notebook
Set %%cpp highlighting for root --notebook
JavaScript
lgpl-2.1
mhuwiler/rootauto,root-mirror/root,mhuwiler/rootauto,karies/root,simonpf/root,karies/root,olifre/root,karies/root,simonpf/root,root-mirror/root,zzxuanyuan/root,simonpf/root,mhuwiler/rootauto,olifre/root,zzxuanyuan/root,olifre/root,olifre/root,olifre/root,zzxuanyuan/root,olifre/root,karies/root,simonpf/root,simonpf/root...
99d332faca68dedf51f31b9fda60ea9672b66126
app/assets/javascripts/global/views/questions.js
app/assets/javascripts/global/views/questions.js
app = app || {}; app.QuestionView = Backbone.View.extend({ template: _.template( $('#question_template').html() ), events: {}, initialize: function(){}, render: function(){} });
Add basic outline to Backbone question view -define template -empty events -empty initialize -empty render
Add basic outline to Backbone question view -define template -empty events -empty initialize -empty render
JavaScript
cc0-1.0
red-spotted-newts-2014/food-overflow,red-spotted-newts-2014/food-overflow
47bd5107690ab5b34cd210a6a45942b4b469e6ba
src/utils/data3d/load.js
src/utils/data3d/load.js
import fetch from '../io/fetch.js' import decodeBuffer from './decode-buffer.js' export default function loadData3d (url, options) { return fetch(url, options).then(function(res){ return res.arrayBuffer() }).then(function(buffer){ return decodeBuffer(buffer, { url: url }) }) }
import fetch from '../io/fetch.js' import decodeBuffer from './decode-buffer.js' export default function loadData3d (url, options) { return fetch(url, options).then(function(res){ return res.buffer() }).then(function(buffer){ return decodeBuffer(buffer, { url: url }) }) }
Use buffer() instead of arrayBuffer()
Use buffer() instead of arrayBuffer()
JavaScript
mit
archilogic-com/3dio-js,archilogic-com/3dio-js
fa0c582c42f81d4f94a4e2fdc16ac7df9bf1d1c1
packages/vega-parser/schema/spec.js
packages/vega-parser/schema/spec.js
export default { "defs": { "spec": { "title": "Vega visualization specification", "type": "object", "allOf": [ {"$ref": "#/defs/scope"}, { "properties": { "$schema": {"type": "string", "format": "uri"}, "description": {"type": "string"}, ...
export default { "defs": { "spec": { "title": "Vega visualization specification", "type": "object", "allOf": [ {"$ref": "#/defs/scope"}, { "properties": { "$schema": {"type": "string", "format": "uri"}, "config": {"type": "object"}, "...
Add config object to JSON schema.
Add config object to JSON schema.
JavaScript
bsd-3-clause
vega/vega,vega/vega,vega/vega,vega/vega,lgrammel/vega
435ca8ef211b92be8222a2aeee44bef7bdd74890
rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js
rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
Update SettingsCtrl test after EvaluationSettings changes
Update SettingsCtrl test after EvaluationSettings changes git-svn-id: https://svn.apache.org/repos/asf/incubator/climate/trunk@1504017 13f79535-47bb-0310-9956-ffa450edef68 Former-commit-id: 92957b0f0e6bba13073b75fe9692f1b1b425f626
JavaScript
apache-2.0
pwcberry/climate,riverma/climate,lewismc/climate,MBoustani/climate,pwcberry/climate,apache/climate,huikyole/climate,Omkar20895/climate,jarifibrahim/climate,jarifibrahim/climate,Omkar20895/climate,pwcberry/climate,riverma/climate,apache/climate,pwcberry/climate,MJJoyce/climate,huikyole/climate,MBoustani/climate,lewismc/...
2b4785dca28b3863353de148a78e4aeed595a98c
addon/adapters/ember-loopback.js
addon/adapters/ember-loopback.js
import DS from 'ember-data'; import Ember from 'ember'; export default DS.RESTAdapter.extend({ defaultSerializer: 'ember-loopback/serializers/ember-loopback', /** * Serializes the query params as a json because loopback has some funky crazy syntax * @see http://docs.strongloop.com/display/public/LB/Querying...
import DS from 'ember-data'; import Ember from 'ember'; export default DS.RESTAdapter.extend({ defaultSerializer: 'ember-loopback/serializers/ember-loopback', /** * Serializes the query params as a json because loopback has some funky crazy syntax * @see http://docs.strongloop.com/display/public/LB/Querying...
Update REST adapter to work with loopback errors
Update REST adapter to work with loopback errors
JavaScript
mit
mediasuitenz/ember-loopback,mediasuitenz/ember-loopback
c3627324afb753e7b4393e8f2ddd1269768ac8e1
src/Data/Foreign.js
src/Data/Foreign.js
/* global exports */ "use strict"; // module Data.Foreign // jshint maxparams: 3 exports.parseJSONImpl = function (left, right, str) { try { return right(JSON.parse(str)); } catch (e) { return left(e.toString()); } }; // jshint maxparams: 1 exports.toForeign = function (value) { return value; }; exp...
/* global exports */ "use strict"; // module Data.Foreign // jshint maxparams: 3 exports.parseJSONImpl = function (left, right, str) { try { return right(JSON.parse(str)); } catch (e) { return left(e.toString()); } }; // jshint maxparams: 1 exports.toForeign = function (value) { return value; }; exp...
Use length instead of property iteration
Use length instead of property iteration
JavaScript
bsd-3-clause
purescript/purescript-foreign
1cffb363b4456ffc9064479c02c72b96b2deba33
covervid.js
covervid.js
jQuery.fn.extend({ coverVid: function(width, height) { var $this = this; $(window).on('resize load', function(){ // Get parent element height and width var parentHeight = $this.parent().height(); var parentWidth = $this.parent().width(); // Get native video width and height v...
jQuery.fn.extend({ coverVid: function(width, height) { $(document).ready(sizeVideo); $(window).resize(sizeVideo); var $this = this; function sizeVideo() { // Get parent element height and width var parentHeight = $this.parent().height(); var parentWidth = $this.parent().width...
Clean up spacing + use document ready
Clean up spacing + use document ready
JavaScript
mit
zonayedpca/covervid,tianskyluj/covervid,A11oW/ngCovervid,jfeigel/ngCovervid,gdseller/covervid,space150/covervid,AlptugYaman/covervid,AlptugYaman/covervid,gdseller/covervid,tatygrassini/covervid,kitestudio/covervid,PabloValor/covervid,stefanerickson/covervid,stefanerickson/covervid,kitestudio/covervid,PabloValor/covervi...
76f678705e608d086b8dc549f180229b787398b4
web-client/app/scripts/directives/scrollSpy.js
web-client/app/scripts/directives/scrollSpy.js
'use strict'; angular.module('webClientApp') .directive('scrollSpy', ['$window', '$interval', function ($window, $interval) { var didScroll; var lastScroll = 0; return function(scope) { angular.element($window).bind('scroll', function() { didScroll = true; }); $interval(...
'use strict'; angular.module('webClientApp') .directive('scrollSpy', ['$window', '$interval', function ($window, $interval) { var didScroll; var lastScroll = 0; return function(scope) { angular.element($window).bind('scroll', function() { didScroll = true; }); $interval(...
Fix infinite scrolling in firefox
Fix infinite scrolling in firefox
JavaScript
bsd-2-clause
ahmgeek/manshar,manshar/manshar,manshar/manshar,manshar/manshar,ahmgeek/manshar,ahmgeek/manshar,ahmgeek/manshar,manshar/manshar
12fc327a90f7ff6dcb372728270a6275215bb52a
gulpfile.js
gulpfile.js
var gulp = require('gulp'), istanbul = require('gulp-istanbul'), jasmine = require('gulp-jasmine'), jshint = require('gulp-jshint'), plumber = require('gulp-plumber'); var paths = { src: ['index.js'], test: ['spec/**/*.spec.js'], coverage: './coverage' }; gulp.task('lint', function() { return ...
var gulp = require('gulp'), istanbul = require('gulp-istanbul'), jasmine = require('gulp-jasmine'), jshint = require('gulp-jshint'), plumber = require('gulp-plumber'); var paths = { src: ['index.js'], test: ['spec/**/*.spec.js'], coverage: './coverage' }; gulp.task('lint', function() { return ...
Remove task completion callback from the `coverage` task
Remove task completion callback from the `coverage` task
JavaScript
mit
yuanqing/mitch
d73be27d2bcb8481c1bc86702b82e38445c7e33e
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var sass = require('gulp-sass'); // Common paths. var paths = { BootstrapSCSS: 'priv/assets/bootstrap-custom/bootstrap-custom.scss', BootstrapInclude: 'priv/components/bootstrap-sass/assets/stylesheets', } // Build admin CSS from SASS/CSS gulp.task('bootstrap-sass', function() { ...
var gulp = require('gulp'); var sass = require('gulp-sass'); // Common paths. var paths = { BootstrapSCSS: 'priv/assets/bootstrap-custom/bootstrap-custom.scss', BootstrapInclude: 'priv/components/bootstrap-sass/assets/stylesheets', } // Build admin CSS from SASS/CSS gulp.task('sass', function() { return g...
Rename bootstrap-sass Gulp task to 'sass'
Rename bootstrap-sass Gulp task to 'sass'
JavaScript
mit
OxySocks/micro,OxySocks/micro
be4dd0a0f52aae22e349b9b711ae28d26747add1
app/routes/index.js
app/routes/index.js
import Ember from 'ember'; export default Ember.Route.extend({ beforeModel: function() { this.transitionTo('dashboard'); } });
import Ember from 'ember'; export default Ember.Route.extend({ beforeModel: function() { this.replaceWith('dashboard'); } });
Use replaceWith to redirect to dashboard on login
Use replaceWith to redirect to dashboard on login
JavaScript
mit
thecoolestguy/frontend,thecoolestguy/frontend,stopfstedt/frontend,gabycampagna/frontend,ilios/frontend,gboushey/frontend,djvoa12/frontend,stopfstedt/frontend,ilios/frontend,jrjohnson/frontend,gboushey/frontend,gabycampagna/frontend,dartajax/frontend,jrjohnson/frontend,djvoa12/frontend,dartajax/frontend
27606e9ed8891f71c4cdab341d77ce0aa4c0bc8e
src/javascripts/ng-admin/Crud/field/maReferenceManyField.js
src/javascripts/ng-admin/Crud/field/maReferenceManyField.js
function maReferenceManyField(ReferenceRefresher) { 'use strict'; return { scope: { 'field': '&', 'value': '=', 'entry': '=?', 'datastore': '&?' }, restrict: 'E', link: function(scope) { var field = scope.field(); ...
function maReferenceManyField(ReferenceRefresher) { 'use strict'; return { scope: { 'field': '&', 'value': '=', 'entry': '=?', 'datastore': '&?' }, restrict: 'E', link: function(scope) { var field = scope.field(); ...
Fix typo in template definition
Fix typo in template definition
JavaScript
mit
Benew/ng-admin,thachp/ng-admin,marmelab/ng-admin,LuckeyHomes/ng-admin,marmelab/ng-admin,heliodor/ng-admin,ahgittin/ng-admin,gxr1028/ng-admin,manekinekko/ng-admin,arturbrasil/ng-admin,jainpiyush111/ng-admin,arturbrasil/ng-admin,vasiakorobkin/ng-admin,jainpiyush111/ng-admin,janusnic/ng-admin,rao1219/ng-admin,eBoutik/ng-a...
8e44961e67fa00f9b97252843423451150f7d215
src/application/applicationContainer.js
src/application/applicationContainer.js
let { isArray } = require('../mindash'); let findApp = require('../core/findApp'); module.exports = function (React) { let ApplicationContainer = React.createClass({ childContextTypes: { app: React.PropTypes.object }, getChildContext() { return { app: findApp(this) }; }, render() { ...
let findApp = require('../core/findApp'); let { isArray, extend } = require('../mindash'); module.exports = function (React) { let ApplicationContainer = React.createClass({ childContextTypes: { app: React.PropTypes.object }, getChildContext() { return { app: findApp(this) }; }, rende...
Clone the element without using addons
Clone the element without using addons
JavaScript
mit
goldensunliu/marty-lib,KeKs0r/marty-lib,thredup/marty-lib,gmccrackin/marty-lib,CumpsD/marty-lib,martyjs/marty-lib
d8b936eabb69ac5fd0cd4cd38cbd54a0ed7d6540
app/js/on_config.js
app/js/on_config.js
function OnConfig($stateProvider, $locationProvider, $urlRouterProvider) { 'ngInject'; $locationProvider.html5Mode(true); $stateProvider .state('Home', { url: '/', controller: 'ExampleCtrl as home', templateUrl: 'home.html', title: 'Home' }); $urlRouterProvider.otherwise('/'); } export ...
function OnConfig($stateProvider, $locationProvider, $urlRouterProvider) { 'ngInject'; $locationProvider.html5Mode(true); $stateProvider .state('Home', { url: '/', controller: 'ExampleCtrl as home', templateUrl: 'home.html', title: 'Home' }) .state('Page1', { url: '/page1', control...
Add basic page1 2 with routing
Add basic page1 2 with routing
JavaScript
mit
8bithappy/happyhack,8bithappy/happyhack
5349a3f6b0ff47b4d0be4d9b291d3c9e9c1a0718
lib/node_modules/@stdlib/assert/is-browser/lib/global_scope.js
lib/node_modules/@stdlib/assert/is-browser/lib/global_scope.js
/* eslint-disable no-new-func */ 'use strict'; /** * Test if the global scope is bound to the "window" variable present in browser environments. When creating a new function using the `function(){}` constructor, the execution scope aliased by the `this` variable is the global scope. * * @private * @returns {boolean} b...
/* eslint-disable no-new-func */ 'use strict'; /** * Test if the global scope is bound to the "window" variable present in browser environments. When creating a new function using the `Function(){}` constructor, the execution scope aliased by the `this` variable is the global scope. * * @private * @returns {boolean} b...
Revert regression by capitalizing constructor again
Revert regression by capitalizing constructor again
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
8742d2bffb4c2f02b2372c9a4be0385c0422411d
common/errors.js
common/errors.js
(function() { 'use strict'; angular.module('chaise.errors', []) // Factory for each error type .factory('ErrorService', [function ErrorService() { function error409(error) { // retry logic // passthrough to app for now } // Special behavior for handlin...
(function() { 'use strict'; angular.module('chaise.errors', []) // Factory for each error type .factory('ErrorService', ['$log', function ErrorService($log) { function error409(error) { // retry logic // passthrough to app for now } // Special behavior...
Use $log in error service
Use $log in error service
JavaScript
apache-2.0
informatics-isi-edu/chaise,informatics-isi-edu/chaise,informatics-isi-edu/chaise,informatics-isi-edu/chaise
884e849c8fa169320355c1544ab9e236f56f868e
modules/recipes/server/routes/recipes.server.routes.js
modules/recipes/server/routes/recipes.server.routes.js
'use strict'; /** * Module dependencies. */ var recipesPolicy = require('../policies/recipes.server.policy'), recipes = require('../controllers/recipes.server.controller'); module.exports = function (app) { // Recipes collection routes app.route('/api/recipes').all(recipesPolicy.isAllowed) .get(recipes.li...
'use strict'; /** * Module dependencies. */ var recipesPolicy = require('../policies/recipes.server.policy'), recipes = require('../controllers/recipes.server.controller'); module.exports = function (app) { // Recipes collection routes app.route('/api/recipes').all(recipesPolicy.isAllowed) .get(recipes.li...
Revert "finished backend for healthify"
Revert "finished backend for healthify" This reverts commit 6903c2baf7a2716f81add8fcc3b3dd42b1dfb65e. Trying to fix nodemon crash
JavaScript
mit
SEGroup9b/whatUEatin,SEGroup9b/whatUEatin,SEGroup9b/whatUEatin
528a764e786787535ab6d763072cb0550435075b
test/lib/prepare-spec.js
test/lib/prepare-spec.js
var prepare = require('../../lib/prepare'); var expect = require('expect'); var samples = { 'copy': { 'assets': require('../samples/copy/assets'), 'report': require('../samples/copy/report') }, 'compress': { 'assets': require('../samples/compress/assets'), 'report': require('../samples/compress/r...
var prepare = require('../../lib/prepare'); var expect = require('expect'); var samples = { 'copy': { 'assets': require('../samples/copy/assets'), 'report': require('../samples/copy/report') }, 'compress': { 'assets': require('../samples/compress/assets'), 'report': require('../samples/compress/r...
Update test: sort arraies before expecting
Update test: sort arraies before expecting
JavaScript
mit
arrowrowe/tam
b78aee002c1f991ea02ef734dea40c872a979dc3
public/javascripts/lib/model_with_language_mixin.js
public/javascripts/lib/model_with_language_mixin.js
window.ModelWithLanguageMixin = { LANGUAGE_CHOICES: { en: 'English', es: 'Spanish', hi: 'Hindi', pt: 'Portuguese', ru: 'Russian', ja: 'Japanese', de: 'German', id: 'Malay/Indonesian', vi: 'Vietnamese', ko: 'Korean', fr: 'French', fa: 'Persian', ...
window.ModelWithLanguageMixin = { LANGUAGE_CHOICES: { en: 'English', es: 'Spanish', hi: 'Hindi', pt: 'Portuguese', ru: 'Russian', ja: 'Japanese', de: 'German', id: 'Malay/Indonesian', vi: 'Vietnamese', ko: 'Korean', fr: 'French', fa: 'Persian', ...
Add getLanguage method to languages mixin.
Add getLanguage method to languages mixin. This is more suitable for passing to JST template
JavaScript
mit
ivarvong/documentcloud,dannguyen/documentcloud,roberttdev/dactyl4,gunjanmodi/documentcloud,roberttdev/dactyl,roberttdev/dactyl4,monofox/documentcloud,monofox/documentcloud,dannguyen/documentcloud,Teino1978-Corp/Teino1978-Corp-documentcloud,dannguyen/documentcloud,moodpo/documentcloud,monofox/documentcloud,Teino1978-Cor...
6c376933137540938bd869be1dd27ac039108704
app/routes/movie.js
app/routes/movie.js
import Ember from 'ember'; export default Ember.Route.extend({ model(params) { return Ember.RSVP.hash({ movie: Ember.$.getJSON("https://api.themoviedb.org/3/movie/" + params.movie_id+ "?api_key=0910db5745f86638474ffefa5d3ba687"), userRating: this.get('firebaseUtil').findRecord(param...
import Ember from 'ember'; export default Ember.Route.extend({ model(params) { return Ember.RSVP.hash({ movie: Ember.$.getJSON("https://api.themoviedb.org/3/movie/" + params.movie_id+ "?api_key=0910db5745f86638474ffefa5d3ba687"), userRating: this.get('firebaseUtil').findRecord(param...
Fix initial user rating display
Fix initial user rating display
JavaScript
mit
JaxonWright/CineR8,JaxonWright/CineR8
bad1014c435b94e2c18515ae619152adcc392dcc
project.config.js
project.config.js
const path = require('path') const NODE_ENV = process.env.NODE_ENV || 'production' const KF_USER_PATH = process.env.KF_USER_PATH || __dirname const KF_SERVER_PORT = parseInt(process.env.KF_SERVER_PORT, 10) const KF_LOG_LEVEL = parseInt(process.env.KF_LOG_LEVEL, 10) module.exports = { // environment to use when build...
const path = require('path') const NODE_ENV = process.env.NODE_ENV || 'production' const KF_USER_PATH = process.env.KF_USER_PATH || __dirname const KF_SERVER_PORT = parseInt(process.env.KF_SERVER_PORT, 10) const KF_LOG_LEVEL = parseInt(process.env.KF_LOG_LEVEL, 10) module.exports = { // environment to use when build...
Fix dev port at 3000 again
Fix dev port at 3000 again
JavaScript
isc
bhj/karaoke-forever,bhj/karaoke-forever
cfa1f1741701930afa9813dc11674c15bd83849e
src/builder/javascript.js
src/builder/javascript.js
import { transformFile } from 'babel-core' import { then } from '../util/async' import { debug } from '../util/stdio' import { default as es2015 } from 'babel-preset-es2015' import { default as amd } from 'babel-plugin-transform-es2015-modules-amd' export default function configure(pkg, opts) { return (name, file, d...
import { transformFile } from 'babel-core' import { debug } from '../util/stdio' import { default as es2015 } from 'babel-preset-es2015' import { default as amd } from 'babel-plugin-transform-es2015-modules-amd' export default function configure(pkg, opts) { return (name, file, done) => { transformFile(file ...
Remove obsolute async util import
Remove obsolute async util import
JavaScript
mit
zambezi/ez-build,zambezi/ez-build
20ba3c4e8995318e1ef937cd57fd9c6304412998
index.js
index.js
var express = require('express'); var app = express(); var redis = require('redis').createClient(process.env.REDIS_URL); app.get('/', function(req, res){ res.send('hello world'); }); app.get('/sayhello', function (req, res){ res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Content-Type', 'appli...
var express = require('express'); var app = express(); var redis = require('redis'); var redis_client = redis.createClient(process.env.REDIS_URL || "redis://h:pe991302eec381b357d57f8089f915c35ac970d0bb4f2c89dba4bc52cbd7bcbb7@ec2-79-125-23-12.eu-west-1.compute.amazonaws.com:15599"); app.get('/', function(req, res){ r...
Add /keys endpoint for setting & getting from Redis
Add /keys endpoint for setting & getting from Redis
JavaScript
mit
codehackdays/HelloWorld
06347c6e939899854a98f0655df67e5d83ba378a
index.js
index.js
'use strict'; module.exports = function (arr) { var arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm' ? 'arm' : 'x86'; var platform = process.platform; if (!arr.length) { return null; } return arr.filter(function (obj) { if (obj.os === platform && obj.arch === arch) { delete obj.os; delet...
'use strict'; module.exports = function (arr) { var arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm' ? 'arm' : 'x86'; var platform = process.platform; console.log(arr); if (!arr || !arr.length) { return []; } return arr.filter(function (obj) { if (obj.os === platform && obj.arch === arch) { ...
Return an empty array instead of `null`
Return an empty array instead of `null`
JavaScript
mit
kevva/os-filter-obj
3f1019a71b7dc636390bffe96bf6a93354739b10
index.js
index.js
const jsonMask = require('json-mask') module.exports = function (opt) { opt = opt || {} function partialResponse(obj, fields) { if (!fields) return obj return jsonMask(obj, fields) } function wrap(orig) { return function (obj) { const param = this.req.query[opt.query || 'fields'] if (...
const jsonMask = require('json-mask') module.exports = function (opt) { opt = opt || {} function partialResponse(obj, fields) { if (!fields) return obj return jsonMask(obj, fields) } function wrap(orig) { return function (obj) { const param = this.req.query[opt.query || 'fields'] if (...
Add comment about binary res.json()
Add comment about binary res.json()
JavaScript
mit
nemtsov/express-partial-response
6b7f738fd598b50d3fd021597f3f78e6282a79ce
index.js
index.js
var express = require('express'); var Connection = require('./lib/backend/connection').Connection; var restAdaptor = require('./lib/frontend/rest-adaptor'); var socketIoAdaptor = require('./lib/frontend/socket.io-adaptor'); var dashboardHandler = require('./lib/frontend/dashboard-handler'); express.application.kotoumi...
var express = require('express'); var Connection = require('./lib/backend/connection').Connection; var restAdaptor = require('./lib/frontend/rest-adaptor'); var socketIoAdaptor = require('./lib/frontend/socket.io-adaptor'); var dashboardHandler = require('./lib/frontend/dashboard-handler'); express.application.kotoumi...
Make it easy to use mocked/stubbed connections for testing
Make it easy to use mocked/stubbed connections for testing
JavaScript
mit
droonga/express-droonga,KitaitiMakoto/express-droonga,droonga/express-droonga,KitaitiMakoto/express-droonga
da7718cb9914f268e62200ab21c8f4a62e9d5899
index.js
index.js
"use strict"; // stdlib var Fs = require('fs'); // nodeca var NLib = require('nlib'); // 3rd-party var StaticLulz = require('static-lulz'); var FsTools = NLib.Vendor.FsTools; var Async = NLib.Vendor.Async; module.exports = NLib.Application.create({ root: __dirname, name: 'nodeca.core', bootstrap: function...
"use strict"; // stdlib var Fs = require('fs'); // nodeca var NLib = require('nlib'); // 3rd-party var StaticLulz = require('static-lulz'); var FsTools = NLib.Vendor.FsTools; var Async = NLib.Vendor.Async; module.exports = NLib.Application.create({ root: __dirname, name: 'nodeca.core', bootstrap: function...
Remove http_server from nodeca context.
Remove http_server from nodeca context.
JavaScript
mit
nodeca/nodeca.core,nodeca/nodeca.core
92f8cb2850d9e5148aa309c76b4c87cf1fc18652
index.js
index.js
var gulp = require('gulp'), gutil = require('gulp-util'); function loadTasks(config) { var tasks = Object.keys(config); tasks.forEach(function (name) { var taskConfig = config[name], task = require('./tasks/' + name)(taskConfig); gulp.task(name, task); }); return gulp;...
var gulp = require('gulp'), gutil = require('gulp-util'); function loadTasks(config) { var tasks = Object.keys(config); tasks.forEach(function (name) { var taskConfig = config[name], task = require(taskConfig.def)(taskConfig); gulp.task(name, task); }); return gulp; } ...
Use task property for require func
Use task property for require func
JavaScript
mit
gulp-boilerplate/gulp-boilerplate
818624b20d08020c5f0ac8f2f8059d2ec7fd1ee0
index.js
index.js
function neymar(type, props, ...children) { props = props || {} return { type, props, children: Array.prototype.concat.apply([], children) } } function createElement(node) { if (typeof node === 'string') { return document.createTextNode(node) } const el = docume...
function neymar(type, props, ...children) { props = props || {} return { type, props, children: Array.prototype.concat.apply([], children) } } function setProperties(node, props) { Object.keys(props).map(prop => { const propName = prop === 'className' ? 'class' : prop ...
Add property assignments to the DOM node being created
Add property assignments to the DOM node being created
JavaScript
mit
lucasfcosta/vdom-example,lucasfcosta/vdom-example
462cae04fb596a3cd8c05f8a6c472796adbc710b
index.js
index.js
var window = require('global/window'); var nodeCrypto = require('crypto'); function getRandomValues(buf) { if (window.crypto && window.crypto.getRandomValues) { window.crypto.getRandomValues(buf); } else if (typeof window.msCrypto === 'object' && typeof window.msCrypto.getRandomValues === 'function') { w...
var window = require('global/window'); var nodeCrypto = require('crypto'); function getRandomValues(buf) { if (window.crypto && window.crypto.getRandomValues) { window.crypto.getRandomValues(buf); } else if (typeof window.msCrypto === 'object' && typeof window.msCrypto.getRandomValues === 'function') { w...
Check for `randomBytes` before trying to use Node.js crypto
Check for `randomBytes` before trying to use Node.js crypto Browserify's `require()` will return an empty Object here, which evaluates to `true`, so check for the function we need before trying to use it.
JavaScript
mit
KenanY/get-random-values
162a37b07e9770fb2c5b8893541843495bcdd1df
index.js
index.js
(function() { var Dependument = require('dependument').Dependument; var d = new Dependument({ source: 'package.json', output: 'DEPENDENCIES.md' }); d.process(); })();
#!/usr/bin/env node (function() { var Dependument = require('dependument').Dependument; var d = new Dependument({ source: 'package.json', output: 'DEPENDENCIES.md' }); d.process(); })();
Add declaration to top of script
Add declaration to top of script
JavaScript
unlicense
dependument/dependument-cli
aab3854d6cfee4ee909cb79fc333cda60da850af
index.js
index.js
const RunPluginScriptCommand = require('./src/commands/runPluginScript') const CreateProjectCommand = require('./src/commands/createProject') const AddPluginsCommand = require('./src/commands/addPlugins') const RemovePluginsCommand = require('./src/commands/removePlugins') const UpdatePluginsCommand = require('./src/co...
const RunPluginScriptCommand = require('./src/commands/runPluginScript') const CreateProjectCommand = require('./src/commands/createProject') const AddPluginsCommand = require('./src/commands/addPlugins') const RemovePluginsCommand = require('./src/commands/removePlugins') const UpdatePluginsCommand = require('./src/co...
Remove init in public api
Remove init in public api
JavaScript
mit
rispa-io/rispa-cli
8adef8bff6e8a192a0a06388f3f4213bbf0e13a0
index.js
index.js
'use strict' const http = require('http') const express = require('express') const bodyParser = require('body-parser') const Bot = require('messenger-bot') let bot = new Bot({ token: process.env.PAGE_TOKEN, verify: 'VERIFY_TOKEN', app_secret: 'APP_SECRET' }) bot.on('error', (err) => { console.log(err.message)...
'use strict' const http = require('http') const express = require('express') const bodyParser = require('body-parser') const Bot = require('messenger-bot') let bot = new Bot({ token: process.env.PAGE_TOKEN, verify: 'VERIFY_TOKEN', app_secret: 'APP_SECRET' }) bot.on('error', (err) => { console.log(err.message)...
Add message for starting the server
Add message for starting the server
JavaScript
mit
nikolay-radkov/ebudgie-server,nikolay-radkov/ebudgie-server
4b68f23939190a878e3a8e45bad2145b0cbf285f
index.js
index.js
var excludeMethods = [ /^constructor$/, /^render$/, /^component[A-Za-z]+$/ ]; var displayNameReg = /^function\s+([a-zA-Z]+)/; function isExcluded(methodName) { return excludeMethods.some(function (reg) { return reg.test(methodName) === false; }); } function bindToClass(scope, methods) { var compone...
var excludeMethods = [ /^constructor$/, /^render$/, /^component[A-Za-z]+$/, /^shouldComponentUpdate$/ ]; var displayNameReg = /^function\s+([a-zA-Z]+)/; function isExcluded(methodName) { return excludeMethods.some(function (reg) { return reg.test(methodName) === false; }); } function bindToClass(sc...
Add shouldComponentUpdate to excludeMethods array.
Add shouldComponentUpdate to excludeMethods array.
JavaScript
mit
nemisj/react-bind-to-class
a1ef61ffd7d55bbbcd5bc3db2dbe50578b09b1a1
index.js
index.js
var isArray = require('isArray'); /** * Returns the maximum array depth of the array, meaning the maximum number of nests in the nested arrays. * @param {Anything} array The array to find the dimensionality of * @param {Boolean} shallowSearch If the search should *not* search all element * @return {Integer} The ...
var isArray = require('isarray'); /** * Returns the maximum array depth of the array, meaning the maximum number of nests in the nested arrays. * @param {Anything} array The array to find the dimensionality of * @param {Boolean} shallowSearch If the search should *not* search all element * @return {Integer} The ...
Fix casing of require('isarray') for cross-platform compatibility
Fix casing of require('isarray') for cross-platform compatibility
JavaScript
mit
grant/dimensionality
d0643b62badc45f85a358a6bdec4a2408325fe27
index.js
index.js
var once = require('once'); module.exports = function () { var collections = [].slice.call(arguments); if(!Array.isArray(collections[0])) { collections = [ collections ]; } return Promise.all( collections.map(function(plugins) { var i = -1; return new Promise...
var once = require('once'); module.exports = function () { var collections = [].slice.call(arguments); if(!Array.isArray(collections[0])) { collections = [ collections ]; } return Promise.all( collections.map(function(plugins) { var i = -1; return new Promise...
Fix can not read property of undefined error
Fix can not read property of undefined error
JavaScript
mit
erickmerchant/static-engine
b411f030dd296756fb77cd50b64ae1a7649dadb7
index.js
index.js
/*jslint indent: 2, vars: true */ var es = require('event-stream'); var gutil = require('gulp-util'); var Buffer = require('buffer').Buffer; var cheerio = require('cheerio'); function modify(elem, attr, modifier) { "use strict"; var val = elem.attr(attr); if (val) { elem.attr(attr, modifier(val)); } } module....
/*jslint indent: 2, vars: true */ var es = require('event-stream'); var gutil = require('gulp-util'); var Buffer = require('buffer').Buffer; var cheerio = require('cheerio'); function modify(file, elem, attr, modifier) { "use strict"; var val = elem.attr(attr); if (val) { elem.attr(attr, modifier(val, file)); ...
Add file as second param
Add file as second param
JavaScript
mit
othree/gulp-path-modifier
475a2c1ed04a08a93196a9d809da3f3181d9d04e
index.js
index.js
'use strict' var visit = require('unist-util-visit') var toString = require('nlcst-to-string') var posjs = require('pos') module.exports = pos var tagger = new posjs.Tagger() function pos() { return transformer } function transformer(tree) { var queue = [] visit(tree, 'WordNode', visitor) /* Gather a par...
'use strict' var visit = require('unist-util-visit') var toString = require('nlcst-to-string') var posjs = require('pos') module.exports = pos var tagger = new posjs.Tagger() function pos() { return transformer } function transformer(tree) { visit(tree, 'SentenceNode', visitor) // Patch all words in `parent...
Refactor algorithm to perform better
Refactor algorithm to perform better
JavaScript
mit
wooorm/retext-pos
b75755f3de66305458831e283e65bfc7edaac088
app/assets/javascripts/project-gallery.js
app/assets/javascripts/project-gallery.js
/* Launches project gallery lightbox from button on project show pages */ $("#launch-gallery").on("click", function(event) { event.preventDefault(); $("#project-gallery .image:first-child > img").trigger("click"); });
/* Launches project gallery lightbox from button on project show pages */ $("#launch-gallery").on("click", function(event) { event.preventDefault(); document.getElementById('project-gallery').querySelector('.image').click(); });
Fix ordering issue when launching lightgallery from the button
Fix ordering issue when launching lightgallery from the button
JavaScript
agpl-3.0
awesomefoundation/awesomebits,awesomefoundation/awesomebits,awesomefoundation/awesomebits,awesomefoundation/awesomebits,awesomefoundation/awesomebits
c246eff923c49175bda78b217e86d76371041cf2
imports/ldap/transformUser.js
imports/ldap/transformUser.js
let _ = require('underscore'); module.exports = function (ldapSettings, userData) { let searchDn = ldapSettings.searchDn || 'cn'; // userData.mail may be a string with one mail address or an array. // Nevertheless we are only interested in the first mail address here - if there should be more... let t...
let _ = require('underscore'); module.exports = function (ldapSettings, userData) { let searchDn = ldapSettings.searchDn || 'cn'; // userData.mail may be a string with one mail address or an array. // Nevertheless we are only interested in the first mail address here - if there should be more... let t...
Make sure the username is lower case when imported from ldap
Make sure the username is lower case when imported from ldap Otherwise the meteor accounts package cannot find the user document which leads to errors when logging in with an username that has upper case letters
JavaScript
mit
RobNeXX/4minitz,RobNeXX/4minitz,4minitz/4minitz,4minitz/4minitz,Huggle77/4minitz,Huggle77/4minitz,RobNeXX/4minitz,4minitz/4minitz,Huggle77/4minitz
223d7bfa811075c03ec196e4e14302048ad3919b
test/specs/test-utils.js
test/specs/test-utils.js
/*! resol-vbus | Copyright (c) 2013-2014, Daniel Wippermann | MIT license */ 'use strict'; var _ = require('lodash'); var Q = require('q'); var testUtils = { performAsyncTest: function(done, callback) { return Q.fcall(callback).then(function() { done(); }).fail(function(reason) { ...
/*! resol-vbus | Copyright (c) 2013-2014, Daniel Wippermann | MIT license */ 'use strict'; var _ = require('lodash'); var Q = require('q'); var testUtils = { performAsyncTest: function(done, callback) { return Q.fcall(callback).then(function() { done(); }).fail(function(reason) { ...
Add `adaptTimeout` helper that changes timeouts during Travis test.
Add `adaptTimeout` helper that changes timeouts during Travis test.
JavaScript
mit
danielwippermann/resol-vbus,Thorsten71/resol-vbus
684daa5fcc92e8347374678fe008faf3a4744763
public/javascripts/forum-post.js
public/javascripts/forum-post.js
var oldContents = null; var editForumPost = function(postId, postNumber) { var postSelector = $("#" + postNumber); // We grab the text element of the post and turn it into a textarea to make it editable oldContents = postSelector.find(".message") var postContents = oldContents.text(); var editF...
// Map of old post contents by post number in case the user clicks 'edit' on multiple posts // on the same page (although rare.) var oldContents = {}; var editForumPost = function(postId, postNumber) { var postSelector = $("#" + postNumber); // We grab the text element of the post and turn it into a textarea...
Fix issue when edit is clicked on more than one post and then cancelled on both.
Fix issue when edit is clicked on more than one post and then cancelled on both.
JavaScript
agpl-3.0
clarkerubber/lila,arex1337/lila,arex1337/lila,clarkerubber/lila,arex1337/lila,arex1337/lila,arex1337/lila,clarkerubber/lila,luanlv/lila,luanlv/lila,luanlv/lila,clarkerubber/lila,luanlv/lila,arex1337/lila,luanlv/lila,luanlv/lila,luanlv/lila,arex1337/lila,clarkerubber/lila,clarkerubber/lila,clarkerubber/lila
a84b191d71cef5d4a5f68c2da3dcc32c33e10351
js/yt-player.js
js/yt-player.js
$('.close-modal').click(function () { $('#yt-player').hide(); $('#yt-player iframe').attr("src", jQuery("#yt-player iframe").attr("src")); });
jQuery(document).bind('hidden.bs.modal', function() { var vid = jQuery('#monologueForThree iframe[src*="youtube"]'); if ( vid.length > 0 ){ var src = vid.attr('src'); vid.attr('src', ''); vid.attr('src', src); } });
Fix issue with 2 embed modals interferring with YouTube close
fix: Fix issue with 2 embed modals interferring with YouTube close
JavaScript
mit
DeltaSpark/deltaspark.github.io,DeltaSpark/deltaspark.github.io
6f4da9a8dfc46f760d9116f53eb137e6554377e9
src/effects/animated-selector.js
src/effects/animated-selector.js
define([ "../core", "../selector", "../effects", ], function( jQuery ) { jQuery.expr.filters.animated = function( elem ) { return jQuery.grep(jQuery.timers, function( fn ) { return elem === fn.elem; }).length; }; });
define([ "../core", "../selector", "../effects" ], function( jQuery ) { jQuery.expr.filters.animated = function( elem ) { return jQuery.grep(jQuery.timers, function( fn ) { return elem === fn.elem; }).length; }; });
Remove trailing comma in define array. Close gh-1336.
Remove trailing comma in define array. Close gh-1336.
JavaScript
mit
quiaro/request-agent,jquery/jquery,rwaldron/jquery,eburgos/jquery,roytoo/jquery,roytoo/jquery,eburgos/jquery,eburgos/jquery,rwaldron/jquery,roytoo/jquery,jquery/jquery,jquery/jquery
bc21e2861d12c0c4174a68610a1b94bcfb2c0f7d
config/routes.js
config/routes.js
module.exports.routes = { 'post /register': 'UserController.create', 'post /logout': 'AuthController.logout', 'post /auth/local': 'AuthController.callback', 'post /auth/local/:action': 'AuthController.callback', 'post /auth/:provider/:action': 'AuthController.callback', 'get /auth/:provider': 'AuthContro...
module.exports.routes = { 'post /register': 'UserController.create', 'post /logout': 'AuthController.logout', 'post /auth/local': 'AuthController.callback', 'post /auth/local/:action': 'AuthController.callback', 'post /auth/:provider': 'AuthController.callback', 'post /auth/:provider/:action': 'AuthContro...
Add new Delegated Authentication Protocol
Add new Delegated Authentication Protocol Add new simpler POST route to support delegated authentication, which utilises a default action.
JavaScript
mit
tjwebb/sails-auth,danielsharvey/sails-auth,onlyurei/sails-auth,langateam/sails-auth
d6d356c9382b2bc2efe5e278fc831892f5312983
examples/babel/destructuring-assignment/index.js
examples/babel/destructuring-assignment/index.js
#!/usr/bin/env babel-node import assert from 'assert'; function getObj() { return { x: 2, y: 3 }; } let { x, y, z = 6 } = getObj(); assert.strictEqual(x, 2); assert.strictEqual(y, 3); assert.strictEqual(z, 6);
#!/usr/bin/env babel-node import assert from 'assert'; // // 分割代入内で代入ができる // function getObj() { return { x: 2, y: 3 }; } let { x, y, z = 6 } = getObj(); assert.strictEqual(x, 2); assert.strictEqual(y, 3); assert.strictEqual(z, 6); // // 別変数名で展開できる // function stringifyObj({ x: xVar, y: yVar })...
Update a sample of ES6
Update a sample of ES6
JavaScript
mit
kjirou/nodejs-codes
382b2099940ec2bf42646ff1f01a9f5005e5d52a
route-styles.js
route-styles.js
/** * Created by Zack Boman on 1/31/14. * http://www.zackboman.com or tennisgent@gmail.com */ (function(){ var mod = angular.module('routeStyles', ['ngRoute']); mod.directive('head', ['$rootScope','$compile', function($rootScope, $compile){ return { restrict: 'E', ...
/** * Created by Zack Boman on 1/31/14. * http://www.zackboman.com or tennisgent@gmail.com */ 'use strict'; (function(){ var mod = angular.module('routeStyles', ['ngRoute']); mod.directive('head', ['$rootScope','$compile', function($rootScope, $compile){ return { restr...
Switch to use two separate events instead of the single event to prevent the CSS transition problem.
Switch to use two separate events instead of the single event to prevent the CSS transition problem.
JavaScript
mit
freedomdebug/angular-route-styles,elantion/angular-route-styles,freedomdebug/angular-route-styles,elantion/angular-route-styles,tennisgent/angular-route-styles
2995bcb5fa948204d2382c2fba1275cdffbff2c9
generate.js
generate.js
const fs = require('fs'); const glob = require('glob'); const yaml = require('js-yaml'); const extendify = require('extendify'); glob("templates/*.yml", function (er, files) { const contents = files.map(f => { return yaml.safeLoad(fs.readFileSync(f, 'utf8')); }); const extend = extendify({ inPlace: false...
const fs = require('fs'); const glob = require('glob'); const yaml = require('js-yaml'); const extendify = require('extendify'); const proc = require('child_process'); const sortOrder = [ 'AWSTemplateFormatVersion', 'Description', 'Parameters', 'Mappings', 'Conditions', 'Resources', 'Metadata', 'Output...
Sort output in build files
Sort output in build files
JavaScript
mit
buildkite/elastic-ci-stack-for-aws,holmesjr/elastic-ci-stack-for-aws,holmesjr/elastic-ci-stack-for-aws
b7886cf31b0bdcd61bd96540f425a8a2aa8161aa
nails.js
nails.js
var Server = require("./server.js").Server; var Config = require("./config.js").Config; exports.nails = appRoot => { var cfg = new Config(appRoot + "/config.json"); cfg.set('appRoot', appRoot); new Server(cfg).run(); };
var path = require("path"); var Server = require("./server.js").Server; var Config = require("./config.js").Config; exports.nails = (appRoot = path.dirname(require.main.filename)) => { var cfg = new Config(appRoot + "/config.json"); cfg.set('appRoot', appRoot); new Server(cfg).run(); };
Make the appRoot param optional
Make the appRoot param optional
JavaScript
mit
ArtOfCode-/nails,ArtOfCode-/nails
8a2de05444524ba913052a1bd838fbb4aa4fbf1d
app/stores/FlashesStore.js
app/stores/FlashesStore.js
import EventEmitter from 'eventemitter3'; class FlashesStore extends EventEmitter { constructor() { super(...arguments); this.ERROR = "error"; } flash(type, message) { // See if the message is actually a GraphQL exception if(message.source && message.message) { if(message.source.errors[0] ...
import EventEmitter from 'eventemitter3'; class FlashesStore extends EventEmitter { constructor() { super(...arguments); this.ERROR = "error"; } flash(type, message) { // See if the message is actually a GraphQL exception if(message.source && message.message) { if(message.source.errors[0] ...
Use a different message if GraphQL errors and we show a flash
Use a different message if GraphQL errors and we show a flash
JavaScript
mit
fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend
afcbfb968f872b2f1462926bcb1956d43cd9cb05
lib/util/media_ready_state_utils.js
lib/util/media_ready_state_utils.js
/** @license * Copyright 2016 Google LLC * SPDX-License-Identifier: Apache-2.0 */ goog.provide('shaka.util.MediaReadyState'); shaka.util.MediaReadyState = class { /* * @param {!HTMLMediaElement} mediaElement * @param {HTMLMediaElement.ReadyState} readyState * @param {!function()} callback */ static wa...
/** @license * Copyright 2016 Google LLC * SPDX-License-Identifier: Apache-2.0 */ goog.provide('shaka.util.MediaReadyState'); goog.require('shaka.util.EventManager'); shaka.util.MediaReadyState = class { /** * @param {!HTMLMediaElement} mediaElement * @param {number} readyState * @param {shaka.util.Ev...
Fix annotations in MediaReadyState util
Fix annotations in MediaReadyState util For some reason, the new compiler in the master branch let this by, but the old compiler in the v2.5.x branch complained when I cherry-picked the utility. Change-Id: I1e688f72594b74ed7d2a7c2801eb179b8ec13e8c
JavaScript
apache-2.0
shaka-project/shaka-player,tvoli/shaka-player,shaka-project/shaka-player,tvoli/shaka-player,tvoli/shaka-player,tvoli/shaka-player,shaka-project/shaka-player,shaka-project/shaka-player
f93e584853de62a3df9da48dbe07786dee3d098c
assets/src/components/has-minimum-story-poster-dimensions.js
assets/src/components/has-minimum-story-poster-dimensions.js
/** * Gets whether the AMP story's featured image has the right minimum dimensions. * * The featured image populates teh AMP story poster image. * The 3 minimum dimensions for that are 696px x 928px, 928px x 696px, or 928px x 928px. * * @param {Object} media A media object with width and height values. * @return...
/** * Gets whether the AMP story's featured image has the right minimum dimensions. * * The featured image populates teh AMP story poster image. * The 3 minimum dimensions for that are 696px x 928px, 928px x 696px, or 928px x 928px. * * @param {Object} media A media object with width and height values. * @return...
Add a semicolon to address ESLint issue
Add a semicolon to address ESLint issue This might be the cause of a failed Travis build.
JavaScript
apache-2.0
ampproject/amp-toolbox-php,ampproject/amp-toolbox-php
563f1a51ca73c8c50d12c8420542965770c6a28f
shared/oae/js/jquery-plugins/jquery.jeditable-focus.js
shared/oae/js/jquery-plugins/jquery.jeditable-focus.js
/*! * Copyright 2012 Sakai Foundation (SF) Licensed under the * Educational Community License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may * obtain a copy of the License at * * http://www.osedu.org/licenses/ECL-2.0 * * Unless required by applicable...
/*! * Copyright 2012 Sakai Foundation (SF) Licensed under the * Educational Community License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may * obtain a copy of the License at * * http://www.osedu.org/licenses/ECL-2.0 * * Unless required by applicable...
Make the spacebar usable for inline edit
Make the spacebar usable for inline edit
JavaScript
apache-2.0
Orodan/3akai-ux-jitsi-fork,Orodan/3akai-ux-jitsi-fork,nicolaasmatthijs/3akai-ux,timdegroote/3akai-ux,jfederico/3akai-ux,timdegroote/3akai-ux,nicolaasmatthijs/3akai-ux,stuartf/3akai-ux,mrvisser/3akai-ux,Coenego/avocet-ui,stuartf/3akai-ux,stuartf/3akai-ux,jfederico/3akai-ux,Orodan/3akai-ux-jitsi-fork,jfederico/3akai-ux,s...
5b231c4177876cc25ed503a30c94afd7babc390d
lib/calendar.js
lib/calendar.js
var icalendar = require('icalendar'); exports.generateIcal = function(boards) { var ical = new icalendar.iCalendar(); boards.each(function(board) { board.cards().each(function(card) { // no arm, no chocolate if (!card.get('badges').due) return; var event = new icalen...
var icalendar = require('icalendar'); exports.generateIcal = function(boards) { var ical = new icalendar.iCalendar(); boards.each(function(board) { board.cards().each(function(card) { // no arm, no chocolate if (!card.get('badges').due) return; var event = new icalen...
Attach the URL to the event.
Attach the URL to the event. Signed-off-by: François de Metz <5187da0b934cc25eb2201a3ec9206c24b13cb23b@stormz.me>
JavaScript
agpl-3.0
francois2metz/trello-calendar,francois2metz/trello-calendar
418df71223c33559cea3dc822cd16fab8c912dba
src/commands/IDBanCommand.js
src/commands/IDBanCommand.js
import BaseCommand from './BaseCommand'; /** * Simple command to ban a uaer by their ID. */ class IDBanCommand extends BaseCommand { constructor(bot) { super(bot); } /** * This event method we should listen for. * * @type {string} */ method = 'message'; /** * Th...
import BaseCommand from './BaseCommand'; /** * Simple command to ban a uaer by their ID. */ class IDBanCommand extends BaseCommand { constructor(bot) { super(bot); } /** * This event method we should listen for. * * @type {string} */ method = 'message'; /** * Th...
Upgrade IDBan command to do some more checking
Upgrade IDBan command to do some more checking
JavaScript
mit
ATLauncher/Discord-Bot
f3f7541d46624e65ff90022c8ff0e66c5da4e786
client/src/actions.js
client/src/actions.js
export const FETCH_QUEUE = 'FETCH_QUEUE' export const FETCH_QUEUE_DONE = 'FETCH_QUEUE_DONE' export const FETCH_ACCOUNTS = 'FETCH_ACCOUNTS' export const FETCH_TAGS = 'FETCH_TAGS' export const ADD_TAG = 'ADD_TAG' export const REMOVE_TAG = 'REMOVE_TAG' export function fetchQueue() { return { type: FETCH_QUEUE } }...
export const FETCH_QUEUE = 'FETCH_QUEUE' export const FETCH_QUEUE_DONE = 'FETCH_QUEUE_DONE' export const FETCH_ACCOUNTS = 'FETCH_ACCOUNTS' export const FETCH_TAGS = 'FETCH_TAGS' export const ADD_TAG = 'ADD_TAG' export const REMOVE_TAG = 'REMOVE_TAG' export const SET_ACTIVE_DONATION = 'SET_ACTIVE_DONATION' export funct...
Add action to set active donation
Add action to set active donation
JavaScript
mit
rymdkraftverk/q,rymdkraftverk/q,rymdkraftverk/q
1e4a3cf9a1db9c124f3b44aaf9e55f40e9073ee5
ui/server/proxies/api.js
ui/server/proxies/api.js
'use strict'; // Issue to improve: https://github.com/hashicorp/nomad/issues/7465 const proxyPath = '/v1'; module.exports = function(app, options) { // For options, see: // https://github.com/nodejitsu/node-http-proxy let proxyAddress = options.proxy; let server = options.httpServer; let proxy = require('...
'use strict'; // Issue to improve: https://github.com/hashicorp/nomad/issues/7465 const proxyPath = '/v1'; module.exports = function(app, options) { // For options, see: // https://github.com/nodejitsu/node-http-proxy // This is probably not safe to do, but it works for now. let cacheKey = `${options.project...
Disable the proxy when Mirage is enabled
Disable the proxy when Mirage is enabled This is to prevent max socket connection errors that can stop the live reload server from responding.
JavaScript
mpl-2.0
dvusboy/nomad,dvusboy/nomad,burdandrei/nomad,hashicorp/nomad,burdandrei/nomad,dvusboy/nomad,hashicorp/nomad,hashicorp/nomad,burdandrei/nomad,dvusboy/nomad,dvusboy/nomad,burdandrei/nomad,dvusboy/nomad,burdandrei/nomad,hashicorp/nomad,burdandrei/nomad,hashicorp/nomad,burdandrei/nomad,dvusboy/nomad,hashicorp/nomad
e53197be96bbbad51af8ad91dae000e607076f6d
github/index.js
github/index.js
const fetch = require("node-fetch"); const qs = require("qs"); const { load } = require("js-yaml"); const { getInstallationToken } = require("./installation-token"); module.exports.GitHub = class GitHub { constructor (installationId) { this.installationId = installationId; } get (urlSegment) { return ...
const fetch = require("node-fetch"); const qs = require("qs"); const { load } = require("js-yaml"); const { getInstallationToken } = require("./installation-token"); module.exports.GitHub = class GitHub { constructor (installationId) { this.installationId = installationId; } get (urlSegment) { return ...
Add GH method for retrieving maintainerd config file.
Add GH method for retrieving maintainerd config file.
JavaScript
mit
divmain/maintainerd,divmain/maintainerd
ad4e2c92062dfa1ab07510afa217cae83b1866d4
index.js
index.js
/* eslint-disable global-require */ 'use strict'; const allRules = { 'no-unused-styles': require('./lib/rules/no-unused-styles'), 'no-inline-styles': require('./lib/rules/no-inline-styles'), 'no-color-literals': require('./lib/rules/no-color-literals'), 'split-platform-components': require('./lib/rules/split-...
/* eslint-disable global-require */ 'use strict'; const allRules = { 'no-unused-styles': require('./lib/rules/no-unused-styles'), 'no-inline-styles': require('./lib/rules/no-inline-styles'), 'no-color-literals': require('./lib/rules/no-color-literals'), 'split-platform-components': require('./lib/rules/split-...
Fix all config for Eslint 4
Fix all config for Eslint 4
JavaScript
mit
Intellicode/eslint-plugin-react-native
0a256cc090a1577dc9af7574351c1bf76f802c5d
build/responsive.js
build/responsive.js
const paths = require('./paths'); const fs = require('fs-extra'); const glob = require('glob'); /** * Build the breakpoint * * @param {*} breakpoint * @param {*} count */ function buildBreakpoint(breakpoint, count) { let html = `html { font-family: '${count}'; }`; return `@${breakpoint} { ${html} }\n`; } modu...
const paths = require('./paths'); const fs = require('fs-extra'); const glob = require('glob'); /** * Build the breakpoint * * @param {*} breakpoint * @param {*} count */ function buildBreakpoint(breakpoint, count) { let html = `html { font-family: '${count}'; }`; return `@${breakpoint} { ${html} }\n`; } modu...
Disable linting for generated file
Disable linting for generated file
JavaScript
apache-2.0
weepower/wee,weepower/wee
f0bc01603b491f14e593cc24329c18efc2beaf40
lib/amazon/metadata-config.js
lib/amazon/metadata-config.js
// -------------------------------------------------------------------------------------------------------------------- // // metadata-config.js - config for AWS Instance Metadata // // Copyright (c) 2011, 2012 AppsAttic Ltd - http://www.appsattic.com/ // Written by Andrew Chilton <chilts@appsattic.com> // // License: ...
// -------------------------------------------------------------------------------------------------------------------- // // metadata-config.js - config for AWS Instance Metadata // // Copyright (c) 2011, 2012 AppsAttic Ltd - http://www.appsattic.com/ // Written by Andrew Chilton <chilts@appsattic.com> // // License: ...
Make sure the extractBody is set (not just body)
Make sure the extractBody is set (not just body)
JavaScript
mit
chilts/awssum
e40c302a81525957b523d07f287dab6bad0d4381
src/components/search_bar.js
src/components/search_bar.js
import React, { Component } from 'react' //class-based component (ES6) class SearchBar extends Component { render() { //method definition in ES6 return <input onChange={event => console.log(event.target.value)} />; } } export default SearchBar;
import React, { Component } from 'react' //class-based component (ES6) class SearchBar extends Component { constructor(props) { super(props); this.state = { term: '' } } render() { //method definition in ES6 return <input onChange={event => console.log(event.target.value)} />; } } export defaul...
Initialize state in class-based component
Initialize state in class-based component
JavaScript
mit
phirefly/react-redux-starter,phirefly/react-redux-starter
b870cb035827f13be864ba7efd4cc7a3476130c5
grunt/yuidoc.js
grunt/yuidoc.js
module.exports = { js: { lintNatives: true, name: '<%= pkg.name %>', url: '<%= pkg.homepage %>', version: '<%= pkg.version %>', description: '<%= pkg.description %>', options: { nocode: true, paths: './src/', outdir: './build/docume...
module.exports = { js: { lintNatives: true, name: '<%= pkg.name %> by <%= pkg.author.name %>', url: '<%= pkg.homepage %>', version: '<%= pkg.version %>', description: '<%= pkg.description %>', options: { nocode: true, paths: './src/', ...
Add author information for SEO purposes
Add author information for SEO purposes
JavaScript
mit
Skelware/node-file-parser,Skelware/node-file-parser
76865f1c78009871ea8f0ec2e565f7b462481539
lib/bundler/loaders/static.js
lib/bundler/loaders/static.js
export default () => { return { test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/i, loader: "file", query: { name: "assets/[name]-[hash].[ext]" } }; }
export default () => { return { test: /\.(png|jpg|gif|eot|ttf|woff|woff2)$/i, loader: "file", query: { name: "assets/[name]-[hash].[ext]" } }; }
Remove svg from file-loader test pattern
Remove svg from file-loader test pattern
JavaScript
mit
kiurchv/frontend,mkyurchev/frontend,sunshine-code/frontend-cli,sunshine-code/frontend-cli
43e31be248938a974944553c0152781f068f5122
public/app/accounts/accounts.js
public/app/accounts/accounts.js
angular.module('shortly.shorten', []) .controller('AccountsController', function ($scope, $window, $location, $http, Links) { // $scope.hasStripeConnectAccount = function() { // var currentUser = sessionStorage.getItem('user'); // console.log('user',currentUser); // }; $scope.authorize = function() {...
angular.module('shortly.shorten', []) .controller('AccountsController', function ($scope, $window, $location, $http, Links) { /** * Handles Stripe 'Connect' button submit. * Gets Connect account creation redirect url from server and manually sets href. */ $scope.authorize = function() { var currentU...
Add comments for functions that handle user account info submission
Add comments for functions that handle user account info submission
JavaScript
mit
arosenberg01/headcount,kyleshockey/headcount,Illustrious-Dirigble/headcount,kyleshockey/headcount,rockytang/headcount,rockytang/headcount,arosenberg01/headcount,henrymollman/headcount,Za1batsu/FinIt,Za1batsu/FinIt,henrymollman/headcount,Illustrious-Dirigble/headcount
bd7ff400fa44892019ec97cfda1c93f8e0e33d02
bin/fileTemplater.js
bin/fileTemplater.js
"use strict"; var fs = require('fs'); var path = require('path'); var extend = require('extend'); var template = require('lodash/template'); var errorHandler = require('./errorHandler'); var _fileNumber = 1; var _config = { onEachFile: function() {}, onCompleted: function() {} }; var fileTemplaterApi = {}; ...
"use strict"; var fs = require('fs'); var path = require('path'); var extend = require('extend'); var template = require('lodash/template'); var errorHandler = require('./errorHandler'); var _fileNumber = 1; var _config = { onEachFile: function() {}, onCompleted: function() {} }; var fileTemplaterApi = {}; ...
Add doc comments for file templater
docs: Add doc comments for file templater
JavaScript
mit
cartridge/cartridge-cli,code-computerlove/quarry,code-computerlove/slate-cli
dddef42d59dc3af1cd2a43b311774dc286251d15
app/instance-initializers/active-model-adapter.js
app/instance-initializers/active-model-adapter.js
import ActiveModelAdapter from 'active-model-adapter'; import ActiveModelSerializer from 'active-model-adapter/active-model-serializer'; export default { name: 'active-model-adapter', initialize: function(applicationOrRegistry) { var registry, container; if (applicationOrRegistry.registry && applicationOrR...
import ActiveModelAdapter from 'active-model-adapter'; import ActiveModelSerializer from 'active-model-adapter/active-model-serializer'; export default { name: 'active-model-adapter', initialize: function(applicationOrRegistry) { var registry; if (applicationOrRegistry.registry) { // initializeStoreS...
Remove unused container in instance initializer
Remove unused container in instance initializer
JavaScript
mit
bmac/active-model-adapter,ember-data/active-model-adapter,fivetanley/active-model-adapter,ember-data/active-model-adapter,jcope2013/active-model-adapter,ember-data/active-model-adapter,jcope2013/active-model-adapter,fivetanley/active-model-adapter,fivetanley/active-model-adapter,fivetanley/active-model-adapter,bmac/act...
1c528dd7dbe806411b0f2efcdf0e219b6c8c6e21
example/example/App.js
example/example/App.js
/** * Sample React Native Calendar Strip * https://github.com/BugiDev/react-native-calendar-strip * @flow */ import React, { Component } from 'react'; import CalendarStrip from "react-native-calendar-strip"; export default class App extends Component<{}> { render() { return ( <CalendarStrip ...
/** * Sample React Native Calendar Strip * https://github.com/BugiDev/react-native-calendar-strip * @flow */ import React, { Component } from 'react'; import CalendarStrip from "react-native-calendar-strip"; import moment from 'moment'; export default class App extends Component<{}> { render() { let customD...
Update example with customDatesStyles and markedDates.
Update example with customDatesStyles and markedDates.
JavaScript
mit
BugiDev/react-native-calendar-strip,BugiDev/react-native-calendar-strip,BugiDev/react-native-calendar-strip
e58cd331e4c5a21d42592d4b48333789ef1cfd50
replace-values.js
replace-values.js
module.exports = { "replace": { "_i18n/template.en-US.json": { "author": /docprofsky/g, "info-name": "info.name", "info-use": "info.use", "info-detail": "info.detail" }, "package.json": { "author": /docprofsky/g, "name": /template(?!_)/g }, "template.js": { ...
module.exports = { "replace": { "_i18n/template.en-US.json": { "author": /docprofsky/g, "info-name": "info.name", "info-use": "info.use", "info-detail": "info.detail" }, "package.json": { "author": /docprofsky/g, "name": /template(?!_)/g }, "template.js": { ...
Remove template file when done configuring
Remove template file when done configuring
JavaScript
mit
docprofsky/robopaint-mode-template,docprofsky/robopaint-mode-template
2ccca7dca1b4c6bbdcc5bf3faf408c6f14d388bf
gulpfile.js
gulpfile.js
var gulp = require('gulp') , gutil = require('gulp-util') , help = require('gulp-help') , path = require('path') , packageJson = require(path.resolve(__dirname, 'package.json')) , noop = function(){} help(gulp, { aliases: ['h'] }) gulp.task('version', 'Prints the version nu...
var gulp = require('gulp') , path = require('path') , fs = require('fs') , helpers = require(path.resolve(__dirname, 'lib', 'helpers')) require('gulp-help')(gulp, { aliases: ['h'] }) fs .readdirSync(path.resolve(__dirname, 'lib', 'tasks')) .filter(function(file) { return file.inde...
Load the tasks from lib/tasks
Load the tasks from lib/tasks
JavaScript
mit
my-archives/cli,martinLE/cli,cogpie/cli,itslenny/cli,sequelize/cli,ataube/cli,martinLE/cli,Americas/cli,timrourke/cli,brad-decker/cli,sequelize/cli,Americas/cli,skv-headless/cli,jteplitz602/cli,xpepermint/cli,brad-decker/cli,brad-decker/cli,martinLE/cli,Americas/cli,sequelize/cli,fundon/cli,cusspvz/sequelize-cli
f1cd6f85dd6fc7ccd1aa8d259ecdb9f34a149f9f
config/webpack/demo/webpack.config.hot.js
config/webpack/demo/webpack.config.hot.js
"use strict"; var _ = require("lodash"); // devDependency var base = require("./webpack.config.dev"); // Clone our own module object. var mod = _.cloneDeep(base.module); var firstLoader = mod.loaders[0]; // Update loaders array. First loader needs react-hot-loader. firstLoader.loaders = [require.resolve("react-hot-l...
"use strict"; var _ = require("lodash"); // devDependency var base = require("./webpack.config.dev"); // Clone our own module object. var mod = _.cloneDeep(base.module); var firstLoader = mod.loaders[0]; // Update loaders array. First loader needs react-hot-loader. firstLoader.loaders = [require.resolve("react-hot-l...
Use only-dev-server to not reload on syntax errors
Use only-dev-server to not reload on syntax errors
JavaScript
mit
FormidableLabs/builder-radium-component,FormidableLabs/builder-radium-component,FormidableLabs/builder-victory-component
a701b0fb2bd2008aef1fdb0a56ddccb8f7331f91
src/objects/isNumber/isNumber.js
src/objects/isNumber/isNumber.js
/** * Checks if 'value' is a number. * Note: NaN is considered a number. * @param {*} value The value to check. * @returns {Boolean} Returns true if 'value' is a number, else false. */ function isNumber(value) { 'use strict'; return value && Object.prototype.toString.call(value) === '[obje...
/** * Checks if 'value' is a number. * Note: NaN is considered a number. * @param {*} value The value to check. * @return {Boolean} Returns true if 'value' is a number, else false. */ function isNumber(value) { 'use strict'; return value != null && // NOTE: Using non strict equality to check against null ...
Fix to return true for NaN
Fix to return true for NaN
JavaScript
mit
georapbox/smallsJS,georapbox/jsEssentials,georapbox/smallsJS
c074e61d2506f472fedd8810b8e1f188df400b42
src/card.js
src/card.js
import m from 'mithril'; import attributes from './attributes'; export let Card = { view(ctrl, args, ...children) { args = args || {}; let attr = attributes(args); let {shadow} = args; attr.class.push('mdl-card'); if(shadow) attr.class.push(`mdl-shadow--${shadow}dp`); return <div {...attr}>{children}</d...
import m from 'mithril'; import attributes from './attributes'; export let Card = { view(ctrl, args, ...children) { args = args || {}; let attr = attributes(args); let {shadow} = args; attr.class.push('mdl-card'); if(shadow) attr.class.push(`mdl-shadow--${shadow}dp`); return <div {...attr}>{children}</d...
Fix wrong class name in CardSupportingText
Fix wrong class name in CardSupportingText
JavaScript
bsd-3-clause
reminyborg/node-mithril-mdl,PaulAvery/node-mithril-mdl,boazy/node-mithril-mdl,PaulAvery/mithril-mdl
5a695d9e91ba8783e6fe9cbe48ed7544f6642a94
lib/lint_css.js
lib/lint_css.js
var _ = require('lodash'); var stylelint = require('stylelint'); var STYLELINT_CONFIG = require('./config/stylelint'); var glob = require('glob'); var ruleUtils = require('./rule_utils'); var customRules = {}; var runLinter = function(contents, file, context) { var customRules = context.customRules || {}; _.merge...
var _ = require('lodash'); var path = require('path'); var stylelint = require('stylelint'); var STYLELINT_CONFIG = require('./config/stylelint'); var glob = require('glob'); var ruleUtils = require('./rule_utils'); var customRules = {}; var runLinter = function(contents, file, context) { var customRules = context....
Add configBasedir to properly look up the plugins
Add configBasedir to properly look up the plugins
JavaScript
mit
natecavanaugh/check-source-formatting,natecavanaugh/check-source-formatting,natecavanaugh/check-source-formatting
13ca3b76cb5d8b9ff6818b13308f979f82f2a4b2
gulpfile.js
gulpfile.js
var gulp = require('gulp'), sass = require('gulp-sass'), rename = require('gulp-rename'), minifyCss = require('gulp-minify-css'), autoprefixer = require('gulp-autoprefixer'), browserSync = require('browser-sync').create(); gulp.task('dependencies', function() { gulp.src('bower_components/normali...
var gulp = require('gulp'), sass = require('gulp-sass'), rename = require('gulp-rename'), minifyCss = require('gulp-minify-css'), autoprefixer = require('gulp-autoprefixer'), browserSync = require('browser-sync').create(); gulp.task('dependencies', function() { gulp.src('bower_components/normali...
Update to gulp watch js folder
Update to gulp watch js folder
JavaScript
cc0-1.0
FatecSorocaba/semana-da-tecnologia,FatecSorocaba/semana-da-tecnologia
31269953529541f7c0d65dd6a9d2107867c190d2
src/reducers/compiledProjects.js
src/reducers/compiledProjects.js
import {List} from 'immutable'; import {CompiledProject} from '../records'; const initialState = new List(); function trimRight(list, maxLength) { if (list.size <= maxLength) { return list; } return list.splice(0, list.size - maxLength); } export default function compiledProjects(stateIn, action) { let ...
import {List} from 'immutable'; import {CompiledProject} from '../records'; const initialState = new List(); function trimRight(list, maxLength) { if (list.size <= maxLength) { return list; } return list.splice(0, list.size - maxLength); } export default function compiledProjects(stateIn, action) { let ...
Clear compiled projects when a project is created or switched to
Clear compiled projects when a project is created or switched to If you create a new project, or start the process of switching to an existing project, we want to clear the preview state. Otherwise: * When you create a new project, the old project sticks around * When switching projects, the preview is unpleasantly f...
JavaScript
mit
jwang1919/popcode,outoftime/learnpad,popcodeorg/popcode,outoftime/learnpad,popcodeorg/popcode,popcodeorg/popcode,jwang1919/popcode,jwang1919/popcode,jwang1919/popcode,popcodeorg/popcode
8b2cad5472e9aef24e3848e77a661ef04e16c468
server/index.js
server/index.js
var express = require('express'); var bodyParser = require('body-parser'); var app = express(); // host static client files on server // app.use(express.static(__dirname + '/client'/* TODO: insert/change client folder path here */)); app.use(bodyParser.urlencoded({extended: true})); app.use(bodyParser.json()); // ...
var express = require('express'); var bodyParser = require('body-parser'); var app = express(); // host static client files on server // app.use(express.static(__dirname + '/client'/* TODO: insert/change client folder path here */)); app.use(bodyParser.urlencoded({extended: true})); app.use(bodyParser.json()); // ...
Remove hardcoding of port number for Heroku
Remove hardcoding of port number for Heroku
JavaScript
mit
hr-memories/TagMe,BillZito/greenfield,hr-memories/greenfield,hr-memories/greenfield,BillZito/greenfield,hr-memories/TagMe
492b9d78a6a16daa3a9059b7bd24769c97d0443b
src/bin/commit-link-dependencies.js
src/bin/commit-link-dependencies.js
import {exec} from 'node-promise-es6/child-process'; import fs from 'node-promise-es6/fs'; async function run() { const {linkDependencies = {}} = await fs.readJson('package.json'); for (const dependencyName of Object.keys(linkDependencies)) { const dependencyPath = linkDependencies[dependencyName]; const ...
import {exec} from 'node-promise-es6/child-process'; import fs from 'node-promise-es6/fs'; async function run() { const {linkDependencies = {}} = await fs.readJson('package.json'); for (const dependencyName of Object.keys(linkDependencies)) { const dependencyPath = linkDependencies[dependencyName]; const ...
Use alternate way of setting git author
Use alternate way of setting git author
JavaScript
mit
vinsonchuong/npm-integration
5304671a6aff5a08b33464e8ff181766d00f6acd
src/layouts/column-layout.js
src/layouts/column-layout.js
export default class ColumnLayout { constructor (options) { this._options = { columns: 5 }; Object.assign(this._options, options); this._tileWidth = 0; this.height = 0; } layout (layoutParams) { const row = Math.floor(layoutParams.position / this...
export default class ColumnLayout { constructor (options) { this._options = { columns: 5, margin: 8, outerMargin: true }; Object.assign(this._options, options); this._tileWidth = 0; this.height = 0; } layout (layoutParams) { ...
Add support for margins in column layout.
Add support for margins in column layout.
JavaScript
mit
frigus02/silky-tiles
c29d2f92456d35b5f92e521f551e089c7f8c94f8
src/Paths.js
src/Paths.js
let argv = require('yargs').argv; class Paths { /** * Create a new Paths instance. */ constructor() { if (argv['$0'].includes('ava')) { this.rootPath = path.resolve(__dirname, '../'); } else { this.rootPath = process.cwd(); } } /** * Set t...
let argv = require('yargs').argv; class Paths { /** * Create a new Paths instance. */ constructor() { if (argv['$0'].includes('ava')) { this.rootPath = path.resolve(__dirname, '../'); } else { this.rootPath = process.cwd(); } } /** * Set t...
Use real env var for custom mix file
Use real env var for custom mix file The previous approach doesn’t work with current webpack cli now.
JavaScript
mit
JeffreyWay/laravel-mix
415925e578d732aa584d84282fbf62edd873d164
gulpfile.js
gulpfile.js
'use strict'; var gulp = require( 'gulp' ); var g = require( 'gulp-load-plugins' )(); var allTestFiles = './tests/**/*.js'; gulp.task( 'assets', function() { gulp.src([ 'node_modules/gulp-mocha/node_modules/mocha/mocha.{js,css}', 'node_modules/chai/chai.js' ]) .pipe( gulp.dest( 'public' ) ); }); gulp....
'use strict'; var gulp = require( 'gulp' ); var g = require( 'gulp-load-plugins' )(); var exec = require( 'child_process' ).exec; var allTestFiles = './tests/**/*.js'; gulp.task( 'assets', function() { gulp.src([ 'node_modules/gulp-mocha/node_modules/mocha/mocha.{js,css}', 'node_modules/chai/chai.js' ]) ...
Add Python server to localhost
Add Python server to localhost
JavaScript
mit
Ibanheiz/ajax,negherbon/ajax,denis-itskovich/ajax,ggviana/ajax,felipegtx/ajax,caiocutrim/ajax,afgoulart/ajax
f0e6d9a889711086a581afe731c6916325343198
gulpfile.js
gulpfile.js
var elixir = require('laravel-elixir'); /* |-------------------------------------------------------------------------- | Elixir Asset Management |-------------------------------------------------------------------------- | | Elixir provides a clean, fluent API for defining some basic Gulp tasks | for your Larave...
var elixir = require('laravel-elixir'); /* |-------------------------------------------------------------------------- | Elixir Asset Management |-------------------------------------------------------------------------- | | Elixir provides a clean, fluent API for defining some basic Gulp tasks | for your Larave...
Change browsersync to listen for changes to JS/LESS as well
Change browsersync to listen for changes to JS/LESS as well
JavaScript
mit
UCCNetworkingSociety/NetsocAdmin,UCCNetworkingSociety/NetsocAdmin,UCCNetworkingSociety/NetsocAdmin,UCCNetworkingSociety/NetsocAdmin
485cb7a0aff21ab4f8dd28db86935774a1fbf1b7
lib/main.js
lib/main.js
/* @flow */ const useLSP = atom.config.get('flow-ide.useLSP') // possible improvement: check if flow really supports lsp if (useLSP === true) { // eslint-disable-next-line global-require const { FlowLanguageClient } = require('./language-client') module.exports = new FlowLanguageClient() } else { // eslint-d...
/* @flow */ const useLSP = atom.config.get('flow-ide.useLSP') // notify to restart if the value changes atom.config.onDidChange('flow-ide.useLSP', () => { const buttons = [{ text: 'Restart', onDidClick () { return atom.restartApplication() }, }] atom.notifications.addInfo('Changing this value requires a...
Add notification to restart atom when switching to/from LSP
Add notification to restart atom when switching to/from LSP
JavaScript
mit
steelbrain/flow-ide
c0f7f3373ed393ea22f44ee65c39ba411300db1e
lib/main.js
lib/main.js
var NwBuilder = require("node-webkit-builder"); var asap = require("pdenodeify"); var path = require("path"); var rimraf = require("rimraf"); module.exports = function(options, buildResult){ var nwOptions = {}; // Convert the options to camelcase Object.keys(options).forEach(function(optName){ nwOptions[toCamelc...
var NwBuilder = require("node-webkit-builder"); var asap = require("pdenodeify"); var path = require("path"); var rimraf = require("rimraf"); module.exports = function(options, buildResult){ var nwOptions = {}; // Convert the options to camelcase Object.keys(options).forEach(function(optName){ nwOptions[toCamelc...
Use path.relative to create the bundles glob
Use path.relative to create the bundles glob
JavaScript
mit
stealjs/steal-nw,stealjs/steal-nw
44458bfb9a8c3f191336e6afc2a245eed4773afa
src/services/user/services/UserLinkImportService.js
src/services/user/services/UserLinkImportService.js
const { BadRequest } = require('@feathersjs/errors'); const userDataFilter = user => ({ userId: user._id, email: user.email, firstName: user.firstName, lastName: user.lastName, importHash: user.importHash, schoolId: user.schoolId, birthday: user.birthday, }); class UserLinkImportService { constructor(userServ...
const { BadRequest } = require('@feathersjs/errors'); const userDataFilter = user => ({ userId: user._id, email: user.email, firstName: user.firstName, lastName: user.lastName, importHash: user.importHash, schoolId: user.schoolId, birthday: user.birthday, }); class UserLinkImportService { constructor(userServ...
Add missing setup in class.
Add missing setup in class.
JavaScript
agpl-3.0
schul-cloud/schulcloud-server,schul-cloud/schulcloud-server,schul-cloud/schulcloud-server
f43e339602f096e781d5a9c82e3befc94c73bcf3
src/KillrVideo/scripts/requirejs-config.js
src/KillrVideo/scripts/requirejs-config.js
// Common configuration for RequireJS var require = { baseUrl: "/scripts", paths: { "jquery": "bower_components/jquery/dist/jquery.min", "knockout": "bower_components/knockout/dist/knockout", "bootstrap": "bower_components/bootstrap/dist/js/bootstrap.min", "text": "bower_compone...
// Common configuration for RequireJS var require = { baseUrl: "/scripts", paths: { "jquery": "bower_components/jquery/dist/jquery.min", "knockout": "bower_components/knockout/dist/knockout", "bootstrap": "bower_components/bootstrap/dist/js/bootstrap.min", "text": "bower_compone...
Fix javascript dependencies for a couple other plugins that aren't AMD modules
Fix javascript dependencies for a couple other plugins that aren't AMD modules
JavaScript
apache-2.0
LukeTillman/killrvideo-csharp,LukeTillman/killrvideo-csharp,rustyrazorblade/killrvideo-csharp,LukeTillman/killrvideo-csharp,rustyrazorblade/killrvideo-csharp,rustyrazorblade/killrvideo-csharp
568d969199234703fd987407f5ba438abd8e0eba
web/src/containers/page/overview/table/cell-inner.js
web/src/containers/page/overview/table/cell-inner.js
import { Map as map } from 'immutable'; import React from 'react'; import PropTypes from 'prop-types'; import Editable from '../../../editable'; import { formatCurrency } from '../../../../misc/format'; export default function OverviewTableCellInner({ cell, cellKey, rowKey, editable }) { if (editable) { //...
import { Map as map } from 'immutable'; import React from 'react'; import PropTypes from 'prop-types'; import Editable from '../../../editable'; import { formatCurrency } from '../../../../misc/format'; export default function OverviewTableCellInner({ cell, cellKey, rowKey, editable }) { if (editable) { //...
Use brackets to indicate negative values on overview table
Use brackets to indicate negative values on overview table
JavaScript
mit
felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget
b7613e8983281c1549a3c69e8c75698a45f00309
app/scripts/queryparser.js
app/scripts/queryparser.js
/* jshint devel:true */ /* global exports, require, URI */ exports.parser = function(url, callbacks) { if (url) { var queryMap = new URI(url).search(true); if (queryMap.CFTemplateURL && callbacks.onTemplate) { callbacks.onTemplate(queryMap.CFTemplateURL); } } };
/* jshint devel:true */ /* global exports, URI */ exports.parser = function(url, callbacks) { 'use strict'; if (url) { var queryMap = new URI(url).search(true); if (queryMap.CFTemplateURL && callbacks.onTemplate) { callbacks.onTemplate(queryMap.CFTemplateURL); } } };
Fix JSHint errors & warnings
Fix JSHint errors & warnings
JavaScript
mit
dmgress/cloudgrapher,dmgress/cloudgrapher
5ce651027d342ada2e4162f0f1d1f9e6bbcf51b3
scripts/routes/route-handler.js
scripts/routes/route-handler.js
import { genKey } from './key'; export default class RouteHandler { constructor(conf) { this.id = genKey(); this.init = conf.init; this.beforeInit = conf.beforeInit || null; this.beforeUpdate = conf.beforeUpdate || null; this.init = conf.init || null; this.update = conf.update || null; this.unload = con...
import { genKey } from './key'; export default class RouteHandler { constructor(conf) { this.id = genKey(); this.beforeInit = conf.beforeInit || null; this.beforeUpdate = conf.beforeUpdate || null; this.init = conf.init || null; this.update = conf.update || null; this.unload = conf.unload || null; } }
Remove duplcate init property on RouteHandler
Remove duplcate init property on RouteHandler
JavaScript
apache-2.0
weepower/wee-core
c14b51de61fac64aa8e1d05634885d00903fcca1
docgen/config.js
docgen/config.js
var algoliaComponents = require('algolia-frontend-components'); var fs = require('fs'); import {rootPath} from './path'; const prod = process.env.NODE_ENV === 'production'; const docsDist = process.env.DOCS_DIST; var content = JSON.parse(fs.readFileSync('./src/data/communityHeader.json', 'utf8').toString()); var hea...
var algoliaComponents = require('algolia-frontend-components'); var fs = require('fs'); import {rootPath} from './path'; const prod = process.env.NODE_ENV === 'production'; const docsDist = process.env.DOCS_DIST; var content = JSON.parse(fs.readFileSync('./src/data/communityHeader.json', 'utf8').toString()); var hea...
Update root url for prod
chore(build-doc): Update root url for prod
JavaScript
mit
algolia/instantsearch.js,algolia/instantsearch.js,algolia/instantsearch.js
49b3fb5255e9234d7817ce73a7b448372090bd17
routes/index.js
routes/index.js
var express = require('express'); var Git = require("nodegit"); var router = express.Router(); var token = process.env.GITHUB_TOKEN; router.post('/issues', function(req, res, next) { Git.Clone("https://" + token + ":x-oauth-basic@github.com/kewang/information-people", "./tmp", { checkoutBranch: "gh-pages" }).t...
var express = require('express'); var Git = require("nodegit"); var fs = require('fs'); var router = express.Router(); var GITHUB_TOKEN = process.env.GITHUB_TOKEN; var FILE_NAME = "index.htm"; var content; var repo; var head; var oid; router.post('/issues', function(req, res, next) { Git.Clone("https://" + GITHUB_TO...
Add push flow, but test fail
Add push flow, but test fail
JavaScript
mit
kewang/information-people,kewang/information-people
ec81364906306227b9e4d40160c3a4921c458ea3
examples/server-rendering/views/main.js
examples/server-rendering/views/main.js
const assert = require('assert') const choo = require('../../../') module.exports = function (params, state, send) { const serverMessage = state.message.server const clientMessage = state.message.client assert.equal(typeof serverMessage, 'string', 'server should be a string') assert.equal(typeof clientMessage...
const assert = require('assert') const choo = require('../../../') module.exports = function (params, state, send) { const serverMessage = state.message.server const clientMessage = state.message.client assert.equal(typeof serverMessage, 'string', 'server should be a string') assert.equal(typeof clientMessage...
Fix typo in server rendering view
Fix typo in server rendering view
JavaScript
mit
yoshuawuyts/choo,antiBaconMachine/choo,antiBaconMachine/choo
59120a3e1cd6fa2024d587af0655a0269f161211
routes/users.js
routes/users.js
var express = require('express'); var router = express.Router(); import encryptUtils from '../utilities/encrypt'; import userUtils from '../utilities/users_service.js'; import { userAuth, adminAuth } from '../utilities/auth'; router.post('/', (req, res) => { const { first_name, last_name, email, username, passwo...
var express = require('express'); var router = express.Router(); import encryptUtils from '../utilities/encrypt'; import userUtils from '../utilities/users_service.js'; import { userAuth, adminAuth } from '../utilities/auth'; router.post('/', (req, res) => { const { first_name, last_name, email, username, passwo...
Add user to session when they create a new account
Add user to session when they create a new account
JavaScript
mit
davidlamt/antfinder-api
584226c87cc41d09b28932972a55a22c74e420d2
config/db.config.js
config/db.config.js
module.exports = { db: { qrest_api:{ $filter: 'env', $base: { options: {} }, production: { url: 'mongodb://mongodb:27017/qrest_api' }, $default: { url: 'mongodb://localhost:27017/qrest_api...
module.exports = { db: { qrest_api:{ $filter: 'env', $base: { options: {} }, production: { url: process.env.MONGODB_URL || 'mongodb://mongodb:27017/qrest_api' }, $default: { url: process.e...
Add env override for mongodb url
Add env override for mongodb url
JavaScript
apache-2.0
jgrenon/qrest-api-server