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 |
|---|---|---|---|---|---|---|---|---|---|
1ee6d04bf95b1525aed47e964934b271a05f686a | gulpfile.js | gulpfile.js | const del = require('del')
const { dest, series, src } = require('gulp')
const {
init: sourceMapsInit,
write: sourceMapsWrite,
} = require('gulp-sourcemaps')
const { createProject } = require('gulp-typescript')
const tsProject = createProject('tsconfig.json', {
declaration: true,
isolatedModules: false,
jsx:... | const del = require('del')
const { dest, series, src } = require('gulp')
const {
init: sourceMapsInit,
write: sourceMapsWrite,
} = require('gulp-sourcemaps')
const { createProject } = require('gulp-typescript')
const tsProject = createProject('tsconfig.json', {
declaration: true,
isolatedModules: false,
noEm... | Revert to old compilation format except compile JSX | Revert to old compilation format except compile JSX
| JavaScript | mit | IsaacLean/bolt-ui,IsaacLean/bolt-ui |
d3367ffe1f426b18b88aa0abe11aefbb7131278d | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var elixir = require('laravel-elixir');
var argv = require('yargs').argv;
var bin = require('./tasks/bin');
elixir.config.assetsPath = 'source/_assets';
elixir.config.publicPath = 'source';
elixir.config.sourcemaps = false;
elixir(function(mix) {
var env = argv.e || argv.env || 'local'... | process.env.DISABLE_NOTIFIER = true;
var gulp = require('gulp');
var elixir = require('laravel-elixir');
var argv = require('yargs').argv;
var bin = require('./tasks/bin');
elixir.config.assetsPath = 'source/_assets';
elixir.config.publicPath = 'source';
elixir.config.sourcemaps = false;
elixir(function(mix) {
v... | Disable Elixir and BrowserSync notifications | Disable Elixir and BrowserSync notifications
| JavaScript | agpl-3.0 | art-institute-of-chicago/gauguin-microsite,art-institute-of-chicago/gauguin-microsite,art-institute-of-chicago/gauguin-microsite |
9a9e537e01b410efbe5aae0429c60a1363f431e3 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var fse = require('fs-extra');
gulp.task('clean', function(done) {
fse.removeSync('dist');
fse.mkdirSync('dist');
done();
});
gulp.task('default', ['clean'], function() {
return gulp
.src('static/*')
.pipe(gulp.dest('dist'));
});
| var gulp = require('gulp');
var fse = require('fs-extra');
gulp.task('clean', function(done) {
fse.removeSync('dist');
fse.mkdirSync('dist');
done();
});
gulp.task('default', ['clean'], function() {
return gulp
.src(['static/*', 'node_modules/localforage/dist/localforage.min.js'])
.pipe(gulp.dest('dis... | Copy the localForage library in dist/ | Copy the localForage library in dist/
| JavaScript | apache-2.0 | zalun/mercurius,zalun/mercurius,marco-c/mercurius,marco-c/mercurius,marco-c/mercurius |
fe3c32c0361a1b6779b8ee9830df88f13e5653ab | app/components/Tap.js | app/components/Tap.js | import React, { Component, PropTypes } from 'react'
import { playAudio } from '../utils/audioplayer'
export default class Tap extends Component {
static PropTypes = {
receivedTaps: PropTypes.object,
users: PropTypes.object,
}
shouldComponentUpdate(nextProps, nextState) {
console.log(this.props.rece... | import React, { Component, PropTypes } from 'react'
import { playAudio } from '../utils/audioplayer'
export default class Tap extends Component {
static PropTypes = {
receivedTaps: PropTypes.object,
users: PropTypes.object,
}
shouldComponentUpdate(nextProps, nextState) {
console.log(this.props.rece... | Set system notification sound to silent | Set system notification sound to silent
| JavaScript | apache-2.0 | hbierlee/digital-shoulder-tap,hbierlee/digital-shoulder-tap |
ce690f942c693ef3e8083b224153f624d58b7913 | lib/system_config.js | lib/system_config.js | "format cjs";
var loader = require('@loader');
var isNode = typeof process === "object" &&
{}.toString.call(process) === "[object process]";
if(isNode) {
exports.systemConfig = {
meta: {
'jquery': {
"format": "global",
"exports": "jQuery",
"deps": ["can/util/vdom/vdom"]
}
}
};
} else {
expo... | "format cjs";
var loader = require('@loader');
var isNode = typeof process === "object" &&
{}.toString.call(process) === "[object process]";
if(isNode) {
exports.systemConfig = {
map: {
"can/util/vdom/vdom": "can/util/vdom/vdom"
},
meta: {
'jquery': {
"format": "global",
"exports": "jQuery",
... | Make sure can/util/vdom can load | Make sure can/util/vdom can load
The new version of Can now maps can/util/vdom/vdom to @empty by default,
so if you are using an env other than server-development or
server-production can-ssr can't load. To fix this we need to map
can/util/vdom/vdom onto itself so that it definitely does load on
the server no matt... | JavaScript | mit | donejs/done-ssr,donejs/done-ssr |
ace61513a0b03b9409ccdceef288f3676a6476ac | lib/tokensManager.js | lib/tokensManager.js |
const fs = require("fs");
const objectEquals = require("./objectEquals");
const { DEFAULT_TOKENS_FILENAME } = require("../lib/constants");
const tokensManager = function tokensManager (filename = DEFAULT_TOKENS_FILENAME) {
const tokens = (function init () {
try {
return JSON.parse(fs.readFileSync(filena... |
const fs = require("fs");
const objectEquals = require("./objectEquals");
const { DEFAULT_TOKENS_FILENAME } = require("../lib/constants");
const tokensManager = function tokensManager (filename = DEFAULT_TOKENS_FILENAME) {
const tokens = (function init () {
try {
return JSON.parse(fs.readFileSync(filena... | Add EOL to tokens JSON file | Add EOL to tokens JSON file
| JavaScript | mit | luispablo/tokenauth |
df36577dd72440c7e581d304cf86d6edd036bed3 | src/utils/detection.js | src/utils/detection.js | /**
* Detect platform-specific things.
*/
goog.provide('onfire.utils.detection');
/**
* @type {boolean}
*/
onfire.utils.detection.IS_NODEJS = (typeof module !== 'undefined' && !!module.exports);
| /**
* Detect platform-specific things.
*/
goog.provide('onfire.utils.detection');
/**
* @type {boolean}
*/
onfire.utils.detection.IS_NODEJS =
(typeof module !== 'undefined' && module !== this.module && !!module.exports);
| Add additional test for Node environment | Add additional test for Node environment
module !== this.module in Node, but this can be true in a browser
| JavaScript | mit | isabo/onfire |
b38008623b2d0cd3a9912481dcafe4fe37b22d3b | src/submit-button.js | src/submit-button.js | 'use strict';
module.exports = function ($interpolate, $parse) {
return {
require: '^bdSubmit',
restrict: 'A',
compile: function (element, attributes) {
if (!attributes.type) {
attributes.$set('type', 'submit');
}
return function (scope, element, attributes, controller) {
... | 'use strict';
module.exports = function ($interpolate, $parse) {
return {
require: '^bdSubmit',
restrict: 'A',
compile: function (element, attributes) {
if (!attributes.type) {
attributes.$set('type', 'submit');
}
return function (scope, element, attributes, controller) {
... | Use a watch function instead of adding submission to scope | Use a watch function instead of adding submission to scope
| JavaScript | mit | bendrucker/angular-form-state |
d2adb620304c51e85903f97d9015ac2e6ce340fb | app/controllers/application.js | app/controllers/application.js | import Ember from 'ember';
export default Ember.Controller.extend({
session: Ember.inject.service(),
actions: {
invalidateSession () {
this.get('session').invalidate();
},
login () {
const lockOptions = {
autoclose: true,
icon: 'https://s3-us-west-1.amazonaws.com/barberscore... | import Ember from 'ember';
export default Ember.Controller.extend({
session: Ember.inject.service(),
actions: {
invalidateSession () {
this.get('session').invalidate();
},
login () {
const lockOptions = {
autoclose: true,
icon: 'https://s3-us-west-1.amazonaws.com/barberscore... | Update notice for email sent | Update notice for email sent
| JavaScript | bsd-2-clause | barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web |
b2eff2b6ba5ea37838a2111f0dc109c56a6b6d09 | app/javascript/components/cloud-tenant-form/create-form.schema.js | app/javascript/components/cloud-tenant-form/create-form.schema.js | /**
* @param {Boolean} renderEmsChoices
* @param {Object} emsChoices
*/
function createSchema(renderEmsChoices, emsChoices) {
let fields = [{
component: 'text-field',
name: 'name',
validate: [{
type: 'required-validator',
}],
label: __('Tenant Name'),
maxLength: 128,
validateOnMou... | import { componentTypes, validatorTypes } from '@@ddf';
/**
* @param {Boolean} renderEmsChoices
* @param {Object} emsChoices
*/
function createSchema(renderEmsChoices, emsChoices) {
let fields = [{
component: componentTypes.TEXT_FIELD,
name: 'name',
validate: [{
type: validatorTypes.REQUIRED,
... | Use constants for component/validator types in cloud tenant form | Use constants for component/validator types in cloud tenant form
| JavaScript | apache-2.0 | ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic |
cbcc919782649d8bcfd7e86e86a20a82fc4dd109 | src/utils/animate.js | src/utils/animate.js | function easing(time) {
return 1 - (--time) * time * time * time;
};
/**
* Given a start/end point of a scroll and time elapsed, calculate the scroll position we should be at
* @param {Number} start - the initial value
* @param {Number} stop - the final desired value
* @param {Number} elapsed - the amount of tim... | function easing(time) {
return 1 - (--time) * time * time * time;
};
/**
* Given a start/end point of a scroll and time elapsed, calculate the scroll position we should be at
* @param {Number} start - the initial value
* @param {Number} stop - the final desired value
* @param {Number} elapsed - the amount of tim... | Use performance.now instead of Date.now | Use performance.now instead of Date.now | JavaScript | mit | clauderic/react-infinite-calendar |
df075c083b7541c32666fc71549465d97ca20c21 | jobs/projects/create.js | jobs/projects/create.js | const models = require('../../models');
let Project = models.projects;
module.exports = function(connection, done) {
connection.createChannel(function(err, ch) {
console.log(err);
var ex = 'chiepherd.main';
ch.assertExchange(ex, 'topic');
ch.assertQueue('chiepherd.project.create', { exclusive: false ... | const models = require('../../models');
let Project = models.projects;
module.exports = function(connection, done) {
connection.createChannel(function(err, ch) {
console.log(err);
var ex = 'chiepherd.main';
ch.assertExchange(ex, 'topic');
ch.assertQueue('chiepherd.project.create', { exclusive: false ... | Send message to other API | Send message to other API
| JavaScript | mit | CHIEPHERD/chiepherd_api,CHIEPHERD/chiepherd_api,CHIEPHERD/chiepherd_api |
1aca5fcc9668cc9eeec2750acf4ebd1e850a1d1c | packages/react-jsx-highmaps/src/index.js | packages/react-jsx-highmaps/src/index.js | import { withSeriesType } from 'react-jsx-highcharts';
export {
Chart,
Credits,
Debug,
Loading,
Legend,
Series,
Subtitle,
Title,
Tooltip,
HighchartsContext,
HighchartsChartContext,
HighchartsAxisContext,
HighchartsSeriesContext,
provideHighcharts,
provideChart,
provideAxis,
provideSeri... | import { withSeriesType } from 'react-jsx-highcharts';
export {
Chart,
Credits,
Debug,
Loading,
Legend,
Series,
Subtitle,
Title,
Tooltip,
HighchartsContext,
HighchartsChartContext,
HighchartsAxisContext,
HighchartsSeriesContext,
withHighcharts as withHighmaps,
withSeriesType
} from 'react-... | Remove missing exports from react-jsx-highmaps | Remove missing exports from react-jsx-highmaps
| JavaScript | mit | whawker/react-jsx-highcharts,whawker/react-jsx-highcharts |
0ccd1659f8e5b4999191cf1a8a1cd1960517c46c | client/app/js/core/view-switcher.js | client/app/js/core/view-switcher.js | import Model from '../base/model';
export default class ViewSwitcher {
constructor(app, element) {
this.app = app;
this.element = element;
this.currentView = null;
}
switchView(ViewClass, args) {
if (this.currentView instanceof ViewClass) {
this.currentView.model.replace(args);
ret... | import Model from '../base/model';
export default class ViewSwitcher {
constructor(app, element) {
this.app = app;
this.element = element;
this.currentView = null;
}
switchView(ViewClass, args) {
if (this.currentView instanceof ViewClass) {
this.currentView.model.replace(args);
ret... | Append view's element after rendering | Append view's element after rendering
This makes no difference, but seem more logical
| JavaScript | mit | despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics |
11a15c61e4e9ad0f4c5efe4c56bc308e37006198 | lib/configure_loader.js | lib/configure_loader.js | var pkg = require("../package.json");
global.navigator = global.navigator || {
userAgent: "Mozilla/5.0 " + "done-ssr/" + pkg.version
};
module.exports = function(loader){
// Ensure the extension loads before the main.
var loaderImport = loader.import;
loader.import = function(name){
if(name === loader.main) {
... | var pkg = require("../package.json");
global.navigator = global.navigator || {
userAgent: "Mozilla/5.0 " + "done-ssr/" + pkg.version
};
module.exports = function(loader){
// Ensure the extension loads before the main.
var loaderImport = loader.import;
loader.import = function(name){
if(name === loader.main) {
... | Set renderingBaseURL on the loader | Set renderingBaseURL on the loader
| JavaScript | mit | donejs/done-ssr,donejs/done-ssr |
e9ff9befd71167f2fe17045e8c370c70ca97b61e | js/store.js | js/store.js | import { createStore, applyMiddleware } from "redux";
import thunk from "redux-thunk";
import { composeWithDevTools } from "redux-devtools-extension";
import reducer from "./reducers";
import mediaMiddleware from "./mediaMiddleware";
import { merge } from "./utils";
import { UPDATE_TIME_ELAPSED, STEP_MARQUEE } from "./... | import { createStore, applyMiddleware } from "redux";
import thunk from "redux-thunk";
import { composeWithDevTools } from "redux-devtools-extension";
import reducer from "./reducers";
import mediaMiddleware from "./mediaMiddleware";
import { merge } from "./utils";
import { UPDATE_TIME_ELAPSED, STEP_MARQUEE } from "./... | Fix webamp.onTrackDidChange, by actually passing the action to the event emitter | Fix webamp.onTrackDidChange, by actually passing the action to the event emitter
| JavaScript | mit | captbaritone/winamp2-js,captbaritone/winamp2-js,captbaritone/winamp2-js |
35a42f3873ae041e59952888ce4282a3163debe5 | app/main/autoupdater.js | app/main/autoupdater.js | 'use strict';
const {app, dialog} = require('electron');
const {autoUpdater} = require('electron-updater');
function appUpdater() {
// Log whats happening
const log = require('electron-log');
log.transports.file.level = 'info';
autoUpdater.logger = log;
autoUpdater.allowPrerelease = false;
// Ask the user if up... | 'use strict';
const {app, dialog} = require('electron');
const {autoUpdater} = require('electron-updater');
const ConfigUtil = require('./../renderer/js/utils/config-util.js');
function appUpdater() {
// Log whats happening
const log = require('electron-log');
log.transports.file.level = 'info';
autoUpdater.logge... | Allow auto update for prerelease based on betaupdates setting | Allow auto update for prerelease based on betaupdates setting
| JavaScript | apache-2.0 | zulip/zulip-electron,zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-electron,zulip/zulip-desktop,zulip/zulip-electron |
3b81a97838b7c176ad0ae1c3c0e4323780446a39 | components/loadingBar/LoadingBar.js | components/loadingBar/LoadingBar.js | import React, { PureComponent } from 'react';
class LoadingBar extends PureComponent {
render() {
return null;
}
}
export default LoadingBar;
| import React, { PureComponent } from 'react';
class LoadingBar extends PureComponent {
render() {
return (
<svg version="1.1" xmlns="http://www.w3.org/2000/svg">
<rect />
</svg>
);
}
}
export default LoadingBar;
| Create SVG containing a rectangle as SVG is performance wise the best option for animation | Create SVG containing a rectangle
as SVG is performance wise the best option for animation
| JavaScript | mit | teamleadercrm/teamleader-ui |
f6b974940964241d0980b15efb3f030452c70c82 | ext/open_ZIP.js | ext/open_ZIP.js | define(function() {
'use strict';
function open(item) {
console.log(item);
}
return open;
});
| define(['msdos/util'], function(dosUtil) {
'use strict';
function open() {
this.addExplorer(function(expedition) {
var pos = 0;
function onLocalFileHeader(bytes) {
var localFile = new LocalFileHeaderView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
if (!localFile.hasValidSi... | Add some fields to local file header | Add some fields to local file header | JavaScript | mit | radishengine/drowsy,radishengine/drowsy |
710f79a9aba647161fca92d79af554d412fa25e8 | snippets/action-search/search-action.js | snippets/action-search/search-action.js | var page = tabris.create("Page", {
title: "Actions",
topLevel: true
});
var proposals = ["baseball", "batman", "battleship", "bangkok", "bangladesh", "banana"];
var textView = tabris.create("TextView", {
layoutData: {centerX: 0, centerY: 0}
}).appendTo(page);
var action = tabris.create("SearchAction", {
titl... | var page = tabris.create("Page", {
title: "Actions",
topLevel: true
});
var proposals = ["baseball", "batman", "battleship", "bangkok", "bangladesh", "banana"];
var searchBox = tabris.create("Composite", {
layoutData: {centerX: 0, centerY: 0}
}).appendTo(page);
var textView = tabris.create("TextView").appendTo... | Fix search action snippet layout | Fix search action snippet layout
"Selected '...'" text was behind the button as both were centered
horizontally and vertically on the screen. Wrap them in a centered
container instead.
Change-Id: I71ee80f5b7ba00cdb3cbf279c8fd1a413746ef28
| JavaScript | bsd-3-clause | eclipsesource/tabris-js,eclipsesource/tabris-js,eclipsesource/tabris-js |
72b64f7e83fdfb1a20311b86e271359529dc4abf | sencha-workspace/SlateAdmin/app/view/progress/interims/Manager.js | sencha-workspace/SlateAdmin/app/view/progress/interims/Manager.js | Ext.define('SlateAdmin.view.progress.interims.Manager', {
extend: 'Ext.Container',
xtype: 'progress-interims-manager',
requires: [
'SlateAdmin.view.progress.interims.SectionsGrid',
'SlateAdmin.view.progress.interims.StudentsGrid',
'SlateAdmin.view.progress.interims.EditorForm'
],... | Ext.define('SlateAdmin.view.progress.interims.Manager', {
extend: 'Ext.Container',
xtype: 'progress-interims-manager',
requires: [
'SlateAdmin.view.progress.interims.SectionsGrid',
'SlateAdmin.view.progress.interims.StudentsGrid',
'SlateAdmin.view.progress.interims.EditorForm',
... | Add section notes form to interims manager | Add section notes form to interims manager
| JavaScript | mit | SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate |
df3a6e16525e2764ea018a48bc178ff75c0bb467 | test/spec/element/value.spec.js | test/spec/element/value.spec.js | describe("value", function() {
"use strict";
var div, input;
beforeEach(function() {
div = DOM.create("div>a+a");
input = DOM.create("input[value=foo]");
});
it("should replace child element(s) from node with provided element", function() {
expect(div[0].childNodes.length).toBe(2);
expect(d... | describe("value", function() {
"use strict";
var div, input;
beforeEach(function() {
div = DOM.create("div>a+a");
input = DOM.create("input[value=foo]");
});
it("should replace child element(s) from node with provided element", function() {
expect(div[0].childNodes.length).toBe(2);
expect(d... | Add failing test case regarding input.value($Element) | Add failing test case regarding input.value($Element)
| JavaScript | mit | suenot/better-dom,suenot/better-dom,chemerisuk/better-dom,chemerisuk/better-dom |
5206759e482853b788126022ef4682958dccec30 | lib/fs/copy.js | lib/fs/copy.js | // Copy file
// Credit: Isaac Schlueter
// http://groups.google.com/group/nodejs/msg/ef4de0b516f7d5b8
'use strict';
var util = require('util')
, fs = require('fs');
module.exports = function (source, dest, cb) {
fs.lstat(source, function (err, stats) {
var read;
if (err) {
cb(err);
return;
}
try {... | // Copy file
// Credit: Isaac Schlueter
// http://groups.google.com/group/nodejs/msg/ef4de0b516f7d5b8
'use strict';
var util = require('util')
, fs = require('fs')
, stat = fs.stat, createReadStream = fs.createReadStream
, createWriteStream = fs.createWriteStream
module.exports = function (source, dest, cb)... | Use pipe instead util.pump for file streaming | Use pipe instead util.pump for file streaming
| JavaScript | mit | medikoo/node-ext |
449e510f861f56ed673613d8102f6b1a3e680ced | lib/default-encoding.js | lib/default-encoding.js | var defaultEncoding
/* istanbul ignore next */
if (process.browser) {
defaultEncoding = 'utf-8'
} else if (process.version) {
var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)
defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'
} else {
defaultEncoding = 'utf-8'
}
module.exports = ... | var defaultEncoding
/* istanbul ignore next */
if (global.process && global.process.browser) {
defaultEncoding = 'utf-8'
} else if (global.process && global.process.version) {
var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)
defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'
} else... | Check for process before accessing | Check for process before accessing | JavaScript | mit | crypto-browserify/pbkdf2,crypto-browserify/pbkdf2 |
283cce3b70e3a71279bbc805c973fd5d6e8b0aa2 | test/support/config.js | test/support/config.js | var _ = require('underscore');
module.exports = function(opts) {
var config = {
redis_pool: {
max: 10,
idleTimeoutMillis: 1,
reapIntervalMillis: 1,
port: 6336
}
}
_.extend(config, opts || {});
return config;
}();
| var _ = require('underscore');
module.exports = function(opts) {
var config = {
redis_pool: {
max: 10,
idleTimeoutMillis: 1,
reapIntervalMillis: 1,
port: 6337
}
}
_.extend(config, opts || {});
return config;
}();
| Use port 6337 for the test redis server | Use port 6337 for the test redis server
| JavaScript | bsd-3-clause | CartoDB/node-redis-mpool |
40f242103e201c0c8c2cb94d3b0b74d259ec52ef | examples/jsx-seconds-elapsed/src/main.js | examples/jsx-seconds-elapsed/src/main.js | /** @jsx hJSX */
import {run, Rx} from '@cycle/core';
import {makeDOMDriver, hJSX} from '@cycle/dom';
function main(drivers) {
let secondsElapsed$ = Rx.Observable.interval(1000)
.map(i => i + 1)
.startWith(0);
let vtree$ = secondsElapsed$.map(secondsElapsed =>
<div>{`Seconds elapsed ${secondsElapsed}`}... | /** @jsx hJSX */
import {run, Rx} from '@cycle/core';
import {makeDOMDriver, hJSX} from '@cycle/dom';
function main(drivers) {
let secondsElapsed$ = Rx.Observable.interval(1000)
.map(i => i + 1)
.startWith(0);
let vtree$ = secondsElapsed$.map(secondsElapsed =>
<div>Seconds elapsed {secondsElapsed}</div... | Improve code style in jsx-seconds-elapsed example | Improve code style in jsx-seconds-elapsed example
| JavaScript | mit | cyclejs/cyclejs,usm4n/cyclejs,maskinoshita/cyclejs,ntilwalli/cyclejs,feliciousx-open-source/cyclejs,usm4n/cyclejs,ntilwalli/cyclejs,staltz/cycle,ntilwalli/cyclejs,maskinoshita/cyclejs,usm4n/cyclejs,cyclejs/cyclejs,feliciousx-open-source/cyclejs,maskinoshita/cyclejs,cyclejs/cycle-core,maskinoshita/cyclejs,cyclejs/cyclej... |
40403c636b6ca29e01dff10b0e761389c8f07468 | app/scripts/app.js | app/scripts/app.js | /*global angular */
/*jslint browser: true */
(function () {
'use strict';
var app;
app = angular.module('thin.gsApp', ['ngRoute', 'ngSanitize', 'alerts', 'auth'])
.config(['$routeProvider', '$locationProvider',
function ($routeProvider, $locationProvider) {
$routeProvi... | /*global angular */
/*jslint browser: true */
(function () {
'use strict';
var app;
app = angular.module('thin.gsApp', ['ngRoute', 'ngSanitize', 'alerts', 'auth'])
.config(['$routeProvider', '$locationProvider',
function ($routeProvider, $locationProvider) {
$routeProvi... | Rename the Facebook service to userService | Rename the Facebook service to userService
Signed-off-by: Henrique Vicente <d390f26e2f50ad5716a9c69c58de1f5df9730e3b@gmail.com>
| JavaScript | mit | henvic/thin.gs |
c270660572ec7a79c110b65622c4d14aad0c117b | meteor/server/server.js | meteor/server/server.js | //TODO setup deploySettings.json
Meteor.startup(function () {
var githubServiceSetup = Accounts.loginServiceConfiguration.find({service: "github"}).count() === 1;
if (githubServiceSetup) {
//setup authentication Provider
Accounts.loginServiceConfiguration.remove({
service: "github"
... | Meteor.startup(function () {
var githubServiceSetup = Accounts.loginServiceConfiguration.find({service: "github"}).count() === 1;
if (!githubServiceSetup) {
//setup authentication Provider
Accounts.loginServiceConfiguration.remove({
service: "github"
});
Accounts.log... | Fix mistake where not adding github info when needed | Fix mistake where not adding github info when needed
| JavaScript | agpl-3.0 | codebounty/codebounty |
c3d2b30dc74391b221665849f2a32fb4c6f0ad30 | proxy/server.js | proxy/server.js | var proxy = require('redbird')({port: 8080});
proxy.register('localhost/event/api/user', "http://localhost:3001/user"); | var proxy = require('redbird')({port: 8080});
proxy.register('localhost/event', 'http://localhost:3000');
proxy.register('localhost/event/api/user', 'http://localhost:3001/user');
proxy.register('localhost/event/api/session', 'http://localhost:3002/session');
proxy.register('localhost/event/api/file', ... | Add API and frontend routes | Add API and frontend routes
| JavaScript | mit | haimich/event,haimich/event,haimich/event |
cbacc31ddebbd2b7c8d3a809d55739ccfca962a6 | tools/tool-env/install-babel.js | tools/tool-env/install-babel.js | // This file exists because it is the file in the tool that is not automatically
// transpiled by Babel
"use strict";
function babelRegister() {
const meteorBabel = require("meteor-babel");
const path = require("path");
const toolsPath = path.dirname(__dirname);
const meteorPath = path.dirname(toolsPath);
c... | // This file exists because it is the file in the tool that is not automatically
// transpiled by Babel
"use strict";
function babelRegister() {
const meteorBabel = require("meteor-babel");
const path = require("path");
const toolsPath = path.dirname(__dirname);
const meteorPath = path.dirname(toolsPath);
c... | Fix inline source maps in meteor/tools code. | Fix inline source maps in meteor/tools code.
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor |
754071878da574b3912710d7ea2a681bcc2a74bb | src/components/MenuScreen/MenuScreen.js | src/components/MenuScreen/MenuScreen.js | import React from "react";
import Container from "./Container.js";
import Button from "./../Shared/Button.js";
import setCurrentScreenAction from "../../actions/ScreenActions.js";
import { GAME_SCREEN } from "../../actions/ScreenActions.js";
const screenTitle = "Tic Tac Toe React";
const MenuScreen = React.createCl... | import React from "react";
import Container from "./Container.js";
import Button from "./../Shared/Button.js";
import setCurrentScreenAction from "../../actions/ScreenActions.js";
import { GAME_SCREEN } from "../../actions/ScreenActions.js";
import {setGameModeAction} from "../../actions/GameActions.js";
import {VS_... | Add actions to start vs computer | Add actions to start vs computer
Change onClick action handlers for buttons
| JavaScript | mit | Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React |
4446bd48ebd8ced9f5001b202b8d0fa2b8b36a74 | server/src/connectors/carriots.module.js | server/src/connectors/carriots.module.js | "use strict";
let https = require('https');
let keys = require("./secretKeys.js");
exports.init = function (mainCallback) {
let options = {
host: "api.carriots.com",
path: "/streams/?max=1&order=-1",
port: 443,
method: "GET",
headers: {
"Accept": "application/json",
"carriots.apiKey": keys.CARRIOT... | "use strict";
let https = require('https');
let keys = require("./secretKeys.js");
exports.init = function (mainCallback) {
let options = {
host: "api.carriots.com",
path: "/streams/?max=1&order=-1",
port: 443,
method: "GET",
headers: {
"Accept": "application/json",
"carriots.apiKey": keys.CARRIOT... | Set interval to 5 seconds instead of 10 | Set interval to 5 seconds instead of 10
| JavaScript | mit | Zenika/bottleopener_iot,Zenika/bottleopener_iot,Zenika/bottleopener_iot,Zenika/bottleopener_iot |
5e1316ee48816cab9c2d8eec9c31b5054d0d801a | app/core/services/ledger-nano.js | app/core/services/ledger-nano.js | /* global angular, require */
import 'ionic-sdk/release/js/ionic.bundle';
import platformInfo from './platform-info.js';
angular.module('app.service.ledger-nano', [])
.factory('LedgerNano', function ($q) {
'use strict';
let StellarLedger;
if (platformInfo.isElectron) {
const electron = require('electron');
St... | /* global require */
import platformInfo from './platform-info.js';
let StellarLedger;
if (platformInfo.isElectron) {
const electron = require('electron');
StellarLedger = electron.remote.require('stellar-ledger-api');
}
const bip32Path = (index) => `44'/148'/${index}'`;
const wrapper = (func, field) => new Promi... | Use native Promise instead of $q | Use native Promise instead of $q
| JavaScript | agpl-3.0 | johansten/stargazer,johansten/stargazer,johansten/stargazer |
ee805b8617ecbc03cef0c421124bb799890b9ef8 | app/utils/service-colors.js | app/utils/service-colors.js | export default {
'CORE - METRORAIL': 'red',
'CORE - METRORAPID': '#f24d6e',
'CORE - LIMITED': '#649dce',
'CORE - RADIAL': '#5190c8',
'CORE - FEEDER': '#3d84c2',
'CORE - EXPRESS/FLYERS': '#3777ae',
'CORE - CROSSTOWN': '#77a9d4',
'SPECIAL - REVERSE COMMUTE': '#6c9452',
'SPECIAL - RAIL CONNECTORS': '#4b8... | export default {
'CORE - METRORAIL': 'red',
'CORE - METRORAPID': '#f24d6e',
'CORE - LIMITED': '#1D86A4',
'CORE - RADIAL': '#053862',
'CORE - FEEDER': '#72C6DE',
'CORE - EXPRESS/FLYERS': '#42A7C3',
'CORE - CROSSTOWN': '#105FA0',
'SPECIAL - REVERSE COMMUTE': '#6c9452',
'SPECIAL - RAIL CONNECTORS': '#4b8... | Increase contrast and color variation. | Increase contrast and color variation.
| JavaScript | mit | jga/capmetrics-web,jga/capmetrics-web |
fd1fcc6f35f2e36290fe1143edcea2334e079267 | app/assets/javascripts/_analytics.js | app/assets/javascripts/_analytics.js | (function() {
"use strict";
GOVUK.Tracker.load();
var cookieDomain = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain;
var property = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? 'UA-49258698-1' : 'UA-49258698-3';
GOVUK.a... | (function() {
"use strict";
GOVUK.Analytics.load();
var cookieDomain = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain;
var property = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? 'UA-49258698-1' : 'UA-49258698-3';
// w... | Patch GOVUK.Analytics to add 'allowLinker' option | Patch GOVUK.Analytics to add 'allowLinker' option
The GOVUK.Analytics interface doesn't set the
'allowLinker' option when creating a ga tracker.
In order to preserve a vendor-agnostic
interface it also doesn't allow this to be sent
through when creating a new GOVUK.Analytics
instance.
This commit patches
GOVUK.Googl... | JavaScript | mit | alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-di... |
813cb6ded01ba962935588bad4793febfcb74154 | app/scripts/services/facebook_api.js | app/scripts/services/facebook_api.js | 'use strict';
angular.module('angularjsRundownApp')
.factory('facebookApi', ['$q', 'facebookAppId', function($q, facebookAppId) {
// Public API here
return {
favoriteMovie: function(movie) {
var defer = $q.defer();
FB.api(
'me/kinetoscope:favorite',
'post',
... | 'use strict';
angular.module('angularjsRundownApp')
.factory('facebookApi', ['$q', 'facebookAppId', function($q, facebookAppId) {
// Public API here
return {
favoriteMovie: function(movie) {
var defer = $q.defer();
FB.api(
'me/kinetoscope:favorite',
'post',
... | Change the URL of Facebook Like | Change the URL of Facebook Like
| JavaScript | mit | wlepinski/kinetoscope,wlepinski/kinetoscope |
f3ef2a4bd4f53306b973c5fc8d7da4c6507aa8af | ghostjs-examples/test/navigation_test.js | ghostjs-examples/test/navigation_test.js | import ghost from 'ghostjs'
import assert from 'assert'
import localServer from './fixtures/server.js'
describe('Navigation', () => {
localServer()
it('navigates', async () => {
await ghost.open('http://localhost:8888/basic_content.html')
assert.equal(await ghost.pageTitle(), 'Basic Content')
await... | import ghost from 'ghostjs'
import assert from 'assert'
import localServer from './fixtures/server.js'
describe('Navigation', () => {
localServer()
it('navigates after ghost.open() call', async () => {
await ghost.open('http://localhost:8888/basic_content.html')
assert.equal(await ghost.pageTitle(), 'Ba... | Add navigation test after clicking. | Add navigation test after clicking.
| JavaScript | mit | KevinGrandon/ghostjs,KevinGrandon/ghostjs |
4b9ab7d113fd714efe1821e69ae403cfecb96816 | src/options_ui/options-display-table.js | src/options_ui/options-display-table.js | import m from 'mithril';
export const OptionsDisplayTableHeader = () => ({
view() {
return m('thead', [
m('tr', [
m('th', 'Name'),
m('th', 'Pattern'),
m('th', 'Selector'),
m('th', 'Enabled'),
]),
]);
},
});
export class OptionsDisplayTableBody {
constructor(vn... | import m from 'mithril';
export const OptionsDisplayTableHeader = () => ({
view() {
return m('thead', [
m('tr', [
m('th', 'Name'),
m('th', 'Pattern'),
m('th', 'Selector'),
m('th', 'Enabled'),
]),
]);
},
});
export class OptionsDisplayTableBody {
view(vnode) {
... | Implement enabling/disabling an option in OptionsDisplayTableRow | Implement enabling/disabling an option in OptionsDisplayTableRow
| JavaScript | mit | solkaz/source-copy,solkaz/source-copy |
44a011e00c2884e192d6e0f72ca05aa215d4a3a2 | js/Home/containers/MyProfileContainer.js | js/Home/containers/MyProfileContainer.js | import gql from 'graphql-tag';
import { graphql } from 'react-apollo';
import Profile from '../components/Profile';
const ownProfileQuery = gql`
{
viewer {
me {
id
username
firstName
lastName
email
profilePhoto
appCount
isLegacy
apps(... | import gql from 'graphql-tag';
import { graphql } from 'react-apollo';
import Profile from '../components/Profile';
const ownProfileQuery = gql`
{
viewer {
me {
id
username
firstName
lastName
email
profilePhoto
appCount
isLegacy
apps(... | Fix data being blown away on profile screen when fetching projects | Fix data being blown away on profile screen when fetching projects
fbshipit-source-id: 1aeab38
| JavaScript | bsd-3-clause | exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/expon... |
c19901ca8b5cc613eb66183d26f50b617275d326 | aura-components/src/main/components/auradocs/search/searchController.js | aura-components/src/main/components/auradocs/search/searchController.js | /*
* Copyright (C) 2012 salesforce.com, inc.
*
* 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 ... | /*
* Copyright (C) 2012 salesforce.com, inc.
*
* 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 ... | Fix for possible deref of cleaned up source component | Fix for possible deref of cleaned up source component
@rev dwidjaja@ | JavaScript | apache-2.0 | lcnbala/aura,madmax983/aura,forcedotcom/aura,lhong375/aura,TribeMedia/aura,forcedotcom/aura,lcnbala/aura,lhong375/aura,TribeMedia/aura,forcedotcom/aura,DebalinaDey/AuraDevelopDeb,badlogicmanpreet/aura,navyliu/aura,navyliu/aura,igor-sfdc/aura,madmax983/aura,lcnbala/aura,madmax983/aura,badlogicmanpreet/aura,DebalinaDey/A... |
f45deeef6b6162a086dc40269dfca3e1e8157e50 | server/APIv1/likes/likesController.js | server/APIv1/likes/likesController.js | import { postgresConnection as cn } from '../../config/helpers.js';
const pgp = require('pg-promise')();
const db = pgp(cn);
| import { postgresConnection as cn } from '../../config/helpers.js';
const pgp = require('pg-promise')();
const db = pgp(cn);
module.exports = {
getAllLikedRecipes: (request, response, next) => {
const newQueryObj = {
name: 'get-my-favorite-recipes',
text: `SELECT
*
FROM
... | Add getAllLikedRecipes method, to get all liked recipes for a single user | Add getAllLikedRecipes method, to get all liked recipes for a single user
| JavaScript | mit | rompingstalactite/rompingstalactite,rompingstalactite/rompingstalactite,forkful/forkful,forkful/forkful,forkful/forkful,rompingstalactite/rompingstalactite |
c40a768c17d54f4ebb71d6e9aafb0bff086bffde | C-FAR/db.js | C-FAR/db.js | var Sequelize = require('sequelize');
var sequelize = new Sequelize('c-far', 'root', '123456@', {
host: '192.168.99.100',
dialect: 'mysql',
pool: {
max: 5,
min: 0,
idle: 10000
},
});
module.exports = sequelize; | var Sequelize = require('sequelize');
var sequelize = new Sequelize('c-far', 'root', '123456@', {
host: '192.168.99.100',
dialect: 'mysql',
port: 3306,
pool: {
max: 5,
min: 0,
idle: 10000
},
});
module.exports = sequelize; | Add database port in the config file. | Add database port in the config file.
| JavaScript | mit | tom19960222/C-FAR-Website,tom19960222/C-FAR-Website,tom19960222/C-FAR-Website,tom19960222/C-FAR-Website |
d8ec3bb5d5863f2b8b37223f39af42355135fedf | config.test.js | config.test.js | 'use strict';
var fs = require('fs');
var crypto = require('crypto');
module.exports = {
root: '',
db: {
host: 'localhost',
db: 'gandhi'
},
pool: {
max: 1,
min: 1,
timeout: 30000
},
redis: {
host: process.env.REDIS_PORT_6379_TCP_ADDR || '127.0.0.1',
port: process.env.REDIS_PORT_6379_TCP_PORT || 63... | 'use strict';
var fs = require('fs');
var crypto = require('crypto');
module.exports = {
root: '',
db: {
host: process.env.RETHINKDB_PORT_29015_TCP_ADDR,
port: process.env.RETHINKDB_PORT_28015_TCP_PORT,
db: 'gandhi'
},
pool: {
max: 1,
min: 1,
timeout: 30000
},
redis: {
host: process.env.REDIS_PORT... | Use docker connect env vars | Use docker connect env vars
| JavaScript | agpl-3.0 | mike-marcacci/gandhi,mike-marcacci/gandhi,mike-marcacci/gandhi |
c42aaec157d14e9f0173575d4fbac272c0917b5f | Brocfile.js | Brocfile.js | /* jshint node: true */
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
var app = new EmberAddon();
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object ... | /* jshint node: true */
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
var app = new EmberAddon();
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object ... | Use `app.bowerDirectory` instead of hardcoded `bower_components` | Use `app.bowerDirectory` instead of hardcoded `bower_components`
| JavaScript | mit | aravindranath/ember-cli-datepicker,topaxi/ember-bootstrap-datepicker,maladon/ember-cli-bootstrap-datepicker,Hanastaroth/ember-cli-bootstrap-datepicker,jesenko/ember-cli-bootstrap-datepicker,aravindranath/ember-cli-datepicker,lazybensch/ember-cli-bootstrap-datepicker,lazybensch/ember-cli-bootstrap-datepicker,jelhan/embe... |
003becf56e1cfc3b9737ee5c43824ebd12ffc252 | sampleConfig.js | sampleConfig.js | var global = {
domain: 'http://subdomain.yourdomain.com/',
secretUrlSuffix: 'putSomeAlphanumericSecretCharsHere'
};
var projects = [
{
repo: {
owner: 'yourbitbucketusername',
slug: 'your-bitbucket-repo-name',
sshPrivKeyPath: '/home/youruser/.ssh/id_rsa'
},
dest: {
host: 'yours... | var global = {
domain: 'http://subdomain.yourdomain.com/',
secretUrlSuffix: 'putSomeAlphanumericSecretCharsHere'
};
var projects = [
{
repo: {
owner: 'yourbitbucketusername',
slug: 'your-bitbucket-repo-name',
sshPrivKeyPath: '/home/youruser/.ssh/id_rsa'
},
dest: {
host: 'yours... | Add global to export config | Add global to export config
| JavaScript | mit | mplewis/statichook |
f7df94c004677304e33e3deae35f1478b004292b | public/js/login.js | public/js/login.js | /* eslint-env jquery */
start();
function start () {
'use strict';
$(document).ready(() => {
$('form').submit(event => {
event.preventDefault();
const username = $('#username').val();
const password = $('#password').val();
const loginObj = {
username,
password
};
... | /* eslint-env jquery */
start();
function start () {
'use strict';
$(document).ready(() => {
$('form').submit(event => {
event.preventDefault();
const username = $('#username').val();
const password = $('#password').val();
const loginObj = {
username,
password
};
... | Remove console.log that we use for debugging | Remove console.log that we use for debugging
| JavaScript | apache-2.0 | ailijic/era-floor-time,ailijic/era-floor-time |
e7f535483c0aea83523bca5d12584fad95980567 | src/networking/auth.js | src/networking/auth.js | import * as ACTION_TYPES from '../constants/action_types'
function extractToken(hash, oldToken) {
const match = hash.match(/access_token=([^&]+)/)
let token = !!match && match[1]
if (!token) {
token = oldToken
}
return token
}
export function checkAuth(dispatch, oldToken, location) {
const token = ext... | import * as ACTION_TYPES from '../constants/action_types'
function extractToken(hash, oldToken) {
const match = hash.match(/access_token=([^&]+)/)
let token = !!match && match[1]
if (!token) {
token = oldToken
}
return token
}
export function checkAuth(dispatch, oldToken, location) {
const token = ext... | Revert "Only ask for public privileges" | Revert "Only ask for public privileges"
This reverts commit 47b95cb58a00364fd3146c10e12ba4b93ed45f60.
| JavaScript | mit | ello/webapp,ello/webapp,ello/webapp |
f7adbbb625830a472f278d696123981b1d96317d | source/background/library/browserEvents.js | source/background/library/browserEvents.js | import log from "../../shared/library/log.js";
import { dispatch } from "../redux/index.js";
import { setAuthToken } from "../../shared/actions/dropbox.js";
const BUTTERCUP_DOMAIN_REXP = /^https:\/\/buttercup.pw\//;
const DROPBOX_ACCESS_TOKEN_REXP = /access_token=([^&]+)/;
export function attachBrowserStateListeners(... | import log from "../../shared/library/log.js";
import { dispatch } from "../redux/index.js";
import { setAuthToken } from "../../shared/actions/dropbox.js";
import { setUserActivity } from "../../shared/actions/app.js";
const BUTTERCUP_DOMAIN_REXP = /^https:\/\/buttercup.pw\//;
const DROPBOX_ACCESS_TOKEN_REXP = /acces... | Set user's activity tracking on tab events | Set user's activity tracking on tab events
Update user's activity tracking on any tab opening or closing.
| JavaScript | mit | buttercup-pw/buttercup-browser-extension,buttercup-pw/buttercup-browser-extension,perry-mitchell/buttercup-chrome,perry-mitchell/buttercup-chrome |
a4a733f8d852eb9928686e933895a46696d567c0 | server/index.js | server/index.js | // Importing Node modules and initializing Express
const express = require('express'),
app = express(),
bodyParser = require('body-parser'),
logger = require('morgan'),
mongoose = require('mongoose'),
router = require('./router');
config = require('./config/main');
// Database connection
mongoo... | // Importing Node modules and initializing Express
const express = require('express'),
app = express(),
bodyParser = require('body-parser'),
logger = require('morgan'),
mongoose = require('mongoose'),
router = require('./router');
config = require('./config/main');
// Database connection
mongoo... | Fix CORS behavior to not freeze | Fix CORS behavior to not freeze
| JavaScript | mit | davdkm/battlerite-base |
b61ada99d9031e418a57b1676605f7ea0818735f | lib/server/appTokenUtil.js | lib/server/appTokenUtil.js | const AppTokenUtil = {
getAppTokensBasedOnQuery: getAppTokensBasedOnQuery
};
function getAppTokensBasedOnQuery(query, desktopAppId) {
let userDisabledMap = new Map();
let userIdsSet = new Set();
let appTokens = Push.appTokens.find(query).fetch();
if (!appTokens.length) {
return [];
}
appTokens.for... | const AppTokenUtil = {
getAppTokensBasedOnQuery: getAppTokensBasedOnQuery
};
function getAppTokensBasedOnQuery(query, desktopAppId) {
let userDisabledMap = new Map();
let userIdsSet = new Set();
let appTokens = Push.appTokens.find(query).fetch();
if (!appTokens.length) {
return [];
}
if (desktopAp... | Remove vet check for desktop notifications in AppTokenUtil. | Remove vet check for desktop notifications in AppTokenUtil.
| JavaScript | mit | okgrow/push,staceesanti/push |
fb4536068ef6050a2903e7ba8fb6c02ccff01439 | src/apps/companies/apps/advisers/router.js | src/apps/companies/apps/advisers/router.js | const router = require('express').Router()
const { allPermissionsOr403 } = require('../../../../middleware/conditionals')
const { submit, renderAdvisers, form } = require('./controllers/advisers')
router.get('/', renderAdvisers)
router.route(['/assign', 'remove'])
.all(allPermissionsOr403('company.change_regional_... | const router = require('express').Router()
const { allPermissionsOr403 } = require('../../../../middleware/conditionals')
const { submit, renderAdvisers, form } = require('./controllers/advisers')
router.get('/', renderAdvisers)
router.route(['/assign', '/remove'])
.all(allPermissionsOr403('company.change_regional... | Replace missing '/' for path | Replace missing '/' for path
| JavaScript | mit | uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend |
05fdcac6fa83207956f67bc3fa7b0ad8270543d0 | routes/domain-lookup.js | routes/domain-lookup.js | const router = require('express').Router();
router.get('/*', (req, res, next) => {
const seFree = require('se-free'),
domainName = parseDomainFromUrlPath(req.originalUrl),
domainLookup = seFree(domainName);
domainLookup.then(
(domainLookupResult) => {
res.render('domain-lookup', {
... | const router = require('express').Router();
router.get('/*', (req, res, next) => {
const seFree = require('se-free'),
domainName = parseDomainFromUrlPath(req.originalUrl);
if(!endsWithSe(domainName)) {
res.redirect(301, '/' + domainName + '.se');
};
seFree(domainName)
.then((domainLookupResul... | Add .se using redirect if neccessary | Add .se using redirect if neccessary
| JavaScript | mit | kpalmvik/isfree.se,kpalmvik/isfree.se |
3c9a7fa6231d10c8b7d3dff621f8a26b9f6015e4 | js/data_structures.js | js/data_structures.js | var colors = ["red", "blue", "magenta", "yellow"]
var names = ["Dan", "Dave", "Eleanor", "Rupert"]
colors.push("green")
names.push("Nathaniel") | Create initial color & horse arrays | Create initial color & horse arrays
| JavaScript | mit | elliedori/phase-0-tracks,elliedori/phase-0-tracks,elliedori/phase-0-tracks | |
558bb084d6d09f4a212f022640142ee812e61352 | app/utils/setPrompts.js | app/utils/setPrompts.js | 'use strict';
var _ = require('lodash');
module.exports = function (answers) {
this.prompts = {};
this.prompts.projectName = answers.projectName;
this.prompts.authorName = answers.useBranding ? 'XHTMLized' : answers.authorName;
this.prompts.useBranding = answers.useBranding;
... | 'use strict';
var _ = require('lodash');
module.exports = function (answers) {
this.prompts = {};
this.prompts.projectName = answers.projectName;
this.prompts.authorName = answers.useBranding ? 'XHTMLized' : answers.authorName;
this.prompts.useBranding = answers.useBranding;
... | Fix issue with wrong features format in .yo-rc file | Fix issue with wrong features format in .yo-rc file
| JavaScript | mit | xfiveco/generator-xh,xhtmlized/generator-xh,xfiveco/generator-xh,xhtmlized/generator-xh |
d1aae6ce7c12dda1fc2189411403e7a409aa81c1 | lib/controllers/acceptanceTestExecutions.js | lib/controllers/acceptanceTestExecutions.js | var mongoose = require('mongoose');
var _ = require('lodash');
var AcceptanceTestExecution = mongoose.model('AcceptanceTestExecution');
exports.list = function(req, res, next) {
AcceptanceTestExecution
.find()
.where('acceptanceTest').equals(req.acceptanceTest._id)
.select('-acceptanceTest... | var mongoose = require('mongoose');
var _ = require('lodash');
var AcceptanceTestExecution = mongoose.model('AcceptanceTestExecution');
exports.list = function(req, res, next) {
AcceptanceTestExecution
.find()
.where('acceptanceTest').equals(req.acceptanceTest._id)
.select('-acceptanceTest... | Fix ancien appel de fonction | Fix ancien appel de fonction
| JavaScript | agpl-3.0 | sgmap/mes-aides-api |
ba78bb8f7a90558a2fe67f91e3305d63dbfdc70f | config/globals.js | config/globals.js | module.exports.globals = {
proxy: process.env.PROXY_URL || 'http://localhost:4200',
proxyEnabled: process.env.PROXY_ENABLED === undefined ? false : process.env.PROXY_ENABLED === 'true',
redisHost: process.env.REDIS_HOST || 'localhost',
awsAccessKeyId: process.env.AWS_ACCESS_KEY_ID,
awsSecretAccessKey: proce... | module.exports.globals = {
version: process.env.npm_package_version,
proxy: process.env.PROXY_URL || 'http://localhost:4200',
proxyEnabled: process.env.PROXY_ENABLED === undefined ? false : process.env.PROXY_ENABLED === 'true',
redisHost: process.env.REDIS_HOST || 'localhost',
awsAccessKeyId: process.env.AW... | Add NPM version as a global variable | Add NPM version as a global variable
| JavaScript | mit | TheConnMan/missd,TheConnMan/missd,TheConnMan/missd |
9afe827941349417a8ef416ca2e0255020d28706 | src/DEFAULTS.js | src/DEFAULTS.js | import reactDOMRunner from './reactDOMRunner';
export const endpoint = 'https://happo.now.sh';
export const include = '**/@(*-snaps|snaps).@(js|jsx)';
export const stylesheets = [];
export const targets = {};
export const configFile = './.happo.js';
export const hooks = {
run: reactDOMRunner,
finish: (result) => {... | import reactDOMRunner from './reactDOMRunner';
export const endpoint = 'https://happo.io';
export const include = '**/@(*-happo|happo).@(js|jsx)';
export const stylesheets = [];
export const targets = {};
export const configFile = './.happo.js';
export const hooks = {
run: reactDOMRunner,
finish: (result) => {
... | Change endpoint + include pattern | Change endpoint + include pattern
happo.io is now working.
I've decided to use `-happo.js*` as the file naming format instead of
-snaps.
| JavaScript | mit | enduire/happo.io,enduire/happo.io |
b7a96d30f240e46b1307105eaaca2b24c13eac18 | test/specrunner.js | test/specrunner.js | require.config({
baseUrl: '../src',
paths: {
// Vendor libraries
async: '../bower_components/requirejs-plugins/async',
sinon: '../bower_components/sinon/index',
jasmine: '../bower_components/jasmine/lib/jasmine-core/jasmine',
'jasmine-html': '../bower_components/jasmine/lib/jasmine-core/jasmine... | require.config({
baseUrl: '../src',
paths: {
// Vendor libraries
async: '../bower_components/requirejs-plugins/src/async',
sinon: '../bower_components/sinon/index',
jasmine: '../bower_components/jasmine/lib/jasmine-core/jasmine',
'jasmine-html': '../bower_components/jasmine/lib/jasmine-core/jas... | Fix async vendor lib AMD path | Fix async vendor lib AMD path
| JavaScript | bsd-3-clause | aerisweather/googlemaps-amd,aerisweather/googlemaps-amd |
ffc09edea51e1dce93f7a1910262156584602f6b | koans/AboutExpects.js | koans/AboutExpects.js | describe("About Expects", function() {
//We shall contemplate truth by testing reality, via spec expectations.
it("should expect true", function() {
expect(true).toBeTruthy(); //This should be true
});
//To understand reality, we must compare our expectations against reality.
it("should expect equalit... | describe("About Expects", function() {
//We shall contemplate truth by testing reality, via spec expectations.
it("should expect true", function() {
expect(true).toBeTruthy(); //This should be true
});
//To understand reality, we must compare our expectations against reality.
it("should expect equalit... | Change value in "should assert equality with ===" block | Change value in "should assert equality with ===" block
| JavaScript | mit | aevange/2013-08-javascript-koans,aevange/2013-08-javascript-koans |
45399b5b85d25675430462aa4239d0bd4d1e6009 | atmo/static/js/forms.js | atmo/static/js/forms.js | $(function() {
// apply datetimepicker initialization
$('.datetimepicker').datetimepicker({
sideBySide: true, // show the time picker and date picker at the same time
useCurrent: false, // don't automatically set the date when opening the dialog
widgetPositioning: {vertical: 'bottom'}, // make sure the ... | $(function() {
// apply datetimepicker initialization
$('.datetimepicker').datetimepicker({
sideBySide: true, // show the time picker and date picker at the same time
useCurrent: false, // don't automatically set the date when opening the dialog
format: 'YYYY-MM-DD HH:mm',
stepping: 5,
minDate: ... | Use 24h based datepicket and prevent dates in the past | Use 24h based datepicket and prevent dates in the past
| JavaScript | mpl-2.0 | mozilla/telemetry-analysis-service,mozilla/telemetry-analysis-service,mozilla/telemetry-analysis-service,mozilla/telemetry-analysis-service |
93b377d3c66d96ab82b7722e5bcc409e53f1b66d | client/app/services/notes-service.js | client/app/services/notes-service.js | angular.module('notely')
.service('NotesService', NotesService);
// NotesService
// Handle CRUD operations against the server.
NotesService.$inject = ['$http'];
function NotesService($http) {
var self = this;
self.notes = [];
// Get all notes from server
self.fetch = function() {
return $http.get('http:... | angular.module('notely')
.service('NotesService', NotesService);
// NotesService
// Handle CRUD operations against the server.
NotesService.$inject = ['$http'];
function NotesService($http) {
var self = this;
self.notes = [];
// Get all notes from server
self.fetch = function() {
return $http.get('http:... | Load a copy of a note into the form, rather than the actual object from the array. | Load a copy of a note into the form, rather than the actual object from the array.
| JavaScript | mit | FretlessJS201511/notely,FretlessJS201511/notely |
0b76375e1ebc40067e9fe1afacf5cf499d903c8a | extensions/roc-plugin-dredd/src/actions/dredd.js | extensions/roc-plugin-dredd/src/actions/dredd.js | import { initLog } from 'roc';
import Dredd from 'dredd';
const log = initLog();
export default ({ context: { config: { settings } } }) => () => {
const port = process.env.PORT || settings.runtime.port;
const dredd = new Dredd({
server: `http://localhost:${port}`,
options: settings.test.dredd... | import { initLog } from 'roc';
import Dredd from 'dredd';
const { name, version } = require('../../package.json');
const log = initLog(name, version);
export default ({ context: { config: { settings } } }) => () => {
const port = process.env.PORT || settings.runtime.port;
const dredd = new Dredd({
s... | Initialize log using `name` and `version` | Initialize log using `name` and `version`
| JavaScript | mit | voldern/roc-plugin-dredd |
70a8010b001d9a7960915468c63c38449fcf4d67 | src/main/webapp/app/controllers/lessons/modals/lessonModal.controller.js | src/main/webapp/app/controllers/lessons/modals/lessonModal.controller.js | angular
.module('app')
.controller('LessonModalController', LessonModalController);
function LessonModalController(self, $mdDialog, lesson, AuthService) {
if (lesson && lesson.startTime) {
lesson.startTime = new Date(lesson.startTime);
}
self.lesson = lesson;
self.cancel = cancel;
... | angular
.module('app')
.controller('LessonModalController', LessonModalController);
function LessonModalController(self, $mdDialog, lesson, AuthService) {
if (lesson && lesson.startTime) {
lesson.startTime = new Date(lesson.startTime);
}
self.lesson = lesson;
self.cancel = cancel;
... | Fix hometask disabled for admin | Fix hometask disabled for admin
| JavaScript | mit | TriumGroup/ReCourse,TriumGroup/ReCourse,TriumGroup/ReCourse |
e5dae645d220a22a70babc7ac2216b79ebb2a136 | components/stateless/screens/Home.js | components/stateless/screens/Home.js | import React from 'react';
import { StyleSheet, Text, View, TextInput, Button } from 'react-native';
import { SearchBar } from 'react-native-elements'
export let SEARCH_QUERY = ''
const Home = ({ navigation: { navigate }}) => {
console.log('Home rendered!!')
return (
<View style={{flex: 1}}>
<View styl... | import React from 'react';
import { StyleSheet, Text, View, TextInput, Button, StatusBar } from 'react-native';
import { SearchBar } from 'react-native-elements'
export let SEARCH_QUERY = ''
const Home = ({ navigation: { navigate }}) => {
console.log('Home rendered!!')
return (
<View style={{flex: 1}}>
<St... | Hide the flippin' status bar on android | Hide the flippin' status bar on android
| JavaScript | mit | bnovf/react-native-github-graphql-app |
afa164de11eec71948252f1eb469a7ed9c981dac | bin/projects-resolve.js | bin/projects-resolve.js | #!/usr/bin/env node
exports.command = {
description: 'resolve a path to a project',
arguments: '<path>'
};
if (require.main !== module) {
return;
}
var path = require('path');
var storage = require('../lib/storage.js');
var utilities = require('../lib/utilities.js');
var program = utilities.programDefaults('r... | #!/usr/bin/env node
exports.command = {
description: 'resolve a path to a project',
arguments: '<path>'
};
if (require.main !== module) {
return;
}
var path = require('path');
var storage = require('../lib/storage.js');
var utilities = require('../lib/utilities.js');
var program = utilities.programDefaults('r... | Return a proper relative path | Return a proper relative path
| JavaScript | mit | beaugunderson/projects,beaugunderson/projects |
20ba9b777292c4f74c28e942801ea928af6b7a9b | test/src/board/movable_point/lance_test.js | test/src/board/movable_point/lance_test.js | import Board from '../../../../frontend/src/shogi/board';
import Piece from '../../../../frontend/src/shogi/piece';
import memo from 'memo-is';
import _ from 'lodash';
describe('black', () => {
context('match the piece of coordinate', () => {
context('exists movable coordinates', () => {
});
context('do... | import Board from '../../../../frontend/src/shogi/board';
import Piece from '../../../../frontend/src/shogi/piece';
import memo from 'memo-is';
import _ from 'lodash';
describe('black', () => {
context('match the piece of coordinate', () => {
context('exists movable coordinates', () => {
var board = memo()... | Add example but this is failed. | Add example but this is failed.
| JavaScript | mit | mgi166/usi-front,mgi166/usi-front |
4dd28119cb553ffa71cc2ab8a67e37295f6732b8 | src/index.js | src/index.js | module.exports = ({types: t}) => {
return {
pre(file) {
const opts = this.opts;
if (
!(
opts &&
typeof opts === 'object' &&
Object.keys(opts).every(key => (
opts[key] &&
(
typeof opts[key] === 'string' ||
(
... | module.exports = ({types: t}) => {
return {
pre(file) {
const opts = this.opts;
if (
!(
opts &&
typeof opts === 'object' &&
Object.keys(opts).every(key => (
opts[key] &&
(
typeof opts[key] === 'string' ||
(
... | Check type of options more carefully | Check type of options more carefully
| JavaScript | mit | mopedjs/babel-plugin-import-globals |
4b479f671156db716f986144b9950865792ac0f4 | src/index.js | src/index.js | const express = require('express');
const bodyParser = require('body-parser');
const morgan = require('morgan');
const logger = require('./logger');
const streamClient = require('./streamClient');
const sendEmail = require('./sendEmail');
const app = express();
if (process.env.NODE_ENV !== 'test') {
app.use(morgan(... | const express = require('express');
const bodyParser = require('body-parser');
const morgan = require('morgan');
const logger = require('./logger');
const streamClient = require('./streamClient');
const sendEmail = require('./sendEmail');
const app = express();
if (process.env.NODE_ENV !== 'test') {
app.use(morgan(... | Make the port overridable from the environment | Make the port overridable from the environment
| JavaScript | agpl-3.0 | rabblerouser/mailer,rabblerouser/mailer |
509b334c79b75adb2cd2d7bfa193b89e14a7dfd6 | src/index.js | src/index.js | import { Game } from 'cervus/modules/core';
import { Plane, Box } from 'cervus/modules/shapes';
import { basic } from 'cervus/modules/materials';
const game = new Game({
width: window.innerWidth,
height: window.innerHeight,
clear_color: "#eeeeee",
far: 1000
});
document.querySelector("#ui").addEventListener(... | import { Game } from 'cervus/core';
import { Plane, Box } from 'cervus/shapes';
import { basic } from 'cervus/materials';
const game = new Game({
width: window.innerWidth,
height: window.innerHeight,
clear_color: "#eeeeee",
far: 1000
});
document.querySelector("#ui").addEventListener(
'click', () => game.ca... | Update to new Cervus API | Update to new Cervus API
| JavaScript | isc | piesku/moment-lost,piesku/moment-lost |
4b81900bbe4bbf113fbfb967ff37938ac96f071f | src/index.js | src/index.js |
import {Video} from 'kaleidoscopejs';
import {ContainerPlugin} from 'clappr';
export default class Video360 extends ContainerPlugin {
constructor(container) {
super(container);
this.listenTo(this.container, 'container:fullscreen', this.updateSize);
let {height, width, autoplay} = container.options;
... |
import {Video} from 'kaleidoscopejs';
import {ContainerPlugin, Mediator, Events} from 'clappr';
export default class Video360 extends ContainerPlugin {
constructor(container) {
super(container);
Mediator.on(`${this.options.playerId}:${Events.PLAYER_RESIZE}`, this.updateSize, this);
let {height, width, a... | Fix plugin scaling when player size is set in percents or player is resized at runtime | Fix plugin scaling when player size is set in percents or player is resized at runtime
| JavaScript | mit | thiagopnts/video-360,thiagopnts/video-360 |
cd1b69dfb75def40203f6783dbae7e4ebbe6f36a | src/index.js | src/index.js | // @flow
import 'source-map-support/register';
import 'babel-polyfill';
import 'colors';
// import async from 'async';
// import _ from 'lodash';
import console from 'better-console';
import './fib-gen';
import './table';
import './random-throw';
| // @flow
import 'source-map-support/register';
import 'babel-polyfill';
import 'colors';
// import async from 'async';
// import _ from 'lodash';
// import console from 'better-console';
| Comment unwanted but relevant modules | Comment unwanted but relevant modules
| JavaScript | mit | abhisekp/Practice-Modern-JavaScript |
c026131558cdfd02d62d6d60bf494e93fd2d5285 | test/fixtures/with-config/nuxt.config.js | test/fixtures/with-config/nuxt.config.js | module.exports = {
router: {
base: '/test/'
},
cache: true,
plugins: ['~plugins/test.js'],
loading: '~components/loading',
env: {
bool: true,
num: 23,
string: 'Nuxt.js'
}
}
| module.exports = {
router: {
base: '/test/'
},
cache: true,
plugins: ['~plugins/test.js'],
loading: '~components/loading',
env: {
bool: true,
num: 23,
string: 'Nuxt.js'
},
extend (config, options) {
config.devtool = 'eval-source-map'
}
}
| Add test for extend option | Add test for extend option
| JavaScript | mit | jfroffice/nuxt.js,cj/nuxt.js,jfroffice/nuxt.js,cj/nuxt.js,mgesmundo/nuxt.js,mgesmundo/nuxt.js |
4895034d5368d6ec65d02c00ef3a0b7fe46c25e6 | src/index.js | src/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import SearchBar from './components/search_bar'
const API_KEY = 'AIzaSyBKBu77HCUT6I3oZiFXlaIdou8S_3voo5E';
const App = () => {
return (
<div>
<SearchBar />
</div>
);
}
ReactDOM.render(<App />, document.querySelector('.container'));
| import React from 'react';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search'
import SearchBar from './components/search_bar'
const API_KEY = 'AIzaSyBKBu77HCUT6I3oZiFXlaIdou8S_3voo5E';
YTSearch({key: API_KEY, term: 'surfboards'}, function(data) {
console.log(data);
});
const App = () => {... | Add simple youtube api call | Add simple youtube api call
| JavaScript | mit | izabelka/redux-simple-starter,izabelka/redux-simple-starter |
d72ad53ce31a49754fd62978741c1fe7ac819751 | src/index.js | src/index.js | import React from 'react'
import ReactDOM from 'react-dom'
import { createGlobalStyle } from 'styled-components'
import { App } from './App'
import woff2 from './fonts/source-sans-pro-v11-latin-regular.woff2'
import woff from './fonts/source-sans-pro-v11-latin-regular.woff'
import registerServiceWorker from './registe... | import React from 'react'
import ReactDOM from 'react-dom'
import { createGlobalStyle } from 'styled-components'
import { App } from './App'
import woff2 from './fonts/source-sans-pro-v11-latin-regular.woff2'
import woff from './fonts/source-sans-pro-v11-latin-regular.woff'
import registerServiceWorker from './registe... | Disable pull-to-refresh and overscroll glow | Disable pull-to-refresh and overscroll glow
| JavaScript | mit | joelgeorgev/react-checkbox-tree,joelgeorgev/react-checkbox-tree |
465fe8a992b6a277f0371fe175309b68688c77fe | creep.Harvester.behaviour.Harvest.js | creep.Harvester.behaviour.Harvest.js | module.exports = function (creep) {
// Aquire target
if(creep.memory.currentTarget.ticksToRegeneration === undefined || !creep.memory.currentTarget.energy || !creep.memory.movement.path.length) {
creep.memory.currentTarget = creep.pos.findClosest(FIND_SOURCES_ACTIVE, {
algorithm: "astar"
});
}
// E... | module.exports = function (creep) {
// Aquire target
if(!creep.memory.currentTarget || creep.memory.currentTarget.ticksToRegeneration === undefined || !creep.memory.currentTarget.energy || !creep.memory.movement.path.length) {
creep.memory.currentTarget = creep.pos.findClosest(FIND_SOURCES_ACTIVE, {
algori... | Add checks for currentTarget defined | Add checks for currentTarget defined
| JavaScript | mit | pmaidens/screeps,pmaidens/screeps |
1861155258d041d1c4b0c00dfb5b5e7407a37f0c | src/peeracle.js | src/peeracle.js | 'use strict';
(function () {
var Peeracle = {};
Peeracle.Media = require('./media');
Peeracle.Peer = require('./peer');
Peeracle.Tracker = require('./tracker');
module.exports = Peeracle;
})();
| 'use strict';
(function () {
var Peeracle = {};
Peeracle.Media = require('./media');
Peeracle.Metadata = require('./metadata');
Peeracle.Peer = require('./peer');
Peeracle.Tracker = require('./tracker');
Peeracle.Utils = require('./utils');
module.exports = Peeracle;
})();
| Load Metadata and Utils in node | Load Metadata and Utils in node
| JavaScript | mit | peeracle/legacy |
037af037f4b392ebc51da482ff654b8915f8f448 | reducers/es5/reviews.js | reducers/es5/reviews.js | const reviews = (state=[], action) => {
switch (action.type) {
case 'ADD_REVIEW':
return [
...state, {
id: action.id,
reviewer: action.reviewer,
text: action.text,
rating: action.rating,
flag: false
}
]
case 'DELETE_REVIEW':
return state.filter(... | const reviews = (state=[], action) => {
switch (action.type) {
case 'ADD_REVIEW':
return [
...state, {
id: action.id,
reviewer: action.reviewer,
text: action.text,
rating: action.rating,
flag: false
}
]
case 'DELETE_REVIEW':
return state.filter(r... | Remove unneccessary paren in flag review statement | [Chore] Remove unneccessary paren in flag review statement
| JavaScript | mit | andela-emabishi/immutable-redux |
909be0fe839a61616bc62e93176a7ceb7f8fdd55 | example/redux/client/routes.js | example/redux/client/routes.js | /* @flow */
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import { App, NotFound } from './components/App.js';
import Home, { Who, How } from './components/Pages.js';
import { LogIn, SignUp } from './components/SignUp.js';
/**
* The route configuration for the whole app.
*/
export co... | /* @flow */
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import { App, NotFound } from './components/App.js';
import Home, { Who, How } from './components/Pages.js';
import { LogIn, SignUp } from './components/SignUp.js';
/**
* The route configuration for the whole app.
*/
export co... | Fix title rendering in redux example | Fix title rendering in redux example
| JavaScript | mit | iansinnott/react-static-webpack-plugin,iansinnott/react-static-webpack-plugin |
29071eee23739d47dd9957b7fbdfacd5dd2918d7 | app.js | app.js | //var http = require('http');
var express = require('express');
var app = module.exports = express();
/*http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain; charset=utf-8'});
res.end('Can i haz app.js host another one or probably?');
}).listen(4080);*/
app.get('/', functio... | //var http = require('http');
var express = require('express');
var app = module.exports = express();
/*http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain; charset=utf-8'});
res.end('Can i haz app.js host another one or probably?');
}).listen(4080);*/
app.get('/', functio... | Fix issue with old express usage | Fix issue with old express usage
| JavaScript | mit | pieszynski/test |
1c372f7892199b84f128662fd71dc5795ec64348 | test/tests/itemTest.js | test/tests/itemTest.js | describe("Zotero.Item", function() {
describe("#getField()", function () {
it("should return false for valid unset fields on unsaved items", function* () {
var item = new Zotero.Item('book');
assert.equal(item.getField('rights'), false);
});
it("should return false for valid unset fields on unsaved item... | describe("Zotero.Item", function() {
describe("#getField()", function () {
it("should return false for valid unset fields on unsaved items", function* () {
var item = new Zotero.Item('book');
assert.equal(item.getField('rights'), false);
});
it("should return false for valid unset fields on unsaved item... | Remove extra debug lines in item test | Remove extra debug lines in item test
| JavaScript | agpl-3.0 | hoehnp/zotero,hoehnp/zotero,retorquere/zotero,rmzelle/zotero,hoehnp/zotero,gracile-fr/zotero,rmzelle/zotero,gracile-fr/zotero,gracile-fr/zotero,retorquere/zotero,retorquere/zotero,rmzelle/zotero |
17f04695e0548e093533d8b498d2b741bdc9daeb | test/twitterService.js | test/twitterService.js | 'use strict';
class TwitterService {
// House Keeping of our connection/server
constructor() {
this.server = undefined;
}
start(done) {
require('../server').then((server) => {
this.server = server;
done();
}).catch(done);
}
clearDB() {
this.server.db.dropDatabase();
}
sto... | 'use strict';
const User = require('../app/models/user');
class TwitterService {
// House Keeping of our connection/server
constructor() {
this.server = undefined;
}
start(done) {
require('../server').then((server) => {
this.server = server;
done();
}).catch(done);
}
clearDB() {
... | Add user helpers to test service | Add user helpers to test service
| JavaScript | mit | FritzFlorian/true-parrot,FritzFlorian/true-parrot |
2a780f2132c867a996e78c1c0f1e9ef92d4a86fa | bot.js | bot.js | /* Require modules */
var nodeTelegramBot = require('node-telegram-bot')
, config = require('./config.json')
, request = require("request")
, cheerio = require("cheerio");
/* Functions */
/**
* Uses the request module to return the body of a web page
* @param {string} url
* @param {callback} callb... | /* Require modules */
var nodeTelegramBot = require('node-telegram-bot')
, config = require('./config.json')
, request = require("request")
, cheerio = require("cheerio");
/* Functions */
/**
* Uses the request module to return the body of a web page
* @param {string} url
* @param {callback} callb... | Add support for new @mention command syntax | Add support for new @mention command syntax
| JavaScript | mit | frdmn/telegram-WhatToEatBot |
c366fabc81d60b9ce641ce6756f78896d45dcd3c | modules/main.js | modules/main.js | var BASE = 'extensions.auto-confirm@myokoym.net.';
var prefs = require('lib/prefs').prefs;
function log(message) {
if (prefs.getPref(BASE + 'debug')) {
console.log("auto-confirm: " + message);
}
}
load('lib/WindowManager');
var global = this;
function handleWindow(aWindow)
{
log("handleWindow");
var doc ... | /*
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
var BASE = 'extensions.auto-confirm@myokoym.net.';
var prefs = require('lib/prefs').prefs;
function log(message) ... | Add license header for MPL 2.0 | Add license header for MPL 2.0
| JavaScript | mpl-2.0 | myokoym/auto-confirm,myokoym/auto-confirm |
092931766b842f4be71c27ab467f3549e1acf901 | Gulpfile.js | Gulpfile.js | var gulp = require('gulp');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var mocha = require('gulp-mocha');
gulp.task('lint', function() {
gulp.src(['src/**/*.js', 'test/**/*.js'])
.pipe(jshint({
esnext: true
}))
.pipe(jshint.reporter(stylish))
... | var gulp = require('gulp');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var mocha = require('gulp-mocha');
var sixToFive = require('gulp-6to5');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var del = require('del');
gulp.task('lint', function() {
gulp.... | Add UMD dist file building | Add UMD dist file building
| JavaScript | mit | MadaraUchiha/chusha |
4c0dfb36c9814228c633a430041f516018114a9c | routes/recipes/index.js | routes/recipes/index.js | var express = require('express');
var router = express.Router();
var JsonDB = require('node-json-db');
var _ = require('lodash');
// Escape a string for regexp use
function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
// Recipes listing
router.get('/', function (req, res, next) {
... | var express = require('express');
var router = express.Router();
var JsonDB = require('node-json-db');
var _ = require('lodash');
// Recipes listing
router.get('/', function (req, res, next) {
var db = new JsonDB('db', false, false);
var recipes = db.getData('/recipes');
// Expand requested resources if they ex... | Revert "Prepare branch for section 2.4 tutorial" | Revert "Prepare branch for section 2.4 tutorial"
This reverts commit 169e11232511209548673dd769a9c6f71d9b8498.
| JavaScript | mit | adamsea/recipes-api |
9731f408a89cf848959f7e593277cc2e67b1a437 | lib/attach.js | lib/attach.js | var getDefaultHistory = require('./history/getHistory');
/**
* Bootstraps the app by getting the initial state.
*/
function attach(Router, element, opts) {
if (!opts) opts = {};
var router = new Router();
var history = opts.history || getDefaultHistory();
var render = function() {
Router.engine.renderI... | var getDefaultHistory = require('./history/getHistory');
/**
* Bootstraps the app by getting the initial state.
*/
function attach(Router, element, opts) {
if (!opts) opts = {};
var router = new Router({defaultVars: {forDOM: true}});
var history = opts.history || getDefaultHistory();
var render = function(... | Add "forDOM" var when rendering for DOM | Add "forDOM" var when rendering for DOM
| JavaScript | mit | matthewwithanm/monorouter |
5d329062de1f903a05bb83101d81e4543cf993f6 | cu-build.config.js | cu-build.config.js | /**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
var name = 'cu-patcher-ui';
var config = {
type: 'module',
path: __dirname,
name: name,
bundle: {
... | /**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
var name = 'cu-patcher-ui';
var config = {
type: 'module',
path: __dirname,
name: name,
bundle: {
... | Fix gulp server root (for some reason started defaulting to dist) | Fix gulp server root (for some reason started defaulting to dist)
| JavaScript | mpl-2.0 | jamkoo/cu-patcher-ui,saddieeiddas/cu-patcher-ui,stanley85/cu-patcher-ui,stanley85/cu-patcher-ui,saddieeiddas/cu-patcher-ui,jamkoo/cu-patcher-ui,saddieeiddas/cu-patcher-ui |
fe752be0c1f02be11ae2feb53b4e730fee9d9d42 | packages/grpc-tools/bin/protoc_plugin.js | packages/grpc-tools/bin/protoc_plugin.js | #!/usr/bin/env node
/*
*
* Copyright 2015 gRPC authors.
*
* 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 app... | #!/usr/bin/env node
/*
*
* Copyright 2015 gRPC authors.
*
* 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 app... | Update maxBuffer limit to 100Mib | Update maxBuffer limit to 100Mib | JavaScript | apache-2.0 | grpc/grpc-node,grpc/grpc-node,grpc/grpc-node,grpc/grpc-node |
e45f7eb62428aa8e5b00afeca2fa0bed5aeb9c21 | lib/less-browser/cache.js | lib/less-browser/cache.js | // Cache system is a bit outdated and could do with work
module.exports = function(window, options, logger) {
var cache = null;
if (options.env !== 'development') {
try {
cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage;
} catch (_) {}
}
ret... | // Cache system is a bit outdated and could do with work
module.exports = function(window, options, logger) {
var cache = null;
if (options.env !== 'development') {
try {
cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage;
} catch (_) {}
}
ret... | Change error message when caching fails | Change error message when caching fails
see also: http://stackoverflow.com/questions/27722349/less-js-error-msg-failed-to-save/27750286 | JavaScript | apache-2.0 | pkdevbox/less.js,dyx/less.js,MrChen2015/less.js,less/less.js,xiaoyanit/less.js,royriojas/less.js,bendroid/less.js,cypher0x9/less.js,PUSEN/less.js,mishal/less.js,christer155/less.js,paladox/less.js,lvpeng/less.js,ridixcr/less.js,miguel-serrano/less.js,NaSymbol/less.js,SomMeri/less-rhino.js,yuhualingfeng/less.js,jjj117/l... |
c77cf00a60d489aaf3ceb45eb9f08ba7a85d2097 | figlet-node.js | figlet-node.js | /**
* Figlet JS node.js module
*
* Copyright (c) 2010 Scott González
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://github.com/scottgonzalez/figlet-js
*/
var Figlet = require("./figlet").Figlet;
Figlet.loadFont = function(name, fn) {
require("fs").readFile(... | /**
* Figlet JS node.js module
*
* Copyright (c) 2010 Scott González
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://github.com/scottgonzalez/figlet-js
*/
var fs = require("fs");
var path = require('path');
var Figlet = require("./figlet").Figlet;
Figlet.load... | Clean up figlet font loading for node | Clean up figlet font loading for node
| JavaScript | mit | olizilla/figlet-js |
eabfa3b3ed987746d335d4e0eb04688a6033b100 | ui/app/controllers/csi/volumes/volume.js | ui/app/controllers/csi/volumes/volume.js | import Controller from '@ember/controller';
export default Controller.extend({
actions: {
gotoAllocation(allocation) {
this.transitionToRoute('allocations.allocation', allocation);
},
},
});
| import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
export default Controller.extend({
system: service(),
sortedReadAllocations: computed('model.readAllocations.@each.modifyIndex', function() {
return this.model.readAllocati... | Sort allocation tables by modify index | Sort allocation tables by modify index
| JavaScript | mpl-2.0 | dvusboy/nomad,burdandrei/nomad,dvusboy/nomad,dvusboy/nomad,burdandrei/nomad,dvusboy/nomad,burdandrei/nomad,hashicorp/nomad,hashicorp/nomad,burdandrei/nomad,burdandrei/nomad,hashicorp/nomad,dvusboy/nomad,burdandrei/nomad,hashicorp/nomad,burdandrei/nomad,dvusboy/nomad,hashicorp/nomad,dvusboy/nomad,hashicorp/nomad |
91e3c6bddf1345970b7e2f8a34a487ccf9dc5224 | sashimi-webapp/test/database/sqlCommands_test.js | sashimi-webapp/test/database/sqlCommands_test.js | /*
* Test-unit framework for sqlCommands.js
*/
const assert = require('assert');
const vows = require('vows');
const Sql = require('../../src/database/sql-related/sqlCommands');
const sqlCommands = new Sql();
const isNotEmptyTable = function isNotEmptyTable(stringResult) {
return stringResult !== undefined;
};... | /*
* Test-unit framework for sqlCommands.js
*/
const assert = require('assert');
const vows = require('vows');
const Sql = require('../../src/database/sql-related/sqlCommands');
const sqlCommands = new Sql();
const isNotEmptyTable = function isNotEmptyTable(stringResult) {
return stringResult !== undefined;
};... | Add code framework to return data from test | Add code framework to return data from test
| JavaScript | mit | nus-mtp/sashimi-note,nus-mtp/sashimi-note,nus-mtp/sashimi-note |
a2981360a9531458ce590eb8c6144fbd64848d90 | configs/typescript.js | configs/typescript.js | module.exports = {
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
// typescript will handle this so no need for it
'no-undef': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-unus... | module.exports = {
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
rules: {
// typescript will handle this so no need for it
'no-undef': 'off',
'no-unused-vars': 'off',
'no-use-before-define': ... | Add parser to ts overrides | fix: Add parser to ts overrides
| JavaScript | mit | relekang/eslint-config-relekang |
f1da9f35647cd44ee8bd898593da8f35b7e7cb02 | routes/media.js | routes/media.js | const db = require('../lib/db')
const mongoose = db.goose
const conn = db.rope
const fs = require('fs')
const router = require('koa-router')()
const File = require('../lib/models/file')
const grid = require('gridfs-stream')
const gfs = grid(conn.db, mongoose.mongo)
router.get('/', function *() {
try {
var resu... | const db = require('../lib/db')
const mongoose = db.goose
const conn = db.rope
const fs = require('fs')
const router = require('koa-router')()
const File = require('../lib/models/file')
const grid = require('gridfs-stream')
const gfs = grid(conn.db, mongoose.mongo)
router.get('/', function *() {
try {
var resu... | Remove temporary file after upload | Remove temporary file after upload
| JavaScript | mit | kunni80/server,muffin/server |
28df4f7258df6930b0fa5892becde4c8962c6017 | packages/geolocation/geolocation.js | packages/geolocation/geolocation.js | var locationDep = new Deps.Dependency();
var location = null;
var locationRefresh = false;
var options = {
enableHighAccuracy: true,
maximumAge: 0
};
var errCallback = function () {
// do nothing
};
var callback = function (newLocation) {
location = newLocation;
locationDep.changed();
};
var enableLocatio... | var locationDep = new Deps.Dependency();
var location = null;
var locationRefresh = false;
var options = {
enableHighAccuracy: true,
maximumAge: 0
};
var errCallback = function () {
// do nothing
};
var callback = function (newLocation) {
location = newLocation;
locationDep.changed();
};
var enableLocatio... | Add simple location to Geolocation package | Add simple location to Geolocation package
| JavaScript | mit | steedos/meteor,yalexx/meteor,justintung/meteor,Profab/meteor,mubassirhayat/meteor,aramk/meteor,ashwathgovind/meteor,lpinto93/meteor,jagi/meteor,skarekrow/meteor,papimomi/meteor,SeanOceanHu/meteor,emmerge/meteor,lawrenceAIO/meteor,dfischer/meteor,Theviajerock/meteor,rabbyalone/meteor,mubassirhayat/meteor,stevenliuit/met... |
af56a39be34c4c42ffffbcf9f5dff5bba268bb8a | src/components/Modal.js | src/components/Modal.js | import React from 'react'
import styled from 'styled-components'
const Modal = props =>
props.isOpen ? (
<ModalContainer>
<ModalContent>{props.children}</ModalContent>
</ModalContainer>
) : (
<div />
)
const ModalContainer = styled.div`
display: flex;
justify-content: center;
align-items... | import React from 'react'
import styled from 'styled-components'
import Close from 'react-icons/lib/md/close'
const Modal = props =>
props.isOpen ? (
<ModalContainer>
<ModalContent>
<CloseIcon onClick={() => props.handleClose()} />
{props.children}
</ModalContent>
</ModalContainer... | Add close icon to modal window | Add close icon to modal window
| JavaScript | mit | h-simpson/hughsimpson.me,h-simpson/hughsimpson.me |
254a3a85d6ca2e769949c7062bb6035dcfd9cd11 | addon/components/ilios-calendar-event.js | addon/components/ilios-calendar-event.js | import Ember from 'ember';
import { default as CalendarEvent } from 'el-calendar/components/calendar-event';
import layout from '../templates/components/ilios-calendar-event';
import moment from 'moment';
const {computed, Handlebars} = Ember;
const {SafeString} = Handlebars;
export default CalendarEvent.extend({
la... | import Ember from 'ember';
import { default as CalendarEvent } from 'el-calendar/components/calendar-event';
import layout from '../templates/components/ilios-calendar-event';
import moment from 'moment';
const {computed, Handlebars} = Ember;
const {SafeString} = Handlebars;
export default CalendarEvent.extend({
la... | Fix single event class bindings | Fix single event class bindings
| JavaScript | mit | ilios/calendar,jrjohnson/calendar,stopfstedt/calendar,stopfstedt/calendar,ilios/calendar,jrjohnson/calendar |
4875769e5f7b38642e76ef8996058b644b45aae2 | src/defaultContainer.js | src/defaultContainer.js | import {formatString} from './utils';
import HostStorage from './Storage/HostStorage';
import ContextualIdentities from './ContextualIdentity';
import ExtendedURL from './ExtendedURL';
export async function buildDefaultContainer(preferences, url) {
url = new ExtendedURL(url);
let name = preferences['defaultContain... | import {formatString} from './utils';
import HostStorage from './Storage/HostStorage';
import ContextualIdentities from './ContextualIdentity';
import ExtendedURL from './ExtendedURL';
import PreferenceStorage from './Storage/PreferenceStorage';
export async function buildDefaultContainer(preferences, url) {
url = n... | Save 'lifetime' preference for created default containers | Save 'lifetime' preference for created default containers
| JavaScript | mit | kintesh/containerise,kintesh/containerise |
0cacc1182e66fe3cc8ac68639309b1bc5c8714b2 | src/models/variables.js | src/models/variables.js | 'use strict';
const readline = require('readline');
const _ = require('lodash');
const Bacon = require('baconjs');
function parseLine (line) {
const p = line.split('=');
const key = p[0];
p.shift();
const value = p.join('=');
if (line.trim()[0] !== '#' && p.length > 0) {
return [key.trim(), value.trim(... | 'use strict';
const readline = require('readline');
const _ = require('lodash');
const Bacon = require('baconjs');
function parseLine (line) {
const p = line.split('=');
const key = p[0];
p.shift();
const value = p.join('=');
if (line.trim()[0] !== '#' && p.length > 0) {
return [key.trim(), value.trim(... | Remove leftover `console.log` in `clever env import` | Remove leftover `console.log` in `clever env import` | JavaScript | apache-2.0 | CleverCloud/clever-tools,CleverCloud/clever-tools,CleverCloud/clever-tools |
248123f9306c6805df7026153dd13e98113e9e77 | server/src/main/webapp/resources/js/dashboard.js | server/src/main/webapp/resources/js/dashboard.js |
"use strict";
$(function () {
//-----------------------
//- Dashboard > Authentication Requests Chart -
//-----------------------
try{
var authChartData = JSON.parse($("#authenticationChartJson").val());
console.log("authentication chart data");
console.log(authChartData);
var authenticationReq... |
"use strict";
$(function () {
//-----------------------
//- Dashboard > Authentication Requests Chart -
//-----------------------
try{
var authChartData = JSON.parse($("#authenticationChartJson").val());
console.log("authentication chart data");
console.log(authChartData);
var authenticationReq... | Fix suggestedMax in chart when there is no data to display | Fix suggestedMax in chart when there is no data to display | JavaScript | mit | madumlao/oxTrust,madumlao/oxTrust,GluuFederation/oxTrust,GluuFederation/oxTrust,GluuFederation/oxTrust,madumlao/oxTrust,madumlao/oxTrust,GluuFederation/oxTrust,GluuFederation/oxTrust,madumlao/oxTrust |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.