commit stringlengths 40 40 | old_file stringlengths 4 236 | new_file stringlengths 4 236 | old_contents stringlengths 1 3.26k | new_contents stringlengths 16 4.43k | subject stringlengths 16 624 | message stringlengths 17 3.29k | lang stringclasses 5
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
5782cd0c8b454a676d5fb50d717703628d639a48 | background.js | background.js | chrome.contextMenus.create(
{
"title": "Define \"%s\"",
"contexts":["selection"],
"onclick": function(info, tab){
chrome.tabs.create(
{url: "http://www.google.com/search?q=define:" + info.selectionText
});
}
});
| chrome.contextMenus.create(
{
"title": "Define \"%s\"",
"contexts":["selection"],
"onclick": function(info, tab){
chrome.tabs.create(
{url: "http://www.google.com/search?q=define:" + encodeURIComponent(info.selectionText)
});
}
});
| Make user input get encoded | Make user input get encoded
| JavaScript | mit | nwjlyons/google-dictionary-lookup |
bbf6ca41da348dc6e089e6b24d428c8d72a62163 | prismo/netvis.js | prismo/netvis.js | // NetVis defines global object NetVis that wraps up everything else
// constructor for NetVis class
function NetVis(DOMelement) {
var self = this;
self.DOMelement = DOMelement || "#chart";
self.Model = {
Nodes: [{
'id':'abba'
}
]
};
this.Render = function() {
nodes = d3.select(self.DOMelement).appen... | // NetVis defines global object NetVis that wraps up everything else
// constructor for NetVis class
function NetVis(DOMelement) {
var self = this;
self.DOMelement = DOMelement || "#chart";
self.config = {
nodeDefaultDistance: 30,
nodeDefaultRadius: 10
};
self.Model = {
Nodes: [{
'id':'abba'
}
]
}... | Add config object for consts | Add config object for consts
| JavaScript | mit | dborzov/netvis |
e2a2225eddb5db144d124040dc3f5e7b945c9cfb | distance.js | distance.js | // distance.js
// Finds the closest user match with n dimensions of compatability
// Expects a tag:count map from the user and a tag:count map from a blog
module.exports = {
match: function(userTags, blogTags) {
var counts = [];
for tag in userTags {
if tag in blogTags {
counts.push[[userTags[tag], blogTag... | // distance.js
// Finds the closest user match with n dimensions of compatability
// Expects a tag:count map from the user and a tag:count map from a blog
module.exports = {
match: function(userTags, blogTags) {
var counts = [];
for (var tag in userTags) {
if (tag in blogTags) {
counts.push[[userTags[tag],... | Fix stupid hash loop syntax | Fix stupid hash loop syntax
| JavaScript | mit | josmas/pet_owner_finder |
fab41d3138fa5c6b20a76fb6d7e3f81567d5bf16 | example/test-coverage.js | example/test-coverage.js | #!/usr/bin/env node
var assert = require('../lib/assert').getAssertModule();
var exec = require('child_process').exec;
var sprintf = require('sprintf').sprintf;
var cwd = process.cwd();
exec(sprintf('NODE_PATH=lib-cov %s/bin/whiskey --tests %s/example/test-success-with-coverage.js --timeout 6000 --coverage --covera... | #!/usr/bin/env node
var assert = require('../lib/assert').getAssertModule();
var exec = require('child_process').exec;
var sprintf = require('sprintf').sprintf;
var cwd = process.cwd();
exec(sprintf('NODE_PATH=lib-cov %s/bin/whiskey --tests %s/example/test-success-with-coverage.js --timeout 6000 --coverage --covera... | Improve the assert, make sure the output actually contains coverage data. | Improve the assert, make sure the output actually contains coverage data.
| JavaScript | apache-2.0 | cloudkick/whiskey,cloudkick/whiskey |
6f09c27dded463f36dcad46309d4281d5a50f900 | packages/ssr/register/Comment.js | packages/ssr/register/Comment.js | const { Node } = require('./Node');
const Comment = class extends Node {
get outerHTML() {
return `<!--${this.textContent}-->`;
}
get innerHTML() {
return this.textContent;
}
};
module.exports = {
Comment
};
| const { Node } = require('./Node');
const Comment = class extends Node {
constructor() {
super();
this._nodeValue = '';
}
get nodeName() {
return '#comment';
}
get nodeType() {
return Node.COMMENT_NODE;
}
get nodeValue() {
return this._nodeValue;
}
set nodeValue(nodeValue) {
t... | Update comment interface to better match the Text one. | Update comment interface to better match the Text one.
Eventually we should probably base this off a common interface.
| JavaScript | mit | skatejs/skatejs,skatejs/skatejs,skatejs/skatejs |
36c9035b276d32aceb60f391fe32bb987c4909f7 | app/components/raw-number.js | app/components/raw-number.js | import Ember from 'ember';
export default Ember.Component.extend({
update: function() {
this.set('value', this.get('data.firstObject.value'));
}.observes('data')
});
| import Ember from 'ember';
function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
export default Ember.Component.extend({
value: 0,
update: function() {
this.set('value', numberWithCommas(this.get('data.firstObject.value')));
}.observes('data')
});
| Format raw numbers with commas | Format raw numbers with commas
| JavaScript | apache-2.0 | with-regard/regard-website |
9437fe28e2b95752ca63e78e583abc1946a00890 | public/modules/categories/controllers/categories.client.controller.js | public/modules/categories/controllers/categories.client.controller.js | 'use strict';
angular.module('categories').controller('CategoriesController', ['$scope',
function($scope) {
// Controller Logic
// ...
}
]); | 'use strict';
angular.module('categories').controller('CategoriesController', ['$scope', '$stateParams', '$location', 'Authentication', 'Categories',
function($scope, $stateParams, $location, Authentication, Categories) {
$scope.authentication = Authentication;
$scope.currentPage = 1;
$scope.pageSize = 1... | Add CRUD methods for Category in Angular. | Add CRUD methods for Category in Angular.
| JavaScript | mit | michalzagrodzki/MEAN-exercise-second,michalzagrodzki/MEAN-exercise-second,michalzagrodzki/MEAN-exercise-second |
a00cba377827a56da08dd78c976f9dba5dc5aae5 | GruntFile.js | GruntFile.js | module.exports = function (grunt) {
'use strict';
grunt.initConfig({
jshint: {
files: [
'Gruntfile.js',
'generators/**/*.js'
],
options: {
jshintrc: '.jshintrc'
}
},
watch: {
scr... | module.exports = function (grunt) {
'use strict';
grunt.initConfig({
jshint: {
files: [
'Gruntfile.js',
'generators/**/*.js'
],
options: {
jshintrc: '.jshintrc'
}
},
watch: {
opt... | Increase watch speed by adding spawn:false | Increase watch speed by adding spawn:false
| JavaScript | mit | marcosmoura/generator-scaffold,marcosmoura/generator-scaffold |
73d42fefa6bb740f9c143142054eb92882298cb2 | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
dist: {
src: 'canvas/**/*.js',
dest: '<%= pkg.name %>.js'
}
},
uglify: {
dist: {
src: '<%= pkg.name %>.js',
dest: '<%= pkg.name %>.min.js'
}
}
});
grunt.registerTask('defau... | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
dist: {
src: 'canvas/**/*.js',
dest: '<%= pkg.name %>.js'
}
},
uglify: {
dist: {
src: '<%= pkg.name %>.js',
dest: '<%= pkg.name %>.min.js'
}
},
watch: {
dist: {
files... | Add watch config for rebuilding dist. | Add watch config for rebuilding dist.
| JavaScript | isc | bspoon/d3-canvas |
6fed64fb73f490c2222260a0b5032630517486f4 | project/frontend/src/components/RankingsList/RankingsList.js | project/frontend/src/components/RankingsList/RankingsList.js | import React from "react";
import classes from "./RankingsList.module.css";
import RankingsListRow from "./RankingsListRow/RankingsListRow";
import RankingsListTitleRow from "./RankingsListTitleRow/RankingsListTitleRow";
import { Link } from "react-router-dom";
const RankingsList = (props) => {
const competitorLi... | import React from "react";
import classes from "./RankingsList.module.css";
import RankingsListRow from "./RankingsListRow/RankingsListRow";
import RankingsListTitleRow from "./RankingsListTitleRow/RankingsListTitleRow";
import { Link } from "react-router-dom";
import ErrorMessage from "../ErrorMessage/ErrorMessage";... | Add error message for data load failure to comp page | Add error message for data load failure to comp page
| JavaScript | apache-2.0 | googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks |
129ac478286f506543644b288ddffb9dddb2dc0e | src/js/background.js | src/js/background.js |
// Update tick
function update() {
setTimeout(update, REFRESH_AMOUNT * 1000);
Twitch.getStatus(function(err, status) {
if (!status.authenticated) {
Twitch.login({
popup: true,
scope: ['user_read'],
redirect_uri: chrome.extension.getURL('veri... |
// Variables
var authenticated = false;
var streamersCount = 0;
// Update popup window and icon
function updateStatus() {
var popup = "";
var img = 'icon-19-off';
if(authenticated) {
if(streamersCount > 5){
img = 'icon-19-on';
} else {
img = 'icon-19-' + streamers... | Update popup window / icon | Update popup window / icon
| JavaScript | apache-2.0 | TechGuard/StreamAlert,TechGuard/StreamAlert,TechGuard/TwitchNotify,TechGuard/TwitchNotify |
b73b6ca23aec739df70f13a50d11c4c054cdde96 | gulpfile.js | gulpfile.js | var gulp = require('gulp'),
scssLint = require('sass-lint'),
sass = require('gulp-sass'),
sassdoc = require('sassdoc');
gulp.task('watch', function() {
gulp.watch(['tests/*.scss', 'sass/**/*.scss'], ['_build']);
});
gulp.task('sassdoc', function() {
return gulp.src('sass/**/*.scss')
.pipe(... | var gulp = require('gulp'),
scssLint = require('sass-lint'),
sass = require('gulp-sass'),
sassdoc = require('sassdoc');
gulp.task('watch', function() {
gulp.watch(['tests/*.scss', 'sass/**/*.scss', 'templates/project/*.scss'], ['_build']);
});
gulp.task('doc', function() {
return gulp.src('sass/**... | Rename task. Add templates folder to watch | Rename task. Add templates folder to watch
| JavaScript | mit | piecss/piecss,piecss/piecss,piecss/piecss |
324c2165911fe9c864d61682b7a28c331c1b0ea6 | gulpfile.js | gulpfile.js | 'use strict';
var path = require('path');
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var excludeGitignore = require('gulp-exclude-gitignore');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var nsp = require('gulp-nsp');
var plumber = require('gulp-plumber');
gulp.tas... | 'use strict';
var path = require('path');
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var excludeGitignore = require('gulp-exclude-gitignore');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var nsp = require('gulp-nsp');
var plumber = require('gulp-plumber');
gulp.tas... | Fix glob used in Gulp task | Fix glob used in Gulp task
| JavaScript | mit | zckrs/generator-node,RobertJGabriel/generator-node,yeoman/generator-node,rhettl/generator-node |
ffe2bfa4d6d7c9c8e5f99e9f3509d6263b8cb543 | lib/node_modules/@stdlib/repl/lib/help.js | lib/node_modules/@stdlib/repl/lib/help.js | 'use strict';
// MODULES //
var DOCS = require( './docs.js' );
// MAIN //
/**
* Returns help information.
*
* @private
* @param {string} alias - variable alias
*/
function help( alias ) {
var txt = DOCS[ alias ];
if ( txt === void 0 ) {
console.log( 'No help information available.' ); // eslint-disable-line no... | 'use strict';
// MODULES //
var NAMESPACE = require( './namespace' );
var DOCS = require( './docs.js' );
// VARIABLES //
var NO_HELP_TEXT = 'No help information available.';
// MAIN //
/**
* Returns help information.
*
* @private
* @param {*} alias - variable alias or value
*/
function help( alias ) {
var txt;... | Support searching by value, not just alias | Support searching by value, not just alias
| 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 |
2f9f9e5122d1b14becf66cd4ae2b33173ea2215e | src/mobile/index.js | src/mobile/index.js | console.log('Hello, from React Native!'); | import Expo from 'expo';
import React from 'react';
import { View } from 'react-native';
const App = () => {
return React.createElement('div', null, 'Hello, from React Native!');
};
// we don't want this to require transformation
class AwakeInDevApp extends React.Component {
render() {
return React.createElem... | Implement Expo entry point for mobile bundles | Implement Expo entry point for mobile bundles
| JavaScript | mit | sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit |
88cbd750b7a0beb8d1093e5e7b0cddc9ad912b96 | helpers/requestHelper.js | helpers/requestHelper.js | 'use strict';
const config = require(`${__dirname}/../config/init`);
/**
* makeAllRowRequestBody(str)
* @param string field Field to query parameters from.
* @param string from Date to query results from.
* @param string to Date to query results to.
* @return object Request to be performed body.
*/
exports.make... | 'use strict';
const config = require(`${__dirname}/../config/init`);
/**
* makeAllRowRequestBody(str)
* @param string field Field to query parameters from.
* @param string from Date to query results from.
* @param string to Date to query results to.
* @return object Request to be performed body.
*/
exports.make... | Add helper for game requests | Add helper for game requests
| JavaScript | apache-2.0 | seestats/api |
4c1f886810336d4790ca71e543b26285581d412a | jakefile.js | jakefile.js | /*global desc, task, jake, fail, complete */
(function() {
"use strict";
task("default", ["lint"]);
desc("Lint everything");
task("lint", [], function() {
var lint = require("./build/lint/lint_runner.js");
var files = new jake.FileList();
files.include("**/*.js");
file... | /*global desc, task, jake, fail, complete */
(function() {
"use strict";
desc("Build and test");
task("default", ["lint"]);
desc("Lint everything");
task("lint", [], function() {
var lint = require("./build/lint/lint_runner.js");
var files = new jake.FileList();
files.incl... | Set up continuous integration script | Set up continuous integration script
| JavaScript | mit | gmarler/weewikipaint,gmarler/weewikipaint |
412b669cc08f4e94e3a26aaac628f97ec43a20d8 | app/daos/UserStatsDaoMongoDBImpl.js | app/daos/UserStatsDaoMongoDBImpl.js | 'use strict';
const Promise = require('bluebird');
const UserStats = require('../models/UserStats');
module.exports = function() {
const create = function(userId) {
return new Promise((resolve, reject) => {
UserStats.create({ userId: userId })
.then((newUserStats) => {
resolve(newUserSta... | 'use strict';
const Promise = require('bluebird');
const UserStats = require('../models/UserStats');
module.exports = function() {
const create = function(userId) {
return new Promise((resolve, reject) => {
UserStats.create({ userId: userId })
.then((newUserStats) => {
resolve(newUserSta... | Use select method to filter return data when retrieving a user's stats. | Use select method to filter return data when retrieving a user's stats.
| JavaScript | mit | sendjmoon/GolfFourFriends,sendjmoon/GolfFourFriends |
9a0c8dae95233c59d42222844fb1658c2a54b733 | openfisca_web_ui/static/js/legislation.js | openfisca_web_ui/static/js/legislation.js | require([
'domReady',
'jquery',
'bootstrap',
], function(domReady, $, bootstrap) {
$.noConflict();
$('.collapse-node-toggle').on('click', function(evt) {
evt.preventDefault();
});
});
| require([
'domReady',
'jquery',
'bootstrap',
], function(domReady, $, bootstrap) {
$.noConflict();
$('.collapse-node-toggle').on('click', function(evt) {
evt.preventDefault();
});
$('.btn-toggle-open').on('click', function(evt) {
$('.collapse-node-toggle.collapsed').each(f... | Add "Open-all" and "Close-all" button. | Add "Open-all" and "Close-all" button.
| JavaScript | agpl-3.0 | openfisca/openfisca-web-ui,openfisca/openfisca-web-ui,openfisca/openfisca-web-ui |
504a31aa1f12d78eda1c7f99284e27fa83bd22f5 | js/utils.js | js/utils.js | (function() {
this.ColorUtil = (function() {
function ColorUtil() {}
ColorUtil.changeLuminance = function(hex, lum) {
// validate hex string
hex = String(hex).replace(/[^0-9a-f]/gi, '');
if (hex.length < 6) {
hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];
}
lum = lum || 0;
// convert... | (function() {
this.ColorUtil = (function() {
function ColorUtil() {}
ColorUtil.changeLuminance = function(hex, lum) {
// validate hex string
hex = String(hex).replace(/[^0-9a-f]/gi, '');
if (hex.length < 6) {
hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];
}
lum = lum || 0;
// convert... | Add util function to retrieve favicons | Add util function to retrieve favicons
| JavaScript | mit | yhoyhoj/startpage,yhoyhoj/startpage |
4379c8931341d9d1addbad8d4ccc17d5e440ab0b | lib/keep-awake.js | lib/keep-awake.js | var http = require("http");
module.exports = function keepMeAwake() {
setInterval(function() {
http.get("http://jounis-camino-tracker.herokuapp.com");
http.get("http://requestb.in/wyrv1wwy");
}, 300000); // every 5 minutes (300000)
} | var http = require("http");
module.exports = function keepMeAwake() {
setInterval(function() {
http.get("http://jounis-camino-tracker.herokuapp.com");
}, 300000); // every 5 minutes (300000)
} | Remove the requestbin test fetching | Remove the requestbin test fetching
| JavaScript | mit | kaplas/camino-tracker,kaplas/camino-tracker |
740923cc3010e3b806ea466e81fa2cce7ae8b3df | web-proxy/lib/urlvalidation.js | web-proxy/lib/urlvalidation.js | /*jslint node: true*/
"use strict";
var validator = require('validator');
var protocol_regex = /^(?=.*:\/\/)/;
var http_regex = /^(?=http(s?):\/\/)/i;
function add_protocol(site){
if (http_regex.test(site)){
return site;
} else if (!protocol_regex.test(site)) {
return "http://" + site;
} else {
ret... | /*jslint node: true*/
"use strict";
var validator = require('validator');
var protocol_regex = /^(?=.*:\/\/)/;
var http_regex = /^(?=http(s?):\/\/)/i;
function add_protocol(site){
if (http_regex.test(site)){
return site;
} else if (!protocol_regex.test(site)) {
return "http://" + site;
} else {
ret... | Update to validator 3.0 api. | Update to validator 3.0 api.
| JavaScript | mit | daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core |
443e1483646adae65a7ca9c2a10bf7dcb5ae445c | src/stream/fromEvent.js | src/stream/fromEvent.js | define(['./stream'], function(Stream) {
'use strict';
/**
* @param {Element} element
* @param {String} eventName
* @return {Stream}
*/
return function fromEvent(element, eventName) {
return new Stream(function(sinkValue) {
var sinkEvent, self = this;
sink... | define(['./stream'], function(Stream) {
'use strict';
/**
* @param {Element} element
* @param {String} eventName
* @return {Stream}
*/
return function fromEvent(element, eventName) {
return new Stream(function(sinkValue) {
var sinkEvent;
sinkEvent = funct... | Fix to many attached events | Fix to many attached events
| JavaScript | mit | widmogrod/jef,widmogrod/jef |
8a38839001e05c013f476c298bb2af2121f93fc6 | app/assets/javascripts/jquery_ajax_csrf_token.js | app/assets/javascripts/jquery_ajax_csrf_token.js | // Automatically adds CSRF token to all Ajax calls.
// AUTH_TOKEN is provided by the page page (e.g. application.html.haml).
jQuery(function() {
var authToken = jQuery('meta[name="csrf-token"]').attr('content');
jQuery.ajaxSetup({data: {authenticity_token: authToken}});
});
| // Automatically adds CSRF token to all Ajax calls.
// AUTH_TOKEN is provided by the page page (e.g. application.html.haml).
// It's also possible to set token in POST data (`authenticity_token`) but it can
// break some features (e.g. search which is comparing query string of the request and response).
jQuery(functio... | Fix search (send CSRF token as header, not data field) | Fix search (send CSRF token as header, not data field)
[#59376656]
| JavaScript | mit | concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse |
6c9a14a3b6ac3c98687b2092f4517287829392b0 | server/server.js | server/server.js | var net = require("net");
var express = require("express");
var bodyParser = require("body-parser");
var config = require('./config');
var app = express();
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
// Create a simple server
var server = net.createServer(function (conn) {
co... | var net = require("net");
var express = require("express");
var bodyParser = require("body-parser");
var config = require('./config');
var app;
// Create a simple server
var server = net.createServer(function (conn) {
app = express();
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyPars... | Fix socket closed on connection reset bug | Fix socket closed on connection reset bug
| JavaScript | mit | scarescrow/Automate,scarescrow/Automate,scarescrow/Automate |
4deb87cd69d7afba9a9fe1edc0ec88cb6b141688 | server/server.js | server/server.js | // var http = require('http');
var express = require('express');
var app = express();
var PATH = '/../public/';
var PORT = 3000;
app.get('/', function (res, req, next) {
var options = {
root: __dirname + PATH,
dotfiles: 'deny',
headers: {
'x-timestamp': Date.now(),
... | // var http = require('http');
var express = require('express');
var app = express();
var PATH = '/../public/';
var PORT = 3000;
app.use('/', express.static(__dirname + PATH));
app.listen(PORT, function reportRunning() {
console.log('Running on port ' + PORT);
});
| Switch file serving to express static | Switch file serving to express static
| JavaScript | mit | UVicFH/Telemetry-v2,UVicFH/Telemetry-v2 |
3848f2fc9b1d3e602aef5977d7d19f438a44bb89 | src/containers/Projects/index.js | src/containers/Projects/index.js | /* eslint-disable no-unused-vars*/
import React, { Component } from 'react';
/* eslint-enable no-unused-vars*/
import { Jumbotron } from 'react-bootstrap';
const Projects = () => (
<div>
<Jumbotron style={ {
paddingLeft: '10px',
borderRadius: '2em',
boxShadow: '10px 5px 5px #888888',
mar... | /* eslint-disable no-unused-vars*/
import React, { Component } from 'react';
/* eslint-enable no-unused-vars*/
import { Jumbotron } from 'react-bootstrap';
const Projects = () => (
<div>
<Jumbotron style={ {
paddingLeft: '10px',
borderRadius: '2em',
boxShadow: '10px 5px 5px #888888',
mar... | Change URL of project image | Change URL of project image
| JavaScript | mit | pl12133/pl12133.github.io,pl12133/pl12133.github.io |
f2039e861e888ce710ba7f0758b69c750eec9713 | lib/ehlo.js | lib/ehlo.js | 'use strict';
var SMTPServer = require('smtp-server').SMTPServer
, ehlo = {}
;
ehlo.options = {
port: 10025
, api: ''
};
ehlo.start = function() {
console.log('Starting ehlo');
var smtp = new SMTPServer();
smtp.listen(
this.options.port
, function() {
console.log('Listening on port [' + e... | 'use strict';
var SMTPServer = require('smtp-server').SMTPServer
, ehlo = {}
;
ehlo.options = {
port: 10025
, api: ''
};
ehlo.start = function() {
console.log('Starting ehlo');
var smtp = new SMTPServer({
banner: 'Welcome to Ehlo SMTP Server'
, disabledCommands: ['STARTTLS', 'AUTH']
, onData: ... | Fix stmp server to receive a mail without auth | Fix stmp server to receive a mail without auth
| JavaScript | mit | ehlo-io/ehlo |
f56c41a92c16baa2c01b65b1823fb06af69dc0ad | src/components/Message/Action.js | src/components/Message/Action.js | // @flow
import React from 'react'
import Text from '../Text'
import ChatBlock from './ChatBlock'
import classNames from '../../utilities/classNames'
import { providerContextTypes } from './propTypes'
import type { MessageChat, MessageThemeContext } from './types'
type Props = MessageChat & {
className?: string,
i... | // @flow
import React from 'react'
import Text from '../Text'
import ChatBlock from './ChatBlock'
import classNames from '../../utilities/classNames'
import { providerContextTypes } from './propTypes'
import type { MessageChat, MessageThemeContext } from './types'
type Props = MessageChat & {
className?: string,
i... | Fix isNote prop for rendering | Message.Note: Fix isNote prop for rendering
This resolve the React warning for `isNote` rendering for `Message.Action`.
| JavaScript | mit | helpscout/blue,helpscout/blue,helpscout/blue |
5e6be447be72522fecf50d862b25142af02dda8c | options.js | options.js | function updatePodcastList() {
var podcastListElement = $('#podcastList');
var bgPage = chrome.extension.getBackgroundPage();
var listHTML = '';
bgPage.podcastManager.podcastList.forEach(function(podcast) {
listHTML += renderPodcast(podcast);
});
podcastListElement.html(listHTML);
}
function storageChanged... | function updatePodcastList() {
var podcastListElement = $('#podcastList');
var bgPage = chrome.extension.getBackgroundPage();
var listHTML = '';
bgPage.podcastManager.podcastList.forEach(function(podcast) {
listHTML += renderPodcast(podcast);
});
podcastListElement.html(listHTML);
}
function storageChanged... | Update podcast list when Remove All is pressed | Update podcast list when Remove All is pressed
| JavaScript | mit | podStation/podStation,podStation/podStation,podStation/podStation,podStation/podStation |
40d11b2f46115b6c4b93d843bf10fb3fd52bdb4c | imagespace/web_external/js/init.js | imagespace/web_external/js/init.js | var imagespace = imagespace || {};
_.extend(imagespace, {
models: {},
collections: {},
views: {},
router: new Backbone.Router(),
events: _.clone(Backbone.Events),
userData: {
images: []
},
solrIdToUrl: function (id) {
var parts = id.split('/'),
file = p... | var imagespace = imagespace || {};
_.extend(imagespace, {
models: {},
collections: {},
views: {},
router: new Backbone.Router(),
events: _.clone(Backbone.Events),
userData: {
images: []
},
solrIdToUrl: function (id) {
var parts = id.split('/'),
file = p... | Add search bar to static about/help pages | Add search bar to static about/help pages
| JavaScript | apache-2.0 | memex-explorer/image_space,smadha/image_space,smadha/image_space,harsham05/image_space,memex-explorer/image_space,smadha/image_space,memex-explorer/image_space,smadha/image_space,memex-explorer/image_space,harsham05/image_space,harsham05/image_space |
45f448e320d542b5ac8a6bd18a2cc0d4366f3de5 | src/js/directives/participate.js | src/js/directives/participate.js | 'use strict';
angular.module('Teem')
.directive('participate', function() {
return {
controller: [
'$scope', '$element', '$attrs', 'SessionSvc', '$timeout',
function($scope, $element, $attrs, SessionSvc, $timeout) {
$scope.participateCopyOn = $attrs.participateCopyOn;
$scope.pa... | 'use strict';
angular.module('Teem')
.directive('participate', function() {
return {
controller: [
'$scope', '$element', '$attrs', 'SessionSvc', '$timeout', 'CommunitiesSvc',
function($scope, $element, $attrs, SessionSvc, $timeout, CommunitiesSvc) {
$scope.participateCopyOn = $attrs.pa... | Fix join community not working from communities list | Fix join community not working from communities list
| JavaScript | agpl-3.0 | P2Pvalue/pear2pear,P2Pvalue/pear2pear,P2Pvalue/teem,P2Pvalue/teem,P2Pvalue/teem,Grasia/teem,Grasia/teem,Grasia/teem |
902d76a13a6b798bbd7e607ed87af17d08b709fa | lib/view.js | lib/view.js | var Y = require('yui/handlebars'),
templates = require('./templates').raw;
global.Handlebars = Y.Handlebars;
// Register all templates as partials.
Y.Object.each(templates, function (template, name) {
Y.Handlebars.registerPartial(name, template);
});
// Export a compile() method for Express.
exports.compile... | var Y = require('yui/handlebars'),
templates = require('./templates').raw;
// Register all templates as partials.
Y.Object.each(templates, function (template, name) {
Y.Handlebars.registerPartial(name, template);
});
// Export a compile() method for Express.
exports.compile = function (source, options) {
... | Remove setting `global.Handlebars` which was left over from testing. | Remove setting `global.Handlebars` which was left over from testing.
| JavaScript | mit | ericf/photosnear.me |
2c7c46c2425f1c8e1589f6a736561fbc5e14bc47 | package.js | package.js | // package metadata file for Meteor.js
/* jshint strict:false */
/* global Package:true */
Package.describe({
name: 'twbs:bootstrap', // http://atmospherejs.com/twbs/bootstrap
summary: 'The most popular front-end framework for developing responsive, mobile first projects on the web.',
version: '3.3.5',
git: ... | // package metadata file for Meteor.js
/* jshint strict:false */
/* global Package:true */
Package.describe({
name: 'twbs:bootstrap', // http://atmospherejs.com/twbs/bootstrap
summary: 'The most popular front-end framework for developing responsive, mobile first projects on the web.',
version: '3.3.5',
git: ... | Update support for Meteor 1.2 | Update support for Meteor 1.2 | JavaScript | mit | ammula88/bootstrap,ammula88/bootstrap,ammula88/bootstrap,ammula88/bootstrap |
1d4c30f07dfce5726fd78b25234865d9ab26b4ce | client/helpers.js | client/helpers.js | UI.registerHelper("getPrettyDateAndTime", function(timestamp) {
if(timestamp)
return moment(timestamp).format('M/D/YY h:mm:ss A');
});
UI.registerHelper("getCurrentUserDisplayName", function() {
return getUserName(Meteor.user());
});
Template.expiredAlert.expired = function() {
if (this.userId == Meteor.userI... | UI.registerHelper("getPrettyDateAndTime", function(timestamp) {
if(timestamp)
return moment(timestamp).format('M/D/YY h:mm:ss A');
});
UI.registerHelper("getCurrentUserDisplayName", function() {
return getUserName(Meteor.user());
});
Template.expiredAlert.expired = function() {
if (this.userId == Meteor.userI... | Fix Expired logic to catch Jobs never updated | Fix Expired logic to catch Jobs never updated
| JavaScript | mit | EtherCasts/wework,tizol/wework,nate-strauser/wework,EtherCasts/wework,kaoskeya/wework,chrisshayan/wework,chrisshayan/wework,inderpreetsingh/wework,nate-strauser/wework,BENSEBTI/wework,kaoskeya/wework,inderpreetsingh/wework,princesust/wework,num3a/wework,tizol/wework,princesust/wework,BENSEBTI/wework,num3a/wework |
867159d77d883eaa7874634e60befb24a680e9d0 | src/entities/CollectionEditor.js | src/entities/CollectionEditor.js | import { Component } from 'substance'
import EntityEditor from './EntityEditor'
export default class CollectionEditor extends Component {
render($$) {
let el = $$('div').addClass('sc-collection-editor')
let label = this.getLabel(this.props.model.id)
let items = this._getItems()
el.append(
$$('... | import { Component, FontAwesomeIcon } from 'substance'
import EntityEditor from './EntityEditor'
export default class CollectionEditor extends Component {
render($$) {
let el = $$('div').addClass('sc-collection-editor')
let label = this.getLabel(this.props.model.id)
let items = this._getItems()
el.a... | Add a new collection item button. | Add a new collection item button.
| JavaScript | mit | substance/texture,substance/texture |
f59860b8bd52cddef02dc0170e4909da0f591d19 | t/specialize/basic.t.js | t/specialize/basic.t.js | #!/usr/bin/env node
require('proof')(2, prove)
function prove (assert) {
var tz = require('timezone')
var detroit = tz(require('timezone/America/Detroit'), 'America/Detroit')
assert(detroit(Date.UTC(2000, 0, 1), '%m/%d/%Y %H:%M'), '12/31/1999 19:00', 'timezone')
var detroit = detroit('%m/%d/%Y %H:%M')... | require('proof')(2, prove)
function prove (assert) {
var tz = require('timezone')
var detroit = tz(require('timezone/America/Detroit'), 'America/Detroit')
assert(detroit(Date.UTC(2000, 0, 1), '%m/%d/%Y %H:%M'), '12/31/1999 19:00', 'timezone')
var detroit = detroit('%m/%d/%Y %H:%M')
assert(detroit(D... | Remove shebang line from speicalize. | Remove shebang line from speicalize.
| JavaScript | mit | bigeasy/timezone,bigeasy/timezone,bigeasy/timezone |
096aedd08e479aedd598280caa1c404da9e119fa | schema/infractions.js | schema/infractions.js | const mongoose = require('mongoose');
const Schema = mongoose.Schema;
var InfractionSchema = new Schema({
moderatorID: {
type: Number,
required: true
},
targetID: {
type: Number,
required: true
},
type: {
type: String,
required: true
},
reason... | const mongoose = require('mongoose');
const Schema = mongoose.Schema;
var InfractionSchema = new Schema({
moderatorID: {
type: Number,
required: true
},
targetID: {
type: Number,
required: true
},
type: {
type: String,
required: true
},
reason... | Validate type, and examples for heating | Validate type, and examples for heating
| JavaScript | mit | steamboat-dev/shared |
6dc1898ac8c9aae8ce7e6455a84ccd905f4c3b8f | config/routes.js | config/routes.js | exports.default =
{
routes: function(api)
{
return {
get: [
/* STATUS */
{path: '/:apiVersion/Service/Status' , action: 'Status'}
]
};
}
};
| exports.default = {
routes: function(api) {
return {
get:[
{path: '/account/login' , action: 'login'},
{path: '/:apiVersion/Service/Status' , action: 'Status'}
],
put:[
{path: '/account/changePassword' , action: 'changePassword'}
],
post:[
{path: '/account/register' ... | Add Default Main Routes for WebServer API | Add Default Main Routes for WebServer API
| JavaScript | mit | Flieral/AAA-Service |
7f95e5d8086adaeedfe0c1605628e90fcc28c340 | lib/dialects/_dialect.js | lib/dialects/_dialect.js |
var _ = require('underscore')
module.exports = {
allowJobType: function(jobType) {
if (! _.isArray(jobType))
jobType = [jobType];
//console.log('allowing', jobType)
this._allowedJobTypes = this._allowedJobTypes || []
this._allowedJobTypes.concat(jobType)
}
,shutdown: function($done) {
... |
var _ = require('underscore')
module.exports = {
allowJobType: function(jobType) {
if (! _.isArray(jobType))
jobType = [jobType];
this._allowedJobTypes = (this._allowedJobTypes || []).concat(jobType)
}
,shutdown: function($done) {
$done("Dialects should implement their own shutdown()!")
}
... | Fix bug in dialect's allowJobType() | Fix bug in dialect's allowJobType()
| JavaScript | mit | Rafflecopter/deetoo |
9875caa146dc6172a73eabde6bd9b5045e0f79a0 | src/server/models/PlayerModel.js | src/server/models/PlayerModel.js | var mongoose = require('mongoose'),
uuid = require('uuid/v1'),
Card = require('./CardModel'),
Schema = mongoose.Schema,
PlayerSchema = new Schema({
sessionId: {
type: String,
required: true,
select: false
},
name: {
type: String,
required: true,
trim: true
},
img: String,
isActive: {
... | var mongoose = require('mongoose'),
uuid = require('uuid/v1'),
Card = require('./CardModel'),
Schema = mongoose.Schema,
PlayerSchema = new Schema({
sessionId: {
type: String,
required: true,
select: false
},
name: {
type: String,
required: true,
trim: true
},
img: String,
isActive: {
... | Move 'toObject' and 'toJSON' config into schema config | Move 'toObject' and 'toJSON' config into schema config
| JavaScript | unlicense | ejwaibel/squarrels,ejwaibel/squarrels |
ba2f9c315f81ccdb782dabdb903b242cf7b2e824 | src/stores/card-display-store.js | src/stores/card-display-store.js | import { createReducer } from 'redux-immutablejs';
import { createSelector } from 'reselect';
import Immutable from 'immutable';
import constants from './constants';
// Constants
const {
FLIP_CARD,
} = constants;
// Initial State
const initialState = Immutable.fromJS({
showFront: false,
});
// Selectors
const... | import { createReducer } from 'redux-immutablejs';
import { createSelector } from 'reselect';
import Immutable from 'immutable';
import constants from './constants';
// Constants
const {
CHANGE_CARD,
FLIP_CARD,
} = constants;
// Initial State
const initialState = Immutable.fromJS({
playerName: '',
showFr... | Use card display store from Guild ball app | Use card display store from Guild ball app
| JavaScript | mit | nick-ng/nick-fruit-web,nick-ng/nick-fruit-web |
0bd8b6a96bb88c47ffe96c184f0fbd5f2784bd28 | lib/add.cmd.js | lib/add.cmd.js | const fs = require('./fs');
const util = require('./util');
/**
* add subcommand
*/
module.exports = function* (file, filePath, config, passFilePath, passphrases) {
const isRunSSHAdd = util.getSSHAddOption(config.config, file);
try {
// check authentication file existence
yield fs.stat(filePath);
// ... | const fs = require('./fs');
const util = require('./util');
/**
* add subcommand
*/
module.exports = function* (file, filePath, config, passFilePath, passphrases) {
const isRunSSHAdd = util.getSSHAddOption(config.config, file);
try {
// check authentication file existence
yield fs.stat(filePath);
} cat... | Move code out of try block | refactor: Move code out of try block
| JavaScript | mit | suzuki-shunsuke/ssh-seed,suzuki-shunsuke/ssh-seed |
fbd2383b297677d162d57064bedbc6162bd1b5c6 | templates/tape/tape-templates.js | templates/tape/tape-templates.js | // UTILITY TEMPLATES
var tempRequire = "var {{=it.varName}} = require('{{=it.module}}');";
// BASE TEMPLATE FOR TESTS (deliberately incomplete statement - closed in util fx)
var baseTemplate =
"test('{{=it.testTitle}}', function(t) { \
t.plan({{=it.assertions}}); \ ";
// INDIVIDUAL ASSERTION TEMPLATES
var passTemplat... | // UTILITY TEMPLATES
var tempRequire = "var {{=it.varName}} = require('{{=it.module}}');";
// BASE TEMPLATE FOR TESTS (deliberately missing ending syntax - closed in util fx)
var baseTemplate =
"test('{{=it.testTitle}}', function(t) { \
t.plan({{=it.assertions}}); \ ";
// INDIVIDUAL ASSERTION TEMPLATES
var passTempla... | Complete templates for tape pass, fail assertions. | Complete templates for tape pass, fail assertions.
| JavaScript | mit | snipermiller/speckjs,Iced-Tea/speckjs,speckjs/speckjs,shaunstanislaus/speckjs,utensil-star/speckjs,amorri40/speckjs,yetone/speckjs |
60197396d137463fd24214dd7f68bf410f9b70ac | models/game.js | models/game.js | const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const limits = require('../config').limits;
const GameSchema = Schema({
crossword: {
type: Schema.Types.ObjectId,
ref: 'Crossword',
required: true
},
player1: {
type: Schema.Types.ObjectId,
... | const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const limits = require('../config').limits;
const GameSchema = Schema({
crossword: {
type: Schema.Types.ObjectId,
ref: 'Crossword',
required: true
},
player1: {
type: Schema.Types.ObjectId,
... | Change letters.date to not default to a date, but just be required | Change letters.date to not default to a date, but just be required
| JavaScript | mit | ophid1an/project0,ophid1an/project0,ophid1an/project0 |
024f444cd85dc09b4c457c2da1b288c82a070a8e | cla_frontend/assets-src/javascripts/app/test/protractor-jenkins-conf.js | cla_frontend/assets-src/javascripts/app/test/protractor-jenkins-conf.js | var extend = require('extend');
var defaults = require('./protractor-default-conf').config;
exports.config = extend(defaults, {
multiCapabilities: [
{
browserName: 'chrome',
platform: 'OS X 10.8',
version: '35'
},
{
browserName: 'internet explorer',
platform: 'Windows 7',
... | var extend = require('extend');
var defaults = require('./protractor-default-conf').config;
exports.config = extend(defaults, {
multiCapabilities: [
{
browserName: 'chrome',
platform: 'OS X 10.8',
version: '35'
},
{
browserName: 'internet explorer',
platform: 'Windows 7',
... | Disable protractor colour output on Jenkins | Disable protractor colour output on Jenkins
| JavaScript | mit | ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend |
c1844f3a8641f6dcc851c5a72d66df35a93ca5fe | feature/util/expect-value.js | feature/util/expect-value.js |
// reuse-lang - a pure functional lisp-like language for writing
// reusable algorithms in an extremely portable way.
//
// Written in 2015 by Jesper Oskarsson jesosk@gmail.com
//
// To the extent possible under law, the author(s) have dedicated all copyright
// and related and neighboring rights to this software to t... |
// reuse-lang - a pure functional lisp-like language for writing
// reusable algorithms in an extremely portable way.
//
// Written in 2015 by Jesper Oskarsson jesosk@gmail.com
//
// To the extent possible under law, the author(s) have dedicated all copyright
// and related and neighboring rights to this software to t... | Throw a proper error object when feature test fails | Throw a proper error object when feature test fails
| JavaScript | cc0-1.0 | redien/reuse-lang,redien/reuse-lang,redien/reuse-lang,redien/reuse-lang |
17e2b3c45cf8466b3ba6b0eab5c40c34c9baf3db | src/assets/js/main.js | src/assets/js/main.js | (function () {
function initTwinklingStars(devicePixelRatio) {
particlesJS('stars', {
particles: {
number: {
value: 180,
density: {
enable: true,
value_area: 600
}
... | (function () {
function initTwinklingStars() {
const devicePixelRatio = Math.min(window.devicePixelRatio, 3) || 1;
particlesJS('stars', {
particles: {
number: {
value: 180,
density: {
enable: true,
... | Read device pixel ratio inside init function | Read device pixel ratio inside init function
| JavaScript | mit | rfgamaral/ricardoamaral.net,rfgamaral/ricardoamaral.net |
171b08661543212599a0483097b8c21420abdd5d | src/api/github.js | src/api/github.js | import l from 'chalk-log'
import axe from './axe'
export default {
getUserRepos ({ username, token, page }) {
const params = (token) ? { auth: { username, password: token } } : {}
if (token) {
let url = `/user/repos`
url += '?per_page=100'
url += '&sort=updated'
url += '&affiliation... | import l from 'chalk-log'
import axe from './axe'
export default {
getUserRepos ({ username, token, page }) {
let params = {}
let url = ''
if (token) {
url = `/user/repos`
url += '?per_page=100'
url += `&page=${page}`
url += '&sort=updated'
url += '&affiliation=owner'
... | Refactor & add `page` query parameter | Refactor & add `page` query parameter
| JavaScript | mit | frenchbread/repos2md |
b465d2dda52cb35f2d359c0fb1a575c4afa955d6 | lib/http/middleware/body-size-limiter.js | lib/http/middleware/body-size-limiter.js | var log = require('util/log');
function attachMiddleware(maxSize) {
return function bodyDecoder(req, res, next) {
var cl, bodyLen = 0;
cl = req.headers['content-length'];
if (cl) {
cl = parseInt(cl, 10);
if (cl >= maxSize) {
log.msg('Denying client for too large content length',
... | var log = require('util/log');
function attachMiddleware(maxSize) {
return function bodyDecoder(req, res, next) {
var cl, bodyLen = 0;
cl = req.headers['content-length'];
if (cl) {
cl = parseInt(cl, 10);
if (cl >= maxSize) {
log.info('Denying client for too large content length');
... | Fix body size limiter middleware. | Fix body size limiter middleware.
| JavaScript | apache-2.0 | cloudkick/cast,cloudkick/cast,cloudkick/cast,cloudkick/cast |
93527ce6a176b2cbfc6531b78fe7674f703dd721 | src/server/index.js | src/server/index.js | import 'babel-polyfill'
import bodyParser from 'body-parser'
import express from 'express'
import log from './log'
import appRenderer from './middleware/app-renderer'
import { apolloServer } from 'apollo-server'
import { schema, resolvers } from './api/schema'
import mocks from './api/mocks'
process.on('uncaughtExcept... | import 'babel-polyfill'
import bodyParser from 'body-parser'
import express from 'express'
import log from './log'
import appRenderer from './middleware/app-renderer'
import { apolloServer } from 'apollo-server'
import { schema, resolvers } from './api/schema'
import mocks from './api/mocks'
process.on('uncaughtExcept... | Use PORT environment variable when it is available because Heroku | Use PORT environment variable when it is available because Heroku
| JavaScript | mit | achtan/pantry-app,frangerz/apollo-app-migration,saikat/react-apollo-starter-kit |
817d898f98855e5379f77565390f426d833b8c4f | src/styles/index.js | src/styles/index.js | /* @flow */
export const CONTROL_SIZE = 44;
export const NAVBAR_SIZE = 58;
export const SPACING = 16;
export const HALF_SPACING = 8;
export const BRAND_COLOR = 'rgba(82, 194, 175, 1)';
export const BORDER_COLOR = BRAND_COLOR;
export const HIGHLIGHT_COLOR = 'rgba(86, 164, 174, 0.5)';
export const HALF_COLOR = 'rgba(127... | /* @flow */
export const CONTROL_SIZE = 44;
export const NAVBAR_SIZE = 58;
export const BRAND_COLOR = 'rgba(82, 194, 175, 1)';
export const BORDER_COLOR = BRAND_COLOR;
export const HIGHLIGHT_COLOR = 'rgba(86, 164, 174, 0.5)';
export const HALF_COLOR = 'rgba(127, 127, 127, 0.5)';
export const QUARTER_COLOR = 'rgba(127,... | Remove constants SPACING and HALF_SPACING. | styles: Remove constants SPACING and HALF_SPACING.
This concludes a series of commits to replace all instances of
SPACING and HALF_SPACING with their values.
Fixes #2641.
| JavaScript | apache-2.0 | vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile |
676f5f3d754932529a268589b54c61af1d62642f | lib/utils/boot.js | lib/utils/boot.js | /**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://... | /**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://... | Remove crufty global (fixes globals.html test) | Remove crufty global (fixes globals.html test)
| JavaScript | bsd-3-clause | Polymer/polymer,Polymer/polymer,Polymer/polymer |
0b3fd30570462e07921961898657c7bbfd43ef2b | packages/app/source/client/components/login-form/login-form.js | packages/app/source/client/components/login-form/login-form.js | Space.flux.BlazeComponent.extend(Donations, 'OrgLoginForm', {
dependencies: {
loginStore: 'Space.accountsUi.LoginStore'
},
state() {
return this.loginStore;
},
events() {
return [{
'click .submit': this._onSubmit
}];
},
_onSubmit(event) {
event.preventDefault();
this.publ... | Space.flux.BlazeComponent.extend(Donations, 'OrgLoginForm', {
ENTER: 13,
dependencies: {
loginStore: 'Space.accountsUi.LoginStore'
},
state() {
return this.loginStore;
},
events() {
return [{
'keyup input': this._onKeyup,
'click .submit': this._onSubmit
}];
},
_onKeyup(e... | Add enter keymap to login | Add enter keymap to login
| JavaScript | mit | meteor-space/donations,meteor-space/donations,meteor-space/donations |
26b8175a327d5b92c948ae1d701a5d786ff01b56 | template/_footer.js | template/_footer.js |
// Expose Raven to the world
window.Raven = Raven;
// AMD
if (typeof define === 'function' && define.amd) {
define('raven', [], function() { return Raven; });
}
})(window);
| // Expose Raven to the world
window.Raven = Raven;
// AMD
if (typeof define === 'function' && define.amd) {
define('raven', [], function() { return Raven.noConflict(); });
}
})(window);
| Use Raven.noConflict() when exporting as AMD module | Use Raven.noConflict() when exporting as AMD module | JavaScript | bsd-2-clause | iodine/raven-js,danse/raven-js,Mappy/raven-js,janmisek/raven-js,Mappy/raven-js,grelas/raven-js,samgiles/raven-js,eaglesjava/raven-js,benoitg/raven-js,chrisirhc/raven-js,housinghq/main-raven-js,Mappy/raven-js,getsentry/raven-js,iodine/raven-js,hussfelt/raven-js,vladikoff/raven-js,benoitg/raven-js,clara-labs/raven-js,Pur... |
dc49677fb3c3dfb1e2698d6fa889e045a05d7604 | test/config_test.js | test/config_test.js | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var expect = require("chai").expect;
var config = require("../loop/config");
describe("config", fun... | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var expect = require("chai").expect;
var config = require("../loop/config");
describe("config", fun... | Check that the sample.json file can be loaded. | Check that the sample.json file can be loaded.
| JavaScript | mpl-2.0 | mozilla-services/loop-server,magopian/loop-server,vladikoff/loop-server,vladikoff/loop-server,kitcambridge/loop-server,mozilla-services/loop-server,kitcambridge/loop-server,magopian/loop-server |
5fcfd00409ec34eaf285f59e8e42fbe56356c48f | src/tizen/BatteryStatusProxy.js | src/tizen/BatteryStatusProxy.js | var cordova = require('cordova');
var batteryListenerId = null;
module.exports = {
start: function(successCallback, errorCallback) {
var batterySuccessCallback = function(power) {
if (successCallback) {
successCallback({level: Math.round(power.level * 100), isPlugged: power.isC... | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); y... | Add license headers to Tizen code | CB-6465: Add license headers to Tizen code
| JavaScript | apache-2.0 | corimf/cordova-plugin-battery-status,revolunet/cordova-plugin-battery-status,Maria02/camera,corimf/cordova-plugin-battery-status,Cappada/cordova-plugin-battery-status,apache/cordova-plugin-battery-status,blackberry-webworks/cordova-plugin-battery-status,purplecabbage/cordova-plugin-battery-status,Uldax/cordova-plugin-b... |
4633123143e1629150c42860ff341eb5a81552ed | client/github-auth-proxy-route.js | client/github-auth-proxy-route.js | Router.route('/',{
template: 'nucleus'
});
Router.route('/login-with-github', {
template: 'nucleus',
action: function() {
var subdomain = this.params.query.subdomain,
serverLoginUrl = subdomain + '/nucleus-github-login'
;
if (!subdomain)
throw new Meteor.Error('"subdomain" query paramet... | Router.route('/',{
template: 'nucleus'
});
Router.route('/login-with-github', {
template: 'nucleus',
onAfterAction: function() {
var subdomain = this.params.query.subdomain,
serverLoginUrl = subdomain + '/nucleus-github-login'
;
if (!subdomain)
throw new Meteor.Error('"subdomain" query ... | Move the proxy route handlers to onAfterAction so that the template gets rendered properly (instead of showing a brown/white blank page) | Move the proxy route handlers to onAfterAction so that the template gets rendered properly (instead of showing a brown/white blank page)
| JavaScript | mit | NucleusIDE/nucleus-github-auth-proxy,NucleusIDE/nucleus-github-auth-proxy |
27b985cd549c57f6686941c0c2dcbfcdb6946a0b | js/background.js | js/background.js | /* Check for undefined values. */
chrome.storage.local.get(null, function(items) {
/* webRTCIPHandlingPolicy */
if (items.rtcIPHandling == undefined) {
chrome.storage.local.set({
rtcIPHandling: 'default_public_interface_only'
}, function() {
chrome.privacy.network.webRTCIPHandlingPolicy.set({
value: 'de... | /* Set webRTCIPHandlingPolicy to 'disable_non_proxied_udp'
if user has previously selected the equivalent legacy
option.
This will prevent the default webRTCIPHandlingPolicy
option from overriding webRTCNonProxiedUdpEnabled:
false.
This will only run on update, and will only be
included in version 1.0.7. *... | Set IPHandlingPolicy to force proxy on update if legacy option was checked. | Set IPHandlingPolicy to force proxy on update if legacy option was checked.
On update, this will check if the user had selected the legacy
webRTCNonProxiedUdpEnabled option.
If they had, webRTCIPHandlingPolicy will be set to the equivalent -
'disable_non_proxied_udp'.
This will prevent proxy users from being opened ... | JavaScript | apache-2.0 | aghorler/WebRTC-Leak-Prevent,aghorler/WebRTC-Leak-Prevent |
1ddf87c1e0b751e2df7c5be95b97b45e697be239 | template/maniajs.js | template/maniajs.js | /**
* Bootstrap File, Will only call the core in the node_modules!
*
* For more information visit the github of ManiaJS:
* @link https://github.com/ManiaJS/ManiaJS
*/
process.env.CONFIG_LOCATION = __dirname + '/config.yaml';
try {
require('maniajs'); // Will start ManiaJS.
} catch (err) {
console.log('Please e... | /**
* Bootstrap File, Will only call the core in the node_modules!
*
* For more information visit the github of ManiaJS:
* @link https://github.com/ManiaJS/ManiaJS
*/
process.env.CONFIG_LOCATION = __dirname + '/config.yaml';
try {
let ManiaJS = require('maniajs'); // Will start ManiaJS.
if (ManiaJS.hasOwnPrope... | Change starter to support new structure | Change starter to support new structure
| JavaScript | isc | ManiaJS/maniajs-cli |
2f1169495432869b053f43716c8e339ca571ecaa | app/application/route.js | app/application/route.js | import Route from 'ember-route'
import service from 'ember-service/inject'
import $ from 'jquery'
/**
* The default application route
*
* @class ApplicationRoute
* @extends Ember.Route
* @public
*/
export default Route.extend({
/**
* Navigation service
*
* @property {NavigationService} navigat... | import Route from 'ember-route'
import service from 'ember-service/inject'
import $ from 'jquery'
/**
* The default application route
*
* @class ApplicationRoute
* @extends Ember.Route
* @public
*/
export default Route.extend({
/**
* Navigation service
*
* @property {NavigationService} navigat... | Remove loading mask after the model is loaded | Remove loading mask after the model is loaded
| JavaScript | mit | anehx/anonboard-frontend,anehx/anonboard-frontend,anehx/anonboard-frontend |
b7cbea7acd4d4dc4e5abe8f326a7af3a9ba0b781 | app/src/AppController.js | app/src/AppController.js | /**
* Main App Controller for the Angular Material Starter App
* @param UsersDataService
* @param LightsDataService
* @param $mdSidenav
* @constructor
*/
function AppController(UsersDataService, LightsDataService, $mdSidenav) {
var self = this;
self.selected = null;
self.users = [ ];
self.sele... | /**
* Main App Controller for the Angular Material Starter App
* @param UsersDataService
* @param LightsDataService
* @param $mdSidenav
* @constructor
*/
function AppController(UsersDataService, LightsDataService, $mdSidenav) {
var self = this;
self.selected = null;
self.users = [ ];
self.sele... | Implement display of a selected item, no matter what list it's from | Implement display of a selected item, no matter what list it's from
| JavaScript | mit | thisiswhytheinternetexists/MaterialHue,thisiswhytheinternetexists/MaterialHue |
0f6fe1bec38a2440335973f97922608ef952a3dd | message-relay/service-worker.js | message-relay/service-worker.js | // Listen for messages from clients.
self.addEventListener('message', function(event) {
// Get all the connected clients and forward the message along.
self.clients.matchAll().then(function(clientList) {
clientList.forEach(function(client) {
// Skip sending the message to the client that sent it.
if... | // Listen for messages from clients.
self.addEventListener('message', function(event) {
event.waitUntil(
// Get all the connected clients and forward the message along.
self.clients.matchAll()
.then(function(clientList) {
clientList.forEach(function(client) {
// Skip sending the message to t... | Use event.waitUntil in message-relay recipe | Use event.waitUntil in message-relay recipe
| JavaScript | mit | mozilla/serviceworker-cookbook,mozilla/serviceworker-cookbook |
37b1e09fe09911cbde96213746a57f24db2d2325 | test/client/main.js | test/client/main.js | require('es5-shim');
require('./clientIdGenerator');
require('./clipboard');
require('./jQuerySnippet');
require('./messageParser');
require('./webSocketManager');
require('./settingsStore');
require('./app.js');
// describe blocks for test organization
describe('Utilities', function() {
require('./utils/dateTim... | require('es5-shim');
require('./clientIdGenerator');
require('./clipboard');
require('./messageParser');
require('./webSocketManager');
require('./settingsStore');
require('./app.js');
// describe blocks for test organization
describe('Utilities', function() {
require('./utils/dateTimeFormatter');
require('.... | Fix jquery snippet test require | Fix jquery snippet test require
| JavaScript | bsd-3-clause | louisbl/tv,geek/tv,geek/tv,lloydbenson/tv,lloydbenson/tv,louisbl/tv |
05044c5c7057ec32d558a1a853af8e48c58a2b0a | lib/namespace.js | lib/namespace.js |
var methods = require('methods').concat(['del'])
module.exports = namespace
function join(one, two) {
if (one[one.length - 1] === '/') one = one.slice(0, -1)
if (two[0] !== '/') two = '/' + two
return one + two
}
function namespace(app, prefix) {
var middleware = [].slice.call(arguments, 2)
function route... |
var methods = require('methods').concat(['del'])
module.exports = namespace
function join(one, two) {
if (one[one.length - 1] === '/') one = one.slice(0, -1)
if (two[0] !== '/') two = '/' + two
return one + two
}
function namespace(app, prefix) {
var middleware = [].slice.call(arguments, 2)
function route... | Rename 'del' to 'delete' due to express4 deprec | Rename 'del' to 'delete' due to express4 deprec | JavaScript | mit | saraf/strider-extension-loader,Strider-CD/strider-extension-loader,Strider-CD/strider-extension-loader,saraf/strider-extension-loader |
9519d2c7bae0bd9aafefac5614925805bb4aa999 | web/src/js/components/BackgroundImage/BackgroundImagePickerContainer.js | web/src/js/components/BackgroundImage/BackgroundImagePickerContainer.js | import Relay from 'react-relay';
import BackgroundImagePicker from './BackgroundImagePickerComponent';
export default Relay.createContainer(BackgroundImagePicker, {
fragments: {
viewer: () => Relay.QL`
fragment on User {
id
backgroundImages(first:20){
edges{
node{
... | import Relay from 'react-relay';
import BackgroundImagePicker from './BackgroundImagePickerComponent';
export default Relay.createContainer(BackgroundImagePicker, {
fragments: {
viewer: () => Relay.QL`
fragment on User {
id
backgroundImages(first:20){
edges{
node{
... | Include user background image on picker to ensure that info gets updated once the server respond. | Include user background image on picker to ensure that info gets updated once the server respond.
| JavaScript | mpl-2.0 | gladly-team/tab,gladly-team/tab,gladly-team/tab |
2615add0c1a46fd67f4c990f8a6a074bc9beb064 | data/js/ext.api.js | data/js/ext.api.js | define(function(require, exports, module) {
'use strict';
var TSCORE = require("tscore");
console.log("Loading: ext.api.js");
window.addEventListener("message", handleMessage , false);
function handleMessage(msg) {
var data = JSON.parse(msg.data);
var command = data.command;
switch (command) ... | define(function(require, exports, module) {
'use strict';
var TSCORE = require("tscore");
console.log("Loading: ext.api.js");
window.addEventListener("message", handleMessage , false);
function handleMessage(msg) {
var data = JSON.parse(msg.data);
var command = data.command;
switch (command) ... | Update plyr.io version in AudioVideo player | Update plyr.io version in AudioVideo player
| JavaScript | agpl-3.0 | tagspaces/tagspaces,tagspaces/tagspaces,tagspaces/tagspaces,tagspaces/tagspaces,tagspaces/tagspaces,cbop-dev/tagspaces,cbop-dev/tagspaces,tagspaces/tagspaces,cbop-dev/tagspaces,tagspaces/tagspaces,tagspaces/tagspaces |
c45083ab1e4c99b8159990edbb26c981266e3c87 | assets/js/util/escape-uri.js | assets/js/util/escape-uri.js | /**
* Escape URI components utility.
*
* Site Kit by Google, Copyright 2020 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... | /**
* Escape URI components utility.
*
* Site Kit by Google, Copyright 2020 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... | Update documentation for the escapeURI function. | Update documentation for the escapeURI function.
Co-authored-by: Evan Mattson <04b4a59aa52dbba0fe4139b6afe8885fd3fa41ec@10up.com> | JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
f995892c2c4400f96ff8264a115c9d91cc048590 | dockerfiles/fedora-base.js | dockerfiles/fedora-base.js | var funcs = require('./funcs.js')
module.exports = function (dist, release) {
var contents = funcs.replace(header, {dist: dist, release: release}) + '\n\n'
contents += funcs.replace(pkgs, {pkgs: funcs.generatePkgStr(commonPkgs)}) + '\n\n'
return contents
}
var header = 'FROM {{DIST}}:{{RELEASE}}\n' +
'MAINTAI... | var funcs = require('./funcs.js')
module.exports = function (dist, release) {
var contents = funcs.replace(header, {dist: dist, release: release}) + '\n\n'
contents += funcs.replace(pkgs, {pkgs: funcs.generatePkgStr(commonPkgs)}) + '\n\n'
return contents
}
var header = 'FROM {{DIST}}:{{RELEASE}}\n' +
'MAINTAI... | Add latest python to fedora | Add latest python to fedora
| JavaScript | mit | nodesource/docker-node |
b52ef40f8de499cef9d68b7d629fe870edd23bfa | src/Message.js | src/Message.js | /**
* Represents an IRC message.
*
* @param {string|Object|null} prefix Message prefix. (Optional.)
* @param {string} command Command name.
* @param {Array.<string>} parameters IRC Command parameters.
*
* @constructor
*/
export default function Message (prefix, command, parameters) {
if (!(this instanceof Mes... | /**
* Represents an IRC message.
*
* @param {string|Object|null} prefix Message prefix. (Optional.)
* @param {string} command Command name.
* @param {Array.<string>} parameters IRC Command parameters.
*
* @constructor
*/
export default function Message (prefix, command, parameters) {
if (!(this instanceof Mes... | Remove turning parameters into trailing data automatically | Remove turning parameters into trailing data automatically
| JavaScript | mit | goto-bus-stop/ircs |
3f91e33a91389eca941970583fd3bf62c94f0ff9 | ui/stories/index.js | ui/stories/index.js | // CSS
import 'src/style/enterprise_style/application.scss';
// Kapacitor Stories
import './kapacitor'
| // CSS
import 'src/style/chronograf.scss';
// Kapacitor Stories
import './kapacitor'
| Fix styles path for stories. | Fix styles path for stories.
| JavaScript | agpl-3.0 | brianbaker/chronograf,brianbaker/chronograf,brianbaker/chronograf,brianbaker/chronograf,brianbaker/chronograf |
dd92650577e3fae7b1d0e647251b4753da1e2258 | js/scripts.js | js/scripts.js | var pingPongType = function(i) {
if ((i % 5 === 0) || (i % 3 === 0) || (i % 15 === 0)) {
if (i % 15 === 0) {
return "pingpong";
} else if (i % 5 === 0) {
return "pong";
} else {
return "ping";
}
} else {
return i;
}
}
$(function() {
$("#game").submit(function(event) ... | /*This function will take the updated index number
from my loop, apply these rules, and then output
ping, pong, pingpong or the index number into
the outputList */
var pingPongType = function(i) {
if ((i % 5 === 0) || (i % 3 === 0) || (i % 15 === 0)) {
if (i % 15 === 0) {
return "pingpong";
} else if ... | Add comments to function and loop for clarity | Add comments to function and loop for clarity
| JavaScript | mit | kcmdouglas/pingpong,kcmdouglas/pingpong |
61793f87250ea95ed73638925cf12822fa91b467 | summon2mods.js | summon2mods.js | // Thanks to GVSU https://github.com/gvsulib/Summon-2.0-Scripts) and others for sharing your summon hacks
$(document).ready(function() {
//Dev
// var cssPath = '//bypass.hazchem.library.uq.edu.au/summonhacks/summonhacks/',libDetailPageId, newHref, libCurrentURL, record, recordParts, thisID,libCurrentURL = window.l... | // Thanks to GVSU https://github.com/gvsulib/Summon-2.0-Scripts) and others for sharing your summon hacks
$(document).ready(function() {
//Dev
// var cssPath = '//bypass.hazchem.library.uq.edu.au/summonhacks/summonhacks/',libDetailPageId, newHref, libCurrentURL, record, recordParts, thisID,libCurrentURL = window.l... | Prepend 'Advanced' instead of replacing the carat span | Prepend 'Advanced' instead of replacing the carat span
| JavaScript | mit | uqlibrary/summonhacks,uqlibrary/summonhacks |
27c8d891dded28abdf53f066c7beff1e59ce93f7 | tasks/index.js | tasks/index.js | // Modules.
let gulp = require('gulp'),
requireDir = require('require-dir'),
runSequence = require('gulp-run-sequence');
// Require all tasks within tasks directory, including subfolders.
requireDir('./build', { recurse: true });
requireDir('./copy', { recurse: true });
requireDir('./test', { recurse: true });... | // Modules.
let gulp = require('gulp'),
requireDir = require('require-dir'),
runSequence = require('gulp-run-sequence');
// Require all tasks within tasks directory, including subfolders.
requireDir('./build', { recurse: true });
requireDir('./copy', { recurse: true });
requireDir('./test', { recurse: true });... | Add missing build sequence to gulp package command. | Add missing build sequence to gulp package command.
| JavaScript | mit | mpolizzotti/solitude,mpolizzotti/solitude |
a52809bc5e05151d90176eda738340e83a95b3fd | src/util.js | src/util.js | // @flow
type Point = {
x: number,
y: number
}
export const convertSpaces = (element: string): string =>
element.replace('%20', '_').replace(' ', '_')
export const angleRadians = (p1: Point, p2: Point): number =>
Math.atan2(p2.y - p1.y, p2.x - p1.x)
export const radial = (point: Point, radius: number, radia... | // @flow
type Point = {
x: number,
y: number
}
export const convertSpaces = (element: string): string =>
element.replace('%20', '_').replace(' ', '_')
export const angleRadians = (p1: Point, p2: Point): number =>
Math.atan2(p2.y - p1.y, p2.x - p1.x)
export const radial = (point: Point, radius: number, radia... | Add helper functions smaller and largert | Add helper functions smaller and largert
| JavaScript | mit | trebor/tsomi,trebor/tsomi |
bc3705e6887159242025b079d9386a92519bc045 | test_server.js | test_server.js | process.title = 'test-server';
var fs = require('fs');
var hapi = require('hapi');
var inert = require('inert');
var root = fs.readFileSync(__dirname + '/layout_partials/root.hbt').toString();
var server = new hapi.Server();
server.connection({
host: '0.0.0.0',
port: 8080
});
server.register(inert, function(... | process.title = 'test-server';
var fs = require('fs');
var hapi = require('hapi');
var inert = require('inert');
var root = fs.readFileSync(__dirname + '/layout_partials/root.hbt').toString();
var server = new hapi.Server();
server.connection({
host: '0.0.0.0',
port: 8080
});
server.register(inert, function(... | Change test server location message | Change test server location message
| JavaScript | mit | Densaugeo/TriDIYBio,Densaugeo/TriDIYBio |
588077d845975d978e0ed82c1f3ea9928f0687f5 | src/insertion-sort.js | src/insertion-sort.js | /**
* An implementation of insertionSort
*
* @name insertionSort
* @function
* @param {Array} xs the list to sort
*/
export function insertionSort(xs) {
for (let i = 1; i < xs.length; i++) {
for (let j = 0; j < i; j++) {
if(xs[i] < xs[j]) {
xs.splice(j, 0, xs.splice(i, 1)[0]);
}
}
... | /**
* An implementation of insertionSort
*
* @name insertionSort
* @function
* @param {Array} xs the list to sort
*
* 1. Assume the first item is sorted.
* 2. Check each item in the list to see if its smaller than the first item.
* 3. If any smaller item was found insert it in the space before the first item.
... | Add documentation for each step in the insertionSort process | Add documentation for each step in the insertionSort process
| JavaScript | mit | jasonbellamy/jscs |
a59c9a56c131b513b78f0477ffda7c1b7ec60d1d | src/components/with-drag-and-drop/__spec__.js | src/components/with-drag-and-drop/__spec__.js | // __spec__.js
import React from 'react';
import { shallow } from 'enzyme';
import { WithDragAndDrop, DraggableContext } from './with-drag-and-drop';
import Row from '../row';
describe('WithDragAndDrop', () => {
it('has a DragDropContainer', () => {
expect(WithDragAndDrop.name).toBe('DragDropContainer');
});
... | // __spec__.js
import React from 'react';
import { shallow } from 'enzyme';
import { WithDragAndDrop, DraggableContext } from './with-drag-and-drop';
describe('WithDragAndDrop', () => {
it('has a DragDropContainer', () => {
expect(WithDragAndDrop.name).toBe('DragDropContainer');
});
it('calls connectDragSo... | Fix spec that caused an error in React 15 | Fix spec that caused an error in React 15
Refactored the `identity` function to return `el`, otherwise React 15 complains
that `WithDragAndDrop` does not return a valid React element.
| JavaScript | apache-2.0 | Sage/carbon,Sage/carbon,Sage/carbon |
c3f7ede46b0190af23988fb1c0a40996d2fcd330 | packages/@sanity/default-layout/src/components/DefaultLayout.js | packages/@sanity/default-layout/src/components/DefaultLayout.js | import React from 'react'
import ToolSwitcher from './ToolSwitcher'
import RenderTool from './RenderTool'
import {Router, Route, NotFound, Redirect} from 'router:@sanity/base/router'
import styles from '../styles/DefaultLayout.css'
import tools from 'all:tool:@sanity/base/tool'
import absolutes from 'all:component:@san... | import React from 'react'
import ToolSwitcher from './ToolSwitcher'
import RenderTool from './RenderTool'
import {Router, Route, NotFound, Redirect} from 'router:@sanity/base/router'
import styles from '../styles/DefaultLayout.css'
import tools from 'all:tool:@sanity/base/tool'
import absolutes from 'all:component:@san... | Fix bug when no tools were installed | Fix bug when no tools were installed
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity |
3fcbaae9c2c537da9060d28464ccc569b7ce130b | views/index.js | views/index.js | // inferno module
import React from 'react';
import ReactDOM from "react-dom";
import { Router, Route, browserHistory } from 'react-router';
// scss module
import './scss/main.scss';
// state modules
import { Provider } from 'react-redux';
import store from './shared/store';
// app component
import App from './App.j... | // inferno module
import React from 'react';
import ReactDOM from "react-dom";
import { Router, Route, browserHistory } from 'react-router';
// scss module
import './scss/main.scss';
// state modules
import { Provider } from 'react-redux';
import store from './shared/store';
// app component
import App from './App.j... | Fix route from app.jsx to workspace controller component | Fix route from app.jsx to workspace controller component
| JavaScript | mit | paasbox/paasbox,paasbox/paasbox |
b81cce6c7333f638fd2fcfa35394040e25cf1769 | karma.conf.js | karma.conf.js | const webpackConfig = require('./webpack.config');
webpackConfig.devtool = 'inline-source-map';
webpackConfig.externals = {
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': 'window'
};
module.exports = (config) => {
config.set({
browsers: ['PhantomJS'],
singleRun: true,
frameworks: [... | const webpackConfig = require('./webpack.config');
webpackConfig.devtool = 'inline-source-map';
webpackConfig.externals = {
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': 'window',
'react/addons': true
};
module.exports = (config) => {
config.set({
browsers: ['PhantomJS'],
singleRun:... | Fix karma tests not building | Fix karma tests not building
| JavaScript | mit | nickbabcock/udps,nickbabcock/udps,nickbabcock/udps |
af20ac52b0f9e3f36c5c128995ae09089cbbcc06 | waveform.js | waveform.js | var rows = 0;
var cols = 10;
var table;
var edit_border = "thin dotted grey";
function text(str)
{
return document.createTextNode(str);
}
function init()
{
table = document.getElementById("wftable");
addRows(4);
}
function addRows(numrows)
{
numrows += rows;
if (table.tBodies.length < 1) {
tabl... | var rows = 0;
var cols = 10;
var table;
var edit_border = "thin dotted grey";
function text(str)
{
return document.createTextNode(str);
}
function cellContents(rowindex, colindex)
{
return " ";
}
function init()
{
table = document.getElementById("wftable");
addRows(4);
}
function addRows(numrow... | Add cellContents: nbsp for now | Add cellContents: nbsp for now
| JavaScript | mit | seemuth/waveforms |
79d90e2cac009a50700d9674d1341a822865d29e | lib/builders/rest-request.js | lib/builders/rest-request.js | function searchRequestBuilder(request) {
}
exports.search = searchRequestBuilder;
| function searchRequestBuilder(request) {
var params = request.params;
var queries = {};
queries.result = {
source: params.tableName,
output: {
startTime: true,
elapsedTime: true,
count: true,
attributes: true,
recodes: true
}
};
if (params.attributes)
... | Implement request message builder from REST request | Implement request message builder from REST request
| JavaScript | mit | droonga/express-droonga,KitaitiMakoto/express-droonga,KitaitiMakoto/express-droonga,droonga/express-droonga |
1e068df71a8037b3d3c3ef589a03996108261a12 | rollup.config.js | rollup.config.js | import { uglify } from "rollup-plugin-uglify";
import typescript from "rollup-plugin-typescript2";
import resolve from "rollup-plugin-node-resolve";
import license from "rollup-plugin-license";
const base = {
input: "src/skinview3d.ts",
output: [
{
format: "umd",
name: "skinview3d",
file: "dist/skinview3d... | import { uglify } from "rollup-plugin-uglify";
import typescript from "rollup-plugin-typescript2";
import resolve from "rollup-plugin-node-resolve";
import license from "rollup-plugin-license";
const base = {
input: "src/skinview3d.ts",
output: [
{
format: "umd",
name: "skinview3d",
file: "dist/skinview3d... | Fix filename of bundled file | Fix filename of bundled file | JavaScript | mit | to2mbn/skinview3d |
e259def31556ad47c37bb463063a5324508c58e3 | lib/rules/no-single-element-style-arrays.js | lib/rules/no-single-element-style-arrays.js | /**
* @fileoverview Enforce no single element style arrays
* @author Michael Gall
*/
'use strict';
module.exports = {
meta: {
docs: {
description:
'Disallow single element style arrays. These cause unnecessary re-renders as the identity of the array always changes',
category: 'Stylistic I... | /**
* @fileoverview Enforce no single element style arrays
* @author Michael Gall
*/
'use strict';
module.exports = {
meta: {
docs: {
description:
'Disallow single element style arrays. These cause unnecessary re-renders as the identity of the array always changes',
category: 'Stylistic I... | Fix issue when style prop is not an expression | Fix issue when style prop is not an expression
| JavaScript | mit | Intellicode/eslint-plugin-react-native |
e8da5f9e4295c3a671fd9b87d5ecdc53d5052203 | client/src/pages/GraphiQL.js | client/src/pages/GraphiQL.js | import React from 'react'
import GraphiQL from 'graphiql'
import 'graphiql/graphiql.css'
export default class extends React.Component {
static useNavigation = false
fetch(params) {
return fetch('/graphql', {
credentials: 'same-origin',
method: 'POST',
headers: {'Content-Type': 'application/json', 'Accep... | import React from 'react'
import GraphiQL from 'graphiql'
import 'graphiql/graphiql.css'
import Breadcrumbs from '../components/Breadcrumbs'
export default class extends React.Component {
static useNavigation = false
fetch(params) {
return fetch('/graphql', {
credentials: 'same-origin',
method: 'POST',
... | Add Breadcrumbs to graphiql page | Add Breadcrumbs to graphiql page
| JavaScript | mit | NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet |
e1f47b16e2adae698a4ae6342ce30ebc94d10986 | packages/strapi-plugin-upload/admin/src/components/EditForm/FileWrapper.js | packages/strapi-plugin-upload/admin/src/components/EditForm/FileWrapper.js | import styled from 'styled-components';
import CardImgWrapper from '../CardImgWrapper';
const FileWrapper = styled(CardImgWrapper)`
height: 401px;
width: 100%;
display: flex;
> img {
width: 100%;
object-fit: contain;
margin: auto;
}
.cropper-view-box {
outline-color: #ffffff;
}
.croppe... | import styled from 'styled-components';
import CardImgWrapper from '../CardImgWrapper';
const FileWrapper = styled(CardImgWrapper)`
height: 401px;
width: 100%;
display: flex;
> img {
width: 100%;
object-fit: contain;
margin: auto;
}
.cropper-view-box {
outline-color: ${({ theme }) => theme... | Use theme for bkg color | Use theme for bkg color
Signed-off-by: soupette <0a59f0508aa203bc732745954131d022d9f538a9@gmail.com>
| JavaScript | mit | wistityhq/strapi,wistityhq/strapi |
ecbabdaf04308d90964254116f834ce4610b6b88 | WebApp/controllers/editprofile.js | WebApp/controllers/editprofile.js | 'use strict';
var EditprofileModel = require('../models/editprofile');
var easySession = require('easy-session');
//Middleware
var auth = require('../lib/auth');
module.exports = function (router) {
var model = new EditprofileModel();
router.get('/', auth(), easySession.isLoggedIn(), function (req, res) {
... | 'use strict';
var easySession = require('easy-session');
//Middleware
var auth = require('../lib/auth');
module.exports = function (router) {
router.get('/', auth(), easySession.isLoggedIn(), function (req, res) {
if(req.session.hasRole(['board', 'user']) && req.session.userID) {
//Use session varibale ... | Update the profile edit route handler with resoruce check function. | Update the profile edit route handler with resoruce check function.
| JavaScript | mit | uahengojr/NCA-Web-App,uahengojr/NCA-Web-App |
542221a1332592dd72a26421b6cd51970c673eec | packages/instantsearch-react/src/createHitsPerPage.js | packages/instantsearch-react/src/createHitsPerPage.js | import React, {PropTypes, Component} from 'react';
import {connect} from 'react-algoliasearch-helper';
export default function createHitsPerPage(Composed) {
class HitsPerPageWrapper extends Component {
static propTypes = {
helper: PropTypes.object.isRequired,
};
refine = hitsPerPage => {
thi... | import React, {PropTypes, Component} from 'react';
import {connect} from 'react-algoliasearch-helper';
export default function createHitsPerPage(Composed) {
class HitsPerPageWrapper extends Component {
static propTypes = {
helper: PropTypes.object.isRequired,
};
refine = hitsPerPage => {
thi... | Use helper.setQueryParameter instead of manipulating the state directly | Use helper.setQueryParameter instead of manipulating the state directly
| JavaScript | mit | algolia/react-instantsearch,algolia/react-instantsearch,algolia/react-instantsearch,algolia/react-instantsearch |
0b74238a1f2446e7dcb96ca53de529155ac7b4d1 | sencha-workspace/SlateAdmin/app/view/progress/NavPanel.js | sencha-workspace/SlateAdmin/app/view/progress/NavPanel.js | Ext.define('SlateAdmin.view.progress.NavPanel', {
extend: 'SlateAdmin.view.LinksNavPanel',
xtype: 'progress-navpanel',
title: 'Student Progress',
data: true,
applyData: function(data) {
if (data !== true) {
return data;
}
return [
{
... | Ext.define('SlateAdmin.view.progress.NavPanel', {
extend: 'SlateAdmin.view.LinksNavPanel',
xtype: 'progress-navpanel',
title: 'Student Progress',
data: true,
applyData: function(data) {
if (data !== true) {
return data;
}
return [
{
... | Comment out narratives email menu item | Comment out narratives email menu item
| JavaScript | mit | SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate-admin |
96c513bd5f02e01f682f06e9900d21a7db380012 | spec/components/counter.js | spec/components/counter.js | import React, { PureComponent } from 'react';
import { Counter, Heading1, Section } from '../../components';
import style from './counter.css';
class CounterTest extends PureComponent {
render () {
return (
<article>
<Section neutral dark>
<Heading1>Counters</Heading1>
</Section>... | import React, { PureComponent } from 'react';
import { Counter, Heading1, Section } from '../../components';
import style from './counter.css';
class CounterTest extends PureComponent {
render () {
return (
<article>
<Section neutral dark>
<Heading1>Counters</Heading1>
</Section>... | Add extra Counter component in spec to show the result with value '0' | Add extra Counter component in spec to show the result with value '0'
| JavaScript | mit | teamleadercrm/teamleader-ui |
c2de4f680311c890f5e41a331b22e4ae1e4a1c05 | directives/bmChosen.js | directives/bmChosen.js | angular.module("bmComponents").directive("bmChosen", ["$timeout",
function ($timeout) {
return {
restrict : "A",
link : function(scope, element, attrs) {
element.chosen();
scope.$watch(attrs.bmChosen, function (data) {
if (data) e... | angular.module("bmComponents").directive("bmChosen", ["$timeout",
function ($timeout) {
return {
restrict : "A",
link : function(scope, element, attrs) {
element.chosen();
scope.$watch(attrs.bmChosen, function (data) {
if (data) {... | Update chosen directive to work with newer AngularJS versions. | Update chosen directive to work with newer AngularJS versions.
| JavaScript | apache-2.0 | busymachines/busymachines-commons-client |
deb09d2128a306ea9e97efb5ad99161f3958b8e4 | app/src/components/Cell/DateCell.js | app/src/components/Cell/DateCell.js | // @flow
import React from 'react';
import { DatePicker } from 'antd';
import { func, string, any } from 'prop-types';
import moment from 'moment';
import CellStyled from './Cell.styles';
import { getDateFormat } from '../../utils';
import { MODES } from '../../constants';
type Props = {
children: any,
onChange: f... | // @flow
import React from 'react';
import { DatePicker } from 'antd';
import { func, string, any } from 'prop-types';
import moment from 'moment';
import CellStyled from './Cell.styles';
import { getDateFormat } from '../../utils';
import { MODES } from '../../constants';
type Props = {
children: any,
onChange: f... | Fix date picker NAN issue | Fix date picker NAN issue
| JavaScript | mit | appbaseio/dejaVu,appbaseio/dejaVu |
b8d2122ea296d2113b2ed98de9b8c2568e313bc2 | addon/models/preprint-provider.js | addon/models/preprint-provider.js | import DS from 'ember-data';
import OsfModel from 'ember-osf/models/osf-model';
export default OsfModel.extend({
name: DS.attr('string'),
logoPath: DS.attr('string'),
bannerPath: DS.attr('string'),
description: DS.attr('string'),
advisoryBoard: DS.attr('string'),
emailContact: DS.attr('string')... | import DS from 'ember-data';
import OsfModel from 'ember-osf/models/osf-model';
export default OsfModel.extend({
name: DS.attr('string'),
logoPath: DS.attr('string'),
bannerPath: DS.attr('string'),
description: DS.attr('string'),
example: DS.attr('string'),
advisoryBoard: DS.attr('string'),
... | Add example to preprint provider (example guid) | Add example to preprint provider (example guid)
| JavaScript | apache-2.0 | crcresearch/ember-osf,chrisseto/ember-osf,binoculars/ember-osf,pattisdr/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,binoculars/ember-osf,baylee-d/ember-osf,crcresearch/ember-osf,CenterForOpenScience/ember-osf,chrisseto/ember-osf,jamescdavis/ember-osf,pattisdr/ember-osf,jamescdavis/ember-osf |
1d8c3c376a2a07b6e28ff204f9aebee6182aba89 | index.tpl.js | index.tpl.js | const Server = require('dominion');
const Config = use('config');
Server.addComponent(require('./components/sessions'));
Server.addComponent(require('./components/permissions'));
Server.addComponent(require('./components/accounts'));
Server.addComponent(require('./components/trac... | const Server = require('dominion');
const Config = use('config');
Server.addComponent(require('./components/sessions'));
Server.addComponent(require('./components/permissions'));
Server.addComponent(require('./components/accounts'));
Server.addComponent(require('./components/trac... | Add open api generation template | Add open api generation template
| JavaScript | mit | yura-chaikovsky/dominion |
94fe6abcdbb56b3f9e8f8660a618dccfa01f5ff1 | tests/integration/components/supplementary-file-browser-test.js | tests/integration/components/supplementary-file-browser-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import Ember from 'ember';
moduleForComponent('supplementary-file-browser', 'Integration | Component | supplementary file browser', {
integration: true
});
test('it renders', function(assert) {
// Set any pro... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import Ember from 'ember';
moduleForComponent('supplementary-file-browser', 'Integration | Component | supplementary file browser', {
integration: true
});
test('it renders', function(assert) {
// Set any pro... | Add node to preprint object. | Add node to preprint object.
| JavaScript | apache-2.0 | CenterForOpenScience/ember-preprints,caneruguz/ember-preprints,CenterForOpenScience/ember-preprints,laurenrevere/ember-preprints,pattisdr/ember-preprints,laurenrevere/ember-preprints,pattisdr/ember-preprints,caneruguz/ember-preprints,baylee-d/ember-preprints,baylee-d/ember-preprints |
2bd6072069662acd09328f49ff1ef756654ba140 | tour/js/script.js | tour/js/script.js | (function() {
introJs()
.start()
.onchange(function(targetElement) {
switch(this._currentStep) {
case 1:
break;
case 2:
break;
default:
break;
}
})
.onexit(function() {
window.location = "../../newtab/newtab.html";
})
.oncomplete(function() {
wind... | (function() {
introJs()
.start()
.onchange(function(targetElement) {
switch(this._currentStep) {
case 3:
//show edit controls
utils.editControls.wrap.style.opacity = 1.0;
//and put text in thing if empty
if(!utils.thing.value) utils.thing.value = "Go to the Gym";
... | Add functionality to step number three | Add functionality to step number three
| JavaScript | mit | matankb/one-main-thing,matankb/one-main-thing |
77cd7e9de6317657cabe421f22011ad78909351b | js/server.js | js/server.js | var http = require('http');
var util = require('./util');
var counter=0;
http.createServer(function (req, res) {
var answer = util.helloWorld();
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(answer+' '+counter);
counter = counter + 1;
console.log(counter);
}).listen(1337, '127.0.0... | var http = require('http');
var util = require('./util');
var counter = 0;
var port = 1337;
http.createServer(function (req, res) {
var answer = util.helloWorld();
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(answer + ' ' + counter);
counter = counter + 1;
console.log(counter);
})... | REFACTOR Extract port into its own variable | REFACTOR Extract port into its own variable
| JavaScript | mit | fhinkel/SimpleChatServer,fhinkel/SimpleChatServer |
d0db134a347906327b82fb42110439dda624130f | src/app/storage-handler.js | src/app/storage-handler.js | /* global chrome, confirm, localStorage */
var utils = require('./utils');
function StorageHandler (updateFiles) {
this.sync = function () {
if (typeof chrome === 'undefined' || !chrome || !chrome.storage || !chrome.storage.sync) {
return;
}
var obj = {};
var done = false;
var count = 0;
... | /* global chrome, confirm */
var utils = require('./utils');
function StorageHandler (updateFiles) {
this.sync = function () {
if (typeof chrome === 'undefined' || !chrome || !chrome.storage || !chrome.storage.sync) {
return;
}
var obj = {};
var done = false;
var count = 0;
function ... | Use window.localStorage in all cases | Use window.localStorage in all cases
| JavaScript | mit | soad003/browser-solidity,serapath-contribution/browser-solidity,ethereum/browser-solidity,ethereum/browser-solidity,serapath-contribution/browser-solidity,soad003/browser-solidity,Yann-Liang/browser-solidity,serapath-contribution/browser-solidity,soad003/browser-solidity,Yann-Liang/browser-solidity,Yann-Liang/browser-s... |
52d07670745aac90ad9bec87f4bcc3e422e44464 | dotfiles/.hyperterm.js | dotfiles/.hyperterm.js | const dimGrey = '#5C6F68';
const gunMetal = '#2A2E35';
const gunMetal2 = '#2D3047';
const purpleTaupe = '#484349';
const darkElectricBlue = '#5D737E';
const stormCloud = '#4F616B';
const outerSpace = '#404F56';
const richBlack = '#022F40';
const onyx = '#36393B';
const black = onyx;
const red = '#FF7C7A';
const green ... | const black = '#36393B';
const red = '#FF7C7A';
const green = '#8FD5A6';
const yellow = '#FFE57F';
const blue = '#378AAD';
const magenta = '#8C82AF';
const cyan = '#8CCEC6';
const white = '#F4F1DE';
const lightBlack = '#817F823';
const lightWhite = '#FFFFFA';
module.exports = {
plugins: [
],
config: {
paddin... | Update color draft with favorite 'black' version | Update color draft with favorite 'black' version
| JavaScript | mit | trevordmiller/shell-scripts,trevordmiller/settings,trevordmiller/settings,trevordmiller/shell-scripts |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.