commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 624 | message stringlengths 15 4.7k | lang stringclasses 3
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
7bfa2357a3764c9979d078a459759bcfd94f8e46 | blueprints/telling-stories/index.js | blueprints/telling-stories/index.js | /*jshint node:true*/
var existsSync = require('exists-sync');
module.exports = {
description: 'Install telling-stories dependencies',
normalizeEntityName: function() {},
afterInstall: function() {
// Register shutdown animation to the end of every acceptance test
if (existsSync('tests/helpers/module-f... | /*jshint node:true*/
var existsSync = require('exists-sync');
module.exports = {
description: 'Install telling-stories dependencies',
normalizeEntityName: function() {},
afterInstall: function() {
// Register shutdown animation to the end of every acceptance test
if (existsSync('tests/helpers/module-f... | Update bluprint to install latest telling-stories-dashboard | Update bluprint to install latest telling-stories-dashboard
| JavaScript | mit | mvdwg/telling-stories,mvdwg/telling-stories |
819345213938c7b6df4eaeb2dac2c39b2078e1d0 | public/javascripts/app/views/gameController.js | public/javascripts/app/views/gameController.js | define([
'Backbone',
//Collection
'app/collections/games'
], function(
Backbone,
Games
){
var GameController = Backbone.View.extend({
events: {
'keyup .js-create-game' : 'create'
},
initialize: function(){
this.collection = new Games(this.options.projectId);
this.colle... | define([
'Backbone',
//Collection
'app/collections/games',
//Template
'text!templates/project-page/gameTemplate.html',
], function(
Backbone,
//Collection
Games,
//Template
gameTemplate
){
var GameController = Backbone.View.extend({
template: _.template(gameTemplate),
events: {
... | Add game logic on game controller | front-end: Add game logic on game controller
| JavaScript | mit | tangosource/pokerestimate,tangosource/pokerestimate |
56c2e6b543e51ec44a5bcb133ef9511c50d0f4ff | ui/src/shared/middleware/errors.js | ui/src/shared/middleware/errors.js | // import {replace} from 'react-router-redux'
import {authExpired} from 'shared/actions/auth'
import {publishNotification as notify} from 'shared/actions/notifications'
import {HTTP_FORBIDDEN} from 'shared/constants'
const notificationsBlackoutDuration = 5000
let allowNotifications = true // eslint-disable-line
cons... | import {authExpired} from 'shared/actions/auth'
import {publishNotification as notify} from 'shared/actions/notifications'
import {HTTP_FORBIDDEN} from 'shared/constants'
const actionsAllowedDuringBlackout = ['@@', 'AUTH_', 'ME_', 'NOTIFICATION_', 'ERROR_']
const notificationsBlackoutDuration = 5000
let allowNotifica... | Refactor error middleware to suppress redux actions after auth expires and always show correct logout reason error notification | Refactor error middleware to suppress redux actions after auth expires and always show correct logout reason error notification
| JavaScript | mit | mark-rushakoff/influxdb,influxdb/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,influxdb/influxdb,nooproblem/influxdb,nooproblem/influxdb,influxdata/influxdb,ma... |
2825711cff4a32829bfa94afb00ec5168f524382 | webapp/src/ui/view/sidenav-view.js | webapp/src/ui/view/sidenav-view.js | const Backbone = require('backbone');
require('backbone.marionette');
const Repository = require('../../domain/repository');
const TeamItemViewTemplate = require('../template/team-item-view-template.hbs');
const Template = require('../template/sidenav-view-template.hbs');
const TeamItemView = Backbone.Marionette.View.... | const Backbone = require('backbone');
require('backbone.marionette');
const Repository = require('../../domain/repository');
const TeamItemViewTemplate = require('../template/team-item-view-template.hbs');
const Template = require('../template/sidenav-view-template.hbs');
const TeamItemView = Backbone.Marionette.View.... | Hide sidenav when selecting team | Hide sidenav when selecting team
| JavaScript | mit | hagifoo/gae-pomodoro,hagifoo/gae-pomodoro,hagifoo/gae-pomodoro |
00e9721fef7c4438a6fae92ace89fbd59397912d | public/app/services/searchService.js | public/app/services/searchService.js | (function () {
'use strict';
define(
[
'lodash',
'jquery'
],
function (_, $) {
return function (baseUrl, ajaxOptions, noCache, logErrors) {
var queryString;
queryString = function (parameters) {
ret... | (function () {
'use strict';
define(
[
'lodash',
'jquery'
],
function (_, $) {
return function (baseUrl, ajaxOptions, noCache, logErrors) {
var queryString;
queryString = function (parameters) {
ret... | Fix issue with brackets in generated queries. | Fix issue with brackets in generated queries.
| JavaScript | mit | rwahs/research-frontend,rwahs/research-frontend |
82344afed3636343877719fa3aa03377ec6c4159 | app/assets/javascripts/student_signup.js | app/assets/javascripts/student_signup.js | var studentSignUp = function(timeslot_id){
var data = {};
data.subject = $("#subject-input").val();
$("#modal_remote").modal('hide');
$.ajax({
data: data,
type: "PATCH",
url: "/api/timeslots/" + timeslot_id,
beforeSend: customBlockUi(this)
}).done(function(){
swal({
... | var studentSignUp = function(timeslot_id){
var data = {};
data.subject = $("#subject-input").val();
$("#modal_remote").modal('hide');
$.ajax({
data: data,
type: "PATCH",
url: "/api/timeslots/" + timeslot_id,
beforeSend: customBlockUi(this)
}).done(function(){
swal({
... | Add timer and remove confirm buttonk, overall cleanup for better ux | Add timer and remove confirm buttonk, overall cleanup for better ux
| JavaScript | mit | theresaboard/theres-a-board,theresaboard/theres-a-board,theresaboard/theres-a-board |
49dfd4fea21ee7868a741c770db551c6e3bcdf5b | commonjs/frontend-core.js | commonjs/frontend-core.js | var _ = require('underscore');
_.extend(Array.prototype, {
//deprecated! -> forEach (ist auch ein JS-Standard!)
each: function(fn, scope) {
_.each(this, fn, scope);
},
//to use array.forEach directly
forEach: function(fn, scope) {
_.forEach(this, fn, scope);
}
});
if (typeof A... | var _ = require('underscore');
if (typeof Array.prototype.forEach != 'function') {
Array.prototype.forEach = function (fn, scope) {
_.forEach(this, fn, scope);
};
}
//source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
if (!Function.prototype.bind) {
... | Revert "Revert "set only forEach globally for Array.prototyp if not exists (ie8 fallback)"" | Revert "Revert "set only forEach globally for Array.prototyp if not exists (ie8 fallback)""
This reverts commit 86586d27805750e77dd598669d12336be35c4d51.
| JavaScript | bsd-2-clause | kaufmo/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework |
dfd8429c117fa2bf0af2a336807d40296b68ab84 | frontend/src/shogi/pieces/nullPiece.js | frontend/src/shogi/pieces/nullPiece.js | import Base from './base';
import * as CONST from '../constants/pieceTypes';
export default class NullPiece extends Base {
constructor({ type, x, y, movable = false, isPlaced = false }) {
super({ type, x, y, movable, isPlaced });
this.type = CONST.USI_NULL_TYPE;
return this;
}
promote() {
retur... | import Base from './base';
import * as CONST from '../constants/pieceTypes';
export default class NullPiece extends Base {
constructor({ type, x, y, movable = false, isPlaced = false }) {
super({ type, x, y, movable, isPlaced });
this.type = CONST.USI_NULL_TYPE;
return this;
}
promote() {
retur... | Add `toOpponentPiece` method for NullPiece | Add `toOpponentPiece` method for NullPiece
* return undefined. because NullPiece can't captured.
| JavaScript | mit | mgi166/usi-front,mgi166/usi-front |
eb05d0a5b3b2fd16b1056d23118f1bfc093cb00f | GruntFile.js | GruntFile.js | module.exports = function(grunt) {
grunt.config.init({
pkg: grunt.file.readJSON('package.json')
});
grunt.loadNpmTasks('grunt-eslint');
grunt.config('eslint', {
dist: {
options: {
configFile: '.eslintrc',
},
src: ['touchtap-event.js']
}
});
grunt.loadNpmTasks('grunt-... | module.exports = function(grunt) {
grunt.config.init({
pkg: grunt.file.readJSON('package.json')
});
grunt.loadNpmTasks('grunt-eslint');
grunt.config('eslint', {
dist: {
options: {
configFile: '.eslintrc',
},
src: ['touchtap-event.js']
}
});
grunt.loadNpmTasks('grunt-... | Move eslint in to test grunt task | Move eslint in to test grunt task
| JavaScript | mit | Tyriar/touchtap-event,Tyriar/touchtap-event |
66deb115264bfccba20ce5daac9ee252febd245d | test/index.js | test/index.js | var PI = require("../lib");
// Two decimals
console.log(PI(3));
console.log(PI(16));
// 100 decimals
console.log(PI(100));
| var PI = require("../lib");
// Two decimals
console.log("3." + PI(3));
console.log("3." + PI(16));
// 100 decimals
console.log("3." + PI(1000));
| Prepend "3." since the function returns the decimals. | Prepend "3." since the function returns the decimals.
| JavaScript | mit | IonicaBizau/pi-number |
5af9b4617fd2f0fc3e613d6695ec876814deb793 | test/setup.js | test/setup.js | /*!
* React Native Autolink
*
* Copyright 2016-2019 Josh Swan
* Released under the MIT license
* https://github.com/joshswan/react-native-autolink/blob/master/LICENSE
*/
import Adapter from 'enzyme-adapter-react-16';
import Enzyme from 'enzyme';
Enzyme.configure({ adapter: new Adapter() });
require('react-nati... | /*!
* React Native Autolink
*
* Copyright 2016-2019 Josh Swan
* Released under the MIT license
* https://github.com/joshswan/react-native-autolink/blob/master/LICENSE
*/
import Adapter from 'enzyme-adapter-react-16';
import Enzyme from 'enzyme';
Enzyme.configure({ adapter: new Adapter() });
require('react-nati... | Fix transpiling issue in tests | Fix transpiling issue in tests
| JavaScript | mit | joshswan/react-native-autolink,joshswan/react-native-autolink |
5f328870bf71aecd4f6621263474b3feda9c0729 | src/hooks/usePageReducer.js | src/hooks/usePageReducer.js | import { useReducer, useCallback } from 'react';
import getReducer from '../pages/dataTableUtilities/reducer/getReducer';
import getColumns from '../pages/dataTableUtilities/columns';
import { debounce } from '../utilities/index';
/**
* useReducer wrapper for pages within the app. Creaates a
* composed reducer throu... | import { useReducer, useCallback } from 'react';
import getReducer from '../pages/dataTableUtilities/reducer/getReducer';
import getColumns from '../pages/dataTableUtilities/columns';
import { debounce } from '../utilities/index';
/**
* useReducer wrapper for pages within the app. Creates a
* composed reducer throug... | Add update to useReducer comments | Add update to useReducer comments
Co-Authored-By: Chris Petty <637933a5c948ed3d23257417b9455449bf8cfd77@gmail.com> | JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile |
66768e0aae1eeb622d0a901ee376d3f4d108f765 | test/karma.config.js | test/karma.config.js | const serverEndpoints = require('./server')
module.exports = function(config) {
config.set({
basePath: '..',
frameworks: ['detectBrowsers', 'mocha', 'chai'],
detectBrowsers: {
preferHeadless: true,
usePhantomJS: false
},
client: {
mocha: {
ui: 'tdd'
}
},
fi... | const serverEndpoints = require('./server')
module.exports = function(config) {
config.set({
basePath: '..',
frameworks: ['detectBrowsers', 'mocha', 'chai'],
detectBrowsers: {
preferHeadless: true,
usePhantomJS: false,
postDetection: availableBrowsers =>
availableBrowsers.map(br... | Bring back `--no-sandbox` for Travis CI compatibility | Bring back `--no-sandbox` for Travis CI compatibility
| JavaScript | mit | github/fetch,aleclarson/fetch |
386fbab3484a3bec5c2dcb538825c17979c0233e | lib/assets/javascripts/drop.js | lib/assets/javascripts/drop.js | //= require ./core
//= require ./config
//= require_self
//= require_tree ./routers
//= require_tree ./views
//= require_tree ./models
(function () {
var Drop = window.Drop;
_.extend(Drop, Marbles.Events, {
Models: {},
Collections: {},
Routers: {},
Helpers: {
fullPath: function (path) {
prefix = Dr... | //= require ./core
//= require ./config
//= require_self
//= require_tree ./routers
//= require_tree ./views
//= require_tree ./models
(function () {
var Drop = window.Drop;
_.extend(Drop, Marbles.Events, {
Views: {},
Models: {},
Collections: {},
Routers: {},
Helpers: {
fullPath: function (path) {
... | Add Drop.Views object to hold React components | Add Drop.Views object to hold React components
| JavaScript | bsd-3-clause | cupcake/files-web,cupcake/files-web |
74c191b2f5058ecff0755b44eb55f79953e13808 | blueprints/ember-sweetalert/index.js | blueprints/ember-sweetalert/index.js | module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {}
};
| module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addBowerPackageToProject('sweetalert2', '^6.1.0');
}
};
| Add bower package to project | Add bower package to project
Believe this will fix issue #3, plus is desired behaviour anyway because you need the installing Ember project to have sweetalert2 installed via bower. | JavaScript | mit | Tonkpils/ember-sweetalert,Tonkpils/ember-sweetalert |
484d74160b829a5e75011c62224cbb149f0b236e | src/color/GradientStop.js | src/color/GradientStop.js | var GradientStop = Base.extend({
beans: true,
// TODO: support midPoint? (initial tests didn't look nice)
initialize: function(color, rampPoint) {
this.color = Color.read([color]);
this.rampPoint = rampPoint !== null ? rampPoint : 0;
},
getRampPoint: function() {
return this._rampPoint;
},
setRampPoin... | var GradientStop = Base.extend({
beans: true,
// TODO: support midPoint? (initial tests didn't look nice)
initialize: function(color, rampPoint) {
this._color = Color.read([color]);
this._rampPoint = rampPoint !== null ? rampPoint : 0;
},
getRampPoint: function() {
return this._rampPoint;
},
setRampPo... | Set private properties directly in initialize(), no need to call setters. | Set private properties directly in initialize(), no need to call setters.
| JavaScript | mit | EskenderDev/paper.js,baiyanghese/paper.js,li0t/paper.js,nancymark/paper.js,luisbrito/paper.js,iconexperience/paper.js,luisbrito/paper.js,fredoche/paper.js,JunaidPaul/paper.js,superjudge/paper.js,lehni/paper.js,ClaireRutkoske/paper.js,baiyanghese/paper.js,0/paper.js,ClaireRutkoske/paper.js,legendvijay/paper.js,superjudg... |
1a55b57d10c44c0e036cf1a5d0ee35ab3b79a90e | lib/Helper/EventHandlerHelper.js | lib/Helper/EventHandlerHelper.js | "use babel";
import { Emitter } from 'atom'
export default class EventHandlerHelper
{
constructor()
{
this.emitter = new Emitter();
}
onClose(callback)
{
this.emitter.on("maperwiki-wordcount-close",callback);
}
close()
{
this.emitter.emit("maperwiki-wordcount-close");
}
onViewWordcoun... | "use babel";
import { Emitter } from 'atom'
export default class EventHandlerHelper
{
constructor()
{
this.emitter = new Emitter();
}
onClose(callback)
{
return this.emitter.on("maperwiki-wordcount-close",callback);
}
close()
{
this.emitter.emit("maperwiki-wordcount-close");
}
onViewW... | Patch for Event handler (second try) :) | Patch for Event handler (second try) :)
Real patch for event handler...
| JavaScript | mit | rkaradas/MaPerWiki,rkaradas/MaPerWiki |
48acd862586847ef3d9310c5be4467aa3481744f | docs/src/pages/Home/counterCode.js | docs/src/pages/Home/counterCode.js | export default `import { h, app } from "hyperapp"
app({
init: 0,
view: state =>
h("div", {}, [
h("h1", {}, state),
h("button", { onclick: state => state - 1 }, "subtract"),
h("button", { onclick: state => state + 1 }, "add")
]),
node: document.getElementById("app")
})`
| export default `import { h, app } from "hyperapp"
app({
init: 0,
view: state =>
h("div", {}, [
h("h1", {}, state),
h("button", { onclick: state => state - 1 }, "substract"),
h("button", { onclick: state => state + 1 }, "add")
]),
node: document.getElementById("app")
})`
| Fix typo in counter app | Fix typo in counter app | JavaScript | mit | jbucaran/hyperapp,hyperapp/hyperapp,hyperapp/hyperapp |
dd2b6eb07efe252559f82dde5eb5a6e084f0d859 | src/main/javascript/list.js | src/main/javascript/list.js | var Vue = require('vue');
var CommentService = require('./services/comment-service.js');
var template = require('./list.html');
new Vue({
el: '#platon-comment-thread',
render: template.render,
staticRenderFns: template.staticRenderFns,
data: {
loading: true,
comments: []
},
... | var Vue = require('vue');
var CommentService = require('./services/comment-service.js');
var template = require('./list.html');
new Vue({
el: '#platon-comment-thread',
render: template.render,
staticRenderFns: template.staticRenderFns,
data: {
loading: true,
comments: []
},
... | Use url path instead of full url for threads | Use url path instead of full url for threads
| JavaScript | apache-2.0 | pvorb/platon,pvorb/platon,pvorb/platon |
1c97af1dba133a014295c692135c2c194b500435 | example/src/app.js | example/src/app.js |
var App = Ember.Application.create();
App.Boards = ['common', 'intermediate', 'advanced'];
App.Host = "http://localhost:5984";
|
var App = Ember.Application.create();
App.Boards = ['common', 'intermediate', 'advanced'];
App.Host = "http://ember-couchdb-kit.roundscope.pw:15984";
| Revert "reverted change of couchdb host" | Revert "reverted change of couchdb host"
This reverts commit 6d60341ba077ef645c1f2f6dbf8a4030e07b2812.
| JavaScript | mit | Zatvobor/ember-couchdb-kit,ValidUSA/ember-couch,Zatvobor/ember-couchdb-kit,ValidUSA/ember-couch |
48992018fc9bb6fa38bac553fe2132ce84a50a8a | server/Media/FileScanner/getFiles.js | server/Media/FileScanner/getFiles.js | const debug = require('debug')
const log = debug('app:media:fileScanner:getFiles')
const { promisify } = require('util')
const { resolve } = require('path')
const fs = require('fs')
const readdir = promisify(fs.readdir)
const stat = promisify(fs.stat)
async function getFiles (dir, extra) {
let list = []
try {
... | const { promisify } = require('util')
const { resolve } = require('path')
const fs = require('fs')
const readdir = promisify(fs.readdir)
const stat = promisify(fs.stat)
async function getFiles (dir, extra) {
const list = await readdir(dir)
const files = await Promise.all(list.map(async (item) => {
const file ... | Fix path offline detection (don't catch readdir() errors) | Fix path offline detection (don't catch readdir() errors)
| JavaScript | isc | bhj/karaoke-forever,bhj/karaoke-forever |
0ef64c70248efaf7cd051d7d3d4db619cdae5589 | ember_debug/models/profile_node.js | ember_debug/models/profile_node.js | /**
A tree structure for assembling a list of render calls so they can be grouped and displayed nicely afterwards.
@class ProfileNode
**/
var ProfileNode = function(start, payload, parent) {
this.start = start;
this.timestamp = Date.now();
if (payload) {
if (payload.template) { this.name = payload.templa... | /**
A tree structure for assembling a list of render calls so they can be grouped and displayed nicely afterwards.
@class ProfileNode
**/
var ProfileNode = function(start, payload, parent) {
this.start = start;
this.timestamp = Date.now();
if (payload) {
if (payload.template) { this.name = payload.templa... | Clean up view name in render performance tree | Clean up view name in render performance tree
| JavaScript | mit | karthiick/ember-inspector,Patsy-issa/ember-inspector,jryans/ember-inspector,knownasilya/ember-inspector,chrisgame/ember-inspector,chrisgame/ember-inspector,jayphelps/ember-inspector,Patsy-issa/ember-inspector,jayphelps/ember-inspector,sly7-7/ember-inspector,teddyzeenny/ember-inspector,pete-the-pete/ember-inspector,embe... |
99c293ce2bd0f0e5ac297d62b1b158a9b4208d5d | slurp/src/main/webapp/scripts/init-firebase.js | slurp/src/main/webapp/scripts/init-firebase.js | // Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | // Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | Add initializaton of Cloud Firestore instance for use accross all scripts. | Add initializaton of Cloud Firestore instance for use accross all scripts.
| JavaScript | apache-2.0 | googleinterns/SLURP,googleinterns/SLURP,googleinterns/SLURP |
1029d50240901af797ee62816b02afaafb9b5ec2 | src/editor/deposittool.js | src/editor/deposittool.js | import * as PIXI from 'pixi.js';
import PlaceTool from './placetool';
import {createLogDepositGraphics} from '../game/logdeposit';
export default class DepositTool extends PlaceTool {
constructor(stage, level) {
super(stage, level);
var pointerGraphics = createLogDepositGraphics();
this.pointerContainer... | import * as PIXI from 'pixi.js';
import PlaceTool from './placetool';
import {createLogDepositGraphics} from '../game/logdeposit';
export default class DepositTool extends PlaceTool {
constructor(stage, level) {
super(stage, level);
var pointerGraphics = createLogDepositGraphics();
this.pointerContainer... | Fix editor crashing when adding log deposit | Fix editor crashing when adding log deposit
| JavaScript | mit | gaviarctica/forestry-game-frontend,gaviarctica/forestry-game-frontend |
056be57007a61135c167b4474bca96b015e8b34b | cfg/.vim/templates/react-native/fire.js | cfg/.vim/templates/react-native/fire.js | 'use strict';
import React, { PropTypes, Component } from 'react';
import { InteractionManager } from 'react-native';
import SkeletonNameHOC from './skeleton-name.hoc.js';
export default class FierySkeletonName extends Component {
constructor(props) {
super(props);
}
static propTypes = {
db: PropTypes.... | 'use strict';
import React, { PropTypes, Component } from 'react';
import { InteractionManager } from 'react-native';
import SkeletonNameHOC from './skeleton-name.hoc.js';
export default class FierySkeletonName extends Component {
constructor(props) {
super(props);
}
static propTypes = {}
render() {
... | Remove db from props in template | Remove db from props in template
Now that I have a React Native project where I take db and friends from
context, I find that the automatic db in propTypes is a hassle to
delete, so I've removed it for now.
| JavaScript | mit | igemnace/vim-config,igemnace/my-vim-config,igemnace/vim-config,igemnace/vim-config |
1e9c3b9c669c78e42fa9b6636ae72f5499b2175e | tests/directivesSpec.js | tests/directivesSpec.js | (function () {
'use strict';
describe('directives module', function () {
var $compile,
$rootScope,
DropletMock;
beforeEach(module('directives'));
beforeEach(inject(function ($injector) {
$compile = $injector.get('$compile');
$rootScope = $i... | (function () {
'use strict';
describe('directives module', function () {
var $compile,
$rootScope,
DropletMock;
beforeEach(module('directives'));
beforeEach(inject(function ($injector) {
$compile = $injector.get('$compile');
$rootScope = $i... | Add cpus directive unit test | Add cpus directive unit test
| JavaScript | mit | DojoGeekRA/DigitalOcean,DojoGeekRA/DigitalOcean |
756929079aaf1dbef8b869d917e0fc8a0f4f3a10 | examples/vue-apollo/nuxt.config.js | examples/vue-apollo/nuxt.config.js | module.exports = {
build: {
vendor: ['vue-apollo', 'apollo-client']
},
router: {
middleware: 'apollo'
},
plugins: [
// Will inject the plugin in the $root app and also in the context as `i18n`
{ src: '~plugins/apollo.js', injectAs: 'apolloProvider' }
]
}
| module.exports = {
build: {
vendor: ['vue-apollo', 'apollo-client']
},
router: {
middleware: 'apollo'
},
plugins: [
// Will inject the plugin in the $root app and also in the context as `apolloProvider`
{ src: '~plugins/apollo.js', injectAs: 'apolloProvider' }
]
}
| Fix copy paste typo in the comments | Fix copy paste typo in the comments | JavaScript | mit | jfroffice/nuxt.js,mgesmundo/nuxt.js,mgesmundo/nuxt.js,jfroffice/nuxt.js |
239bc0fe0eeae2c309902e2b56dafbd2298cb3aa | app/services/logger.js | app/services/logger.js | import Ember from "ember";
import config from "../config/environment";
export default Ember.Service.extend({
session: Ember.inject.service(),
rollbar: Ember.inject.service(),
getReason(reason) {
return reason instanceof Error || typeof reason !== "object" ?
reason : JSON.stringify(reason);
},
... | import Ember from "ember";
import config from "../config/environment";
export default Ember.Service.extend({
session: Ember.inject.service(),
rollbar: Ember.inject.service(),
getReason(reason) {
return reason instanceof Error || typeof reason !== "object" ?
reason : JSON.stringify(reason);
},
... | Use currenUser instead of getting it from session | Use currenUser instead of getting it from session
| JavaScript | mit | crossroads/shared.goodcity,crossroads/shared.goodcity |
3689be16a26bd3f95eda6c57a4232952f6a87eca | ghost/admin/utils/codemirror-mobile.js | ghost/admin/utils/codemirror-mobile.js | /*global CodeMirror*/
import mobileUtils from 'ghost/utils/mobile-utils';
import createTouchEditor from 'ghost/assets/lib/touch-editor';
var setupMobileCodeMirror,
TouchEditor,
init;
setupMobileCodeMirror = function setupMobileCodeMirror() {
var noop = function () {},
key;
for (key in CodeMir... | /*global CodeMirror, device*/
import mobileUtils from 'ghost/utils/mobile-utils';
import createTouchEditor from 'ghost/assets/lib/touch-editor';
var setupMobileCodeMirror,
TouchEditor,
init;
setupMobileCodeMirror = function setupMobileCodeMirror() {
var noop = function () {},
key;
for (key in... | Use Device.js to determine mobile editor use | Use Device.js to determine mobile editor use
Ref #2570
- Adds new library, device.js to determine if the user is on an ios mobile
or tablet.
| JavaScript | mit | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost |
b7491beeae4340a1d73d484c0b7671bb2f682edd | src/services/helpers/scopePermissions/ScopeMembersService.js | src/services/helpers/scopePermissions/ScopeMembersService.js | const auth = require('@feathersjs/authentication');
const globalHooks = require('../../../hooks');
const { ScopeService } = require('./ScopeService');
const { lookupScope, checkScopePermissions } = require('./hooks');
/**
* Implements retrieving a list of all users who are associated with a scope.
* @class ScopeMemb... | const auth = require('@feathersjs/authentication');
const globalHooks = require('../../../hooks');
const { ScopeService } = require('./ScopeService');
const { lookupScope, checkScopePermissions } = require('./hooks');
/**
* Implements retrieving a list of all users who are associated with a scope.
* @class ScopeMemb... | Check for permission only in external calls | Check for permission only in external calls
| JavaScript | agpl-3.0 | schul-cloud/schulcloud-server,schul-cloud/schulcloud-server,schul-cloud/schulcloud-server |
63b38bdb6b304d495ed17ae2defa1f7512491c5c | aritgeo/src/aritgeo.js | aritgeo/src/aritgeo.js | 'use strict'
module.exports = {
aritGeo: function(numlist) {
if (!Array.isArray(numlist)) {
return null;
}
if (numlist.length === 0) {
return 0;
}
if (numlist.length === 1 || numlist.length === 2) {
return -1;
}
}
} | 'use strict'
module.exports = {
aritGeo: function(numlist) {
if (!Array.isArray(numlist)) {
return null;
}
if (numlist.length === 0) {
return 0;
}
if (numlist.length === 1 || numlist.length === 2) {
return -1;
}
if (module.compute.isArithmetic(numlist.slice(1), numlist[1] - numlist[0])) {
... | Implement case for arithmetic sequences | Implement case for arithmetic sequences
| JavaScript | mit | princess-essien/andela-bootcamp-slc |
4471d6844864cb28e5ddd883781b690a48490089 | public/app.js | public/app.js | /* jslint node: true */
'use strict';
var AUTHORIZED_URLS = [
'/index.html'
];
var HOST = '0.0.0.0';
var PORT = 9917;
function handleIo(socket) {
socket.on('slide-update', function(msg) {
socket.broadcast.emit("slide-update", msg);
});
}
function handleHTTP(req, res) {
var path = url.parse(req.url).pathn... | /* jslint node: true */
'use strict';
var AUTHORIZED_URLS = [
'/index.html'
];
var HOST = '0.0.0.0';
var PORT = 9917;
function handleIo(socket) {
socket.on('slide-update', function(msg) {
socket.broadcast.emit("slide-update", msg);
});
}
function handleHTTP(req, res) {
var path = url.parse(req.url).pathn... | Update router to default to slide control | Update router to default to slide control
| JavaScript | mit | mbasanta/bespoke-remote-server,mbasanta/bespoke-remote-server |
295add674f07390b71c89ad59229c6d17fec879f | src/js/components/User.js | src/js/components/User.js | import React, { PropTypes, Component } from 'react';
import { IMAGES_ROOT } from '../constants/Constants';
import shouldPureComponentUpdate from 'react-pure-render/function';
import selectn from 'selectn';
export default class User extends Component {
static propTypes = {
user: PropTypes.object.isRequired
... | import React, { PropTypes, Component } from 'react';
import { IMAGES_ROOT } from '../constants/Constants';
import shouldPureComponentUpdate from 'react-pure-render/function';
import selectn from 'selectn';
export default class User extends Component {
static propTypes = {
user: PropTypes.object.isRequired
... | Use address when there is no location | Use address when there is no location
| JavaScript | agpl-3.0 | nekuno/client,nekuno/client |
a8e892e298630309646cd9f6f3862d17c680f80d | app/scripts/utils.js | app/scripts/utils.js | 'use strict';
(function() {
angular.module('ncsaas')
.factory('ncUtilsFlash', ['Flash', ncUtilsFlash]);
function ncUtilsFlash(Flash) {
return {
success: function(message) {
this.flashMessage('success', message);
},
error: function(message) {
this.flashMessage('danger', m... | 'use strict';
(function() {
angular.module('ncsaas')
.factory('ncUtilsFlash', ['Flash', ncUtilsFlash]);
function ncUtilsFlash(Flash) {
return {
success: function(message) {
this.flashMessage('success', message);
},
error: function(message) {
this.flashMessage('danger', m... | Add check for message exist in ncUtilsFlash.flashMessage (SAAS-822) | Add check for message exist in ncUtilsFlash.flashMessage (SAAS-822)
Added condition for ncUtilsFlash.flashMessage function.
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport |
80dbd6b199ab4a8a014150731303d31e7f7ba529 | lib/factory-boy.js | lib/factory-boy.js | FactoryBoy = {};
FactoryBoy._factories = [];
Factory = function (name, collection, attributes) {
this.name = name;
this.collection = collection;
this.attributes = attributes;
};
FactoryBoy.define = function (name, collection, attributes) {
var factory = new Factory(name, collection, attributes);
FactoryBoy... | FactoryBoy = {};
FactoryBoy._factories = [];
Factory = function (name, collection, attributes) {
this.name = name;
this.collection = collection;
this.attributes = attributes;
};
FactoryBoy.define = function (name, collection, attributes) {
var factory = new Factory(name, collection, attributes);
FactoryBoy... | Throw error if factory is not found | Throw error if factory is not found
| JavaScript | mit | sungwoncho/factory-boy |
150f734f4aae7a73a9fd3a6e6dd6017fc07cdd4d | imports/server/seed-data/seed-posts.js | imports/server/seed-data/seed-posts.js | import moment from 'moment';
import { Posts } from '../../api/collections';
const seedPosts = () => {
const postCount = Posts.find().count();
if (postCount === 0) {
for (let i = 0; i < 50; i++) {
Posts.insert({
createdAt: moment().utc().toDate(),
userId: 'QBgyG7MsqswQmvm7J',
mes... | import moment from 'moment';
import { Posts } from '../../api/collections';
const seedPosts = () => {
const post = Posts.findOne();
if (!post) {
for (let i = 0; i < 50; i++) {
Posts.insert({
userId: 'QBgyG7MsqswQmvm7J',
username: 'evancorl',
createdAt: moment().utc().toDate(),
... | Reformat posts in seed data | Reformat posts in seed data
| JavaScript | apache-2.0 | evancorl/portfolio,evancorl/skate-scenes,evancorl/portfolio,evancorl/skate-scenes,evancorl/skate-scenes,evancorl/portfolio |
00d756fce1fc1f4baa3a0698fcba18421027b119 | vue.config.js | vue.config.js | const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const { NewLineKind } = require('typescript');
module.exports = {
transpileDependencies: ['vuetify'],
outputDir: './nest_desktop/app',
// https://stackoverflow.com/questions/55258355/vue-clis-type-checking-service-ignores-memory-limits... | const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const { NewLineKind } = require('typescript');
module.exports = {
productionSourceMap: false,
transpileDependencies: ['vuetify'],
outputDir: './nest_desktop/app',
// https://stackoverflow.com/questions/55258355/vue-clis-type-checking... | Disable source map for production | Disable source map for production
| JavaScript | mit | babsey/nest-desktop,babsey/nest-desktop,babsey/nest-desktop,babsey/nest-desktop,babsey/nest-desktop |
f93e268e7b5a809b28061ff2815121950c896cb4 | src/models/comment.es6.js | src/models/comment.es6.js | import Base from './base';
import process from 'reddit-text-js';
class Comment extends Base {
_type = 'Comment';
constructor(props) {
super(props);
var comment = this;
this.validators = {
body: function() {
return Base.validators.minLength(this.get('body'), 1);
}.bind(comment),
... | import Base from './base';
import process from 'reddit-text-js';
class Comment extends Base {
_type = 'Comment';
constructor(props) {
super(props);
var comment = this;
this.validators = {
body: function() {
return Base.validators.minLength(this.get('body'), 1);
}.bind(comment),
... | Fix missing underscore in comment type | Fix missing underscore in comment type
| JavaScript | mit | reddit/node-api-client,curioussavage/snoode,reddit/snoode,schwers/snoode,curioussavage/snoode |
53990bb3625947fc37c643b33842e7f3ba8340f7 | lib/urlresolver.js | lib/urlresolver.js | var standardPageTypes = {
'event': /^(19|20)[0-9]{2}\//
};
var resolveUrl = function(urlFragment) {
return (/^http:\/\//).test(urlFragment) ? urlFragment : 'http://lanyrd.com/' + urlFragment.replace(/^\//, '');
};
var shortenUrl = function(url) {
return url.replace(/^(http:\/\/){1}(www\.)?(lanyrd\.com\/){1}|\//, '... | var standardPageTypes = {
'event': /^(19|20)[0-9]{2}\//
};
var resolveUrl = function(urlFragment) {
return (/^http:\/\//).test(urlFragment) ? urlFragment : 'http://lanyrd.com/' + urlFragment.replace(/^\//, '');
};
var shortenUrl = function(url) {
return url.replace(/^(http:\/\/.*?)?\//, '');
};
var resolvePageTyp... | Make URL shortener more forgiving | Make URL shortener more forgiving
| JavaScript | mit | markdalgleish/node-lanyrd-scraper |
b3d6d0ea244499c44eb0d3f8c50b1b4ddc3625f8 | src/controllers/SpotifyController.js | src/controllers/SpotifyController.js | controller = new BasicController({
supports: {
playpause: true,
next: true,
previous: true
},
useLazyObserving: true,
frameSelector: '#main, #app-player',
playStateSelector: '#play, #play-pause',
playStateClass: 'playing',
playPauseSelector: '#play, #play-pause',
nextSelector: '#next',
pre... | if (!!document.querySelector('#app-player')) { // Old Player
controller = new BasicController({
supports: {
playpause: true,
next: true,
previous: true
},
useLazyObserving: true,
frameSelector: '#app-player',
playStateSelector: '#play-pause',
playStateClass: 'playing',
playPaus... | Support New and Old Spotify | Support New and Old Spotify
| JavaScript | agpl-3.0 | cwal/chrome-media-keys,ahmedalsudani/chrome-media-keys,msfeldstein/chrome-media-keys,PeterMinin/chrome-media-keys,ahmedalsudani/chrome-media-keys,PeterMinin/chrome-media-keys,cwal/chrome-media-keys |
9b5908c0bd5bd35a092b7a3b6400f90a73ff38b7 | app/assets/javascripts/forest/admin/partials/forest_tables.js | app/assets/javascripts/forest/admin/partials/forest_tables.js | // Forest tables
$(document).on('mouseenter', '.forest-table tbody tr', function() {
var $row = $(this);
$row.addClass('active');
$(document).one('turbolinks:before-cache.forestTables', function() {
$row.removeClass('active');
});
});
$(document).on('mouseleave', '.forest-table tbody tr', function() {
... | // Forest tables
$(document).on('mouseenter', '.forest-table tbody tr', function() {
var $row = $(this);
$row.addClass('active');
$(document).one('turbolinks:before-cache.forestTables', function() {
$row.removeClass('active');
});
});
$(document).on('mouseleave', '.forest-table tbody tr', function() {
... | Allow inputs inside forest tables | Allow inputs inside forest tables
| JavaScript | mit | dylanfisher/forest,dylanfisher/forest,dylanfisher/forest |
cb906f55fa6f5ad491d0828a343a6d407cdd8e80 | client/src/app.js | client/src/app.js | import createLogger from 'redux-logger';
import thunk from 'redux-thunk';
import transactionReducer from './reducers'
import { applyMiddleware, createStore } from 'redux';
import { render } from 'react-dom';
import React from 'react';
import Main from './components/Main';
import { Provider } from 'react-redux';
const... | import createLogger from 'redux-logger';
import thunk from 'redux-thunk';
import transactionReducer from './reducers'
import { applyMiddleware, createStore } from 'redux';
import { render } from 'react-dom';
import React from 'react';
import Main from './components/Main';
import { Provider } from 'react-redux';
const... | Fix middlewares order for proper thunk logging | Fix middlewares order for proper thunk logging
| JavaScript | mit | Nauktis/inab,Nauktis/inab,Nauktis/inab |
10fd21e05457f0225d39102002565cff2fff264f | src/util/filters.js | src/util/filters.js | export function filterByText(data, textFilter) {
if (textFilter === '') {
return data;
}
// case-insensitive
textFilter = textFilter.toLowerCase();
const exactMatches = [];
const substringMatches = [];
data.forEach(i => {
const name = i.name.toLowerCase();
if (name.split(' ').includes(textFil... | export function filterByText(data, textFilter) {
if (textFilter === '') {
return data;
}
// case-insensitive
textFilter = textFilter.toLowerCase();
const exactMatches = [];
const substringMatches = [];
data.forEach(i => {
const name = i.name.toLowerCase();
if (name.split(' ').includes(textFil... | Return exact results by default | Return exact results by default
| JavaScript | agpl-3.0 | Johj/cqdb,Johj/cqdb |
c0a1c31d1b49fddcdb790897176d9e5802da117e | client/config/bootstrap.js | client/config/bootstrap.js | /**
* Client entry point
*/
// Polyfills
import 'babel-polyfill'
// Styles
import 'components/styles/resets.css'
// Modules
import { browserHistory } from 'react-router'
import React from 'react'
import ReactDOM from 'react-dom'
import Relay from 'react-relay'
import { RelayRouter } from 'react-router-relay'
// R... | /**
* Client entry point
*/
// Polyfills
import 'babel-polyfill'
// Styles
import 'components/styles/resets.css'
// Modules
import { browserHistory } from 'react-router'
import React from 'react'
import ReactDOM from 'react-dom'
import Relay from 'react-relay'
import { RelayRouter } from 'react-router-relay'
// R... | Use raf for Relay's task scheduler | Use raf for Relay's task scheduler
| JavaScript | apache-2.0 | cesarandreu/bshed,cesarandreu/bshed |
88a806cb56dadead5f48eb1a7cdec6a26fc4d166 | www/submit.js | www/submit.js | $('#task').on('change', function() {
if ( $(this).val() == 'custom') {
$('#custom_videos').removeClass('hidden');
} else {
$('#custom_videos').addClass('hidden');
}
});
| $('#task').on('change', function() {
if ( $(this).val() == 'custom') {
$('#custom_videos').removeClass('hidden');
} else {
$('#custom_videos').addClass('hidden');
}
});
$('#task').trigger('change');
| Make sure UI is consistent on load | Make sure UI is consistent on load
| JavaScript | mit | mdinger/awcy,tdaede/awcy,tdaede/awcy,mdinger/awcy,mdinger/awcy,mdinger/awcy,tdaede/awcy,tdaede/awcy,mdinger/awcy,tdaede/awcy,tdaede/awcy |
af2827c0ce2fdca4c095fb160d3fa1437fb400a6 | webpack.config.babel.js | webpack.config.babel.js | /* eslint-disable import/no-commonjs */
const webpack = require('webpack')
const baseConfig = {
entry: './src/index.js',
module: {
rules: [
{
test: /\.js$/,
use: 'babel-loader',
exclude: /node_modules/,
},
],
},
output: {
library: 'ReduxMost',
libraryTarget:... | /* eslint-disable import/no-commonjs */
const webpack = require('webpack')
const baseConfig = {
entry: './src/index.js',
module: {
rules: [
{
test: /\.js$/,
use: 'babel-loader',
exclude: /node_modules/,
},
],
},
output: {
library: 'ReduxMost',
libraryTarget:... | Add missing trailing commas in new webpack config | Add missing trailing commas in new webpack config
| JavaScript | mit | joshburgess/redux-most |
66037a236a0f1b099c8e06f094a7070ab37be363 | src/users/usersActions.js | src/users/usersActions.js | /* @flow strict-local */
import differenceInSeconds from 'date-fns/difference_in_seconds';
import type { Dispatch, GetState, Narrow } from '../types';
import * as api from '../api';
import { PRESENCE_RESPONSE } from '../actionConstants';
import { getAuth, tryGetAuth } from '../selectors';
import { isPrivateOrGroupNarr... | /* @flow strict-local */
import differenceInSeconds from 'date-fns/difference_in_seconds';
import type { Dispatch, GetState, Narrow } from '../types';
import * as api from '../api';
import { PRESENCE_RESPONSE } from '../actionConstants';
import { getAuth, tryGetAuth } from '../selectors';
import { isPrivateOrGroupNarr... | Initialize lastReportPresence as "long ago", not "now". | presence: Initialize lastReportPresence as "long ago", not "now".
Before we were setting it as `new Date()`. So when app was opened, this
variable was initialized as `new Date()` and we call `reportPresence`
from `fetchActions`. As diff is not >= 60, so `reportPresence` returns
without reporting to the server. And one... | JavaScript | apache-2.0 | vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile |
df21faead2b427c56152eca744f12ce8fcc1e0ca | package/index.js | package/index.js | /* eslint global-require: 0 */
/* eslint import/no-dynamic-require: 0 */
const Environment = require('./environment')
const { existsSync } = require('fs')
function createEnvironment() {
const path = `./environments/${process.env.NODE_ENV}`
const constructor = existsSync(path) ? require(path) : Environment
retur... | /* eslint global-require: 0 */
/* eslint import/no-dynamic-require: 0 */
const Environment = require('./environment')
const { resolve } = require('path')
const { existsSync } = require('fs')
function createEnvironment() {
const path = resolve(__dirname, 'environments', `${process.env.NODE_ENV}.js`)
const construc... | Resolve full file path + name to fix existsSync check | Resolve full file path + name to fix existsSync check
| JavaScript | mit | gauravtiwari/webpacker,gauravtiwari/webpacker,usertesting/webpacker,rossta/webpacker,rossta/webpacker,rails/webpacker,usertesting/webpacker,rails/webpacker,rossta/webpacker,rossta/webpacker,usertesting/webpacker,gauravtiwari/webpacker |
be877f2c612fa5a4049e563193feed3f349dca75 | static/js/pedido.js | static/js/pedido.js | $(document).ready(function () {
$("#id_type_1").click(function () {
$("#id_inbound_date").parents('.row').hide();
$("#id_inbound_date_preference").parents('.row').hide();
});
$("#id_type_0").click(function () {
$("#id_inbound_date").parents('.row').show();
$("#id_inbound_date... | $(document).ready(function () {
$("#id_type_1").click(function () {
$("#id_inbound_date").parents('.row').hide();
$("#id_inbound_date_preference").parents('.row').hide();
});
$("#id_type_0").click(function () {
$("#id_inbound_date").parents('.row').show();
$("#id_inbound_date... | Hide or show inbound date according with type of trip selected | Hide or show inbound date according with type of trip selected
| JavaScript | mpl-2.0 | neuromat/nira,neuromat/nira,neuromat/nira |
a8ad29163c1021ccc7055f06745d8b1a43623f3e | helper_functions/price_discount.js | helper_functions/price_discount.js | // priceDiscount function
// Discounts sale price by 15% is price is > $8,000
module.exports.priceDiscount = (price) => {
if (price > 8000) {
return price * .15
}
return price;
}; | // priceDiscount function
// Discounts sale price by 15% is price is > $8,000
module.exports.priceDiscount = (price) => {
if (price > 8000) {
return price / 1.15
}
return price;
}; | Fix function so it properly deducts 15% from price | Fix function so it properly deducts 15% from price
| JavaScript | mit | dshaps10/full-stack-demo-site,dshaps10/full-stack-demo-site |
86b19d7030564176a56d2c1ab20ebe16df33066f | src/countdown/countdown.js | src/countdown/countdown.js | angular.module('ngIdle.countdown', ['ngIdle.idle'])
.directive('idleCountdown', ['Idle', function(Idle) {
return {
restrict: 'A',
scope: {
value: '=idleCountdown'
},
link: function($scope) {
// Initialize the scope's value to the configured timeout.
$scope.value = I... | angular.module('ngIdle.countdown', ['ngIdle.idle'])
.directive('idleCountdown', ['Idle', function(Idle) {
return {
restrict: 'A',
scope: {
value: '=idleCountdown'
},
link: function($scope) {
// Initialize the scope's value to the configured timeout.
$scope.value = I... | Use Idle.getTimeout() instead of internal _options() | Use Idle.getTimeout() instead of internal _options()
| JavaScript | mit | dgoncalves1/ng-idle,JCherryhomes/ng-idle,HackedByChinese/ng-idle,koitoer/ng-idle,MasterFacilityList/ng-idle,JCherryhomes/ng-idle,koitoer/ng-idle,karthilxg/ng-idle,MasterFacilityList/ng-idle,karthilxg/ng-idle,msuresu/ng-idle,seegno-forks/ng-idle,jpribesh/ng-idle,dgoncalves1/ng-idle,seegno-forks/ng-idle,msuresu/ng-idle,j... |
d36c1654f985684fc798cb703f1c5b24f10f102d | gulpfile.babel.js | gulpfile.babel.js | import WebpackDevServer from 'webpack-dev-server';
import config from './webpack.config.js';
import gulp from 'gulp';
import gutil from 'gulp-util';
import webpack from 'webpack';
gulp.task('default', ['webpack-dev-server']);
gulp.task('build', ['webpack:build']);
gulp.task('webpack:build', callback => {
const myC... | import WebpackDevServer from 'webpack-dev-server';
import config from './webpack.config.js';
import gulp from 'gulp';
import gutil from 'gulp-util';
import webpack from 'webpack';
gulp.task('default', ['webpack-dev-server']);
gulp.task('build', ['webpack:build']);
gulp.task('webpack:build', callback => {
const myC... | Use the right port number | Use the right port number
I find this makes all the difference...
| JavaScript | mit | wincent/hextrapolate,cpojer/hextrapolate,wincent/hextrapolate,cpojer/hextrapolate,cpojer/hextrapolate,wincent/hextrapolate |
d377b7d8bfaf88408fdf3ef3182fb15df4689924 | src/configs/webpack/project-config.js | src/configs/webpack/project-config.js | 'use strict';
var tmpl = require('blueimp-tmpl').tmpl;
var path = require('path');
var readTemplate = require('../../utils/read-template');
var projectName = require('project-name');
function buildProjectWebpackConfig(options) {
var params = options || {};
var config = {};
if (params.env !== 'development' && ... | 'use strict';
var tmpl = require('blueimp-tmpl').tmpl;
var path = require('path');
var readTemplate = require('../../utils/read-template');
var projectName = require('project-name');
function buildProjectWebpackConfig(options) {
var params = options || {};
var config = {};
if (params.env !== 'development' && ... | Update webpack project config path | Update webpack project config path
| JavaScript | mit | mikechau/js-config-gen,mikechau/js-config-gen |
8fd75333771f1fd3170c0796740c730b2f0eb807 | test/graphics/iconSpec.js | test/graphics/iconSpec.js | define(["sugar-web/graphics/icon"], function (icon) {
describe("icon", function () {
var wasLoaded;
var iconUrlResult;
it("should be able to change icon more than once", function () {
var elem = document.createElement('div');
var iconUrl;
function callba... | define(["sugar-web/graphics/icon"], function (icon) {
describe("icon", function () {
var wasLoaded;
var iconUrlResult;
it("should be able to change icon more than once", function () {
var elem = document.createElement('div');
var iconUrl;
function callba... | Use /base in the SVG path | Use /base in the SVG path
Unfortunatly we need that.
| JavaScript | apache-2.0 | godiard/sugar-web,sugarlabs/sugar-web |
55474b5c3cb32f1cc53fe56b82d21c04a98a560e | app/assets/javascripts/evZoom.js | app/assets/javascripts/evZoom.js | $(function() {
$('#zoom_01').elevateZoom();
});
| $(function() {
$('#zoom_01').elevateZoom();
$('.zoom').each(function(element) {
$(this).elevateZoom()
});
});
| Update ElevateZoom uses class .zoom | Update ElevateZoom uses class .zoom | JavaScript | mit | gouf/test_elevate_zoom,gouf/test_elevate_zoom |
37a73986d3d36353a30e661b3989dcd8a646bc39 | 04/jjhampton-ch4-list.js | 04/jjhampton-ch4-list.js | // Write a function arrayToList that builds up a data structure like the previous one when given [1, 2, 3] as argument, and write a listToArray function that produces an array from a list. Also write the helper functions prepend, which takes an element and a list and creates a new list that adds the element to the fron... | // Write a function arrayToList that builds up a data structure like the previous one when given [1, 2, 3] as argument, and write a listToArray function that produces an array from a list. Also write the helper functions prepend, which takes an element and a list and creates a new list that adds the element to the fron... | Refactor listToArray to work with list parameters of dynamic sizes | Refactor listToArray to work with list parameters of dynamic sizes
| JavaScript | mit | OperationCode/eloquent-js |
338634c1d6baeb464d3f723452427a8cd0d60929 | test/smoke-tests.js | test/smoke-tests.js | var assert = require('assert')
// , expresso = require('expresso')
, dustx = require('dust-x')
module.exports = {
'test 1': function(end) {
assert.ok(true, 'pre-test')
end(function() {
assert.ok(false, 'post-test')
})
}
}
| var assert = require('assert')
, app = require('../example/app')
module.exports = {
'GET /': function() {
assert.response(app,
{ url: '/' },
{ status: 200, headers: { 'Content-Type': 'text/html; charset=utf-8' }},
function(res) {
assert.includes(res.bod... | Fix smoke-test to do something useful. | Fix smoke-test to do something useful.
| JavaScript | mit | laurie71/dust-x |
4a189c3a3dd1f0304a788c280d1839d94c40dc47 | tests/acceptance.js | tests/acceptance.js | var assert = require('chai').assert;
var http = require('http');
var mathServer = require('../lib/mathServer.js');
var request = require('supertest');
process.env.NODE_ENV = 'test';
describe('Acceptance test', function () {
var port = 8006;
var server;
before(function () {
process.on('stdout', fu... | var assert = require('chai').assert;
var http = require('http');
var mathServer = require('../lib/mathServer.js');
var request = require('supertest');
process.env.NODE_ENV = 'test';
describe.only('Acceptance test', function () {
var port = 8006;
var server;
before(function () {
server = mathServe... | Fix supertest to not overwrite request | Fix supertest to not overwrite request
| JavaScript | mit | antonleykin/InteractiveShell,fhinkel/InteractiveShell,fhinkel/InteractiveShell,antonleykin/InteractiveShell,fhinkel/InteractiveShell,antonleykin/InteractiveShell,fhinkel/InteractiveShell |
15eb9523a92822b762a6e2c1cdc2a3d1f8426a8e | tests/test-utils.js | tests/test-utils.js | import { underscore } from '@ember/string';
export function serializer(payload) {
const serializedPayload = {};
Object.keys(payload.attrs).map((_key) => {
serializedPayload[underscore(_key)] = payload[_key];
});
return serializedPayload;
}
| import { underscore } from '@ember/string';
function _serialize_object(payload) {
const serializedPayload = {};
Object.keys(payload.attrs).map((_key) => {
serializedPayload[underscore(_key)] = payload[_key];
});
return serializedPayload;
}
export function serializer(data, many = false) {
if (many == tru... | Refactor serializer to support list | Refactor serializer to support list
| JavaScript | agpl-3.0 | appknox/irene,appknox/irene,appknox/irene |
61f824798c65b00721bda812228c5357e83bbcd7 | karma.conf.js | karma.conf.js | // Karma configuration
// base path, that will be used to resolve files and exclude
basePath = '';
// list of files / patterns to load in the browser
files = [
JASMINE,
JASMINE_ADAPTER,
'test/components/angular/angular.js',
'test/components/angular-mocks/angular-mocks.js',
'src/scripts/*.js',
'src/script... | // Karma configuration
// base path, that will be used to resolve files and exclude
basePath = '';
// list of files / patterns to load in the browser
files = [
JASMINE,
JASMINE_ADAPTER,
'test/components/angular/angular.js',
'test/components/angular-mocks/angular-mocks.js',
'src/scripts/*.js',
'src/script... | Use log level of INFO for karma | test: Use log level of INFO for karma
| JavaScript | mit | Malkiat-Singh/angular-snap.js,kzganesan/angular-snap.js,jtrussell/angular-snap.js,Malkiat-Singh/angular-snap.js,kzganesan/angular-snap.js,jtrussell/angular-snap.js |
1060df09e87e63a0a14e5cfa9d206721fa6d14cf | katas/tags.js | katas/tags.js | export const SPECIFICATION = 'spec';
export const MDN = 'mdn';
export const VIDEO = 'video';
export const ARTICLE = 'article';
export const DOCS = 'docs';
export const ANNOUNCEMENT = 'announcement';
export const BOOK = 'book';
export const QUOTE = 'quote';
export const DISCUSSION = 'discussion';
| export const SPECIFICATION = 'spec';
export const MDN = 'mdn';
export const VIDEO = 'video';
export const ARTICLE = 'article';
export const DOCS = 'docs';
export const ANNOUNCEMENT = 'announcement';
export const BOOK = 'book';
export const QUOTE = 'quote';
export const DISCUSSION = 'discussion';
export const WIKIPEDIA ... | Add wikipedia as a tag. | Add wikipedia as a tag. | JavaScript | mit | tddbin/katas,tddbin/katas,tddbin/katas |
9fe0c1a5abd33fdbf4e2c90dd60874ec56b1e58c | src/js/xhr.js | src/js/xhr.js | var Q = require("../vendor/q/q");
exports.post = function (url, data) {
console.log('posting to', url);
var defer = Q.defer();
var xhr = new XMLHttpRequest();
xhr.onerror = function(err) {
console.log('XMLHttpRequest error: ' + err);
defer.reject(err);
};
xhr.onreadystatechange = function () {
... | var Q = require("../vendor/q/q");
exports.post = function (url, data) {
console.log('posting to', url);
var defer = Q.defer();
var xhr = new XMLHttpRequest();
xhr.onerror = function(err) {
console.log('XMLHttpRequest error: ' + err);
defer.reject(err);
};
xhr.onreadystatechange = function () {
... | Make XHR compatible with new Kitt implementation | Make XHR compatible with new Kitt implementation | JavaScript | apache-2.0 | kitt-browser/pocket,kitt-browser/pocket |
3f1b7263c9f33ff205ac5ca3fa1466532906b3d1 | client/common/actions/index.js | client/common/actions/index.js | import types from '../constants/ActionTypes'
import utils from '../../shared/utils'
function replaceUserInfo(userInfo) {
return {
type: types.REPLACE_USER_INFO,
userInfo
}
}
function fetchUserInfo() {
return dispatch => {
utils.ajax({url: '/api/user/getUserInfo'}).then(res => {
... | import types from '../constants/ActionTypes'
import utils from '../../shared/utils'
function replaceUserInfo(userInfo) {
return {
type: types.REPLACE_USER_INFO,
userInfo
}
}
function clearUserInfo() {
return {type: types.CLEAR_USER_INFO}
}
function fetchUserInfo() {
return dispatch =>... | Add plain object action clearUserInfo | Add plain object action clearUserInfo
| JavaScript | mit | chikara-chan/react-isomorphic-boilerplate,qiuye1027/screenInteraction,qiuye1027/screenInteraction,chikara-chan/react-isomorphic-boilerplate |
e5ce6180efaea8382a8514501ebb7bae88c3b541 | views/crud-model.js | views/crud-model.js | var app = require('ridge');
module.exports = require('ridge/view').extend({
events: {
'click button': function(e) {
e.preventDefault();
e.stopPropagation();
},
'click button[data-command="publish"]': 'publish',
'click button[data-command="unpublish"]': 'unpublish',
'click button[data-command="delete"]... | var app = require('ridge');
module.exports = require('ridge/view').extend({
events: {
'click button,select,input': function(e) {
e.stopPropagation();
},
'click button': function(e) {
e.preventDefault();
},
'click button[data-command="publish"]': 'publish',
'click button[data-command="unpublish"]': '... | Stop propagation for clicks (since a click on model view can toggle more information. | Stop propagation for clicks (since a click on model view can toggle more information.
| JavaScript | mit | thecodebureau/ridge |
e033d945329bb146ee82fc9d51f04665b950aa6b | src/server.js | src/server.js | let Path = require('path');
let Hapi = require('hapi');
var Good = require('good');
let server = new Hapi.Server({
connections: {
routes: {
files: {
relativeTo: Path.join(__dirname, 'public')
}
}
}
});
server.connection({ port: 3000 });
server.route({
method: 'GET',
path: '/',
ha... | let Path = require('path');
let Hapi = require('hapi');
var Good = require('good');
let server = new Hapi.Server({
connections: {
routes: {
files: {
relativeTo: Path.join(__dirname, 'public')
}
}
}
});
server.connection({ port: 3000 });
server.route({
method: 'GET',
path: '/',
ha... | Add handler for blog path | Add handler for blog path
| JavaScript | mit | bbondy/brianbondy.node,bbondy/brianbondy.node,bbondy/brianbondy.node |
fa60bd7e2d0eec674595bff231c05d364f4d4aa1 | lib/helper.js | lib/helper.js | var helper = exports;
var copyDir = helper.copyDir = function (source, target) {
var fs = require('fs');
var dir = fs.readdirSync(source);
dir.forEach(function(item){
var s = fs.statSync(source + '/' + item);
if(s.isDirectory()) {
try {
fs.mkdirSync(target + '/' + item);
} catch (err) ... | var helper = exports;
var copyDir = helper.copyDir = function (source, target) {
var fs = require('fs');
var dir = fs.readdirSync(source);
dir.forEach(function(item){
var s = fs.statSync(source + '/' + item);
if(s.isDirectory()) {
try {
fs.mkdirSync(target + '/' + item);
} catch (err) ... | Remove references to "big" in resource installing code. Resources should now install to the correct application directory. | [fix] Remove references to "big" in resource installing code. Resources should now install to the correct application directory. | JavaScript | mit | bigcompany/resource |
3dcafb57bbc59709e5722fbdac07ad9493db4949 | CalcuMan/src/classes/SoundsManager.js | CalcuMan/src/classes/SoundsManager.js | /**
* @flow
*/
import {default as Sound} from 'react-native-sound'
export default class SoundsManager {
constructor (onChangeCallback) {
this.muted = false
this.sounds = {}
this.onChangeCallback = onChangeCallback
this.loadSound('toggle_on')
this.loadSound('toggle_off')
this.loadSound('ti... | /**
* @flow
*/
import {default as Sound} from 'react-native-sound'
export default class SoundsManager {
constructor (onChangeCallback) {
this.muted = false
this.sounds = {}
this.onChangeCallback = onChangeCallback
this.lastPlayed = null
this.loadSound('toggle_on')
this.loadSound('toggle_o... | Stop previous sound before play new one | Stop previous sound before play new one
| JavaScript | mit | antonfisher/game-calcuman,antonfisher/game-calcuman,antonfisher/game-calcuman |
185e50fb0d94bbde6abb94c47e36046746912306 | .gificiency/.gificiency.js | .gificiency/.gificiency.js | var Gificiency = (function() {
'use strict';
var search = function(filter) {
$('a').each(function() {
var elem = $(this);
if (elem.text().search( new RegExp(filter, 'i') ) < 0) {
elem.hide();
} else {
elem.show();
}
});
};
var getHash = function() {
var filt... | var Gificiency = (function() {
'use strict';
var searchField = $('.search');
var items = $('li');
var links = $('a');
var search = function(filter) {
links.each(function() {
var elem = $(this);
if (elem.text().search( new RegExp(filter, 'i') ) < 0) {
elem.hide();
} else {
... | Set private vars, move events to public function | Set private vars, move events to public function
| JavaScript | mit | drewbarontini/gificiency,drewbarontini/gificiency,drewbarontini/gificiency |
a29a99b9a2bfedd5528be677ff24c4db2b19115a | backend/app/assets/javascripts/spree/backend/product_picker.js | backend/app/assets/javascripts/spree/backend/product_picker.js | $.fn.productAutocomplete = function (options) {
'use strict';
// Default options
options = options || {};
var multiple = typeof(options.multiple) !== 'undefined' ? options.multiple : true;
this.select2({
minimumInputLength: 3,
multiple: multiple,
initSelection: function (element, callback) {
... | $.fn.productAutocomplete = function (options) {
'use strict';
// Default options
options = options || {};
var multiple = typeof(options.multiple) !== 'undefined' ? options.multiple : true;
this.select2({
minimumInputLength: 3,
multiple: multiple,
initSelection: function (element, callback) {
... | Add missing api key in product picker. | Add missing api key in product picker.
Fixes #6185
| JavaScript | bsd-3-clause | jasonfb/spree,mindvolt/spree,alvinjean/spree,adaddeo/spree,jspizziri/spree,sfcgeorge/spree,gregoryrikson/spree-sample,beni55/spree,JDutil/spree,rajeevriitm/spree,radarseesradar/spree,jparr/spree,JuandGirald/spree,useiichi/spree,CJMrozek/spree,ayb/spree,priyank-gupta/spree,builtbybuffalo/spree,Engeltj/spree,tancnle/spre... |
90dd6b7b21c519c7c8fffd9833992e9de4cf8d95 | web/editor.js | web/editor.js | import { getQueryStringParam, substanceGlobals, platform } from 'substance'
import { TextureWebApp } from 'substance-texture'
window.addEventListener('load', () => {
substanceGlobals.DEBUG_RENDERING = platform.devtools
let app = TextureWebApp.mount({
archiveId: getQueryStringParam('archive') || 'kitchen-sink',... | import {
getQueryStringParam, substanceGlobals, platform, VfsStorageClient, HttpStorageClient, InMemoryDarBuffer
} from 'substance'
import { TextureWebApp, TextureArchive } from 'substance-texture'
window.addEventListener('load', () => {
substanceGlobals.DEBUG_RENDERING = platform.devtools
let app = DevTextureWe... | Add a hook to the web version that checks on save if the archive can be loaded again. | Add a hook to the web version that checks on save if the archive can be loaded again.
| JavaScript | mit | substance/texture,substance/texture |
cc5aa2d5902750420cb9dfde1acec0893e22df40 | test/spec/react-loader-test.js | test/spec/react-loader-test.js | /** @jsx React.DOM */
var React = require('react');
var Loader = require('../../lib/react-loader');
var expect = require('chai').expect;
var loader;
describe('Loader', function () {
describe('before loaded', function () {
beforeEach(function () {
loader = <Loader loaded={false}>Welcome</Loader>;
Re... | /** @jsx React.DOM */
var React = require('react');
var Loader = require('../../lib/react-loader');
var expect = require('chai').expect;
describe('Loader', function () {
var testCases = [{
description: 'loading is in progress',
options: { loaded: false },
expectedOutput: /<div class="loader".*<div class... | Update test suite to ensure spinner and spinner options are rendered as expected | Update test suite to ensure spinner and spinner options are rendered as expected
| JavaScript | mit | CarLingo/react-loader,gokulkrishh/react-loader,alengel/react-loader,aparticka/react-loader,CarLingo/react-loader,quickleft/react-loader,CognizantStudio/react-loader,CognizantStudio/react-loader,aparticka/react-loader,quickleft/react-loader,gokulkrishh/react-loader,dallonf/react-loader,insekkei/react-loader,dallonf/reac... |
64038fb9752955742180bc734fb8686dede22662 | app/index.js | app/index.js | import React from 'react'
import ReactDOM from 'react-dom'
import getRoutes from './config/routes'
import { createStore, applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
import users from 'redux/modules/users'
import thunk from 'redux-thunk'
import { checkIfAuthed } from 'helpers/auth'
const store... | import React from 'react'
import ReactDOM from 'react-dom'
import getRoutes from './config/routes'
import { createStore, applyMiddleware, compose } from 'redux'
import { Provider } from 'react-redux'
import users from 'redux/modules/users'
import thunk from 'redux-thunk'
import { checkIfAuthed } from 'helpers/auth'
co... | Include redux devtools through compose | Include redux devtools through compose
| JavaScript | mit | StuartPearlman/duckr,StuartPearlman/duckr |
bf669b035df93e5e27b5683ad59c3b68e0ac5fdb | client/partials/mybilltable.js | client/partials/mybilltable.js | Template.mybilltable.created = function(){
Session.set('message', '');
};
Template.mybilltable.helpers({
onReady: function(){
//Meteor.subscribe("mybills");
},
bill: function(){
return bills.find({ registeredby: Meteor.userId() });
},
nobills: function(){
var thebills = bills.find({ registere... | Template.mybilltable.created = function(){
Session.set('message', '');
};
Template.mybilltable.helpers({
onReady: function(){
//Meteor.subscribe("mybills");
},
bill: function(){
return bills.find({ registeredby: Meteor.userId() });
},
nobills: function(){
var thebills = bills.find({ registere... | Fix link in Profile error message. | Fix link in Profile error message.
| JavaScript | mit | celsom3/undocumoney,celsom3/undocumoney |
09e3525e15e891760bcb737c9948d774aa12f061 | frontend/src/sub-components/translate.js | frontend/src/sub-components/translate.js | import privateInfo from "../../../../../credentials/token.json";
/**
* Fetches translated text using the Google Translate API
*/
export function getTranslation(term, fromLang, toLang) {
const response = fetch("/translation", {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type... | import privateInfo from "../../../../../credentials/token.json";
/**
* Fetches translated text using the Google Translate API
*/
export function getTranslation(term, fromLang, toLang) {
const response = fetch("/translation", {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type... | Remove console.log from all files | Remove console.log from all files
| JavaScript | apache-2.0 | google/step197-2020,google/step197-2020,google/step197-2020,google/step197-2020 |
89180adaf71fda52a3879cace74c66a7fb8677fd | __tests__/e2e/01_StarRating.test.js | __tests__/e2e/01_StarRating.test.js | import test from 'tape-async'
import helper from 'tipsi-appium-helper'
const { driver, select, idFromXPath } = helper
test('<StarRating />', async (t) => {
const starsAndTextId = select({
ios: idFromXPath(`//
XCUIElementTypeScrollView/*/*/XCUIElementTypeOther[2]/
XCUIElementTypeOther/XCUIElementType... | import test from 'tape-async'
import helper from 'tipsi-appium-helper'
const { driver, select, idFromXPath } = helper
test('<StarRating />', async (t) => {
const starsAndTextId = select({
ios: idFromXPath(`//
XCUIElementTypeScrollView/*/*/XCUIElementTypeOther[2]/
XCUIElementTypeOther/XCUIElementType... | Update timer for star rating | Update timer for star rating
| JavaScript | mit | tipsi/tipsi-ui-kit,tipsi/tipsi-ui-kit,tipsi/tipsi-ui-kit,tipsi/tipsi-ui-kit |
959ab8d9aa78c7fc931a25d94c3721585368d6f5 | addon/-private/ember-environment.js | addon/-private/ember-environment.js | import Ember from 'ember';
import { defer } from 'rsvp';
import { Environment } from './external/environment';
import { assert } from '@ember/debug';
import { join, next, once } from '@ember/runloop';
export class EmberEnvironment extends Environment {
assert(...args) {
assert(...args);
}
async(callback) {
... | import Ember from 'ember';
import { defer } from 'rsvp';
import { Environment } from './external/environment';
import { assert } from '@ember/debug';
import { join, next, schedule } from '@ember/runloop';
export class EmberEnvironment extends Environment {
assert(...args) {
assert(...args);
}
async(callback... | Fix inefficient use of run.once by EmberEnvironment.async | Fix inefficient use of run.once by EmberEnvironment.async
| JavaScript | mit | machty/ember-concurrency,machty/ember-concurrency,machty/ember-concurrency,machty/ember-concurrency |
30f098e5baab15c95a111050d02ec4e9a16ffcbe | test/postgres-sql-loader.js | test/postgres-sql-loader.js | // Test that loading SQL files for PostgreSQL works.
'use strict';
var Code = require('code');
var Lab = require('lab');
var Querious = require('../index');
var path = require('path');
var lab = module.exports.lab = Lab.script();
lab.experiment('PostgreSQL sql file loading', function () {
lab.test('it works with ... | // Test that loading SQL files for PostgreSQL works.
'use strict';
var Code = require('code');
var Lab = require('lab');
var Querious = require('../index');
var path = require('path');
var lab = module.exports.lab = Lab.script();
lab.experiment('PostgreSQL sql file loading', function () {
lab.test('it works with ... | Test for ambigous file loading. | Test for ambigous file loading.
| JavaScript | isc | mikl/querious |
42a38b012ae01477845ef926d4620b12f0a418f6 | prime/index.test.js | prime/index.test.js | /* eslint-env node, jest */
const shogi = require('./index.js');
const Slack = require('../lib/slackMock.js');
jest.mock('../achievements/index.ts');
let slack = null;
beforeEach(() => {
slack = new Slack();
process.env.CHANNEL_SANDBOX = slack.fakeChannel;
shogi(slack);
});
describe('shogi', () => {
it('respon... | /* eslint-env node, jest */
jest.mock('../achievements/index.ts');
const shogi = require('./index.js');
const Slack = require('../lib/slackMock.js');
let slack = null;
beforeEach(() => {
slack = new Slack();
process.env.CHANNEL_SANDBOX = slack.fakeChannel;
shogi(slack);
});
describe('shogi', () => {
it('respon... | Fix order of invokation of achievement mocking | Fix order of invokation of achievement mocking
| JavaScript | mit | tsg-ut/slackbot,tsg-ut/slackbot,tsg-ut/slackbot,tsg-ut/slackbot,tsg-ut/slackbot,tsg-ut/slackbot |
5b9aca9656e2456b7060d5cdbb62226d7b8d1ea0 | lib/generators/jasmine/examples/templates/spec/javascripts/helpers/SpecHelper.js | lib/generators/jasmine/examples/templates/spec/javascripts/helpers/SpecHelper.js | beforeEach(function() {
this.addMatchers({
toBePlaying: function(expectedSong) {
var player = this.actual;
return player.currentlyPlayingSong === expectedSong
&& player.isPlaying;
}
})
});
| beforeEach(function() {
addMatchers({
toBePlaying: function(expectedSong) {
var player = this.actual;
return player.currentlyPlayingSong === expectedSong
&& player.isPlaying;
}
})
});
| Update spechelper in the rails 2 generator to reflect that addMatchers is exposed on the global namespace | Update spechelper in the rails 2 generator to reflect that addMatchers is exposed on the global namespace
| JavaScript | mit | mavenlink/jasmine-gem,tjgrathwell/jasmine-gem,mavenlink/jasmine-gem,kapost/jasmine-gem,brigade/jasmine-gem,amandamholl/jasmine-gem,amandamholl/jasmine-gem,brigade/jasmine-gem,mavenlink/jasmine-gem,kapost/jasmine-gem,amandamholl/jasmine-gem,brigade/jasmine-gem,tjgrathwell/jasmine-gem |
c690ddf5bbcbc0fd9bedfe547d924f1621dcd76c | app/assets/javascripts/letter_opener_web/application.js | app/assets/javascripts/letter_opener_web/application.js | //= require jquery-1.8.3.min
//= require_tree .
jQuery(function($) {
$('.letter-opener').on('click', 'tr', function() {
var $this = $(this);
$('iframe').attr('src', $this.find('a').attr('href'));
$this.parent().find('.active').removeClass('active');
$this.addClass('active');
});
$('.refresh').cl... | //= require jquery-1.8.3.min
//= require_tree .
jQuery(function($) {
$('.letter-opener').on('click', 'tr', function() {
var $this = $(this);
$('iframe').attr('src', $this.find('a').attr('href'));
$this.parent().find('.active').removeClass('active');
$this.addClass('active');
});
$('.refresh').cl... | Refresh letters content on <iframe> when reloading letters list | Refresh letters content on <iframe> when reloading letters list
| JavaScript | mit | ProctorU/letter_opener_web,sergey-verevkin/letter_opener_web,fgrehm/letter_opener_web,sergey-verevkin/letter_opener_web,fgrehm/letter_opener_web,fgrehm/letter_opener_web,ProctorU/letter_opener_web,fgrehm/letter_opener_web,sergey-verevkin/letter_opener_web,ProctorU/letter_opener_web,ProctorU/letter_opener_web |
5443aa9f1a393557af8dc833d10a051b631c7e79 | dilute.js | dilute.js | module.exports = function (paginator, filter) {
const iterator = paginator[Symbol.asyncIterator]()
let done = false
return {
[Symbol.asyncIterator]: function () {
return this
},
next: async function () {
if (done) {
return { done: true }
... | module.exports = function (paginator, filter) {
const iterator = paginator[Symbol.asyncIterator]()
let done = false
return {
[Symbol.asyncIterator]: function () {
return this
},
next: async function () {
if (done) {
return { done: true }
... | Add missing `await` to outer iterator `next` call. | Add missing `await` to outer iterator `next` call.
Closes #73.
| JavaScript | mit | bigeasy/dilute,bigeasy/dilute |
920d357a257d13cec80f227d1637a437070d7557 | app/scripts/components/experts/requests/create/expert-contract-form.js | app/scripts/components/experts/requests/create/expert-contract-form.js | import template from './expert-contract-form.html';
const expertContract = {
template,
bindings: {
model: '=',
form: '<',
contractTemplate: '<',
expert: '<',
errors: '<',
},
controller: class ExpertContractController {
$onInit() {
this.loading = true;
let sortedOptions = {}... | import template from './expert-contract-form.html';
const expertContract = {
template,
bindings: {
model: '=',
form: '<',
contractTemplate: '<',
expert: '<',
errors: '<',
},
controller: class ExpertContractController {
$onInit() {
this.loading = true;
let sortedOptions = {}... | Allow to override specific contract template values | Allow to override specific contract template values
- CS-208
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport |
a52733b4a7396ac1f8da75abd3ce0a49e4f89f8a | NodeJS/HttpJsonApi/httpjsonapi.js | NodeJS/HttpJsonApi/httpjsonapi.js | var http = require('http');
var url = require('url');
// return a JSON object with the hour minute and second
function parseTime(time){
return {
hour: time.getHours,
minute: time.getMinutes(),
second: time.getSeconds(),
}
}
// returns a JSON response with time in unix
function unixTime... | Add HTTP json api logic | Add HTTP json api logic
| JavaScript | mit | BrianLusina/JS-Snippets | |
62c0a2cde5383d927fa8d45a26b04f5237030818 | push-clients/service-worker.js | push-clients/service-worker.js | self.addEventListener('push', function(event) {
event.waitUntil(clients.matchAll().then(function(clientList) {
var focused = false;
for (var i = 0; i < clientList.length; i++) {
if (clientList[i].focused) {
focused = true;
break;
}
}
return self.registration.showNotificati... | self.addEventListener('push', function(event) {
event.waitUntil(clients.matchAll().then(function(clientList) {
var focused = false;
for (var i = 0; i < clientList.length; i++) {
if (clientList[i].focused) {
focused = true;
break;
}
}
var notificationMessage;
if (focuse... | Use different notification messages when the tab is focused, unfocused, closed | Use different notification messages when the tab is focused, unfocused, closed
| JavaScript | mit | TimAbraldes/serviceworker-cookbook,mozilla/serviceworker-cookbook,mozilla/serviceworker-cookbook,TimAbraldes/serviceworker-cookbook |
bed927e07e502c94127a2e2646294bb5bb64f5ca | src/index.js | src/index.js | import { createActions, handleActions } from 'redux-actions'
import { takeEvery } from 'redux-saga/effects'
export const createModule = (moduleName, definitions, defaultState) => {
const identityActions = []
const actionMap = {}
const reducerMap = {}
const sagas = []
for (const [type, definition] of Object... | import { createActions, handleActions } from 'redux-actions'
import { takeEvery } from 'redux-saga/effects'
export const createModule = (moduleName, definitions, defaultState) => {
const identityActions = []
const actionMap = {}
const reducerMap = {}
const sagas = []
for (const [type, definition] of Object... | Fix bug: Action name should be split into 2 elements (not 1) | Fix bug: Action name should be split into 2 elements (not 1)
| JavaScript | mit | moducks/moducks |
ea1907a5efc980997dde8b34bff7557a106ad9cd | src/index.js | src/index.js | // @flow
/* Transform a Promise-returning function into a function that can optionally
* take a callback as the last parameter instead.
*
* @param {Function} fn a function that returns a Promise
* @param {Object} self (optional) `this` to be used when applying fn
* @return {Function} ... | // @flow
/* Transform a Promise-returning function into a function that can optionally
* take a callback as the last parameter instead.
*
* @param {Function} fn a function that returns a Promise
* @param {Object} self (optional) `this` to be used when applying fn
* @return {Function} ... | Resolve the value of self later | Resolve the value of self later
| JavaScript | mit | DimensionSoftware/optional-callback |
6b01912d1aea129a28262435ff1d1700a257a4d8 | configs/fast-config.js | configs/fast-config.js | anyware_config = {
DEBUG: {
status: true, // Persistent status icons
debugView: true, // Show game debug view
console: false, // Javascript console debug output
},
// The sequence of the games to be run. The first game is run on startup
GAMES_SEQUENCE: [ "mole", "disk", "simon", ],
MOL... | anyware_config = {
DEBUG: {
status: true, // Persistent status icons
debugView: true, // Show game debug view
console: false, // Javascript console debug output
},
// The sequence of the games to be run. The first game is run on startup
GAMES_SEQUENCE: [ "mole", "disk", "simon", ],
SPA... | Make fast config have less space between games | Make fast config have less space between games
| JavaScript | mit | anyWareSculpture/sculpture-client,anyWareSculpture/sculpture-client,anyWareSculpture/sculpture-client |
9246a44a065a046293492edeccafc376a9aa628f | src/utils.js | src/utils.js | import fs from "fs";
import InputStream from "./InputStream";
export function isGreyspace(string) {
if (string === "" ||
string === " " ||
string === "\n" ||
/^\s*$/.test(string)) {
return true;
}
if (string === undefined || string === null)
throw new Error("passed ... | import fs from "fs";
import InputStream from "./InputStream";
const whitespaceRe = /\s+/;
const shebangRe = /#!.*\n/;
const lineCommentRe = /\/\/[^\n]*/;
const blockCommentRe = /\/\*[\W\S]*?\*\//;
export function isGreyspace(string) {
if (string === "" ||
string === " " ||
string === "\n" ||
... | Create greyspace parser function to allow for splitting greyspace by type. | Create greyspace parser function to allow for splitting greyspace
by type.
| JavaScript | mit | Mark-Simulacrum/pretty-generator,Mark-Simulacrum/attractifier |
62081fa8127cce340675fb462a83ee9c457e13a3 | src/utils.js | src/utils.js | // @flow
// Recursively remove undefined, null, empty objects and empty arrays
export const compact = (obj: any): any => {
if (obj === null) {
return undefined;
}
if (Array.isArray(obj)) {
const compacted = obj.map(v => compact(v)).filter(
v => typeof v !== 'undefined'
);
return compacted... | // @flow
// Recursively remove undefined, null, empty objects and empty arrays
export const compact = (value: any): any => {
if (value === null) {
return undefined;
}
if (Array.isArray(value)) {
const compacted = value.map(v => compact(v)).filter(
v => typeof v !== 'undefined'
);
return c... | Rename 'obj' to 'value' for clarity | Rename 'obj' to 'value' for clarity
| JavaScript | apache-2.0 | contactlab/contacthub-sdk-nodejs |
00f48eb9ab3f99883fea421afab2ddd875f32cf3 | node_modules/c9/manifest.js | node_modules/c9/manifest.js | var git = require("./git");
var hostname = require("./hostname");
exports.load = function(root) {
var manifest = require(root + "/package.json");
manifest.revision =
manifest.revision ||
git.getHeadRevisionSync(root);
manifest.hostname = hostname.get();
return manifest;
};
| var git = require("./git");
var hostname = require("./hostname");
var os = require("os");
exports.load = function(root) {
var manifest = require(root + "/package.json");
manifest.revision =
manifest.revision ||
git.getHeadRevisionSync(root);
manifest.hostname = hostname.get();
manifes... | Store internal IP in docker host | Store internal IP in docker host
| JavaScript | bsd-3-clause | humberto-garza/VideoJuegos,humberto-garza/VideoJuegos |
15c69f68a85e0bffca04e8c67b81b7260198f1c8 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... | Update js for sticky content | Update js for sticky content
| JavaScript | mit | bdisney/eShop,bdisney/eShop,bdisney/eShop |
de7309b150f877e59c8303748f84fd9a9e96c472 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | //= require libs/jquery/jquery-ui-1.8.16.custom.min
//= require libs/jquery/plugins/jquery.base64
//= require libs/jquery/plugins/jquery.mustache.js
//= require core
//= require devolution
//= require popup
//= require geo-locator
//= require welcome
//= require browse
//= require search
//= require jquery.history
//= ... | //= require libs/jquery/jquery-ui-1.8.16.custom.min
//= require libs/jquery/plugins/jquery.base64
//= require libs/jquery/plugins/jquery.mustache.js
//= require core
//= require devolution
//= require popup
//= require geo-locator
//= require welcome
//= require browse
//= require search
//= require jquery.history
//= ... | Remove unused javascript requirements and add frontend toolkit | Remove unused javascript requirements and add frontend toolkit | JavaScript | mit | alphagov/static,tadast/static,tadast/static,kalleth/static,robinwhittleton/static,kalleth/static,tadast/static,robinwhittleton/static,alphagov/static,tadast/static,alphagov/static,robinwhittleton/static,kalleth/static,robinwhittleton/static,kalleth/static |
b1e3644c1eb0f68ec02325fca257198a276c4133 | generators/template-engine/modules/nunjucks/nunjucks-express.js | generators/template-engine/modules/nunjucks/nunjucks-express.js | // view engine setup
nunjucks.configure('views', {
autoescape: true,
express: app
});
|
// view engine setup
nunjucks.configure('views', {
autoescape: true,
express: app
});
app.set('view engine', 'html');
| Set default extension (html) for nunjucks | Set default extension (html) for nunjucks
| JavaScript | mit | sahat/boilerplate,sahat/megaboilerplate,sahat/megaboilerplate,sahat/megaboilerplate,sahat/boilerplate |
ea82d61def4d3e9be56cc4a3c8f2b01c5ff4c3e1 | server/app.js | server/app.js | export default {};
var Twitter = require('twit-stream');
var keys =require('./authentication.js');
var stream = new Twitter(keys).stream('statuses/sample');
/// connection configuration for stream object to connect to API
stream.on('connected', function(msg) {
console.log('Connection successful.');
});
stream... | export default {};
var Twitter = require('twit-stream');
var keys =require('./authentication.js');
var stream = new Twitter(keys).stream('statuses/sample');
/// connection configuration for stream object to connect to API
stream.on('connected', function(msg) {
console.log('Connection successful.');
});
stream... | Add event return listeners for Twitter warning,limit and discnct | Add event return listeners for Twitter warning,limit and discnct
considering the amount of information you will be processing it
is more imperative for you to take into account and work on being
able to keep track of what twitters feedback is going to be. Thus
created a series of event listeners for message feedback f... | JavaScript | isc | edwardpark/d3withtwitterstream,edwardpark/d3withtwitterstream |
d02e4db2e4ab9e359f04c4d5315d01e55679e471 | routes/index.js | routes/index.js | /**
* Basic route controller
*/
var pages = require('./pages');
var formidable = require('formidable');
module.exports = function(app, io) {
app.get('/', pages.index);
app.post('/', function(req, res, next){
var form = new formidable.IncomingForm();
form.uploadDir = "./images";
form... | /**
* Basic route controller
*/
var pages = require('./pages');
var formidable = require('formidable');
var fs = require('fs');
var Parse = require('csv-parse');
function parseFile(filePath, res){
var output = [];
function onNewRecord(record){
output.push(record);
}
function onError(error... | Handle parsing errors on parse completion. Stream file and parse the list into JSON objs and dump onto the res | Handle parsing errors on parse completion.
Stream file and parse the list into JSON objs and dump onto the res
| JavaScript | mit | Midnight-Coder/DerangedCSVs,Midnight-Coder/DerangedCSVs |
589e86a2a94e05f30cd8b39bbdb8c2c109a56427 | js/console-save.js | js/console-save.js | //Source:
//https://plus.google.com/+AddyOsmani/posts/jBS8CiNTESM
//http://bgrins.github.io/devtools-snippets/#console-save
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No data');
return;
}
if(!filename) file... | //Source:
//https://plus.google.com/+AddyOsmani/posts/jBS8CiNTESM
//http://bgrins.github.io/devtools-snippets/#console-save
//A simple way to save objects as .json files from the console
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No da... | Add import and export buttons | Add import and export buttons
| JavaScript | mit | sjbuysse/sessions-map,sjbuysse/sessions-map |
c2957291d4db4a30fc1fa427fb179cd0c30c6001 | server/app.js | server/app.js | var log = require("./log.js");
var app =
{
// io: null
};
app.init = function init(httpServer)
{
// TODO: add WebSocket (socket.io) endpoints or other light non-HTTP backend connections here as necessary (or move to a real app framework for Node like Express)
// app.io = require("socket.io")(httpServer);
// ...
... | // var io = require("socket.io")();
var log = require("./log.js");
function init(httpServer)
{
// TODO: add WebSocket (socket.io) endpoints or other light non-HTTP backend connections here as necessary (or move to a real app framework for Node like Express)
// io.attach(httpServer);
log("Web application initializ... | Update to proper Node module scope conventions | Update to proper Node module scope conventions
| JavaScript | mit | frog/packaged-node-web-server,frog/packaged-node-web-server,frog/packaged-node-web-server |
6a1098ef55e3723447d336384d0273f7f0a8dc00 | misc/chrome_plugins/clean_concourse_pipeline/src/inject.user.js | misc/chrome_plugins/clean_concourse_pipeline/src/inject.user.js | // ==UserScript==
// @name Remove concourse elements
// @namespace cloudpipeline.digital
// @description Strips away some of the cruft from the concourse pipeline view when showing it on monitoring screens.
// @include https://deployer.*.cloudpipeline.digital/*
// @include https://deployer.cloud.servic... | // ==UserScript==
// @name Remove concourse elements
// @namespace cloudpipeline.digital
// @description Strips away some of the cruft from the concourse pipeline view when showing it on monitoring screens.
// @include https://deployer.*.cloudpipeline.digital/*
// @include https://deployer.cloud.servic... | Update chrome clean pipelines plugin to work with concourse 5 | Update chrome clean pipelines plugin to work with concourse 5
This commit updates the divs that we wish to remove from the pipeline view.
| JavaScript | mit | alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf |
7d792bb25af6236a0fa53c561c7aa416129561b7 | client/widgets/sharing/sharing.js | client/widgets/sharing/sharing.js | import Shariff from '/imports/ui/lib/shariff/shariff';
Template.sharing.onRendered(function() {
this.autorun(() => {
this.shariff = new Shariff(this.find('.shariff'), {
lang: Session.get('locale'),
services: [
'twitter',
'facebook',
'whatsapp',
'googleplus',
'diaspora',
'mail',
'in... | import Shariff from '/imports/ui/lib/shariff/shariff';
Template.sharing.onRendered(function() {
this.autorun(() => {
this.shariff = new Shariff(this.find('.shariff'), {
lang: Session.get('locale'),
mailtoUrl: 'mailto:',
services: [
'twitter',
'facebook',
'whatsapp',
'googleplus',
'diasp... | Use mailto: for the moment | Use mailto: for the moment
| JavaScript | agpl-3.0 | schuel/hmmm,schuel/hmmm,Openki/Openki,schuel/hmmm,Openki/Openki,Openki/Openki |
f569688bc7ce880a1339697d3b775d67528d1eb8 | static/scripts/helpers/form_bug_text.js | static/scripts/helpers/form_bug_text.js | /* eslint-disable max-len */
export default `Ich als [Nutzerrolle]
habe auf der Seite [???]
die Funktion [???]
aufgrund des Fehlers/der Fehlermeldung "[???]"
nicht benutzen können.
Tritt der Fehler auch bei anderen/ ähnlichen Bereichen (z.B. andere Kurse oder Nutzer) auf?
Wie genau äußert sich das Problem?
Wenn mehre... | /* eslint-disable max-len */
export default `Ich als [Nutzerrolle]
habe auf der Seite [???]
die Funktion [???]
aufgrund des Fehlers/der Fehlermeldung "[???]"
nicht benutzen können.
Tritt der Fehler auch bei anderen/ ähnlichen Bereichen (z.B. andere Kurse oder Nutzer) auf?
Wie genau äußert sich das Problem?
Wann trat ... | Add a new question regarding datetime | Add a new question regarding datetime
| JavaScript | agpl-3.0 | schul-cloud/schulcloud-client,schul-cloud/schulcloud-client,schul-cloud/schulcloud-client |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.