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 |
|---|---|---|---|---|---|---|---|---|---|
a098d8b14c8c5a1ee8d7687951a8f4ef14a7e614 | stack-generator.js | stack-generator.js | (function(root, factory) {
'use strict';
// Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
/* istanbul ignore next */
if (typeof define === 'function' && define.amd) {
define('stack-generator', ['stackframe'], factory);
} else if (typeof exports ===... | (function(root, factory) {
'use strict';
// Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
/* istanbul ignore next */
if (typeof define === 'function' && define.amd) {
define('stack-generator', ['stackframe'], factory);
} else if (typeof exports ===... | Add falsey arguments check to loop condition | Add falsey arguments check to loop condition
| JavaScript | mit | stacktracejs/stack-generator |
055bfaa7ed70157854a7a5a295e0596a7c863fd3 | src/lib/composedFetch.js | src/lib/composedFetch.js | import axios from 'axios';
export default itemIdentifier => axios.get(`items`, {
baseURL: `https://track.bpost.be/btr/api/`,
responseType: `json`,
params: { itemIdentifier },
}).then(res => res.data.items[0])
.catch(e => e);
| const axios = require(`axios`);
export default itemIdentifier => axios.get(`items`, {
baseURL: `https://track.bpost.be/btr/api/`,
responseType: `json`,
params: { itemIdentifier },
}).then(res => res.data.items[0])
.catch(e => e);
| Revert using es6 import for axios | :rewind: Revert using es6 import for axios
This reverts commit 0f04f3b3cf7281eb96fa35fc6f933998bd9ec40c.
| JavaScript | mit | thibmaek/bpost |
7b65cc53b6cbf9d53424b1277811748b2628661e | app/js/utils.js | app/js/utils.js | /*
-- utils.js
This file contains generic functions for other javascript files to use.
Like returnTime(), capitalize() etc.
*/
/**
* Get unix time
* @returns {number}
*/
export function returnTime() {
let d = new Date();
return d.getTime();
}
/**
* Updates the current phrase's scroll amount
* called a... | /*
-- utils.js
This file contains generic functions for other javascript files to use.
Like returnTime(), capitalize() etc.
*/
/**
* Get unix time
* @returns {number}
*/
export function returnTime() {
let d = new Date();
return d.getTime();
}
/**
* Updates the current phrase's scroll amount
* called aft... | Fix scrolling to the end of the current phrase | Fix scrolling to the end of the current phrase
| JavaScript | agpl-3.0 | otsimo/aac,otsimo/aac,otsimo/aac |
06429fec7c536df631f4841fa7205d32b5fd8f7a | test/commit-msg.js | test/commit-msg.js | 'use strict';
var assert = require('assert');
var path = require('path');
var execFileSync = require('child_process').execFileSync;
var root = path.resolve(__dirname, '..');
var hook = path.relative(root, 'bin/commit-msg');
var validFile = path.relative(root,
path.resolve(__dirname, 'resources/COMMIT_EDITMSG'));
... | 'use strict';
var assert = require('assert');
var path = require('path');
var execFileSync = require('child_process').execFileSync;
var root = path.resolve(__dirname, '..');
var hook = path.relative(root, 'bin/commit-msg');
var validFile = path.relative(root,
path.resolve(__dirname, 'resources/COMMIT_EDITMSG'));
... | Increase test timeout again for Travis | Increase test timeout again for Travis
| JavaScript | mit | sitestacker/commit-msg,clns/node-commit-msg,clns/node-commit-msg,sitestacker/commit-msg |
ada5270c7a2cc5981d103840a248754821c5da01 | test/index.test.js | test/index.test.js | var data = require('../lib/data')
var test = require('tape')
var needleman = require('../lib/index')
test('run', function (t) {
let v = 'GCATGCU'
let w = 'GATTACA'
let scores = { match: +1, mismatch: -1 }
let scoringMatrix = data.scoringMatrix({ v, w, scores })
let res = needleman.run(v, w, { scoringMatrix }... | var data = require('../lib/data')
var test = require('tape')
var needleman = require('../lib/index')
test('run', function (t) {
let v = 'GCATGCU'
let w = 'GATTACA'
let scores = { match: +1, mismatch: -1 }
let scoringMatrix = data.scoringMatrix({ v, w, scores })
let res = needleman.run(v, w, { scoringMatrix }... | Test a run with PAM250 | Test a run with PAM250
| JavaScript | isc | rodowi/needleman |
687c4b732522c9ea3c0d89dc26209fd523232d45 | test/plexacious.js | test/plexacious.js | const { expect } = require('chai');
const Plexacious = require('../src/Plexacious');
const config = {
hostname: 'macedonia.ketsugi.com',
token: process.env.PLEX_AUTH_TOKEN
}
const plex = new Plexacious();
describe('Plexacious:', () => {
}); | const { expect } = require('chai');
const Plexacious = require('../src/Plexacious');
const config = {
hostname: 'macedonia.ketsugi.com',
token: process.env.PLEX_AUTH_TOKEN
}
const plex = new Plexacious();
describe('Plexacious:', () => {
describe('Environment:', () => {
it('should read the environment variab... | Add a quick test to make sure the test is loading the environment var correctly in the Travis CI environment | Add a quick test to make sure the test is loading the environment var correctly in the Travis CI environment
| JavaScript | isc | ketsugi/plexacious |
1ee80a133fd252b722afca7ce4c60ee5e17b3c64 | array.stride.js | array.stride.js | Array.prototype.stride = function(callback) {
var stride_length = callback.length;
var ret = [];
for (var i=0; i<this.length; i+=stride_length) {
ret.push(callback.apply(i,this.slice(i,i+stride_length)));
}
return ret;
}
| Array.prototype.stride = function(callback,undef) {
var stride_length = callback.length;
var ret = [];
var l=0;
for (var i=0; i<this.length; i+=stride_length) {
var slice = this.slice(i,i+stride_length);
if (i+stride_length >= this.length) {
for (var j=this.length%stride_length; j<stride_length; j++) {
s... | Allow valued to be specified for undefined | Allow valued to be specified for undefined
| JavaScript | bsd-2-clause | slebetman/Array.stride |
97f4bed400f19ed7269243088c75dfcf8f84b1f9 | bin/oust.js | bin/oust.js | #!/usr/bin/env node
var oust = require('../index');
var pkg = require('../package.json');
var fs = require('fs');
var argv = require('minimist')(process.argv.slice(2));
var printHelp = function() {
console.log('oust');
console.log(pkg.description);
console.log('');
console.log('Usage:');
console.... | #!/usr/bin/env node
var oust = require('../index');
var pkg = require('../package.json');
var fs = require('fs');
var argv = require('minimist')(process.argv.slice(2));
var printHelp = function() {
console.log('oust');
console.log(pkg.description);
console.log('');
console.log('Usage:');
console.... | Rename selector variable to type | Rename selector variable to type
| JavaScript | apache-2.0 | addyosmani/oust,addyosmani/oust,actmd/oust,actmd/oust |
6ad519748c3ae8731a0eb1ee7b593b698af644ea | babel.config.js | babel.config.js | module.exports = api => {
api.cache(true);
const presets = [
[
'@babel/preset-env',
process.env.NODE_ENV === 'test'
? {}
: {
modules: false,
},
],
'@babel/preset-react',
'@babel/prese... | module.exports = api => {
api.cache(true);
const presets = [
[
'@babel/preset-env',
process.env.NODE_ENV === 'test'
? {
useBuiltIns: 'usage', // for regeneratorRuntime
}
: {
modules: fa... | Fix regeneratorRuntime missing in tests | Fix regeneratorRuntime missing in tests
| JavaScript | mit | springload/react-accessible-accordion,springload/react-accessible-accordion,springload/react-accessible-accordion |
2f34d4a2bbc02a6af9ec95bc87cfc91e29100b76 | _temp/hud/src/util/request-message-processor.js | _temp/hud/src/util/request-message-processor.js | 'use strict';
var util = require('lib/util.js');
module.exports = {
getTypeMessages: function(request, typeOptions) {
var result = {};
for (var key in typeOptions) {
var callback = typeOptions[key];
result[util.toCamelCase(key)] = callback(request, key)
}
return result;
},
getTypeMessageItem: func... | 'use strict';
var util = require('lib/util.js');
module.exports = {
getTypeMessages: function(index, typeOptions) {
var result = {};
for (var key in typeOptions) {
var callback = typeOptions[key];
result[util.toCamelCase(key)] = callback(index, key)
}
return result;
},
getTypeMessageItem: function... | Update message processor to deal with list of messages rather than requests | Update message processor to deal with list of messages rather than requests
| JavaScript | unknown | Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype |
c5a6def484154866f2403ec62b4900da3f11c498 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var webpack = require('webpack');
var clientConfig = require('./config/webpack.prod.client.js')
var serverConfig = require('./config/webpack.prod.server.js')
gulp.task('bundle-client', function(done) {
webpack( clientConfig ).run(onBundle(done))
});
gulp.task('bundle-server', functio... | var gulp = require('gulp');
var webpack = require('webpack');
var clientConfig = require('./config/webpack.prod.client.js')
var serverConfig = require('./config/webpack.prod.server.js')
gulp.task('bundle-client', function(done) {
webpack( clientConfig ).run(onBundle(done))
});
gulp.task('bundle-server', functio... | Add tasks for asset moving on build | Add tasks for asset moving on build
| JavaScript | mit | AdamSalma/Lurka,AdamSalma/Lurka |
6441eadae68e6f8cae8f7b1ef2d5fbcc3ed90b81 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var cssmin = require('gulp-cssmin');
var uglify = require('gulp-uglify');
var nodemon = require('gulp-nodemon');
var gif = require('gulp-if');
var inProduction = process.env['NODE_ENV'] == 'production';
gulp.task('asset-css', function() {
gulp.src('assets/css/main.css')
.pipe(gif(inP... | var gulp = require('gulp');
var cssmin = require('gulp-cssmin');
var uglify = require('gulp-uglify');
var nodemon = require('gulp-nodemon');
var gif = require('gulp-if');
var inProduction = process.env['NODE_ENV'] == 'production';
gulp.task('build-assets-css', function() {
gulp.src('assets/css/main.css')
.pipe(... | Standardize the gulp task names (build-type-name) | Standardize the gulp task names (build-type-name)
| JavaScript | mit | Cryptkeeper/Minetrack,Cryptkeeper/Minetrack,Cryptkeeper/Minetrack |
40721cc5c3077d5511095c8de3f55eb82c6c0c37 | scripts/drive/client_secrets.js | scripts/drive/client_secrets.js | define({
"web": {
"client_id": "745152835189.apps.googleusercontent.com",
"client_secret": "notasecret",
"redirect_uris": [],
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token"
}
}); | define({"web":{"auth_uri":"https://accounts.google.com/o/oauth2/auth","client_secret":"L-55q-H0NDlkjyUpQ2_dHcwF","token_uri":"https://accounts.google.com/o/oauth2/token","client_email":"745152835189-97gjss3kf3139dabkt102p6ofa2okic3@developer.gserviceaccount.com","redirect_uris":["http://dev.billbill-caminito.appspot.co... | Use a new client ID | Use a new client ID
| JavaScript | mit | configurator/billbill,configurator/billbill |
792e79f814aa61c25c99638b1408a0a26fa7be5a | build/tasks/build-release/build.js | build/tasks/build-release/build.js | module.exports = function(grunt, config, parameters, done) {
var workFolder = parameters.releaseWorkFolder || './release/source';
function endForError(error) {
process.stderr.write(error.message || error);
done(false);
}
try {
var path = require('path'),
exec = require('child_process').exec,
fs = requir... | module.exports = function(grunt, config, parameters, done) {
var workFolder = parameters.releaseWorkFolder || './release/source';
function endForError(error) {
process.stderr.write(error.message || error);
done(false);
}
try {
var path = require('path'),
exec = require('child_process').exec,
fs = requir... | Call composer from the webroot | Call composer from the webroot
composer.json has been moved from /concrete/composer.json to /composer.json
| JavaScript | mit | TimDix/concrete5,matt9mg/concrete5,TimDix/concrete5,MichaelMaar/concrete5,avdevs/concrete5,avdevs/concrete5,matt9mg/concrete5,MichaelMaar/concrete5,matt9mg/concrete5,MichaelMaar/concrete5,avdevs/concrete5,TimDix/concrete5 |
41d14956ac27a88473f96aff451aaed0078dfa8e | planningpoker-web/src/containers/UsersTable.js | planningpoker-web/src/containers/UsersTable.js | import React, {Component} from 'react';
import {Table} from 'react-bootstrap';
import {connect} from 'react-redux';
import _ from 'lodash';
class UsersTable extends Component {
render() {
return (
<div className="tbl-scroll">
<Table responsive striped>
<tbody>
<tr>
... | import React, {Component} from 'react';
import {Table} from 'react-bootstrap';
import {connect} from 'react-redux';
import _ from 'lodash';
class UsersTable extends Component {
render() {
return (
<div className="tbl-scroll">
<Table responsive striped>
<tbody>
<tr>
... | Update current user from props | Update current user from props
| JavaScript | mit | richashworth/planningpoker,richashworth/planningpoker,richashworth/planningpoker,richashworth/planningpoker |
86d2210344117de523ec5778aeb3a9409cf46fff | analytics_dashboard/static/js/views/trends-view.js | analytics_dashboard/static/js/views/trends-view.js | define(['moment', 'nvd3', 'underscore', 'views/chart-view'],
function(moment, nvd3, _, ChartView) {
'use strict';
/**
* TrendsView renders several threads of timeline data over a period of
* time on the x axis.
*/
var TrendsView = ChartView.extend({
d... | define(['moment', 'nvd3', 'underscore', 'views/chart-view'],
function(moment, nvd3, _, ChartView) {
'use strict';
/**
* TrendsView renders several threads of timeline data over a period of
* time on the x axis.
*/
var TrendsView = ChartView.extend({
d... | Format date when tooltip template is used. | Format date when tooltip template is used.
| JavaScript | agpl-3.0 | Stanford-Online/edx-analytics-dashboard,Stanford-Online/edx-analytics-dashboard,edx/edx-analytics-dashboard,edx/edx-analytics-dashboard,Stanford-Online/edx-analytics-dashboard,edx/edx-analytics-dashboard,Stanford-Online/edx-analytics-dashboard,edx/edx-analytics-dashboard |
2707eb9eb542d96cb356006a4ccaf19efc14edbf | app/authenticated/cluster/projects/new-ns/route.js | app/authenticated/cluster/projects/new-ns/route.js | import { get, set, setProperties } from '@ember/object';
import { hash } from 'rsvp';
import { inject as service } from '@ember/service';
import Route from '@ember/routing/route';
export default Route.extend({
globalStore: service(),
clusterStore: service(),
scope: service(),
model(params) {
const... | import { get, set, setProperties } from '@ember/object';
import { hash } from 'rsvp';
import { inject as service } from '@ember/service';
import Route from '@ember/routing/route';
export default Route.extend({
globalStore: service(),
clusterStore: service(),
scope: service(),
model(params) {
const... | Fix default container limit issue | Fix default container limit issue
https://github.com/rancher/rancher/issues/21664
| JavaScript | apache-2.0 | rancherio/ui,westlywright/ui,vincent99/ui,lvuch/ui,westlywright/ui,rancher/ui,vincent99/ui,rancher/ui,westlywright/ui,rancher/ui,lvuch/ui,vincent99/ui,rancherio/ui,lvuch/ui,rancherio/ui |
c2093f1a3218910ff64cce77044107dd1f256b0a | both/router/routes.js | both/router/routes.js | /*****************************************************************************/
/* Client and Server Routes */
/*****************************************************************************/
Router.configure({
layoutTemplate: 'MasterLayout',
loadingTemplate: 'Loading',
notFoundTemplate: 'NotFound'
});
Router.rou... | /*****************************************************************************/
/* Client and Server Routes */
/*****************************************************************************/
Router.configure({
layoutTemplate: 'MasterLayout',
loadingTemplate: 'Loading',
notFoundTemplate: 'NotFound'
});
Router.rou... | Add fastRender flag to pages/:_id | Add fastRender flag to pages/:_id
| JavaScript | mit | bojicas/letterhead,bojicas/letterhead |
633210d5eb2b1040ecbe5f57e37dee22ff4ccb39 | src/example/views/home.js | src/example/views/home.js | import {connect as connectToState} from 'react-redux';
import compose from 'lodash/flowRight';
import Button from './components/button';
import React, {Component, PropTypes} from 'react';
import map from 'lodash/map';
import SearchComponent from './searchComponent'
import OtherSearchComponent from './otherSearchCompone... | import {connect as connectToState} from 'react-redux';
import compose from 'lodash/flowRight';
import Button from './components/button';
import React, {Component, PropTypes} from 'react';
import map from 'lodash/map';
import SearchComponent from './searchComponent'
import OtherSearchComponent from './otherSearchCompone... | Update the example to use results. | [example] Update the example to use results.
| JavaScript | mit | get-focus/focus-search |
69a456cc44e3071ba8852bacd2a50f3a6af82eca | public/javascripts/app/views/taskController.js | public/javascripts/app/views/taskController.js | define([
'Backbone',
//Collection
'app/collections/tasks',
//Template
'text!templates/project-page/taskItemTemplate.html',
], function(
Backbone,
//Collection
Tasks,
//Template
itemTemplate
){
var TaskController = Backbone.View.extend({
template: _.template(itemTemplate),
initiali... | define([
'Backbone',
//Collection
'app/collections/tasks',
//View
'app/views/taskItemView',
//Template
'text!templates/project-page/taskItemTemplate.html',
], function(
Backbone,
//Collection
Tasks,
//View
taskItemView,
//Template
itemTemplate
){
var TaskController = Backbone.View... | Extend task list to a nested view | Extend task list to a nested view
| JavaScript | mit | tangosource/pokerestimate,tangosource/pokerestimate |
2dc61ad7ec9da9371ab4dfbe7a5d4fda0e8a75fd | test/js/generators.js | test/js/generators.js | const encodings = require('encodings'),
asserts = require('test').asserts,
util = require('util');
require.paths.unshift('test/js/lib');
if (!this.exports) this.exports = {};
exports.test_generatorsInMoudles = function() {
var a = require('./generator_test').run();
var it = (k for (k in [1,2,3]) );
... | const encodings = require('encodings'),
asserts = require('test').asserts,
util = require('util');
require.paths.unshift('test/js/lib');
if (!this.exports) this.exports = {};
exports.test_generatorsInMoudles = function() {
var a = require('generator_test').run();
var it = (k for (k in [1,2,3]) );
... | Fix old style causing test to fail. | test/js: Fix old style causing test to fail. | JavaScript | mit | Flusspferd/flusspferd,Flusspferd/flusspferd,Flusspferd/flusspferd,Flusspferd/flusspferd,Flusspferd/flusspferd |
c5cf6d9b40d1da4fd506ecd7c5247a1f20daa5c2 | src/import/load-sound.js | src/import/load-sound.js | const log = require('../util/log');
/**
* Load a sound's asset into memory asynchronously.
* @param {!object} sound - the Scratch sound object.
* @property {string} md5 - the MD5 and extension of the sound to be loaded.
* @property {Buffer} data - sound data will be written here once loaded.
* @param {!Runtime} r... | const log = require('../util/log');
/**
* Load a sound's asset into memory asynchronously.
* @param {!object} sound - the Scratch sound object.
* @property {string} md5 - the MD5 and extension of the sound to be loaded.
* @property {Buffer} data - sound data will be written here once loaded.
* @param {!Runtime} r... | Use asset id reference on sounds | Use asset id reference on sounds
| JavaScript | bsd-3-clause | LLK/scratch-vm,LLK/scratch-vm,LLK/scratch-vm |
3edd205a84b4a7489b7bd6227f8c0f373c9c3142 | examples/mybox/app/modules/controllers/ItemsController.js | examples/mybox/app/modules/controllers/ItemsController.js |
app.controller("ItemsController", function($scope, $state, $window, $timeout, $modal, allItems, UserService, ItemService) {
if(!UserService.isLoggedIn()) {
$state.go("frontpage");
}
$scope.items = [];
$scope.limit = 12;
updateView(allItems);
$scope.$on("items:change", function(event... |
app.controller("ItemsController", function($scope, $state, $window, $timeout, $modal, allItems, UserService, ItemService) {
if(!UserService.isLoggedIn()) {
$state.go("frontpage");
}
$scope.items = [];
$scope.limit = 12;
updateView(allItems);
$scope.$on("items:change", function(event... | Sort mybox items by created date. | Sort mybox items by created date.
| JavaScript | mit | Appstax/appstax-js,Appstax/appstax-js |
afe29ba6c5ffc88cc89a9ce92d538cb7adf3551d | app/routes/case-progress.js | app/routes/case-progress.js | const getCaseProgress = require('../services/get-case-progress')
const getSubNav = require('../services/get-sub-nav')
module.exports = function (router) {
router.get('/:organisationLevel/:id/case-progress', function (req, res, next) {
var id = req.params.id
var organisationLevel = req.params.organisationLeve... | const getCaseProgress = require('../services/get-case-progress')
const getSubNav = require('../services/get-sub-nav')
const organisationUnit = require('../constants/organisation-unit')
module.exports = function (router) {
router.get('/:organisationLevel/:id/case-progress', function (req, res, next) {
var organis... | Add national id logic to case progress routes | 636: Add national id logic to case progress routes
| JavaScript | mit | ministryofjustice/wmt-web,ministryofjustice/wmt-web |
1ca020b2a26a37e2bb5c7d0495d780a774053d31 | js/components/common/card-image-header/cardImageHeader.js | js/components/common/card-image-header/cardImageHeader.js | import React, { Component } from 'react';
import { StyleSheet } from 'react-native';
import { Thumbnail, CardItem } from 'native-base';
import CardImageHeaderStyle from './cardImageHeaderStyle';
import GlobalStyle from '../../common/globalStyle';
// Card header with image and icon.
export default class CardImageHeader... | import React, { Component } from 'react';
import { StyleSheet } from 'react-native';
import { Thumbnail, CardItem } from 'native-base';
import CardImageHeaderStyle from './cardImageHeaderStyle';
import GlobalStyle from '../../common/globalStyle';
import { imageProp } from '../../common/propTypes';
// Card header with ... | Make CardImageHeader use imageProp from propTypes | Make CardImageHeader use imageProp from propTypes
| JavaScript | mit | justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client |
830124ef1ba7917f994e7c09c4c881a7e5a75cd5 | app/updates/update-model.js | app/updates/update-model.js | "use strict";
//Load dependencies
var async = require("async");
var applicationStorage = require("core/application-storage");
/**
* Insert an update into list
* @param type
* @param region
* @param realm
* @param name
* @param priority
* @param callback
*/
module.exports.insert = function (type, region, realm... | "use strict";
//Load dependencies
var async = require("async");
var applicationStorage = require("core/application-storage");
/**
* Insert an update into list
* @param type
* @param region
* @param realm
* @param name
* @param priority
* @param callback
*/
module.exports.insert = function (type, region, realm... | Fix update model priority on api call | Fix update model priority on api call
| JavaScript | agpl-3.0 | warcraftlfg/warcrafthub-api |
a666d8abd4fd23d501da6d7386caacbc58b754ac | models/industrysector_model.js | models/industrysector_model.js | var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = mongoose.Schema.Types.ObjectId;
var Mixed = mongoose.Schema.Types.Mixed;
var IndustrySectorSchema = new Schema({
name: String,
_owner_id: ObjectId,
_deleted: { type: Boolean, default: false, index: true },
}, {
timestamps... | var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = mongoose.Schema.Types.ObjectId;
var Mixed = mongoose.Schema.Types.Mixed;
var IndustrySectorSchema = new Schema({
name: { type: String, unique: true },
_owner_id: ObjectId,
_deleted: { type: Boolean, default: false, index: ... | Move index up to single line | Move index up to single line
| JavaScript | mit | 10layer/jexpress,10layer/jexpress |
503ea32f2787992ed77807f37c0957ddeef81086 | src/components/Header/Header.js | src/components/Header/Header.js | import React from 'react';
import { IndexLink } from 'react-router';
import './Header.scss';
export const Header = () => (
<div className="page-header navbar navbar-default">
<div className="container">
<IndexLink to="/" className="navbar-brand">
Athenen ilmomasiina
</IndexLink>
</div>
... | import React from 'react';
import { IndexLink } from 'react-router';
import './Header.scss';
export const Header = () => (
<div className="navbar navbar-default">
<div className="container">
<IndexLink to="/" className="navbar-brand">
Athenen ilmomasiina
</IndexLink>
</div>
</div>
);
e... | Remove wrong class name from header | Remove wrong class name from header
| JavaScript | mit | peksi/ilmomasiina,athenekilta/ilmomasiina,peksi/ilmomasiina,athenekilta/ilmomasiina |
4b3f6efb21edaeea48a14e581491bcaf72f9e3bf | packages/react-native-web/src/exports/StyleSheet/index.js | packages/react-native-web/src/exports/StyleSheet/index.js | import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
import StyleSheet from './StyleSheet';
// allow component styles to be editable in React Dev Tools
if (process.env.NODE_ENV !== 'production') {
if (canUseDOM && window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle... | import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
import StyleSheet from './StyleSheet';
// allow original component styles to be inspected in React Dev Tools
if (canUseDOM && window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle = StyleSheet.flatten;
}
export defaul... | Support style inspection in production | Support style inspection in production
| JavaScript | mit | necolas/react-native-web,necolas/react-native-web,necolas/react-native-web |
e2ada72612c4c6c90ee90223cfe19345173c7e21 | gulpfile.js | gulpfile.js | // gulpfile.js
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var karma = require('gulp-karma');
var testFiles;
require('./.karma.js')({set: function (config) { testFiles = config['files']; }});
var exec = require('child_process').exec;
/**
* Lint source code and specs
*/
gulp.task('lint', funct... | // gulpfile.js
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var karma = require('gulp-karma');
var testFiles;
require('./.karma.js')({set: function (config) { testFiles = config['files']; }});
var exec = require('child_process').exec;
/**
* Lint source code and specs
*/
gulp.task('lint', funct... | Make test task depend on lint task | Make test task depend on lint task
| JavaScript | mit | strawjs/straw-ios.js |
8bedca0f19d3a698f3d85ebf1100e6dea0eec06c | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var apigen = require('gulp-apigen');
var phpunit = require('gulp-phpunit');
var spawn = require('child_process').spawn;
var jasmine = require('gulp-jasmine');
var cover = require('gulp-coverage');
gulp.task('apigen', function() {
gulp.src('apigen.neon').pipe(apigen('./vendor/bin/apigen'))... | var gulp = require('gulp');
var apigen = require('gulp-apigen');
var phpunit = require('gulp-phpunit');
var spawn = require('child_process').spawn;
var jasmine = require('gulp-jasmine');
var cover = require('gulp-coverage');
gulp.task('apigen', function() {
gulp.src('apigen.neon').pipe(apigen('./vendor/bin/apigen'))... | Load src file as helper for jasmine | Load src file as helper for jasmine
| JavaScript | mit | molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec |
b952ddeaa5d7082e4df3b72543159468440a95b4 | gulpfile.js | gulpfile.js | var docco, gulp, jslint, nodeunit;
docco = require('gulp-docco');
gulp = require('gulp');
jslint = require('gulp-jslint');
nodeunit = require('gulp-nodeunit');
gulp.task('docs', function () {
'use strict';
return gulp
.src('./leslie.js')
.pipe(docco())
.pipe(gulp.dest('./docs/'));
});
gulp.task('test... | var docco, gulp, jslint, nodeunit;
docco = require('gulp-docco');
gulp = require('gulp');
jslint = require('gulp-jslint');
nodeunit = require('gulp-nodeunit');
gulp.task('docs', function () {
'use strict';
return gulp
.src('./leslie.js')
.pipe(docco())
.pipe(gulp.dest('./docs/'));
});
gulp.task('test... | Add ci target for travis. | Add ci target for travis.
| JavaScript | mit | curtissimo/leslie-mvp |
75bed5bf5e3192565ce0c8c37727f347e3f3c07f | src/venigi.js | src/venigi.js | // fetch api
// https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
// https://blog.hospodarets.com/fetch_in_action
// async/await
// https://ponyfoo.com/articles/understanding-javascript-async-await
const venigi = (() => {
let get = async function (source) {
return await fetch(source)
... | // fetch api
// https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
// https://blog.hospodarets.com/fetch_in_action
// async/await
// https://ponyfoo.com/articles/understanding-javascript-async-await
// module pattern
// http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html
const v... | Add link to module pattern doc | Add link to module pattern doc
| JavaScript | mpl-2.0 | aloisdg/kanti,aloisdg/kanti |
4a7a9ceae6da7c74c59918ec836092005277ca48 | app/scripts/filters/previewfilter.js | app/scripts/filters/previewfilter.js | 'use strict';
/**
* @ngdoc filter
* @name dockstore.ui.filter:PreviewFilter
* @function
* @description
* # PreviewFilter
* Filter in the dockstore.ui.
*/
angular.module('dockstore.ui')
.filter('PreviewFilter', [function () {
return function (containers, contLimit) {
if (!contLimit) return containers... | 'use strict';
/**
* @ngdoc filter
* @name dockstore.ui.filter:PreviewFilter
* @function
* @description
* # PreviewFilter
* Filter in the dockstore.ui.
*/
angular.module('dockstore.ui')
.filter('PreviewFilter', [function () {
return function (containers, contLimit) {
if (!contLimit) return containers... | Update PreviewFilter for invalid/non-returned timestamps. | Update PreviewFilter for invalid/non-returned timestamps.
| JavaScript | apache-2.0 | ga4gh/dockstore-ui,ga4gh/dockstore-ui,ga4gh/dockstore-ui |
91e57e2738fb46df241d23038fed729fc6471466 | grunt/bs-raw-files-generator.js | grunt/bs-raw-files-generator.js | /* global btoa: true */
/*!
* Bootstrap Grunt task for generating raw-files.min.js for the Customizer
* http://getbootstrap.com
* Copyright 2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
'use strict';
var fs = require('fs');
var btoa = require('btoa');
var grunt ... | /*!
* Bootstrap Grunt task for generating raw-files.min.js for the Customizer
* http://getbootstrap.com
* Copyright 2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/* global btoa: true */
'use strict';
var fs = require('fs');
var btoa = require('btoa');
var grun... | Move license to the top of the file. | Move license to the top of the file.
| JavaScript | mit | xkzlx0523/bootstrap,aaa7762437/bootstrap,welloncn/bootstrap,bernardogfilho/bootstrap,jiaohy/bootstrap,hifeeling/bootstrap,dengyaolong/bootstrap,hiersekornc/bootstrap,Vontei/bootstrap,xwpfullstack/bootstrap,volusion/vol-admin-bootstrap,gaoxiaopang/bootstrap,Quy/bootstrap,JanStevens/bootstrap,Binn-Jou/bootstrap,Vito2015/... |
57677ead8b0b1d878e9011c47f8df9004d746690 | source/linkedin.js | source/linkedin.js | // LinkedIn:
$('title').remove();
$('#name-container').hide();
$('.profile-picture').hide();
// Logged out:
$('h1#name').hide();
$('.reg-upsell').hide();
// These should appear only if you're already connected, but just in case:
$('.endorse-v2').hide();
$('.write-endorsement').hide(); | // LinkedIn:
$('title').remove();
$('#name-container').hide();
$('.profile-picture').hide();
// Logged out:
$('h1#name').hide();
$('.reg-upsell').hide();
$('.name-search').hide();
// These should appear only if you're already connected, but just in case:
$('.endorse-v2').hide();
$('.write-endorsement').hide(); | Hide 'Find a different [NAME]' | LinkedIn: Hide 'Find a different [NAME]'
Closes https://github.com/fureigh/unbias-me/issues/9
| JavaScript | mit | fureigh/unbias-me |
d6024925fc679672a18b2bec894040b5eb0cd362 | rx-run/src/rendering.js | rx-run/src/rendering.js | 'use strict';
var h = require('virtual-hyperscript');
var VDOM = {
diff: require('virtual-dom/diff'),
patch: require('virtual-dom/patch')
};
var DOMDelegator = require('dom-delegator');
function renderEvery(vtree$, containerSelector) {
// Find and prepare the container
var container = document.querySelector(c... | 'use strict';
var h = require('virtual-hyperscript');
var VDOM = {
diff: require('virtual-dom/diff'),
patch: require('virtual-dom/patch')
};
var DOMDelegator = require('dom-delegator');
function renderEvery(vtree$, container) {
// Find and prepare the container
var container = typeof container === 'string' ? ... | Allow renderEvery to be passed a DOM node | Allow renderEvery to be passed a DOM node
| JavaScript | mit | cyclejs/cyclejs,cyclejs/cyclejs,usm4n/cyclejs,cyclejs/cyclejs,feliciousx-open-source/cyclejs,usm4n/cyclejs,ntilwalli/cyclejs,maskinoshita/cyclejs,feliciousx-open-source/cyclejs,staltz/cycle,ntilwalli/cyclejs,cyclejs/cycle-core,cyclejs/cyclejs,maskinoshita/cyclejs,maskinoshita/cyclejs,usm4n/cyclejs,ntilwalli/cyclejs,fel... |
833f6396d44bc0d31960e83b1740d704123e6cc9 | js/popup.js | js/popup.js | $(window).ready(function(){
$("#config_button").unbind().click(function(){
if($("#config_button").data('switch_flag')=='open') {
$("#config_container").animate({height:"0px"},500);
$("body").animate({height:"0px"},500);
$("#config_button").data('switch_flag','close');
}else{
$("#config_container").anim... | $(window).ready(function(){
$("#config_button").unbind().click(function(){
if($("#config_button").data('switch_flag')=='open') {
$("#config_container").animate({height:"0px"},500);
$("body").animate({height:"134px"},500);
$("#config_button").data('switch_flag','close');
}else{
$("#config_container").an... | Fix bug when animate body get wrong height. | Fix bug when animate body get wrong height.
| JavaScript | mit | tinymins/ChromeExt.GoogleExchange,tinymins/ChromeExt.GoogleExchange |
8282ca570b5f4cad88893fcf0d5ccc4172c34ff7 | js/patterns/maillist/app.js | js/patterns/maillist/app.js | // Mailin List - Entry point
const Person = require('./person.js');
const Group = require('./group.js');
const MailList = require('./maillist.js');
function test01() {
const g1 = new Group('list-developers');
g1.add(new Person('Katzuro Akata', 'katzuro@stringcraft.org'));
g1.add(new Person('Makimoro Tateke', 'm... | // Mailin List - Entry point
const Person = require('./person.js');
const Group = require('./group.js');
const MailList = require('./maillist.js');
const people = new Map();
people.set('akata', new Person('Katzuro Akata', 'katzuro@stringcraft.org'));
people.set('tateke', new Person('Makimoro Tateke', 'maki.tate@pebbl... | Use a map of persons instead of new ops every time | Use a map of persons instead of new ops every time
| JavaScript | mit | petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox |
7727b5f5eddb00ee4c52da4a10140ededc0a26c0 | custom/uth/_design/views/pending_uploads/map.js | custom/uth/_design/views/pending_uploads/map.js | function(doc) {
if (doc.type === "SonositeUpload") {
emit([doc.domain, doc.case_id], doc._id);
}
}
| function(doc) {
if (doc.type === "SonositeUpload" || doc.type === "VscanUpload") {
emit([doc.domain, doc.type, doc.case_id], doc._id);
}
}
| Add vscan uploads to the couch view | Add vscan uploads to the couch view
| JavaScript | bsd-3-clause | dimagi/commcare-hq,SEL-Columbia/commcare-hq,SEL-Columbia/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,q... |
3f90d9ff3dd3da35f4e3f712fd455a7f4b5e3aaf | scripts/compare-link.js | scripts/compare-link.js | /**
* Created by MrIggyman1234 on 19/12/2016.
*/
$(document).ready(function(){
var $nav = $("nav");
var $body = $("body");
$body.on("click", "#compare-link", function(e){
e.preventDefault();
$nav.fadeOut(200);
$nav.html("<a class=\"nav-link\" id=\"back-link\" href=\"#\">Back</a>" ... | /**
* Created by MrIggyman1234 on 19/12/2016.
*/
$(document).ready(function(){
var $nav = $("nav");
var $body = $("body");
$body.on("click", "#compare-link", function(e){
e.preventDefault();
$nav.html("<a class=\"nav-link\" id=\"back-link\" href=\"#\">Back</a>" +
"<a class=\"n... | Remove fade in and fade out | Remove fade in and fade out
| JavaScript | apache-2.0 | Balajanovski/Nautilus.io,Balajanovski/Nautilus.io |
3f9b963af5b04c0288f0f9b4ef44792bb40290e2 | webpack.dev.config.js | webpack.dev.config.js | 'use strict';
var webpack = require("webpack");
var config = require('./webpack.base.config.js');
if (process.env['NODE_ENV'] !== 'test') {
config.entry = [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/dev-server',
config.entry
];
}
config.devtool = 'eval-source-map';
config.plugi... | 'use strict';
var webpack = require("webpack");
var config = require('./webpack.base.config.js');
if (process.env['NODE_ENV'] !== 'test') {
config.entry = [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/dev-server',
config.entry
];
}
config.devtool = 'eval-source-map';
config.plugi... | Use `runtime` in babel to avoid duplication across the compiled output | Use `runtime` in babel to avoid duplication across the compiled output
| JavaScript | mit | Widcket/react-form,sdbondi/react-webpack-boilerplate,bellicose100xp/react-webpack-boilerplate,dclowd9901/react-ui-action-handler-decoupling,weixing2014/react-webpack-boilerplate,justengland/tic-tac-toe,srn/react-webpack-boilerplate,dclowd9901/js-3d-engine,AgtLucas/react-webpack-boilerplate,tungv/editor,srn/react-webpac... |
52c112da00ee8071378a3d9f173ccda2ccf93b63 | lib/http.js | lib/http.js | /**
* Various HTTP helper functions and defaults.
*/
'use strict';
/**
* Module dependencies.
*/
var http = require('http');
/**
* Default charset.
*/
var CHARSET = 'utf-8';
/**
* Reply to options request
*/
function options(req, res, methods) {
res.setHeader('Allow', methods.join(' '));
}
/**
* Repl... | /**
* Various HTTP helper functions and defaults.
*/
'use strict';
/**
* Module dependencies.
*/
var http = require('http');
/**
* Default charset.
*/
var CHARSET = 'utf-8';
/**
* Reply to options request
*/
function options(req, res, methods) {
res.setHeader('Allow', methods.join(' '));
}
/**
* Repl... | Use statusCode instead of code | Use statusCode instead of code
| JavaScript | mit | silas/swagger-framework,liquidninja24/swagger-framework |
2c45568c090f2774d72eb5b838acf40a80668004 | test/data-structures/testFenwickTree.js | test/data-structures/testFenwickTree.js | /* eslint-env mocha */
const FenwickTree = require('../../src').DataStructures.FenwickTree;
const assert = require('assert');
describe('Fenwick Tree', () => {
it('should be empty when initialized', () => {
const inst = new FenwickTree([]);
assert(inst.isEmpty());
assert.equal(inst.size, 0);
});
});
| /* eslint-env mocha */
const FenwickTree = require('../../src').DataStructures.FenwickTree;
const assert = require('assert');
describe('Fenwick Tree', () => {
it('should be empty when initialized', () => {
const inst = new FenwickTree([]);
assert(inst.isEmpty());
assert.equal(inst.size, 0);
});
it('... | Test Fenwick Tree: Builds the tree | Test Fenwick Tree: Builds the tree
| JavaScript | mit | ManrajGrover/algorithms-js |
c6ecc9875e359b5d8ef44625fad75180936379ae | IPython/html/static/widgets/js/widget_float.js | IPython/html/static/widgets/js/widget_float.js | // Copyright (c) IPython Development Team.
// Distributed under the terms of the Modified BSD License.
define([
"widgets/js/widget",
"widgets/js/widget_int",
], function(widget, int_widgets){
var IntSliderView = int_widgets.IntSliderView;
var IntTextView = int_widgets.IntTextView;
var FloatSliderV... | // Copyright (c) IPython Development Team.
// Distributed under the terms of the Modified BSD License.
define([
"widgets/js/widget",
"widgets/js/widget_int",
], function(widget, int_widgets){
var IntSliderView = int_widgets.IntSliderView;
var IntTextView = int_widgets.IntTextView;
var FloatSliderV... | Add support to the float slider | Add support to the float slider
| JavaScript | bsd-3-clause | ipython/ipython,ipython/ipython |
09aa981d8aecf425fed24b4be0eac9fad9955573 | test/setup.js | test/setup.js | const { JSDOM } = require('jsdom');
const jsdom = new JSDOM('<!DOCTYPE html><html><body></body></html>');
const { window } = jsdom;
function copyProps(src, target) {
const props = Object.getOwnPropertyNames(src)
.filter(prop => typeof target[prop] === 'undefined')
.map(prop => Object.getOwnPropert... | const { JSDOM } = require('jsdom');
const jsdom = new JSDOM('<!DOCTYPE html><html><body></body></html>');
const { window } = jsdom;
function copyProps(src, target) {
const props = Object.getOwnPropertyNames(src)
.filter(prop => typeof target[prop] === 'undefined')
.map(prop => Object.getOwnPropert... | Fix test errors caused by upgrade in Chai dependency | Fix test errors caused by upgrade in Chai dependency
| JavaScript | mit | jakezatecky/react-checkbox-tree,jakezatecky/react-checkbox-tree |
e60bbd5beab0d471214afcd142b66a4764d6a0b8 | test/test_charm_slider.js | test/test_charm_slider.js | 'use strict';
describe('charm slider', function() {
var container, Y;
before(function(done) {
Y = YUI(GlobalConfig).use(
['browser-charm-slider'], function(Y) {
done();
});
});
beforeEach(function() {
container = Y.Node.create('<div id="container"></div>');
Y.one(documen... | 'use strict';
describe('charm slider', function() {
var container, Y;
before(function(done) {
Y = YUI(GlobalConfig).use(
['browser-charm-slider', 'node'], function(Y) {
done();
});
});
beforeEach(function() {
container = Y.Node.create('<div id="container"></div>');
Y.one... | Test fails for the right reasons. | Test fails for the right reasons. | JavaScript | agpl-3.0 | bac/juju-gui,jrwren/juju-gui,bac/juju-gui,CanonicalJS/juju-gui,mitechie/juju-gui,jrwren/juju-gui,mitechie/juju-gui,bac/juju-gui,mitechie/juju-gui,CanonicalJS/juju-gui,mitechie/juju-gui,CanonicalJS/juju-gui,jrwren/juju-gui,bac/juju-gui,jrwren/juju-gui |
be83dc1e589049e518a33f6e47e2daf2b19adbbe | flexbuzz.js | flexbuzz.js | "use strict";
var limit = (process.argv.length == 3) ? parseInt(process.argv[2]) : 100;
for(var i = 1; i < limit; i++) {
if (i % 3 == 0) {
console.log ("Fizz");
} else if (i % 5 == 0) {
console.log ("Buzz");
} else if (i % 3 == 0 && i % 5 == 0) {
console.log ("FizzBuzz");
} else {
console.log (... | "use strict";
var limit = (process.argv.length == 3) ? parseInt(process.argv[2]) : 100;
for(var i = 1; i < limit; i++) {
if (i % 3 == 0 && i % 5 == 0) {
console.log ("FizzBuzz");
} else if (i % 3 == 0) {
console.log ("Fizz");
} else if (i % 5 == 0) {
console.log ("Buzz");
} else {
console.log ... | Test for divisibility of 3 and 5 first so that "FizzBuzz" is actually printed | Test for divisibility of 3 and 5 first so that "FizzBuzz" is actually printed
| JavaScript | apache-2.0 | stefanwille/flexbuzz |
b1c86ae731906102cf44df40286198f463272322 | material.js | material.js | const Signal = require('signals')
let MaterialID = 0
function Material (opts) {
this.type = 'Material'
this.id = 'Material_' + MaterialID++
this.changed = new Signal()
this._uniforms = {}
const ctx = opts.ctx
this.baseColor = [0.95, 0.95, 0.95, 1]
this.emissiveColor = [0, 0, 0, 1]
this.metallic = 0... | const Signal = require('signals')
let MaterialID = 0
function Material (opts) {
this.type = 'Material'
this.id = 'Material_' + MaterialID++
this.changed = new Signal()
this._uniforms = {}
const ctx = opts.ctx
this.baseColor = [0.95, 0.95, 0.95, 1]
this.baseColorMap = null
this.emissiveColor = [0, 0... | Initialize texture maps with null | Initialize texture maps with null | JavaScript | mit | pex-gl/pex-renderer,pex-gl/pex-renderer |
3dbec7a81dcd989d3690f41c07f36b5ef3bb9abe | src/js/view/PresentationView.js | src/js/view/PresentationView.js | define([
"backbone",
"underscore",
"jquery",
"text!/src/html/templates/presentation.html"
], function (Backbone, _, $, presentationTemplate) {
return Backbone.View.extend({
id: "presentation",
tagName: "section",
template: _.template(presentationTemplate),
events: {
... | define([
"backbone",
"underscore",
"jquery",
"text!/src/html/templates/presentation.html"
], function (Backbone, _, $, presentationTemplate) {
var slideCounter = 1;
return Backbone.View.extend({
id: "presentation",
tagName: "section",
template: _.template(presentationTe... | Increment slide number for slide titles when adding new ones | Increment slide number for slide titles when adding new ones
| JavaScript | mit | pads/yap,pads/yap |
02c01e82baafa6a9979f404463571baab0b9b77b | lib/vk_client.js | lib/vk_client.js | VK = {};
VK.requestCredential = function (options, credentialRequestCompleteCallback) {
if (!credentialRequestCompleteCallback && typeof options === 'function') {
credentialRequestCompleteCallback = options;
options = {};
}
var config = ServiceConfiguration.configurations.findOne({service... | VK = {};
VK.requestCredential = function (options, credentialRequestCompleteCallback) {
if (!credentialRequestCompleteCallback && typeof options === 'function') {
credentialRequestCompleteCallback = options;
options = {};
}
var config = ServiceConfiguration.configurations.findOne({service... | Add Windows Phone to 'mobile' variable | Add Windows Phone to 'mobile' variable | JavaScript | mit | alexpods/meteor-accounts-vk,alexpods/meteor-accounts-vk,newsiberian/meteor-accounts-vk,newsiberian/meteor-accounts-vk |
ea0ebf5832b4ffe0e24d66b03317be12ae5fa674 | client/superdesk.config.js | client/superdesk.config.js | /**
* This is the default configuration file for the Superdesk application. By default,
* the app will use the file with the name "superdesk.config.js" found in the current
* working directory, but other files may also be specified using relative paths with
* the SUPERDESK_CONFIG environment variable or the grunt -... | /**
* This is the default configuration file for the Superdesk application. By default,
* the app will use the file with the name "superdesk.config.js" found in the current
* working directory, but other files may also be specified using relative paths with
* the SUPERDESK_CONFIG environment variable or the grunt -... | Set the default date format | fix(date): Set the default date format
| JavaScript | agpl-3.0 | hlmnrmr/superdesk,hlmnrmr/superdesk,petrjasek/superdesk,hlmnrmr/superdesk,petrjasek/superdesk,pavlovicnemanja92/superdesk,superdesk/superdesk,pavlovicnemanja/superdesk,pavlovicnemanja/superdesk,ioanpocol/superdesk,pavlovicnemanja92/superdesk,superdesk/superdesk,pavlovicnemanja/superdesk,ioanpocol/superdesk,ioanpocol/su... |
a0131b6a857d6c9bb82a129a25b53cb538ff6552 | gulpfile.js | gulpfile.js | var gulp = require('gulp'),
paths = require('./paths.config.js');
// require gulp tasks from all gulp files
require('require-dir')('./gulp');
// watch for file changes and run linters.
gulp.task('watch', function () {
gulp.watch(paths.allTypeScript, ['ts-lint']);
gulp.watch(paths.allJavaScript, ['es-lint'... | /// <binding BeforeBuild='es-lint, ts-lint' Clean='clean' />
var gulp = require('gulp'),
paths = require('./paths.config.js');
// require gulp tasks from all gulp files
require('require-dir')('./gulp');
// watch for file changes and run linters.
gulp.task('watch', function () {
gulp.watch(paths.allTypeScript,... | Add gulp clean task to VS clean step. | Add gulp clean task to VS clean step.
| JavaScript | mpl-2.0 | os2kitos/kitos,os2kitos/kitos,os2kitos/kitos,miracle-as/kitos,miracle-as/kitos,miracle-as/kitos,os2kitos/kitos,miracle-as/kitos |
1fd11a2e1d7069090f68f5283b0a256dd962bc4b | gulpfile.js | gulpfile.js | const gulp = require('gulp');
const babel = require('gulp-babel');
const del = require('del');
const exec = require('child_process').exec;
const nodemon = require('gulp-nodemon');
const flow = require('gulp-flowtype');
const paths = {
allSrcJs: 'src/**/*.js',
libDir: 'lib',
};
gulp.task('clean', () => {
return ... | const gulp = require('gulp');
const babel = require('gulp-babel');
const del = require('del');
const exec = require('child_process').exec;
const nodemon = require('gulp-nodemon');
const flow = require('gulp-flowtype');
const paths = {
allSrcJs: 'src/**/*.js',
libDir: 'lib',
};
gulp.task('clean', () => {
return ... | Format : change tabs to spaces | Format : change tabs to spaces
| JavaScript | agpl-3.0 | Tydax/crispy-magic-api |
f964b185c3809b0ea4503f4665335b820cc458a2 | gulpfile.js | gulpfile.js | 'use strict'
const paths = require('./config/paths.json')
const gulp = require('gulp')
const cssnano = require('gulp-cssnano')
const del = require('del')
const rename = require('gulp-rename')
const sass = require('gulp-sass')
// Clean task ----------------------------
// Deletes the /public directory
// -------------... | 'use strict'
const paths = require('./config/paths.json')
const gulp = require('gulp')
const cssnano = require('gulp-cssnano')
const del = require('del')
const rename = require('gulp-rename')
const sass = require('gulp-sass')
// Clean task ----------------------------
// Deletes the /public directory
// -------------... | Add an Images build task | Add an Images build task
Copies images from assets/ to /public/images
| JavaScript | mit | alphagov/govuk_elements,alphagov/govuk_elements,alphagov/govuk_elements,alphagov/govuk_elements |
f5d5b9af3af1b8272b94780799c853a9eba19ce8 | lib/rules/extends-before-declarations.js | lib/rules/extends-before-declarations.js | 'use strict';
var helpers = require('../helpers');
module.exports = {
'name': 'extends-before-declarations',
'defaults': {},
'detect': function (ast, parser) {
var result = [],
error;
ast.traverseByType('block', function (block) {
var lastDeclaration = null;
block.forEach(function ... | 'use strict';
var helpers = require('../helpers');
module.exports = {
'name': 'extends-before-declarations',
'defaults': {},
'detect': function (ast, parser) {
var result = [],
error;
ast.traverseByType('block', function (block) {
var lastDeclaration = null;
block.forEach(function ... | Refactor & remove workaround for extends-before-declaration rule | :art: Refactor & remove workaround for extends-before-declaration rule
| JavaScript | mit | srowhani/sass-lint,sasstools/sass-lint,bgriffith/sass-lint,sktt/sass-lint,sasstools/sass-lint,srowhani/sass-lint,DanPurdy/sass-lint,flacerdk/sass-lint |
bd387a2d24a69cec7c05544af78648ff4bc9a6bd | step-01/js/main.js | step-01/js/main.js | 'use strict';
// On this codelab, you will be streaming only video (video: true).
const mediaStreamConstraints = {
video: true,
};
// Video element where stream will be placed.
const localVideo = document.querySelector('video');
// Handles success by adding the MediaStream to the video element.
function gotLocalMe... | 'use strict';
// On this codelab, you will be streaming only video (video: true).
const mediaStreamConstraints = {
video: true,
};
// Video element where stream will be placed.
const localVideo = document.querySelector('video');
// Local stream that will be reproduced on the video.
let localStream;
// Handles suc... | Make localStream visible on step-01 | Make localStream visible on step-01
| JavaScript | apache-2.0 | googlecodelabs/webrtc-web,googlecodelabs/webrtc-web |
e5faae40bda1ddcc9f0bfcec3b30f64b42c56bfc | public/javascripts/timezone.js | public/javascripts/timezone.js | //= require moment
//= require_self
noosfero.timezone = {
setCookie: function() {
var offset = moment.parseZone(Date.now()).utcOffset()/60
$.cookie("browser.tzoffset", offset, { expires: 30, path: '/' })
},
}
$(document).ready(function() {
noosfero.timezone.setCookie()
})
| //= require_self
noosfero.timezone = {
setCookie: function() {
var offset = - new Date().getTimezoneOffset()/60
$.cookie("browser.tzoffset", offset, { expires: 30, path: '/' })
},
}
$(document).ready(function() {
noosfero.timezone.setCookie()
})
| Use new Date().getTimezoneOffset() instead of moment | Use new Date().getTimezoneOffset() instead of moment
| JavaScript | agpl-3.0 | coletivoEITA/noosfero-ecosol,coletivoEITA/noosfero-ecosol,samasti/noosfero,EcoAlternative/noosfero-ecosol,samasti/noosfero,EcoAlternative/noosfero-ecosol,blogoosfero/noosfero,coletivoEITA/noosfero-ecosol,samasti/noosfero,CIRANDAS/noosfero-ecosol,blogoosfero/noosfero,blogoosfero/noosfero,blogoosfero/noosfero,EcoAlternat... |
e73d0497851211bbf4ee1ba2b223c4faf81f5021 | src/js/plugins/google.js | src/js/plugins/google.js | "use strict";
var $ = require("jquery");
var Plugin = require("../modules/Plugin");
var Utils = require("../modules/Utilities");
var google = Object.create(Plugin);
google.init("google", "Google Play");
google.test = function () {
return (/play\.google\.[A-Z\.]{2,}\/music\/listen/i).test(document.location.... | "use strict";
var $ = require("jquery");
var Plugin = require("../modules/Plugin");
var Utils = require("../modules/Utilities");
var google = Object.create(Plugin);
google.init("google", "Google Play");
google.test = function () {
return (/play\.google\.[A-Z\.]{2,}\/music\/listen/i).test(document.location.... | Update selectors to match to Google Music UI | Update selectors to match to Google Music UI
| JavaScript | mit | mziyut/scroblr,nsue/scroblr,Amir-Saeed/scroblr,Nicholi/scroblr,cgravolet/scroblr,Amir-Saeed/scroblr,mziyut/scroblr,nwalker/scroblr,nsue/scroblr,bdukes/scroblr,Nicholi/scroblr,m9x/np2file,m9x/np2file,cgravolet/scroblr,bdukes/scroblr,nwalker/scroblr |
e25b3aac43b13ac6af3f10b3198a6dee0db3c6bc | public/app/ui/pages/search/library/resultFields.js | public/app/ui/pages/search/library/resultFields.js | (function () {
'use strict';
define(function () {
return [
{
key: 'Title',
labelText: 'Title'
},
{
key: 'Author',
labelText: 'Author',
displayValue: function (value) {
... | (function () {
'use strict';
define(function () {
return [
{
key: 'Title',
labelText: 'Title'
},
{
key: 'Author',
labelText: 'Author',
displayValue: function (value) {
... | Add formatting for date value. | Add formatting for date value.
| JavaScript | mit | rwahs/research-frontend,rwahs/research-frontend |
f58fc5bc0b9d7b19f0813df25f0df6138fb8d17d | packages/core/lib/commands/db/commands/serve.js | packages/core/lib/commands/db/commands/serve.js | const command = {
command: "serve",
description: "Start Truffle's GraphQL UI playground",
builder: {},
help: {
usage: "truffle db serve",
options: []
},
/* This command does starts an express derived server that invokes
* `process.exit()` on SIGINT. As a result there is no need to invoke
* tr... | const command = {
command: "serve",
description: "Start Truffle's GraphQL UI playground",
builder: {},
help: {
usage: "truffle db serve",
options: []
},
/* This command does starts an express derived server that invokes
* `process.exit()` on SIGINT. As a result there is no need to invoke
* tr... | Handle empty path to configuration | Handle empty path to configuration
default to PORT = 4444 if `config.db.PORT` is not a valid path
| JavaScript | mit | ConsenSys/truffle |
da2d3144e918a1c2d2a061201f27848fe6e43665 | ui/view-preview.js | ui/view-preview.js | "use strict";
(function () {
$(function () {
});
views.preview = {
openPath: openPath,
closePath: closePath
};
function openPath (path) {
var file = new ProjectFile("index.html");
file.download(function (file) {
var content = file.body;
// IE uses contentWindow.document
var iframe = document.getElementB... | "use strict";
(function () {
$(function () {
});
views.preview = {
openPath: openPath,
closePath: closePath
};
function openPath (path) {
var file = new ProjectFile("index.html");
file.download(function (file) {
var content = file.body,
contentL = content.toLowerCase(),
headStart = contentL.indexOf('<h... | Use <base> for relative URLs in preview | Use <base> for relative URLs in preview
| JavaScript | mit | editinsite/editinsite,editinsite/editinsite,editinsite/editinsite,editinsite/editinsite |
5abff92df9e9e88b44d367c45ea23e26ac6e3603 | pg/factory.js | pg/factory.js | 'use strict';
const _ = require('lodash');
const pg = require('pg');
function transaction(client) {
return {
commit() {
return client.query('COMMIT;').then(() => {
client.release();
}).catch((err) => {
return this.rollback().then(() => {
throw err;
});
});
... | 'use strict';
const pg = require('pg');
function transaction(client) {
return {
commit() {
return client.query('COMMIT;').then(() => {
client.release();
}).catch((err) => this.rollback().then(() => {
throw err;
}));
},
rollback() {
return client.query('ROLLBACK;'... | Enable ending pg pool, and some tidying | Enable ending pg pool, and some tidying
| JavaScript | mit | thebitmill/midwest |
1be45aae06edd106d4bbe6d37a033bfe404d06e8 | app/js/arethusa.core/notifier_ctrl.js | app/js/arethusa.core/notifier_ctrl.js | 'use strict';
angular.module('arethusa.core').controller('NotifierCtrl', [
'$scope',
'notifier',
function ($scope, notifier) {
$scope.$watch('notifier.messages', function (newVal, oldVal) {
$scope.lastMessage = notifier.lastMessage();
$scope.oldMessages = notifier.oldMessages();
});
}
]);
| 'use strict';
angular.module('arethusa.core').controller('NotifierCtrl', [
'$scope',
'notifier',
function ($scope, notifier) {
$scope.messages = notifier.messages;
$scope.$watchCollection('messages', function (newVal, oldVal) {
$scope.lastMessage = notifier.lastMessage();
$scope.oldMessages = ... | Fix message watching in NotifierCtrl | Fix message watching in NotifierCtrl
| JavaScript | mit | Masoumeh/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,alpheios-project/arethusa |
0659f89be849a7e692dfde63d15b2661428a150b | function.js | function.js | 'use strict';
var value = require('es5-ext/object/valid-value')
, esniff = require('./')
, next = esniff.next
, resume = esniff.resume
, collectNest = esniff.collectNest;
module.exports = function (name) {
var l, names;
name = String(value(name));
names = name.split('.').map(function (prop) {
prop = pr... | 'use strict';
var value = require('es5-ext/object/valid-value')
, esniff = require('./')
, next = esniff.next
, resume = esniff.resume
, collectNest = esniff.collectNest;
module.exports = function (name/*, options*/) {
var l, names, options = Object(arguments[1]), asProperty = false, asPlain = true;
name ... | Add `asProperty` and `asPlain` options | Add `asProperty` and `asPlain` options
| JavaScript | mit | medikoo/esniff |
2985e25173d43527170dd312c4a2b7d2ae378415 | chrome/browser/resources/history/history_focus_manager.js | chrome/browser/resources/history/history_focus_manager.js | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var FocusManager = cr.ui.FocusManager;
/**
* A history-specific FocusManager implementation, which ensures that elements
* "background" pages (i.e., th... | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var FocusManager = cr.ui.FocusManager;
/**
* A history-specific FocusManager implementation, which ensures that elements
* "background" pages (i.e., th... | Fix problem with space bar not causing the menu to appear. | History: Fix problem with space bar not causing the menu to appear.
When a history entry's dropdown menu is focused, hitting the space
bar should cause the menu to appear.
BUG=268334
Review URL: https://chromiumcodereview.appspot.com/22464009
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@216677 0039d316-1c4b... | JavaScript | bsd-3-clause | Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,chuan9/chromium-crosswalk,littlstar/chromium.src... |
995c155439b8ddf7b1704be764260fb9a5d5c62a | ember-cli-build.js | ember-cli-build.js | /*jshint node:true*/
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
var StripTestSelectorsTransform = require('./strip-test-selectors');
module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
// Add options here
});
// add the StripTestSelect... | /*jshint node:true*/
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
var StripTestSelectorsTransform = require('./strip-test-selectors');
module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
'ember-test-selectors': {
environments: ['test']
... | Fix tests. Test selectors were not marked to be removed in test, breaking the build. | Fix tests.
Test selectors were not marked to be removed in test, breaking the
build.
| JavaScript | mit | simplabs/ember-test-selectors,simplabs/ember-test-selectors |
c36bbbc973bb52c6006d035f3a1dbda53d8d3353 | gulpfile.js | gulpfile.js | /*globals require, __dirname */
/* jshint node:true */
'use strict';
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var karma = require('karma').server;
var bump = require('gulp-bump');
var plato = require('gulp-plato');
var karmaConfig = __dirname + '/karma.conf.js';
var paths = require('./paths');
... | /*globals require, __dirname */
/* jshint node:true */
'use strict';
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var karma = require('karma').server;
var plato = require('gulp-plato');
var karmaConfig = __dirname + '/karma.conf.js';
var paths = require('./paths');
gulp.task('complexity', function... | Remove bump task from gulp file | Remove bump task from gulp file
| JavaScript | mit | rcrodrigues/angular-bootstrap-datetimepicker,hliu0615/angular-bootstrap-datetimepicker,Vivify-Ideas/angular-bootstrap-datetimepicker,dalelotts/angular-bootstrap-datetimepicker,marvinlee/angular-bootstrap-datetimepicker,Vivify-Ideas/angular-bootstrap-datetimepicker,rcrodrigues/angular-bootstrap-datetimepicker,asabirov/a... |
f72a4e12774853164effa322aa237f6e23f2841a | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var gutil = require('gulp-util');
var exec = require('gulp-exec');
var less = require('gulp-less');
var minifycss = require('gulp-minify-css');
//var jshint = require('gulp-jshint');
var uglify = require('gulp-uglify');
//var imagemin = require('gulp-imagemin');
var rename = require('gulp-r... | var gulp = require('gulp');
var gutil = require('gulp-util');
var exec = require('gulp-exec');
var less = require('gulp-less');
var minifycss = require('gulp-minify-css');
//var jshint = require('gulp-jshint');
var uglify = require('gulp-uglify');
//var imagemin = require('gulp-imagemin');
var rename = require('gulp-r... | Copy only required files to bower dist | build: Copy only required files to bower dist
* Prevents the images from being copied also.
| JavaScript | mit | sillsdev/web-ng-typeahead |
e8c4efaa86cf981891d81236c29609e7eb064044 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var babel = require('gulp-babel');
var del = require('del');
var eslint = require('gulp-eslint');
// CONSTANTS =======================================================================
// TASKS ======================================================================
gulp.task('default', ['buil... | var gulp = require('gulp');
var babel = require('gulp-babel');
var del = require('del');
var eslint = require('gulp-eslint');
// CONSTANTS =======================================================================
// TASKS ======================================================================
gulp.task('default', ['buil... | Change build taskname to 'build' | Change build taskname to 'build'
| JavaScript | mit | kwangkim/material-design-react,nikvm/material-design-react,nikvm/material-design-react,kwangkim/material-design-react |
55ae7cb284cff36255fc70f288f5f9e6f0d52c3d | htteepee.js | htteepee.js | /*globals module, require*/
var stack = require('stack'),
http = require('http'),
_hs = http.createServer;
http.createServer = function createServer () {
'use strict';
return _hs.call(http,
stack.apply(stack, Array.prototype.slice.call(arguments))
);
};
http.createMiddlewareServer = funct... | /*globals module, require*/
var stack = require('stack'),
http = require('http'),
_hs = http.createServer;
http.createServer = function createServer () {
'use strict';
return _hs.call(http,
stack.apply(stack, Array.prototype.slice.call(arguments))
);
};
http.createMiddlewareServer = funct... | Support one-level nesting of arrays to createMiddlewareServer | Support one-level nesting of arrays to createMiddlewareServer
| JavaScript | mit | brettz9/htteepee |
ff332643b24cf794bef5c083e361ac679c63f54e | stubs/mix/tasks/build.js | stubs/mix/tasks/build.js | let argv = require('yargs').argv;
let bin = require('./bin');
let command = require('node-cmd');
let AfterWebpack = require('on-build-webpack');
let BrowserSync = require('browser-sync');
let BrowserSyncPlugin = require('browser-sync-webpack-plugin');
let Watch = require('webpack-watch');
let browserSyncInstance;
let... | let argv = require('yargs').argv;
let bin = require('./bin');
let command = require('node-cmd');
let AfterWebpack = require('on-build-webpack');
let BrowserSync = require('browser-sync');
let BrowserSyncPlugin = require('browser-sync-webpack-plugin');
let Watch = require('webpack-watch');
let browserSyncInstance;
let... | Remove `files` key from BrowserSync config, to prevent double reload | Remove `files` key from BrowserSync config, to prevent double reload
| JavaScript | mit | tightenco/jigsaw,tightenco/jigsaw,adamwathan/jigsaw,tightenco/jigsaw,adamwathan/jigsaw |
732be4f0f7105366e03dc8e5081b53e0b3950a6b | api/index.js | api/index.js | import config from './src/constants.js';
import Map from './src/Map.js';
config.themesUrl = 'https://geomapfish-demo-2-4.camptocamp.com/themes?version=2&background=background';
const lib = {
Map
};
export default lib;
| import config from './src/constants.js';
import Map from './src/Map.js';
config.themesUrl = 'https://geomapfish-demo-2-4.camptocamp.com/themes?' +
'version=2&background=background&interface=api';
const lib = {
Map
};
export default lib;
| Use the interface api for the api | Use the interface api for the api
| JavaScript | mit | camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo |
aa7bc9eeb3511f3e62d8a908a80b604ca76948da | frontend/components/app.js | frontend/components/app.js | import React from 'react';
import Board from './board';
const App = () => {
return (
<div>
<h1>hello</h1>
<Board />
</div>
);
};
export default App;
| import React from 'react';
import Board from '../containers/board';
const App = () => {
return (
<div>
<h1>hello</h1>
<Board />
</div>
);
};
export default App;
| Fix import path of board. | Fix import path of board.
| JavaScript | mit | mgi166/usi-front,mgi166/usi-front |
81978aa1ff1f7f0dcbb959fd0ca0a7ef6d658c3f | vendor/assets/javascripts/vendor_application.js | vendor/assets/javascripts/vendor_application.js | //= require jquery
//= require jquery_ujs
//= require turbolinks
//= require foundation
//= require ace/ace
//= require ace/mode-ruby
//= require ace/mode-golang
//= require ace/mode-python
//= require ace/mode-c_cpp
//= require ace/mode-csharp
//= require ace/mode-php
//= require ace/worker-php
//= require ace/them... | //= require jquery
//= require jquery_ujs
//= require turbolinks
//= require foundation
//= require ace/ace
//= require ace/mode-ruby
//= require ace/mode-golang
//= require ace/mode-python
//= require ace/mode-c_cpp
//= require ace/mode-csharp
//= require ace/mode-php
//= require ace/theme-tomorrow_night
//= require... | Revert "add missing worker-php for ace editor" | Revert "add missing worker-php for ace editor"
| JavaScript | mit | tamzi/grounds.io,tamzi/grounds.io,grounds/grounds.io,foliea/grounds.io,grounds/grounds.io,tamzi/grounds.io,grounds/grounds.io,grounds/grounds.io,tamzi/grounds.io,foliea/grounds.io,foliea/grounds.io,foliea/grounds.io |
3d3713afc165b57618d4b945b39120ca201d8a13 | test/store/main.spec.js | test/store/main.spec.js | import { expect } from 'chai'
import store from '../../src/store'
import {
TOGGLE_SIDEBAR,
TOGGLE_USER_MENU
} from '../../src/store/mutation-types'
describe('main', () => {
describe('actions', () => {
it('toggleSidebar', () => {
store._actions.toggleSidebar[0]({
commit: store.commit,
... | import { expect } from 'chai'
import helpers from './helpers'
import store from '../../src/store'
import {
TOGGLE_SIDEBAR,
TOGGLE_USER_MENU
} from '../../src/store/mutation-types'
describe('main', () => {
beforeEach(helpers.reset)
afterEach(helpers.reset)
describe('actions', () => {
it('toggleSidebar... | Fix tests for menu toggling | Fix tests for menu toggling
| JavaScript | agpl-3.0 | cgwire/kitsu,cgwire/kitsu |
40bafeddb7d7085005eb46ac198b51ae9c6f0279 | src/scripts/minify-json/one-file.js | src/scripts/minify-json/one-file.js | import fs from 'fs';
import path from 'path';
import promisify from 'es6-promisify';
import {
InvalidFile,
InvalidJsonString
} from './errors';
export function convertOneFile(fileName, destFileName) {
const fileReadPromise = promisify(fs.readFile);
const fileWritePromise = promisify(fs.writeFile);
return fil... | import fs from 'fs';
import path from 'path';
import promisify from 'es6-promisify';
import {
InvalidFile,
InvalidJsonString
} from './errors';
export function convertOneFile(fileName, destFileName) {
const fileReadPromise = promisify(fs.readFile);
const fileWritePromise = promisify(fs.writeFile);
const r... | Refactor the one file converter. | Refactor the one file converter.
| JavaScript | mit | cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki |
cc4915d18bd8ab54b5421c45aa4764208737be67 | app/javascript/components/FlightProfiles/Tagbar/elements.js | app/javascript/components/FlightProfiles/Tagbar/elements.js | import styled from 'styled-components'
export const Container = styled.div`
padding: 0 1rem 0 2rem;
overflow-y: hidden;
`
export const TagList = styled.ul`
background-color: #fff;
display: flex;
padding: 0 0 2rem;
margin: 0;
overflow-x: auto;
> :not(:last-child) {
margin-right: 0.5rem;
}
`
exp... | import styled from 'styled-components'
export const Container = styled.div`
padding: 0 1rem 0 2rem;
overflow-y: hidden;
`
export const TagList = styled.ul`
background-color: #fff;
display: flex;
padding: 0 0 2rem;
margin: 0;
overflow-x: auto;
> :not(:last-child) {
margin-right: 0.5rem;
}
`
exp... | Improve tag styling in flight profiles | Improve tag styling in flight profiles
| JavaScript | agpl-3.0 | skyderby/skyderby,skyderby/skyderby,skyderby/skyderby,skyderby/skyderby,skyderby/skyderby |
f8fb677b68020b67b215788f7c08b1c644e2f22b | app/assets/javascripts/launch-countdown.js | app/assets/javascripts/launch-countdown.js | $(document).ready(function() {
$('.date').each(function() {
var _this = $(this)
countdown(Date.parse($(this).data('launch-date')), function(ts) {
_this.html(ts.toHTML());
}, countdown.YEARS | countdown.MONTHS | countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS);
});
... | $(document).ready(function() {
$('.date').each(function() {
var _this = $(this)
launchDate = Date.parse($(this).data('launch-date'));
if(launchDate && launchDate > Date.today()) {
countdown(launchDate, function(ts) {
_this.html(ts.toHTML());
}, countdown.YEARS | countdown.MONTHS... | Remove countdownjs (countup) from dates in the past | Remove countdownjs (countup) from dates in the past
| JavaScript | mit | Green-Squad/Release-DB,Green-Squad/Release-DB,Green-Squad/Release-DB |
1e48eae27f8403f6b9c99fd7ef7a653f8930bf25 | applications/vpn-settings/src/app/components/layout/PrivateHeader.js | applications/vpn-settings/src/app/components/layout/PrivateHeader.js | import React from 'react';
import { MainLogo, SupportDropdown, UserDropdown } from 'react-components';
import { APPS } from 'proton-shared/lib/constants';
const PrivateHeader = () => {
return (
<header className="header flex flex-nowrap reset4print">
<MainLogo currentApp={APPS.PROTONVPN_SETTING... | import React from 'react';
import { MainLogo, SupportDropdown, UserDropdown } from 'react-components';
import { APPS } from 'proton-shared/lib/constants';
const { PROTONVPN_SETTINGS } = APPS;
const PrivateHeader = () => {
return (
<header className="header flex flex-nowrap reset4print">
<MainL... | Use currentApp on header components | Use currentApp on header components
| JavaScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient |
072d0dcf65404d465835b83b1d6a34be2e6b76ea | bin/build.js | bin/build.js | var request = require('request'),
fs = require('fs'),
path = require('path'),
exec = require('child_process').exec,
version = require('../package.json').version;
var urlStub = 'http://code.angularjs.org/',
files = ['/angular.min.js', '/angular.min.js.map'];
function getFile (index) {
var file = files[index],
... | var request = require('request'),
fs = require('fs'),
path = require('path'),
exec = require('child_process').exec,
version = require('../package.json').version;
var urlStub = 'http://code.angularjs.org/',
files = ['/angular.min.js', '/angular.min.js.map'];
function getFile (index) {
var file = files[index],
... | Make sure commit finishes before tagging | Make sure commit finishes before tagging | JavaScript | mit | jutaz/angular,bclinkinbeard/angular,jstacoder/angular |
e3069db9f87c97ec9bce712aebc14fcfa1e9b21c | server/app.js | server/app.js | var express = require('express');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io').listen(server);
//var models = require("./models");
var PORT = process.env.PORT || 3000;
// app.get('/', function (req, res) {
// res.sendFile(__dirname + '/socketTest.html');
// }... | var express = require('express');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io').listen(server);
//var models = require("./models");
var PORT = process.env.PORT || 3000;
//models.sequelize.sync().then(function () {
io.on('connection', function(client) {
co... | Delete zombie code from socket testing | Delete zombie code from socket testing
| JavaScript | mit | Jakeyrob/thumbroll,shanemcgraw/thumbroll,Jakeyrob/thumbroll,Jakeyrob/thumbroll,shanemcgraw/thumbroll,absurdSquid/thumbroll,shanemcgraw/thumbroll,absurdSquid/thumbroll |
0796e12aa5ca0825566f3df51d7d0f244b8ab043 | js/index.js | js/index.js | function changeTitle () {
var subject = document.getElementById('mail_subject').value;
if ((subject == null) || (subject == "")) {
document.title = "SendMail";
document.getElementById('message_title').innerHTML = "New Message";
}
else {
document.title = "SendMail - " + subject;
document.getElementById('me... | function changeTitle () {
var subject = document.getElementById('mail_subject').value;
if ((subject == null) || (subject == "")) {
document.title = "SendMail";
document.getElementById('message_title').innerHTML = "New Message";
}
else {
document.title = "SendMail - " + subject;
document.getElementById('me... | Check if signature is blank before adding to message | Check if signature is blank before adding to message
If the signature is blank, then nothing should be added to the message.
| JavaScript | mit | virajchitnis/SendMail,virajchitnis/SendMail |
3184cc30ddca764973e772aaffed7429865fbef9 | src/index.js | src/index.js | const http = require('http');
const jsdom = require('jsdom');
const jQuery = require('jquery');
const Router = require('./router/index');
const body = require('./body/index');
/**
* The jQuerate Class
*
* Patches the emitter and listen handler
* to allow max jQuery gainz
*/
class Yttrium {
constructor(options) ... | const http = require('http');
const jsdom = require('jsdom');
const jQuery = require('jquery');
const Router = require('./router/index');
const body = require('./body/index');
/**
* The jQuerate Class
*
* Patches the emitter and listen handler
* to allow max jQuery gainz
*/
class Yttrium {
constructor(options) ... | Remove unnecessary IIFE from Y class | Remove unnecessary IIFE from Y class
| JavaScript | mit | YttriumJS/yttrium-server |
fa73e10c853be6c16cf284efdcc6d515ce66480f | js/level.js | js/level.js | function Level(game, level) {
this.game = game;
this.level = level;
this.interval = undefined;
this.period = 4;
this.intervalTime = 10;
this.velocity = 2 * Math.PI / (1000 * this.period);
this.game.setRemaining(level);
var me = this;
this.game.board.on('click', function() {
if (me.interval) {
me.clicked... | function Level(game, level) {
this.game = game;
this.remaining = level;
this.interval = undefined;
this.period = 4;
this.intervalTime = 10;
this.velocity = 2 * Math.PI / (1000 * this.period);
this.forward = true;
this.game.setRemaining(level);
var me = this;
this.game.board.on('click', function() {
if (me... | Change direction on game click | Change direction on game click
| JavaScript | mit | TheConnMan/lock,TheConnMan/lock |
971384b05134094913a0ad07c47d6783dd4b5208 | src/book.js | src/book.js | /*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2021 Niels Basjes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless... | /*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2021 Niels Basjes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless... | Disable sitemap plugin for website as it does not work anymore | Disable sitemap plugin for website as it does not work anymore
| JavaScript | apache-2.0 | nielsbasjes/yauaa,nielsbasjes/yauaa,nielsbasjes/yauaa,nielsbasjes/yauaa |
9fb3d6911a0f9d792ba040d5ce7cc8d65f13bd89 | app/util/os.js | app/util/os.js |
let spawn = require('./spawn')
let self = {
platform: function () {
return process.platform
},
arch: function () {
return process.arch
},
process_type: function () {
return process.type || 'browser'
},
get_version: function (key) {
return process.versions[key]
},
/**
* Get pla... |
let spawn = require('./spawn')
let self = {
platform: function () {
return process.platform
},
arch: function () {
return process.arch
},
process_type: function () {
return process.type || 'browser'
},
get_version: function (key) {
return process.versions[key]
},
/**
* Get pla... | Fix version parsing of file(1) | :checkered_flag: Fix version parsing of file(1)
| JavaScript | mit | itchio/itchio-app,itchio/itch,leafo/itchio-app,itchio/itch,itchio/itch,itchio/itch,leafo/itchio-app,leafo/itchio-app,itchio/itch,itchio/itchio-app,itchio/itchio-app,itchio/itch |
58ca4c87a6799af4bcb2cfca237f6cd6dc45ecb9 | lib/node_modules/@stdlib/streams/utils/split/lib/decode.js | lib/node_modules/@stdlib/streams/utils/split/lib/decode.js | 'use strict';
// MODULES //
var fromString = require( '@stdlib/buffer/from-string' );
// MAIN //
/**
* Re-decodes a UTF-8 string according to a specified encoding.
*
* @private
* @param {string} str - UTF-8 string to decode
* @param {string} enc - string encoding
* @returns {string} decoded string
*/
function deco... | 'use strict';
// MODULES //
var fromString = require( '@stdlib/buffer/from-string' );
// MAIN //
/**
* Re-decodes a UTF-8 string according to a specified encoding.
*
* @private
* @param {string} str - UTF-8 string to decode
* @param {string} enc - string encoding
* @returns {string} decoded string
*/
function deco... | Fix bug when encoding is `null` | Fix bug when encoding is `null`
| JavaScript | apache-2.0 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib |
2c39d10deda745ef61bb5c09d779d7c5a476fb0e | app/app.js | app/app.js | (function(){
var newsFeedApp = angular.module('newsFeedApp', []);
newsFeedApp.controller('NewsController', ['$http', function($http) {
var newsController = this;
newsController.newsFeed = [];
$http.get('newsFeed.json').success(function(news){
newsController.newsFeed = news;
});
}]);
... | (function(){
var newsFeedApp = angular.module('newsFeedApp', []);
newsFeedApp.controller('NewsController', ['$scope', '$http', function($scope, $http) {
$scope.newsFeed = [];
$http.get('newsFeed.json').success(function(news){
$scope.newsFeed = news;
});
}]);
})();
| Add to controller and code clean up | Add to controller and code clean up
| JavaScript | mit | juanlizarazo/news-feed--angularjs |
2e15806ec3353742a8ca541f72a606ec46ce3efd | src/core.js | src/core.js | const Bulma = {
/**
* Current BulmaJS version.
* @type {String}
*/
VERSION: '0.3.0',
/**
* Helper method to create a new plugin.
* @param {String} key
* @param {Object} options
* @return {Object}
*/
create(key, options) {
if(!key || !Bulma.hasOwnPropert... | const Bulma = {
/**
* Current BulmaJS version.
* @type {String}
*/
VERSION: '0.3.0',
/**
* Helper method to create a new plugin.
* @param {String} key
* @param {Object} options
* @return {Object}
*/
create(key, options) {
if(!key || !Bulma.hasOwnPropert... | Add comment to traverseDOM function | Add comment to traverseDOM function
| JavaScript | mit | VizuaaLOG/BulmaJS,VizuaaLOG/BulmaJS |
6d7044bf2ad6b541d3d41ab13f3b072d190f877a | src/clincoded/static/inline.js | src/clincoded/static/inline.js | 'use strict';
// Minimal inline IE8 html5 compatibility
require('shivie8');
// Read and clear stats cookie
var cookie = require('cookie-monster')(document);
window.stats_cookie = cookie.get('X-Stats') || '';
cookie.set('X-Stats', '', {path: '/', expires: new Date(0)});
// Use a separate tracker for dev / test
var ga... | 'use strict';
// Minimal inline IE8 html5 compatibility
require('shivie8');
// Read and clear stats cookie
var cookie = require('cookie-monster')(document);
window.stats_cookie = cookie.get('X-Stats') || '';
cookie.set('X-Stats', '', {path: '/', expires: new Date(0)});
// Use a separate tracker for dev / test
var ga... | Update to use ClinGen curation app and test curation app Google Analytics codes | Update to use ClinGen curation app and test curation app Google Analytics codes
| JavaScript | mit | ClinGen/clincoded,philiptzou/clincoded,ClinGen/clincoded,philiptzou/clincoded,philiptzou/clincoded,philiptzou/clincoded,ClinGen/clincoded,philiptzou/clincoded,ClinGen/clincoded,ClinGen/clincoded |
041fba5b7144033d16c2515e949e284fa750ea51 | test/reactive-event-stream-added.js | test/reactive-event-stream-added.js | var test = require('tape');
var connections = require('./helpers/connect-reactive')(test, 'stream:added tests');
var media = require('rtc-media');
var localStream;
require('cog/logger').enable('rtc-quickconnect');
test('capture stream', function(t) {
t.plan(1);
media()
.on('error', t.ifError.bind(t))
.on... | var test = require('tape');
var connections = require('./helpers/connect-reactive')(test, '(reactive) stream:added tests');
var media = require('rtc-media');
var localStream;
require('cog/logger').enable('rtc-quickconnect');
test('capture stream', function(t) {
t.plan(1);
media()
.on('error', t.ifError.bind(... | Update prefix to include reactive info | Update prefix to include reactive info
| JavaScript | apache-2.0 | rtc-io/rtc-quickconnect,rtc-io/rtc-quickconnect |
9d1b4d7964f43660dc9e2a3e158aef75b44c8a6e | js/localstorage.js | js/localstorage.js | /*! Task Slayer | (c) 2014 Eric Mountain | https://github.com/EricMountain/TaskSlayer */
// LocalStorage layer
define(["angular"],
function() {
(function(window, angular, undefined) {
'use strict';
angular.module('localstorage', [])
.factory('localstorage', ['$ht... | /*! Task Slayer | (c) 2014 Eric Mountain | https://github.com/EricMountain/TaskSlayer */
// LocalStorage layer
define(["angular"],
function() {
(function(window, angular, undefined) {
'use strict';
angular.module('localstorage', [])
.factory('localstorage', ['$ht... | Fix very 1st startup when user has no data: there is no _rev to dereference. | Fix very 1st startup when user has no data: there is no _rev to dereference.
| JavaScript | mit | EricMountain/TaskSlayer,EricMountain/TaskSlayer |
2a80bb76493728ea2a2fdae1172eae202f2697fa | src/main.js | src/main.js | // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import Vueheatmap from './heatmap';
// import { debounce } from 'lodash';
import App from './App';
Vue.config.productionTip = false;
Vue.use(Vueheatmap, {
... | // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import { Subject } from 'rxjs';
import Vueheatmap from './heatmap';
// import { debounce } from 'lodash';
import App from './App';
const stream = new Subjec... | Update example, pass in stream to subscribe to locally. | Update example, pass in stream to subscribe to locally.
| JavaScript | mit | BrockReece/vue-heatmapjs,BrockReece/vue-heatmapjs |
6da7585d7aa5d4842906a9725283352a8eb7ecab | server/server.js | server/server.js | require('dotenv').config();
const bodyParser = require('body-parser');
const metadata = require('../package.json');
const compression = require('compression');
const express = require('express');
const path = require('path');
const port = process.env.NODE_PORT;
const secret = process.env.SESSION_SECRET;
// const red... | require('dotenv').config();
const bodyParser = require('body-parser');
const metadata = require('../package.json');
const compression = require('compression');
const express = require('express');
const path = require('path');
const port = process.env.NODE_PORT;
const secret = process.env.SESSION_SECRET;
// const red... | Add new routes for components and serve them up to client side | Add new routes for components and serve them up to client side
| JavaScript | mit | francoabaroa/happi,francoabaroa/happi |
9ad169a534261d4297679b9d7bbcc4f8aeafc514 | src/patchers/patchExistentialOperator.js | src/patchers/patchExistentialOperator.js | /**
* Replaces existential operators with a defined check.
*
* @param {Object} node
* @param {MagicString} patcher
*/
export default function patchExistentialOperator(node, patcher) {
if (node.type === 'UnaryExistsOp') {
const expression = node.expression;
const parens = needsParens(node);
if (expres... | /**
* Replaces existential operators with a defined check.
*
* @param {Object} node
* @param {MagicString} patcher
*/
export default function patchExistentialOperator(node, patcher) {
if (node.type === 'UnaryExistsOp') {
const expression = node.expression;
const parens = needsParens(node);
if (expres... | Correct the description of a helper function. | Correct the description of a helper function.
| JavaScript | mit | lunks/decaffeinate,eventualbuddha/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate,edi9999/decaffeinate,netei/decaffeinate,netei/decaffeinate,alangpierce/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate,lunks/decaffeinate,eventualbuddha/decaffeinate,greyhwndz/decaffeinate |
53574620883089a10fcdb15b0daa755450a3447e | src/Footer.js | src/Footer.js | import React from 'react';
import './scss/footer.scss';
const Footer = () => {
return (
<footer>
<p>© 2016 Michael Kohler - Data accurate from 2013 onwards, before some are missing..</p>
</footer>
);
};
export default Footer;
| import React from 'react';
import './scss/footer.scss';
const Footer = () => {
return (
<footer>
<p>Michael Kohler - Data accurate from 2013 onwards</p>
</footer>
);
};
export default Footer;
| Remove copyright and simplify text | Remove copyright and simplify text | JavaScript | mpl-2.0 | MichaelKohler/where,MichaelKohler/where |
74fb5aed8a831213e75f12f0844c7022af350f5b | src/Header.js | src/Header.js | !(function( global ) {
var Opera = function() {};
Opera.prototype.REVISION = '1';
Opera.prototype.version = function() {
return this.REVISION;
};
Opera.prototype.buildNumber = function() {
return this.REVISION;
};
Opera.prototype.postError = function( str ) {
console.log( str );
};
v... | !(function( global ) {
// NEX<->CRX support set up
var nexAPIStubs = ['app', 'extension', 'windows', 'tabs', 'browserAction', 'contextMenus', 'i18n', 'webRequest', ''];
if(!global.chrome) {
global.chrome = {};
}
for(var i = 0, l = nexAPIStubs.length; i < l; i++) {
global.chrome[ nexAPIStubs[ i ] ] ... | Add NEX navigator.* API support to the shim | Add NEX navigator.* API support to the shim
| JavaScript | mit | operasoftware/operaextensions.js,operasoftware/operaextensions.js,operasoftware/operaextensions.js |
9db081bf17cde6ed171fd628ec0ef2397b6ffe33 | lib/filters/flatedecode.js | lib/filters/flatedecode.js | "use strict";
var
pako = require('pako');
module.exports = function flateDecode(buffer) {
return String.fromCharCode.apply(null, pako.inflate(toArrayBuffer(buffer)));
};
// http://stackoverflow.com/a/12101012/778272
function toArrayBuffer(buffer) {
var ab = new ArrayBuffer(buffer.length);
var view = ... | "use strict";
var
pako = require('pako');
module.exports = function flateDecode(buffer) {
return pako.inflate(buffer, {to:'string'});
};
| Fix truncated result from pako | Fix truncated result from pako
I still don't know how to correctly call pako. Looks like it was truncating to 16k only if I passed a Uint8Array. Now I'm passing a Buffer and it works, although the docs don't tell anything about Buffers being passed as input.
| JavaScript | mit | luciopaiva/pdfhacker |
4506e8f03656f3c7afd03a1ce0485f49d21c8330 | js/examples/own-script.js | js/examples/own-script.js | $(document).ready(function() {
var settings = {
showForks: true,
extraDetails: "../responses/my-extra-details.json"
};
$("body").CMDResume("https://s3-ap-southeast-2.amazonaws.com/bbody/Details/details.json", "../responses/my-extra-details.json", settings);
}); | $(document).ready(function() {
var settings = {
showForks: true,
extraDetails: "../responses/my-extra-details.json"
};
$("body").CMDResume("https://s3-ap-southeast-2.amazonaws.com/bbody/Details/details.json", settings);
}); | Fix example code on Github Pages | :pencil: Fix example code on Github Pages
| JavaScript | mit | bbody/CMD-Resume,bbody/CMD-Resume |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.