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 |
|---|---|---|---|---|---|---|---|---|---|
72b517762e82d421e989f5c30b30c8f7ce18f013 | test/test.js | test/test.js | 'use strict';
var grunt = require('grunt');
/**
* Constructs a test case.
*
* @param {string} file The `package.json` file to be tested.
* @param {boolean} valid Flag indicating whether the test is
* expected to pass.
* @param {Array} [args] ... | 'use strict';
var grunt = require('grunt');
/**
* Constructs a test case.
*
* @param {string} file The `package.json` file to be tested.
* @param {boolean} valid Flag indicating whether the test is
* expected to pass.
* @param {Array} [args] ... | Use `ifError` assertion instead of `equal`. | Use `ifError` assertion instead of `equal`.
| JavaScript | mit | joshuaspence/grunt-npm-validate |
dda90c0bcf7f32e70d9143327bd8e0d91e5a6f00 | lib/index.js | lib/index.js | /**
* dubdrop compatible task for reading an image file and creating a thumbnail.
*
* @package thumbdrop
* @author drk <drk@diy.org>
*/
// readAsDataURL
/**
* Constructor
*/
function createThumbdrop (_callback) {
return function thumbdrop (file, callback) {
var reader = new FileReader();
r... | /**
* dubdrop compatible task for reading an image file and creating a thumbnail.
*
* @package thumbdrop
* @author drk <drk@diy.org>
*/
// readAsDataURL
/**
* Constructor
*/
function createThumbdrop (callback) {
return function thumbdrop (file) {
var reader = new FileReader();
reader.onloa... | Remove async handling to comply w/ dubdrop 0.0.3 | Remove async handling to comply w/ dubdrop 0.0.3
| JavaScript | mit | derekr/thumbdrop |
eaef0b0012eacbb4994345fd0f45e6e54e58e583 | lib/index.js | lib/index.js | 'use strict'
let consistentEnv
module.exports = function() {
if (!consistentEnv) {
consistentEnv = require('consistent-env')
}
return consistentEnv().PATH || ''
}
module.exports.async = function() {
if (!consistentEnv) {
consistentEnv = require('consistent-env')
}
return consistentEnv.async().the... | 'use strict'
let consistentEnv
module.exports = function() {
if (process.platform === 'win32') {
return process.env.PATH || process.env.Path
}
if (!consistentEnv) {
consistentEnv = require('consistent-env')
}
return consistentEnv().PATH || ''
}
module.exports.async = function() {
if (process.plat... | Handle different names of PATH on windows | :bug: Handle different names of PATH on windows
| JavaScript | mit | steelbrain/consistent-path |
43fbb8eddf92a3e6b0fd7125b8e91537f6d21445 | lib/index.js | lib/index.js | var createJob = require('./createJob');
module.exports = function (sails) {
return {
jobs: {},
defaults: {cron: {}},
initialize: function (cb) {
var config = sails.config.cron;
var tasks = Object.keys(config);
tasks.forEach(function (time) {
this.jobs[time] = createJob({
... | var createJob = require('./createJob');
module.exports = function (sails) {
return {
jobs: {},
defaults: {cron: {}},
initialize: function (cb) {
var config = sails.config.cron;
var tasks = Object.keys(config);
tasks.forEach(function (name) {
this.jobs[name] = createJob({
... | Replace schedule as a key with named job | Replace schedule as a key with named job
| JavaScript | mit | ghaiklor/sails-hook-cron |
ba17d882e72582d5396fa3a3dfb6292656f63b30 | lib/index.js | lib/index.js | 'use strict';
// VARIABLES //
var FLOAT32_VIEW = new Float32Array( 1 );
var UINT32_VIEW = new Uint32Array( FLOAT32_VIEW.buffer );
// 0 11111111 00000000000000000000000 => 2139095040 => 0x7f800000
var PINF = 0x7f800000;
// Set the ArrayBuffer bit sequence:
UINT32_VIEW[ 0 ] = PINF;
// EXPORTS //
module.exports = F... | 'use strict';
// VARIABLES //
var FLOAT32_VIEW = new Float32Array( 1 );
var UINT32_VIEW = new Uint32Array( FLOAT32_VIEW.buffer );
// 0 11111111 00000000000000000000000 => 2139095040 => 0x7f800000 (see IEEE 754-2008)
var PINF = 0x7f800000;
// Set the ArrayBuffer bit sequence:
UINT32_VIEW[ 0 ] = PINF;
// EXPORTS //... | Add code comment re: IEEE 754-2008 | Add code comment re: IEEE 754-2008
| JavaScript | mit | const-io/pinf-float32 |
edca7f5559e256606c7bc4ece9ffcf1f845c8ee7 | src/c/big-input-card.js | src/c/big-input-card.js | import m from 'mithril';
const bigInputCard = {
view(ctrl, args) {
const cardClass = '.w-row.u-marginbottom-30.card.card-terciary.padding-redactor-description.text.optional.project_about_html.field_with_hint';
return m(cardClass, [
m('div', [
m('label.field-label.fontwe... | import m from 'mithril';
const bigInputCard = {
view(ctrl, args) {
const cardClass = args.cardClass || '.w-row.u-marginbottom-30.card.card-terciary.padding-redactor-description.text.optional.project_about_html.field_with_hint';
return m(cardClass, {style: (args.cardStyle||{})}, [
m('di... | Adjust bigInputCard to receive a cardStyle and cardClass args | Adjust bigInputCard to receive a cardStyle and cardClass args
| JavaScript | mit | catarse/catarse_admin,vicnicius/catarse_admin,vicnicius/catarse.js,mikesmayer/cs2.js,catarse/catarse.js,sushant12/catarse.js |
8cdbc23c71c69d628b9f034c11727423c218cf87 | db/migrations/20131216232955-external-transactions.js | db/migrations/20131216232955-external-transactions.js | var dbm = require('db-migrate');
var type = dbm.dataType;
exports.up = function(db, callback) {
db.createTable('bank_transactions', {
id: { type: 'int', primaryKey: true, autoIncrement: true },
deposit: { type: 'boolean', notNull: true },
currency: { type: 'string', notNull: true },
cashAmount: { type... | var dbm = require('db-migrate');
var type = dbm.dataType;
exports.up = function(db, callback) {
db.createTable('external_transactions', {
id: { type: 'int', primaryKey: true, autoIncrement: true },
deposit: { type: 'boolean', notNull: true },
currency: { type: 'string', notNull: true },
cashAmount: { ... | Change accountId to externalAccountId in external transactions migration | [FEATURE] Change accountId to externalAccountId in external transactions migration
| JavaScript | isc | whotooktwarden/gatewayd,zealord/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,Parkjeahwan/awegeeks,crazyquark/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,crazyquark/gatewayd,zealord/gatewayd |
04182efe223fb18e3678615c024ed3ecd806afb9 | packages/nova-core/lib/containers/withMutation.js | packages/nova-core/lib/containers/withMutation.js | /*
HoC that provides a simple mutation that expects a single JSON object in return
Example usage:
export default withMutation({
name: 'getEmbedlyData',
args: {url: 'String'},
})(EmbedlyURL);
*/
import { graphql } from 'react-apollo';
import gql from 'graphql-tag';
export default function withMutation({name, a... | /*
HoC that provides a simple mutation that expects a single JSON object in return
Example usage:
export default withMutation({
name: 'getEmbedlyData',
args: {url: 'String'},
})(EmbedlyURL);
*/
import { graphql } from 'react-apollo';
import gql from 'graphql-tag';
export default function withMutation({name, a... | Make mutation hoc accept mutations without arguments | Make mutation hoc accept mutations without arguments
| JavaScript | mit | manriquef/Vulcan,SachaG/Zensroom,SachaG/Gamba,bshenk/projectIterate,manriquef/Vulcan,rtluu/immersive,HelloMeets/HelloMakers,dominictracey/Telescope,bshenk/projectIterate,Discordius/Telescope,acidsound/Telescope,dominictracey/Telescope,SachaG/Gamba,VulcanJS/Vulcan,Discordius/Lesswrong2,acidsound/Telescope,Discordius/Les... |
23737870dcc77538cf7a094d4f5521c8580f965b | lib/models/UserInstance.js | lib/models/UserInstance.js | /* WePay API for Node.js
* (c)2012 Matt Farmer
* Release without warranty under the terms of the
* Apache License. For more details, see the LICENSE
* file at the root of this project.
*/
var UserInstance = function(params) {
//TODO
}
module.exports = UserInstance;
| /* WePay API for Node.js
* (c)2012 Matt Farmer
* Release without warranty under the terms of the
* Apache License. For more details, see the LICENSE
* file at the root of this project.
*/
var UserInstance = function(params) {
// Populate any params passed in.
if (params && ! params instanceof Object)
throw ... | Implement the User instance constructor. | Implement the User instance constructor.
| JavaScript | apache-2.0 | farmdawgnation/wepay-api-node |
b27452b32f6be2bb6544833b422b60a9f1d00e0c | generators/app/templates/gulp_tasks/systemjs.js | generators/app/templates/gulp_tasks/systemjs.js | const gulp = require('gulp');
const replace = require('gulp-replace');
const Builder = require('jspm').Builder;
const conf = require('../conf/gulp.conf');
gulp.task('systemjs', systemjs);
gulp.task('systemjs:html', updateIndexHtml);
function systemjs(done) {
const builder = new Builder('./', 'jspm.config.js');
... | const gulp = require('gulp');
const replace = require('gulp-replace');
const Builder = require('jspm').Builder;
const conf = require('../conf/gulp.conf');
gulp.task('systemjs', systemjs);
gulp.task('systemjs:html', updateIndexHtml);
function systemjs(done) {
const builder = new Builder('./', 'jspm.config.js');
... | Remove jspm scripts on build | Remove jspm scripts on build
| JavaScript | mit | FountainJS/generator-fountain-systemjs,FountainJS/generator-fountain-systemjs |
827eb5533a6e7f967a40f82871647902dc6b833b | karma.conf.js | karma.conf.js | const base = require('skatejs-build/karma.conf');
module.exports = function (config) {
base(config);
// Remove all explicit IE definitions.
config.browsers = config.browsers.filter(name => !/^internet_explorer/.test(name));
// Only test IE latest.
config.browsers.push('internet_explorer_11');
// Shims fo... | const base = require('skatejs-build/karma.conf');
module.exports = function (config) {
base(config);
// Setup IE if testing in SauceLabs.
if (config.sauceLabs) {
// Remove all explicit IE definitions.
config.browsers = config.browsers.filter(name => !/^internet_explorer/.test(name));
// Only test IE... | Fix tests so that it only tries to run IE11 if running in Sauce Labs. | chore(test): Fix tests so that it only tries to run IE11 if running in Sauce Labs.
For some reason it just started happening that it would try to run IE11 outside of Sauce Labs.
| JavaScript | mit | chrisdarroch/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,skatejs/skatejs |
665337b8ea125f179f58e9ffd4cee4e1f5272743 | test/svg-test-helper.js | test/svg-test-helper.js | import $ from "cheerio";
const RECTANGULAR_SEQUENCE = ["M", "L", "L", "L", "L"];
const CIRCULAR_SEQUENCE = ["M", "m", "a", "a"];
const SvgTestHelper = {
expectIsRectangular(wrapper) {
expect(exhibitsShapeSequence(wrapper, RECTANGULAR_SEQUENCE)).to.be.true;
},
expectIsCircular(wrapper) {
expect(exhibits... | import $ from "cheerio";
const RECTANGULAR_SEQUENCE = ["M", "L", "L", "L", "L"];
const CIRCULAR_SEQUENCE = ["M", "m", "a", "a"];
const expectations = {
expectIsRectangular(wrapper) {
expect(exhibitsShapeSequence(wrapper, RECTANGULAR_SEQUENCE)).to.be.true;
},
expectIsCircular(wrapper) {
expect(exhibitsS... | Split helpers into expectations and helpers | Split helpers into expectations and helpers
| JavaScript | mit | FormidableLabs/victory-chart,FormidableLabs/victory-chart,GreenGremlin/victory-chart,GreenGremlin/victory-chart |
7ac6ead3693b4a26dedfff678d55d11512fe1b76 | tests/integration/components/ember-webcam-test.js | tests/integration/components/ember-webcam-test.js | import { describeComponent, it } from 'ember-mocha';
import { beforeEach, afterEach } from 'mocha';
import { expect } from 'chai';
import hbs from 'htmlbars-inline-precompile';
import page from './page';
describeComponent('ember-webcam', 'Integration: EmberWebcamComponent', {
integration: true
}, () => {
beforeEac... | import { describeComponent, it } from 'ember-mocha';
import { beforeEach, afterEach } from 'mocha';
import { expect } from 'chai';
import hbs from 'htmlbars-inline-precompile';
import page from './page';
describeComponent('ember-webcam', 'Integration: EmberWebcamComponent', {
integration: true
}, () => {
beforeEac... | Improve component test when fails to take snapshot | Improve component test when fails to take snapshot
| JavaScript | mit | leizhao4/ember-webcam,forge512/ember-webcam,leizhao4/ember-webcam,forge512/ember-webcam |
f8a42180a7b9b1a145ddc76164fd3299468771b4 | lib/index.js | lib/index.js | 'use strict';
module.exports = {};
| 'use strict';
var assert = require('assert');
module.exports = function() {
var privacy = {};
var tags = { in: {}, out: {} };
privacy.wrap = function(asset) {
return {
_unwrap: function(tag) {
assert(tag === tags.in);
return {
tag: tags.out,
asset: asset
... | Add actual code from jellyscript project | Add actual code from jellyscript project
| JavaScript | mit | voltrevo/voltrevo-privacy,leahciMic/voltrevo-privacy |
ad1a69d6bfc62473c322af56aea49da3efa46a75 | karma.conf.js | karma.conf.js | "use strict";
/**
* Karma configuration.
*/
module.exports = function (config) {
config.set({
frameworks: ["mocha", "sinon"],
files: [
"test/**_test.js"
],
preprocessors: {
"test/**_test.js": ["webpack"]
},
reporters: ["progress"],
browsers: ["Chrome"],
webpack: r... | "use strict";
/**
* Karma configuration.
*/
module.exports = function (config) {
config.set({
frameworks: ["mocha", "sinon"],
files: [
"test/**_test.js"
],
preprocessors: {
"test/**_test.js": ["webpack"]
},
reporters: ["progress"],
browsers: ["Chrome"],
webpack: r... | Add Karma Firefox Runner for TravisCI | [Fixed] Add Karma Firefox Runner for TravisCI
| JavaScript | apache-2.0 | mikepb/clerk |
f92aa1631ecb7504d21931002dd0dfda01316af7 | lib/client.js | lib/client.js |
var api = require('@request/api')
module.exports = (client, provider, methods, config, transform) => {
return api(methods, {
api: function (options, name) {
options.api = name
return this
},
auth: function (options, arg1, arg2) {
var alias = (options.api || provider.api || '__default'... |
var api = require('@request/api')
module.exports = (client, provider, methods, config, transform) => {
return api(methods, {
api: function (name) {
this._options.api = name
return this
},
auth: function (arg1, arg2) {
var alias = (this._options.api || provider.api || '__default')
... | Fix custom method options + Allow callback to be passed to the submit method | Fix custom method options +
Allow callback to be passed to the submit method
| JavaScript | apache-2.0 | simov/purest |
6d22f9733610999ca48d912a125c3bde3e37b285 | lib/utils.js | lib/utils.js | var Person = require('./person');
function incomingMessage(botId, message) {
return message.type === 'message' // check it's a message
&& Boolean(message.text) // check message has some content
&& Boolean(message.user) // check there is a user set
&& message.user !== botId; // check mes... | var Person = require('./person');
function incomingMessage(botId, message) {
return message.type === 'message' // check it's a message
&& Boolean(message.text) // check message has some content
&& Boolean(message.user) // check there is a user set
&& message.user !== botId; // check mes... | Stop double-calling the callback function | Stop double-calling the callback function
| JavaScript | apache-2.0 | tomnatt/tombot |
2f5a1f4bd5754f895efa4f218d1a7dd8712525ee | src/store/modules/fcm.js | src/store/modules/fcm.js | import Vue from 'vue'
import axios from '@/services/axios'
export default {
namespaced: true,
state: {
token: null,
tokens: {},
},
getters: {
token: state => state.token,
tokenExists: state => token => Boolean(state.tokens[token]),
},
actions: {
updateToken ({ commit, rootGetters }, tok... | import Vue from 'vue'
import axios from '@/services/axios'
export default {
namespaced: true,
state: {
token: null,
tokens: {},
},
getters: {
token: state => state.token,
tokenExists: state => token => Boolean(state.tokens[token]),
},
actions: {
updateToken ({ commit, rootGetters }, tok... | Clear subscription tokens before updating | Clear subscription tokens before updating
| JavaScript | mit | yunity/foodsaving-frontend,yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/foodsaving-frontend |
5a3e8af0505b8777358db1984b5020fd5a4dfb48 | lib/util/generalRequest.js | lib/util/generalRequest.js | // Includes
var http = require('./http.js').func;
var getVerification = require('./getVerification.js').func;
var promise = require('./promise.js');
// Args
exports.required = ['url', 'events'];
exports.optional = ['customOpt', 'getBody', 'jar'];
function general (jar, url, inputs, events, customOpt, body) {
return... | // Includes
var http = require('./http.js').func;
var getVerification = require('./getVerification.js').func;
var promise = require('./promise.js');
// Args
exports.required = ['url', 'events'];
exports.optional = ['http', 'ignoreCache', 'getBody', 'jar'];
function general (jar, url, inputs, events, customOpt, body) ... | Add ignoreCache option and http option | Add ignoreCache option and http option
| JavaScript | mit | FroastJ/roblox-js,OnlyTwentyCharacters/roblox-js,sentanos/roblox-js |
9af35bf97daa2a3b81d3984f7047a0c893b7b983 | lib/helper.js | lib/helper.js | 'use babel'
import {BufferedProcess} from 'atom'
export function exec(command, args = [], options = {}) {
if (!arguments.length) throw new Error('Nothing to execute')
return new Promise(function(resolve, reject) {
const data = {stdout: [], stderr: []}
const spawnedProcess = new BufferedProcess({
co... | 'use babel'
import {BufferedProcess} from 'atom'
export function installPackages(packageNames, callback) {
const APMPath = atom.packages.getApmPath()
const Promises = []
return Promise.all(Promise)
}
export function exec(command, args = [], options = {}) {
if (!arguments.length) throw new Error('Nothing to e... | Create a dummy installPackages function | :art: Create a dummy installPackages function
| JavaScript | mit | steelbrain/package-deps,openlawlibrary/package-deps,steelbrain/package-deps |
6c1222bfbd64be37e64e4b5142c7c92555664e81 | polymerjs/gulpfile.js | polymerjs/gulpfile.js | var gulp = require('gulp');
var browserSync = require('browser-sync');
var vulcanize = require('gulp-vulcanize');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
gulp.task('copy', function () {
return gulp.src('./app/index.html', {base: './app/'})
.pipe(gulp.dest('./dist/'));
});
gulp.... | var gulp = require('gulp');
var browserSync = require('browser-sync');
var vulcanize = require('gulp-vulcanize');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
gulp.task('copy', function () {
return gulp.src('./app/index.html', {base: './app/'})
.pipe(gulp.dest('./dist/'));
});
gulp.... | Change browserSync to use port 4200 | [Polymer] Change browserSync to use port 4200
| JavaScript | mit | hawkup/github-stars,hawkup/github-stars |
1888b71a627455c051ad26932eabb8ca36cd578d | messenger.js | messenger.js | /*jshint strict: true, esnext: true, node: true*/
"use strict";
const Wreck = require("wreck");
const qs = require("querystring");
class FBMessenger {
constructor(token) {
this._fbBase = "https://graph.facebook.com/v2.6/me/";
this._token = token;
this._q = qs.stringify({access_token: token}... | /*jshint strict: true, esnext: true, node: true*/
"use strict";
const Wreck = require("wreck");
const qs = require("querystring");
class FBMessenger {
constructor(token) {
this._fbBase = "https://graph.facebook.com/v2.6/";
this._token = token;
this._q = qs.stringify({access_token: token});
... | Add function to get profile. Refactor. | Add function to get profile. Refactor.
| JavaScript | mit | dapuck/fbmsgr-game |
48052b56b145a4fc7b1370db7e1764b3397c15b5 | js/mobiscroll.treelist.js | js/mobiscroll.treelist.js | (function ($) {
var ms = $.mobiscroll,
presets = ms.presets.scroller;
presets.treelist = presets.list;
ms.presetShort('treelist');
})(jQuery); | (function ($) {
var ms = $.mobiscroll,
presets = ms.presets.scroller;
presets.treelist = presets.list;
ms.presetShort('list');
ms.presetShort('treelist');
})(jQuery); | Add missing list shorthand init | Add missing list shorthand init
| JavaScript | mit | jeancroy/mobiscroll,xuyansong1991/mobiscroll,loki315zx/mobiscroll,mrzzcn/mobiscroll,mrzzcn/mobiscroll,Julienedies/mobiscroll,xuyansong1991/mobiscroll,Julienedies/mobiscroll,loki315zx/mobiscroll,jeancroy/mobiscroll |
c732b7edc490137446df41d7d85cb58fc8d8fc7a | lib/white-space.js | lib/white-space.js | var _ = require('lodash')
var fs = require('fs')
var gzip = require('gzip-size')
var filesize = require('filesize')
var cssstats = require('cssstats')
var module = require('tachyons-white-space/package.json')
var moduleCss = fs.readFileSync('node_modules/tachyons-white-space/tachyons-white-space.min.css', 'utf8')
var ... | var _ = require('lodash')
var fs = require('fs')
var gzip = require('gzip-size')
var filesize = require('filesize')
var cssstats = require('cssstats')
var module = require('tachyons-white-space/package.json')
var moduleCss = fs.readFileSync('node_modules/tachyons-white-space/tachyons-white-space.min.css', 'utf8')
var ... | Update with reference to global nav partial | Update with reference to global nav partial
| JavaScript | mit | topherauyeung/portfolio,fenderdigital/css-utilities,topherauyeung/portfolio,pietgeursen/pietgeursen.github.io,topherauyeung/portfolio,cwonrails/tachyons,matyikriszta/moonlit-landing-page,fenderdigital/css-utilities,tachyons-css/tachyons,getfrank/tachyons |
2f1b73dd12c57e8b64f34d7218c07ecd1f05996e | src/middleware/command/system_defaults/handler.js | src/middleware/command/system_defaults/handler.js | 'use strict';
const { mapValues, omitBy } = require('../../../utilities');
const { defaults } = require('./defaults');
// Apply system-defined defaults to input, including input arguments
const systemDefaults = async function (nextFunc, input) {
const { serverOpts } = input;
const argsA = getDefaultArgs({ serve... | 'use strict';
const { mapValues, omitBy } = require('../../../utilities');
const { defaults } = require('./defaults');
// Apply system-defined defaults to input, including input arguments
const systemDefaults = async function (nextFunc, input) {
const { serverOpts } = input;
const argsA = getDefaultArgs({ serve... | Fix system defaults overriding all args | Fix system defaults overriding all args
| JavaScript | apache-2.0 | autoserver-org/autoserver,autoserver-org/autoserver |
cea5f4bf13f5b3359aea957b35cf52965fa40c37 | app/places/places-service.js | app/places/places-service.js | 'use strict';
angular
.module('webClient.places')
.factory('PlacesService', PlacesService);
function PlacesService($resource, envService) {
console.log('Hello :)');
return $resource(
envService.read('baseBackendUrl') + '/places',
{},
{query: {method:'GET', isArray:true}}
);
}
| 'use strict';
angular
.module('webClient.places')
.factory('PlacesService', PlacesService);
function PlacesService($resource, envService) {
return $resource(
envService.read('baseBackendUrl') + '/places',
{},
{query: {method:'GET', isArray:true}}
);
}
| Revert "Story-52 [Marcela, Felipe] Just testing if the new versions are being correctly deployed to Heroku from Snap - this commit will be reverted in the next push" | Revert "Story-52 [Marcela, Felipe] Just testing if the new versions are being correctly deployed to Heroku from Snap - this commit will be reverted in the next push"
This reverts commit 926c0f09dc56c1fa9ffb91c548d644c771b08046.
| JavaScript | mit | simpatize/webclient,simpatize/webclient,simpatize/webclient |
9d73d1e23c2bce43ee87d150905ec2623277185f | src/js/dom-utils.js | src/js/dom-utils.js | // DOM Library Utilites
$.parseUrlQuery = function (url) {
var query = {}, i, params, param;
if (url.indexOf('?') >= 0) url = url.split('?')[1];
params = url.split('&');
for (i = 0; i < params.length; i++) {
param = params[i].split('=');
query[param[0]] = param[1];
}
return query... | // DOM Library Utilites
$.parseUrlQuery = function (url) {
var query = {}, i, params, param;
if (url.indexOf('?') >= 0) url = url.split('?')[1];
params = url.split('&');
for (i = 0; i < params.length; i++) {
param = params[i].split('=');
query[param[0]] = param[1];
}
return query... | Remove supportTouch, add new serializeObject util | Remove supportTouch, add new serializeObject util
| JavaScript | mit | thdoan/Framework7,akio46/Framework7,luistapajos/Lista7,Iamlars/Framework7,Janusorz/Framework7,JustAMisterE/Framework7,Dr1ks/Framework7,Liu-Young/Framework7,dingxin/Framework7,yangfeiloveG/Framework7,pandoraui/Framework7,lilien1010/Framework7,youprofit/Framework7,framework7io/Framework7,quannt/Framework7,xuyuanxiang/Fra... |
a667210d417520082ea946342a64f16f18d1a2e3 | src/js/notifications.js | src/js/notifications.js | const push = require('push.js');
angular.module('opentok-meet').factory('Push', () => push);
angular.module('opentok-meet').factory('NotificationService', ['$window', 'OTSession', 'Push',
function NotificationService($window, OTSession, Push) {
let focused = true;
$window.addEventListener('blur', () => {
... | const push = require('push.js');
angular.module('opentok-meet').factory('Push', () => push);
angular.module('opentok-meet').factory('NotificationService', ['$window', 'OTSession', 'Push',
function NotificationService($window, OTSession, Push) {
let focused = true;
$window.addEventListener('blur', () => {
... | Add extra condition to show "user joined" notification | Add extra condition to show "user joined" notification
If you open the page and without clicking anything you go to other app, then you won't get the notification => I don't know how to solve this.
If you open the page and without clicking anything you go to other tab, then you won't get the notification => It should... | JavaScript | mit | opentok/opentok-meet,aullman/opentok-meet,opentok/opentok-meet,opentok/opentok-meet,aullman/opentok-meet |
7bf21890f9b24b6afde0d5ff83ffa70ecf7163e2 | src/database/json-file-manager.js | src/database/json-file-manager.js | import fileSystem from 'fs';
const JsonFileManager = {
load(fileName) {
console.log(`[INFO] Loading data from ${__dirname}/${fileName} file`);
return JSON.parse(fileSystem.readFileSync(`${__dirname}/${fileName}`));
},
save(fileName, json) {
console.log(`[INFO] Saving data in ${__dirnam... | import fileSystem from 'fs';
const JsonFileManager = {
load(path) {
console.log(`[INFO] Loading data from ${path} file`);
return JSON.parse(fileSystem.readFileSync(`${path}`));
},
save(path, json) {
console.log(`[INFO] Saving data in ${path} file`);
fileSystem.writeFileSync(`${... | Add some changes in path settings for JsonFIleManager | Add some changes in path settings for JsonFIleManager
| JavaScript | mit | adrianobrito/vaporwave |
914b86f5c0351599a9a168c5f0dc65b9bfa942d5 | src/runner/typecheck.js | src/runner/typecheck.js | import { execFile } from 'child_process'
import flow from 'flow-bin'
import { logError, log } from '../util/log'
const errorCodes = {
TYPECHECK_ERROR: 2
}
export default (saguiOptions) => new Promise((resolve, reject) => {
const commandArgs = ['check', '--color=always']
if (saguiOptions.javaScript && saguiOpti... | import { execFile } from 'child_process'
import flow from 'flow-bin'
import { logError, logWarning, log } from '../util/log'
const errorCodes = {
TYPECHECK_ERROR: 2
}
export default (saguiOptions) => new Promise((resolve, reject) => {
// Currently Facebook does not provide Windows builds.
// https://github.com/... | Disable type checking in Windows 😞 | Disable type checking in Windows 😞
| JavaScript | mit | saguijs/sagui,saguijs/sagui |
b6c7749859a6bba20301d5b0ad01754624964829 | coeus-webapp/src/main/webapp/scripts/common/global.js | coeus-webapp/src/main/webapp/scripts/common/global.js | var Kc = Kc || {};
Kc.Global = Kc.Global || {};
(function (namespace, $) {
// set all modals to static behavior (clicking out does not close)
$.fn.modal.Constructor.DEFAULTS.backdrop = "static";
})(Kc.Global, jQuery); | var Kc = Kc || {};
Kc.Global = Kc.Global || {};
(function (namespace, $) {
// set all modals to static behavior (clicking out does not close)
$.fn.modal.Constructor.DEFAULTS.backdrop = "static";
$(document).on("ready", function(){
// date conversion for date fields to full leading 0 - for days and ... | Convert non-full date to full date on loss of focus in js | [KRACOEUS-8479] Convert non-full date to full date on loss of focus in js
| JavaScript | agpl-3.0 | geothomasp/kcmit,geothomasp/kcmit,geothomasp/kcmit,geothomasp/kcmit,geothomasp/kcmit |
387fe28bf03d894ea37483455067c43edb7ef947 | public/app/scripts/controllers/users.js | public/app/scripts/controllers/users.js | 'use strict';
angular.module('publicApp')
.controller('UsersCtrl', ['$scope', '$http', '$location', '$routeParams', 'UserService', function ($scope, $http, $location, $user, $routeParams) {
console.log('user id', $routeParams.id);
if ($user) {
console.log('user is logged in');
if (($user.id == $r... | 'use strict';
angular.module('publicApp')
.controller('UsersCtrl', ['$scope', '$http', '$location', '$route', '$routeParams', 'UserService', function ($scope, $http, $location, $route, $routeParams, $user) {
$scope.user = $user;
if ($user.isLogged) {
if (($user.id == $routeParams.id) || $user.admin) {
... | Add user data variables to scope | [FEATURE] Add user data variables to scope
| JavaScript | isc | Parkjeahwan/awegeeks,Parkjeahwan/awegeeks,crazyquark/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd,zealord/gatewayd,zealord/gatewayd,crazyquark/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd |
a005ed629f02f7f61ac2719ad7286693935fbfab | tut5/script.js | tut5/script.js | $(document).ready(function () {
})
| $(document).ready(function main() {
$("#add").click(function addRow() {
var name = $("<td></td>").text($("#name").val());
var up = $("<button></button>").text("Move up").click(moveUp);
var down = $("<button></button>").text("Move down").click(moveDown);
var operations = $("<td></td>"... | Implement adding rows to the table | Implement adding rows to the table
| JavaScript | mit | benediktg/DDS-tutorial,benediktg/DDS-tutorial,benediktg/DDS-tutorial |
66297d71ac6675625201c20ef3a24c0156839469 | src/javascripts/frigging_bootstrap/components/text.js | src/javascripts/frigging_bootstrap/components/text.js | let React = require("react")
let {errorList, sizeClassNames, formGroupCx, label} = require("../util.js")
let {div, textarea} = React.DOM
let cx = require("classnames")
export default class extends React.Component {
static displayName = "Frig.friggingBootstrap.Text"
static defaultProps = Object.assign(require("..... | let React = require("react")
let {errorList, sizeClassNames, formGroupCx, label} = require("../util.js")
let {div, textarea} = React.DOM
let cx = require("classnames")
export default class extends React.Component {
static displayName = "Frig.friggingBootstrap.Text"
static defaultProps = Object.assign(require("..... | Remove Textarea Label, Use Frig Version Instead | Remove Textarea Label, Use Frig Version Instead
| JavaScript | mit | TouchBistro/frig,frig-js/frig,frig-js/frig,TouchBistro/frig |
9e5ab890d8ca61ee5d86b2bc4ae29a5ddada60f7 | website/app/application/core/projects/project/home/home.js | website/app/application/core/projects/project/home/home.js | (function (module) {
module.controller('ProjectHomeController', ProjectHomeController);
ProjectHomeController.$inject = ["project", "mcmodal", "templates", "$state", "Restangular"];
function ProjectHomeController(project, mcmodal, templates, $state, Restangular) {
var ctrl = this;
ctrl.pro... | (function (module) {
module.controller('ProjectHomeController', ProjectHomeController);
ProjectHomeController.$inject = ["project", "mcmodal", "templates", "$state", "Restangular"];
function ProjectHomeController(project, mcmodal, templates, $state, Restangular) {
var ctrl = this;
ctrl.pro... | Remove the hard coded process name now that the process name has been set. | Remove the hard coded process name now that the process name has been set.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
8d20035df56fcc1d40c6d28ad8e7a4ff30900636 | script.js | script.js | var ctx = document.getElementById("chart").getContext("2d");
var myLineChart = new Chart(ctx).Line(data, {
tooltipTemplate = function(valuesObject){
var label = valuesObject.label;
var idx = data.labels.indexOf(label);
var result = data.datasets[0].time[idx];
if (data.datasets[0].languages[i... | var data = {"labels": ["12 December", "13 December", "14 December", "15 December", "16 December", "17 December", "18 December"], "datasets": [{"languages": [[], [], [], [], [], ["Python", "Other"], ["Python", "JavaScript", "Bash"]], "pointHighlightFill": "#fff", "fillColor": "rgba(151,187,205,0.2)", "pointHighlightStro... | Update dashboard at Fri Dec 18 02:17:47 NPT 2015 | Update dashboard at Fri Dec 18 02:17:47 NPT 2015
| JavaScript | mit | switchkiller/HaloTracker,switchkiller/HaloTracker,switchkiller/HaloTracker |
6af74e45b203a159b1401c7815c68b476b8835e0 | src/test/helper/database/index.js | src/test/helper/database/index.js | import mongoose from "mongoose"
async function createConnection() {
mongoose.Promise = Promise
// Don't forget to add a user for this connection
const connection = await mongoose.connect("mongodb://localhost/twi-test", {
useMongoClient: true,
promiseLibrary: Promise
})
return connection
}
async fu... | import mongoose from "mongoose"
async function createConnection() {
mongoose.Promise = Promise
// Don't forget to add a user for this connection
const connection = await mongoose.connect("mongodb://localhost/twi-test", {
promiseLibrary: Promise
})
return connection
}
async function closeConnection() {... | Fix db connection in tests helper | Fix db connection in tests helper
| JavaScript | mit | octet-stream/ponyfiction-js,octet-stream/twi,octet-stream/ponyfiction-js,twi-project/twi-server |
45d8406eea3afee7049c26d5449e5b86e46eef61 | migrations/20170310124040_add_event_id_for_actions.js | migrations/20170310124040_add_event_id_for_actions.js |
exports.up = function(knex, Promise) {
return knex.schema.table('actions', function(table) {
table.string('event_id').index();
table.foreign('event_id')
.references('id')
.inTable('events')
.onDelete('RESTRICT')
.onUpdate('CASCADE');
})
.raw(`
CREATE UNIQUE INDEX
only_on... |
exports.up = function(knex, Promise) {
return knex.schema.table('actions', function(table) {
table.string('event_id').index();
table.foreign('event_id')
.references('id')
.inTable('events')
.onDelete('RESTRICT')
.onUpdate('CASCADE');
})
.raw(`
CREATE UNIQUE INDEX
only_on... | Comment to explain the magic number | Comment to explain the magic number
| JavaScript | mit | futurice/wappuapp-backend,futurice/wappuapp-backend,kaupunki-apina/prahapp-backend,kaupunki-apina/prahapp-backend |
9e0376684a68efedbfa5a4c43dedb1de966ec15f | lib/lookup-reopen/main.js | lib/lookup-reopen/main.js | Ember.ComponentLookup.reopen({
lookupFactory: function(name) {
var Component = this._super.apply(this, arguments);
if (!Component) { return; }
name = name.replace(".","/");
if (Component.prototype.classNames.indexOf(Ember.COMPONENT_CSS_LOOKUP[name]) > -1){
return Component;
}
return C... | (function() {
function componentHasBeenReopened(Component, className) {
return Component.prototype.classNames.indexOf(className) > -1;
}
function reopenComponent(_Component, className) {
var Component = _Component.reopen({
classNames: [className]
});
return Component;
}
function ensur... | Refactor monkey-patch to include less duplication. | Refactor monkey-patch to include less duplication.
| JavaScript | mit | samselikoff/ember-component-css,samselikoff/ember-component-css,webark/ember-component-css,ebryn/ember-component-css,ebryn/ember-component-css,webark/ember-component-css |
a7bf2991eb9c5d093cc2f90ca5491bf0d7ee3433 | frontend/src/karma.conf.js | frontend/src/karma.conf.js | // Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... | // Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... | Use headless Chrome for Angular tests again. | Fix: Use headless Chrome for Angular tests again.
| JavaScript | apache-2.0 | iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor |
4393047a5ca961d06eedb3501b8d1e0b0a68b279 | player.js | player.js | var game = require('socket.io-client')('http://192.168.0.24:3000'),
lobby = require('socket.io-client')('http://192.168.0.24:3030'),
Chess = require('chess.js').Chess,
name = 'RndJesus_' + Math.floor(Math.random() * 100);;
lobby.on('connect', function () {
console.log('Player ' + name + ' is connected... | var game = require('socket.io-client')('http://localhost:3000'),
lobby = require('socket.io-client')('http://localhost:3030'),
Chess = require('chess.js').Chess,
name = 'RndJesus_' + Math.floor(Math.random() * 100);;
lobby.on('connect', function () {
console.log('Player ' + name + ' is connected to lo... | Use localhost when running locally | Use localhost when running locally
| JavaScript | mit | cheslie-team/cheslie-player,cheslie-team/cheslie-player |
542a5dc9cb71b9bcb402620b82d4c5c8c8c98109 | lib/node_modules/@stdlib/utils/timeit/lib/min_time.js | lib/node_modules/@stdlib/utils/timeit/lib/min_time.js | 'use strict';
// MAIN //
/**
* Computes the minimum time.
*
* @private
* @param {ArrayArray} times - times
* @returns {NonNegativeIntegerArray} minimum time
*/
function min( times ) {
var out;
var t;
var i;
out = times[ 0 ];
for ( i = 1; i < times.length; i++ ) {
t = times[ i ];
if (
t[ 0 ] <= out[ 0 ] &... | 'use strict';
// MAIN //
/**
* Computes the minimum time.
*
* @private
* @param {ArrayArray} times - times
* @returns {NonNegativeIntegerArray} minimum time
*/
function min( times ) {
var out;
var t;
var i;
out = times[ 0 ];
for ( i = 1; i < times.length; i++ ) {
t = times[ i ];
if (
t[ 0 ] < out[ 0 ] ||... | Fix bug when calculating minimum time | Fix bug when calculating minimum time
| 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 |
a48d5a1ae957db81aa464d463a4aab0b15ff29a2 | lib/server.js | lib/server.js | var st = require('st')
, http = require('http')
, js = require('atomify-js')
, css = require('atomify-css')
, open = require('open')
module.exports = function (args) {
var mount = st(args.server.st || process.cwd())
, port = args.server.port || 1337
, launch = args.server.open
, path = args.serv... | var st = require('st')
, http = require('http')
, js = require('atomify-js')
, css = require('atomify-css')
, open = require('open')
module.exports = function (args) {
var mount = st(args.server.st || process.cwd())
, port = args.server.port || 1337
, launch = args.server.open
, path = args.serv... | Add leading slash to path if not provided | Add leading slash to path if not provided | JavaScript | mit | atomify/atomify |
18dba001d139a01cfc8a52b9122dd821c72139d7 | backend/app/assets/javascripts/spree/backend/user_picker.js | backend/app/assets/javascripts/spree/backend/user_picker.js | $.fn.userAutocomplete = function () {
'use strict';
function formatUser(user) {
return Select2.util.escapeMarkup(user.email);
}
this.select2({
minimumInputLength: 1,
multiple: true,
initSelection: function (element, callback) {
$.get(Spree.routes.users_api, {
ids: element.val()
... | $.fn.userAutocomplete = function () {
'use strict';
function formatUser(user) {
return Select2.util.escapeMarkup(user.email);
}
this.select2({
minimumInputLength: 1,
multiple: true,
initSelection: function (element, callback) {
Spree.ajax({
url: Spree.routes.users_api,
da... | Fix user picker's select2 initial selection | Fix user picker's select2 initial selection
- was failing because of missing token: `Spree.api_key`
- going through the Spree.ajax automatically adds the `api_key`
| JavaScript | bsd-3-clause | jordan-brough/solidus,Arpsara/solidus,jordan-brough/solidus,pervino/solidus,pervino/solidus,Arpsara/solidus,Arpsara/solidus,jordan-brough/solidus,pervino/solidus,Arpsara/solidus,pervino/solidus,jordan-brough/solidus |
d5c4c7b0e48c736abf56022be40ba962cea78d9b | Resources/public/scripts/date-time-pickers-init.js | Resources/public/scripts/date-time-pickers-init.js | $(document).ready(function () {
var locale = 'en' !== LOCALE ? LOCALE : '';
var options = $.extend({}, $.datepicker.regional[locale], $.timepicker.regional[locale], {
dateFormat: 'dd.mm.yy'
});
var init;
(init = function () {
$('input.date').datepicker(options);
$('input.dat... | $(document).ready(function () {
var locale = 'en' !== LOCALE ? LOCALE : '';
var options = $.extend({}, $.datepicker.regional[locale], $.timepicker.regional[locale], {
dateFormat: 'dd.mm.yy'
});
var init;
(init = function () {
['date', 'datetime', 'time'].map(function (type) {
... | Simplify date time pickers init JS. | Simplify date time pickers init JS.
| JavaScript | mit | DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle |
1c8f5cc3126258472e9e80928f9cb9f9ac358899 | objects/barrier.js | objects/barrier.js | 'use strict';
const audioUtil = require('../utils/audio');
const PhysicsSprite = require('./physics-sprite');
class Barrier extends PhysicsSprite {
constructor(game, x, y) {
super(game, x, y, 'barrier', 2, true);
this.animations.add('up', [ 2, 1, 0 ], 10, false);
this.animations.add('down', [ 0, 1, 2 ... | 'use strict';
const audioUtil = require('../utils/audio');
const PhysicsSprite = require('./physics-sprite');
class Barrier extends PhysicsSprite {
constructor(game, x, y) {
super(game, x, y, 'barrier', 2, true);
this.animations.add('up', [ 2, 1, 0 ], 10, false);
this.animations.add('down', [ 0, 1, 2 ... | Fix the call to addSfx broken by the signature change | Fix the call to addSfx broken by the signature change
| JavaScript | mit | to-the-end/to-the-end,to-the-end/to-the-end |
2f1a55fa66279b8f15d9fa3b5c2c6d3056b2a3bd | ghost/admin/views/posts.js | ghost/admin/views/posts.js | import {mobileQuery, responsiveAction} from 'ghost/utils/mobile';
var PostsView = Ember.View.extend({
target: Ember.computed.alias('controller'),
classNames: ['content-view-container'],
tagName: 'section',
mobileInteractions: function () {
Ember.run.scheduleOnce('afterRender', this, function (... | import {mobileQuery, responsiveAction} from 'ghost/utils/mobile';
var PostsView = Ember.View.extend({
target: Ember.computed.alias('controller'),
classNames: ['content-view-container'],
tagName: 'section',
mobileInteractions: function () {
Ember.run.scheduleOnce('afterRender', this, function (... | Fix Ghost icon is not clickable | Fix Ghost icon is not clickable
closes #3623
- Initialization of the link was done on login page where the ‚burger‘
did not exist.
- initialization in application needs to be done to make it work on
refresh
| JavaScript | mit | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost |
100f84cc123ea99b366e314d15e534eb50912fde | backend/server/model-loader.js | backend/server/model-loader.js | module.exports = function modelLoader(isParent) {
'use strict';
if (isParent || process.env.MCTEST) {
console.log('using mocks/model');
return require('./mocks/model');
}
let ropts = {
db: 'materialscommons',
port: 30815
};
let r = require('rethinkdbdash')(ropt... | module.exports = function modelLoader(isParent) {
'use strict';
if (isParent || process.env.MCTEST) {
return require('./mocks/model');
}
let ropts = {
db: process.env.MCDB || 'materialscommons',
port: process.env.MCPORT || 30815
};
let r = require('rethinkdbdash')(ropt... | Add environment variables for testing, database and database server port. | Add environment variables for testing, database and database server port.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
27c448c3672b174df3dcfa3cff1e29f85983b2b3 | app/helpers/register-helpers/helper-config.js | app/helpers/register-helpers/helper-config.js | var ConfigBuilder = require('../builders/ConfigBuilder');
module.exports.register = function(Handlebars, options) {
options = options || {};
var helpers = {
helper_config: function(key) {
var config = new ConfigBuilder().build();
return config.get(key);
}
};
fo... | var ConfigBuilder = require('../builders/ConfigBuilder');
module.exports.register = function(Handlebars, options) {
options = options || {};
var helperName = 'helper_config';
function validateArguments(arguments) {
if (arguments.length < 2) {
throw new ReferenceError(`${helperName}: c... | Validate arguments passed from template to helper_config | Validate arguments passed from template to helper_config
| JavaScript | mit | oksana-khristenko/assemble-starter,oksana-khristenko/assemble-starter |
c6b618f37cb48bcde0d858d0e0627ac734a9970f | static/js/settings.js | static/js/settings.js | /****************************************************************************
#
# This file is part of the Vilfredo Client.
#
# Copyright © 2009-2014 Pietro Speroni di Fenizio / Derek Paterson.
#
# VilfredoReloadedCore is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Genera... | /****************************************************************************
#
# This file is part of the Vilfredo Client.
#
# Copyright © 2009-2014 Pietro Speroni di Fenizio / Derek Paterson.
#
# VilfredoReloadedCore is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Genera... | Add setting for vote radius | Add setting for vote radius
| JavaScript | agpl-3.0 | fairdemocracy/vilfredo-client,fairdemocracy/vilfredo-client,fairdemocracy/vilfredo-client,fairdemocracy/vilfredo-client |
ba8d433ab2cccdfa652e45494543428c093a85ce | app/javascript/gobierto_participation/modules/application.js | app/javascript/gobierto_participation/modules/application.js | function currentLocationMatches(action_path) {
return $("body.gobierto_participation_" + action_path).length > 0
}
$(document).on('turbolinks:load', function() {
// Toggle description for Process#show stages diagram
$('.toggle_description').click(function() {
$(this).parents('.timeline_row').toggleClass('to... | function currentLocationMatches(action_path) {
return $("body.gobierto_participation_" + action_path).length > 0
}
$(document).on('turbolinks:load', function() {
// Toggle description for Process#show stages diagram
$('.toggle_description').click(function() {
$(this).parents('.timeline_row').toggleClass('to... | Add active class in participation navigation menu using JS | Add active class in participation navigation menu using JS
| JavaScript | agpl-3.0 | PopulateTools/gobierto-dev,PopulateTools/gobierto,PopulateTools/gobierto,PopulateTools/gobierto,PopulateTools/gobierto,PopulateTools/gobierto-dev,PopulateTools/gobierto-dev,PopulateTools/gobierto-dev |
3c9c39915271ff611c7dbcacddde379c78301303 | src/client/reducers/StatusReducer.js | src/client/reducers/StatusReducer.js | import initialState from './initialState';
import {
LOGO_SPIN_STARTED,
LOGO_SPIN_ENDED,
PAGE_SCROLL_STARTED,
PAGE_SCROLL_ENDED,
APP_INIT,
STATUS_UPDATE,
PROVIDER_CHANGE,
BOARD_CHANGE,
SCROLL_HEADER,
THREAD_REQUESTED,
BOARD_REQUESTED,
} from '../constants';
export defau... | import initialState from './initialState';
import {
LOGO_SPIN_STARTED,
LOGO_SPIN_ENDED,
PAGE_SCROLL_STARTED,
PAGE_SCROLL_ENDED,
APP_INIT,
STATUS_UPDATE,
PROVIDER_CHANGE,
BOARD_CHANGE,
SCROLL_HEADER,
THREAD_REQUESTED,
THREAD_DESTROYED,
BOARD_REQUESTED,
BOARD_DES... | Add reducer cases for thread/board destroyed | Add reducer cases for thread/board destroyed
| JavaScript | mit | AdamSalma/Lurka,AdamSalma/Lurka |
3495b9e94ffb9dc03bf6c3699f9484343829171c | test/highlightAuto.js | test/highlightAuto.js | 'use strict';
var fs = require('fs');
var hljs = require('../build');
var path = require('path');
var utility = require('./utility');
function testAutoDetection(language) {
it('should be detected as ' + language, function() {
var languagePath = utility.buildPath('detect', language),
examples ... | 'use strict';
var fs = require('fs');
var hljs = require('../build');
var path = require('path');
var utility = require('./utility');
function testAutoDetection(language) {
it('should be detected as ' + language, function() {
var languagePath = utility.buildPath('detect', language),
examples ... | Use hljs.listLanguages for auto-detection tests | Use hljs.listLanguages for auto-detection tests
| JavaScript | bsd-3-clause | snegovick/highlight.js,iOctocat/highlight.js,dYale/highlight.js,dbkaplun/highlight.js,kevinrodbe/highlight.js,dirkk/highlight.js,abhishekgahlot/highlight.js,kevinrodbe/highlight.js,daimor/highlight.js,Ajunboys/highlight.js,cicorias/highlight.js,isagalaev/highlight.js,xing-zhi/highlight.js,yxxme/highlight.js,STRML/highl... |
3248f52485a8cf44788a070744378f4e421b1529 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | Remove code from Application.js to remedy errors seen in browser console | Remove code from Application.js to remedy errors seen in browser console
| JavaScript | mit | TerrenceLJones/not-bored-tonight,TerrenceLJones/not-bored-tonight |
83322ef4a60598c58adedcec4240f83e659d5349 | app/controllers/abstractController.js | app/controllers/abstractController.js | core.controller('AbstractController', function ($scope, StorageService) {
$scope.isAssumed = function() {
return StorageService.get("assumed");
};
$scope.isAssuming = function() {
return StorageService.get("assuming");
};
$scope.isAnonymous = function() {
return (sessionStorage.role == "ROLE_ANONYMOUS");
... | core.controller('AbstractController', function ($scope, StorageService) {
$scope.storage = StorageService;
$scope.isAssumed = function() {
return StorageService.get("assumed");
};
$scope.isAssuming = function() {
return StorageService.get("assuming");
};
$scope.isAnonymous = function() {
return (session... | Put storage service on scope for abstract controller. | Put storage service on scope for abstract controller.
| JavaScript | mit | TAMULib/Weaver-UI-Core,TAMULib/Weaver-UI-Core |
ba555027b6ce0815cc3960d31d1bd56fbf8c04a3 | client/components/Dashboard.js | client/components/Dashboard.js | import React, { Component } from 'react'
import Affirmations from './analytics/Affirmations'
export default class Dashboard extends Component {
constructor(props) {
super(props);
this.state = {
data: {
url: 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/98887/d3pack-flare-short.json',
el... | import React, { Component } from 'react'
import Circles from './analytics/Circles'
export default class Dashboard extends Component {
constructor(props) {
super(props);
this.state = {
data: {
url: './data/sample.json',
elementDelay: 100
},
startDelay: 2000
};
}
compo... | Update for circles and new sample data | Update for circles and new sample data
| JavaScript | mit | scrumptiousAmpersand/journey,scrumptiousAmpersand/journey |
03ee8adc1cf7bde21e52386e72bc4a663d6834f3 | script.js | script.js | $('body').scrollspy({ target: '#side-menu' , offset : 10});
var disableEvent = function(e) {
e.preventDefault();
};
$('a[href="#"]').click(disableEvent);
$('button[type="submit"]').click(disableEvent);
// Initialize popovers
$('[data-toggle="popover"]').popover();
$('#openGithub').click(function(e){
e.preventD... | $('body').scrollspy({ target: '#side-menu' , offset : 10});
var disableEvent = function(e) {
e.preventDefault();
};
$('a[href="#"]').click(disableEvent);
$('button[type="submit"]').click(disableEvent);
// Initialize popovers
$('[data-toggle="popover"]').popover();
$('#openGithub').click(function(e){
e.preventD... | Fix commit mistake with tooltip | Fix commit mistake with tooltip
| JavaScript | apache-2.0 | CenterForOpenScience/osf-style,CenterForOpenScience/osf-style |
0915cc2024564c1ee79f9695c82eda8adb1f9980 | src/vibrant.directive.js | src/vibrant.directive.js | angular
.module('ngVibrant')
.directive('vibrant', vibrant);
function vibrant($vibrant) {
var directive = {
restrict: 'AE',
scope: {
model: '=ngModel', //Model
url: '@?',
swatch: '@?',
quality: '@?',
colors: '@?'
},
... | angular
.module('ngVibrant')
.directive('vibrant', vibrant);
function vibrant($vibrant) {
var directive = {
restrict: 'AE',
scope: {
model: '=ngModel', //Model
url: '@?',
swatch: '@?',
quality: '@?',
colors: '@?'
},
... | Use colors and quality attributes on manual image fetching | Use colors and quality attributes on manual image fetching
| JavaScript | apache-2.0 | maxjoehnk/ngVibrant |
2a1b7b1b0b9706dba23e45703b996bba616018e3 | static/service-worker.js | static/service-worker.js | const cacheName = 'cache-v4'
const precacheResources = [
'/',
'/posts/',
'index.html',
'/bundle.min.js',
'/main.min.css',
'/fonts/Inter-UI-Bold.woff',
'/fonts/Inter-UI-Medium.woff',
'/fonts/Inter-UI-Medium.woff2',
'/fonts/Inter-UI-Italic.woff',
'/fonts/Inter-UI-Regular.woff',
'/fonts/Inter-UI-Ital... | self.addEventListener('activate', event => {
event.waitUntil(
caches
.keys()
.then(keyList => {
return Promise.all(
keyList.map(key => {
return caches.delete(key)
})
)
})
.then(self.clients.claim())
)
})
navigator.serviceWorker.getRegistra... | Stop caching things and remove existing service worker registrations | Stop caching things and remove existing service worker registrations
Signed-off-by: Harsh Shandilya <c6ff3190142d3f8560caed342b4d93721fe8dacf@gmail.com>
| JavaScript | mit | MSF-Jarvis/msf-jarvis.github.io |
cac8899b7ff10268146c9d150faa94f5126284de | lib/server.js | lib/server.js | Counter = function (name, cursor, interval) {
this.name = name;
this.cursor = cursor;
this.interval = interval || 1000 * 10;
this._collectionName = 'counters-collection';
}
// every cursor must provide a collection name via this method
Counter.prototype._getCollectionName = function() {
return "counter-" + t... | Counter = function (name, cursor, interval) {
this.name = name;
this.cursor = cursor;
this.interval = interval || 1000 * 10;
this._collectionName = 'counters-collection';
}
// every cursor must provide a collection name via this method
Counter.prototype._getCollectionName = function() {
return "counter-" + t... | Make _publishCursor return a handle with a stop method | Make _publishCursor return a handle with a stop method
| JavaScript | mit | nate-strauser/meteor-publish-performant-counts |
afdd27cc9e852d2aa4c311a67635cc6ffa55455b | test/unit/icon-toggle.js | test/unit/icon-toggle.js |
describe('icon-toggle tests', function () {
it('Should have MaterialIconToggle globally available', function () {
expect(MaterialIconToggle).to.be.a('function');
});
it('Should be upgraded to a MaterialIconToggle successfully', function () {
var el = document.createElement('div');
el.... |
describe('icon-toggle tests', function () {
it('Should have MaterialIconToggle globally available', function () {
expect(MaterialIconToggle).to.be.a('function');
});
it('Should be upgraded to a MaterialIconToggle successfully', function () {
var el = document.createElement('div');
el.... | Update MaterialIconToggle unit test with chai-jquery | Update MaterialIconToggle unit test with chai-jquery
| JavaScript | apache-2.0 | hassanabidpk/material-design-lite,yonjar/material-design-lite,LuanNg/material-design-lite,coraxster/material-design-lite,hebbet/material-design-lite,snice/material-design-lite,i9-Technologies/material-design-lite,craicoverflow/material-design-lite,Saber-Kurama/material-design-lite,pedroha/material-design-lite,it-andy-h... |
bdd1d8705399c1c9272499a300a3bc869717ef04 | request-builder.js | request-builder.js | 'use strict';
const _ = require('underscore');
function buildSlots(slots) {
const res = {};
_.each(slots, (value, key) => {
if ( _.isString(value)) {
res[key] = {
name: key,
value: value
};
} else {
res[key] = {
name: key,
...value
};
}
});
r... | 'use strict';
const _ = require('underscore');
function buildSlots(slots) {
const res = {};
_.each(slots, (value, key) => {
if ( _.isString(value)) {
res[key] = {
name: key,
value: value
};
} else {
res[key] = {
...value,
name: key
};
}
});
r... | Make sure to keep the property 'name' | Make sure to keep the property 'name'
| JavaScript | mit | ExpediaDotCom/alexa-conversation |
819ba6bfb8cb4b8a329520a09c05abf276e12148 | src/buildScripts/nodeServer.js | src/buildScripts/nodeServer.js | "use strict";
/* eslint-disable no-console */
/* eslint-disable import/default */
var chalk = require('chalk');
var app = require('../app.js'); // This initializes the Express application
var config = require('../../config.js');
var port = config.port || 5000;
var server = app.listen(port, err => {
if (err) {
co... | "use strict";
/* eslint-disable no-console */
/* eslint-disable import/default */
var chalk = require('chalk');
var app = require('../app.js'); // This initializes the Express application
// var config = require('../../config.js');
var port = process.env.PORT || 5000;
var server = app.listen(port, err => {
if (err) ... | Move npm dotenv to dependencies instead of dev-dependencies | app(env): Move npm dotenv to dependencies instead of dev-dependencies
| JavaScript | mit | zklinger2000/fcc-heroku-rest-api |
cd3b959d10b8ac8c8011715a7e8cd3308f366cb2 | js/scripts.js | js/scripts.js | var pingPong = function(i) {
if ((i % 3 === 0) && (i % 5 != 0)) {
return "ping";
} else if ((i % 5 === 0) && (i % 6 != 0)) {
return "pong";
} else if ((i % 3 === 0) && (i % 5 === 0)) {
return "ping pong";
} else {
return false;
}
};
$(function() {
$("#game").submit(function(event) {
$('... | var pingPong = function(i) {
if ((i % 5 === 0) || (i % 3 === 0)) {
return true;
} else {
return false;
}
};
$(function() {
$("#game").submit(function(event) {
$('#outputList').empty();
var number = parseInt($("#userNumber").val());
for (var i = 1; i <= number; i += 1) {
if (i % 15 =... | Change spec test back to true/false, rewrite loop for better clarity of changes | Change spec test back to true/false, rewrite loop for better clarity of changes
| JavaScript | mit | kcmdouglas/pingpong,kcmdouglas/pingpong |
ef7450d5719b591b4517c9e107afe142de4246a8 | test/test-config.js | test/test-config.js | var BATCH_API_ENDPOINT = 'http://127.0.0.1:8080/api/v1/sql/job';
module.exports = {
db: {
host: 'localhost',
port: 5432,
dbname: 'analysis_api_test_db',
user: 'postgres',
pass: ''
},
batch: {
endpoint: BATCH_API_ENDPOINT,
username: 'localhost',
... | 'use strict';
var BATCH_API_ENDPOINT = 'http://127.0.0.1:8080/api/v1/sql/job';
function create (override) {
override = override || {
db: {},
batch: {}
};
override.db = override.db || {};
override.batch = override.batch || {};
return {
db: defaults(override.db, {
... | Allow to create test config with overrided options | Allow to create test config with overrided options
| JavaScript | bsd-3-clause | CartoDB/camshaft |
9a4c99a0f8ff0076c4803fe90d904ca4a8f8f05e | karma.conf.js | karma.conf.js | module.exports = function(config) {
config.set({
frameworks: ['mocha'],
browsers: ['Firefox', 'PhantomJS'],
files: [require.resolve('es5-shim'), 'build/test.js'],
reporters: ['dots']
});
if (process.env.CI && process.env.SAUCE_ACCESS_KEY) {
var customLaunchers = {
... | module.exports = function(config) {
config.set({
frameworks: ['mocha'],
browsers: ['Firefox', 'PhantomJS'],
files: [require.resolve('es5-shim'), 'build/test.js'],
reporters: ['dots']
});
if (process.env.CI && process.env.SAUCE_ACCESS_KEY) {
var customLaunchers = {
... | Revert "Test in Internet Explorer in SauceLabs" | Revert "Test in Internet Explorer in SauceLabs"
This reverts commit c65a817bf6dad9c9610baa00bf8d8d3143e9822e.
| JavaScript | mit | ruslansagitov/loud |
fb92f710ead91a13d0bfa466b195e4e8ea975679 | lib/formats/json/parser.js | lib/formats/json/parser.js | var Spec02 = require("../../specs/spec_0_2.js");
const spec02 = new Spec02();
function JSONParser(_spec) {
this.spec = (_spec) ? _spec : new Spec02();
}
/**
* Level 0 of validation: is that string? is that JSON?
*/
function validate_and_parse_as_json(payload) {
var json = payload;
if(payload) {
if( (typ... | function JSONParser() {
}
/**
* Level 0 of validation: is that string? is that JSON?
*/
function validate_and_parse_as_json(payload) {
var json = payload;
if(payload) {
if( (typeof payload) == "string"){
try {
json = JSON.parse(payload);
}catch(e) {
throw {message: "invalid jso... | Remove the responsability of spec checking | Remove the responsability of spec checking
Signed-off-by: Fabio José <34f3a7e4e4d9fe971c99ebc4af947a5309eca653@gmail.com>
| JavaScript | apache-2.0 | cloudevents/sdk-javascript,cloudevents/sdk-javascript |
d04acd77fc9ac2d911bcaf36e4714ec141645371 | lib/server/routefactory.js | lib/server/routefactory.js | 'use strict';
module.exports = function RouteFactory(options) {
return ([
require('./routes/credits'),
require('./routes/debits'),
require('./routes/users'),
require('./routes/graphql'),
require('./routes/referrals')
]).map(function(Router) {
return Router({
config: options.config,
... | 'use strict';
module.exports = function RouteFactory(options) {
return ([
require('./routes/credits'),
require('./routes/debits'),
require('./routes/users'),
require('./routes/graphql'),
require('./routes/referrals'),
require('./routes/marketing')
]).map(function(Router) {
return Router... | Add marketing route to factory | Add marketing route to factory
| JavaScript | agpl-3.0 | bryanchriswhite/billing,bryanchriswhite/billing |
ac05b52e7fbaeef5d6e09d5552da0f4a4fe17e7f | palette/js/picker-main.js | palette/js/picker-main.js | (function( window, document, undefined ) {
'use strict';
var hslEl = document.createElement( 'div' );
hslEl.classList.add( 'hsl' );
document.body.appendChild( hslEl );
window.addEventListener( 'mousemove', function( event ) {
var x = event.pageX,
y = event.pageY;
var h = x / window.innerWid... | (function( window, document, undefined ) {
'use strict';
function clamp( value, min, max ) {
return Math.min( Math.max( value, min ), max );
}
var hslEl = document.createElement( 'div' );
hslEl.classList.add( 'hsl' );
document.body.appendChild( hslEl );
var h = 0,
s = 50,
l = 50;
fun... | Use mouse wheel to control HSL lightness. | palette[picker]: Use mouse wheel to control HSL lightness.
| JavaScript | mit | razh/experiments,razh/experiments,razh/experiments |
cd8a7f8facceddf2ffa0eae165438cfa31e8044e | lib/config.js | lib/config.js | var nconf = require('nconf')
, path = require('path');
const defaults = {
username: "",
password: "",
guardcode: "",
twofactor: "",
sentryauth: false,
sentryfile: "",
autojoin: [],
"24hour": false,
userlistwidth: 26, // 26 characters
scrollback: 1000, ... | var nconf = require('nconf')
, path = require('path');
const defaults = {
username: "",
password: "",
guardcode: "",
twofactor: "",
sentryauth: false,
sentryfile: "",
autojoin: [],
"24hour": false,
userlistwidth: 26, // 26 characters
scrollback: 1000, ... | Add checkType method and prettify code | Add checkType method and prettify code
| JavaScript | mit | rubyconn/steam-chat |
9a5547d4c754d5594d2a8f64a3cb4937642e9bb1 | packages/strapi-hook-mongoose/lib/utils/index.js | packages/strapi-hook-mongoose/lib/utils/index.js | 'use strict';
/**
* Module dependencies
*/
module.exports = mongoose => {
var Decimal = require('mongoose-float').loadType(mongoose, 2);
var Float = require('mongoose-float').loadType(mongoose, 20);
return {
convertType: mongooseType => {
switch (mongooseType.toLowerCase()) {
case 'array':
... | 'use strict';
/**
* Module dependencies
*/
module.exports = mongoose => {
mongoose.Schema.Types.Decimal = require('mongoose-float').loadType(mongoose, 2);
mongoose.Schema.Types.Float = require('mongoose-float').loadType(mongoose, 20);
return {
convertType: mongooseType => {
switch (mongooseType.toL... | Fix mongoose float and decimal problems | Fix mongoose float and decimal problems
| JavaScript | mit | wistityhq/strapi,wistityhq/strapi |
43cd349bba9405b35b94678d03d65fe5ed7635b2 | lib/logger.js | lib/logger.js | 'use strict';
var aFrom = require('es5-ext/array/from')
, partial = require('es5-ext/function/#/partial')
, extend = require('es5-ext/object/extend-properties')
, ee = require('event-emitter')
, o;
o = ee(exports = {
init: function () {
this.msg = [];
this.passed = [];
this.errored = [];
thi... | 'use strict';
var aFrom = require('es5-ext/array/from')
, partial = require('es5-ext/function/#/partial')
, mixin = require('es5-ext/object/mixin')
, ee = require('event-emitter')
, o;
o = ee(exports = {
init: function () {
this.msg = [];
this.passed = [];
this.errored = [];
this.failed = [... | Update up to changes in es5-ext | Update up to changes in es5-ext
| JavaScript | isc | medikoo/tad |
4a0c00a9553977ca6c8fde6ee75eb3d3b71aae37 | app/assets/javascripts/rawnet_admin/modules/menu.js | app/assets/javascripts/rawnet_admin/modules/menu.js | var RawnetAdmin = window.RawnetAdmin || {};
RawnetAdmin.menu = function(){
function toggleNav(link) {
var active = $('#mainNav a.active'),
target = $(link.attr('href')),
activeMenu = $('#subNav nav.active');
active.removeClass('active');
activeMenu.removeClass('active');
link.addClass('ac... | var RawnetAdmin = window.RawnetAdmin || {};
RawnetAdmin.menu = function(){
function toggleNav(link) {
var active = $('#mainNav a.active'),
target = $(link.attr('href')),
activeMenu = $('#subNav nav.active');
active.removeClass('active');
activeMenu.removeClass('active');
link.addClass('ac... | Allow non-anchor links to click through normally | Allow non-anchor links to click through normally
| JavaScript | mit | rawnet/rawnet-admin,rawnet/rawnet-admin,rawnet/rawnet-admin |
773c7265e8725c87a8220c2de111c7e252becc8b | scripts/gen-nav.js | scripts/gen-nav.js | #!/usr/bin/env node
const path = require('path');
const proc = require('child_process');
const startCase = require('lodash.startcase');
const baseDir = process.argv[2];
const files = proc.execFileSync(
'find', [baseDir, '-type', 'f'], { encoding: 'utf8' },
).split('\n').filter(s => s !== '');
console.log('.API');... | #!/usr/bin/env node
const path = require('path');
const proc = require('child_process');
const startCase = require('lodash.startcase');
const baseDir = process.argv[2];
const files = proc.execFileSync(
'find', [baseDir, '-type', 'f'], { encoding: 'utf8' },
).split('\n').filter(s => s !== '');
console.log('.API');... | Change title of meta transactions page in docs sidebar | Change title of meta transactions page in docs sidebar
| JavaScript | mit | OpenZeppelin/zeppelin-solidity,OpenZeppelin/openzeppelin-contracts,OpenZeppelin/zeppelin-solidity,OpenZeppelin/openzeppelin-contracts,OpenZeppelin/zep-solidity,OpenZeppelin/openzeppelin-contracts,OpenZeppelin/zep-solidity |
bfd61aed0e339c4043d2045146be76cd11e2f7fd | .eslint-config/config.js | .eslint-config/config.js | const commonRules = require("./rules");
module.exports = {
parser: "babel-eslint",
plugins: ["react", "babel", "flowtype", "prettier", "import"],
env: {
browser: true,
es6: true,
jest: true,
node: true,
},
parserOptions: {
sourceType: "module",
ecmaFe... | const commonRules = require("./rules");
module.exports = {
parser: "babel-eslint",
plugins: ["react", "babel", "flowtype", "prettier", "import"],
env: {
browser: true,
es6: true,
jest: true,
node: true,
},
parserOptions: {
sourceType: "module",
ecmaFe... | Disable prop-types rule because Flow | Disable prop-types rule because Flow
| JavaScript | mit | moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0 |
ab8400331070068aec4878be59fc7861daf35d2a | modules/mds/src/main/resources/webapp/js/app.js | modules/mds/src/main/resources/webapp/js/app.js | (function () {
'use strict';
var mds = angular.module('mds', [
'motech-dashboard', 'entityService','instanceService', 'mdsSettingsService', 'ngCookies', 'ui.directives',
'ngRoute', 'ui.directives'
]);
$.get('../mds/available/mdsTabs').done(function(data) {
mds.constant('AVAILA... | (function () {
'use strict';
var mds = angular.module('mds', [
'motech-dashboard', 'entityService','instanceService', 'mdsSettingsService', 'ngCookies', 'ui.directives',
'ngRoute', 'ui.directives'
]);
$.ajax({
url: '../mds/available/mdsTabs',
success: function(dat... | Fix ajax error while checking available tabs | MDS: Fix ajax error while checking available tabs
Change-Id: I4f8a4d538e59dcdb03659c7f5405c40abcdafed8
| JavaScript | bsd-3-clause | smalecki/modules,wstrzelczyk/modules,sebbrudzinski/modules,1stmateusz/modules,sebbrudzinski/modules,ScottKimball/modules,pmuchowski/modules,mkwiatkowskisoldevelo/modules,martokarski/modules,frankhuster/modules,pgesek/modules,atish160384/modules,shubhambeehyv/modules,pmuchowski/modules,sebbrudzinski/modules,ScottKimball... |
10b427e9ed67937b0c09f164a518f5f408dfd050 | reactUtils.js | reactUtils.js | /**
* React-related utilities
*/
import React from 'react';
/**
* Like React.Children.forEach(), but traverses through all descendant children.
*
* @param children Children of a React element, i.e. `elem.props.children`
* @param callback {function} A function to be run for each child; parameters passed: (child,... | /**
* React-related utilities
*/
import React from 'react';
/**
* Like React.Children.forEach(), but traverses through all descendant children.
*
* @param children Children of a React element, i.e. `elem.props.children`
* @param callback {forEachCallback} A function to be run for each child
*/
export function ... | Add inline documentation for reactChildrenForEachDeep | Add inline documentation for reactChildrenForEachDeep
| JavaScript | mit | elliottsj/react-children-utils |
d0fda64c6e4db63f14c894e89a9f1faace9c7eb5 | src/components/Servers/serverReducer.js | src/components/Servers/serverReducer.js | import moment from 'moment';
import getServerList from './../../utils/getServerList';
function getInitialState() {
return {
time: undefined,
servers: getServerList().map(server => Object.assign(server, {state: 'loading', delay: 0}))
};
}
export default function serverReducer(state = getInitialState(), act... | import moment from 'moment';
import getServerList from './../../utils/getServerList';
function getInitialState() {
return {
time: undefined,
servers: getServerList().map(server => Object.assign(server, {state: 'loading', delay: 0}))
};
}
export default function serverReducer(state = getInitialState(), act... | Fix a bug in the reducer | Fix a bug in the reducer
| JavaScript | mit | jseminck/jseminck-be-main,jseminck/jseminck-be-main |
c0f0589e955cb00860f5018b12678a3c60428e9d | client/app/NewPledge/containers/ActivePledgeForm.js | client/app/NewPledge/containers/ActivePledgeForm.js | import { connect } from 'react-redux'
import merge from 'lodash/merge'
import { setEntity } from '../../lib/actions/entityActions'
import { toggleSessionPopup } from '../../UserSession/actions/SessionActions'
import PledgeForm from '../components/PledgeForm'
import updateAction from '../../lib/Form/actions/updateAction... | import { connect } from 'react-redux'
import merge from 'lodash/merge'
import I18n from 'i18n-js'
import { setEntity } from '../../lib/actions/entityActions'
import { toggleSessionPopup } from '../../UserSession/actions/SessionActions'
import PledgeForm from '../components/PledgeForm'
import updateAction from '../../li... | Use tag name translations in new pledge form | Use tag name translations in new pledge form
| JavaScript | agpl-3.0 | initiatived21/d21,initiatived21/d21,initiatived21/d21 |
b3bb2ea4896414553a2b18573310eb9b7cdc4f09 | lib/partials/in-memory.js | lib/partials/in-memory.js | 'use strict';
const parser = require('../parser');
function InMemory(partials) {
this.partials = partials;
this.compiledPartials = {};
}
InMemory.prototype.get = function (id) {
if (this.compiledPartials.hasOwnProperty(id)) return this.compiledPartials[id];
if (this.partials.hasOwnProperty(id)) {
return this.c... | 'use strict';
const parser = require('../parser');
function InMemory(partials) {
this.partials = partials;
this.compiledPartials = {};
}
InMemory.prototype.get = function (id) {
const compileTemplate = require('../../').compileTemplate;
if (this.compiledPartials.hasOwnProperty(id)) return this.compiledPartials[... | Update InMemory partials resolved to resolve compiled templates. This makes unit tests work again | Update InMemory partials resolved to resolve compiled templates. This makes unit tests work again
| JavaScript | mit | maghoff/mustachio,maghoff/mustachio,maghoff/mustachio |
985f707ada6f4299b0c886f25550bd1a932419f4 | lib/runner/run_phantom.js | lib/runner/run_phantom.js | var page = require('webpage').create();
var _ = require('underscore');
var fs = require('fs');
function stdout(str) {
fs.write('/dev/stdout', str, 'w')
}
function stderr(str) {
fs.write('/dev/stderr', str, 'w')
}
page.onAlert = stdout;
page.onConsoleMessage = stdout;
page.onError = stderr;
page.onLoadFinished =... | var page = require('webpage').create();
var _ = require('underscore');
var system = require('system');
page.onAlert = system.stdout.write;
page.onConsoleMessage = system.stdout.write;
page.onError = system.stderr.write;
page.onLoadFinished = function() {
phantom.exit(0);
};
page.open(phantom.args[0]);
| Use `system` module for phantom runner script stdout/stderr | Use `system` module for phantom runner script stdout/stderr
| JavaScript | mit | sclevine/jasmine-runner-node |
ae73a9c27835b80d3f4102b9239e16506e534c75 | packages/storybook/examples/Popover/DemoList.js | packages/storybook/examples/Popover/DemoList.js | import React from 'react';
import List from '@ichef/gypcrete/src/List';
import ListRow from '@ichef/gypcrete/src/ListRow';
import TextLabel from '@ichef/gypcrete/src/TextLabel';
function DemoList() {
return (
<List>
<ListRow>
<TextLabel basic="Row 1" />
</ListRow>
... | import React from 'react';
import { action } from '@storybook/addon-actions';
import Button from '@ichef/gypcrete/src/Button';
import List from '@ichef/gypcrete/src/List';
import ListRow from '@ichef/gypcrete/src/ListRow';
function DemoButton(props) {
return (
<Button
bold
minified... | Update example for <Popover> to verify behavior | [core] Update example for <Popover> to verify behavior
| JavaScript | apache-2.0 | iCHEF/gypcrete,iCHEF/gypcrete |
716761802895ad4a681a07e70f56532abe573075 | test/helpers/fixtures/index.js | test/helpers/fixtures/index.js | var fixtures = require('node-require-directory')(__dirname);
exports.load = function(specificFixtures) {
return exports.unload().then(function() {
if (typeof specificFixtures === 'string') {
specificFixtures = [specificFixtures];
}
var promises = [];
Object.keys(fixtures).filter(function(key) {... | var fixtures = require('node-require-directory')(__dirname);
exports.load = function(specificFixtures) {
return exports.unload().then(function() {
if (typeof specificFixtures === 'string') {
specificFixtures = [specificFixtures];
}
var promises = [];
Object.keys(fixtures).filter(function(key) {... | Fix running SET command in sqlite | Fix running SET command in sqlite
| JavaScript | mit | luin/doclab,luin/doclab |
71ed439f9f6e5e958c4aeac5522cd37dd90ec997 | app/components/Results.js | app/components/Results.js | import React, {PropTypes} from 'react';
const puke = (obj) => <pre>{JSON.stringify(obj, 2, ' ')}</pre>
const Results = React.createClass({
render() {
return (
<div>
Results: {puke(this.props)}
</div>
);
}
});
Results.propTypes = {
isLoading: PropTyp... | import React, {PropTypes} from 'react';
import {Link} from 'react-router';
import UserDetails from './UserDetails';
import UserDetailsWrapper from './UserDetailsWrapper';
const StartOver = () => {
return (
<div className="col-sm-12" style={{"margin-top": 20}}>
<Link to="/playerOne">
... | Add the score result to the UI to show the battle's winner | Add the score result to the UI to show the battle's winner
| JavaScript | mit | DiegoCardoso/github-battle,DiegoCardoso/github-battle |
0f4aa813546a29fb55e08bf67c2a659b0f85b0fa | routes/index.js | routes/index.js | var express = require('express');
var kue = require('kue');
var Bot = require('../models/bot');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index');
});
router.post('/destroy_jobs', function(req, res, next) {
kue.Job.rangeByState('delayed', 0, 10000,... | var express = require('express');
var kue = require('kue');
var Bot = require('../models/bot');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index');
});
router.post('/destroy_jobs', function(req, res, next) {
kue.Job.rangeByState('delayed', 0, 10000,... | Fix error handler on remove job | Fix error handler on remove job
| JavaScript | mit | Ecotaco/bumblebee-bot,Ecotaco/bumblebee-bot |
a2772d17f97ad597e731d3fa71b363e9a190c1dc | web-app/src/utils/api.js | web-app/src/utils/api.js | /* global localStorage */
import axios from 'axios';
export const BASE_URL = process.env.REACT_APP_API_URL;
const request = (endpoint, { headers = {}, body, ...otherOptions }, method) => {
return axios(`${BASE_URL}${endpoint}`, {
...otherOptions,
headers: {
...headers,
Authorization: `Bearer ${l... | /* global window */
import axios from 'axios';
export const BASE_URL = process.env.REACT_APP_API_URL;
const getToken = () => {
return window.localStorage.getItem('jwt.token');
};
const setToken = ({ newToken }) => {
window.localStorage.setItem('jwt.token', newToken);
};
const abstractRequest = (endpoint, { head... | Refresh JWT token if expires | Refresh JWT token if expires
| JavaScript | mit | oSoc17/code9000,oSoc17/code9000,oSoc17/code9000,oSoc17/code9000,oSoc17/code9000,oSoc17/code9000 |
801c830a6f128a09ae1575069e2e20e8457e9ce9 | api/script-rules-rule-action.vm.js | api/script-rules-rule-action.vm.js | (function() {
var rule = data.rules[parseInt(request.param.num, 10)] || null;
if (rule === null) return response.error(404);
switch (request.method) {
case 'PUT':
var cmd = '';
switch (request.param.action) {
case 'enable':
cmd = 'node app-cli.js -mode rule --enable -n ' + request.param.nu... | (function() {
var num = parseInt(request.param.num, 10).toString(10);
var rule = data.rules[num] || null;
if (rule === null) return response.error(404);
switch (request.method) {
case 'PUT':
var cmd = '';
switch (request.param.action) {
case 'enable':
cmd = 'node app-cli.js -mode rule --e... | Fix same rule parameter validation | Fix same rule parameter validation
| JavaScript | mit | miyukki/Chinachu,xtne6f/Chinachu,xtne6f/Chinachu,kounoike/Chinachu,kounoike/Chinachu,xtne6f/Chinachu,valda/Chinachu,valda/Chinachu,kanreisa/Chinachu,polamjag/Chinachu,wangjun/Chinachu,miyukki/Chinachu,polamjag/Chinachu,kanreisa/Chinachu,valda/Chinachu,miyukki/Chinachu,kounoike/Chinachu,wangjun/Chinachu,wangjun/Chinachu... |
80c24f86d0ed9655f74c710f11a59bc050df5432 | app/assets/javascripts/spree/apps/checkout/checkout_controller.js | app/assets/javascripts/spree/apps/checkout/checkout_controller.js | SpreeStore.module('Checkout',function(Checkout, SpreeStore, Backbone,Marionette,$,_){
Checkout.Controller = {
show: function(state) {
SpreeStore.noSidebar()
order = new SpreeStore.Models.Order({ number: SpreeStore.current_order_id })
order.fetch({
data: $.param({ order_token: SpreeStore.... | SpreeStore.module('Checkout',function(Checkout, SpreeStore, Backbone,Marionette,$,_){
Checkout.Controller = {
show: function(state) {
SpreeStore.noSidebar()
order = new SpreeStore.Models.Order({ number: SpreeStore.current_order_id })
order.fetch({
data: $.param({ order_token: SpreeStore.... | Clear localStorage order variables when order is complete | Clear localStorage order variables when order is complete
| JavaScript | bsd-3-clause | njaw/spree,njaw/spree,njaw/spree |
8ee09efd28cfce24b0d712d5a1713caef4dd6819 | app/assets/javascripts/comments.js | app/assets/javascripts/comments.js | /* All related comment actions will be managed here */
/* appending comment see views/comments/create.js.erb */
$(function(){
// declare variables for link, button, form ids
var viewCommentForm = '#view_comment_form';
var commentForm = '#comment_form';
var newComment = '#new_comment';
toggleLink(commentFor... | /* All related comment actions will be managed here */
/* appending comment see views/comments/create.js.erb */
$(function(){
// declare variables for link, button, form ids
var viewCommentForm = '#view_comment_form';
var commentForm = '#comment_form';
var newComment = '#new_comment';
toggleLink(commentFor... | Clean up file and remove editor text on submit | Clean up file and remove editor text on submit
| JavaScript | mit | pratikmshah/myblog,pratikmshah/myblog,pratikmshah/myblog |
6e0974dc5db259931419a64cd4d13a61425283b5 | app/components/DeleteIcon/index.js | app/components/DeleteIcon/index.js | import React, { Component, PropTypes } from 'react';
import { openModal } from 'actions/uiActions';
import Icon from 'utils/icons';
import ConfirmModal from '../Modals/ConfirmModal';
export default class DeleteIcon extends Component {
static propTypes = {
onClick: PropTypes.func.isRequired,
message: PropType... | import React, { Component, PropTypes } from 'react';
import { openModal } from 'actions/uiActions';
import Icon from 'utils/icons';
import ConfirmModal from '../Modals/ConfirmModal';
export default class DeleteIcon extends Component {
static propTypes = {
onClick: PropTypes.func.isRequired,
message: PropType... | Fix defaults for DeleteIcon message | :wrench: Fix defaults for DeleteIcon message
| JavaScript | mit | JasonEtco/flintcms,JasonEtco/flintcms |
aadce336447569e40160034e87fa3e674540239d | routes/api.js | routes/api.js | var express = require('express');
_ = require('underscore')._
var request = require('request');
var router = express.Router({mergeParams: true});
var exec = require('child_process').exec;
var path = require('path');
var parentDir = path.resolve(process.cwd());
var jsonStream = require('express-jsonstream');
router.g... | var express = require('express');
_ = require('underscore')._
var request = require('request');
var router = express.Router({mergeParams: true});
var exec = require('child_process').exec;
var path = require('path');
var parentDir = path.resolve(process.cwd());
router.get('/', function(req, res, next) {
res.json({... | Revert back to limited situation | Revert back to limited situation
| JavaScript | mit | ControCurator/controcurator,ControCurator/controcurator,ControCurator/controcurator |
2268bfb7be50412878eaa38627ab0a06c981aef8 | assets/js/EditorApp.js | assets/js/EditorApp.js | var innerInitialize = function() {
console.log("It's the editor, man");
} | $(document).ready(function() {
innerInitialize();
});
var innerInitialize = function() {
// Create the canvas and context
initCanvas($(window).width(), $(window).height());
// initialize the camera
camera = new Camera();
} | Create the canvas on editor start | Create the canvas on editor start
| JavaScript | mit | Tactique/jswars |
77f69e6f30817e31a34203cce6dbdbdc6eed86dd | server/app.js | server/app.js | // node dependencies
var express = require('express');
var db = require('./db');
var passport = require('passport');
var morgan = require('morgan');
var parser = require('body-parser');
// custom dependencies
var db = require('../db/Listings.js');
var db = require('../db/Users.js');
var db = require('../db/Categories... | // node dependencies
var express = require('express');
var session = require('express-session');
var passport = require('passport');
var morgan = require('morgan');
var parser = require('body-parser');
// custom dependencies
var db = require('../db/db.js');
// var db = require('../db/Listings.js');
// var db = require... | Fix db-connect commit (to working server state!) | Fix db-connect commit (to working server state!)
- Note: eventually, the node directive that requires 'db.js' will be
replaced by the commented out directives that require the
Listings/Users/Categories models.
| JavaScript | mit | aphavichitr/hackifieds,glistening-gibus/hackifieds,Hackifieds/hackifieds,glistening-gibus/hackifieds,Hackifieds/hackifieds,glistening-gibus/hackifieds,aphavichitr/hackifieds |
a394119b4badf2fda57fa48989bff0e9810b7c79 | server-dev.js | server-dev.js | import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
import config from './webpack.config.babel';
import open from 'open';
const webpackServer = new WebpackDevServer(webpack(config), config.devServer);
webpackServer.listen(config.port, 'localhost', (err) => {
if (err) {
console.log(... | /* eslint no-console: 0 */
import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
import config from './webpack.config.babel';
import open from 'open';
const webpackServer = new WebpackDevServer(webpack(config), config.devServer);
webpackServer.listen(config.port, 'localhost', (err) => {
... | Allow console.log statement in server | Allow console.log statement in server
| JavaScript | mit | frostney/react-app-starterkit,frostney/react-app-starterkit |
c313bafe3cf063cf0f32318363050f4cce43afae | www/cdvah/js/app.js | www/cdvah/js/app.js |
var myApp = angular.module('CordovaAppHarness', ['ngRoute']);
myApp.config(['$routeProvider', function($routeProvider){
$routeProvider.when('/', {
templateUrl: 'views/list.html',
controller: 'ListCtrl'
});
$routeProvider.when('/add', {
templateUrl: 'views/add.html',
contro... |
var myApp = angular.module('CordovaAppHarness', ['ngRoute']);
myApp.config(['$routeProvider', function($routeProvider){
$routeProvider.when('/', {
templateUrl: 'views/list.html',
controller: 'ListCtrl'
});
$routeProvider.when('/add', {
templateUrl: 'views/add.html',
contro... | Use updated symbol path for file-system-roots plugin | Use updated symbol path for file-system-roots plugin
| JavaScript | apache-2.0 | guozanhua/chrome-app-developer-tool,apache/cordova-app-harness,guozanhua/chrome-app-developer-tool,feedhenry/cordova-app-harness,feedhenry/cordova-app-harness,apache/cordova-app-harness,apache/cordova-app-harness,feedhenry/cordova-app-harness,guozanhua/chrome-app-developer-tool,apache/cordova-app-harness,guozanhua/chro... |
67b10db38f23873d832009c29519b57fb1e769e2 | blueocean-web/gulpfile.js | blueocean-web/gulpfile.js | //
// See https://github.com/jenkinsci/js-builder
//
var builder = require('@jenkins-cd/js-builder');
// Disable js-builder based linting for now.
// Will get fixed with https://github.com/cloudbees/blueocean/pull/55
builder.lint('none');
//
// Create the main "App" bundle.
// generateNoImportsBundle makes it easier ... | //
// See https://github.com/jenkinsci/js-builder
//
var builder = require('@jenkins-cd/js-builder');
// Disable js-builder based linting for now.
// Will get fixed with https://github.com/cloudbees/blueocean/pull/55
builder.lint('none');
// Explicitly setting the src paths in order to allow the rebundle task to
// w... | Watch for changes in the JDL package (rebundle) | Watch for changes in the JDL package (rebundle)
| JavaScript | mit | ModuloM/blueocean-plugin,kzantow/blueocean-plugin,jenkinsci/blueocean-plugin,tfennelly/blueocean-plugin,jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,kzantow/blueocean-plugin,jenkinsci/blueocean-plugin,tfennelly/blueocean-plugin,ModuloM/blueocean-plugin,alvarolobato/blueocean-plugin,kzantow/blueocean-plugin,jen... |
80a8734522b5aaaf12ff2fb4e1f93500bd33b423 | src/Backdrop.js | src/Backdrop.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, StyleSheet, TouchableWithoutFeedback, Animated } from 'react-native';
import { OPEN_ANIM_DURATION, CLOSE_ANIM_DURATION } from './constants';
class Backdrop extends Component {
constructor(...args) {
super(...args);
... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, StyleSheet, TouchableWithoutFeedback, Animated, Platform } from 'react-native';
import { OPEN_ANIM_DURATION, CLOSE_ANIM_DURATION } from './constants';
class Backdrop extends Component {
constructor(...args) {
super(...a... | Fix web warning about useNativeDriver | Fix web warning about useNativeDriver
| JavaScript | isc | instea/react-native-popup-menu |
48b03917df05a8c9892a3340d93ba4b92b16b81c | client/config/environment.js | client/config/environment.js | /* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'client',
environment: environment,
baseURL: '/',
locationType: 'auto',
'ember-simple-auth-token': {
serverTokenEndpoint: 'http://localhost:8080/api-token-auth/',
serverTokenRefreshEndpoint: 'h... | /* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'client',
environment: environment,
baseURL: '/',
locationType: 'auto',
'ember-simple-auth-token': {
serverTokenEndpoint: 'http://localhost:8080/api-token-auth/',
serverTokenRefreshEndpoint: 'h... | Adjust the time factor to align frontent and backend auth. | Adjust the time factor to align frontent and backend auth.
Fixes #27
| JavaScript | bsd-2-clause | mblayman/lcp,mblayman/lcp,mblayman/lcp |
9d19611474e61db68fcf2f7b9ee8505fea59092e | src/Camera.js | src/Camera.js | /**
* @depends MatrixStack.js
*/
var Camera = new Class({
initialize: function() {
this.projection = new MatrixStack();
this.modelview = new MatrixStack();
},
perspective: function(fovy, aspect, near, far) {
mat4.perspective(fovy, aspect, near, far, this.projection);
},
o... | /**
* @depends MatrixStack.js
*/
var Camera = new Class({
initialize: function() {
this.projection = new MatrixStack();
this.modelview = new MatrixStack();
},
perspective: function(fovy, aspect, near, far) {
mat4.perspective(fovy, aspect, near, far, this.projection.matrix);
},... | Make camera function actually affect the matrices | Make camera function actually affect the matrices
| JavaScript | mit | oampo/webglet |
1a3aeafe8f22d5e80276a7e0caaae99a274f2641 | Analyser/src/External.js | Analyser/src/External.js | /* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes.kinder@rhul.ac.uk) for details or support | LICENSE.md for license details */
"use strict";
/**
* This is a function that detects whether we ... | /* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes.kinder@rhul.ac.uk) for details or support | LICENSE.md for license details */
"use strict";
export default function (library) {
return requir... | Remove external electron link as we're rethinking that for now | Remove external electron link as we're rethinking that for now
| JavaScript | mit | ExpoSEJS/ExpoSE,ExpoSEJS/ExpoSE,ExpoSEJS/ExpoSE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.