commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
1e928e64d6ea914870e2240a12bf33b8b2cf09b0 | src/openfisca-proptypes.js | src/openfisca-proptypes.js | import PropTypes from 'prop-types'
const valuesShape = PropTypes.objectOf(PropTypes.oneOfType([
PropTypes.bool,
PropTypes.number,
PropTypes.string,
]))
export const parameterShape = PropTypes.shape({
id: PropTypes.string,
description: PropTypes.string,
normalizedDescription: PropTypes.string,
values: v... | import PropTypes from 'prop-types'
const valuesShape = PropTypes.objectOf(PropTypes.oneOfType([
PropTypes.bool,
PropTypes.number,
PropTypes.string,
]))
export const parameterShape = PropTypes.shape({
id: PropTypes.string,
description: PropTypes.string,
documentation: PropTypes.string,
normalizedDescrip... | Update parameters and variables shapes | Update parameters and variables shapes
| JavaScript | agpl-3.0 | openfisca/legislation-explorer | ---
+++
@@ -10,6 +10,7 @@
export const parameterShape = PropTypes.shape({
id: PropTypes.string,
description: PropTypes.string,
+ documentation: PropTypes.string,
normalizedDescription: PropTypes.string,
values: valuesShape,
brackets: PropTypes.objectOf(valuesShape),
@@ -19,6 +20,7 @@
id: PropTypes... |
b24727fabb21448e8771e072f8be6ec2716e52ad | deploy/electron/Gruntfile.js | deploy/electron/Gruntfile.js | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"download-electron": {
version: "1.8.8",
outputDir: "./electron",
rebuild: true
}
});
grunt.loadNpmTasks('grunt-download... | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"download-electron": {
version: "2.0.18",
outputDir: "./electron",
rebuild: true
}
});
grunt.loadNpmTasks('grunt-downloa... | Update electron version fixing security issues | Update electron version fixing security issues
| JavaScript | mit | LightTable/LightTable,LightTable/LightTable,LightTable/LightTable | ---
+++
@@ -4,7 +4,7 @@
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"download-electron": {
- version: "1.8.8",
+ version: "2.0.18",
outputDir: "./electron",
rebuild: true
} |
d0d13e5feea4aa2c3d7f35be31dcbd0299f9a4d3 | client/components/App/App.js | client/components/App/App.js | // @flow
import React from 'react'
import 'normalize.css/normalize.css'
import Footer from 'components/Footer/Footer'
import Nav from '../Nav/Nav'
import MobileFooterToolbar from '../Nav/MobileFooterToolbar/MobileFooterToolbar'
import styles from './App.scss'
import '../../styles/global.scss'
import Content from 'react... | // @flow
import React from 'react'
import 'normalize.css/normalize.css'
import Footer from 'components/Footer/Footer'
import Nav from '../Nav/Nav'
import MobileFooterToolbar from '../Nav/MobileFooterNav/MobileFooterNav'
import styles from './App.scss'
import '../../styles/global.scss'
import Content from 'react-mdc-web... | Fix mobile footer toolbar import rename | Fix mobile footer toolbar import rename
| JavaScript | mit | ncrmro/reango,ncrmro/ango,ncrmro/reango,ncrmro/ango,ncrmro/ango,ncrmro/reango | ---
+++
@@ -3,7 +3,7 @@
import 'normalize.css/normalize.css'
import Footer from 'components/Footer/Footer'
import Nav from '../Nav/Nav'
-import MobileFooterToolbar from '../Nav/MobileFooterToolbar/MobileFooterToolbar'
+import MobileFooterToolbar from '../Nav/MobileFooterNav/MobileFooterNav'
import styles from './... |
edd29b9bcb894ed1fd6511f2e748a87a14d792f3 | assets/site.js | assets/site.js | (function(){
"use strict";
var d = document, inits = [];
window.initializers = inits;
// initializer to manipulate all hyperlinks
inits.push(function(){
var x, h = location.host;
for (var xs = d.links, i = xs.length; i--; ){
var x = xs[i], m = x.getAttribute('data-m');
if (m) {
... | (function(){
"use strict";
var d = document, inits = [];
window.initializers = inits;
// initializer to manipulate all hyperlinks
inits.push(function(){
var x, h = location.host;
for (var xs = d.links, i = xs.length; i--; ){
var x = xs[i], m = x.getAttribute('data-m');
if (m) {
... | Add initializer to set active tab in page header | Add initializer to set active tab in page header | JavaScript | mit | tommy-carlier/www.tcx.be,tommy-carlier/www.tcx.be,tommy-carlier/www.tcx.be | ---
+++
@@ -23,6 +23,21 @@
}
}
});
+
+ // initializer to set active tab in page header
+ inits.push(function(){
+ if (d.querySelectorAll){
+ var xs = d.querySelectorAll('body>header>nav>a'), href = location.href;
+ for(var i = 1, n = xs.length; i < n; i++){
+ var x = xs[i];
+ ... |
fd360a1315640847c249b3422790ce0bbd57d0d9 | lib/package/plugins/checkConditionTruth.js | lib/package/plugins/checkConditionTruth.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 writing, ... | /*
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 writing, ... | Fix a typing mistake in 'logical absurdity' message | Fix a typing mistake in 'logical absurdity' message
| JavaScript | apache-2.0 | apigee/apigeelint,apigeecs/bundle-linter | ---
+++
@@ -36,7 +36,7 @@
line: condition.getElement().lineNumber,
column: condition.getElement().columnNumber,
plugin,
- message: "Condition may be a logical absuridty."
+ message: "Condition may be a logical absurdity."
});
hadErr = true;
} |
d1293e868ed3d7187423a56717f406e052da41a2 | config/index.js | config/index.js | import defaults from 'defaults'
const API_GLOBAL = '_IMDIKATOR'
const env = process.env.NODE_ENV || 'development'
const DEFAULTS = {
port: 3000,
reduxDevTools: false
}
const globalConfig = (typeof window !== 'undefined' && window[API_GLOBAL] || {})
export default defaults({
env,
port: process.env.PORT,
/... | import defaults from 'defaults'
const API_GLOBAL = '_IMDIKATOR'
const env = process.env.NODE_ENV || 'development'
const DEFAULTS = {
port: 3000,
reduxDevTools: false
}
const globalConfig = (typeof window !== 'undefined' && window[API_GLOBAL] || {})
export default defaults({
env,
port: process.env.PORT,
/... | FIX - changed node api to https | FIX - changed node api to https
| JavaScript | mit | bengler/imdikator,bengler/imdikator | ---
+++
@@ -15,7 +15,7 @@
env,
port: process.env.PORT,
// nodeApiHost: 'localhost:8080',
- nodeApiHost: 'https://atindikatornode.azurewebsites.net',
+ nodeApiHost: 'atindikatornode.azurewebsites.net',
apiHost: globalConfig.apiHost,
contentApiHost: globalConfig.contentApiHost,
reduxDevTools: env ==... |
110e1871555cece764e2dcbfdf3ab7c14c7c164e | bin/gut-cli.js | bin/gut-cli.js | var gut = require('../');
if (process.argv.length > 2 && process.argv[2] === 'status') {
console.log("\n\tGut status: %s", gut.getStatus());
}
console.log('\nI think you meant "git"');
| #!/usr/bin/env node
var gut = require('../');
if (process.argv.length > 2 && process.argv[2] === 'status') {
console.log("\n\tGut status: %s", gut.getStatus());
}
console.log('\nI think you meant "git"');
| Add shabang to bin file | Add shabang to bin file
| JavaScript | mit | itsananderson/gut-status | ---
+++
@@ -1,3 +1,5 @@
+#!/usr/bin/env node
+
var gut = require('../');
if (process.argv.length > 2 && process.argv[2] === 'status') { |
c025d9457aa000d0f23252e07ce6f2e2c3c5d971 | releaf-core/app/assets/config/releaf_core_manifest.js | releaf-core/app/assets/config/releaf_core_manifest.js | //= link_tree ../images
//= link releaf/application.css
//= link releaf/application.js
| //= link_tree ../images
//= link_tree ../javascripts/ckeditor
//= link releaf/application.css
//= link releaf/application.js
| Fix releaf ckeditor assets copying | Fix releaf ckeditor assets copying
| JavaScript | mit | cubesystems/releaf,cubesystems/releaf,cubesystems/releaf | ---
+++
@@ -1,3 +1,4 @@
//= link_tree ../images
+//= link_tree ../javascripts/ckeditor
//= link releaf/application.css
//= link releaf/application.js |
7a3062a02c2e676704ecad75def38d322c45a5d0 | lib/resources/console/scripts/content-editor/plaintext.js | lib/resources/console/scripts/content-editor/plaintext.js | pw.component.register('content-editor-plaintext', function (view, config) {
var self = this;
var mock = document.createElement('DIV');
mock.classList.add('console-content-plaintext-mock')
mock.style.position = 'absolute';
mock.style.top = '-100px';
mock.style.opacity = '0';
mock.style.width = view.node.c... | pw.component.register('content-editor-plaintext', function (view, config) {
var self = this;
var mock = document.createElement('DIV');
mock.classList.add('console-content-plaintext-mock')
mock.style.position = 'absolute';
mock.style.top = '-100px';
mock.style.opacity = '0';
mock.style.width = view.node.c... | Fix text editor wrapping when floating | Fix text editor wrapping when floating
| JavaScript | mit | metabahn/console,metabahn/console,metabahn/console | ---
+++
@@ -8,7 +8,7 @@
mock.style.opacity = '0';
mock.style.width = view.node.clientWidth + 'px';
- document.body.appendChild(mock);
+ pw.node.after(view.node, mock);
view.node.addEventListener('keypress', function (evt) {
var value = this.value + String.fromCharCode(evt.keyCode); |
a6d0373ea7ca897721d691089567af8e13bab61b | mac/filetypes/open_STAK.js | mac/filetypes/open_STAK.js | define(['itemObjectModel', 'mac/roman'], function(itemOM, macRoman) {
'use strict';
function open(item) {
function onBlock(item, byteSource) {
return byteSource.slice(0, 12).getBytes().then(function(headerBytes) {
var dv = new DataView(headerBytes.buffer, headerBytes.byteOffset, 4);
va... | define(['itemObjectModel', 'mac/roman'], function(itemOM, macRoman) {
'use strict';
function open(item) {
function onBlock(item, byteSource) {
return byteSource.slice(0, 12).getBytes().then(function(headerBytes) {
var dv = new DataView(
headerBytes.buffer, headerBytes.byteOffset, hea... | Use right length of header | Use right length of header | JavaScript | mit | radishengine/drowsy,radishengine/drowsy | ---
+++
@@ -5,7 +5,8 @@
function open(item) {
function onBlock(item, byteSource) {
return byteSource.slice(0, 12).getBytes().then(function(headerBytes) {
- var dv = new DataView(headerBytes.buffer, headerBytes.byteOffset, 4);
+ var dv = new DataView(
+ headerBytes.buffer, headerB... |
93bc928f2f19bba92ce178325f396c863f34c566 | packages/client/.spinrc.js | packages/client/.spinrc.js | const url = require('url');
const config = {
builders: {
web: {
entry: './src/index.tsx',
stack: ['web'],
openBrowser: true,
dllExcludes: ['bootstrap'],
defines: {
__CLIENT__: true
},
// Wait for backend to start prior to letting webpack load frontend page
... | const url = require('url');
const config = {
builders: {
web: {
entry: './src/index.tsx',
stack: ['web'],
openBrowser: true,
dllExcludes: ['bootstrap'],
defines: {
__CLIENT__: true
},
// Wait for backend to start prior to letting webpack load frontend page
... | Remove unused option for client-side bundle | Remove unused option for client-side bundle
| JavaScript | mit | sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit | ---
+++
@@ -28,7 +28,6 @@
ssr: true,
webpackDll: true,
reactHotLoader: false,
- frontendRefreshOnBackendChange: true,
defines: {
__DEV__: process.env.NODE_ENV !== 'production',
__API_URL__: '"/graphql"' |
4f2ba69c7a4c2e5906d949fae1d0fc902c6f12df | data/wp/wp-content/plugins/epfl/menus/epfl-menus-admin.js | data/wp/wp-content/plugins/epfl/menus/epfl-menus-admin.js | // It seems that not much documentation exists for the JQuery
// mini-Web-app that is the Wordpress admin menu editor. However,
// insofar as Polylang's business in that mini-Web-app is similar
// to ours, studying the js/nav-menu.js therefrom is helpful.
function initNavMenus ($) {
var $metabox = $('div.add-externa... | function initExternalMenuList ($) {
$('a.page-title-action').remove();
$('h1.wp-heading-inline').after('<button class="page-title-action">' + wp.translations.refresh_button + '</button>');
var $button = $('h1.wp-heading-inline').next();
var spinning = false;
$button.click(function() {
if (sp... | Remove dead code in the JS app | Remove dead code in the JS app
| JavaScript | mit | epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp | ---
+++
@@ -1,27 +1,3 @@
-// It seems that not much documentation exists for the JQuery
-// mini-Web-app that is the Wordpress admin menu editor. However,
-// insofar as Polylang's business in that mini-Web-app is similar
-// to ours, studying the js/nav-menu.js therefrom is helpful.
-
-function initNavMenus ($) {
- ... |
d94120cf7da438722c1bb60dfaa81ada4e48e724 | src/helpers/menu_entry.js | src/helpers/menu_entry.js | const Handlebars = require('handlebars');
const templates = {
active: Handlebars.compile('<li class="active">{{{content}}}</li>'),
unactive: Handlebars.compile('<li><a href="{{link}}">{{{content}}}</a></li>')
};
module.exports = function(entries, current_page) {
const items = entries.map((entry) => {
... | const Handlebars = require('handlebars');
const templates = {
active: Handlebars.compile('<li class="active"><a>{{{content}}}</a></li>'),
unactive: Handlebars.compile('<li><a href="{{link}}">{{{content}}}</a></li>')
};
module.exports = function(entries, current_page) {
const items = entries.map((entry) =>... | Fix active menu item content. | Fix active menu item content.
| JavaScript | mit | NealRame/CV,NealRame/Blog,NealRame/Blog,NealRame/Blog,NealRame/CV | ---
+++
@@ -1,7 +1,7 @@
const Handlebars = require('handlebars');
const templates = {
- active: Handlebars.compile('<li class="active">{{{content}}}</li>'),
+ active: Handlebars.compile('<li class="active"><a>{{{content}}}</a></li>'),
unactive: Handlebars.compile('<li><a href="{{link}}">{{{content}}}</... |
bc09b643a4763de17f5d6db6b926174667825ad2 | client/app/instructor/newevent/newevent.controller.js | client/app/instructor/newevent/newevent.controller.js | 'use strict';
export default class NewEventCtrl {
/*@ngInject*/
constructor($scope) {
$scope.event = {info:{}};
$scope.stage = {
select: true,
create: false,
assign: false,
done: false
}
$scope.doneSelect = function(create){
$scope.stage.select = false;
if (crea... | 'use strict';
export default class NewEventCtrl {
/*@ngInject*/
constructor($scope) {
$scope.event = {info:{}};
$scope.stage = {
select: false,
create: true,
assign: false,
done: false
}
$scope.doneSelect = function(create){
$scope.stage.select = false;
if (crea... | Change to new event form instead of to selecting an event | Change to new event form instead of to selecting an event
| JavaScript | mit | rcos/venue,rcos/venue,rcos/venue,rcos/venue | ---
+++
@@ -5,8 +5,8 @@
constructor($scope) {
$scope.event = {info:{}};
$scope.stage = {
- select: true,
- create: false,
+ select: false,
+ create: true,
assign: false,
done: false
} |
9c61fdff3cf4e40724f2565a5ab55f6d2b3aa0a9 | stats-server/lib/server.js | stats-server/lib/server.js | var express = require('express');
var https = require('https');
var logger = require('./logger');
var security = require('./security');
var db = require('./db');
var app = configureExpressApp();
initializeMongo(initializeRoutes);
startServer(security, app);
function configureExpressApp() {
var app = express();
ap... | var express = require('express');
var https = require('https');
var logger = require('./logger');
var security = require('./security');
var db = require('./db');
var app = configureExpressApp();
initializeMongo(initializeRoutes);
startServer(security, app);
function configureExpressApp() {
var app = express();
ap... | Change port back to 6666 | Change port back to 6666
| JavaScript | agpl-3.0 | cazacugmihai/codebrag,cazacugmihai/codebrag,softwaremill/codebrag,softwaremill/codebrag,cazacugmihai/codebrag,cazacugmihai/codebrag,softwaremill/codebrag,softwaremill/codebrag,cazacugmihai/codebrag | ---
+++
@@ -36,7 +36,7 @@
}
function startServer(security, app) {
- var port = 3000;
+ var port = 6666;
var httpsServer = https.createServer(security.credentials, app);
httpsServer.listen(port);
console.log("Codebrag stats server started on port", port); |
7e580f82edfbe1b3ba4e6e7a365c216b2b81cb91 | config/index.js | config/index.js | // see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPat... | // see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPat... | Change default dev port to 3000 | Change default dev port to 3000
| JavaScript | mit | adrielpdeguzman/vuelma,adrielpdeguzman/vuelma,vuelma/vuelma,vuelma/vuelma | ---
+++
@@ -23,7 +23,7 @@
},
dev: {
env: require('./dev.env'),
- port: 8080,
+ port: 3000,
autoOpenBrowser: true,
assetsSubDirectory: 'static',
assetsPublicPath: '/', |
87eebeaee3d2930e29f8b9aa7e3784f7f519f444 | jquery.activeNavigation.js | jquery.activeNavigation.js | (function( $ ) {
$.fn.activeNavigation = function(selector) {
var pathname = window.location.pathname
var hrefs = []
$(selector).find("a").each(function(){
if (pathname.indexOf($(this).attr("href")) > -1)
hrefs.push($(this))
})
if (hrefs.length) {... | (function( $ ) {
$.fn.activeNavigation = function(selector) {
var pathname = window.location.pathname
var extension_position;
var href;
var hrefs = []
$(selector).find("a").each(function(){
// Remove href file extension
extension_position = $(this).att... | Remove file extension from href's | Remove file extension from href's
| JavaScript | mit | Vitaa/ActiveNavigation,Vitaa/ActiveNavigation | ---
+++
@@ -1,10 +1,17 @@
(function( $ ) {
$.fn.activeNavigation = function(selector) {
var pathname = window.location.pathname
+ var extension_position;
+ var href;
var hrefs = []
$(selector).find("a").each(function(){
- if (pathname.indexOf($(this).attr("hre... |
26d0c3815f5bdcc23b25709167c1bcf96a8d14c2 | examples/worker-semaphore.js | examples/worker-semaphore.js | var {Worker} = require("ringo/worker")
var {Semaphore} = require("ringo/concurrent")
var {setInterval, clearInterval} = require("ringo/scheduler");
function main() {
// Create a new workers from this same module. Note that this will
// create a new instance of this module as workers are isolated.
var w = n... | var {Worker} = require("ringo/worker")
var {Semaphore} = require("ringo/concurrent")
var {setInterval, clearInterval} = require("ringo/scheduler");
function main() {
// Create a new workers from this same module. Note that this will
// create a new instance of this module as workers are isolated.
var w = n... | Make single worker semaphore example slightly more interesting | Make single worker semaphore example slightly more interesting
| JavaScript | apache-2.0 | Transcordia/ringojs,ringo/ringojs,ringo/ringojs,oberhamsi/ringojs,Transcordia/ringojs,ringo/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,Transcordia/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs | ---
+++
@@ -9,7 +9,7 @@
var s = new Semaphore();
w.onmessage = function(e) {
- print("Got response from worker: " + e.data);
+ print(" Response from worker: " + e.data);
s.signal();
};
@@ -19,9 +19,12 @@
// allowing us to wait synchronously for replies.
w.postMessa... |
68a5a2ce778484bf94518ad3e1a2a895c76d25f4 | app/imports/ui/components/form-fields/open-cloudinary-widget.js | app/imports/ui/components/form-fields/open-cloudinary-widget.js | import { Meteor } from 'meteor/meteor';
import { $ } from 'meteor/jquery';
/* global cloudinary */
/**
* Opens the Cloudinary Upload widget and sets the value of the input field with name equal to nameAttribute to the
* resulting URL of the uploaded picture.
* @param nameAttribute The value of the associated input... | import { Meteor } from 'meteor/meteor';
import { $ } from 'meteor/jquery';
/* global cloudinary */
/**
* Opens the Cloudinary Upload widget and sets the value of the input field with name equal to nameAttribute to the
* resulting URL of the uploaded picture.
* @param nameAttribute The value of the associated input... | Change min image size to 200x200 | Change min image size to 200x200
| JavaScript | apache-2.0 | radgrad/radgrad,radgrad/radgrad,radgrad/radgrad | ---
+++
@@ -20,8 +20,8 @@
max_file_size: '500000',
max_image_width: '500',
max_image_height: '500',
- min_image_width: '300',
- min_image_height: '300',
+ min_image_width: '200',
+ min_image_height: '200',
},
(error, result) => {
if (error) { |
9bc7cfc00b0a0b96245af835995b39e8493f0a01 | test_frontend/app/views/teacher/modules/assistance_request_list_module_spec.js | test_frontend/app/views/teacher/modules/assistance_request_list_module_spec.js | define((require) => {
describe('requester_module', () => {
beforeEach(() => {
require('app/views/teacher/modules/assistance_request_list_module');
});
define('>RetrieveAssistanceRequests', () => {
it('should be defined', () => {
expect(RetrieveAssist... | define((require) => {
describe('requester_module', () => {
beforeEach(() => {
require('app/views/teacher/modules/assistance_request_list_module');
});
describe('>RetrieveAssistanceRequests', () => {
it('should be defined', () => {
expect(RetrieveAssi... | Fix AR list module test | Fix AR list module test
| JavaScript | mit | samg2014/VirtualHand,samg2014/VirtualHand | ---
+++
@@ -5,7 +5,7 @@
require('app/views/teacher/modules/assistance_request_list_module');
});
- define('>RetrieveAssistanceRequests', () => {
+ describe('>RetrieveAssistanceRequests', () => {
it('should be defined', () => {
expect(RetrieveAssistan... |
1b77aa7ecddf446637e1bfd14bd92d8d588dcb6d | app/gui/task_view.js | app/gui/task_view.js | define([
'underscore',
'backbone'
], function(_, Backbone) {
var TaskView = Backbone.View.extend({
tagName: 'li',
className: 'task',
events: {
"dragstart" : "on_dragstart",
"dragover" : "on_dragover",
"drop" : "on_drop"
},
initialize: function() {
this.id = 'id-'... | define([
'underscore',
'backbone'
], function(_, Backbone) {
var TaskView = Backbone.View.extend({
tagName: 'li',
className: 'task',
events: {
"dragstart" : "on_dragstart",
"dragover" : "on_dragover",
"drop" : "on_drop",
"click .delete" : "delete"
},
... | Add ability to delete a task | Add ability to delete a task
| JavaScript | mit | lorenzoplanas/tasks,lorenzoplanas/tasks | ---
+++
@@ -6,9 +6,10 @@
tagName: 'li',
className: 'task',
events: {
- "dragstart" : "on_dragstart",
- "dragover" : "on_dragover",
- "drop" : "on_drop"
+ "dragstart" : "on_dragstart",
+ "dragover" : "on_dragover",
+ "drop" : "on_drop",
+ "click... |
edede8b53d19f628c566edf52d426b81d69af306 | client/src/Requests/PanelIssue.js | client/src/Requests/PanelIssue.js | import React from 'react'
import { Panel } from 'react-bootstrap'
import MarkdownBlock from '../shared/MarkdownBlock'
import { getCreator, getContent } from '../shared/requestUtils'
const Issue = props => {
return (
<Panel
header={`${props.issue.title} by ${getCreator(props.issue).name || getCreator(props.... | import React from 'react'
import { Panel } from 'react-bootstrap'
import MarkdownBlock from '../shared/MarkdownBlock'
import { getCreator, getContent } from '../shared/requestUtils'
const Issue = props => {
if (!props.issue)
return null
return (
<Panel
header={`${props.issue.title} by ${getCreator(p... | Work around react router bug | Work around react router bug
<Miss /> sometimes renders even when it should not
| JavaScript | mit | clembou/github-requests,clembou/github-requests,clembou/github-requests | ---
+++
@@ -4,6 +4,9 @@
import { getCreator, getContent } from '../shared/requestUtils'
const Issue = props => {
+ if (!props.issue)
+ return null
+
return (
<Panel
header={`${props.issue.title} by ${getCreator(props.issue).name || getCreator(props.issue).login}`} |
9c2086204891e1b78e8cc077272018238d0ae5c1 | server/vote.js | server/vote.js | // TODO: should the baseScore be stored, and updated at vote time?
// This interface should change and become more OO, this'll do for now
var Scoring = {
// re-run the scoring algorithm on a single object
updateObject: function(object) {
// just count the number of votes for now
var baseScore = MyVote... | // TODO: should the baseScore be stored, and updated at vote time?
// This interface should change and become more OO, this'll do for now
var Scoring = {
// re-run the scoring algorithm on a single object
updateObject: function(object) {
// just count the number of votes for now
var baseScore = object... | Use an atomic update operation | Use an atomic update operation | JavaScript | mit | mrn3/ldsdiscuss,delgermurun/Telescope,manriquef/Vulcan,SachaG/Gamba,geverit4/Telescope,TribeMedia/Screenings,IQ2022/Telescope,eruwinu/presto,caglarsayin/Telescope,rtluu/immersive,aozora/Telescope,zires/Telescope,cloudunicorn/fundandexit,Daz2345/Telescope,em0ney/Telescope,iraasta/quickformtest,covernal/Telescope,STANAPO... | ---
+++
@@ -6,7 +6,7 @@
updateObject: function(object) {
// just count the number of votes for now
- var baseScore = MyVotes.find({votedFor: object._id}).count();
+ var baseScore = object.votes;
// now multiply by 'age' exponentiated
// FIXME: timezones <-- set by server or is getT... |
d2d1d18134787a398511c60dccec4ee89f636edc | examples/cherry-pick/app/screens/application/index.js | examples/cherry-pick/app/screens/application/index.js | import './base.css';
import './application.css';
import 'suitcss-base';
import 'suitcss-utils-text';
import 'suitcss-components-arrange';
import React from 'react';
module.exports = React.createClass({
contextTypes: {
router: React.PropTypes.object.isRequired
},
link: function () {
var router = this.con... | import './base.css';
import './application.css';
import 'suitcss-base';
import 'suitcss-utils-text';
import 'suitcss-components-arrange';
import React from 'react';
module.exports = React.createClass({
contextTypes: {
router: React.PropTypes.object.isRequired
},
link: function () {
var router = this.con... | Fix links in the cherry-pick demo | Fix links in the cherry-pick demo
| JavaScript | mit | nathanboktae/cherrytree,QubitProducts/cherrytree,QubitProducts/cherrytree,nathanboktae/cherrytree | ---
+++
@@ -41,8 +41,8 @@
<footer className='Footer'>
<p className='u-textCenter'>Cherrytree Demo. ·
- <a href='github.com/QubitProducts/cherrytree'>Cherrytree Repo</a> ·
- <a href='github.com/KidkArolis/cherrypick'>Demo Source Code</a>
+ <a href='https://github.... |
4a68f3869ab9af0c3b51bff223c36d49b58e5df3 | app/views/wrapper.js | app/views/wrapper.js | module.exports = function (body) {
return `
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Minor WOT</title>
<link rel="stylesheet" href="/style.css" />
<script src="/app.js" defer></script>
${body}
`;
}
| module.exports = function (body) {
return `
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Minor WOT</title>
<link rel="stylesheet" href="/style.css" />
<script src="/app.js" defer></script>
<div data-root>
${body}
</div>
`;
}
| Add data-root div around main body for later use | Add data-root div around main body for later use
| JavaScript | mit | rijkvanzanten/luaus | ---
+++
@@ -5,6 +5,8 @@
<title>Minor WOT</title>
<link rel="stylesheet" href="/style.css" />
<script src="/app.js" defer></script>
- ${body}
+ <div data-root>
+ ${body}
+ </div>
`;
} |
1fa073552fd0c806aae62e6b317199e46aabd085 | src/ParseCliServer.js | src/ParseCliServer.js | import express from 'express';
import bodyParser from 'body-parser';
import AppCache from 'parse-server/lib/cache';
import ParseCliController from './ParseCliController';
import ParseCliRouter from './ParseCliRouter';
import VendorAdapter from './VendorAdapter';
class ParseCliServer {
constructor({
config,
... | import express from 'express';
import bodyParser from 'body-parser';
import AppCache from 'parse-server/lib/cache';
import ParseCliController from './ParseCliController';
import ParseCliRouter from './ParseCliRouter';
import VendorAdapter from './VendorAdapter';
class ParseCliServer {
constructor({
config,
... | Fix typo in limit configuration and remove bodyparser urlencoded middleware. | Fix typo in limit configuration and remove bodyparser urlencoded
middleware.
| JavaScript | mit | back4app/parse-cli-server,luisholanda/parse-cli-server | ---
+++
@@ -17,7 +17,7 @@
if (config) {
AppCache.put(config.applicationId, config);
if (config.limit != undefined) {
- this.length_limit = limit;
+ this.length_limit = config.limit;
} else {
this.length_limit = '500mb';
} |
1f34969f216a7333a27fbd48b97293f3a22d0ec1 | lib/Object/map-to-array.js | lib/Object/map-to-array.js | 'use strict';
var callable = require('./valid-callable')
, forEach = require('./for-each')
, defaultCb = function (value, key) { return [key, value]; };
module.exports = function (obj, cb/*, thisArg*/) {
var a = [], thisArg = arguments[2];
cb = (cb == null) ? defaultCb : callable(cb);
forEach(obj, function ... | 'use strict';
var callable = require('./valid-callable')
, forEach = require('./for-each')
, call = Function.prototype.call
, defaultCb = function (value, key) { return [key, value]; };
module.exports = function (obj, cb/*, thisArg*/) {
var a = [], thisArg = arguments[2];
cb = (cb == null) ? defaultCb : ca... | Support any callable object as callback | Support any callable object as callback
| JavaScript | isc | medikoo/es5-ext | ---
+++
@@ -2,6 +2,8 @@
var callable = require('./valid-callable')
, forEach = require('./for-each')
+
+ , call = Function.prototype.call
, defaultCb = function (value, key) { return [key, value]; };
@@ -10,7 +12,7 @@
cb = (cb == null) ? defaultCb : callable(cb);
forEach(obj, function (value, key... |
f28118fe786bf4fea5b899ff27e185df532e884d | StringManipulation/ConsecutiveString/consecutivestring.js | StringManipulation/ConsecutiveString/consecutivestring.js | var ConsecutiveString = function(){};
/*validate k and length of the array. If the array length is 0 of less than k of k is less thatn or equal to 0
return an empty string.
if k is 1, then return the longest string.
else, loop through the string, */
ConsecutiveString.prototype.longestConsec = function(starr, k){
var... | var ConsecutiveString = function(){};
/*validate k and length of the array. If the array length is 0 of less than k of k is less thatn or equal to 0
return an empty string.
if k is 1, then return the longest string.
else, loop through the string, */
ConsecutiveString.prototype.longestConsec = function(starr, k){
var... | Add Consectutive String Description solution | Add Consectutive String Description solution
| JavaScript | mit | BrianLusina/JS-Snippets | ---
+++
@@ -15,12 +15,9 @@
});
out = s[s.length-1]
}else{
- for(var x = 0; x <= k; x++){
- var f3 = starr[x] + starr[x+1] + starr[x+2];
- var n3 = starr[x+1] + starr[x+2] + starr[x+3];
- if(n3.length > f3.length){
- starr[x] = null;
- }
+ let lens = strarr.map( (_,i,arr) ... |
a4d85bb42cf25879f154fba5b647778f503984a4 | docs/client/lib/navigate.js | docs/client/lib/navigate.js | navigate = function (hash) {
window.location.replace(Meteor.absoluteUrl(null, { secure: true }) + hash);
};
| navigate = function (hash) {
window.location.replace(Meteor.absoluteUrl() + hash);
};
| Remove extra option to absoluteUrl | Remove extra option to absoluteUrl
force-ssl already sets this option by default
| JavaScript | mit | msavin/meteor,daslicht/meteor,dboyliao/meteor,colinligertwood/meteor,chinasb/meteor,yonglehou/meteor,sclausen/meteor,jdivy/meteor,ashwathgovind/meteor,cog-64/meteor,elkingtonmcb/meteor,l0rd0fwar/meteor,meteor-velocity/meteor,brettle/meteor,dfischer/meteor,HugoRLopes/meteor,kencheung/meteor,jdivy/meteor,chiefninew/meteo... | ---
+++
@@ -1,3 +1,3 @@
navigate = function (hash) {
- window.location.replace(Meteor.absoluteUrl(null, { secure: true }) + hash);
+ window.location.replace(Meteor.absoluteUrl() + hash);
}; |
fe0d1ba2d55121a69791896e0f9fec3aa70f7c3c | public/javascript/fonts.js | public/javascript/fonts.js | WebFontConfig = {
custom: { families: ['Alternate Gothic No.3', 'Clarendon FS Medium', 'Proxima Nova Light', 'Proxima Nova Semibold', 'Stub Serif FS', 'Stub Serif FS'],
urls: [ 'http://f.fontdeck.com/s/css/tEGvGvL6JlBfPjTgf2p9URd+sJ0/' + window.location.hostname + '/5502.css' ] }
};
(function() {
var wf = docume... | WebFontConfig = {
custom: { families: ['Alternate Gothic No.3', 'Clarendon FS Medium', 'Proxima Nova Light', 'Proxima Nova Semibold', 'Stub Serif FS', 'Stub Serif FS', 'Reminder Pro Bold'],
urls: [ 'http://f.fontdeck.com/s/css/tEGvGvL6JlBfPjTgf2p9URd+sJ0/' + window.location.hostname + '/5502.css' ] }
};
(function(... | Add new font to JS | Add new font to JS
| JavaScript | mit | robinwhittleton/static,kalleth/static,tadast/static,robinwhittleton/static,robinwhittleton/static,kalleth/static,robinwhittleton/static,alphagov/static,tadast/static,alphagov/static,alphagov/static,kalleth/static,kalleth/static,tadast/static,tadast/static | ---
+++
@@ -1,5 +1,5 @@
WebFontConfig = {
- custom: { families: ['Alternate Gothic No.3', 'Clarendon FS Medium', 'Proxima Nova Light', 'Proxima Nova Semibold', 'Stub Serif FS', 'Stub Serif FS'],
+ custom: { families: ['Alternate Gothic No.3', 'Clarendon FS Medium', 'Proxima Nova Light', 'Proxima Nova Semibold', 'S... |
040681cfa5be9a0b095fab6f8f3c84c833245c94 | addon/components/one-way-input.js | addon/components/one-way-input.js | import Ember from 'ember';
const {
Component,
get
} = Ember;
export default Component.extend({
tagName: 'input',
type: 'text',
attributeBindings: [
'accept',
'autocomplete',
'autosave',
'dir',
'formaction',
'formenctype',
'formmethod',
'formnovalidate',
'formtarget',
... | import Ember from 'ember';
const {
Component,
get
} = Ember;
export default Component.extend({
tagName: 'input',
type: 'text',
attributeBindings: [
'accept',
'autocomplete',
'autosave',
'dir',
'formaction',
'formenctype',
'formmethod',
'formnovalidate',
'formtarget',
... | Add placeholder to attribute bindings | Add placeholder to attribute bindings
| JavaScript | mit | AdStage/ember-one-way-controls,dockyard/ember-one-way-input,dockyard/ember-one-way-controls,dockyard/ember-one-way-input,AdStage/ember-one-way-controls,dockyard/ember-one-way-controls | ---
+++
@@ -27,6 +27,7 @@
'multiple',
'name',
'pattern',
+ 'placeholder',
'size',
'step',
'type', |
a0d7b9248e15b04725cc72834cebe1084a2e70e5 | addons/storysource/src/manager.js | addons/storysource/src/manager.js | /* eslint-disable react/prop-types */
import React from 'react';
import addons from '@storybook/addons';
import StoryPanel from './StoryPanel';
import { ADDON_ID, PANEL_ID } from '.';
export function register() {
addons.register(ADDON_ID, api => {
addons.addPanel(PANEL_ID, {
title: 'Story',
render: ... | /* eslint-disable react/prop-types */
import React from 'react';
import addons from '@storybook/addons';
import StoryPanel from './StoryPanel';
import { ADDON_ID, PANEL_ID } from '.';
export function register() {
addons.register(ADDON_ID, api => {
addons.addPanel(PANEL_ID, {
title: 'Story',
render: ... | CHANGE paramKey for storysource addon disable | CHANGE paramKey for storysource addon disable
| JavaScript | mit | storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook | ---
+++
@@ -10,7 +10,7 @@
addons.addPanel(PANEL_ID, {
title: 'Story',
render: ({ active, key }) => <StoryPanel key={key} api={api} active={active} />,
- paramKey: 'story',
+ paramKey: 'storysource',
});
});
} |
ff86c57864c82a30f9af6bea2b29b8b2ae68defd | server/routes/heroku.js | server/routes/heroku.js | var express = require('express');
var router = express.Router();
var request = require('request');
router.get('/', function(req, res) {
request({
url: 'https://status.heroku.com/api/v3/current-status',
method: 'GET'
}, function(err, res, body) {
console.log(body);
res.sendStatus(200).end();
});
}... | var express = require('express');
var router = express.Router();
var request = require('request');
router.get('/', function(req, res) {
request({
url: 'https://status.heroku.com/api/v3/current-status',
method: 'GET'
}, function(error, response, body) {
console.log(body); // {"status":{"Production":"gre... | Rename res to not overwrite express res. | Rename res to not overwrite express res.
| JavaScript | mit | jontewks/bc-slack-alerts | ---
+++
@@ -6,8 +6,8 @@
request({
url: 'https://status.heroku.com/api/v3/current-status',
method: 'GET'
- }, function(err, res, body) {
- console.log(body);
+ }, function(error, response, body) {
+ console.log(body); // {"status":{"Production":"green","Development":"green"},"issues":[]}
res.... |
6af9dc39bbf566d6bea1d2bc553d47e9312e7daa | src/Components/EditableTable/EditableTableHeader/index.js | src/Components/EditableTable/EditableTableHeader/index.js | import React from 'react'
import PropTypes from 'prop-types'
const EditableTableHeader = ({columnNames}) => {
return(
<div>
{columnNames.map( columnName => {return <div key={columnName}>{columnName}</div>})}
</div>
)
}
EditableTableHeader.propTypes = {
columnNames: PropTypes.arrayOf(PropTypes.st... | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
const Div = styled.div`
display:flex;
flex-direction:row;
`
const HeaderCell = styled.div`
flex:1;
`
const EditableTableHeader = ({columnNames}) => {
return(
<Div>
{columnNames.map( columnName => {r... | Add styled components to EditableTableHeader | Add styled components to EditableTableHeader
| JavaScript | mit | severnsc/brewing-app,severnsc/brewing-app | ---
+++
@@ -1,12 +1,22 @@
import React from 'react'
import PropTypes from 'prop-types'
+import styled from 'styled-components'
+
+const Div = styled.div`
+ display:flex;
+ flex-direction:row;
+`
+
+const HeaderCell = styled.div`
+ flex:1;
+`
const EditableTableHeader = ({columnNames}) => {
return(
- <... |
5d3bae193a4258fe1310f677f09df68de082590f | packages/coinstac-common/src/models/computation/remote-computation-result.js | packages/coinstac-common/src/models/computation/remote-computation-result.js | 'use strict';
const ComputationResult = require('./computation-result');
const joi = require('joi');
/* istanbul ignore next */
/**
* @class RemoteComputationResult
* @extends ComputationResult
* @description RemoteComputationResult result container
* @property {string[]} usernames
* @property {string} _id exten... | 'use strict';
const ComputationResult = require('./computation-result');
const joi = require('joi');
/* istanbul ignore next */
/**
* @class RemoteComputationResult
* @extends ComputationResult
* @description RemoteComputationResult result container
* @property {string[]} usernames
* @property {string} _id exten... | Fix remote computation document's start date bug. | Fix remote computation document's start date bug.
This ensures that remote computation documents are created with a
dynamically generated start date.
Closes #185.
| JavaScript | mit | MRN-Code/coinstac,MRN-Code/coinstac,MRN-Code/coinstac | ---
+++
@@ -25,7 +25,8 @@
complete: joi.boolean().default(false), // DecentralizedComputation complete/halted
computationInputs: joi.array().items(joi.array()).required(),
endDate: joi.date().timestamp(),
- startDate: joi.date().timestamp().default(Date.now()),
+ startDate: joi.date().timestamp()
+ .def... |
1178d8d86a2b8774ad9636de8d29ca30d352db51 | lib/assets/javascripts/cartodb/common/background_polling/models/upload_config.js | lib/assets/javascripts/cartodb/common/background_polling/models/upload_config.js |
/**
* Default upload config
*
*/
module.exports = {
uploadStates: [
'enqueued',
'pending',
'importing',
'uploading',
'guessing',
'unpacking',
'getting',
'creating',
'complete'
],
fileExtensions: [
'csv',
'xls',
'xlsx',
'zip',
'kml',
'geojson',
... |
/**
* Default upload config
*
*/
module.exports = {
uploadStates: [
'enqueued',
'pending',
'importing',
'uploading',
'guessing',
'unpacking',
'getting',
'creating',
'complete'
],
fileExtensions: [
'csv',
'xls',
'xlsx',
'zip',
'kml',
'geojson',
... | Allow importing RAR files in the UI | Allow importing RAR files in the UI
Fixes 2366
| JavaScript | bsd-3-clause | splashblot/dronedb,CartoDB/cartodb,bloomberg/cartodb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,codeandtheory/cartodb,codeandtheory/cartodb,bloomberg/cartodb,bloomberg/cartodb,CartoDB/cartodb,bloomberg/cartodb,splashblot/dronedb,CartoDB/cartodb,codeandtheory/cartodb,codeandtheory/cartodb,codeandtheory/cartodb,s... | ---
+++
@@ -36,7 +36,8 @@
'tif',
'tiff',
'txt',
- 'sql'
+ 'sql',
+ 'rar'
],
// How big should file be?
fileTimesBigger: 3 |
19c9ad30143a106ecff8eceb1e03d1b0dc68a208 | packages/redis/index.js | packages/redis/index.js | const Redis = require('ioredis');
module.exports = url => {
const redis = new Redis(url);
redis.setJSON = async (...arguments) => {
arguments[1] = JSON.stringify(arguments[1]);
if (typeof arguments[2] === 'object' && arguments[2].asSeconds) {
arguments[2] = parseInt(arguments[2].asSeconds());
}
... | const Redis = require('ioredis');
module.exports = url => {
const redis = new Redis(url);
redis.setJSON = async (...arguments) => {
arguments[1] = JSON.stringify(arguments[1]);
if (typeof arguments[2] === 'object' && arguments[2].asSeconds) {
arguments[2] = parseInt(arguments[2].asSeconds());
}
... | Fix redis syntax error if third argument is undefined | Fix redis syntax error if third argument is undefined
| JavaScript | mit | maxdome/maxdome-node,maxdome/maxdome-node | ---
+++
@@ -12,6 +12,9 @@
arguments[3] = parseInt(arguments[2]);
arguments[2] = 'EX';
}
+ if (typeof arguments[2] === 'undefined') {
+ arguments = [arguments[0], arguments[1]];
+ }
return await redis.set.apply(redis, arguments);
}
|
87f5054b206cac2bc48cd908a83ebdce5723da62 | blueprints/ember-cli-typescript/index.js | blueprints/ember-cli-typescript/index.js | /* eslint-env node */
const path = require('path');
module.exports = {
description: 'Initialize files needed for typescript compilation',
files() {
return [
path.join(this.path, 'files', 'tsconfig.json'),
path.join(this.path, 'files', 'app', 'config', 'environment.d.ts'),
];
},
mapFile()... | import { existsSync } from 'fs';
/* eslint-env node */
const path = require('path');
module.exports = {
description: 'Initialize files needed for typescript compilation',
files() {
return [
path.join(this.path, 'files', 'tsconfig.json'),
path.join(this.path, 'files', 'app', 'config', 'environmen... | Add `.e.c-ts` to `.gitignore` on install. | Add `.e.c-ts` to `.gitignore` on install.
| JavaScript | mit | emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript | ---
+++
@@ -1,3 +1,5 @@
+import { existsSync } from 'fs';
+
/* eslint-env node */
const path = require('path');
@@ -36,7 +38,11 @@
// Entity name is optional right now, creating this hook avoids an error.
},
- afterInstall() {
+ async afterInstall() {
+ if (existsSync('.gitignore')) {
+ await ... |
fd0db8de5cc41d704148a4b5ad64c8161754e146 | tests/commands/cmmTests.js | tests/commands/cmmTests.js | var cmm = require("__buttercup/classes/commands/command.cmm.js");
module.exports = {
setUp: function(cb) {
this.command = new cmm();
(cb)();
},
callbackInjected: {
callsToCallback: function(test) {
var callbackCalled = false;
var callback = function(comment)... | var cmm = require("__buttercup/classes/commands/command.cmm.js");
module.exports = {
setUp: function(cb) {
this.command = new cmm();
(cb)();
},
callbackInjected: {
callsToCallback: function(test) {
var callbackCalled = false;
var callback = function(comment)... | Test case two for comment contents | Test case two for comment contents
| JavaScript | mit | perry-mitchell/buttercup-core,buttercup-pw/buttercup-core,buttercup/buttercup-core,buttercup-pw/buttercup-core,perry-mitchell/buttercup-core,buttercup/buttercup-core,buttercup/buttercup-core | ---
+++
@@ -35,6 +35,23 @@
test.strictEqual(callbackCalled, true, "Calls into callback with correct comment (test case one)");
test.done();
+ },
+
+ callsToCallbackWithCommentTestCaseTwo: function(test) {
+ var providedComment = "The second test case, that is what ... |
73419f13fdb6a10cc0362a108375c062721b612d | eg/piezo.js | eg/piezo.js | var five = require("../lib/johnny-five.js"),
board = new five.Board();
board.on("ready", function() {
// Creates a piezo object and defines the pin to be used for the signal
var piezo = new five.Piezo(3);
// Injects the piezo into the repl
board.repl.inject({
piezo: piezo
});
// Plays a song
piez... | var five = require("../lib/johnny-five.js"),
board = new five.Board();
board.on("ready", function() {
// Creates a piezo object and defines the pin to be used for the signal
var piezo = new five.Piezo(3);
// Injects the piezo into the repl
board.repl.inject({
piezo: piezo
});
// Plays a song
piez... | Change beat to fractional values | Change beat to fractional values
| JavaScript | mit | AnnaGerber/johnny-five,cumbreras/rv,kod3r/johnny-five,kod3r/johnny-five,joelunmsm2003/arduino | ---
+++
@@ -16,26 +16,26 @@
// The first argument is the note (null means "no note")
// The second argument is the length of time (beat) of the note (or non-note)
song: [
- ["C4", 1],
- ["D4", 1],
+ ["C4", 1/4],
+ ["D4", 1/4],
+ ["F4", 1/4],
+ ["D4", 1/4],
+ ["A4", 1/... |
e513455d27aad423afe5bed9d34054430af82473 | plugins/wallhaven_cc.js | plugins/wallhaven_cc.js | var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name: 'wallhaven.cc',
prepareImgLinks: function (callback) {
var res = [];
hoverZoom.urlReplace(res,
'img[src*="/th.wallhaven.cc/"]',
/\/th.wallhaven.cc\/(.*)\/(.*)\/(.*)\.(.*)$/,
'/w.wall... | var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name: 'wallhaven.cc',
version:'3.0',
prepareImgLinks: function (callback) {
var res = [];
hoverZoom.urlReplace(res,
'img[src*="/th.wallhaven.cc/"]',
/\/th.wallhaven.cc\/(.*)\/(.*)\/(.*)\.(.*)$/,... | Update for plug-in : wallhaven.cc | Update for plug-in : wallhaven.cc
| JavaScript | mit | extesy/hoverzoom,extesy/hoverzoom | ---
+++
@@ -1,19 +1,30 @@
var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name: 'wallhaven.cc',
+ version:'3.0',
prepareImgLinks: function (callback) {
+
var res = [];
+
hoverZoom.urlReplace(res,
'img[src*="/th.wallhaven.cc/"]',
/\/th.... |
9ded25a6bb411da73117adcb50fe5194de8bd635 | chrome/browser/resources/managed_user_passphrase_dialog.js | chrome/browser/resources/managed_user_passphrase_dialog.js | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function load() {
$('unlock-passphrase-button').onclick = function(event) {
chrome.send('checkPassphrase', [$('passphrase-entry').value]);
};
... | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function load() {
var checkPassphrase = function(event) {
chrome.send('checkPassphrase', [$('passphrase-entry').value]);
};
var closeDialog ... | Improve usability in passphrase input dialog. | Improve usability in passphrase input dialog.
Add the possiblity to press Enter to submit the dialog and to press Escape to
dismiss it.
R=akuegel@chromium.org, jhawkins@chromium.org
BUG=171370
Review URL: https://chromiumcodereview.appspot.com/12321166
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@185194 00... | JavaScript | bsd-3-clause | krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,ondra-novak/chromium.src,ltilve/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswal... | ---
+++
@@ -3,16 +3,37 @@
// found in the LICENSE file.
function load() {
- $('unlock-passphrase-button').onclick = function(event) {
+ var checkPassphrase = function(event) {
chrome.send('checkPassphrase', [$('passphrase-entry').value]);
};
- $('cancel-passphrase-button').onclick = function(event) {
+... |
dc7e4ee88250241d6950b4bdd6da0dc899050ccb | cla_public/static-src/javascripts/modules/cookie-banner.js | cla_public/static-src/javascripts/modules/cookie-banner.js | 'use strict';
require('./cookie-functions.js');
require('govuk_publishing_components/components/cookie-banner.js');
window.GOVUK.DEFAULT_COOKIE_CONSENT = {
'essential': true,
'usage': false,
'brexit': false
}
window.GOVUK.setDefaultConsentCookie = function () {
var defaultConsent = {
... | 'use strict';
require('./cookie-functions.js');
require('govuk_publishing_components/components/cookie-banner.js');
window.GOVUK.DEFAULT_COOKIE_CONSENT = {
'essential': true,
'usage': false,
'brexit': false
}
window.GOVUK.setDefaultConsentCookie = function () {
var defaultConsent = {
... | Remove cookie banner from cookie settings page | Remove cookie banner from cookie settings page
| JavaScript | mit | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | ---
+++
@@ -27,5 +27,9 @@
window.GOVUK.setCookie('cookie_policy', JSON.stringify(approvedConsent), { days: 365 })
}
+ window.GOVUK.Modules.CookieBanner.prototype.isInCookiesPage = function () {
+ return window.location.pathname === '/cookie-settings'
+ }
+ |
6a68619153b8b2cd9c35401e3943d4c4cc218eb6 | generators/server/templates/server/boot/security.js | generators/server/templates/server/boot/security.js | 'use strict';
const cookieParser = require('cookie-parser');
const csrf = require('csurf');
module.exports = function(server) {
let secure = true;
if (process.env.NODE_ENV === 'development') {
secure = false;
}
server.use(cookieParser());
server.use(csrf({cookie: {
key: 'XSRF-SECRET',
... | 'use strict';
const cookieParser = require('cookie-parser');
const csrf = require('csurf');
module.exports = function(server) {
let secure = true;
if (process.env.NODE_ENV === 'development') {
secure = false;
}
server.use(cookieParser());
server.use(csrf({cookie: {
key: 'XSRF-SECRET',
... | Fix linting errors on server | Fix linting errors on server
| JavaScript | apache-2.0 | societe-generale/react-loopback-generator,societe-generale/react-loopback-generator | ---
+++
@@ -8,6 +8,7 @@
if (process.env.NODE_ENV === 'development') {
secure = false;
}
+
server.use(cookieParser());
server.use(csrf({cookie: {
key: 'XSRF-SECRET',
@@ -16,12 +17,13 @@
path: '/<%= applicationFolder %>'
}}));
- server.use((err, req, res, next) => { //eslin... |
05e683ffe8c940d8fe5f762d91b3d76ab95e5b9d | app/js/controllers.js | app/js/controllers.js | 'use strict';
/* Controllers */
var cvAppControllers = angular.module('cvAppControllers', []);
cvAppControllers.controller('HomeController', ['$scope', '$http', function($scope, $http) {
$http.get('/app/info/info.json').success(function(data) {
$scope.stuff = data;
});
}]);
cvAppControllers.controller('AboutCon... | 'use strict';
/* Controllers */
var cvAppControllers = angular.module('cvAppControllers', []);
cvAppControllers.controller('HomeController', ['$scope', '$http', function($scope, $http) {
$http.get('/app/info/info.json').success(function(data) {
$scope.stuff = data;
});
$scope.backgroundImg = "/app/img/kugghjule... | Add kugghjulet.png to home scope | Add kugghjulet.png to home scope
| JavaScript | mit | RegularSvensson/cvApp,RegularSvensson/cvApp | ---
+++
@@ -8,6 +8,7 @@
$http.get('/app/info/info.json').success(function(data) {
$scope.stuff = data;
});
+ $scope.backgroundImg = "/app/img/kugghjulet.png"
}]);
cvAppControllers.controller('AboutController', ['$scope', '$http', function($scope, $http) { |
ac3b1f587ed3a1cc7e0816d4d0a788da8e6d3a09 | lib/node_modules/@stdlib/datasets/stopwords-english/lib/index.js | lib/node_modules/@stdlib/datasets/stopwords-english/lib/index.js | 'use strict';
/**
* A list of English stopwords.
*
* @module @stdlib/datasets/smart-stopwords-en
*
* @example
* var STOPWORDS = require( '@stdlib/datasets/smart-stopwords-en' )
* // returns [ "a", "a's", "able", "about", ... ]
*/
var STOPWORDS = require( './../data/words.json' );
// EXPORTS //
module.exports = STO... | 'use strict';
/**
* A list of English stopwords.
*
* @module @stdlib/datasets/stopwords-en
*
* @example
* var STOPWORDS = require( '@stdlib/datasets/stopwords-en' )
* // returns [ "a", "a's", "able", "about", ... ]
*/
var STOPWORDS = require( './../data/words.json' );
// EXPORTS //
module.exports = STOPWORDS;
| Revert name change of stopwords-english | Revert name change of stopwords-english
| 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 | ---
+++
@@ -3,10 +3,10 @@
/**
* A list of English stopwords.
*
-* @module @stdlib/datasets/smart-stopwords-en
+* @module @stdlib/datasets/stopwords-en
*
* @example
-* var STOPWORDS = require( '@stdlib/datasets/smart-stopwords-en' )
+* var STOPWORDS = require( '@stdlib/datasets/stopwords-en' )
* // returns [ "a"... |
cecc6de2d3df51acd077c5e3f8e3c88b8608d987 | app/services/index.js | app/services/index.js | import 'whatwg-fetch';
const apiBaseURL = 'http://localhost:1337';
function parseJSONFromResponse(response) {
return response.json();
}
export const bookshelfApi = {
getBooks() {
return fetch(`${apiBaseURL}/books`)
.then(parseJSONFromResponse)
.catch(error =>
console.error(
`Something wen... | import 'whatwg-fetch';
const apiBaseURL = 'http://localhost:1337';
function parseJSONFromResponse(response) {
return response.json();
}
function stringIsEmpty(str) {
return str === '' || str === undefined || str === null;
}
export const bookshelfApi = {
getBooks() {
return fetch(`${apiBaseURL}/books`)
... | Add method createBook to bookshelfApi connection. | Add method createBook to bookshelfApi connection.
| JavaScript | mit | w1nston/bookshelf,w1nston/bookshelf | ---
+++
@@ -6,13 +6,33 @@
return response.json();
}
+function stringIsEmpty(str) {
+ return str === '' || str === undefined || str === null;
+}
+
export const bookshelfApi = {
getBooks() {
return fetch(`${apiBaseURL}/books`)
.then(parseJSONFromResponse)
.catch(error =>
- console.e... |
9672073a981ce9ebb88f7911854518ee9d0225ca | test/reducers/sum.spec.js | test/reducers/sum.spec.js | const sum = require('./sum');
test('adds 1 + 2 to equal 3', () => {
expect(sum(1, 2)).toBe(3);
}); | const sum = require('./sum');
test('adds 1 + 2 to equal 3', () => {
expect(sum(1, 2)).toBe(4);
}); | Change test result to test travis ci notification | Change test result to test travis ci notification
| JavaScript | mit | FermORG/FermionJS,FermORG/FermionJS | ---
+++
@@ -1,5 +1,5 @@
const sum = require('./sum');
test('adds 1 + 2 to equal 3', () => {
- expect(sum(1, 2)).toBe(3);
+ expect(sum(1, 2)).toBe(4);
}); |
2e424fd72f6a1e484da6085238702c989879ad27 | server/server-logic.js | server/server-logic.js | const Q = require('q');
const RegularUsers = require('./../models/userSchema.js');
const BusinessUsers = require('./../models/businessUserSchema.js');
const Events = require('./../models/eventSchema.js');
const utils = require('../utils/utilities.js');
// Promisify a few mongoose methods with the `q` promise library
... | const Q = require('q');
const RegularUsers = require('./../models/userSchema.js');
const BusinessUsers = require('./../models/businessUserSchema.js');
const Events = require('./../models/eventSchema.js');
const utils = require('../utils/utilities.js');
// Promisify a few mongoose methods with the `q` promise library
... | Debug and tested server routes, successful post and get | Debug and tested server routes, successful post and get
| JavaScript | unlicense | DeFieldsEPeriou/DeGreenFields,eperiou/DeGreenFields,eperiou/DeGreenFields,DeFieldsEPeriou/DeGreenFields | ---
+++
@@ -25,13 +25,13 @@
postEvent: (req, res, next) => {
const body = req.body;
-
+ const tags = body.tags ? body.tags.split(' ') : '';
postAnEvent({
username: body.username,
eventTime: body.eventTime,
location: body.location,
createdAt: new Date().toLocaleString(),
... |
8d885db7d5e7a731f1ae180c0160db046cd1355c | examples/renderinitial/router.js | examples/renderinitial/router.js | var monorouter = require('monorouter');
var reactRouting = require('monorouter-react');
var PetList = require('./views/PetList');
var PetDetail = require('./views/PetDetail');
var Preloader = require('./views/Preloader');
module.exports = monorouter()
.setup(reactRouting())
.route('index', '/', function(req) {
... | var monorouter = require('monorouter');
var reactRouting = require('monorouter-react');
var PetList = require('./views/PetList');
var PetDetail = require('./views/PetDetail');
var Preloader = require('./views/Preloader');
module.exports = monorouter()
.setup(reactRouting())
.route('index', '/', function(req) {
... | Add note about 404 pitfall with renderInitial example | Add note about 404 pitfall with renderInitial example
| JavaScript | mit | matthewwithanm/monorouter | ---
+++
@@ -16,6 +16,10 @@
});
})
.route('pet', '/pet/:name', function(req) {
+ // NOTE: Because we're calling `this.renderInitial()`, we lose the
+ // opportunity to have the server send a 404, and the client will have to
+ // display a 'missing' view. If you want the server to send 404s, you hav... |
9c20d0be36788e04838ea8e19e6f7eed3e0f44c3 | app/controllers/control.js | app/controllers/control.js | 'use strict';
/**
* Module dependencies.
*/
/**
* Find device by id
*/
exports.command = function(req, res) {
var client = exports.client;
var channel = '/control/' + req.params.deviceId + '/' + req.params.command;
client.publish(channel, req.body);
console.log('Publish to channel: ' + channel);
... | 'use strict';
/**
* Module dependencies.
*/
/**
* Find device by id
*/
exports.command = function(req, res) {
var client = exports.client;
var channel = '/control/' + req.params.deviceId;
var data = {
command: req.params.command,
body: req.body
}
client.publish(channel, data);
co... | Send command in the published message | Send command in the published message
| JavaScript | apache-2.0 | msprunck/openit-site,msprunck/openit-site | ---
+++
@@ -9,8 +9,12 @@
*/
exports.command = function(req, res) {
var client = exports.client;
- var channel = '/control/' + req.params.deviceId + '/' + req.params.command;
- client.publish(channel, req.body);
+ var channel = '/control/' + req.params.deviceId;
+ var data = {
+ command: req.pa... |
c75bb56fc01ba261f77d848d5667b7b480c71261 | app/controllers/category/index.js | app/controllers/category/index.js | import Ember from 'ember';
import PaginationMixin from '../../mixins/pagination';
const { computed } = Ember;
export default Ember.Controller.extend(PaginationMixin, {
queryParams: ['page', 'per_page', 'sort'],
page: '1',
per_page: 10,
sort: 'alpha',
totalItems: computed.readOnly('model.meta.tota... | import Ember from 'ember';
import PaginationMixin from '../../mixins/pagination';
const { computed } = Ember;
export default Ember.Controller.extend(PaginationMixin, {
queryParams: ['page', 'per_page', 'sort'],
page: '1',
per_page: 10,
sort: 'downloads',
totalItems: computed.readOnly('model.meta.... | Sort crates within a category by downloads by default | Sort crates within a category by downloads by default
There will be an RFC soon about whether this is the best ordering or
not.
| JavaScript | apache-2.0 | Susurrus/crates.io,steveklabnik/crates.io,steveklabnik/crates.io,Susurrus/crates.io,rust-lang/crates.io,rust-lang/crates.io,Susurrus/crates.io,Susurrus/crates.io,rust-lang/crates.io,rust-lang/crates.io,steveklabnik/crates.io,steveklabnik/crates.io | ---
+++
@@ -7,7 +7,7 @@
queryParams: ['page', 'per_page', 'sort'],
page: '1',
per_page: 10,
- sort: 'alpha',
+ sort: 'downloads',
totalItems: computed.readOnly('model.meta.total'),
|
8d362700afeaa78d1741b91c7bf9f31553debfa3 | public/src/js/logger.js | public/src/js/logger.js | /**
* public/src/js/logger.js - delish
*
* Licensed under MIT license.
* Copyright (C) 2017 Karim Alibhai.
*/
const util = require('util')
, debounce = require('debounce')
let currentLog = document.querySelector('.lead')
, nextLog = document.querySelector('.lead.next')
/**
* Updates the current log stat... | /**
* public/src/js/logger.js - delish
*
* Licensed under MIT license.
* Copyright (C) 2017 Karim Alibhai.
*/
const util = require('util')
, debounce = require('debounce')
let currentLog = document.querySelector('.lead')
, nextLog = document.querySelector('.lead.next')
/**
* Updates the current log stat... | Change div to p when creating new logs | Change div to p when creating new logs
| JavaScript | mit | karimsa/delish,karimsa/delish,karimsa/delish | ---
+++
@@ -32,7 +32,7 @@
parent.removeChild(currentLog)
currentLog = nextLog
- nextLog = document.createElement('div')
+ nextLog = document.createElement('p')
nextLog.classList.add('lead')
nextLog.classList.add('next')
parent.appendChild(nextLog) |
d23d00bafe9fb4a89d92f812506c244d2be595a1 | src/browser/extension/background/getPreloadedState.js | src/browser/extension/background/getPreloadedState.js | export default function getPreloadedState(position, cb) {
chrome.storage.local.get([
'monitor' + position, 'slider' + position, 'dispatcher' + position,
'test-templates', 'test-templates-sel'
], options => {
cb({
monitor: {
selected: options['monitor' + position],
sliderIsOpen: opt... | const getIfExists = (sel, template) => (
typeof sel === 'undefined' ||
typeof template === 'undefined' ||
typeof template[sel] === 'undefined' ?
0 : sel
);
export default function getPreloadedState(position, cb) {
chrome.storage.local.get([
'monitor' + position, 'slider' + position, 'dispatcher' + posi... | Select the test template only if exists | Select the test template only if exists
Related to
https://github.com/zalmoxisus/redux-devtools-test-generator/issues/3
| JavaScript | mit | zalmoxisus/redux-devtools-extension,zalmoxisus/redux-devtools-extension | ---
+++
@@ -1,3 +1,10 @@
+const getIfExists = (sel, template) => (
+ typeof sel === 'undefined' ||
+ typeof template === 'undefined' ||
+ typeof template[sel] === 'undefined' ?
+ 0 : sel
+);
+
export default function getPreloadedState(position, cb) {
chrome.storage.local.get([
'monitor' + position, 'sl... |
0c2a557dbef6674d3d352cd49e9c13f4ed2f8362 | src/js/schemas/service-schema/EnvironmentVariables.js | src/js/schemas/service-schema/EnvironmentVariables.js | let EnvironmentVariables = {
description: 'Set environment variables for each task your service launches in addition to those set by Mesos.',
type: 'object',
title: 'Environment Variables',
properties: {
variables: {
type: 'array',
duplicable: true,
addLabel: 'Add Environment Variable',
... | import {Hooks} from 'PluginSDK';
let EnvironmentVariables = {
description: 'Set environment variables for each task your service launches in addition to those set by Mesos.',
type: 'object',
title: 'Environment Variables',
properties: {
variables: {
type: 'array',
duplicable: true,
addLab... | Move unnecessary things out of env schema | Move unnecessary things out of env schema | JavaScript | apache-2.0 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | ---
+++
@@ -1,3 +1,5 @@
+import {Hooks} from 'PluginSDK';
+
let EnvironmentVariables = {
description: 'Set environment variables for each task your service launches in addition to those set by Mesos.',
type: 'object',
@@ -10,26 +12,13 @@
getter: function (service) {
let variableMap = service.ge... |
14c9a161b2362d84905476ffb31be2864eec8a4a | angular-typescript-webpack-jasmine/webpack/webpack.test.js | angular-typescript-webpack-jasmine/webpack/webpack.test.js | const loaders = require("./loaders");
const webpack = require("webpack");
const path = require("path");
module.exports = {
context: path.join(__dirname, ".."),
entry: ["./src/test.ts"],
output: {
filename: "build.js",
path: path.resolve("temp"),
publicPath: "/"
},
resolve: {
extensions: [
... | const rules = require("./rules");
const webpack = require("webpack");
const path = require("path");
module.exports = {
context: path.join(__dirname, ".."),
entry: ["./src/test.ts"],
output: {
filename: "build.js",
path: path.resolve("temp"),
publicPath: "/"
},
resolve: {
extensions: [
"... | Replace loaders -> rules. Delete useless configs | Replace loaders -> rules. Delete useless configs
| JavaScript | mit | var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training | ---
+++
@@ -1,4 +1,4 @@
-const loaders = require("./loaders");
+const rules = require("./rules");
const webpack = require("webpack");
const path = require("path");
@@ -22,14 +22,7 @@
},
devtool: "source-map-inline",
module: {
- loaders: loaders
- /* postLoaders: [
- {
- test: /^((?!\.sp... |
bb1901f9173c5df8ca7444919cfbe18457ebfa3f | endswith.js | endswith.js | /*! http://mths.be/endswith v0.1.0 by @mathias */
if (!String.prototype.endsWith) {
(function() {
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
var toString = {}.toString;
String.prototype.endsWith = function(search) {
var string = String(this);
if (
this == null ||
(sea... | /*! http://mths.be/endswith v0.1.0 by @mathias */
if (!String.prototype.endsWith) {
(function() {
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
var toString = {}.toString;
String.prototype.endsWith = function(search) {
var string = String(this);
if (
this == null ||
(sea... | Use `charCodeAt` instead of `charAt` | Use `charCodeAt` instead of `charAt`
`charCodeAt` is faster in general.
Ref. #4.
| JavaScript | mit | mathiasbynens/String.prototype.endsWith | ---
+++
@@ -32,7 +32,7 @@
}
var index = -1;
while (++index < searchLength) {
- if (string.charAt(start + index) != searchString.charAt(index)) {
+ if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {
return false;
}
} |
b8173fcb00aa5e8599c2bdca5e888614eebf70eb | lib/models/graph-object.js | lib/models/graph-object.js | // Copyright 2015, EMC, Inc.
'use strict';
module.exports = GraphModelFactory;
GraphModelFactory.$provide = 'Models.GraphObject';
GraphModelFactory.$inject = [
'Model'
];
function GraphModelFactory (Model) {
return Model.extend({
connection: 'mongo',
identity: 'graphobjects',
attribu... | // Copyright 2015, EMC, Inc.
'use strict';
module.exports = GraphModelFactory;
GraphModelFactory.$provide = 'Models.GraphObject';
GraphModelFactory.$inject = [
'Model',
'Constants'
];
function GraphModelFactory (Model, Constants) {
return Model.extend({
connection: 'mongo',
identity: 'gr... | Add active() method to graph object model | Add active() method to graph object model
| JavaScript | apache-2.0 | YoussB/on-core,YoussB/on-core | ---
+++
@@ -6,10 +6,11 @@
GraphModelFactory.$provide = 'Models.GraphObject';
GraphModelFactory.$inject = [
- 'Model'
+ 'Model',
+ 'Constants'
];
-function GraphModelFactory (Model) {
+function GraphModelFactory (Model, Constants) {
return Model.extend({
connection: 'mongo',
iden... |
6a4390f2cd0731a55bc6f65745ca16156fa74a94 | tests/unit/serializers/ilm-session-test.js | tests/unit/serializers/ilm-session-test.js | import { moduleForModel, test } from 'ember-qunit';
moduleForModel('ilm-session', 'Unit | Serializer | ilm session', {
// Specify the other units that are required for this test.
needs: ['serializer:ilm-session']
});
// Replace this with your real tests.
test('it serializes records', function(assert) {
let reco... | import { moduleForModel, test } from 'ember-qunit';
moduleForModel('ilm-session', 'Unit | Serializer | ilm session', {
// Specify the other units that are required for this test.
needs: [
'model:session',
'model:learner-group',
'model:instructor-group',
'model:user',
'serializer:ilm-session'
... | Fix ilm-session serializer test dependancies | Fix ilm-session serializer test dependancies
| JavaScript | mit | jrjohnson/frontend,gabycampagna/frontend,djvoa12/frontend,thecoolestguy/frontend,gboushey/frontend,stopfstedt/frontend,dartajax/frontend,thecoolestguy/frontend,gboushey/frontend,ilios/frontend,dartajax/frontend,ilios/frontend,jrjohnson/frontend,gabycampagna/frontend,djvoa12/frontend,stopfstedt/frontend | ---
+++
@@ -2,7 +2,13 @@
moduleForModel('ilm-session', 'Unit | Serializer | ilm session', {
// Specify the other units that are required for this test.
- needs: ['serializer:ilm-session']
+ needs: [
+ 'model:session',
+ 'model:learner-group',
+ 'model:instructor-group',
+ 'model:user',
+ 'seria... |
d12c22bcd977b818dd107cfe5a5fe072f9bbab74 | tests/arity.js | tests/arity.js | var overload = require('../src/overload');
var should = require('should');
describe('overload', function() {
describe('arity', function() {
it('should exist', function() {
overload.should.have.property('arity');
});
it('should work', function() {
var two_or_three = ... | var overload = require('../src/overload');
var should = require('should');
describe('overload', function() {
describe('arity', function() {
it('should exist', function() {
overload.should.have.property('arity');
});
it('should work', function() {
var two_or_three = ... | Add tests for saying more than | Add tests for saying more than
| JavaScript | mit | nathggns/Overload | ---
+++
@@ -33,5 +33,23 @@
obj.work('one', 'two', 'three', 'four');
res.should.eql(5);
});
+
+ it('should work with saying more than or equal to', function() {
+ var obj = {};
+ var res = 0;
+
+ overload.add(obj, 'work', overload.arity(3), fun... |
e0fcfb103b04c290c4572cf2acacf8b56cd16f59 | example/pub.js | example/pub.js | const R = require("ramda");
const Promise = require("bluebird");
const pubsub = require("../")("amqp://docker");
const publish = (event, index) => {
const data = { number: index + 1 };
console.log(` [-] Published event '${ event.name }' with data:`, data);
event.publish(data)
};
// Create the event.
... | const R = require("ramda");
const Promise = require("bluebird");
const pubsub = require("../")("amqp://docker");
const publish = (event, index) => {
const data = { number: index + 1 };
console.log(` [-] Published event '${ event.name }' with data:`, data);
event.publish(data)
};
// Create the event.
... | Extend timeout before killing process. | Extend timeout before killing process.
| JavaScript | mit | philcockfield/mq-pubsub | ---
+++
@@ -29,7 +29,7 @@
Promise.all(promises)
.then(() => {
console.log("");
- setTimeout(() => process.exit(0), 200);
+ setTimeout(() => process.exit(0), 500);
})
} else { |
2483669d68dd399e9597db2c413994817ef1ed61 | test/assert.js | test/assert.js | 'use strict';
var CustomError = require('es5-ext/error/custom')
, logger = require('../lib/logger')();
module.exports = function (t, a) {
t = t(logger);
t(true, true, 'foo');
t.ok(false, 'bar');
t.not(false, true, 'not');
t.deep([1, 2], [1, 2], 'deep');
t.notDeep([1, 2], [2, 1], 'not deep');
t.throws(fu... | 'use strict';
var customError = require('es5-ext/error/custom')
, logger = require('../lib/logger')();
module.exports = function (t, a) {
t = t(logger);
t(true, true, 'foo');
t.ok(false, 'bar');
t.not(false, true, 'not');
t.deep([1, 2], [1, 2], 'deep');
t.notDeep([1, 2], [2, 1], 'not deep');
t.throws(fu... | Update up to changes in es5-ext | Update up to changes in es5-ext
| JavaScript | isc | medikoo/tad | ---
+++
@@ -1,6 +1,6 @@
'use strict';
-var CustomError = require('es5-ext/error/custom')
+var customError = require('es5-ext/error/custom')
, logger = require('../lib/logger')();
module.exports = function (t, a) {
@@ -10,7 +10,7 @@
t.not(false, true, 'not');
t.deep([1, 2], [1, 2], 'deep');
t.notDe... |
9cb0c8ee1f56dbe8c966ea4b912f4fd73f8d3684 | server.js | server.js | import express from 'express';
import { apolloExpress, graphiqlExpress } from 'apollo-server';
import bodyParser from 'body-parser';
import cors from 'cors';
import { createServer } from 'http';
import { SubscriptionServer } from 'subscriptions-transport-ws';
import { subscriptionManager } from './data/subscriptions';... | import express from 'express';
import { apolloExpress, graphiqlExpress } from 'apollo-server';
import bodyParser from 'body-parser';
import cors from 'cors';
import { createServer } from 'http';
import { SubscriptionServer } from 'subscriptions-transport-ws';
import { printSchema } from 'graphql/utilities/schemaPrinter... | Add /schema path that serves schema as plain text | Add /schema path that serves schema as plain text
| JavaScript | mit | misas-io/misas-server,vincentfretin/assembl-graphql-js-server,misas-io/misas-server,a1528zhang/graphql-mock-server | ---
+++
@@ -4,6 +4,7 @@
import cors from 'cors';
import { createServer } from 'http';
import { SubscriptionServer } from 'subscriptions-transport-ws';
+import { printSchema } from 'graphql/utilities/schemaPrinter'
import { subscriptionManager } from './data/subscriptions';
import schema from './data/schema';
@... |
4b91adde9fcdac4489f062552dd96c72efa26fda | server.js | server.js | // server.js
'use strict';
const express = require('express');
const app = express();
const mongoose = require('mongoose');
const morgan = require('morgan');
const bodyParser = require('body-parser'); // Pull info from HTML POST
const methodOverride = require('method-override')... | // server.js
//jscs:disable requireTrailingComma, disallowQuotedKeysInObjects
'use strict';
const express = require('express');
const app = express();
const mongoose = require('mongoose');
const morgan = require('morgan');
const bodyParser = require('body-parser'); // Pull inf... | Disable some annoying JSCS stuff | Disable some annoying JSCS stuff
| JavaScript | mit | brandonlee503/Node-Angular-App-Test,brandonlee503/Node-Angular-App-Test | ---
+++
@@ -1,4 +1,6 @@
// server.js
+
+//jscs:disable requireTrailingComma, disallowQuotedKeysInObjects
'use strict';
|
0d98c7264a78894fbed253e8711bf0ba8c89ba0c | server.js | server.js | 'use strict';
const app = require('./app');
require('./api.js')(app);
require('./static.js')(app);
const PORT = process.env.PORT || 4000;
app.listen(PORT, () => {
console.log(`App listening on port ${PORT}!`);
});
| 'use strict';
const app = require('./app');
// remove the automatically added `X-Powered-By` header
app.disable('x-powered-by');
require('./api.js')(app);
require('./static.js')(app);
const PORT = process.env.PORT || 4000;
app.listen(PORT, () => {
console.log(`App listening on port ${PORT}!`);
});
| Remove the `X-Powered-By` header added by Express | Remove the `X-Powered-By` header added by Express
The `X-Powered-By` header provides no real benefit and also leaks
information about the design of the underlying system that may be
useful to attackers.
| JavaScript | mit | clembou/github-requests,clembou/github-requests,clembou/github-requests | ---
+++
@@ -1,6 +1,10 @@
'use strict';
const app = require('./app');
+
+// remove the automatically added `X-Powered-By` header
+app.disable('x-powered-by');
+
require('./api.js')(app);
require('./static.js')(app);
|
bb7dc88b6bdb324dfc2feb627a86d1125e8d51a4 | test/javascripts/unit/hide_department_children_test.js | test/javascripts/unit/hide_department_children_test.js | module("Hide department children", {
setup: function() {
this.$departments = $(
'<div class="js-hide-department-children">'
+ '<div class="department">'
+ '<div class="child-organisations">'
+ '<p>child content</p>'
+ '</div>'
+ '</div>'
+ '</div>');
$('#qunit-... | module("Hide department children", {
setup: function() {
this.$departments = $(
'<div class="js-hide-department-children">'
+ '<div class="department">'
+ '<div class="child-organisations">'
+ '<p>child content</p>'
+ '</div>'
+ '</div>'
+ '</div>');
$('#qunit-... | Remove left over console log | Remove left over console log
| JavaScript | mit | robinwhittleton/whitehall,askl56/whitehall,hotvulcan/whitehall,askl56/whitehall,YOTOV-LIMITED/whitehall,YOTOV-LIMITED/whitehall,ggoral/whitehall,alphagov/whitehall,hotvulcan/whitehall,ggoral/whitehall,alphagov/whitehall,askl56/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,robinwhittleton/whitehall,robinwhittleto... | ---
+++
@@ -16,7 +16,6 @@
test("should create toggle link before department list", function() {
GOVUK.hideDepartmentChildren.init();
equals(this.$departments.find('.view-all').length, 1);
- console.log(this.$departments.html());
});
test("should toggle class when clicking view all link", function() { |
e28746346eb2439cf4f9fe3fbf02474cb39c65b6 | testpilot/frontend/static-src/app/models/experiment.js | testpilot/frontend/static-src/app/models/experiment.js | import app from 'ampersand-app';
import Model from 'ampersand-model';
import querystring from 'querystring';
export default Model.extend({
urlRoot: '/api/experiments',
extraProperties: 'allow',
props: {
enabled: {type: 'boolean', default: false}
},
// This shouldn't be necessary; see comments in collect... | import app from 'ampersand-app';
import Model from 'ampersand-model';
import querystring from 'querystring';
export default Model.extend({
urlRoot: '/api/experiments',
extraProperties: 'allow',
props: {
enabled: {type: 'boolean', default: false}
},
// This shouldn't be necessary; see comments in collect... | Fix fail on Object.keys(app.me.installed) which was holding up page loads. | Fix fail on Object.keys(app.me.installed) which was holding up
page loads.
- fixes #964
| JavaScript | mpl-2.0 | ckprice/testpilot,lmorchard/testpilot,lmorchard/testpilot,lmorchard/idea-town-server,lmorchard/testpilot,mozilla/idea-town,lmorchard/idea-town,meandavejustice/testpilot,fzzzy/testpilot,dannycoates/testpilot,mozilla/idea-town,fzzzy/testpilot,clouserw/testpilot,mathjazz/testpilot,mathjazz/testpilot,6a68/testpilot,flodolo... | ---
+++
@@ -30,11 +30,10 @@
},
buildSurveyURL(ref) {
- const installed = Object.keys(app.me.installed);
const queryParams = querystring.stringify({
ref: ref,
experiment: this.title,
- installed: installed
+ installed: app.me.installed ? Object.keys(app.me.installed) : []
}... |
b1d751400723877c47e7c9fa4eddf8012fedee9d | js/devtools.js | js/devtools.js | // Script executed every time the devtools are opened.
// custom panel
chrome.devtools.panels.create("Backbone Debugger", "img/panel.png", "panel.html");
// custom sidebar pane in the elements panel
chrome.devtools.panels.elements.createSidebarPane("Backbone Debugger", function(sidebar) {
chrome.devtools.panels.e... | // Script executed every time the devtools are opened.
// custom panel
chrome.devtools.panels.create("Backbone", "img/panel.png", "panel.html");
// custom sidebar pane in the elements panel
chrome.devtools.panels.elements.createSidebarPane("Backbone", function(sidebar) {
chrome.devtools.panels.elements.onSelectio... | Change the name of Panel and Elements sidebar pane to 'Backbone' | Change the name of Panel and Elements sidebar pane to 'Backbone'
| JavaScript | mpl-2.0 | Maluen/Backbone-Debugger,jbreeden/Backbone-Debugger,Maluen/Backbone-Debugger,jbreeden/Backbone-Debugger | ---
+++
@@ -1,10 +1,10 @@
// Script executed every time the devtools are opened.
// custom panel
-chrome.devtools.panels.create("Backbone Debugger", "img/panel.png", "panel.html");
+chrome.devtools.panels.create("Backbone", "img/panel.png", "panel.html");
// custom sidebar pane in the elements panel
-chrome.de... |
1bba0e18bc7221580308890087a5334c0122ebf7 | app.js | app.js | // Problem: We need a simple way to look at a user's badge count and JavaScript point from a web browser
// Solution: Use Node.js to perform the profile look ups and server our template via HTTP
// 1. Create a web server
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(... | // Problem: We need a simple way to look at a user's badge count and JavaScript point from a web browser
// Solution: Use Node.js to perform the profile look ups and server our template via HTTP
// 1. Create a web server
var http = require('http');
http.createServer(function (request, response) {
homeRoute(request, ... | Create Web Server & Handle route GET and POST | Create Web Server & Handle route GET and POST
| JavaScript | apache-2.0 | JordanPortfolio/NodeJS-temp,JordanPortfolio/NodeJS-temp | ---
+++
@@ -4,18 +4,23 @@
// 1. Create a web server
var http = require('http');
http.createServer(function (request, response) {
- response.writeHead(200, {'Content-Type': 'text/plain'});
- response.write('This is before the end\n');
- response.end('Hello World\n');
+ homeRoute(request, response);
}).listen(3... |
3e6db5efd2d25ab673f8c77734ecb9b4de924588 | app.js | app.js | var express = require('express');
var bunyan = require('bunyan');
var log = bunyan.createLogger({ name: 'app' });
var app = express();
var webhooks = require('datashaman-webhooks');
webhooks.boot(app, 'somesecret');
app.post('/', webhooks.router(function(req, res, event) {
log.info(req.body, event);
switch ... | var express = require('express');
var bunyan = require('bunyan');
var log = bunyan.createLogger({ name: 'app' });
var app = express();
var webhooks = require('datashaman-webhooks');
webhooks.boot(app, 'somesecret');
app.post('/', webhooks.router(function(req, res, event) {
log.info(req.body, event);
switch ... | Add default case to example file | Add default case to example file
| JavaScript | mit | datashaman/datashaman-webhooks | ---
+++
@@ -13,6 +13,9 @@
switch (event) {
case 'ping':
res.send('Ping');
+ break;
+ default:
+ res.send('Unhandled event: ' + event);
}
}));
|
12bfc0b76c17b34baf779bc8debfa6fadb312890 | server/db/models/userModel.js | server/db/models/userModel.js | const Sequelize = require('sequelize');
const db = require('../db.js');
const Users = db.define('users',
{
id: {
type: Sequelize.UUID,
defaultValue: Sequelize.UUIDV1,
primaryKey: true,
},
facebook_id: {
type: Sequelize.STRING,
},
first_name: {
type: Sequelize.STRING,... | const Sequelize = require('sequelize');
const db = require('../db.js');
const Users = db.define('users',
{
id: {
type: Sequelize.UUID,
defaultValue: Sequelize.UUIDV1,
primaryKey: true,
},
facebook_id: {
type: Sequelize.STRING,
},
first_name: {
type: Sequelize.STRING,... | Remove default description on user model | Remove default description on user model
| JavaScript | mit | VictoriousResistance/iDioma,VictoriousResistance/iDioma | ---
+++
@@ -22,7 +22,6 @@
},
description: {
type: Sequelize.STRING(256),
- defaultValue: 'Click here to edit!',
},
// would like to add counter cache for request count and connection count
}, |
bc07195fadc3d654a02917947e0dac2feb43e0bc | services/permissions/model.js | services/permissions/model.js | 'use strict'
const mongoose = require('mongoose')
const PermissionSchema = new mongoose.Schema({
regex: { type: String, required: true, unique: true },
roles: { type: [ String ], required: true },
dateCreated: { type: Date, default: Date.now }
})
PermissionSchema.statics.findMatches = function (email, cb) {
... | 'use strict'
const mongoose = require('mongoose')
const PermissionSchema = new mongoose.Schema({
regex: { type: Object, required: true, unique: true },
roles: { type: [ String ], required: true },
dateCreated: { type: Date, default: Date.now }
})
PermissionSchema.statics.findMatches = function (email, cb) {
... | Save RegExp object to database instead of string, and more concise filter | Save RegExp object to database instead of string, and more concise filter
| JavaScript | mit | thebitmill/midwest-membership-services | ---
+++
@@ -3,25 +3,22 @@
const mongoose = require('mongoose')
const PermissionSchema = new mongoose.Schema({
- regex: { type: String, required: true, unique: true },
+ regex: { type: Object, required: true, unique: true },
roles: { type: [ String ], required: true },
dateCreated: { type: Date, default: D... |
db04398e499a8725a0391e10d1955b7c805cb209 | test/remove.js | test/remove.js | #!/usr/bin/env node
'use strict';
/** Load modules. */
var fs = require('fs'),
path = require('path');
/** Resolve program params. */
var args = process.argv.slice(process.argv[0] === process.execPath ? 2 : 0),
filePath = path.resolve(args[1]);
var pattern = (function() {
var result = args[0],
delimi... | #!/usr/bin/env node
'use strict';
var fs = require('fs'),
path = require('path');
var args = (args = process.argv)
.slice((args[0] === process.execPath || args[0] === 'node') ? 2 : 0);
var filePath = path.resolve(args[1]),
reLine = /.*/gm,
slice = Array.prototype.slice;
var pattern = (function() {
v... | Add support for removing the last capture group. | Add support for removing the last capture group.
| JavaScript | mit | rlugojr/lodash,msmorgan/lodash,beaugunderson/lodash,steelsojka/lodash,boneskull/lodash,msmorgan/lodash,steelsojka/lodash,rlugojr/lodash,beaugunderson/lodash,boneskull/lodash | ---
+++
@@ -1,13 +1,15 @@
#!/usr/bin/env node
'use strict';
-/** Load modules. */
var fs = require('fs'),
path = require('path');
-/** Resolve program params. */
-var args = process.argv.slice(process.argv[0] === process.execPath ? 2 : 0),
- filePath = path.resolve(args[1]);
+var args = (args = process... |
1c26e7c754a77a6775ce7c8461dc6e47e856ebad | src/resources/assets/js/SparkKioskNotify/spark-kiosk-notify.js | src/resources/assets/js/SparkKioskNotify/spark-kiosk-notify.js | Vue.component('spark-kiosk-notify', {
props: [
],
data() {
return {
'notifications': [],
'users': [],
'newNotification': {
"user_id": null
}
};
},
ready(){
this.getNotifications();
this.getUsers();
},... | Vue.component('spark-kiosk-notify', {
props: [
],
data() {
return {
'notifications': [],
'users': [],
'newNotification': {
"user_id": null
}
};
},
ready(){
this.getNotifications();
this.getUsers();
},... | Change to 'newNotification', change to post | Change to 'newNotification', change to post
| JavaScript | mit | vmitchell85/spark-kiosk-notify,vmitchell85/spark-kiosk-notify,vmitchell85/spark-kiosk-notify | ---
+++
@@ -39,9 +39,9 @@
* Create Notification.
*/
createNotification: function(){
- this.$http.get('/skn/notifications/create', this.createNotification)
+ this.$http.post('/skn/notifications/create', this.newNotification)
.then(response => {
- ... |
2983df1c5a6363f1cdd827a9ac006ff71ddd259c | corehq/apps/domain/static/domain/js/case_search_main.js | corehq/apps/domain/static/domain/js/case_search_main.js | hqDefine('domain/js/case_search_main', [
'jquery',
'hqwebapp/js/initial_page_data',
'domain/js/case_search',
], function(
$,
initialPageData,
caseSearch
) {
$(function () {
var viewModel = caseSearch.CaseSearchConfig({
values: initialPageData.get('values'),
ca... | hqDefine('domain/js/case_search_main', [
'jquery',
'hqwebapp/js/initial_page_data',
'domain/js/case_search',
'hqwebapp/js/knockout_bindings.ko', // save button
], function(
$,
initialPageData,
caseSearch
) {
$(function () {
var viewModel = caseSearch.CaseSearchConfig({
... | Add knockout bindings as dependency to case search | Add knockout bindings as dependency to case search
| JavaScript | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | ---
+++
@@ -2,6 +2,7 @@
'jquery',
'hqwebapp/js/initial_page_data',
'domain/js/case_search',
+ 'hqwebapp/js/knockout_bindings.ko', // save button
], function(
$,
initialPageData, |
4954b4b8f0e9325dbfe7bfa5baf9ece539f03347 | js/endpoints.js | js/endpoints.js | /**
* Created by Neil on 29/09/13.
*/
function signin(mode, callback, clientID) { // clientID filled in by template, immediate = true because we should not need to ask permission again
gapi.auth.authorize({client_id: clientID,
scope: ["https://www.googleapis.com/auth/userinfo.email", "https://www.goog... | /**
* Created by Neil on 29/09/13.
*/
function signin(mode, callback, clientID) { // clientID filled in by template, immediate = true because we should not need to ask permission again
gapi.auth.authorize({client_id: clientID,
scope: ["https://www.googleapis.com/auth/userinfo.email", "https://www.goog... | Change the name of the endpoint | Change the name of the endpoint
| JavaScript | mit | nparley/mylatitude,nparley/mylatitude,nparley/mylatitude | ---
+++
@@ -14,7 +14,7 @@
gapi.client.oauth2.userinfo.get().execute(function (resp) { // Check the token by calling userinfo, if it's ok call our end point
if (!resp.code) {
var token = gapi.auth.getToken();
- gapi.client.mylatitude.location.last().execute(functio... |
c99f338e1ff0141d256e75150cd9c1e126429682 | src/settings.js | src/settings.js | 'use babel';
export default {
binary: {
title: 'Binary path',
description: 'Path for elm-format',
type: 'string',
default: '/usr/local/bin/elm-format',
order: 1,
},
formatOnSave: {
title: 'Format on save',
description: 'Do we format when you save files?',
type: 'boolean',
defa... | 'use babel';
export default {
binary: {
title: 'Binary path',
description: 'Path for elm-format',
type: 'string',
default: 'elm-format',
order: 1,
},
formatOnSave: {
title: 'Format on save',
description: 'Do we format when you save files?',
type: 'boolean',
default: true,
... | Use "elm-format" as the default binary path | Use "elm-format" as the default binary path
Not all people have elm-format installed into /usr/local/bin/elm-format (I installed it via package manager so it's in /usr/bin/elm-format), but I assume most of the people have it int their PATH. This should fix #18 for most users. | JavaScript | mit | triforkse/atom-elm-format | ---
+++
@@ -5,7 +5,7 @@
title: 'Binary path',
description: 'Path for elm-format',
type: 'string',
- default: '/usr/local/bin/elm-format',
+ default: 'elm-format',
order: 1,
},
formatOnSave: { |
bdbafc18317070530573bd28a2ec5241c793340b | ghost/admin/routes/posts.js | ghost/admin/routes/posts.js | import styleBody from 'ghost/mixins/style-body';
import AuthenticatedRoute from 'ghost/routes/authenticated';
var paginationSettings = {
status: 'all',
staticPages: 'all',
page: 1,
limit: 15
};
var PostsRoute = AuthenticatedRoute.extend(styleBody, {
classNames: ['manage'],
model: function () ... | import styleBody from 'ghost/mixins/style-body';
import AuthenticatedRoute from 'ghost/routes/authenticated';
var paginationSettings = {
status: 'all',
staticPages: 'all',
page: 1
};
var PostsRoute = AuthenticatedRoute.extend(styleBody, {
classNames: ['manage'],
model: function () {
// us... | Remove limit from ember post API calls | Remove limit from ember post API calls
ref #3004
- this is unnecessary and causing bugs
| JavaScript | mit | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost | ---
+++
@@ -4,8 +4,7 @@
var paginationSettings = {
status: 'all',
staticPages: 'all',
- page: 1,
- limit: 15
+ page: 1
};
var PostsRoute = AuthenticatedRoute.extend(styleBody, { |
76326fa424405c3930855652d69ee603ab7df5e7 | bot/utils/twitter/tweetWeather.js | bot/utils/twitter/tweetWeather.js | /**
* @module
* Tweet the current weather.
*/
const {postStatus} = require('./../../api/twitter-api');
const weather = require('./../weather/getWeather');
const logger = require('./../logger');
const moment = require('moment-timezone');
const tweetWeather = async(address='Manila, Philippines') => {
let curTime ... | /**
* @module
* Tweet the current weather.
*/
const {postStatus} = require('./../../api/twitter-api');
const weather = require('./../weather/getWeather');
const logger = require('./../logger');
const moment = require('moment-timezone');
const tweetWeather = async(address='Manila, Philippines') => {
let curTime ... | Update weather tweet message to only tweetHead | Update weather tweet message to only tweetHead
| JavaScript | mit | Ollen/dale-bot | ---
+++
@@ -21,7 +21,9 @@
let tweetHead = `As of ${curTime} in ${address}\nThere will be ${curForecast.hourly.summary}\n\n`;
let tweetBody = `Weather Status: ${data.status}\nTemperature: ${data.temp}\nPrecipitation: ${data.precip}\nHumidity: ${data.humid}`;
- await postStatus({statu... |
9d68a8e39598e53cee8c7ba26ab6096f9dfdd219 | spread_operator/app-finish.js | spread_operator/app-finish.js | 'use strict'
let levelOnePokemons = ['Pikachu','Magikarp','Balbasaur'];
let allPokemons = ['Meowth', 'Poliwag', ...levelOnePokemons];
console.log(allPokemons);
let pikachuName = "Pikachu";
let arrayWords = [...pikachuName];
console.log(arrayWords); | 'use strict'
let levelOnePokemons = ['Pikachu','Magikarp','Balbasaur'];
// Insert array to another array
let allPokemons = ['Meowth', 'Poliwag', ...levelOnePokemons];
console.log(allPokemons);
let pikachuName = "Pikachu";
// Split into literal array with spread operator
let arrayWords = [...pikachuName];
console.... | Add comment for explain step | Add comment for explain step
| JavaScript | apache-2.0 | teerasej/training-javascript-es6-beginner-thai | ---
+++
@@ -2,11 +2,14 @@
let levelOnePokemons = ['Pikachu','Magikarp','Balbasaur'];
+// Insert array to another array
let allPokemons = ['Meowth', 'Poliwag', ...levelOnePokemons];
console.log(allPokemons);
let pikachuName = "Pikachu";
+
+// Split into literal array with spread operator
let arrayWords = ... |
543a31cc11fdb145cde89c42b44f1bd0d22cef6d | gulpfile.js | gulpfile.js | const gulp = require('gulp');
const gutil = require('gulp-util');
const eslint = require('gulp-eslint');
const excludeGitignore = require('gulp-exclude-gitignore');
const mocha = require('gulp-mocha');
const istanbul = require('gulp-istanbul');
gulp.task('linter', eslintCheck);
gulp.task('default', gulp.series('linter... | const gulp = require('gulp');
const gutil = require('gulp-util');
const eslint = require('gulp-eslint');
const excludeGitignore = require('gulp-exclude-gitignore');
const mocha = require('gulp-mocha');
const istanbul = require('gulp-istanbul');
gulp.task('linter', eslintCheck);
gulp.task('default', gulp.series('linter... | Add ignored files in gulp-eslint conf | Add ignored files in gulp-eslint conf
| JavaScript | mit | FountainJS/generator-fountain-tslint | ---
+++
@@ -9,7 +9,7 @@
gulp.task('default', gulp.series('linter', gulp.series(istanbulCover, mochaTest)));
function eslintCheck() {
- return gulp.src('**/*.js')
+ return gulp.src(['**/*.js', '!**/templates/**'])
.pipe(excludeGitignore())
.pipe(eslint())
.pipe(eslint.format()) |
437b52a37060631ae6cce3bd2002db0d7143a3f7 | gulpfile.js | gulpfile.js | 'use strict';
const gulp = require('gulp');
const babel = require('gulp-babel');
gulp.task('default', () =>
gulp.src('lib/delve.js')
.pipe(babel({ presets: ['es2015'] }))
.pipe(gulp.dest('dist'))
);
| 'use strict';
const gulp = require('gulp');
const clean = require('gulp-clean');
const babel = require('gulp-babel');
gulp.task('clean-dist', () =>
gulp.src('dist/', { read: false })
.pipe(clean())
);
gulp.task('default', [ 'clean-dist' ], () =>
gulp.src('lib/*.js')
.pipe(babel({ presets: [ 'es2015' ] }))
... | Add gulp clean & build tasks | Add gulp clean & build tasks
| JavaScript | mit | tylerFowler/delvejs | ---
+++
@@ -1,10 +1,16 @@
'use strict';
const gulp = require('gulp');
+const clean = require('gulp-clean');
const babel = require('gulp-babel');
-gulp.task('default', () =>
- gulp.src('lib/delve.js')
- .pipe(babel({ presets: ['es2015'] }))
+gulp.task('clean-dist', () =>
+ gulp.src('dist/', { read: false })... |
f69dacc5aecab76e7dd3920decce6950f8c6d300 | gulpfile.js | gulpfile.js | /* global require */
var gulp = require('gulp'),
spawn = require('child_process').spawn,
ember,
node;
gulp.task('server', function () {
if (node) node.kill(); // Kill server if one is running
node = spawn('node', ['server.js'], {cwd: 'node', stdio: 'inherit'});
node.on('close', function (code) {
... | /* global require */
var gulp = require('gulp'),
spawn = require('child_process').spawn,
ember,
node;
gulp.task('node', function () {
if (node) node.kill(); // Kill server if one is running
node = spawn('node', ['server.js'], {cwd: 'node', stdio: 'inherit'});
node.on('close', function (code) {
... | Rename server task to node | Rename server task to node
| JavaScript | bsd-3-clause | FreeMusicNinja/freemusic.ninja,FreeMusicNinja/freemusic.ninja | ---
+++
@@ -6,7 +6,7 @@
node;
-gulp.task('server', function () {
+gulp.task('node', function () {
if (node) node.kill(); // Kill server if one is running
node = spawn('node', ['server.js'], {cwd: 'node', stdio: 'inherit'});
node.on('close', function (code) {
@@ -27,12 +27,12 @@
gulp.task('defa... |
866967ddb5ca862c34394113472f9ec543b7549c | gulpfile.js | gulpfile.js | var fontName = 'seti',
gulp = require('gulp'),
iconfont = require('gulp-iconfont'),
iconfontCss = require('gulp-iconfont-css'),
svgmin = require('gulp-svgmin');
gulp.task('font', function(){
gulp.src(['./icons/*.svg'])
.pipe(iconfontCss({
fontName: fontName,
path: '.... | var fontName = 'seti',
gulp = require('gulp'),
iconfont = require('gulp-iconfont'),
iconfontCss = require('gulp-iconfont-css'),
svgmin = require('gulp-svgmin');
gulp.task('font', function(){
gulp.src(['./icons/*.svg'])
.pipe(iconfontCss({
fontName: fontName,
path: '.... | Set font height to improve glyph quality | Set font height to improve glyph quality
| JavaScript | mit | jesseweed/seti-ui | ---
+++
@@ -14,6 +14,7 @@
}))
.pipe(iconfont({
normalize: true,
+ fontHeight: 1000,
fontName: fontName,
formats: ['ttf', 'eot', 'woff', 'woff2', 'svg']
})) |
30013e03caa57ce57090d36c812aa6d128db3348 | gulpfile.js | gulpfile.js | var gulp = require('gulp'),
connect = require('gulp-connect'),
stylus = require('gulp-stylus'),
prefix = require('gulp-autoprefixer');
var paths = {
styles: 'css/bare-ninja.styl',
html: './*.html'
};
gulp.task('connect', function() {
connect.server({
livereload: true
});
});
gulp.... | var gulp = require('gulp'),
connect = require('gulp-connect'),
stylus = require('gulp-stylus'),
prefix = require('gulp-autoprefixer');
var paths = {
styles: 'css/**/*.styl',
html: './*.html'
};
gulp.task('connect', function() {
connect.server({
livereload: true
});
});
gulp.task('... | Fix LiveReload for all .styl files | Fix LiveReload for all .styl files
| JavaScript | mit | trevanhetzel/barekit,trevanhetzel/barekit | ---
+++
@@ -4,7 +4,7 @@
prefix = require('gulp-autoprefixer');
var paths = {
- styles: 'css/bare-ninja.styl',
+ styles: 'css/**/*.styl',
html: './*.html'
};
@@ -20,7 +20,7 @@
});
gulp.task('styles', function () {
- gulp.src(paths.styles)
+ gulp.src('css/bare-ninja.styl')
.pipe... |
65fc00db12ebad06df6557bc3276eccc493566e2 | gulpfile.js | gulpfile.js | require('babel/register')
var gulp = require('gulp')
var $ = require("gulp-load-plugins")()
var runSequence = require("run-sequence")
gulp.task("build", function() {
return gulp.src("src/**/*.js")
.pipe($.babel())
.pipe(gulp.dest("lib"))
})
gulp.task("lint", function() {
return gulp.src("src/**/*.js")
... | require('babel/register')
var gulp = require('gulp')
var $ = require("gulp-load-plugins")()
var runSequence = require("run-sequence")
gulp.task("build", function() {
return gulp.src("src/**/*.js")
.pipe($.babel())
.pipe(gulp.dest("lib"))
})
gulp.task("lint", function() {
return gulp.src("src/**/*.js")
... | Add release task (needs npm publish still) | Add release task (needs npm publish still)
| JavaScript | mit | launchbadge/node-bok | ---
+++
@@ -29,3 +29,30 @@
gulp.task("default", function(cb) {
return runSequence("build", "test", cb)
})
+
+function release(importance) {
+ return new Promise(function(resolve) {
+ // Select package.json
+ gulp.src(["package.json"])
+
+ // Bump version on the package.json
+ .pipe($.bump({type: imp... |
371a70778560330e5730acf1a76c6de17c578d17 | gulpfile.js | gulpfile.js | "use strict"
let gulp = require('gulp');
let ts = require('gulp-typescript');
let tsProject = ts.createProject("tsconfig.json");
gulp.task("default", () => {
return tsProject.src()
.pipe(tsProject())
.js.pipe(gulp.dest("dist"));
}); | "use strict"
let gulp = require("gulp");
let sourcemaps = require("gulp-sourcemaps");
let ts = require("gulp-typescript");
let tsProject = ts.createProject("tsconfig.json");
gulp.task("default", () => {
let tsResult = tsProject.src()
.pipe(sourcemaps.init())
.pipe(tsProject());
re... | Set up gulp watch to automatically compile TypeScript files | Set up gulp watch to automatically compile TypeScript files
| JavaScript | apache-2.0 | munumafia/EasyJSON,munumafia/EasyJSON | ---
+++
@@ -1,11 +1,20 @@
"use strict"
-let gulp = require('gulp');
-let ts = require('gulp-typescript');
+let gulp = require("gulp");
+let sourcemaps = require("gulp-sourcemaps");
+let ts = require("gulp-typescript");
let tsProject = ts.createProject("tsconfig.json");
gulp.task("default", () => {
- return ... |
33ba0535b53c580d91b6b2de3d8b919ae3d5c781 | helpers/sharedb-server.js | helpers/sharedb-server.js | var ShareDB = require('sharedb');
ShareDB.types.register(require('rich-text').type);
module.exports = new ShareDB({
db: require('sharedb-mongo')('mongodb://localhost:27017/quill-sharedb-cursors')
});
| var ShareDB = require('sharedb');
ShareDB.types.register(require('rich-text').type);
module.exports = new ShareDB({
db: require('sharedb-mongo')(process.env.MONGODB_URI || 'mongodb://localhost/quill-sharedb-cursors?auto_reconnect=true')
});
| Add MONGODB_URI env var config | Add MONGODB_URI env var config
| JavaScript | mit | pedrosanta/quill-sharedb-cursors,pedrosanta/quill-sharedb-cursors | ---
+++
@@ -3,5 +3,5 @@
ShareDB.types.register(require('rich-text').type);
module.exports = new ShareDB({
- db: require('sharedb-mongo')('mongodb://localhost:27017/quill-sharedb-cursors')
+ db: require('sharedb-mongo')(process.env.MONGODB_URI || 'mongodb://localhost/quill-sharedb-cursors?auto_reconnect=true')
... |
d485edf1145ccfba4e8668c13dfd5ed2170624da | lib/AdapterJsRTCObjectFactory.js | lib/AdapterJsRTCObjectFactory.js | 'use strict';
/**
* An RTC Object factory that works in Firefox and Chrome when adapter.js is present
*/
function AdapterJsRTCObjectFactory() {
this.createIceServer = function(url, username, password) {
return createIceServer(url, username, password);
};
this.createRTCSessionDescription = function (session... | 'use strict';
var Utils = require("cyclon.p2p-common");
/**
* An RTC Object factory that works in Firefox and Chrome when adapter.js is present
*/
function AdapterJsRTCObjectFactory(logger) {
Utils.checkArguments(arguments, 1);
this.createIceServer = function (url, username, password) {
if (typ... | Handle missing adapter.js more gracefully | Handle missing adapter.js more gracefully
| JavaScript | mit | nicktindall/cyclon.p2p-rtc-client,nicktindall/cyclon.p2p-rtc-client | ---
+++
@@ -1,24 +1,52 @@
'use strict';
+var Utils = require("cyclon.p2p-common");
+
/**
- * An RTC Object factory that works in Firefox and Chrome when adapter.js is present
+ * An RTC Object factory that works in Firefox and Chrome when adapter.js is present
*/
-function AdapterJsRTCObjectFactory() {
+func... |
900b593d7c66248086892b9cedfa24563fb8e270 | gulpfile.js | gulpfile.js | const inlineNg2Template = require('gulp-inline-ng2-template');
const gulp = require('gulp');
const clean = require('gulp-clean');
const tmpDir = './tmp';
const distDir = './dist';
gulp.task('inline-templates', ['clean-tmp'], function () {
return gulp.src('./src/**/*.ts')
.pipe(inlineNg2Template({
... | const inlineNg2Template = require('gulp-inline-ng2-template');
const gulp = require('gulp');
const clean = require('gulp-clean');
const tmpDir = './tmp';
const distDir = './dist';
gulp.task('inline-templates', ['clean-tmp'], function () {
return gulp.src('./src/**/*.ts')
.pipe(inlineNg2Template({
... | Add CHANGELOG.MD to copy-misc-files task | Add CHANGELOG.MD to copy-misc-files task
| JavaScript | mit | mpalourdio/ng-http-loader,mpalourdio/ng-http-loader,mpalourdio/ng-http-loader | ---
+++
@@ -31,7 +31,7 @@
});
gulp.task('copy-misc-files', function () {
- return gulp.src(['README.MD', 'LICENSE'])
+ return gulp.src(['README.MD', 'LICENSE', 'CHANGELOG.MD'])
.pipe(gulp.dest(distDir));
});
|
64b03b3b7209ea61c03f35616b399c755c933541 | sysapps/device_capabilities_new/device_capabilities_api.js | sysapps/device_capabilities_new/device_capabilities_api.js | // Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Implementation of the W3C's Device Capabilities API.
// http://www.w3.org/2012/sysapps/device-capabilities/
var internal = requireNative('internal');... | // Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Implementation of the W3C's Device Capabilities API.
// http://www.w3.org/2012/sysapps/device-capabilities/
var internal = requireNative('internal');... | Make the JavaScript shim dispatch events | [SysApps] Make the JavaScript shim dispatch events
The first thing to be done is make the JavaScript DeviceCapabilties an EventTarget
(which is also a BindingObject). The BindingObjects are JavaScripts objects with
a link with some native object and they use a unique ID for routing messages
between them.
common.Event... | JavaScript | bsd-3-clause | tomatell/crosswalk,rakuco/crosswalk,weiyirong/crosswalk-1,amaniak/crosswalk,crosswalk-project/crosswalk,fujunwei/crosswalk,chinakids/crosswalk,siovene/crosswalk,rakuco/crosswalk,hgl888/crosswalk-efl,Pluto-tv/crosswalk,rakuco/crosswalk,leonhsl/crosswalk,RafuCater/crosswalk,crosswalk-project/crosswalk-efl,pk-sam/crosswal... | ---
+++
@@ -16,8 +16,12 @@
var DeviceCapabilities = function() {
common.BindingObject.call(this, common.getUniqueId());
+ common.EventTarget.call(this);
internal.postMessage("deviceCapabilitiesConstructor", [this._id]);
+
+ this._addEvent("storageattach");
+ this._addEvent("storagedetach");
this._a... |
8c42ee718563fd7c82bacba65baf65cb12dd09fc | js/browser/resizeManager.js | js/browser/resizeManager.js | jsio('import browser.events')
var logger = logging.getLogger(jsio.__path);
var windowResizeCallbacks = [];
function handleResize() {
if (!windowResizeCallbacks.length) { return; }
var size = exports.getWindowSize();
for (var i=0, callback; callback = windowResizeCallbacks[i]; i++) {
callback(size);
}
}
browse... | jsio('import browser.events')
var logger = logging.getLogger(jsio.__path);
var windowResizeCallbacks = [];
function handleResize() {
if (!windowResizeCallbacks.length) { return; }
var size = exports.getWindowSize();
for (var i=0, callback; callback = windowResizeCallbacks[i]; i++) {
callback(size);
}
}
browse... | Fix bug where cancelWindowResize, would remove the wrong callback | Fix bug where cancelWindowResize, would remove the wrong callback
| JavaScript | mit | marcuswestin/fin | ---
+++
@@ -22,7 +22,7 @@
cancelWindowResize: function(targetCallback) {
for (var i=0, callback; callback = windowResizeCallbacks[i]; i++) {
- if (callback == targetCallback) { continue; }
+ if (callback != targetCallback) { continue; }
windowResizeCallbacks.splice(i, 1);
return;
} |
3799c780d5b9ca0cfd97f3795c1ce456b78d4261 | gesso/index.js | gesso/index.js | // Re-using Gesso entry point
// Detect whether this is called from a built bundle from the browser, or as the build project.
if (typeof window !== 'undefined') {
// Client-side require
module.exports = {
canvas: document.getElementById('gesso-target')
};
} else {
// Server-side require -- use module.requ... | // Re-using Gesso entry point
// Detect whether this is called from a built bundle from the browser, or as the build project.
/* globals window */
if (typeof window !== 'undefined') {
// Client-side require
module.exports = {
canvas: window.document.getElementById('gesso-target')
};
} else {
// Server-sid... | Use window.document for client-side require. | Use window.document for client-side require.
| JavaScript | mit | gessojs/gessojs,gessojs/gessojs | ---
+++
@@ -1,11 +1,12 @@
// Re-using Gesso entry point
// Detect whether this is called from a built bundle from the browser, or as the build project.
+/* globals window */
if (typeof window !== 'undefined') {
// Client-side require
module.exports = {
- canvas: document.getElementById('gesso-target')... |
150741269e8cc655ad7041faa1cf825fbf5a4515 | WebComponentsMonkeyPatch.js | WebComponentsMonkeyPatch.js | /**
* Evidently superinspired by Chris Wilson's AudioContext-MonkeyPatch library,
* and just patching webkitCreateShadowRoot to createShadowRoot
*/
(function() {
if( HTMLElement.prototype.webkitCreateShadowRoot !== undefined &&
HTMLElement.prototype.createShadowRoot === undefined ) {
HTMLElem... | /**
* Evidently superinspired by Chris Wilson's AudioContext-MonkeyPatch library,
*/
(function() {
// Unprefixed createShadowRoot
if( HTMLElement.prototype.webkitCreateShadowRoot !== undefined &&
HTMLElement.prototype.createShadowRoot === undefined ) {
HTMLElement.prototype.createShadowRoot ... | Use only one function call | Use only one function call
| JavaScript | apache-2.0 | sole/WebComponentsMonkeyPatch | ---
+++
@@ -1,20 +1,20 @@
/**
* Evidently superinspired by Chris Wilson's AudioContext-MonkeyPatch library,
- * and just patching webkitCreateShadowRoot to createShadowRoot
*/
(function() {
- if( HTMLElement.prototype.webkitCreateShadowRoot !== undefined &&
- HTMLElement.prototype.createShadowRoot... |
5cda8ad7e27dbbafc2ab2c7d6569fec6546db2ce | colorImageSelector.js | colorImageSelector.js | /*
for each li
color = find span color --- this.text
url = find main prod image -- this.url
category Swatch Color Button = matching color.url
end
on click
*/
var colorBtnSrc = {};
$("span:contains('Color')").parents().eq(2).find('.productAttributeValue li').each( function getColorPhotosSrcs(){
var listings ... | /*
for each li
color = find span color --- this.text
url = find main prod image -- this.url
category Swatch Color Button = matching color.url
end
on click
*/
var colorBtnSrc = {};
$("span:contains('Color')").parents().eq(2).find('.productAttributeValue li').each( function getColorPhotosSrcs(){
var listings ... | Update to image src selector | Update to image src selector
| JavaScript | mit | iamandrebulatov/BC-Category-Page-Color-Swatch | ---
+++
@@ -23,7 +23,7 @@
// console.log(colorImgSrc);
// }
- colorBtnSrc[prodColor] = $(document).find('.MagicZoomPlus img').attr('src');
+ colorBtnSrc[prodColor] = $(document).find('.MagicZoomPlus').attr('src');
})
|
a145c78423cab08cfb412f6d7c61ef87cef2199c | src/config/constants.js | src/config/constants.js | import firebase from 'firebase'
const config = {
apiKey: "AIzaSyDHL6JFTyBcaV60WpE4yXfeO0aZbzA9Xbk",
authDomain: "practice-auth.firebaseapp.com",
databaseURL: "https://practice-auth.firebaseio.com",
}
firebase.initializeApp(config)
export const ref = firebase.database().ref()
export const firebaseAuth = firebas... | import firebase from 'firebase';
const config = {
apiKey: process.env.REACT_APP_FIREBASE_API,
authDomain: process.env.REACT_APP_FIREBASE_DOMAIN,
databaseURL: process.env.REACT_APP_FIREBASE_DATABASE,
storageBucket: process.env.REACT_APP_FIREBASE_BUCKET,
messagingSenderId: process.env.REACT_APP_FIREBASE_SENDER... | Read firebase creds from .env | Read firebase creds from .env
| JavaScript | mit | nadavspi/UnwiseConnect,nadavspi/UnwiseConnect,nadavspi/UnwiseConnect | ---
+++
@@ -1,12 +1,14 @@
-import firebase from 'firebase'
+import firebase from 'firebase';
const config = {
- apiKey: "AIzaSyDHL6JFTyBcaV60WpE4yXfeO0aZbzA9Xbk",
- authDomain: "practice-auth.firebaseapp.com",
- databaseURL: "https://practice-auth.firebaseio.com",
-}
+ apiKey: process.env.REACT_APP_FIREBASE_AP... |
f6b8055acfc4127580725989fa0db32ece35f566 | src/activities/when-graphs-mislead/client/scripts/parameters.js | src/activities/when-graphs-mislead/client/scripts/parameters.js | /**
* @file Define the parameters for the activity's chart.
*/
define({
yLimitsUSD: {
label: 'y-axis limits ($USD)',
min: 0,
max: 280000,
step: 1000
},
yLimitsPct: {
label: 'y-axis limits (% change)',
min: 0,
max: 1.2,
step: 0.01
},
xLimits: {
label: 'x-axis limits (year)... | /**
* @file Define the parameters for the activity's chart.
*/
define({
yLimitsUSD: {
label: 'y-axis limits ($USD)',
min: 0,
max: 280000,
step: 1000
},
yLimitsPct: {
label: 'y-axis limits (% change)',
min: 0,
max: 1.3,
step: 0.01
},
xLimits: {
label: 'x-axis limits (year)... | Increase limits for percentage change | Increase limits for percentage change
| JavaScript | mpl-2.0 | councilforeconed/interactive-activities,councilforeconed/interactive-activities,jugglinmike/cee,councilforeconed/interactive-activities,jugglinmike/cee | ---
+++
@@ -11,7 +11,7 @@
yLimitsPct: {
label: 'y-axis limits (% change)',
min: 0,
- max: 1.2,
+ max: 1.3,
step: 0.01
},
xLimits: { |
d33e9df3e82505d60c16324fb1a5fec6204bb5bb | gulpfile.js | gulpfile.js | var _ = require('lodash');
var gulp = require('gulp');
var gulp_mocha = require('gulp-mocha');
var gulp_jshint = require('gulp-jshint');
var gulp_jsdoc = require("gulp-jsdoc");
var files = ['lib/**/*.js'];
var tests = ['test/**/*.spec.js'];
var alljs = files.concat(tests);
var readme = 'README.md';
function ignoreE... | var _ = require('lodash');
var gulp = require('gulp');
var gulp_mocha = require('gulp-mocha');
var gulp_jshint = require('gulp-jshint');
var gulp_jsdoc = require("gulp-jsdoc");
var files = ['lib/**/*.js'];
var tests = ['test/**/*.spec.js'];
var alljs = files.concat(tests);
var readme = 'README.md';
function ignoreE... | Make test fails for CI | Make test fails for CI
| JavaScript | mit | bankonme/bitcore-channel,homeopatchy/bitcore-channel,eXcomm/bitcore-channel,braydonf/bitcore-channel,maraoz/bitcore-channel,bitpay/bitcore-channel,studio666/bitcore-channel | ---
+++
@@ -15,14 +15,20 @@
this.emit('end');
}
-gulp.task('test', function() {
- return gulp.src(tests).pipe(new gulp_mocha({reporter: 'spec'})).on('error', ignoreError);
+function testAllFiles() {
+ return gulp.src(tests).pipe(new gulp_mocha({reporter: 'spec'}));
+}
+
+gulp.task('test', testAllFiles);
+
+gu... |
9afda10bfeb4d07e3ba2e40e93ebec125d41d7ed | tests/search.js | tests/search.js | /**
* search.js - Search form tests.
*/
casper.test.begin('Tests search form submission and results', 2, function suite(test) {
casper.start();
// Open the homepage.
casper.customThenOpen('/', function() {
casper.waitFor(function check() {
// Fill out the search form with 'health' and submit it.
... | /**
* Search form tests.
*/
casper.test.begin('Tests search form submission and results', 2, function suite(test) {
casper.start();
// Open the homepage.
casper.customThenOpen('/', function() {
casper.waitFor(function check() {
// Fill out the search form with 'health' and submit it.
return th... | Remove unneded filename from header docblock. | Remove unneded filename from header docblock.
| JavaScript | mit | Lullabot/casperjs_foundation,Lullabot/casperjs_foundation | ---
+++
@@ -1,5 +1,5 @@
/**
- * search.js - Search form tests.
+ * Search form tests.
*/
casper.test.begin('Tests search form submission and results', 2, function suite(test) { |
801df6499b96c860a2d108dea053304131ab56fd | server/app.js | server/app.js | 'use strict';
/**
* Module dependencies.
*/
var express = require('express');
var routes = require('./routes');
var memos = require('./routes/memos');
var http = require('http');
var path = require('path');
var app = express();
// all environments
app.set('port', process.env.PORT || 8000);
app.set('views', path.j... | 'use strict';
/**
* Module dependencies.
*/
var express = require('express');
var routes = require('./routes');
var memos = require('./routes/memos');
var http = require('http');
var path = require('path');
var app = express();
// all environments
app.set('port', process.env.PORT || 9001);
app.set('views', path.j... | Change port number to 9001 | Change port number to 9001
| JavaScript | mit | eqot/memo | ---
+++
@@ -13,7 +13,7 @@
var app = express();
// all environments
-app.set('port', process.env.PORT || 8000);
+app.set('port', process.env.PORT || 9001);
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');
app.use(express.favicon()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.