commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
88f86838b7f7f926e5df349edcd6461284fde181
jest.config.js
jest.config.js
module.exports = { testEnvironment: 'node', preset: '@shelf/jest-mongodb' }
module.exports = { testEnvironment: 'node', preset: '@shelf/jest-mongodb', roots: ['src'] }
Add root to prevent infinite loop in watch
Add root to prevent infinite loop in watch
JavaScript
mit
synzen/Discord.RSS,synzen/Discord.RSS
f12db5425cf5246b95fcae2c8b54fdf092fc4158
core/modules/hubot/responder.js
core/modules/hubot/responder.js
var http = require('scoped-http-client'); var Responder = function (api, event, match, message) { this.api = api; this.event = event; this.match = match; this.message = message; }; Responder.prototype.random = function (arr) { return arr[Math.floor(Math.random() * arr.length)]; }; Responder.prot...
var http = require('scoped-http-client'), fs = require('fs'), path = require('path'), urlMatcher = /^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/, imageExts = ['.jpg','.png','.gif','.gifv','.tif','.tiff','.jpeg']; var getType = function(message) { try { fs.statSync(message); return 'file'; } catch...
Enable image/file/url embedding with hubot scripts
Enable image/file/url embedding with hubot scripts
JavaScript
mit
concierge/Concierge,faizaanmadhani/brianIsTenCarols,faizaanmadhani/brianIsTenCarols,concierge/Concierge
0dabf910f31ed3b0fdacc742eae9555962462b57
src/javascripts/asyncModules/Label.js
src/javascripts/asyncModules/Label.js
import Module from '../Module' export default class Label extends Module { constructor(el, name, options) { const defaults = { "once": false, "activeClass": "is-active" } super(el, name, options, defaults) } init() { const Input = this console.log(Input); let toggleLabel ...
import Module from '../Module' export default class Label extends Module { constructor(el, name, options) { const defaults = { "activeClass": "is-active" } super(el, name, options, defaults) } init() { const Input = this console.log(Input); let toggleLabel = function() { ...
Refactor some of the form CSS
Refactor some of the form CSS
JavaScript
mit
Jaywing/atomic,Jaywing/atomic
f17aea4fed7652378310b53630191e8a48461716
bin/cli.js
bin/cli.js
#!/usr/bin/env node var program = require('commander'); var prompt = require('inquirer'); var path = require('path'); var pkg = require(path.resolve(__dirname, '..', 'package.json')); program.version(pkg.version) program .command('new') .action(function() { console.log('hits new command'); }); ...
#!/usr/bin/env node var program = require('commander'); var prompt = require('inquirer'); var path = require('path'); var pkg = require(path.resolve(__dirname, '..', 'package.json')); program.version(pkg.version) program .command('new <name>') .description('Create a new project with the provided name') ...
Add in required argument name for new command
feat: Add in required argument name for new command
JavaScript
mit
code-computerlove/slate-cli,code-computerlove/quarry,cartridge/cartridge-cli
7f4cce36d7509feb926eed95a39f73c3dc28633d
scripts/main.js
scripts/main.js
/* * site: codemelon2012 * file: scripts/main.js * author: Marshall Farrier * date: 8/24/2012 * description: * main JavaScript for codemelon2012 * links: * http://code.google.com/p/jquery-rotate/ (if needed) */ function codeMelonMain(activePage) { if (!$.support.boxModel) { window.location....
/* * site: codemelon2012 * file: scripts/main.js * author: Marshall Farrier * date: 8/24/2012 * description: * main JavaScript for codemelon2012 * links: * http://code.google.com/p/jquery-rotate/ (if needed) */ function codeMelonMain(activePage) { if (!$.support.boxModel) { window.location....
Edit comment to describe the difficulty more clearly.
Edit comment to describe the difficulty more clearly.
JavaScript
mit
aisthesis/codemelon2012,aisthesis/codemelon2012,aisthesis/codemelon2012,aisthesis/codemelon2012
bcd7062615b4a4210529525e359ad9e91da457c1
tasks/publish/concat.js
tasks/publish/concat.js
'use strict'; var applicationConf = process.requirePublish('conf.json'); /** * Gets the list of minified JavaScript files from the given list of files. * * It will just replace ".js" by ".min.js". * * @param Array files The list of files * @return Array The list of minified files */ function getMinifiedJSFiles...
'use strict'; var applicationConf = process.requirePublish('conf.json'); /** * Gets the list of minified JavaScript files from the given list of files. * * It will just replace ".js" by ".min.js". * * @param Array files The list of files * @return Array The list of minified files */ function getMinifiedJSFiles...
Correct bug when compiling JavaScript sources
Correct bug when compiling JavaScript sources Compiled JavaScript files were empty due to previous modifications on routes architecture. Configuration of grunt concat task wasn't conform to this new architecture.
JavaScript
agpl-3.0
veo-labs/openveo-publish,veo-labs/openveo-publish,veo-labs/openveo-publish
7683a9a714d86a223fb89e9e7126aa7bcb8ac57d
public/javascripts/ga.js
public/javascripts/ga.js
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); g...
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga...
Update google analytics tracking code
Update google analytics tracking code
JavaScript
bsd-3-clause
BloodAxe/CloudCV,BloodAxe/CloudCV
fe7059841567191c87c61e0e51f11d634db5d138
src/app/middleware/malformedPushEventError.js
src/app/middleware/malformedPushEventError.js
(function() { var csError = require('./csError'); var MalformedPushEventError = csError.createCustomError('MalformedPushEventError', function() { var message = 'There are no translators that understand the payload you are sending.'; var errors = [message]; MalformedPushEventError.prototype.constructor....
(function() { var csError = require('./csError'); var MalformedPushEventError = csError.createCustomError('MalformedPushEventError', function() { var message = 'Push event could not be processed.'; var errors = [message]; MalformedPushEventError.prototype.constructor.call(this, errors, 400); }); m...
Change the error message to not be so implementy in lingo
S-53159: Change the error message to not be so implementy in lingo
JavaScript
bsd-3-clause
openAgile/CommitStream.Web,JogoShugh/CommitStream.Web,openAgile/CommitStream.Web,JogoShugh/CommitStream.Web,JogoShugh/CommitStream.Web,openAgile/CommitStream.Web,openAgile/CommitStream.Web,JogoShugh/CommitStream.Web
24f71bb57f77debde99101c4d03839b0e5792748
src/main/webapp/js/account/account-controller.js
src/main/webapp/js/account/account-controller.js
'use strict'; function AccountCtrl($scope, $http, $cookieStore, flash, AccountService, LoginService, ServerErrorResponse, Base64) { $scope.currentAccount = angular.copy(AccountService.getAccount()); $scope.changePassword = function() { LoginService.changePassword($scope.password.oldPassword, $scope.pa...
'use strict'; function AccountCtrl($scope, $http, $cookieStore, flash, AccountService, LoginService, ServerErrorResponse, Base64) { $scope.currentAccount = angular.copy(AccountService.getAccount()); $scope.changePassword = function() { LoginService.changePassword($scope.password.oldPassword, $scope.pa...
Update cookie when user changes password.
Update cookie when user changes password.
JavaScript
apache-2.0
GeoKnow/GeoKnowGeneratorUI,GeoKnow/GeoKnowGeneratorUI,GeoKnow/GeoKnowGeneratorUI
b3eae251fac261eb3d903c056ebf4e6da531f174
addon/components/google-maps-addon.js
addon/components/google-maps-addon.js
import Ember from 'ember'; import Map from '../map'; export default Ember.Component.extend({ setupMap: Ember.on('init', function() { this.map = new Map(); this.map.set('owner', this); }), setupMapElement: Ember.on('willInsertElement', function() { this.map.initializeOptions(); // Checking for t...
import Ember from 'ember'; import Map from '../map'; export default Ember.Component.extend({ setupMap: Ember.on('init', function() { this.map = new Map(); this.map.set('owner', this); }), setupMapElement: Ember.on('didInsertElement', function() { this.map.initializeOptions(); // Checking for th...
Fix an issue with the map being empty on a page transition
Fix an issue with the map being empty on a page transition
JavaScript
mit
SamvelRaja/google-maps-addon,SamvelRaja/google-maps-addon
cd8e0a15daa5ef8feaedc43808fc498b746bb133
decls/redux.js
decls/redux.js
// @flow declare module 'redux' { declare type Enhancer<Action, State> = mixed; declare type ReduxStore<Action, State> = { dispatch: (action: Action) => void | Promise<void>, getState: () => State, }; declare type ReduxMiddleware<Action, State> = (store: ReduxStore<Action, State>) => (next: (...
// @flow declare module 'redux' { declare var createStore: Function; declare var applyMiddleware: Function; }
Simplify the Flow declarations for Redux
Simplify the Flow declarations for Redux
JavaScript
mit
clarus/redux-ship
3516155c660223e394986d8d2c2e4282dcf062d1
app/assets/javascripts/app_core.js
app/assets/javascripts/app_core.js
require([ "jquery" ], function($) { "use strict"; require([ "lib/core/base", "lib/page/scroll_perf", "flamsteed", "trackjs", "polyfills/function_bind", "polyfills/xdr" ], function(Base, ScrollPerf, Flamsteed) { $(function() { var secure = window.location.protocol === "https:"...
require([ "jquery" ], function($) { "use strict"; require([ "lib/core/base", "lib/page/scroll_perf", "flamsteed", "trackjs", "polyfills/function_bind", "polyfills/xdr" ], function(Base, ScrollPerf, Flamsteed) { $(function() { var secure = window.location.protocol === "https:"...
Set Flamsteed `schema` to `Flamsteed` instance
Set Flamsteed `schema` to `Flamsteed` instance
JavaScript
mit
lonelyplanet/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo
5f7fc53336aeb6b88a24761da99ca3d93c22e40c
src/helper.spec.js
src/helper.spec.js
var expect = require('chai').expect; var helper = require('./helper'); describe('helper', function () { it('should camelCase text', function () { expect(helper.camelCase('snake_case')).to.be.equal('snakeCase'); expect(helper.camelCase('very-dash')).to.be.equal('veryDash'); expect(helper.camelCase('soNoth...
var expect = require('chai').expect; var helper = require('./helper'); describe('helper', function () { it('should camelCase text', function () { expect(helper.camelCase('snake_case')).to.be.equal('snakeCase'); expect(helper.camelCase('very-dash')).to.be.equal('veryDash'); expect(helper.camelCase('soNoth...
Add a missing test case
Add a missing test case
JavaScript
mit
RisingStack/swaggity,RisingStack/swaggity
942e1fb57ab588294badf3934f4280a15b550556
app/index.js
app/index.js
const generators = require('yeoman-generator') const fs = require('fs') module.exports = generators.Base.extend({ constructor: function () { generators.Base.apply(this, arguments) this.sourceRoot(__dirname + '/../kit') }, prompting: function () { var done = this.async(); const prompts = [ ...
const generators = require('yeoman-generator') const fs = require('fs') module.exports = generators.Base.extend({ constructor: function () { generators.Base.apply(this, arguments) this.sourceRoot(__dirname + '/../kit') }, prompting: function () { var done = this.async(); const prompts = [ ...
Read from the same object
Read from the same object
JavaScript
mit
muffin/cli,muffinjs/cli
be3e40877f72374110b1b27b4c2912c3826dd073
lib/get_all.js
lib/get_all.js
var minimatch = require('minimatch'); var is = require('annois'); var fp = require('annofp'); var zip = require('annozip'); module.exports = function(model, query, cb) { if(!is.object(query) || fp.count(query) === 0) { return is.fn(cb)? cb(null, model._data): query(null, model._data); } var fields...
var minimatch = require('minimatch'); var is = require('annois'); var fp = require('annofp'); var zip = require('annozip'); module.exports = function(model, query, cb) { if(!is.object(query) || fp.count(query) === 0) { return is.fn(cb)? cb(null, model._data): query(null, model._data); } var fields...
Allow minimatch match slashes too
Allow minimatch match slashes too
JavaScript
mit
MartinKolarik/api-sync,MartinKolarik/api,jsdelivr/api-sync,2947721120/jsdelivr-api,jsdelivr/api,jsdelivr/api-sync,MartinKolarik/api-sync
1b4cd822a398eda824c0ea4223e665977abf50e6
app/containers/SignupPage/index.js
app/containers/SignupPage/index.js
import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import Helmet from 'react-helmet'; import Header from 'components/Header'; import SignupCard from 'components/SignupCard'; export class SignupPage extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function ren...
import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import Helmet from 'react-helmet'; import { createStructuredSelector } from 'reselect'; import { signupRequest } from 'containers/App/actions'; import { makeSelectError } from 'containers/App/selectors'; import Header from 'components/Hea...
Connect error state adn signupRequest action
Connect error state adn signupRequest action
JavaScript
mit
kevinnorris/bookTrading,kevinnorris/bookTrading
d3cca9554d31b7e20dd9b76eae463b532a2b7767
src/lang/kindOf.js
src/lang/kindOf.js
define(function () { var _toString = Object.prototype.toString; /** * Gets the "kind" of value. (e.g. "String", "Number", etc) */ function kindOf(val) { return _toString.call(val).slice(8, -1); } return kindOf; });
define(function () { /** * Gets the "kind" of value. (e.g. "String", "Number", etc) */ function kindOf(val) { return Object.prototype.toString.call(val).slice(8, -1); } return kindOf; });
Address comment about closure variable lookup.
Address comment about closure variable lookup.
JavaScript
mit
mout/mout,mout/mout
d5a0e4a1d63cffd6e3a9f24a4ed9a110a53a0623
src/plugins/Multipart.js
src/plugins/Multipart.js
import Plugin from './Plugin'; export default class Multipart extends Plugin { constructor(core, opts) { super(core, opts); this.type = 'uploader'; } run(results) { console.log({ class : 'Multipart', method : 'run', results: results }); const files = this.extractFiles(res...
import Plugin from './Plugin'; export default class Multipart extends Plugin { constructor(core, opts) { super(core, opts); this.type = 'uploader'; } run(results) { console.log({ class : 'Multipart', method : 'run', results: results }); const files = this.extractFiles(res...
Return file as part of upload
Return file as part of upload
JavaScript
mit
transloadit/uppy,varung-optimus/uppy,transloadit/uppy,varung-optimus/uppy,transloadit/uppy,transloadit/uppy,varung-optimus/uppy
5cbb7846f152cd61080d7b956a3a8c673b55345a
app/preload.js
app/preload.js
global.IPC = require('ipc') var events = ['unread-changed']; events.forEach(function(e) { window.addEventListener(e, function(event) { IPC.send(e, event.detail); }); }); require('./menus'); var shell = require('shell'); var supportExternalLinks = function (e) { var href; var isExternal = false; var checkDo...
global.IPC = require('ipc') var events = ['unread-changed']; events.forEach(function(e) { window.addEventListener(e, function(event) { IPC.send(e, event.detail); }); }); require('./menus'); var shell = require('shell'); var supportExternalLinks = function (e) { var href; var isExternal = false; var checkDo...
Fix login with oauth services
Fix login with oauth services
JavaScript
mit
RocketChat/Rocket.Chat.Electron,RocketChat/Rocket.Chat.Electron,ZedTheYeti/Rocket.Chat.Electron,RocketChat/Rocket.Chat.Electron,ZedTheYeti/Rocket.Chat.Electron,ZedTheYeti/Rocket.Chat.Electron
adca715e97d97fc7247ca966b55848076d00c6b3
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ...
Add JavaScript function for scrollable sections after clicking navbar links.
Add JavaScript function for scrollable sections after clicking navbar links.
JavaScript
mit
barreyro/steph.rocks,barreyro/steph.rocks,barreyro/steph.rocks
fdf4f520c31b0e5f8b666b02c5a9650929abfdbe
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Refactor out character creation scripts.
Refactor out character creation scripts.
JavaScript
mit
red-spotted-newts-2014/haunted,red-spotted-newts-2014/haunted
496f5e28920513750c5b4e3e5c06523c8162a238
troposphere/static/js/components/page_header.js
troposphere/static/js/components/page_header.js
define(['react', 'components/common/glyphicon'], function(React, Glyphicon) { var PageHeader = React.createClass({ render: function() { var help_button = []; var help_text = []; if (this.props.helpText) { help_button = React.DOM.button({ ...
define(['react', 'components/common/glyphicon'], function(React, Glyphicon) { var PageHeader = React.createClass({ getInitialState: function() { return {showHelpText: false}; }, render: function() { var help_button = []; var help_text = []; if...
Modify help text on page header component to not use bootstrap js
Modify help text on page header component to not use bootstrap js
JavaScript
apache-2.0
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
ac658b3bdcd2262b7db7d6b8bebadb05e31a07d4
src/selectors/tactics.js
src/selectors/tactics.js
import { createSelector } from 'reselect'; const getTactics = state => state.entities.tactics; export const tacticsSelector = createSelector( [getTactics], tactics => tactics.items.map(id => tactics.byId[id]), );
import { denormalize } from 'normalizr'; import { createSelector } from 'reselect'; import { tacticSchema } from '../constants/Schemas'; const getTactics = state => state.entities.tactics; const getTeams = state => state.entities.teams; export const tacticsSelector = createSelector( [getTactics], tactics => tactics...
Add tacticDetailsSelector that returns denormalized data
Add tacticDetailsSelector that returns denormalized data
JavaScript
mit
m-mik/tactic-editor,m-mik/tactic-editor
77b56eb68780c1b5d650ff6ecec65de606d540fd
src/objectifier.js
src/objectifier.js
// objectifier "use strict" // readObject :: [String] -> [String] -> Object String a const readObject = keys => values => { var i, obj, value obj = {} for (i = 0; i < keys.length; i++) { value = readValue(values[i]) if (value !== undefined) obj[keys[i]] = value } return obj } // readValue :: Stri...
// objectifier "use strict" // readObject :: [String] -> [String] -> Object String a const readObject = keys => values => { var i, obj, value obj = {} for (i = 0; i < keys.length; i++) { value = readValue(values[i]) obj[keys[i]] = value } return obj } // readValue :: String -> a const readValue =...
Read empty csv cells as undefined
Read empty csv cells as undefined
JavaScript
mit
OrgVue/csv-parser
0f66ff21eca76d202572e2b2c804292b98f97fa2
tests/dummy/config/environment.js
tests/dummy/config/environment.js
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, baseURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-contr...
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, baseURL: '/', locationType: 'auto', EmberENV: { FEATURES: { //'ember-htmlbars': true // Here you can enable experimental features on an ember canary ...
Add placeholder htmlbars flag in dummy app for packaging to toggle
Add placeholder htmlbars flag in dummy app for packaging to toggle
JavaScript
mit
minutebase/ember-dynamic-component,minutebase/ember-dynamic-component
e6817928854023b15842f9fb575e2e2202b2f1fe
src/routes.js
src/routes.js
import React from 'react'; import { BrowserRouter, Route, Switch } from 'react-router-dom'; import config from './config'; import routeConstants from './constants/routeConstants'; import Dashboard from './components/Dashboard'; import Header from './components/commons/Header'; import Footer from './components/commons...
import React from 'react'; import { BrowserRouter, Route, Switch } from 'react-router-dom'; import { app } from './config'; import routeConstants from './constants/routeConstants'; import Dashboard from './components/Dashboard'; import Header from './components/commons/Header'; import Footer from './components/common...
Use destructuring while using config
Use destructuring while using config
JavaScript
mit
leapfrogtechnology/chill-dashboard,leapfrogtechnology/chill-dashboard
0f890d943964aad281488ed29b39d08e4b784e4f
app/utils/helmet.js
app/utils/helmet.js
// @flow import * as React from 'react'; import { Helmet } from 'react-helmet'; import config from 'app/config'; import { type ComponentType, createElement } from 'react'; /** * A higher order component that wraps the given component in * LoadingIndicator while `props[loadingProp]` is being fetched. */ type Prope...
// @flow import * as React from 'react'; import { Helmet } from 'react-helmet'; import config from 'app/config'; import { type ComponentType, createElement } from 'react'; /** * A higher order component that wraps the given component in * LoadingIndicator while `props[loadingProp]` is being fetched. */ type Prope...
Add null check to property generator
Add null check to property generator
JavaScript
mit
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
0e1918abc188791976b57e0ff58e49382920950e
src/bin/pfmt.js
src/bin/pfmt.js
#!/usr/bin/env node import "babel-polyfill"; import yargs from "yargs"; import * as analyse from "../commands/analyse"; import * as measure from "../commands/measure"; yargs .help("help") .wrap(100) .usage("Usage: $0 <command> [options]") .command("analyse", "Analyse measurements", analyse) .comm...
#!/usr/bin/env node import "babel-polyfill"; import yargs from "yargs"; import * as analyse from "../commands/analyse"; import * as measure from "../commands/measure"; import * as stress from "../commands/stress"; yargs .help("help") .wrap(100) .usage("Usage: $0 <command> [options]") .command("analys...
Use correct module for stress command
Use correct module for stress command
JavaScript
apache-2.0
performeter/pfmt
027d53e264619b5839e73cea53f4b7d25b24b9eb
src/templates/default.js
src/templates/default.js
JSONEditor.defaults.templates["default"] = function() { return { compile: function(template) { var matches = template.match(/{{\s*([a-zA-Z0-9\-_\.]+)\s*}}/g); var l = matches.length; // Shortcut if the template contains no variables if(!l) return function() { return template; }; //...
JSONEditor.defaults.templates["default"] = function() { return { compile: function(template) { var matches = template.match(/{{\s*([a-zA-Z0-9\-_\.]+)\s*}}/g); var l = matches && matches.length; // Shortcut if the template contains no variables if(!l) return function() { return template; }...
Check that regex matching template vars is not null
Check that regex matching template vars is not null
JavaScript
mit
LACabeza/json-editor,jdorn/json-editor,JJediny/json-editor,flibbertigibbet/json-editor,cunneen/json-editor,YousefED/json-editor,azavea/json-editor,flibbertigibbet/json-editor,ZECTBynmo/json-editor,ashwinrayaprolu1984/json-editor,timelyportfolio/json-editor,Tmeister/json-editor,grokify/json-editor,azavea/json-editor,abo...
c5a9d228885d03370e854b706508938390a16b8c
src/rules/extend-require-placeholder/index.js
src/rules/extend-require-placeholder/index.js
import { utils } from "stylelint" export const ruleName = "extend-require-placeholder" export const messages = utils.ruleMessages(ruleName, { rejected: "Use a placeholder selector (e.g. %some-placeholder) with @extend", }) export default function (actual) { return function (root, result) { const validOptions...
import { utils } from "stylelint" export const ruleName = "extend-require-placeholder" export const messages = utils.ruleMessages(ruleName, { rejected: "Use a placeholder selector (e.g. %some-placeholder) with @extend", }) export default function (actual) { return function (root, result) { const validOptions...
Replace regex with faster check
Replace regex with faster check
JavaScript
mit
kristerkari/stylelint-scss,dryoma/stylelint-scss
7645a663bab5266ca1d89b6a07ebc756719760e0
client/src/js/home/components/Welcome.js
client/src/js/home/components/Welcome.js
import { get } from "lodash-es"; import React from "react"; import { connect } from "react-redux"; import { Icon, Panel } from "../../base"; const Welcome = props => { let version; if (props.version) { version = <small className="text-muted">{props.version}</small>; } return ( <div cla...
import { get } from "lodash-es"; import React from "react"; import { connect } from "react-redux"; import { Box, Container, Icon } from "../../base"; const Welcome = props => { let version; if (props.version) { version = <small className="text-muted">{props.version}</small>; } return ( ...
Replace Panel in home component
Replace Panel in home component
JavaScript
mit
igboyes/virtool,virtool/virtool,igboyes/virtool,virtool/virtool
001c075f06c49ec3507328a0d0c936d26e1426ab
browser.js
browser.js
var browsers = [ [ 'chrome', /Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/ ], [ 'firefox', /Firefox\/([0-9\.]+)(?:\s|$)/ ], [ 'opera', /Opera\/([0-9\.]+)(?:\s|$)/ ], [ 'ie', /Trident\/7\.0.*rv\:([0-9\.]+)\).*Gecko$/ ], [ 'ie', /MSIE\s([0-9\.]+);.*Trident\/[4-6].0/ ], [ 'bb10', /BB10;\sTouch.*Version\/([0-9\.]+)/ ] ]...
var browsers = [ [ 'chrome', /Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/ ], [ 'firefox', /Firefox\/([0-9\.]+)(?:\s|$)/ ], [ 'opera', /Opera\/([0-9\.]+)(?:\s|$)/ ], [ 'ie', /Trident\/7\.0.*rv\:([0-9\.]+)\).*Gecko$/ ], [ 'ie', /MSIE\s([0-9\.]+);.*Trident\/[4-6].0/ ], [ 'bb10', /BB10;\sTouch.*Version\/([0-9\.]+)/ ] ]...
Fix access error when detection fails
Fix access error when detection fails
JavaScript
mit
DamonOehlman/detect-browser,baribadamshin/detect-browser,DamonOehlman/detect-browser
a178efa101fa6b716e03dbc1a86fe9db68904a6d
Test/Siv3DTest.js
Test/Siv3DTest.js
Module.preRun = [ function () { FS.mkdir('/test'); FS.mount(NODEFS, { root: '../../Test/test' }, '/test'); FS.mkdir('/resources'); FS.mount(NODEFS, { root: './resources' }, '/resources'); } ]
Module.preRun = [ function () { FS.mkdir('/test'); FS.mount(NODEFS, { root: '../../Test/test' }, '/test'); FS.mkdir('/resources'); FS.mount(NODEFS, { root: './resources' }, '/resources'); // // Mock Implementations // global.navigator = { getGamepads: function() { r...
Add mock function implementations (navigator.getGamepads())
[Web][CI] Add mock function implementations (navigator.getGamepads())
JavaScript
mit
Siv3D/OpenSiv3D,Siv3D/OpenSiv3D,Siv3D/OpenSiv3D,Siv3D/OpenSiv3D,Siv3D/OpenSiv3D,Siv3D/OpenSiv3D
677cbf4b30eaed2ccb9621879ec42b3078e6446a
test/testIntegration.js
test/testIntegration.js
/** * Run each test under ./integration, one at a time. * Each one will likely need to pollute global namespace, and thus will need to be run in a forked process. */ var fs = require('fs'); var files = fs.readdirSync(fs.realpathSync('./test/integration')); var shell = require('shelljs'); var pattern = /^(test)\w*\....
/** * Run each test under ./integration, one at a time. * Each one will likely need to pollute global namespace, and thus will need to be run in a forked process. */ var fs = require('fs'); var files = fs.readdirSync(fs.realpathSync('./test/integration')); var shell = require('shelljs'); var pattern = /^(test)\w*\....
Fix async logic in integration test runner
Fix async logic in integration test runner
JavaScript
mit
jay-depot/turnpike,jay-depot/turnpike
4ca81eb3e33a007f18a9aa59051d9bea4a34cd4b
packages/fs/src/index.js
packages/fs/src/index.js
'use strict' /* @flow */ import FS from 'fs' import Path from 'path' import promisify from 'sb-promisify' export const readFile = promisify(FS.readFile) export const writeFile = promisify(FS.writeFile) export async function readJSON(filePath: string, encoding: string = 'utf8'): Promise { const contents = await rea...
'use strict' /* @flow */ import FS from 'fs' import Path from 'path' import promisify from 'sb-promisify' export const readFile = promisify(FS.readFile) export const writeFile = promisify(FS.writeFile) export async function readJSON(filePath: string, encoding: string = 'utf8'): Promise { const contents = await rea...
Add writeJSON method in motion-fs
:new: Add writeJSON method in motion-fs
JavaScript
mpl-2.0
flintjs/flint,flintjs/flint,motion/motion,motion/motion,flintjs/flint
c35ffdfa5adfa42ac7db1e6475fae2687794aea7
db/models/index.js
db/models/index.js
// This file makes all join table relationships const database = process.env.DB_DATABASE; const dbHost = process.env.DB_HOST; const dbUser = process.env.DB_USER; const dbPassword = process.env.DB_PASS; const Sequelize = require('sequelize'); const sequelize = new Sequelize(database, dbUser, dbPassword, { dialect: 'ma...
// This file makes all join table relationships const db = process.env.DB_DATABASE; const dbHost = process.env.DB_HOST; const dbUser = process.env.DB_USER; const dbPassword = process.env.DB_PASS; const Sequelize = require('sequelize'); const sequelize = new Sequelize(db, dbUser, dbPassword, { dialect: 'mariadb', ho...
Make variable name more consistent
Make variable name more consistent
JavaScript
mit
francoabaroa/escape-reality,francoabaroa/escape-reality,lowtalkers/escape-reality,lowtalkers/escape-reality
d38ffbb8e604b3cd23eece42137ed2925bbda3c2
src/helpers/createTypeAlias.js
src/helpers/createTypeAlias.js
export default function createTypeAlias(j, flowTypes, { name, export } = { name: 'Props', export: false }) { const typeAlias = j.typeAlias( j.identifier(name), null, j.objectTypeAnnotation(flowTypes) ); if (export) { return j.exportNamedDeclaration(typeAlias); } return typeAlias; }
export default function createTypeAlias(j, flowTypes, { name='Props', shouldExport=false } = {}) { const typeAlias = j.typeAlias( j.identifier(name), null, j.objectTypeAnnotation(flowTypes) ); if (shouldExport) { return j.exportNamedDeclaration(typeAlias); } return typeAlias; }
Fix defaults, fix `export` arg name
Fix defaults, fix `export` arg name
JavaScript
mit
billyvg/codemod-proptypes-to-flow
cb5b6c72bffc569c2511af72c309b91dbd308c64
tests/acceptance/simple-relationships-test.js
tests/acceptance/simple-relationships-test.js
import Ember from 'ember'; import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; const { get } = Ember; moduleForAcceptance('Acceptance | simple relationships', { beforeEach() { this.author = server.create('author'); this.post = server.create('post', { ...
import Ember from 'ember'; import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; const { get } = Ember; moduleForAcceptance('Acceptance | simple relationships', { beforeEach() { this.author = server.create('author'); this.post = server.create('post', { ...
Clarify the role of each test in the simple relationships acceptance tests
Clarify the role of each test in the simple relationships acceptance tests
JavaScript
mit
amiel/ember-data-url-templates,amiel/ember-data-url-templates
1c00703a3ac96f44da886596dbb1db50ab79069f
cli/run.js
cli/run.js
/** * @file * Run validation by CLI */ var Q = require('q'); var getOptions = require('../actions/cli/get-options'); var suppressMessages = require('../actions/suppress'); var validateByW3c = require('../actions/validate-by-w3c'); var getReporter = require('../reporter'); function main() { getOptions() ...
/** * @file * Run validation by CLI */ var Q = require('q'); var getOptions = require('../actions/cli/get-options'); var suppressMessages = require('../actions/suppress'); var validateByW3c = require('../actions/validate-by-w3c'); var getReporter = require('../reporter'); function main() { getOptions() ...
Implement positive exit code if feed is not valid
Implement positive exit code if feed is not valid
JavaScript
mit
andre487/feed-validator,Andre-487/feed-validator,andre487/feed-validator,Andre-487/feed-validator
1af1c4e115cc9f806241ad589f497cd43b7fdad2
modules/who.js
modules/who.js
module.exports = function(ircbot, config) { var request = require('request'); ircbot.addListener('message', function (from, to, message) { if (to !== config.irc.announceChannel || message !== '!who') { return; } request({ url: 'https://fauna.initlab.org/api/users/present.json', json: true }, fun...
module.exports = function(ircbot, config) { var request = require('request'); ircbot.addListener('message', function (from, to, message) { if (to !== config.irc.announceChannel || message !== '!who') { return; } request({ url: 'https://fauna.initlab.org/api/users/present.json', json: true }, fun...
Send a different message when no one is in the Lab
Send a different message when no one is in the Lab
JavaScript
mit
initLab/irc-notifier
d230d002bf02fb1063b887a0b67d336c31f45b99
js/jquery-sidebar.js
js/jquery-sidebar.js
$.fn.sidebar = function() { var $sidebar = this; var $tabs = $sidebar.children('.sidebar-tabs').first(); var $container = $sidebar.children('.sidebar-content').first(); $sidebar.find('.sidebar-tabs > li > a').on('click', function() { var $tab = $(this).closest('li'); if ($tab.hasClass(...
$.fn.sidebar = function() { var $sidebar = this; var $tabs = $sidebar.children('.sidebar-tabs').first(); var $container = $sidebar.children('.sidebar-content').first(); $sidebar.find('.sidebar-tabs > li > a').on('click', function() { var $tab = $(this).closest('li'); if ($tab.hasClass(...
Make open() methods tab parameter optional
js/jquery: Make open() methods tab parameter optional The last three commits are closing #3
JavaScript
mit
wsignor/wsignor.github.io,noerw/sidebar-v2,noerw/sidebar-v2,Turbo87/sidebar-v2,andrewmartini/sidebar-v2,wsignor/wsignor.github.io,MuellerMatthew/sidebar-v2,andrewmartini/sidebar-v2,projectbid7/sidebar-v2
0deb09921fd17a6dac967a47ed2dee31fa85028e
js/reducers/index.js
js/reducers/index.js
import account from './account'; import person from './person'; import languages from './languages'; import jobTypes from './jobTypes'; import creditCards from './creditCards'; const { combineReducers } = require('redux'); export default combineReducers({ person, languages, account, jobTypes, creditCards });
import account from './account'; import person from './person'; import languages from './languages'; import jobTypes from './jobTypes'; import ownedJobs from './ownedJobs'; import creditCards from './creditCards'; const { combineReducers } = require('redux'); export default combineReducers({ person, languages, accoun...
Add ownedJobs reducer in combineReducers
Add ownedJobs reducer in combineReducers
JavaScript
mit
justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client
ec1a3d52a358958b27c3648299f96bf53de07e92
server/initViewEngine.js
server/initViewEngine.js
var path = require('path'); module.exports = function initViewEngine (keystone, app) { // Allow usage of custom view engines if (keystone.get('custom engine')) { app.engine(keystone.get('view engine'), keystone.get('custom engine')); } // Set location of view templates and view engine app.set('views', keystone...
var path = require('path'); module.exports = function initViewEngine (keystone, app) { // Allow usage of custom view engines if (keystone.get('custom engine')) { app.engine(keystone.get('view engine'), keystone.get('custom engine')); } // Set location of view templates and view engine app.set('views', keystone...
Update default views folder so it's relative to the current project, instead of being `/views` at the root of the filesystem.
Update default views folder so it's relative to the current project, instead of being `/views` at the root of the filesystem.
JavaScript
mit
trentmillar/keystone,frontyard/keystone,danielmahon/keystone,matthewstyers/keystone,trentmillar/keystone,vokal/keystone,benkroeger/keystone,benkroeger/keystone,andrewlinfoot/keystone,frontyard/keystone,frontyard/keystone,naustudio/keystone,Pop-Code/keystone,matthewstyers/keystone,trentmillar/keystone,vokal/keystone,vok...
fb90564f3e93db090f1cf622a22b0ec1fc9f2461
app/initializers/ember-cli-bem.js
app/initializers/ember-cli-bem.js
import Ember from 'ember'; import NamingStrategyFactory from 'ember-cli-bem/naming-strategies/factory'; const { Component, } = Ember; export default { name: 'ember-cli-bem', initialize(owner) { const config = owner.lookup('config:environment'); const addonConfig = config['ember-cli-bem']; const fa...
import Ember from 'ember'; import NamingStrategyFactory from 'ember-cli-bem/naming-strategies/factory'; const { Component, } = Ember; export default { name: 'ember-cli-bem', initialize(owner) { const config = owner.registry.resolve('config:environment'); const addonConfig = config['ember-cli-bem']; ...
Fix a bug in the initializer
Fix a bug in the initializer
JavaScript
mit
nikityy/ember-cli-bem,nikityy/ember-cli-bem
1dac18d5d0184d382513c34cc1ee2666b924ca35
plugins/queue/discard.js
plugins/queue/discard.js
// discard exports.register = function () { this.register_hook('queue','discard'); } exports.discard = function (next, connection) { var transaction = connection.transaction; if (connection.notes.discard || transaction.notes.discard) { connection.loginfo(this, 'discarding message'); ...
// discard exports.register = function () { this.register_hook('queue','discard'); this.register_hook('queue_outbound', 'discard'); } exports.discard = function (next, connection) { var transaction = connection.transaction; if (connection.notes.discard || transaction.notes.discard) { ...
Discard plugin should run on queue_outbound as well
Discard plugin should run on queue_outbound as well
JavaScript
mit
Synchro/Haraka,armored/Haraka,Dexus/Haraka,MignonCornet/Haraka,bsmr-x-script/Haraka,jjz/Haraka,julian-maughan/Haraka,AbhilashSrivastava/haraka_sniffer,alessioalex/Haraka,dweekly/Haraka,hatsebutz/Haraka,typingArtist/Haraka,DarkSorrow/Haraka,pedroaxl/Haraka,hiteshjoshi/my-haraka-config,hayesgm/Haraka,msimerson/Haraka,har...
41eea1ab82ce70a24874cd51498fffcfd3797541
eloquent_js_exercises/chapter09/chapter09_ex01.js
eloquent_js_exercises/chapter09/chapter09_ex01.js
verify(/ca[rt]/, ["my car", "bad cats"], ["camper", "high art"]); verify(/pr?op/, ["pop culture", "mad props"], ["plop"]); verify(/ferr[et|y|ari]/, ["ferret", "ferry", "ferrari"], ["ferrum", "transfer A"]); verify(/ious\b/, ["how delicious", "spacious room"], ...
// Fill in the regular expressions verify(/ca[rt]/, ["my car", "bad cats"], ["camper", "high art"]); verify(/pr?op/, ["pop culture", "mad props"], ["plop"]); verify(/ferr(et|y|ari)/, ["ferret", "ferry", "ferrari"], ["ferrum", "transfer A"]); verify(/ious\b/, ["how de...
Add Chapter 09, exercise 1
Add Chapter 09, exercise 1
JavaScript
mit
bewuethr/ctci
062ebb5ecf53c778c2e1e67e5f070927cedeb78d
meanrecipes/static/js/script.js
meanrecipes/static/js/script.js
$('#suggestions').typed({ strings: ["chocolate chip cookies", "brownies", "pancakes"], typeSpeed: 50, backSpeed: 15, backDelay: 1500, loop: true, }); $('#recipe-form').submit(function() { get_recipe($('#recipe-title').val()); return false; }); function get_recipe(title) { var url = '/recipe/sea...
$('#suggestions').typed({ strings: ["chocolate chip cookies", "brownies", "pancakes"], typeSpeed: 50, backSpeed: 15, backDelay: 1500, loop: true }); $('#recipe-form').submit(function() { get_recipe($('#recipe-title').val()); return false; }); function get_recipe(title) { var url = '/re...
Fix JSON parsing bug, ingredients displayed correctly again.
Fix JSON parsing bug, ingredients displayed correctly again.
JavaScript
bsd-2-clause
kkelk/MeanRecipes,kkelk/MeanRecipes,kkelk/MeanRecipes,kkelk/MeanRecipes
05825cb8ab1d4554153e1d327917665b5547792c
src/nodes/local-node-device-stats/device-stats.es6.js
src/nodes/local-node-device-stats/device-stats.es6.js
'use strict'; import { StatsCollector } from './lib/stats'; export default function(RED) { class DeviceStatsNode { constructor(n) { RED.nodes.createNode(this, n); this.name = n.name; this.mem = n.mem; this.nw = n.nw; this.load = n.load; this.hostname = n.hostname; this...
'use strict'; import { StatsCollector } from './lib/stats'; export default function(RED) { class DeviceStatsNode { constructor(n) { RED.nodes.createNode(this, n); this.name = n.name; this.mem = n.mem; this.nw = n.nw; this.load = n.load; this.hostname = n.hostname; this...
Clear the status only when the timeout is valid
Clear the status only when the timeout is valid
JavaScript
unknown
CANDY-LINE/candy-red,dbaba/candy-red,CANDY-LINE/candy-red,dbaba/candy-red,dbaba/candy-red,CANDY-LINE/candy-red
ddfd3f09e5d0efefbe88eafe6ebfe64d2ee19d2c
test/index.test.js
test/index.test.js
const assert = require('assert'); const configMergeLoader = require('../index.js'); describe('Config Merge Loader', function() { it('should return a function', function() { assert.equal(typeof configMergeLoader, 'function'); }); describe('when called', function() { const loaderInput = 'Loader Content'; ...
const assert = require('assert'); const configMergeLoader = require('../index.js'); describe('Config Merge Loader', function() { it('should return a function', function() { assert.equal(typeof configMergeLoader, 'function'); }); describe('when called', function() { const loaderInput = 'Loader Content'; ...
Test that it returns the same string it is given
Test that it returns the same string it is given
JavaScript
mit
bitfyre/config-merge-loader
f4015e8cd71450ddf7b7ebfb96f0957c3e5dea8d
test/plexacious.js
test/plexacious.js
const { expect } = require('chai'); const Plexacious = require('../js/Plexacious'); const plex = new Plexacious(); describe('Plexacious:', () => { describe('Event attaching:', () => { it('should attach a callback to an event', () => { plex.on('test', () => {}); expect(plex._eventEmitter.listenerCoun...
const { expect } = require('chai'); const Plexacious = require('../js/Plexacious'); const plex = new Plexacious(); describe('Plexacious:', () => { });
Remove event-related tests since we're now simply extending the EventEmitter class
Remove event-related tests since we're now simply extending the EventEmitter class
JavaScript
isc
ketsugi/plexacious
8d5b8c535cdc6c281f5e3b3613b548322eae4905
src/scripts/editor/Exporter.js
src/scripts/editor/Exporter.js
export default class Exporter { constructor(editor) { this.editor = editor; } getData() { var tweenTime = this.editor.tweenTime; var domain = this.editor.timeline.x.domain(); var domain_start = domain[0]; var domain_end = domain[1]; return { settings: { time: tweenTime.timer...
export default class Exporter { constructor(editor) { this.editor = editor; } getData() { var tweenTime = this.editor.tweenTime; var domain = this.editor.timeline.x.domain(); var domain_start = domain[0]; var domain_end = domain[1]; return { settings: { time: tweenTime.timer...
Add ability to add your own data in export (exporter.getJSON)
Add ability to add your own data in export (exporter.getJSON)
JavaScript
mit
idflood/TweenTime,idflood/TweenTime
3375511bc07214da78c36fdd4f87ec7bea8aceed
installed-tests/test/js/test0010basic.js
installed-tests/test/js/test0010basic.js
const JSUnit = imports.jsUnit; // application/javascript;version=1.8 function testBasic1() { var foo = 1+1; JSUnit.assertEquals(2, foo); } function testFakeFailure() { var foo = 1+1; JSUnit.assertEquals(5, foo); } JSUnit.gjstestRun(this, JSUnit.setUp, JSUnit.tearDown);
const JSUnit = imports.jsUnit; // application/javascript;version=1.8 function testBasic1() { var foo = 1+1; JSUnit.assertEquals(2, foo); } JSUnit.gjstestRun(this, JSUnit.setUp, JSUnit.tearDown);
Revert "Add a fake test failure"
Revert "Add a fake test failure" This reverts commit 564dc61d02b854a278b07e21c65c33859ee82dbc.
JavaScript
mit
pixunil/cjs,mtwebster/cjs,pixunil/cjs,djdeath/gjs,djdeath/gjs,djdeath/gjs,mtwebster/cjs,djdeath/gjs,mtwebster/cjs,pixunil/cjs,pixunil/cjs,endlessm/gjs,endlessm/gjs,mtwebster/cjs,endlessm/gjs,djdeath/gjs,pixunil/cjs,endlessm/gjs,mtwebster/cjs,endlessm/gjs
d688d4bdfa582484669f319b1829bfcbdaaeadae
esm/router.js
esm/router.js
/* global Node */ import { ensureEl } from './util.js'; import { setChildren } from './setchildren.js'; export function router (parent, Views, initData) { return new Router(parent, Views, initData); } export class Router { constructor (parent, Views, initData) { this.el = ensureEl(parent); this.Views = V...
/* global Node */ import { ensureEl } from './util.js'; import { setChildren } from './setchildren.js'; export function router (parent, Views, initData) { return new Router(parent, Views, initData); } export class Router { constructor (parent, Views, initData) { this.el = ensureEl(parent); this.Views = V...
Fix critical bug with Router
Fix critical bug with Router
JavaScript
mit
redom/redom,pakastin/redom
370aa543cf79d19ccfbba0b69f442a08db20cf90
data/fillIn.js
data/fillIn.js
/* * This Source Code is subject to the terms of the Mozilla Public License * version 2.0 (the "License"). You can obtain a copy of the License at * http://mozilla.org/MPL/2.0/. */ "use strict"; let {host, password} = self.options; if (location.hostname != host) throw new Error("Password is meant for a differen...
/* * This Source Code is subject to the terms of the Mozilla Public License * version 2.0 (the "License"). You can obtain a copy of the License at * http://mozilla.org/MPL/2.0/. */ "use strict"; let {host, password} = self.options; if (location.hostname != host) throw new Error("Password is meant for a differen...
Make sure to trigger "change" event when filling in passwords, webpage logic might rely on it
Make sure to trigger "change" event when filling in passwords, webpage logic might rely on it
JavaScript
mpl-2.0
palant/easypasswords,palant/easypasswords
5cfc30383756d04c84bf4306a350685185dd4ca4
couchdb.js
couchdb.js
// Copyright 2011 Iris Couch // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or...
// Copyright 2011 Iris Couch // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or...
Use an Express app instead
Use an Express app instead
JavaScript
apache-2.0
iriscouch/couchjs,iriscouch/couchjs
2f70c937c40af5fb88f76f5e7af08800f29a93fc
main/exports.js
main/exports.js
'use strict'; const {BrowserWindow, app} = require('electron'); const loadRoute = require('./utils/routes'); let exportsWindow = null; const openExportsWindow = show => { if (!exportsWindow) { exportsWindow = new BrowserWindow({ width: 320, height: 360, resizable: false, minimizable: fa...
'use strict'; const {BrowserWindow, app} = require('electron'); const loadRoute = require('./utils/routes'); let exportsWindow = null; const openExportsWindow = show => { if (!exportsWindow) { exportsWindow = new BrowserWindow({ width: 320, height: 360, resizable: false, maximizable: fa...
Fix the export window options
Fix the export window options The window should be minimizable but not fullscreenable.
JavaScript
mit
wulkano/kap
1ef3f1ce228275c3714a4874163b220c85fe6cce
client/app/controllers/profile.js
client/app/controllers/profile.js
angular.module('bolt.profile', ['bolt.auth']) .controller('ProfileController', function ($scope, $rootScope, $window, Auth, Profile) { $scope.newInfo = {}; $scope.session = window.localStorage; var getUserInfo = function () { Profile.getUser() .then(function (currentUser) { // $window.localStorage...
angular.module('bolt.profile', ['bolt.auth']) .controller('ProfileController', function ($scope, $rootScope, $window, Auth, Profile) { $scope.newInfo = {}; $scope.session = window.localStorage; var getUserInfo = function () { Profile.getUser() .catch(function (err) { console.error(err); }); ...
Remove zombie code, .then for useless promise
Remove zombie code, .then for useless promise
JavaScript
mit
elliotaplant/Bolt,gm758/Bolt,boisterousSplash/Bolt,thomasRhoffmann/Bolt,gm758/Bolt,boisterousSplash/Bolt,thomasRhoffmann/Bolt,elliotaplant/Bolt
56e908e8f9e4e4758eecbfa1a74e3d4d533dd4d2
collections/user.js
collections/user.js
Meteor.methods({ userAddVisitedRoom: function(roomId) { var rooms = Rooms.find({ _id: roomId }, { _id: 1 }); if (rooms.count() === 0) { throw new Meteor.Error(422, 'Room does not exist'); } var users = Meteor.users.find({ ...
Meteor.methods({ userAddVisitedRoom: function(roomId) { var rooms = Rooms.find({ _id: roomId }, { _id: 1 }); if (rooms.count() === 0) { throw new Meteor.Error(422, 'Room does not exist'); } var users = Meteor.users.find({ ...
Add visit counter for rooms.
Add visit counter for rooms.
JavaScript
mit
eagleoneraptor/confnode,eagleoneraptor/confnode,dnohales/confnode,dnohales/confnode
9888147ba44dd9a8505f07de40053cf3c71fdd04
init_chrome.js
init_chrome.js
chrome.app.runtime.onLaunched.addListener(function () { chrome.app.window.create('app/index.html', { bounds: { width: 800, height: 600, left: 100, top: 100 }, minWidth: 800, minHeight: 600 }); });
chrome.app.runtime.onLaunched.addListener(function () { chrome.app.window.create('app/index.html', { bounds: { width: 800, height: 600, left: 100, top: 100 }, minWidth: 400, minHeight: 400, frame: 'none' }); });
Hide frame on Chrome App
Hide frame on Chrome App
JavaScript
unknown
nitrotasks/nitro,nitrotasks/nitro,CaffeinatedCode/nitro
64994f9901bcf3cef537da822e603215fa5b4568
lib/models/errors.js
lib/models/errors.js
ErrorModel = function (appId) { var self = this; this.appId = appId; this.errors = {}; this.startTime = Date.now(); } _.extend(ErrorModel.prototype, KadiraModel.prototype); ErrorModel.prototype.buildPayload = function() { var metrics = _.values(this.errors); this.startTime = Date.now(); this.errors = {...
ErrorModel = function (appId) { var self = this; this.appId = appId; this.errors = {}; this.startTime = Date.now(); } _.extend(ErrorModel.prototype, KadiraModel.prototype); ErrorModel.prototype.buildPayload = function() { var metrics = _.values(this.errors); this.startTime = Date.now(); this.errors = {...
Remove redundant data (error time and events)
Remove redundant data (error time and events)
JavaScript
mit
meteorhacks/kadira,chatr/kadira
6a94be934d49b145a877609b2ea37f805ade5910
src/components/Footer.js
src/components/Footer.js
import React, { Component } from 'react'; class Footer extends Component { render() { if (this.props.data) { var networks = this.props.data.social.map(function (network) { return ( <span key={network.name} className="m-4"> <a href={network.url}> <i className={net...
import React, { Component } from 'react'; class Footer extends Component { render() { if (this.props.data) { var networks = this.props.data.social.map(function (network) { return ( <span key={network.name} className="m-4"> <a href={network.url} target="_blank" rel="noopener no...
Add target blank for footer links
Add target blank for footer links
JavaScript
mit
enesates/enesates.github.io,enesates/enesates.github.io,NestorPlasencia/NestorPlasencia.github.io,NestorPlasencia/NestorPlasencia.github.io
4d4bd6c4533b2be681752b90a999b1936cc954d4
middleware/ensure-found.js
middleware/ensure-found.js
/* * Ensures something has been found during the request. Returns 404 if * res.template is unset, res.locals is empty and statusCode has not been set * to 204. * * Should be placed at the very end of the middleware pipeline, * after all project specific routes but before the error handler & responder. * * @mod...
/* * Ensures something has been found during the request. Returns 404 if * res.template is unset, res.locals is empty and statusCode has not been set * to 204. * * Should be placed at the very end of the middleware pipeline, * after all project specific routes but before the error handler & responder. * * @mod...
Add req.method to error message on not found
Add req.method to error message on not found
JavaScript
mit
thebitmill/midwest
dad76c400c3a9188cb99227fb1725f932e673f34
www/js/app.js
www/js/app.js
/*global _:true, App:true, Backbone:true */ /*jshint forin:false, plusplus:false, sub:true */ 'use strict'; define([ 'zepto', 'install', 'datastore', 'collections/episodes', 'collections/podcasts', 'models/episode', 'models/podcast', 'views/app' ], function($, install, DataStore, Episod...
/*global _:true, App:true, Backbone:true */ /*jshint forin:false, plusplus:false, sub:true */ 'use strict'; define([ 'zepto', 'install', 'datastore', 'collections/episodes', 'collections/podcasts', 'models/episode', 'models/podcast', 'views/app' ], function($, install, DataStore, Episod...
Add audio type checks for MP3 and OGG Vorbis
Add audio type checks for MP3 and OGG Vorbis
JavaScript
mit
sole/high-fidelity,mozilla/high-fidelity,prateekjadhwani/high-fidelity,lmorchard/high-fidelity,sole/high-fidelity,prateekjadhwani/high-fidelity,lmorchard/high-fidelity,sole/high-fidelity,sole/high-fidelity,mozilla/high-fidelity
554c6401d5dc68d7609317aa332241eeaa8ceb17
back/controllers/city/community.ctrl.js
back/controllers/city/community.ctrl.js
/** * @fileOverview Communities CRUD controller. */ // var log = require('logg').getLogger('app.ctrl.city.Dashboard'); var ControllerBase = require('nodeon-base').ControllerBase; var CrudeEntity = require('crude-entity'); var CommunityEnt = require('../../entities/community.ent'); /** * Communities CRUD controlle...
/** * @fileOverview Communities CRUD controller. */ // var log = require('logg').getLogger('app.ctrl.city.Dashboard'); var ControllerBase = require('nodeon-base').ControllerBase; var CrudeEntity = require('crude-entity'); var CommunityEnt = require('../../entities/community.ent'); var CommunityMidd = require('../.....
Add CRUD forms on community controller
Add CRUD forms on community controller
JavaScript
mpl-2.0
WeAreRoots/weareroots.org
0f789ea82e785d9e06582e892c4ec4ea45f245c8
httpserver.js
httpserver.js
var http = require('http'); var url = require('url'); var port = 8000; var server = http.createServer(function (request, response){ try { //go to http://127.0.0.1:8000/?req=Monty console.log('Server Pinged'); //Ping the server (will show in the cmd prompt) //The below will be written to the Web Browser re...
var http = require('http'); var url = require('url'); var port = 8000; var server = http.createServer(function (request, response){ try { //go to http://127.0.0.1:8000/?req=Hello console.log('Server Pinged'); response.writeHead(200, {"Content-Type": "text/plain"}); var req = checkURL(request); var resp; i...
Fix Space and comment issues.
Fix Space and comment issues.
JavaScript
mit
delpillar/AvengersCC
c0ec7d4aa404259b62ee6d077e648d77ff0b08b5
src/components/Navbar.js
src/components/Navbar.js
/* * @flow */ import React from 'react'; export default function Navbar() { return ( <nav className="navbar navbar-default navbar-fixed-top navbar-inverse"> <div className="container-fluid"> <div className="navbar-header"> <a className="navbar-brand" href="/"> Bonsai - Trim...
/* * @flow */ import React from 'react'; export default function Navbar() { return ( <nav className="navbar navbar-default navbar-fixed-top navbar-inverse"> <div className="container-fluid"> <div className="navbar-header"> <a className="navbar-brand" href="/" onClick={(e) => { ...
Set the navbar to reload, no matter the url.
Set the navbar to reload, no matter the url.
JavaScript
apache-2.0
pinterest/bonsai,pinterest/bonsai,pinterest/bonsai
d55af7519d0c44b6686d066a29a79ffe478f5789
app/components/Accounts/accounts.controller.js
app/components/Accounts/accounts.controller.js
( function() { "use strict"; angular.module('ACBank') .controller('AccountsController', AccountsController); AccountsController.$inject = [ '$scope', '$ionicModal' ]; function AccountsController ($scope, $ionicModal) { var vm = this; vm.options = [ { iconClass: "ion-plus-round", imageSource: "...
( function() { "use strict"; angular.module('ACBank') .controller('AccountsController', AccountsController); AccountsController.$inject = [ '$scope', '$ionicModal' ]; function AccountsController ($scope, $ionicModal) { var vm = this; vm.options = [ { iconClass: "ion-plus-round", imageSource: "...
Create modal for withdraw form
Create modal for withdraw form
JavaScript
mit
danielzy95/NewLeaf-Bank,danielzy95/NewLeaf-Bank
ab82d0455847ebcec2bf7e57fe795f3924ff001b
tasks/dist.js
tasks/dist.js
import gulpLoadPlugins from 'gulp-load-plugins'; import runSequence from 'run-sequence'; import * as paths from './paths'; import gulp from './_gulp'; import jspmBuild from './utils'; const $ = gulpLoadPlugins(); gulp.task('dist:jspm', ['compile:styles'], () => jspmBuild({ minify: true, mangle: true, ...
import gulpLoadPlugins from 'gulp-load-plugins'; import runSequence from 'run-sequence'; import * as paths from './paths'; import gulp from './_gulp'; import jspmBuild from './utils'; const $ = gulpLoadPlugins(); gulp.task('dist:jspm', ['compile:styles'], () => jspmBuild({ minify: true, mangle: true, ...
Make sure we gzip our assets for deployment
Make sure we gzip our assets for deployment
JavaScript
unlicense
gsong/es6-jspm-gulp-starter,gsong/es6-jspm-gulp-starter
5733e5c5ef6467b7e74d0129201411651cde5ec1
client/src/safari-audio-bandaid.js
client/src/safari-audio-bandaid.js
'use strict'; const RELOAD_KEY = 'safari-reload-193289123', WAIT_TIME = 100; // Does it matter how long to wait? /** * Safari desktop audio is being dumb and won't play until a second page loads an audio file within a session. * Uses browser detection: http://stackoverflow.com/a/23522755 */ exports.check =...
'use strict'; const RELOAD_KEY = 'safari-reload-193289123', WAIT_TIME = 100; // Does it matter how long to wait? /** * Safari desktop audio is being dumb and won't play until a second page loads an audio file within a session. * Uses browser detection: http://stackoverflow.com/a/23522755 * * This still, d...
Fix error message logging in Safari bandaid
Fix error message logging in Safari bandaid
JavaScript
mit
hiddenwaffle/mazing,hiddenwaffle/mazing
15da64f080c5003a3cd62d6d51647d5a88c7069d
client/users/auth/register/exec.js
client/users/auth/register/exec.js
'use strict'; /** * client **/ /** * client.common **/ /** * client.common.auth **/ /** * client.common.auth.register **/ /*global $, _, nodeca, window*/ /** * client.common.auth.register.exec($form, event) * * send registration data on server **/ module.exports = function ($form, event) { ...
'use strict'; /** * client **/ /** * client.common **/ /** * client.common.auth **/ /** * client.common.auth.register **/ /*global $, _, nodeca, window*/ /** * client.common.auth.register.exec($form, event) * * send registration data on server **/ module.exports = function ($form, event) { ...
Use render.page for full-page reload
Use render.page for full-page reload
JavaScript
mit
nodeca/nodeca.users
eca75545e94bfeb2842992fb5e28b2f10946c6a8
agir/carte/components/map/index.js
agir/carte/components/map/index.js
import "ol/ol.css"; import "./style.css"; import listMap from "./listMap"; import itemMap from "./itemMap"; export default { listMap, itemMap, };
import "ol/ol.css"; import "./style.css"; export async function listMap() { const listMapModule = (await import("./listMap")).default; listMapModule.apply(null, arguments); } export async function itemMap() { const itemMapModule = (await import("./itemMap")).default; itemMapModule.apply(null, arguments); }
Revert "fix: chunk load errors on legacy map"
Revert "fix: chunk load errors on legacy map" This reverts commit 8f3220c2a95d1ec9ed6d1cbb742d579a019b7e36.
JavaScript
agpl-3.0
lafranceinsoumise/api-django,lafranceinsoumise/api-django,lafranceinsoumise/api-django,lafranceinsoumise/api-django
a2fda0c397b32f60c6bd8fccbd3e55ccaee381ed
src/battle/index.js
src/battle/index.js
import loop from 'loop'; import StatusBar from 'statusBar'; import BattleMap from 'map'; import state from 'state'; import { subtractSet } from 'pura/vector/tuple'; import { canvasOffsetLeft, canvasOffsetTop, scaleX, scaleY } from 'dom'; import { render as renderUI, uiElements, clearUi } from 'ui'; import { calcWorldPo...
import loop from 'loop'; import StatusBar from 'statusBar'; import BattleMap from 'map'; import state from 'state'; import { inputs } from 'controls'; import { subtractSet } from 'pura/vector/tuple'; import { canvasOffsetLeft, canvasOffsetTop, scaleX, scaleY } from 'dom'; import { render as renderUI, uiElements, clearU...
Update battle map with input handling
Update battle map with input handling
JavaScript
mit
HyphnKnight/js13k-2017,HyphnKnight/js13k-2017
5556cdf8a84ee8b1201f5e861395fafd784eab09
gevents.js
gevents.js
'use strict'; var request = require('request'); var opts = { uri: 'https://api.github.com' + '/users/jm-janzen/events', json: true, method: 'GET', headers: { 'User-Agent': 'nodejs script' } } request(opts, function (err, res, body) { if (err) throw new Error(err); var format = '[...
'use strict'; var request = require('request'); var opts = { uri: 'https://api.github.com' + '/users/' + process.argv[2] + '/events', json: true, method: 'GET', headers: { 'User-Agent': 'nodejs script' } } request(opts, function (err, res, body) { if (err) throw new Error(err); v...
Add user-name as parameter, rather than hardcoding
Add user-name as parameter, rather than hardcoding TODO check for user-name before attempting to issue request
JavaScript
mit
jm-janzen/scripts,jm-janzen/scripts,jm-janzen/scripts
d24c5ea29e999b3b1ed1c20fd4d19b27c54b302a
app/assets/javascripts/models/mixer.js
app/assets/javascripts/models/mixer.js
Mixer = function () { this.mix = [] } //Adds a track to the mix. Takes args = {url: sound.aws.com, divId: 1} Mixer.prototype.addTrack = function (args) { var newTrack = new Howl({ url : [args['url']] }); this.mix[args['divId']] = newTrack } Mixer.prototype.removeTrack = function (arrayPosition) { this.mix[arr...
Mixer = function () { this.mix = [] } //Adds a track to the mix. Takes args = {url: sound.aws.com, divId: 1} Mixer.prototype.addTrack = function (args) { var newTrack = new Howl({ url : [args['url']] }); this.mix[args['divId']] = newTrack; } Mixer.prototype.removeTrack = function (arrayPosition) { this.mix[ar...
Write globalPause and globalPlay methods for Mixer model
Write globalPause and globalPlay methods for Mixer model
JavaScript
mit
chi-bobolinks-2015/TheGoldenRecord,chi-bobolinks-2015/TheGoldenRecord,chi-bobolinks-2015/TheGoldenRecord
518fac5020c9055cda2e72b91319df340641d1c9
app/users/pwd-activation.controller.js
app/users/pwd-activation.controller.js
'use strict'; angular.module('arachne.controllers') /** * Set new password. * * @author: Daniel M. de Oliveira */ .controller('PwdActivationController', ['$scope', '$stateParams', '$filter', '$location', 'PwdActivation', 'messageService', function ($scope, $stateParams, $filter, $location,...
'use strict'; angular.module('arachne.controllers') /** * Set new password. * * @author: Daniel M. de Oliveira */ .controller('PwdActivationController', ['$scope', '$stateParams', '$filter', '$location', 'PwdActivation', 'messageService', function ($scope, $stateParams, $filter, $location,...
Change password reset error message
Change password reset error message
JavaScript
apache-2.0
dainst/arachnefrontend,dainst/arachnefrontend,codarchlab/arachnefrontend,codarchlab/arachnefrontend
ed49dda7b558b023170222c8e3c6cdbb661dd98e
karma.conf.js
karma.conf.js
// Karma configuration file, see link for more information // https://karma-runner.github.io/0.13/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular/cli'], plugins: [ require('karma-jasmine'), require('karma-chrome-...
// Karma configuration file, see link for more information // https://karma-runner.github.io/0.13/config/configuration-file.html module.exports = function (config) { configuration = { basePath: '', frameworks: ['jasmine', '@angular/cli'], plugins: [ require('karma-jasmine'), require('karma-ch...
Configure custom karma browser launcher for travis
Configure custom karma browser launcher for travis
JavaScript
mit
briggySmalls/late-train-mate,briggySmalls/late-train-mate,briggySmalls/late-train-mate
0008264bcabddf8d2b6b19fde7aa41b0de7a5b77
src/templates/Compact.js
src/templates/Compact.js
// Simple, slimline template based on https://github.com/rackt/react-router/blob/master/CHANGES.md import Default from './Default' export default class Compact extends Default { mergesTitle = null fixesTitle = null commitsTitle = null fixPrefix = 'Fixed ' mergePrefix = 'Merged ' listSpacing = '\n' re...
// Simple, slimline template based on https://github.com/rackt/react-router/blob/master/CHANGES.md import Default from './Default' const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] export default class Compact extends Default { ...
Replace toLocaleString usage with months array
Replace toLocaleString usage with months array Not supported in node 0.10
JavaScript
mit
CookPete/auto-changelog,CookPete/auto-changelog
d76659cde113f54aa724bf2554f9dc84bb2d8e8e
lib/cb.events.socketio/main.js
lib/cb.events.socketio/main.js
// Requires var wireFriendly = require('../utils').wireFriendly; function setup(options, imports, register) { // Import var events = imports.events; var io = imports.socket_io.io; // Send events to user io.of('/events').on('connection', function(socket) { // Send to client var han...
// Requires var wireFriendly = require('../utils').wireFriendly; function setup(options, imports, register) { // Import var events = imports.events; var io = imports.socket_io.io; // Send events to user io.of('/events').on('connection', function(socket) { // Send to client var han...
Change event propagation in socket.io
Change event propagation in socket.io
JavaScript
apache-2.0
kustomzone/codebox,code-box/codebox,ronoaldo/codebox,smallbal/codebox,ahmadassaf/Codebox,rajthilakmca/codebox,nobutakaoshiro/codebox,fly19890211/codebox,nobutakaoshiro/codebox,Ckai1991/codebox,listepo/codebox,rajthilakmca/codebox,LogeshEswar/codebox,listepo/codebox,rodrigues-daniel/codebox,smallbal/codebox,indykish/cod...
c9e4245ef6893d9981e7f3cd18c9beb3d20b172a
core/components/com_content/admin/assets/js/content.js
core/components/com_content/admin/assets/js/content.js
Hubzero.submitbutton = function(task) { $(document).trigger('editorSave'); var frm = document.getElementById('item-form'); if (frm) { if (task == 'cancel' || document.formvalidator.isValid(frm)) { Hubzero.submitform(task, frm); } else { alert(frm.getAttribute('data-invalid-msg')); } } } jQuery(docum...
Hubzero.submitbutton = function(task) { var frm = document.getElementById('adminForm'); if (frm) { return Hubzero.submitform(task, frm); } $(document).trigger('editorSave'); var frm = document.getElementById('item-form'); if (frm) { if (task == 'cancel' || document.formvalidator.isValid(frm)) { Hubzer...
Add support for submitbutton on listing page
[fix] Add support for submitbutton on listing page Fixes: https://qubeshub.org/support/ticket/1409
JavaScript
mit
zooley/hubzero-cms,zooley/hubzero-cms,anthonyfuentes/hubzero-cms,zooley/hubzero-cms,zweidner/hubzero-cms,zweidner/hubzero-cms,zweidner/hubzero-cms,anthonyfuentes/hubzero-cms,zweidner/hubzero-cms,anthonyfuentes/hubzero-cms,anthonyfuentes/hubzero-cms,zooley/hubzero-cms
bbae408dae6e4a10488f85ae5180ed62ba033406
javascript/irg-constants-config.js
javascript/irg-constants-config.js
IRG.constants = (function(){ var approvedDomains = function(){ return ["imgur.com", "flickr.com", "cdn.diycozyhome.com", "pbs.twimg.com", "msnbc.com", "fbcdn-sphotos-f-a.akamaihd.net", "flic.kr", "instagram.com", "deviantart.com", "s-media-cache-ak0.pinimg.com", "gfycat.com", "g...
IRG.constants = (function(){ var approvedDomains = function(){ return ["imgur.com", "flickr.com", "cdn.diycozyhome.com", "pbs.twimg.com", "msnbc.com", "fbcdn-sphotos-f-a.akamaihd.net", "flic.kr", "instagram.com", "deviantart.com", "s-media-cache-ak0.pinimg.com", "gfycat.com", "g...
Add a URL to the whitelist
Add a URL to the whitelist
JavaScript
mit
CharlieCorner/InfiniteRedditGallery,CharlieCorner/InfiniteRedditGallery
8ef3e64a4724f1a5ba59d785535c777888497793
javascript/irg-constants-config.js
javascript/irg-constants-config.js
IRG.constants = (function(){ var approvedDomains = function(){ return ["imgur.com", "flickr.com", "cdn.diycozyhome.com", "pbs.twimg.com", "msnbc.com", "fbcdn-sphotos-f-a.akamaihd.net", "flic.kr", "instagram.com", "deviantart.com", "s-media-cache-ak0.pinimg.com", "gfycat.com", "g...
IRG.constants = (function(){ var approvedDomains = function(){ return ["imgur.com", "flickr.com", "cdn.diycozyhome.com", "pbs.twimg.com", "msnbc.com", "fbcdn-sphotos-f-a.akamaihd.net", "flic.kr", "instagram.com", "deviantart.com", "s-media-cache-ak0.pinimg.com", "gfycat.com", "g...
Add a new domain to the whitelist
Add a new domain to the whitelist
JavaScript
mit
CharlieCorner/InfiniteRedditGallery,CharlieCorner/InfiniteRedditGallery
e3f7d5db84e5f24f7647e03c5b1f15a5e24b2d21
src/main/web/florence/js/functions/__init.js
src/main/web/florence/js/functions/__init.js
setupFlorence(); //forms field styling markup injection //$('select:not(.small)').wrap('<span class="selectbg"></span>'); //$('select.small').wrap('<span class="selectbg selectbg--small"></span>'); //$('.selectbg--small:eq(1)').addClass('selectbg--small--margin'); //$('.selectbg--small:eq(3)').addClass('float-right')...
setupFlorence();
Remove commented code not used.
Remove commented code not used.
JavaScript
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
cc4030c1901365a14360c581521bece5037b140f
mockingjays.js
mockingjays.js
Server = require('./src/server'); Mockingjay = require('./src/mockingjay'); DefaultOptions = require('./src/default_options'); var Mockingjays = function() {} /** * Start creates a Mockingjays Server and starts proxying * or mocking responses based on previous training. * * @param options - An {Object} with optio...
Server = require('./src/server'); Mockingjay = require('./src/mockingjay'); DefaultOptions = require('./src/default_options'); var Mockingjays = function() {} /** * Start creates a Mockingjays Server and starts proxying * or mocking responses based on previous training. * * @param options - An {Object} with optio...
Update Option Parsing for Mockingjays
Update Option Parsing for Mockingjays
JavaScript
apache-2.0
blad/mockingjays
5f54a6c59f4011b1a0027c9b92cbf532f4f457ad
points/index.js
points/index.js
var pointTable = {}; module.exports = function(match, response) { var points = Number(match[1]), multiplier = ('to' === match[2]) - ('from' === match[2]), target = match[3]; pointTable[target] = (pointTable[target] || 0) + (points * multiplier); response.end(target + ': ' + pointTable[target] + ' poin...
var math = require('mathjs'); var pointTable = {}; var renderPoints = function renderPoints(points) { if (typeof points !== 'number' || points !== points) { return 'wat'; } if (points === Infinity) { return 'way too many points'; } return points.toString + ' points'; }; var points = function poi...
Make point parsing and rendering less crappy
Make point parsing and rendering less crappy
JavaScript
mit
elvinyung/strapbots
7f6546b97f62020c2f5b7aeedd7e1f06f823137c
forwarder.js
forwarder.js
var follow = require('follow'); var request = require('request'); module.exports = function(db_url, handler_url) { function isSuccessCode(code) { return code >= 200 && code < 300; } function forwardHook(doc) { request({ url: handler_url, method: doc.req.method, body: doc.req.body, ...
var follow = require('follow'); var request = require('request'); module.exports = function(db_url, handler_url) { function isSuccessCode(code) { return code >= 200 && code < 300; } function forwardHook(doc) { var url = doc.req.query.handler_url || handler_url; if (!url) { console.log("No h...
Enable passing in handler_url via capture url querystring variable
Enable passing in handler_url via capture url querystring variable Allows use with providers that require you pass in notify url with each request
JavaScript
mit
gbuesing/hookforward
ee5ca8c1679e482746ee89c7df85073319fec595
lib/client.js
lib/client.js
'use strict'; /* lib/client.js * The Client object. * * */ module.exports = Client; function Client(socket){ if (typeof socket !== 'object') throw new Error('Clients can only bind to Sockets'); this._socket = socket; this.state = 'start'; } Client.prototype = require('events').EventEmitter; Client.pro...
'use strict'; const EventEmitter = require('events'); /* lib/client.js * The Client object. * * */ module.exports = Client; function Client(socket){ if (typeof socket !== 'object') throw new Error('Clients can only bind to Sockets'); this._socket = socket; this.state = 'start'; } Client.prototype = ne...
Fix events on Client objects
Fix events on Client objects
JavaScript
mit
jamen/rela
892a68d4185882a21ad92084ba45c114a2462440
lib/config.js
lib/config.js
module.exports = { WS_URL : 'http://www.workshape.io/' };
module.exports = { WS_URL : process.env.WS_URL || 'http://www.workshape.io/' };
Read WS_URL from environment variables
Read WS_URL from environment variables
JavaScript
mit
Workshape/ws-radial-plot-prerender-server
e8627295b3a31e7559d9ee3d0200d9ac2d975e05
priv/ui/app/js/feature_model.js
priv/ui/app/js/feature_model.js
var FeatureModel = function(attrs){ this.id = (attrs && attrs.id) || null; this.title = (attrs && attrs.title) || null; this.description = (attrs && attrs.description) || null; this.master_switch_state = (attrs && attrs.master_switch_state) || null; this.definition ...
var FeatureModel = function(attrs){ this.id = (attrs && attrs.id) || null; this.title = (attrs && attrs.title) || null; this.description = (attrs && attrs.description) || null; this.master_state = (attrs && attrs.master_state) || null; this.dynamic_state = (attrs && attrs.dynamic_state) ...
Update the feature model with master_state and dynamic_state props
Update the feature model with master_state and dynamic_state props
JavaScript
mit
envato/iodized,envato/iodized
d48b2c7b53e67f271118dfb33f44ed44137b52e1
models/user.js
models/user.js
const bcrypt = require('bcrypt') module.exports = function (sequelize, DataTypes) { const User = sequelize.define('User', { id: { primaryKey: true, type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4 }, name: { unique: true, type: DataTypes.STRING, allowNull: false, ...
const bcrypt = require('bcrypt') module.exports = function (sequelize, DataTypes) { const User = sequelize.define('User', { id: { primaryKey: true, type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4 }, name: { type: DataTypes.STRING, allowNull: false, validate: { ...
Remove name unique constraint, move to email
Remove name unique constraint, move to email
JavaScript
apache-2.0
cesarandreu/bshed,cesarandreu/bshed
cc662f1bfdd92dff3c36c492bc4fee64ca2668f6
src/hooks/create-user.js
src/hooks/create-user.js
// Use this hook to manipulate incoming or outgoing data. // For more information on hooks see: http://docs.feathersjs.com/api/hooks.html module.exports = function (options = {}) { // eslint-disable-line no-unused-vars return function (hook) { const { facebook, facebookId } = hook.data; return this.find({ ...
// Use this hook to manipulate incoming or outgoing data. // For more information on hooks see: http://docs.feathersjs.com/api/hooks.html module.exports = function (options = {}) { // eslint-disable-line no-unused-vars return function (hook) { const { facebook, facebookId } = hook.data; return this.find({ ...
Fix the params object in the find
Fix the params object in the find
JavaScript
mit
sscaff1/ccs-feathers,sscaff1/ccs-feathers
22a15baa9bac645b1ffb58fa87233143627cf671
ng-template.js
ng-template.js
/*global System:false, exports:false */ var serverRelativeRegexp = /^\w+:\/\/[^\/]*/; function santiseSource( source ) { return source.replace( /(['\\])/g, '\\$1' ) .replace( /[\f]/g, '\\f' ) .replace( /[\b]/g, '\\b' ) .replace( /[\n]/g, '\\n' ) .replace( /[\t]/g, '\\t' ) .replace( /[\r]/g, '\\r...
/*global System:false, exports:false */ function santiseSource( source ) { return source.replace( /(['\\])/g, '\\$1' ) .replace( /[\f]/g, '\\f' ) .replace( /[\b]/g, '\\b' ) .replace( /[\n]/g, '\\n' ) .replace( /[\t]/g, '\\t' ) .replace( /[\r]/g, '\\r' ) .replace( /[\u2028]/g, '\\u2028' ) ...
Fix issues with resolving server relative URLs when bundling with JSPM
Fix issues with resolving server relative URLs when bundling with JSPM
JavaScript
mit
jamespamplin/plugin-ng-template
9235fec23dd1089ee8c4a78d49f68f1b532fed94
etc/bg.js
etc/bg.js
console.log("Courses+ background page!"); cpal.request.addBeforeSendHeaders(["*://courses2015.dalton.org/*"], function(details) { if (details.url.indexOf("user/icon/dalton/") > -1) { details.requestHeaders.push({name: 'X-CoursesPlus-RefererSpoof-Yay', value: "https://courses2015.dalton.org/user/profile.php"}); } f...
console.log("Courses+ background page!"); cpal.request.addBeforeSendHeaders(["*://courses2015.dalton.org/*"], function(details) { if (details.url.indexOf("user/icon/dalton/") > -1) { details.requestHeaders.push({name: 'X-CoursesPlus-RefererSpoof-Yay', value: "https://courses2015.dalton.org/user/profile.php"}); } i...
Fix coursesnew with no avatar
Fix coursesnew with no avatar
JavaScript
mit
CoursesPlus/CoursesPlus,CoursesPlus/CoursesPlus
25883839e7b996d47784c32912c0a9f20abe3cca
development/server/server.spec.js
development/server/server.spec.js
var assert = require('assert'); var request = require('supertest'); var exec = require('child_process').exec; var application = require(__dirname + '/server.js'); describe('server', function () { before(function () { application.listen(); }); after(function () { application.close(); }...
var assert = require('assert'); var request = require('supertest'); var exec = require('child_process').exec; var application = require(__dirname + '/server.js'); describe('server', function () { before(function () { application.listen(); }); after(function () { application.close(); }...
Change abao test to use the local installation instead of the global.
Change abao test to use the local installation instead of the global.
JavaScript
mit
kanbanana/knowledgebase,kanbanana/knowledgebase,kanbanana/knowledgebase
b250e5508d49ec212ce1fafa3c5fbdbefb31cf3b
src/containers/Pubs/Pubs.js
src/containers/Pubs/Pubs.js
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import * as pubsActions from 'redux/modules/pubs'; @connect( state => ({ availablePubs: state.pubs.availablePubs, selectedPub: state.pubs.selectedPub }), pubsActions ) export default class Pubs extends Component {...
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import * as pubsActions from 'redux/modules/pubs'; @connect( state => ({ availablePubs: state.pubs.availablePubs, selectedPub: state.pubs.selectedPub }), pubsActions ) export default class Pubs extends Component {...
Add initial available pubs load function if the route is accessed without transition
Add initial available pubs load function if the route is accessed without transition
JavaScript
mit
fuczak/pipsy
3ced3e98bc7dd9f692728da5244b2dead8203da6
examples/image-gallery/templates/image-page.js
examples/image-gallery/templates/image-page.js
import React from 'react' import { rhythm } from 'utils/typography' const ImagePage = (props) => { console.log(props) const {regular, retina} = props.data.image return ( <div> <p>{props.data.image.FileName}</p> <img src={regular.src} srcSet={`${retina.src} 2x`} style={{ ...
import React from 'react' import { rhythm } from 'utils/typography' class ImagePage extends React.Component { constructor () { super() this.state = { loaded: false, } } render () { console.log(this.props) const {regular, retina, micro} = this.props.data.image return ( <div> ...
Add progressive image loading example
Add progressive image loading example
JavaScript
mit
0x80/gatsby,Khaledgarbaya/gatsby,danielfarrell/gatsby,fk/gatsby,0x80/gatsby,danielfarrell/gatsby,gatsbyjs/gatsby,mingaldrichgan/gatsby,chiedo/gatsby,0x80/gatsby,fk/gatsby,gatsbyjs/gatsby,okcoker/gatsby,mingaldrichgan/gatsby,fk/gatsby,ChristopherBiscardi/gatsby,mickeyreiss/gatsby,chiedo/gatsby,gatsbyjs/gatsby,danielfarr...
274c3c63cc0f8376c8d20cf8844768933ad0c11f
client/src/containers/Dashboard.js
client/src/containers/Dashboard.js
import React, { Component } from 'react'; import {observer} from 'mobx-react'; import Services from '../components/Services'; import Tasks from '../components/Tasks'; import FlatButton from 'material-ui/FlatButton'; import { Link } from 'react-router'; const styles = { button: { margin: 0.6 + 'rem' } }; const...
import React, { Component } from 'react'; import {observer} from 'mobx-react'; import Services from '../components/Services'; import Tasks from '../components/Tasks'; import FlatButton from 'material-ui/FlatButton'; import { Link } from 'react-router'; const styles = { button: { margin: 0.6 + 'rem' } }; const...
Disable non-functional create service button
Disable non-functional create service button
JavaScript
mit
jsalonen/swarmist,jsalonen/swarmist
71e3042184626c37d9cff421743589b3e21a3e29
test/util/mock-client.js
test/util/mock-client.js
import request from 'request'; function call(endpoint, method, qs, json) { let options = { uri: `http://localhost/api/${endpoint}`, method }; if (typeof qs !== 'undefined') { options.qs = qs; } if (typeof json !== 'undefined') { options.json = json; } return ...
import request from 'request'; const PROTOCOL = 'http'; const HOST = 'localhost'; const PORT = 8080; function call(endpoint, method, qs, json) { let options = { uri: `${PROTOCOL}://${HOST}:${PORT}/api/${endpoint}`, method }; if (typeof qs !== 'undefined') { options.qs = qs; } ...
Use port 8080 for testing
Use port 8080 for testing
JavaScript
unlicense
TheFourFifths/consus,TheFourFifths/consus
743c72c930d1e5b83492e778d45c3950c2ba397d
src/_reducers/AccountReducer.js
src/_reducers/AccountReducer.js
import { fromJS } from 'immutable'; import { SERVER_DATA_AUTHORIZE, SERVER_DATA_BALANCE, SERVER_DATA_PAYOUT_CURRENCIES, SERVER_DATA_BUY, UPDATE_TOKEN, } from '../_constants/ActionTypes'; const initialState = fromJS({ loginid: '', fullname: '', currency: 'USD', balance: 0, token:...
import { fromJS } from 'immutable'; import { SERVER_DATA_AUTHORIZE, SERVER_DATA_BALANCE, SERVER_DATA_PAYOUT_CURRENCIES, SERVER_DATA_BUY, UPDATE_TOKEN, } from '../_constants/ActionTypes'; const initialState = fromJS({ loginid: '', fullname: '', currency: 'USD', balance: 0, token:...
Set default currency to USD if none
Set default currency to USD if none
JavaScript
mit
nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,binary-com/binary-next-gen,qingweibinary/binary-next-gen,qingweibinary/binary-next-gen,nazaninreihani/binary-n...
8b6b07a2e46763b1f42f8f99cfe07ce30517e10d
lib/router.js
lib/router.js
var subscriptions = new SubsManager(); Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound' }); Router.route('/', { name: 'home', waitOn: function() { return subscriptions.subscribe('allMangasCover'); } }); Router.route('/ownedMangas', ...
var subscriptions = new SubsManager(); Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound' }); Router.route('/', { name: 'home', waitOn: function() { return subscriptions.subscribe('allMangasCover'); }, fastRender: true }); Router....
Add fastRender for the home
Add fastRender for the home
JavaScript
mit
dexterneo/mangas,dexterneo/mangas,dexterneo/mangatek,dexterneo/mangatek
b761dcde4504dd02fc8fd54cc499da91efa7a56e
src/app/directives/bodyClass.js
src/app/directives/bodyClass.js
define([ 'angular', 'app', 'lodash' ], function (angular, app, _) { 'use strict'; angular .module('grafana.directives') .directive('bodyClass', function() { return { link: function($scope, elem) { var lastPulldownVal; var lastHideControlsVal; $scope.$watc...
define([ 'angular', 'app', 'lodash' ], function (angular, app, _) { 'use strict'; angular .module('grafana.directives') .directive('bodyClass', function() { return { link: function($scope, elem) { var lastPulldownVal; var lastHideControlsVal; $scope.$watc...
Switch from watch to watchCollection for bodyclass directive
Switch from watch to watchCollection for bodyclass directive
JavaScript
agpl-3.0
grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana