commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 624 | message stringlengths 15 4.7k | lang stringclasses 3
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
8ee09efd28cfce24b0d712d5a1713caef4dd6819 | app/assets/javascripts/comments.js | app/assets/javascripts/comments.js | /* All related comment actions will be managed here */
/* appending comment see views/comments/create.js.erb */
$(function(){
// declare variables for link, button, form ids
var viewCommentForm = '#view_comment_form';
var commentForm = '#comment_form';
var newComment = '#new_comment';
toggleLink(commentFor... | /* All related comment actions will be managed here */
/* appending comment see views/comments/create.js.erb */
$(function(){
// declare variables for link, button, form ids
var viewCommentForm = '#view_comment_form';
var commentForm = '#comment_form';
var newComment = '#new_comment';
toggleLink(commentFor... | Clean up file and remove editor text on submit | Clean up file and remove editor text on submit
| JavaScript | mit | pratikmshah/myblog,pratikmshah/myblog,pratikmshah/myblog |
6e0974dc5db259931419a64cd4d13a61425283b5 | app/components/DeleteIcon/index.js | app/components/DeleteIcon/index.js | import React, { Component, PropTypes } from 'react';
import { openModal } from 'actions/uiActions';
import Icon from 'utils/icons';
import ConfirmModal from '../Modals/ConfirmModal';
export default class DeleteIcon extends Component {
static propTypes = {
onClick: PropTypes.func.isRequired,
message: PropType... | import React, { Component, PropTypes } from 'react';
import { openModal } from 'actions/uiActions';
import Icon from 'utils/icons';
import ConfirmModal from '../Modals/ConfirmModal';
export default class DeleteIcon extends Component {
static propTypes = {
onClick: PropTypes.func.isRequired,
message: PropType... | Fix defaults for DeleteIcon message | :wrench: Fix defaults for DeleteIcon message
| JavaScript | mit | JasonEtco/flintcms,JasonEtco/flintcms |
aadce336447569e40160034e87fa3e674540239d | routes/api.js | routes/api.js | var express = require('express');
_ = require('underscore')._
var request = require('request');
var router = express.Router({mergeParams: true});
var exec = require('child_process').exec;
var path = require('path');
var parentDir = path.resolve(process.cwd());
var jsonStream = require('express-jsonstream');
router.g... | var express = require('express');
_ = require('underscore')._
var request = require('request');
var router = express.Router({mergeParams: true});
var exec = require('child_process').exec;
var path = require('path');
var parentDir = path.resolve(process.cwd());
router.get('/', function(req, res, next) {
res.json({... | Revert back to limited situation | Revert back to limited situation
| JavaScript | mit | ControCurator/controcurator,ControCurator/controcurator,ControCurator/controcurator |
2268bfb7be50412878eaa38627ab0a06c981aef8 | assets/js/EditorApp.js | assets/js/EditorApp.js | var innerInitialize = function() {
console.log("It's the editor, man");
} | $(document).ready(function() {
innerInitialize();
});
var innerInitialize = function() {
// Create the canvas and context
initCanvas($(window).width(), $(window).height());
// initialize the camera
camera = new Camera();
} | Create the canvas on editor start | Create the canvas on editor start
| JavaScript | mit | Tactique/jswars |
77f69e6f30817e31a34203cce6dbdbdc6eed86dd | server/app.js | server/app.js | // node dependencies
var express = require('express');
var db = require('./db');
var passport = require('passport');
var morgan = require('morgan');
var parser = require('body-parser');
// custom dependencies
var db = require('../db/Listings.js');
var db = require('../db/Users.js');
var db = require('../db/Categories... | // node dependencies
var express = require('express');
var session = require('express-session');
var passport = require('passport');
var morgan = require('morgan');
var parser = require('body-parser');
// custom dependencies
var db = require('../db/db.js');
// var db = require('../db/Listings.js');
// var db = require... | Fix db-connect commit (to working server state!) | Fix db-connect commit (to working server state!)
- Note: eventually, the node directive that requires 'db.js' will be
replaced by the commented out directives that require the
Listings/Users/Categories models.
| JavaScript | mit | aphavichitr/hackifieds,glistening-gibus/hackifieds,Hackifieds/hackifieds,glistening-gibus/hackifieds,Hackifieds/hackifieds,glistening-gibus/hackifieds,aphavichitr/hackifieds |
a394119b4badf2fda57fa48989bff0e9810b7c79 | server-dev.js | server-dev.js | import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
import config from './webpack.config.babel';
import open from 'open';
const webpackServer = new WebpackDevServer(webpack(config), config.devServer);
webpackServer.listen(config.port, 'localhost', (err) => {
if (err) {
console.log(... | /* eslint no-console: 0 */
import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
import config from './webpack.config.babel';
import open from 'open';
const webpackServer = new WebpackDevServer(webpack(config), config.devServer);
webpackServer.listen(config.port, 'localhost', (err) => {
... | Allow console.log statement in server | Allow console.log statement in server
| JavaScript | mit | frostney/react-app-starterkit,frostney/react-app-starterkit |
061c79c86dec927d07c9566f982c9909abfbccad | app/rollDataRefresher.js | app/rollDataRefresher.js | const i = require('itemDataRefresher.js');
fateBus.subscribe(module, 'fate.configurationLoaded', function(topic, configuration) {
new i.ItemDataRefresher('roll', configuration.shaderDataTSV)
});
| const i = require('itemDataRefresher.js');
fateBus.subscribe(module, 'fate.configurationLoaded', function(topic, configuration) {
new i.ItemDataRefresher('roll', configuration.rollDataTSV)
});
| Use the right TSV data source | Use the right TSV data source
| JavaScript | mit | rslifka/fate_of_all_fools,rslifka/fate_of_all_fools |
c313bafe3cf063cf0f32318363050f4cce43afae | www/cdvah/js/app.js | www/cdvah/js/app.js |
var myApp = angular.module('CordovaAppHarness', ['ngRoute']);
myApp.config(['$routeProvider', function($routeProvider){
$routeProvider.when('/', {
templateUrl: 'views/list.html',
controller: 'ListCtrl'
});
$routeProvider.when('/add', {
templateUrl: 'views/add.html',
contro... |
var myApp = angular.module('CordovaAppHarness', ['ngRoute']);
myApp.config(['$routeProvider', function($routeProvider){
$routeProvider.when('/', {
templateUrl: 'views/list.html',
controller: 'ListCtrl'
});
$routeProvider.when('/add', {
templateUrl: 'views/add.html',
contro... | Use updated symbol path for file-system-roots plugin | Use updated symbol path for file-system-roots plugin
| JavaScript | apache-2.0 | guozanhua/chrome-app-developer-tool,apache/cordova-app-harness,guozanhua/chrome-app-developer-tool,feedhenry/cordova-app-harness,feedhenry/cordova-app-harness,apache/cordova-app-harness,apache/cordova-app-harness,feedhenry/cordova-app-harness,guozanhua/chrome-app-developer-tool,apache/cordova-app-harness,guozanhua/chro... |
00a621ec5e411bf070d789c8f7a6344b30986844 | main.start.js | main.start.js | //electron entry-point
const REACT_DEVELOPER_TOOLS = require('electron-devtools-installer').REACT_DEVELOPER_TOOLS;
var installExtension = require('electron-devtools-installer').default;
var app = require('electron').app;
var BrowserWindow = require('electron').BrowserWindow;
var path = require( "path" );
if (process.... | //electron entry-point
var app = require('electron').app;
var BrowserWindow = require('electron').BrowserWindow;
var path = require( "path" );
if (process.env.NODE_ENV === 'development') {
require('electron-debug')(); // eslint-disable-line global-require
}
app.on('ready',function() {
if(process.env.NODE_ENV === '... | Load react-devtools in dev env only | Load react-devtools in dev env only
| JavaScript | mit | cynicaldevil/gitrobotic,cynicaldevil/gitrobotic |
67b10db38f23873d832009c29519b57fb1e769e2 | blueocean-web/gulpfile.js | blueocean-web/gulpfile.js | //
// See https://github.com/jenkinsci/js-builder
//
var builder = require('@jenkins-cd/js-builder');
// Disable js-builder based linting for now.
// Will get fixed with https://github.com/cloudbees/blueocean/pull/55
builder.lint('none');
//
// Create the main "App" bundle.
// generateNoImportsBundle makes it easier ... | //
// See https://github.com/jenkinsci/js-builder
//
var builder = require('@jenkins-cd/js-builder');
// Disable js-builder based linting for now.
// Will get fixed with https://github.com/cloudbees/blueocean/pull/55
builder.lint('none');
// Explicitly setting the src paths in order to allow the rebundle task to
// w... | Watch for changes in the JDL package (rebundle) | Watch for changes in the JDL package (rebundle)
| JavaScript | mit | ModuloM/blueocean-plugin,kzantow/blueocean-plugin,jenkinsci/blueocean-plugin,tfennelly/blueocean-plugin,jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,kzantow/blueocean-plugin,jenkinsci/blueocean-plugin,tfennelly/blueocean-plugin,ModuloM/blueocean-plugin,alvarolobato/blueocean-plugin,kzantow/blueocean-plugin,jen... |
80a8734522b5aaaf12ff2fb4e1f93500bd33b423 | src/Backdrop.js | src/Backdrop.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, StyleSheet, TouchableWithoutFeedback, Animated } from 'react-native';
import { OPEN_ANIM_DURATION, CLOSE_ANIM_DURATION } from './constants';
class Backdrop extends Component {
constructor(...args) {
super(...args);
... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, StyleSheet, TouchableWithoutFeedback, Animated, Platform } from 'react-native';
import { OPEN_ANIM_DURATION, CLOSE_ANIM_DURATION } from './constants';
class Backdrop extends Component {
constructor(...args) {
super(...a... | Fix web warning about useNativeDriver | Fix web warning about useNativeDriver
| JavaScript | isc | instea/react-native-popup-menu |
48b03917df05a8c9892a3340d93ba4b92b16b81c | client/config/environment.js | client/config/environment.js | /* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'client',
environment: environment,
baseURL: '/',
locationType: 'auto',
'ember-simple-auth-token': {
serverTokenEndpoint: 'http://localhost:8080/api-token-auth/',
serverTokenRefreshEndpoint: 'h... | /* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'client',
environment: environment,
baseURL: '/',
locationType: 'auto',
'ember-simple-auth-token': {
serverTokenEndpoint: 'http://localhost:8080/api-token-auth/',
serverTokenRefreshEndpoint: 'h... | Adjust the time factor to align frontent and backend auth. | Adjust the time factor to align frontent and backend auth.
Fixes #27
| JavaScript | bsd-2-clause | mblayman/lcp,mblayman/lcp,mblayman/lcp |
9d19611474e61db68fcf2f7b9ee8505fea59092e | src/Camera.js | src/Camera.js | /**
* @depends MatrixStack.js
*/
var Camera = new Class({
initialize: function() {
this.projection = new MatrixStack();
this.modelview = new MatrixStack();
},
perspective: function(fovy, aspect, near, far) {
mat4.perspective(fovy, aspect, near, far, this.projection);
},
o... | /**
* @depends MatrixStack.js
*/
var Camera = new Class({
initialize: function() {
this.projection = new MatrixStack();
this.modelview = new MatrixStack();
},
perspective: function(fovy, aspect, near, far) {
mat4.perspective(fovy, aspect, near, far, this.projection.matrix);
},... | Make camera function actually affect the matrices | Make camera function actually affect the matrices
| JavaScript | mit | oampo/webglet |
1a3aeafe8f22d5e80276a7e0caaae99a274f2641 | Analyser/src/External.js | Analyser/src/External.js | /* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes.kinder@rhul.ac.uk) for details or support | LICENSE.md for license details */
"use strict";
/**
* This is a function that detects whether we ... | /* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes.kinder@rhul.ac.uk) for details or support | LICENSE.md for license details */
"use strict";
export default function (library) {
return requir... | Remove external electron link as we're rethinking that for now | Remove external electron link as we're rethinking that for now
| JavaScript | mit | ExpoSEJS/ExpoSE,ExpoSEJS/ExpoSE,ExpoSEJS/ExpoSE |
fa09a1300bb527ad8c804e06bc33edc1b9213ea4 | test/integration-test.js | test/integration-test.js | var injection = require('../services/injection.js');
var Q = require('q');
var mongoose = require('mongoose');
module.exports = function (test, fixtureName, testFn) {
var dbUrl = 'mongodb://localhost:27017/' + fixtureName;
var cleanUp = function () {
return Q.nbind(mongoose.connect, mongoose)(dbUrl).t... | var injection = require('../services/injection.js');
var Q = require('q');
var mongoose = require('mongoose');
module.exports = function (test, fixtureName, testFn) {
var dbUrl = 'mongodb://localhost:27017/' + fixtureName;
var cleanUp = function () {
return Q.nbind(mongoose.connect, mongoose)(dbUrl).t... | Fix endless execution of integration tests | Fix endless execution of integration tests
| JavaScript | mit | allcount/allcountjs,chikh/allcountjs,chikh/allcountjs,allcount/allcountjs |
11c5510b06900c328ff61101bbf11cabf00419c4 | tests/e2e/jest.config.js | tests/e2e/jest.config.js | const path = require( 'path' );
module.exports = {
preset: 'jest-puppeteer',
setupFilesAfterEnv: [
'<rootDir>/config/bootstrap.js',
'@wordpress/jest-console',
'expect-puppeteer',
],
testMatch: [
'<rootDir>/**/*.test.js',
'<rootDir>/specs/**/__tests__/**/*.js',
'<rootDir>/specs/**/?(*.)(spec|test).js',
... | const path = require( 'path' );
module.exports = {
preset: 'jest-puppeteer',
setupFilesAfterEnv: [
'<rootDir>/config/bootstrap.js',
'@wordpress/jest-console',
'expect-puppeteer',
],
testMatch: [
'<rootDir>/**/*.test.js',
'<rootDir>/specs/**/__tests__/**/*.js',
'<rootDir>/specs/**/?(*.)(spec|test).js',
... | Add verbose option to E2E tests. | Add verbose option to E2E tests.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
0ab42696086c681302a2718f89b557bbe40442e8 | src/foam/u2/HTMLElement.js | src/foam/u2/HTMLElement.js | /**
* @license
* Copyright 2016 Google Inc. All Rights Reserved.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
p... | /**
* @license
* Copyright 2016 Google Inc. All Rights Reserved.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
p... | Use a factory instead of creating an HTMLValidator inline. | Use a factory instead of creating an HTMLValidator inline.
| JavaScript | apache-2.0 | foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm |
fee641c22a50f685055139a8abb34a6a6159378e | src/js/index.js | src/js/index.js | require("../scss/index.scss");
var React = require('react');
var Locale = require('grommet/utils/Locale');
var Cabler = require('./components/Cabler');
var locale = Locale.getCurrentLocale();
var localeData;
try {
localeData = Locale.getLocaleData(require('../messages/' + locale));
} catch (e) {
localeData = Loca... | require("../scss/index.scss");
var React = require('react');
var ReactDOM = require('react-dom');
var Locale = require('grommet/utils/Locale');
var Cabler = require('./components/Cabler');
var locale = Locale.getCurrentLocale();
var localeData;
try {
localeData = Locale.getLocaleData(require('../messages/' + locale... | Use react-dom package for rendering application | Use react-dom package for rendering application
| JavaScript | apache-2.0 | grommet/grommet-cabler,grommet/grommet-cabler |
dadee563a1ea459c588b1507a4a98078e20d0dc6 | javascript/cucumber-blanket.js | javascript/cucumber-blanket.js | (function (){
/* ADAPTER
*
* This blanket.js adapter is designed to autostart coverage
* immediately. The other side of this is handled from Cucumber
*
* Required blanket commands:
* blanket.setupCoverage(); // Do it ASAP
* blanket.onTestStart(); // Do it ASAP
* blanket.onTestDone(); // After ... | (function (){
/* ADAPTER
*
* This blanket.js adapter is designed to autostart coverage
* immediately. The other side of this is handled from Cucumber
*
* Required blanket commands:
* blanket.setupCoverage(); // Do it ASAP
* blanket.onTestStart(); // Do it ASAP
* blanket.onTestDone(); // After ... | Update javascript blanket adapter to include sources data. | Update javascript blanket adapter to include sources data. | JavaScript | mit | vemperor/capybara-blanket,kfatehi/cucumber-blanket,kfatehi/cucumber-blanket,keyvanfatehi/cucumber-blanket,keyvanfatehi/cucumber-blanket |
a37ea675122ca7da96a84090aa86f7e7eaa038d4 | src/lib/get-costume-url.js | src/lib/get-costume-url.js | import storage from './storage';
import {SVGRenderer} from 'scratch-svg-renderer';
// Contains 'font-family', but doesn't only contain 'font-family="none"'
const HAS_FONT_REGEXP = 'font-family(?!="none")';
const getCostumeUrl = (function () {
let cachedAssetId;
let cachedUrl;
return function (asset) {
... | import storage from './storage';
import {inlineSvgFonts} from 'scratch-svg-renderer';
// Contains 'font-family', but doesn't only contain 'font-family="none"'
const HAS_FONT_REGEXP = 'font-family(?!="none")';
const getCostumeUrl = (function () {
let cachedAssetId;
let cachedUrl;
return function (asset) {... | Use fontInliner instead of entire SVGRenderer for showing costume tiles. | Use fontInliner instead of entire SVGRenderer for showing costume tiles.
The fontInliner from the scratch-svg-renderer was changed recently to work entirely on strings, so we can use that instead of parsing/loading/possibly drawing/stringifying the entire SVG.
This does not address the size-1 cache issue where the c... | JavaScript | bsd-3-clause | LLK/scratch-gui,LLK/scratch-gui |
69772952eaa4bbde2a35fc767ac5f496e1c57e99 | src/filter.js | src/filter.js | function hide_covers() {
// Remove covers
$(".mix_element div.cover").remove()
// Add class so cards can be restyled
$(".mix_card.half_card").addClass("ext-coverless_card")
// Remove covers on track page
$("#cover_art").remove()
// Remove covers in the sidebar of a track page
$(".card.s... | function hide_covers() {
// Remove covers
$(".mix_element div.cover").remove()
// Add class so cards can be restyled
$(".mix_card.half_card").addClass("ext-coverless_card")
// Remove covers on track page
$("#cover_art").remove()
// Remove covers in the sidebar of a track page
$(".card.s... | Use MutationObserver API to catch dom updates | Use MutationObserver API to catch dom updates
| JavaScript | mit | pbhavsar/8tracks-Filter |
63625631eafd8b8d68bcc213243f8105d76269dd | src/js/app.js | src/js/app.js | // JS Goes here - ES6 supported
if (window.netlifyIdentity) {
window.netlifyIdentity.on('login', () => {
document.location.href = '/admin/';
});
}
| // JS Goes here - ES6 supported
if (window.netlifyIdentity && !window.netlifyIdentity.currentUser()) {
window.netlifyIdentity.on('login', () => {
document.location.href = '/admin/';
});
}
| Fix issue with always redirecting to /admin when logged in | Fix issue with always redirecting to /admin when logged in
| JavaScript | mit | netlify-templates/one-click-hugo-cms,chromicant/blog,doudigit/doudigit.github.io,netlify-templates/one-click-hugo-cms,chromicant/blog,doudigit/doudigit.github.io |
b2648c0b5fa32934d24b271fdb050d11d0484c21 | src/index.js | src/index.js | /**
* Detects if only the primary button has been clicked in mouse events.
* @param {MouseEvent} e Event instance (or Event-like, i.e. `SyntheticEvent`)
* @return {Boolean}
*/
export const isPrimaryClick = e =>
!(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) &&
(("button" in e && e.button === 0) || ("button... | /**
* Detects if only the primary button has been clicked in mouse events.
* @param {MouseEvent} e Event instance (or Event-like, i.e. `SyntheticEvent`)
* @return {Boolean}
*/
export const isPrimaryClick = e =>
!(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) &&
(("button" in e && e.button === 0) || ("button... | Update onPrimaryClick to pass down multiple args | Update onPrimaryClick to pass down multiple args
| JavaScript | mit | jacobbuck/primary-click |
d54e3be13f374f3aa9b2f1e24bc476e7aadbfbcb | src/index.js | src/index.js | require('Common');
var win = new Window();
application.exitAfterWindowsClose = true;
win.visible = true;
win.title = "Hi Tint World!";
var webview = new WebView(); // Create a new webview for HTML.
win.appendChild(webview); // attach the webview to the window.
// position the webview 0 pixels from all the window's e... | require('Common');
var win = new Window();
var toolbar = new Toolbar();
application.exitAfterWindowsClose = true;
win.visible = true;
win.title = "Hi Tint World!";
btn = new Button();
btn.image = 'back';
toolbar.appendChild( btn );
win.toolbar = toolbar;
var webview = new WebView(); // Create a new webview for HTM... | Add toolbar with back button | Add toolbar with back button
| JavaScript | mit | niaxi/hello-tint,niaxi/hello-tint |
0c28f538d9382d85c69ecb06a208ae1b0874b29c | src/index.js | src/index.js | /**
* Created by thram on 21/01/17.
*/
import forEach from "lodash/forEach";
import assign from "lodash/assign";
import isArray from "lodash/isArray";
import {observe, state, removeObserver} from "thrux";
export const connect = (stateKey, ReactComponent) => {
class ThruxComponent extends ReactComponent {
obse... | /**
* Created by thram on 21/01/17.
*/
import forEach from "lodash/forEach";
import assign from "lodash/assign";
import isArray from "lodash/isArray";
import {observe, state, removeObserver} from "thrux";
export const connect = (stateKey, ReactComponent) => {
class ThruxComponent extends ReactComponent {
obse... | Check first if the componentDidMount and componentWillUnmount are defined | fix(mount): Check first if the componentDidMount and componentWillUnmount are defined
| JavaScript | mit | Thram/react-thrux |
f563f24c06d6de9401aa7d43fea0d5319bf5df0e | src/index.js | src/index.js | #! /usr/bin/env node
import chalk from 'chalk';
import console from 'console';
import gitAuthorStats from './git-author-stats';
gitAuthorStats().forEach((gitAuthorStat) => {
const author = chalk.bold(gitAuthorStat.author);
const commits = `${gitAuthorStat.commits} commits`;
const added = chalk.green(`${gitAuth... | #! /usr/bin/env node
import { bold, green, red } from 'chalk';
import console from 'console';
import gitAuthorStats from './git-author-stats';
gitAuthorStats().forEach((gitAuthorStat) => {
const {
author,
commits,
added,
removed,
} = gitAuthorStat;
const gitAuthorText = [
`${commits} commi... | Refactor Git author text writing | Refactor Git author text writing
| JavaScript | mit | caedes/git-author-stats |
15093e0594b007941d29d17751bc8de40e65a346 | src/index.js | src/index.js | const path = require('path')
const parse = require('./parsers/index')
// TODO Fix ampersand in selectors
// TODO ENFORCE THESE RULES
// value-no-vendor-prefix – don't allow vendor prefixes
// property-no-vendor-prefix – don't allow vendor prefixes
const ignoredRules = [
// Don't throw if there's no styled-components... | const path = require('path')
const parse = require('./parsers/index')
// TODO Fix ampersand in selectors
const sourceMapsCorrections = {}
module.exports = (/* options */) => ({
// Get string for stylelint to lint
code(input, filepath) {
const absolutePath = path.resolve(process.cwd(), filepath)
sourceMaps... | Remove ignoring of stylelint rules | Remove ignoring of stylelint rules
| JavaScript | mit | styled-components/stylelint-processor-styled-components |
af6776fc87f7a18c18355f40e58364e5ca3237b7 | components/base/Footer.js | components/base/Footer.js | import React from 'react'
class Footer extends React.PureComponent {
render () {
return <footer className='container row'>
<p className='col-xs-12'>
Copyright 2017 Junyoung Choi. <a href='https://github.com/CarbonStack/carbonstack' target='_blank'>Source code of Carbonstack</a> is publish... | import React from 'react'
class Footer extends React.PureComponent {
render () {
return <footer>
<p>
Copyright 2017 Junyoung Choi. <a href='https://github.com/CarbonStack/carbonstack' target='_blank'>Source code of Carbonstack</a> is published under MIT.
</p>
<style jsx>{`
... | Fix stye bug of footer again | Fix stye bug of footer again
| JavaScript | mit | CarbonStack/carbonstack |
f01915febfe98c8dd27a97af00473a64030d5e4f | src/index.js | src/index.js | import isPromise from './isPromise';
const defaultTypes = ['PENDING', 'FULFILLED', 'REJECTED'];
export default function promiseMiddleware(config={}) {
const promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypes;
return (_ref) => {
const dispatch = _ref.dispatch;
return next => action => {
... | import isPromise from './isPromise';
const defaultTypes = ['PENDING', 'FULFILLED', 'REJECTED'];
export default function promiseMiddleware(config={}) {
const promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypes;
return (_ref) => {
const dispatch = _ref.dispatch;
return next => action => {
... | Use default parameters for default suffixes | Use default parameters for default suffixes
| JavaScript | mit | pburtchaell/redux-promise-middleware |
08cad5105b71b10b063af27ed256bc4ab7571896 | src/index.js | src/index.js | import _ from './utils';
export default {
has: (value = {}, conditions = {}) => {
if (!_.isObject(conditions)) return false;
if (_.isArray(value)) return !!_.find(value, conditions);
if (_.isObject(value)) return !!_.find(value.transitions, conditions);
return false;
},
find: (value = {}, condit... | import _ from './utils';
function getTransitions(value) {
if (_.isArray(value)) return value;
if (_.isObject(value)) return value.transitions;
}
export default {
has: (value = {}, conditions = {}) => {
return !!_.find(getTransitions(value), conditions);
},
find: (value = {}, conditions = {}) => {
r... | Trim code a little more | Trim code a little more
| JavaScript | mit | smizell/hf |
236683fb55facf7062e6d3e95ddff7ce37c2ef1b | client/app/TrustLineService/TrustLineService.service.spec.js | client/app/TrustLineService/TrustLineService.service.spec.js | 'use strict';
describe('Service: trustLineService', function () {
// load the service's module
beforeEach(module('riwebApp'));
// instantiate service
var trustLineService;
beforeEach(inject(function (_trustLineService_) {
trustLineService = _trustLineService_;
}));
it('should do something', functi... | 'use strict';
describe('Service: TrustLineService', function () {
// load the service's module
beforeEach(module('riwebApp'));
// instantiate service
var TrustLineService;
beforeEach(inject(function (_trustLineService_) {
TrustLineService = _trustLineService_;
}));
it('should do something', functi... | Rename service var to TrustLineService just in case. | Rename service var to TrustLineService just in case.
| JavaScript | agpl-3.0 | cegeka/riweb,cegeka/riweb,andreicristianpetcu/riweb,andreicristianpetcu/riweb,cegeka/riweb,crazyquark/riweb,andreicristianpetcu/riweb,crazyquark/riweb,crazyquark/riweb |
f47b43cee6bbd40a6879f5ce09eb2612c83496f9 | src/index.js | src/index.js | import AtomControl from './components/AtomControl';
import CardControl from './components/CardControl';
import { classToDOMCard } from './utils/classToCard';
import Container, { EMPTY_MOBILEDOC } from './components/Container';
import DropWrapper from './components/DropWrapper';
import Editor from './components/Editor';... | import AtomControl from './components/AtomControl';
import CardControl from './components/CardControl';
import { classToDOMCard } from './utils/classToCard';
import Container, { EMPTY_MOBILEDOC } from './components/Container';
import Editor from './components/Editor';
import LinkControl from './components/LinkControl';... | Remove drop wrapper from exports | Remove drop wrapper from exports
| JavaScript | bsd-3-clause | upworthy/react-mobiledoc-editor |
7390f356615c375960ebf49bca2001a1fee43788 | lib/dasher.js | lib/dasher.js | var url = require('url')
var dashButton = require('node-dash-button');
var request = require('request')
function DasherButton(button) {
var options = {headers: button.headers, body: button.body, json: button.json}
this.dashButton = dashButton(button.address, button.interface)
this.dashButton.on("detected", fun... | var url = require('url')
var dashButton = require('node-dash-button');
var request = require('request')
function DasherButton(button) {
var options = {headers: button.headers, body: button.body, json: button.json}
this.dashButton = dashButton(button.address, button.interface)
this.dashButton.on("detected", fun... | Add check for nil response | Add check for nil response
The app was erroring on missing statusCode when no response
was received. This allows the app not to crash if the url
doesn't respond.
| JavaScript | mit | maddox/dasher,maddox/dasher |
f234cf043c80a66e742862cff36218fa04589398 | src/index.js | src/index.js | 'use strict';
import AssetLoader from './assetloader';
import Input from './input';
import Loop from './loop';
import Log from './log';
import Timer from './timer';
import Math from './math';
export default {
AssetLoader,
Input,
Loop,
Log,
Timer,
Math
};
| 'use strict';
import AssetLoader from './assetloader';
import Input from './input';
import Loop from './loop';
import Log from './log';
import Timer from './timer';
import Math from './math';
import Types from './types';
export default {
AssetLoader,
Input,
Loop,
Log,
Timer,
Math
};
| Add types to be exported | Add types to be exported
| JavaScript | unknown | freezedev/gamebox,gamebricks/gamebricks,freezedev/gamebox,gamebricks/gamebricks,maxwerr/gamebox |
4aa75606353bd190240cbfd559eb291a891a7432 | src/ui/app.js | src/ui/app.js | angular.module('proxtop', ['ngMaterial', 'ui.router', 'angular-progress-arc', 'pascalprecht.translate'])
.config(['$stateProvider', '$urlRouterProvider', '$translateProvider', function($stateProvider, $urlRouterProvider, $translateProvider) {
$urlRouterProvider.otherwise('/');
$translateProvider.use... | angular.module('proxtop', ['ngMaterial', 'ui.router', 'angular-progress-arc', 'pascalprecht.translate'])
.config(['$stateProvider', '$urlRouterProvider', '$translateProvider', function($stateProvider, $urlRouterProvider, $translateProvider) {
$urlRouterProvider.otherwise('/');
$translateProvider.use... | Fix missing dependency when using ng-translate | Fix missing dependency when using ng-translate
| JavaScript | mit | kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop |
cbb27012bb0c8ffc338d92b2cf3ef4449a65e4a4 | src/config.js | src/config.js | const config = Object.assign({
development: {
api: {
trade_events: {
host: 'https://intrasearch.govwizely.com/v1/trade_events',
},
},
},
production: {
api: {
trade_events: {
host: 'https://intrasearch.export.gov/v1/trade_events',
},
},
},
});
export defau... | import assign from 'object-assign';
const config = assign({
development: {
api: {
trade_events: {
host: 'https://intrasearch.govwizely.com/v1/trade_events',
},
},
},
production: {
api: {
trade_events: {
host: 'https://intrasearch.export.gov/v1/trade_events',
},... | Use object-assign instead of Object.assign | Use object-assign instead of Object.assign
| JavaScript | mit | GovWizely/trade-event-search-app,GovWizely/trade-event-search-app |
8295d27a906f850cefd86321d212162cba7ef296 | local-cli/wrong-react-native.js | local-cli/wrong-react-native.js | #!/usr/bin/env node
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same direc... | #!/usr/bin/env node
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same direc... | Fix usage of react-native cli inside package.json scripts | Fix usage of react-native cli inside package.json scripts
Summary:
IIRC we made `wrong-react-native` to warn people in case they installed `react-native` globally (instead of `react-native-cli` what the guide suggests). To do that we added `bin` entry to React Native's `package.json` that points to `local-cli/wrong-re... | JavaScript | bsd-3-clause | CodeLinkIO/react-native,imjerrybao/react-native,shrutic123/react-native,tszajna0/react-native,gitim/react-native,DanielMSchmidt/react-native,jadbox/react-native,ndejesus1227/react-native,tsjing/react-native,exponent/react-native,naoufal/react-native,martinbigio/react-native,mironiasty/react-native,browniefed/react-nati... |
1aac1de738fdef73676948be8e4d5d8fc18eb27c | caspy/static/js/api.js | caspy/static/js/api.js | (function(){
var mod = angular.module('caspy.api', ['ngResource', 'caspy.server']);
mod.config(['$resourceProvider',
function($resourceProvider) {
$resourceProvider.defaults.stripTrailingSlashes = false;
}]
);
mod.factory('caspyAPI',
['$q', '$http', '$resource', 'Constants',
function($q, $htt... | (function(){
var mod = angular.module('caspy.api', ['ngResource', 'caspy.server']);
mod.config(['$resourceProvider',
function($resourceProvider) {
$resourceProvider.defaults.stripTrailingSlashes = false;
}]
);
mod.factory('caspyAPI',
['$q', '$http', '$resource', 'Constants',
function($q, $htt... | Put higher level functions first | Put higher level functions first
| JavaScript | bsd-3-clause | altaurog/django-caspy,altaurog/django-caspy,altaurog/django-caspy |
cb754daf342cdea42225efca3834966bd5328fba | src/footer.js | src/footer.js | /*
backgrid
http://github.com/wyuenho/backgrid
Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
Licensed under the MIT @license.
*/
/**
A Footer is a generic class that only defines a default tag `tfoot` and
number of required parameters in the initializer.
@abstract
@class Backgrid.Footer
... | /*
backgrid
http://github.com/wyuenho/backgrid
Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
Licensed under the MIT @license.
*/
/**
A Footer is a generic class that only defines a default tag `tfoot` and
number of required parameters in the initializer.
@abstract
@class Backgrid.Footer
... | Remove extraneous parent reference from Footer | Remove extraneous parent reference from Footer
| JavaScript | mit | goodwall/backgrid,blackducksoftware/backgrid,wyuenho/backgrid,wyuenho/backgrid,digideskio/backgrid,qferr/backgrid,bryce-gibson/backgrid,aboieriu/backgrid,ludoo0d0a/backgrid,bryce-gibson/backgrid,blackducksoftware/backgrid,aboieriu/backgrid,digideskio/backgrid,Acquisio/backgrid,kirill-zhirnov/backgrid,crealytics/backgri... |
c51089b4f5be53d7657aecf9cfa721ced5895fa4 | lib/health.js | lib/health.js | var express = require('express');
var geocode = require('./geocode');
var mongoose = require('./mongo');
var otp = require('./otp');
/**
* Expose `router`
*/
var router = module.exports = express.Router();
/**
* Main check
*/
router.all('/', checkGeocoder, checkOTP, function(req, res) {
var checks = {
api... | var express = require('express');
var geocode = require('./geocode');
var mongoose = require('./mongo');
var otp = require('./otp');
/**
* Expose `router`
*/
var router = module.exports = express.Router();
/**
* Main check
*/
router.all('/', checkGeocoder, checkOTP, function(req, res) {
var checks = {
api... | Use encode to check geocoder status | Use encode to check geocoder status
| JavaScript | bsd-3-clause | amigocloud/modified-tripplanner,tismart/modeify,miraculixx/modeify,miraculixx/modeify,tismart/modeify,arunnair80/modeify,amigocloud/modeify,tismart/modeify,amigocloud/modeify,miraculixx/modeify,arunnair80/modeify-1,arunnair80/modeify-1,arunnair80/modeify,miraculixx/modeify,amigocloud/modeify,amigocloud/modified-trippla... |
8d46d03dd81046fb1e9821ab5e3c4c85e7eba747 | lib/modules/storage/class_static_methods/is_secured.js | lib/modules/storage/class_static_methods/is_secured.js | function isSecured(operation) {
if (_.has(this.schema.secured, operation)) {
return this.schema.secured[operation];
}
else {
return this.schema.secured.common || false;
}
};
export default isSecured; | import _ from 'lodash';
function isSecured(operation) {
if (_.has(this.schema.secured, operation)) {
return this.schema.secured[operation];
}
else {
return this.schema.secured.common || false;
}
};
export default isSecured; | Fix lack of loads import | Fix lack of loads import
| JavaScript | mit | jagi/meteor-astronomy |
f6397f79ef1471f87aa113a4dc4bab900e07935c | lib/routes.js | lib/routes.js | var addFollowers = require('./follow');
var checkAuth = require('./check_auth');
var checkPrivilege = require('./privilege_check');
var githubOAuth = require('./github_oauth');
var users = require('./db').get('users');
module.exports = function(app) {
app.get('/me', checkAuth, function(req, res) {
checkPrivileg... | var addFollowers = require('./follow');
var checkAuth = require('./check_auth');
var checkPrivilege = require('./privilege_check');
var githubOAuth = require('./github_oauth');
var users = require('./db').get('users');
module.exports = function(app) {
app.get('/me', checkAuth, function(req, res) {
checkPrivileg... | Add privilege check on follow button | Add privilege check on follow button
| JavaScript | mit | simplyianm/ghfollowers,legoboy0215/ghfollowers,simplyianm/ghfollowers,legoboy0215/ghfollowers |
3bed3dbca37e1e2072581ae8fc1a532c63c1afd7 | js/plugins/EncryptedInsightStorage.js | js/plugins/EncryptedInsightStorage.js | var cryptoUtil = require('../util/crypto');
var InsightStorage = require('./InsightStorage');
var inherits = require('inherits');
function EncryptedInsightStorage(config) {
InsightStorage.apply(this, [config]);
}
inherits(EncryptedInsightStorage, InsightStorage);
EncryptedInsightStorage.prototype.getItem = function... | var cryptoUtil = require('../util/crypto');
var InsightStorage = require('./InsightStorage');
var inherits = require('inherits');
function EncryptedInsightStorage(config) {
InsightStorage.apply(this, [config]);
}
inherits(EncryptedInsightStorage, InsightStorage);
EncryptedInsightStorage.prototype.getItem = function... | Use the same kdf for Insight Storage | Use the same kdf for Insight Storage
| JavaScript | mit | LedgerHQ/copay,troggy/unicoisa,Bitcoin-com/Wallet,BitGo/copay,wallclockbuilder/copay,msalcala11/copay,cmgustavo/copay,BitGo/copay,Kirvx/copay,DigiByte-Team/copay,mpolci/copay,Neurosploit/copay,payloadtech/wallet,mzpolini/copay,mpolci/copay,wallclockbuilder/copay,wallclockbuilder/copay,ObsidianCryptoVault/copay,fr34k8/c... |
197b667ca677c5961c9c1d116fb86032bd2ef861 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | //= require jquery
$(function() {
$('.login-trello').click(function() {
Trello.authorize({
type: "redirect",
name: "Reportrello",
scope: {
read: true,
write: true
}
});
});
}) | //= require jquery
$(function() {
$('.login-trello').click(function() {
Reportrello.authorize();
});
Reportrello = {
authorize: function() {
var self = this
Trello.authorize({
type: 'popup',
name: 'Reportrello',
fragment: 'postmessage',
scope: {
rea... | Add JS to authentication and get user information by token | Add JS to authentication and get user information by token
| JavaScript | mit | SauloSilva/reportrello,SauloSilva/reportrello,SauloSilva/reportrello |
3578177e3e10ebb0c5c0403b2df13fa472c70edb | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | Enable JavaScript code of bootstrap | Enable JavaScript code of bootstrap
| JavaScript | mit | eqot/petroglyph3,eqot/petroglyph3 |
9716b2cd82d4f4a778f798b88838a5685db2b7ea | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
/... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
/... | Enable rails-ujs to make working REST methods on link by js | Enable rails-ujs to make working REST methods on link by js
| JavaScript | mit | gadzorg/gram2_api_server,gadzorg/gram2_api_server,gadzorg/gram2_api_server |
e467997d760eeb7c3b9282a645568e4b3bcc13e8 | app/services/stripe.js | app/services/stripe.js | /* global Stripe */
import config from '../config/environment';
import Ember from 'ember';
var debug = config.LOG_STRIPE_SERVICE;
function createToken (card) {
if (debug) {
Ember.Logger.info('StripeService: getStripeToken - card:', card);
}
// manually start Ember loop
Ember.run.begin();
return new Emb... | /* global Stripe */
import config from '../config/environment';
import Ember from 'ember';
var debug = config.LOG_STRIPE_SERVICE;
function createToken (card) {
if (debug) {
Ember.Logger.info('StripeService: getStripeToken - card:', card);
}
// manually start Ember loop
Ember.run.begin();
return new Emb... | Add a create bank account token method to the service | Add a create bank account token method to the service
| JavaScript | mit | iezer/ember-stripe-service,iezer/ember-stripe-service,sescobb27/ember-stripe-service,samselikoff/ember-stripe-service,samselikoff/ember-stripe-service,ride/ember-stripe-service,fastly/ember-stripe-service,fastly/ember-stripe-service,sescobb27/ember-stripe-service,ride/ember-stripe-service |
fecd1be97cfd7539a738effe8a870ed71470b56a | src/lib/HttpApi.js | src/lib/HttpApi.js | export default class HttpApi {
constructor (prefix = '') {
this.prefix = prefix
this.opts = {
credentials: 'same-origin',
headers: new Headers({
'Content-Type': 'application/json',
})
}
return this.callApi
}
callApi = (method, url, opts = {}) => {
opts = Object.assi... | export default class HttpApi {
constructor (prefix = '') {
this.prefix = prefix
this.opts = {
credentials: 'same-origin',
headers: new Headers({
'Content-Type': 'application/json',
})
}
return this.callApi
}
callApi = (method, url, opts = {}) => {
opts = Object.assi... | Fix fetch api when returning non-JSON | Fix fetch api when returning non-JSON
| JavaScript | isc | bhj/karaoke-forever,bhj/karaoke-forever |
700f316c0ca9aa873181111752ba99b0f17a1d35 | src-es6/test/classTest.js | src-es6/test/classTest.js | import test from 'tape'
import { Vector, Polygon, Rectangle, Circle, ShapeEventEmitter } from '..'
test('Polygon#contains', t => {
t.plan(5)
//Disable warning about missing 'new'. That's what we are testing
/*jshint -W064 */
/*eslint-disable new-cap */
t.throws(()=> Polygon(), TypeError)
t.throws(()=> Rect... | import test from 'tape'
import { Vector, Polygon, Rectangle, Circle, ShapeEventEmitter } from '..'
test('Classtest', t => {
t.plan(5)
//Disable warning about missing 'new'. That's what we are testing
/*jshint -W064 */
/*eslint-disable new-cap */
t.throws(()=> Polygon(), TypeError)
t.throws(()=> Rectangle()... | Fix name for the classtest | Fix name for the classtest
| JavaScript | mit | tillarnold/shapes |
1cf21242ccd82a54bf1b0da0f61184065f3bd765 | WebContent/js/moe-list.js | WebContent/js/moe-list.js | /* Cached Variables *******************************************************************************/
var context = sessionStorage.getItem('context');
var rowThumbnails = document.querySelector('.row-thumbnails');
/* Initialization *********************************************************************************/
rowTh... | /* Cached Variables *******************************************************************************/
var context = sessionStorage.getItem('context');
var rowThumbnails = document.querySelector('.row-thumbnails');
/* Initialization *********************************************************************************/
rowTh... | Change nodelist.foreach to a normal for loop | Change nodelist.foreach to a normal for loop
This should bring much greater browser compatibility the the nodelist foreach allowing it to work on all the major browser vendors.
Fixes #95 | JavaScript | mit | NYPD/moe-sounds,NYPD/moe-sounds |
0a5d4a96c4f656ff2aa154274dc19cfa3f4d3d17 | openstack_dashboard/static/fiware/contextualHelp.js | openstack_dashboard/static/fiware/contextualHelp.js | $( document ).ready(function () {
$('.contextual-help').click(function (){
$(this).find('i').toggleClass('active');
});
$('body').click(function (e) {
$('[data-toggle="popover"]').each(function () {
//the 'is' for buttons that trigger popups
//the 'has' for icons within a button that triggers ... | $( document ).ready(function () {
$('.contextual-help').click(function (){
$(this).find('i').toggleClass('active');
});
$('body').click(function (e) {
$('[data-toggle="popover"].contextual-help').each(function () {
//the 'is' for buttons that trigger popups
//the 'has' for icons within a butto... | Improve usability of contextual-help popovers | Improve usability of contextual-help popovers
| JavaScript | apache-2.0 | ging/horizon,ging/horizon,ging/horizon,ging/horizon |
6655280140920d0697a5bf1ef8cff12c7bcee5d0 | src/twig.header.js | src/twig.header.js | /**
* Twig.js 0.8.2
*
* @copyright 2011-2015 John Roepke and the Twig.js Contributors
* @license Available under the BSD 2-Clause License
* @link https://github.com/justjohn/twig.js
*/
var Twig = (function (Twig) {
Twig.VERSION = "0.8.2";
return Twig;
})(Twig || {});
| /**
* Twig.js 0.8.2-1
*
* @copyright 2011-2015 John Roepke and the Twig.js Contributors
* @license Available under the BSD 2-Clause License
* @link https://github.com/justjohn/twig.js
*/
var Twig = (function (Twig) {
Twig.VERSION = "0.8.2-1";
return Twig;
})(Twig || {});
| Bump internal Twig.js version to "0.8.2-1" | Bump internal Twig.js version to "0.8.2-1"
| JavaScript | bsd-2-clause | FoxyCart/twig.js,FoxyCart/twig.js,FoxyCart/twig.js |
f4ac2aad1922930d4c27d4841e5665714a509a14 | src/command-line/index.js | src/command-line/index.js | var program = require("commander");
var pkg = require("../../package.json");
var fs = require("fs");
var mkdirp = require("mkdirp");
var Helper = require("../helper");
program.version(pkg.version, "-v, --version");
program.option("");
program.option(" --home <path>" , "home path");
require("./start");
require("./c... | var program = require("commander");
var pkg = require("../../package.json");
var fs = require("fs");
var mkdirp = require("mkdirp");
var Helper = require("../helper");
program.version(pkg.version, "-v, --version");
program.option("");
program.option(" --home <path>" , "home path");
var argv = program.parseOptions(... | Fix loading config before HOME variable is set | Fix loading config before HOME variable is set
| JavaScript | mit | realies/lounge,ScoutLink/lounge,realies/lounge,rockhouse/lounge,rockhouse/lounge,FryDay/lounge,williamboman/lounge,rockhouse/lounge,sebastiencs/lounge,sebastiencs/lounge,libertysoft3/lounge-autoconnect,metsjeesus/lounge,FryDay/lounge,williamboman/lounge,williamboman/lounge,metsjeesus/lounge,ScoutLink/lounge,sebastiencs... |
2135e956f28bafdfe11786d3157f52ea05bccf33 | config/env/production.js | config/env/production.js | 'use strict';
module.exports = {
db: 'mongodb://localhost/mean',
app: {
name: 'MEAN - A Modern Stack - Production'
},
facebook: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/facebook/callback'
},
twitter: {
cli... | 'use strict';
module.exports = {
app: {
name: 'MEAN - A Modern Stack - Production'
},
facebook: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/facebook/callback'
},
twitter: {
clientID: 'CONSUMER_KEY',
clien... | Use MONGOHQ_URL for database connection in prod | Use MONGOHQ_URL for database connection in prod
| JavaScript | bsd-2-clause | asm-products/barrtr,asm-products/barrtr |
a92f5fd72560341022223b039b9282f0c360627e | addon/transitions/fade.js | addon/transitions/fade.js | import opacity from 'ember-animated/motions/opacity';
/**
Fades inserted, removed, and kept sprites.
```js
import fade from 'ember-animated/transitions/fade'
export default Component.extend({
transition: fade
});
```
```hbs
{{#animated-if use=transition}}
...
{{/animated-if}}
```
@fun... | import opacity from 'ember-animated/motions/opacity';
/**
Fades inserted, removed, and kept sprites.
```js
import fade from 'ember-animated/transitions/fade';
export default Component.extend({
transition: fade
});
```
```hbs
{{#animated-if use=transition}}
...
{{/animated-if}}
```
@fu... | Add missing semicolon to example | Add missing semicolon to example
Adds a missing semicolon to the fade transition example. | JavaScript | mit | ember-animation/ember-animated,ember-animation/ember-animated,ember-animation/ember-animated |
f6f3afda12313c5093774b47b62fa79789efccc0 | dev/_/components/js/sourceModel.js | dev/_/components/js/sourceModel.js | // Source Model
AV.source = Backbone.Model.extend({
url: 'php/redirect.php/source',
defaults: {
name: '',
type: 'raw',
contentType: 'txt',
data: ''
},
});
// Source Model Tests
// test_source = new AV.source({
// name: 'The Wind and the Rain',
// type: 'raw',
// contentType: 'txt',
// data:... | // Source Model
AV.Source = Backbone.Model.extend({
url: 'php/redirect.php/source',
defaults: {
name: '',
type: 'raw',
contentType: 'txt',
data: ''
},
});
// Source Model Tests
// test_Source = new AV.Source({
// name: 'The Wind and the Rain',
// type: 'raw',
// contentType: 'txt',
// data:... | Add some tests, they're commented out right now. Things work! | Add some tests, they're commented out right now. Things work!
| JavaScript | bsd-3-clause | Swarthmore/juxtaphor,Swarthmore/juxtaphor |
74e17f622ac60623e4461c5c472e740f292855f6 | test/index.js | test/index.js | var callisto = require('callisto');
var users = require('./lib/users.js');
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('database.db3');
callisto.server({
port: 8090,
root: 'www'
});
callisto.addModule('users', users); | var callisto = require('callisto');
var users = require('./lib/users.js');
var sqlite3 = require('sqlite3').verbose();
global.db = new sqlite3.Database('database.db3');
callisto.server({
port: 8090,
root: 'www'
});
callisto.addModule('users', users); | Add db to the global variables | Add db to the global variables
| JavaScript | mit | codingvillage/callisto,codingvillage/callisto |
625fc78ee616baedf64aa37357403b4b72c7363c | src/js/select2/i18n/th.js | src/js/select2/i18n/th.js | define(function () {
// Thai
return {
inputTooLong: function (args) {
var overChars = args.input.length - args.maximum;
var message = 'โปรดลบออก ' + overChars + ' ตัวอักษร';
return message;
},
inputTooShort: function (args) {
var remainingChars = args.minimum - args.input.lengt... | define(function () {
// Thai
return {
errorLoading: function () {
return 'ไม่สามารถค้นข้อมูลได้';
},
inputTooLong: function (args) {
var overChars = args.input.length - args.maximum;
var message = 'โปรดลบออก ' + overChars + ' ตัวอักษร';
return message;
},
inputTooShort:... | Add errorLoading translation of Thai language. | Add errorLoading translation of Thai language.
This closes https://github.com/select2/select2/pull/4521.
| JavaScript | mit | bottomline/select2,select2/select2,ZaArsProgger/select2,inway/select2,ZaArsProgger/select2,iestruch/select2,inway/select2,bottomline/select2,iestruch/select2,select2/select2 |
263e6691ad0cda4c2adaee1aca584316fedcf382 | test/index.js | test/index.js | var assert = require('assert')
var mongo = require('../')
var db = mongo('mongodb://read:read@ds031617.mongolab.com:31617/esdiscuss')
before(function (done) {
this.timeout(10000)
db._get(done)
})
describe('read only operation', function () {
it('db.getCollectionNames', function (done) {
db.getCollectionName... | var assert = require('assert')
var mongo = require('../')
var db = mongo('mongodb://read:read@ds031617.mongolab.com:31617/esdiscuss')
before(function (done) {
this.timeout(10000)
db._get(done)
})
describe('read only operation', function () {
it('db.getCollectionNames', function (done) {
db.getCollectionName... | Add test case for `count` method | Add test case for `count` method
| JavaScript | mit | then/mongod,then/then-mongo |
74632c81aa309e7d4cfab2bc4fb80effd49da773 | test/index.js | test/index.js | 'use strict';
var test = require('tape');
var isError = require('../index.js');
test('isError is a function', function t(assert) {
assert.equal(typeof isError, 'function');
assert.end();
});
test('returns true for error', function t(assert) {
assert.equal(isError(new Error('foo')), true);
assert.equ... | 'use strict';
var test = require('tape');
var vm = require('vm');
var isError = require('../index.js');
test('isError is a function', function t(assert) {
assert.equal(typeof isError, 'function');
assert.end();
});
test('returns true for error', function t(assert) {
assert.equal(isError(new Error('foo')... | Add breaking tests for foreign/inherited errors | Add breaking tests for foreign/inherited errors
| JavaScript | mit | Raynos/is-error |
ce11c728c6aba22c377c9abd563aebc03df71964 | core/client/views/settings/tags/settings-menu.js | core/client/views/settings/tags/settings-menu.js | var TagsSettingsMenuView = Ember.View.extend({
saveText: Ember.computed('controller.model.isNew', function () {
return this.get('controller.model.isNew') ?
'Add Tag' :
'Save Tag';
}),
// This observer loads and resets the uploader whenever the active tag changes,
// ensu... | var TagsSettingsMenuView = Ember.View.extend({
saveText: Ember.computed('controller.model.isNew', function () {
return this.get('controller.model.isNew') ?
'Add Tag' :
'Save Tag';
}),
// This observer loads and resets the uploader whenever the active tag changes,
// ensu... | Reset upload component on tag switch | Reset upload component on tag switch
Closes #4755
| JavaScript | mit | sangcu/Ghost,thinq4yourself/Unmistakable-Blog,JohnONolan/Ghost,ThorstenHans/Ghost,optikalefx/Ghost,wemakeweb/Ghost,jomahoney/Ghost,lanffy/Ghost,tidyui/Ghost,rollokb/Ghost,shrimpy/Ghost,fredeerock/atlabghost,ClarkGH/Ghost,letsjustfixit/Ghost,UsmanJ/Ghost,rito/Ghost,TribeMedia/Ghost,BlueHatbRit/Ghost,e10/Ghost,NovaDevelo... |
9d75d13fcca1105093170e6b98d1e690fc9cbd29 | system-test/env.js | system-test/env.js | const expect = require('chai').expect;
const version = process.env.QB_VERSION;
describe('check compiler version inside docker', function () {
it('should have the same version', async () => {
const exec = require('child_process').exec;
let options = {
timeout: 60000,
killSig... | const expect = require('chai').expect;
const version = process.env.QB_VERSION;
describe('check compiler version inside docker', function () {
it('should have the same version', async () => {
const exec = require('child_process').exec;
let options = {
timeout: 60000,
killSig... | Add a test for std-versions script | Add a test for std-versions script
| JavaScript | bsd-2-clause | FredTingaud/quick-bench-back-end,FredTingaud/quick-bench-back-end,FredTingaud/quick-bench-back-end |
210babd039054adf81522da01f55b10b5e0dc06f | tests/dev.js | tests/dev.js | var f_ = require('../index.js');
var TaskList = require('./TaskList');
var f_config = {
functionFlow: ['getSource', 'writeSource', 'notify'], // REQUIRED
resetOnRetryAll: true,
toLog: ['all'],
desc: 'Test taskList',
maxRetries: {
all: 2
}
};
TaskList = f_.augment(TaskList, f_config);
var runSingle = fun... | var f_ = require('../index.js');
var TaskList = require('./TaskList');
var f_config = {
/**
* `start` method is not given here, since we call it manualy
* This is just a matter of personal taste, I do not like auto starts!
*/
functionFlow: ['getSource', 'writeSource', 'notify'], // REQUIRED
resetOnRetryAll... | Comment about start method not being present in functionFlow | Comment about start method not being present in functionFlow
| JavaScript | mit | opensoars/f_ |
e34ec4cde226f760dc21926e9f2fb504fdb7fdb5 | src/Drivers/Cache/index.js | src/Drivers/Cache/index.js | 'use strict'
/**
* Abstract base class that ensures required public methods are implemented by
* inheriting classes.
*
* @example
*
* class BloomFilterCache extends Cache {
* constructor() {
* super()
* }
*
* get(key) {}
* put(key, value, milliseconds) {}
* increment(key) {}
* incrementEx... | 'use strict'
/**
* Abstract base class that ensures required public methods are implemented by
* inheriting classes.
*
* @example
*
* class BloomFilterCache extends Cache {
* constructor() {
* super()
* }
*
* get(key) {}
* put(key, value, milliseconds) {}
* increment(key) {}
* incrementEx... | Mark secondsToExpiration as abstract method | Mark secondsToExpiration as abstract method
| JavaScript | mit | masasron/adonis-throttle,masasron/adonis-throttle |
3f5e236d5a23f13e8f683a550d31ff44080ecb01 | transforms.js | transforms.js | /**
* Module dependencies
*/
var accounting = require('accounting')
, util = require('util')
, currency = require('currency-symbol-map');
/**
* formatPrice - format currency code and price nicely
* @param {Object} value
* @returns {String} formatted price
* @note Value is expected to be of the form:
* {
... | /**
* Module dependencies
*/
var accounting = require('accounting')
, util = require('util')
, currency = require('currency-symbol-map');
/**
* formatPrice - format currency code and price nicely
* @param {Object} value
* @returns {String} formatted price
* @note Value is expected to be of the form:
* {
... | Format prices differently for germany | Format prices differently for germany
| JavaScript | mit | urgeiolabs/aws-price |
351e1eb2093ff4cfb87f17f6bcfccb95f0f589f0 | source/assets/javascripts/locastyle/_toggle-text.js | source/assets/javascripts/locastyle/_toggle-text.js | var locastyle = locastyle || {};
locastyle.toggleText = (function() {
'use strict';
var config = {
trigger: '[data-ls-module=toggleText]',
triggerChange: 'toggleText:change'
};
function eventHandler(el, target, text) {
el.trigger(config.triggerChange, [target, text]);
}
function bindToggle(e... | var locastyle = locastyle || {};
locastyle.toggleText = (function() {
'use strict';
var config = {
trigger: '[data-ls-module=toggleText]',
triggerChange: 'toggleText:change'
};
function eventHandler(el, target, text) {
el.trigger(config.triggerChange, [target, text]);
}
function bindToggle(e... | Remove stop propagation from toggle text module | Remove stop propagation from toggle text module
| JavaScript | mit | locaweb/locawebstyle,deividmarques/locawebstyle,deividmarques/locawebstyle,deividmarques/locawebstyle,locaweb/locawebstyle,locaweb/locawebstyle |
c090cf03c81639622df3f7d3b0414aea926d95a3 | bonfires/sum-all-odd-fibonacci-numbers/logic.js | bonfires/sum-all-odd-fibonacci-numbers/logic.js | /* Bonfire: Sum All Odd Fibonacci Numbers */
function sumFibs(num) {
var f1 = 1;
var f2 = 1;
function fib(){
}
return num;
}
sumFibs(4); | /* Bonfire: Sum All Odd Fibonacci Numbers */
function sumFibs(num) {
var tmp = num;
while (num > 2){
}
return num;
}
sumFibs(4);
| Edit Fibonacci project in Bonfires Directory | Edit Fibonacci project in Bonfires Directory
| JavaScript | mit | witblacktype/freeCodeCamp_projects,witblacktype/freeCodeCamp_projects |
069d6ac19107f126cc71b37dad5d8d0821d3c249 | app/controllers/stream.js | app/controllers/stream.js | import Ember from 'ember';
import ENV from 'plenario-explorer/config/environment';
export default Ember.Controller.extend({
modelArrived: Ember.observer('model', function() {
const nodeList = this.get('model.nodes');
const nodeTuples = nodeList.map(node => {
return [node.properties.id, node.properties]... | import Ember from 'ember';
// import ENV from 'plenario-explorer/config/environment';
export default Ember.Controller.extend({
modelArrived: Ember.observer('model', function() {
const nodeList = this.get('model.nodes');
const nodeTuples = nodeList.map(node => {
return [node.properties.id, node.properti... | Set default node as first returned from API | Set default node as first returned from API
| JavaScript | mit | UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer |
c8edf1a27fe1a9142793a071b079d079138c6851 | schema/sorts/fair_sorts.js | schema/sorts/fair_sorts.js | import { GraphQLEnumType } from 'graphql';
export default {
type: new GraphQLEnumType({
name: 'FairSorts',
values: {
created_at_asc: {
value: 'created_at',
},
created_at_desc: {
value: '-created_at',
},
start_at_asc: {
value: 'start_at',
},
st... | import { GraphQLEnumType } from 'graphql';
export default {
type: new GraphQLEnumType({
name: 'FairSorts',
values: {
CREATED_AT_ASC: {
value: 'created_at',
},
CREATED_AT_DESC: {
value: '-created_at',
},
START_AT_ASC: {
value: 'start_at',
},
ST... | Use uppercase for fair sort enum | Use uppercase for fair sort enum
| JavaScript | mit | artsy/metaphysics,broskoski/metaphysics,artsy/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1,craigspaeth/metaphysics,1aurabrown/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1,artsy/metaphysics,craigspaeth/metaphysics |
50b994a3873b14b50a28660547ea7d4a36e4d429 | config/pathresolver.js | config/pathresolver.js | /*jslint node: true */
const pathresolver = require('angular-filemanager-nodejs-bridge').pathresolver;
const path = require('path');
pathresolver.baseDir = function(req) {
if(!req.user || !req.user.username || !Array.isArray(req.user.global_roles)) {
throw new Error("No valid user!");
}
// Admin users can ... | /*jslint node: true */
const pathresolver = require('angular-filemanager-nodejs-bridge').pathresolver;
const path = require('path');
const fs = require('fs.extra');
pathresolver.baseDir = function(req) {
if(!req.user || !req.user.username || !Array.isArray(req.user.global_roles)) {
throw new Error("No valid use... | Create user directories if they do not exist | Create user directories if they do not exist
| JavaScript | agpl-3.0 | fkoester/purring-flamingo,fkoester/purring-flamingo |
c8ac6f48aae5a473f712231bbad389f9b788cfc7 | discord-client/src/bot.js | discord-client/src/bot.js | const Discord = require('discord.js');
const { ChannelProcessor } = require('./channelProcessor');
const {discordApiToken } = require('./secrets.js');
const client = new Discord.Client();
const channelProcessorMap = {};
client.on('ready', () => {
console.log('Bot is ready');
});
client.on('message', (message) => {... | const Discord = require('discord.js');
const { ChannelProcessor } = require('./channelProcessor');
const {discordApiToken } = require('./secrets.js');
const client = new Discord.Client();
const channelProcessorMap = {};
client.on('ready', () => {
console.log('Bot is ready');
});
client.on('message', (message) => {... | Add console logging upon haiku trigger | Add console logging upon haiku trigger
| JavaScript | mit | bumblepie/haikubot |
cc472a3d07b2803c9e3b4cb80624d1c312d519f7 | test/fetch.js | test/fetch.js | 'use strict';
var http = require('http');
var assert = require('assertive');
var fetch = require('../lib/fetch');
describe('fetch', function() {
var server;
before('start echo server', function(done) {
server = http.createServer(function(req, res) {
res.writeHead(200, {
'Content-Type': 'appli... | 'use strict';
var http = require('http');
var assert = require('assertive');
var fetch = require('../lib/fetch');
describe('fetch', function() {
var server;
before('start echo server', function(done) {
server = http.createServer(function(req, res) {
var chunks = [];
req.on('data', function(chun... | Add test for empty body | Add test for empty body
| JavaScript | bsd-3-clause | jkrems/srv-gofer |
f8339c53d8b89ebb913088be19954ad8d0c44517 | src/providers/sh/index.js | src/providers/sh/index.js | module.exports = {
title: 'now.sh',
subcommands: new Set([
'login',
'deploy',
'ls',
'list',
'alias',
'scale',
'certs',
'dns',
'domains',
'rm',
'remove',
'whoami',
'secrets',
'logs',
'upgrade',
'teams',
'switch'
]),
get deploy() {
return req... | const mainCommands = new Set([
'help',
'list',
'remove',
'alias',
'domains',
'dns',
'certs',
'secrets',
'billing',
'upgrade',
'teams',
'logs',
'scale',
'logout',
'whoami'
])
const aliases = {
list: ['ls'],
remove: ['rm'],
alias: ['ln', 'aliases'],
domains: ['domain'],
certs: ['c... | Support for all aliases added | Support for all aliases added
| JavaScript | apache-2.0 | zeit/now-cli,zeit/now-cli,zeit/now-cli,zeit/now-cli,zeit/now-cli,zeit/now-cli,zeit/now-cli |
d1709007440080cc4b1ced6dbebe0096164f15fb | model/file.js | model/file.js | 'use strict';
var memoize = require('memoizee/plain')
, validDb = require('dbjs/valid-dbjs')
, defineFile = require('dbjs-ext/object/file')
, defineJpegFile = require('dbjs-ext/object/file/image-file/jpeg-file')
, docMimeTypes = require('../utils/microsoft-word-doc-mime-types');
module.exp... | 'use strict';
var memoize = require('memoizee/plain')
, validDb = require('dbjs/valid-dbjs')
, defineFile = require('dbjs-ext/object/file')
, defineJpegFile = require('dbjs-ext/object/file/image-file/jpeg-file')
, docMimeTypes = require('../utils/microsoft-word-doc-mime-types');
module.exp... | Add File methods for proper JSON snapshots | Add File methods for proper JSON snapshots
| JavaScript | mit | egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations |
f1c0c236e8b6d3154781c9f30f91b3eae59b60e4 | region-score-lead.meta.js | region-score-lead.meta.js | // ==UserScript==
// @id iitc-plugin-region-score-lead@hansolo669
// @name IITC plugin: region score lead
// @category Tweaks
// @version 0.2.3
// @namespace https://github.com/hansolo669/iitc-tweaks
// @updateURL https://iitc.reallyawesomedomain.com/region-score-lead.meta.j... | // ==UserScript==
// @id iitc-plugin-region-score-lead@hansolo669
// @name IITC plugin: region score lead
// @category Tweaks
// @version 0.2.4
// @namespace https://github.com/hansolo669/iitc-tweaks
// @updateURL https://iitc.reallyawesomedomain.com/region-score-lead.meta.j... | Fix for intel routing changes | Fix for intel routing changes | JavaScript | mit | hansolo669/iitc-tweaks,hansolo669/iitc-tweaks |
85db50188bcf660bdf83fc09c0c50eed9f0433c4 | test/index.js | test/index.js | 'use strict';
var assert = require('assert');
var chromedriver = require('chromedriver');
var browser = require('../');
chromedriver.start();
browser.remote('http://localhost:9515/').timeout('60s').operationTimeout('20s');
after(function () {
chromedriver.stop();
});
var getHeadingText = browser.async(function* (b... | 'use strict';
var assert = require('assert');
var chromedriver = require('chromedriver');
var browser = require('../');
var LOCAL = !process.env.CI;
if (LOCAL) {
chromedriver.start();
browser.remote('http://localhost:9515/').timeout('60s').operationTimeout('5s');
after(function () {
chromedriver.stop();
... | Support CI using sauce labs | Support CI using sauce labs
| JavaScript | mit | ForbesLindesay/selenium-mocha |
67ad246f902b2c04a426d16d5fe877ffa1fee5d0 | tests/integration/angular-meteor-session-spec.js | tests/integration/angular-meteor-session-spec.js | describe('$meteorSession service', function () {
var $meteorSession,
$rootScope,
$scope;
beforeEach(angular.mock.module('angular-meteor'));
beforeEach(angular.mock.inject(function(_$meteorSession_, _$rootScope_) {
$meteorSession = _$meteorSession_;
$rootScope = _$rootScope_;
$scope = $ro... | describe('$meteorSession service', function () {
var $meteorSession,
$rootScope,
$scope;
beforeEach(angular.mock.module('angular-meteor'));
beforeEach(angular.mock.inject(function(_$meteorSession_, _$rootScope_) {
$meteorSession = _$meteorSession_;
$rootScope = _$rootScope_;
$scope = $ro... | Add test for $meteorSession service to support scope variable nested property | Add test for $meteorSession service to support scope variable nested property
| JavaScript | mit | IgorMinar/angular-meteor,omer72/angular-meteor,IgorMinar/angular-meteor,zhoulvming/angular-meteor,dszczyt/angular-meteor,craigmcdonald/angular-meteor,divramod/angular-meteor,aleksander351/angular-meteor,thomkaufmann/angular-meteor,Urigo/angular-meteor,Unavi/angular-meteor,manhtuongbkhn/angular-meteor,dszczyt/angular-me... |
67567c4809789b1896b470c621085125450cf845 | src/renderer/ui/components/generic/PlatformSpecific.js | src/renderer/ui/components/generic/PlatformSpecific.js | import { Component, PropTypes } from 'react';
import os from 'os';
import semver from 'semver';
export const semverValidator = (props, propName, componentName) => {
if (props[propName]) {
return semver.validRange(props[propName]) ? null : new Error(`${propName} in ${componentName} is not a valid semver string`);... | import { Component, PropTypes } from 'react';
import os from 'os';
import semver from 'semver';
const parsedOSVersion = semver.parse(os.release());
const osVersion = `${parsedOSVersion.major}.${parsedOSVersion.minor}.${parsedOSVersion.patch}`;
export const semverValidator = (props, propName, componentName) => {
if ... | Fix version tests on linux | Fix version tests on linux
| JavaScript | mit | petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL- |
0aad07073773a20898d950c649a7fa74b22497fc | Emix.Web/ngApp/emixApp.js | Emix.Web/ngApp/emixApp.js | angular.module('emixApp',
['ngRoute',
'emixApp.controllers',
'emixApp.directives',
'emixApp.services',
'mgcrea.ngStrap',
'ngMorris',
//'ngGoogleMap'
'pascalprecht.translate'
])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/das... | angular.module('emixApp',
['ngRoute',
'ngCookies',
'emixApp.controllers',
'emixApp.directives',
'emixApp.services',
'mgcrea.ngStrap',
'ngMorris',
'pascalprecht.translate'
])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/dashbo... | Allow translator plugin to store selected language in sessionStorage/cookie and remember the settings | Allow translator plugin to store selected language in sessionStorage/cookie and remember the settings
| JavaScript | mit | sierrodc/ASP.NET-MVC-AngularJs-Seed,sierrodc/ASP.NET-MVC-AngularJs-Seed,sierrodc/ASP.NET-MVC-AngularJs-Seed |
e42f8f09fa04b1893a96479e004f06fa964efc67 | test/assets/javascripts/specs/login-controller-spec.js | test/assets/javascripts/specs/login-controller-spec.js | 'use strict';
describe('Login controller', function () {
var scope;
var loginCtrl;
var $httpBackend;
beforeEach(module('todo.controllers'));
beforeEach(inject(function(_$httpBackend_, $controller, $rootScope) {
$httpBackend = _$httpBackend_;
scope = $rootScope.$new();
log... | 'use strict';
describe('Login controller', function () {
var scope;
var loginCtrl;
var $httpBackend;
beforeEach(module('todo.controllers'));
beforeEach(inject(function (_$httpBackend_, $controller, $rootScope) {
$httpBackend = _$httpBackend_;
scope = $rootScope.$new();
lo... | Fix login JS test to use SecureSocial endpoint. | Fix login JS test to use SecureSocial endpoint.
| JavaScript | mit | timothygordon32/reactive-todolist,timothygordon32/reactive-todolist |
62f676d0f493689dc877b12f9067c32179d81788 | app/events/routes.js | app/events/routes.js | var eventSource = require('express-eventsource'),
logger = require('radiodan-client').utils.logger('event-routes');
module.exports = function (app, eventBus, services) {
var eventStream = eventSource();
// Shared eventsource
// To send data call: eventStream.send(dataObj, 'eventName');
app.use('/', e... | var eventSource = require('express-eventsource'),
logger = require('radiodan-client').utils.logger('event-routes');
module.exports = function (app, eventBus, services) {
var eventStream = eventSource();
// Shared eventsource
// To send data call: eventStream.send(dataObj, 'eventName');
app.use('/', e... | Fix bug where volume changes not emitted to client through event stream | Fix bug where volume changes not emitted to client through event stream
| JavaScript | apache-2.0 | radiodan/magic-button,radiodan/magic-button |
78b046830969751e89f34683938a58154ec4ce1f | public/script/project.js | public/script/project.js | function sortProject(changeEvent) {
var data = {};
// Get old and new index from event
data.oldIndex = changeEvent.oldIndex;
data.newIndex = changeEvent.newIndex;
// Get filters
data.filters = {};
data.filters = getCurrentFilters();
// Get project id from event item
data.project... | function sortProject(changeEvent) {
var data = {};
// Get old and new index from event
data.oldIndex = changeEvent.oldIndex;
data.newIndex = changeEvent.newIndex;
// Get filters
data.filters = {};
data.filters = getCurrentFilters();
// Get project id from event item
data.project... | Clean up unfinished work + conflict | Clean up unfinished work + conflict
| JavaScript | mit | BBBThunda/projectify,BBBThunda/projectify,BBBThunda/projectify |
05975f56e6561e789dfb8fedaf4954cc751c787c | src/common.js | src/common.js | function findByIds(items, ids) {
return ids
.map((id) => {
return items.find((item) => item.id === id)
})
.filter((item) => item)
}
function findOneById(items, id) {
return items.find((item) => item.id === id)
}
function findOneByAliases(items, aliases) {
if (Array.isArray(aliases)) {
retu... | function findByIds(items, ids) {
return ids
.map((id) => {
return items.find((item) => item.id === id)
})
.filter((item) => item)
}
function findOneById(items, id) {
return items.find((item) => item.id === id)
}
function findOneByAliases(items, aliases) {
if (Array.isArray(aliases)) {
retu... | Add findOneByName for usage with nested names | Add findOneByName for usage with nested names
| JavaScript | isc | alex-shnayder/comanche |
10c8e31cfd598b8f736ba7cdc9d280b607b30042 | src/config.js | src/config.js | import * as FrontendPrefsOptions from './utils/frontend-preferences-options';
const config = {
api:{
host: 'http://localhost:3000',
sentinel: null // keep always last
},
auth: {
cookieDomain: 'localhost',
tokenPrefix: 'freefeed_',
userStorageKey: 'USER_KEY',
sentinel: null // keep always ... | import * as FrontendPrefsOptions from './utils/frontend-preferences-options';
const config = {
api:{
host: 'http://localhost:3000',
sentinel: null // keep always last
},
auth: {
cookieDomain: 'localhost',
tokenPrefix: 'freefeed_',
userStorageKey: 'USER_KEY',
sentinel: null // keep always ... | Change default value of displayname setting | Change default value of displayname setting
New default is: "Display name + username"
| JavaScript | mit | davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,kadmil/freefeed-react-client,davidmz/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client |
6d22dabca3b69a06fb8f3fdc11469b6da7641bfd | src/config.js | src/config.js | // = Server config =============================================================
export const port = 3000
export const enableGraphiQL = true;
export const logFile = 'store.log'
// = App config ================================================================
| // = Server config =============================================================
export const port = process.env.PORT || 3000
export const enableGraphiQL = true;
export const logFile = 'store.log'
// = App config ================================================================
| Add ability to define port as environment variable | Add ability to define port as environment variable
| JavaScript | mit | jukkah/comicstor |
30f2923409e548ccc4626278509ae158bae6d5e0 | web_clients/javascript_mvc/www/js/test/test-main.js | web_clients/javascript_mvc/www/js/test/test-main.js | var allTestFiles = [];
var TEST_REGEXP = /_test\.js$/i;
var pathToModule = function(path) {
return path.replace(/^\/base\/js\//, '..\/').replace(/\.js$/, '');
};
Object.keys(window.__karma__.files).forEach(function(file) {
if (TEST_REGEXP.test(file)) {
// Normalize paths to RequireJS module names.
allTest... | (function() {
'use strict';
var test_files, coverage_files;
function pathToModule(path) {
return path.replace(/^\/base\/js\//, '..\/').replace(/\.js$/, '');
};
// Configure require's paths
require.config({
baseUrl: '/base/js/vendor',
paths: {
jquery: 'jquery/jquery-2.1.1.min',
squire: 'squire/Squi... | Include all client files for coverage reporting | Include all client files for coverage reporting
Also: clean up test-main a bit from its original copypasta.
| JavaScript | mit | xaroth8088/tournament-of-lulz,xaroth8088/tournament-of-lulz,xaroth8088/tournament-of-lulz,xaroth8088/tournament-of-lulz |
32c4655b62a4edf005b4233ad8b0ce8718c10537 | client/templates/admin/posts/posts.js | client/templates/admin/posts/posts.js | Template.add_post.events({
'submit .add_post_form': function(){
var title = event.target.title.value;
var body - event.target.body.value;
// Insert the post
Posts.insert({
title: title,
body: body
});
FlashMessages.sendSucess('Post has been s... | Save post after submit the form | Save post after submit the form
| JavaScript | mit | pH-7/pH7Ortfolio,pH-7/pH7Ortfolio | |
637d929936c13fb6e5cb96630200df02f615b0a3 | client/templates/register/register.js | client/templates/register/register.js | Template.register.rendered = function () {
/*
* Reset form select field values
* to prevent an edge case bug for code push
* where accommodations value was undefined
*/
$('#age').val('');
$('#registration_type').val('');
$('#accommodations').val('');
$('#carbon-tax').val('');
};
Te... | Template.register.rendered = function () {
/*
* Reset form select field values
* to prevent an edge case bug for code push
* where accommodations value was undefined
*/
$('#age').val('');
$('#registration_type').val('');
$('#accommodations').val('');
$('#carbon-tax').val('');
};
Te... | Add donation field to calculation | Add donation field to calculation
| JavaScript | agpl-3.0 | quaker-io/pym-2015,quaker-io/pym-online-registration,quaker-io/pym-online-registration,quaker-io/pym-2015 |
0a0d0c90aab2d5cb50e67e11cac747342eda27ed | grunt/tasks/_browserify-bundles.js | grunt/tasks/_browserify-bundles.js | module.exports = {
'src-specs': {
src: [
'test/fail-tests-if-have-errors-in-src.js',
'test/spec/api/**/*',
'test/spec/core/**/*',
'test/spec/dataviews/**/*',
'test/spec/util/**/*',
'test/spec/geo/**/*',
'test/spec/ui/**/*',
'test/spec/vis/**/*',
'test/spec/win... | module.exports = {
'src-specs': {
src: [
'test/fail-tests-if-have-errors-in-src.js',
'test/spec/api/**/*',
'test/spec/core/**/*',
'test/spec/dataviews/**/*',
'test/spec/util/**/*',
'test/spec/geo/**/*',
'test/spec/ui/**/*',
'test/spec/vis/**/*',
'test/spec/win... | Add latest camshaft reference in the bundle | Add latest camshaft reference in the bundle
| JavaScript | bsd-3-clause | splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js |
791d07b503940051c19fc11187c67859c299b252 | src/patterns/autosubmit.js | src/patterns/autosubmit.js | define([
'../jquery/autosubmit'
], function(require) {
var autosubmit = {
initContent: function(root) {
$("[data-autosubmit]", root)
.find("input[type-search]").andSelf()
.patternAutosubmit();
}
};
return autosubmit;
});
// jshint indent: 4, b... | define([
'../jquery/autosubmit'
], function() {
var autosubmit = {
initContent: function(root) {
$("[data-autosubmit]", root)
.find("input[type-search]").andSelf()
.patternAutosubmit();
}
};
return autosubmit;
});
// jshint indent: 4, browser:... | Fix error in define call | Fix error in define call
| JavaScript | bsd-3-clause | Patternslib/require-experimental-build,Patternslib/Patterns-archive,Patternslib/Patterns-archive,Patternslib/Patterns-archive |
84e2ef62b1faff132d69ad3384be68fb364d86c9 | src/string.js | src/string.js | // =================================================================================================
// Core.js | String Functions
// (c) 2014 Mathigon / Philipp Legner
// =================================================================================================
(function() {
M.extend(String.prototype, {
... | // =================================================================================================
// Core.js | String Functions
// (c) 2014 Mathigon / Philipp Legner
// =================================================================================================
(function() {
M.extend(String.prototype, {
... | Fix String endsWith prototype shadowing | Fix String endsWith prototype shadowing
| JavaScript | mit | Mathigon/core.js |
a8d74088d41f2bb83336dc242d512193e743385a | components/home/events.js | components/home/events.js | import React from 'react'
import PropTypes from 'prop-types'
import Link from 'next/link'
import { translate } from 'react-i18next'
import Section from './section'
const Events = ({ t }) => (
<Section title={t('eventsSectionTitle')}>
<Link href='/events'>
<a>{t('eventsLink')}</a>
</Link>
<style j... | import React from 'react'
import PropTypes from 'prop-types'
import { translate } from 'react-i18next'
import Link from '../link'
import Section from './section'
const Events = ({ t }) => (
<Section title={t('eventsSectionTitle')}>
<Link href='/events'>
<a>{t('eventsLink')}</a>
</Link>
<style jsx... | Fix link to event page | Fix link to event page
| JavaScript | mit | sgmap/inspire,sgmap/inspire |
8bfcc293065a51f365fe574dcf168c3c10af98a6 | api/controllers/requestHandlers/handleSuggest.js | api/controllers/requestHandlers/handleSuggest.js | var elasticsearch = require('elasticsearch');
if (sails.config.useElastic === true) {
var CLIENT = new elasticsearch.Client({
host: sails.config.elasticHost,
log: sails.config.elasticLogLevel
})
}
module.exports = function(req, res) {
if (!CLIENT) {
return res.notFound()
}
... | var elasticsearch = require('elasticsearch');
if (sails.config.useElastic === true) {
var CLIENT = new elasticsearch.Client({
host: sails.config.elasticHost,
log: sails.config.elasticLogLevel
})
}
module.exports = function(req, res) {
if (!CLIENT) {
return res.notFound()
}
... | Allow searching for HPO term ID's and match only entries that contain all of the query words (instead of one of the query words). | Allow searching for HPO term ID's and match only entries that contain all of the query words (instead of one of the query words).
| JavaScript | mit | molgenis/gene-network,molgenis/gene-network |
cf4e0ba45bb8da2f44ea3eccee25f38b69479f45 | controllers/submission.js | controllers/submission.js | const Submission = require('../models/Submission');
const moment = require('moment');
/**
* GET /submissions
*/
exports.getSubmissions = (req, res) => {
const page = parseInt(req.query && req.query.page) || 0;
Submission
.find()
.sort({ _id: -1 })
.populate('user')
.populate('language')
.skip(500 * pag... | const Submission = require('../models/Submission');
const User = require('../models/User');
const moment = require('moment');
const Promise = require('bluebird');
/**
* GET /submissions
*/
exports.getSubmissions = (req, res) => {
Promise.try(() => {
if (req.query.author) {
return User.findOne({ email: `$... | Add author and status parameter | Add author and status parameter
| JavaScript | mit | hakatashi/esolang-battle,hakatashi/esolang-battle,hakatashi/esolang-battle |
221ed0e89bf69a169d1110788e0be3e2d10c49f0 | lib/node_modules/@stdlib/buffer/from-array/lib/index.js | lib/node_modules/@stdlib/buffer/from-array/lib/index.js | 'use strict';
/**
* Allocate a buffer using an octet array.
*
* @module @stdlib/buffer/from-array
*
* @example
* var array2buffer = require( '@stdlib/type/buffer/from-array' );
*
* var buf = array2buffer( [ 1, 2, 3, 4 ] );
* // returns <Buffer>
*/
// MODULES //
var hasFrom = require( './has_from.js' );
// MAIN //
... | 'use strict';
/**
* Allocate a buffer using an octet array.
*
* @module @stdlib/buffer/from-array
*
* @example
* var array2buffer = require( '@stdlib/type/buffer/from-array' );
*
* var buf = array2buffer( [ 1, 2, 3, 4 ] );
* // returns <Buffer>
*/
// MODULES //
var hasFrom = require( './has_from.js' );
var main = re... | Refactor to avoid dynamic module resolution | Refactor to avoid dynamic module resolution
| 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 |
3ac7f2a8044ad8febe16541e9b3683cf00fd1ae0 | components/search/result/thumbnail.js | components/search/result/thumbnail.js | import React from 'react'
import PropTypes from 'prop-types'
import { translate } from 'react-i18next'
import { GEODATA_API_URL } from '@env'
const Thumbnail = ({ recordId, thumbnails, t }) => {
const hasThumbnail = thumbnails && thumbnails.length > 0
const thumbnail = hasThumbnail
? `${GEODATA_API_URL}/recor... | import React from 'react'
import PropTypes from 'prop-types'
import { translate } from 'react-i18next'
import { GEODATA_API_URL } from '@env'
const Thumbnail = ({ recordId, thumbnails, t }) => {
const hasThumbnail = thumbnails && thumbnails.length > 0
const thumbnail = hasThumbnail
? `${GEODATA_API_URL}/recor... | Fix search result image sizes | Fix search result image sizes
| JavaScript | mit | sgmap/inspire,sgmap/inspire |
5591b4615ec9e88f448ad2a9f777c85e659bd0a0 | server/helpers/helpers.js | server/helpers/helpers.js | const handleError = (err, res) => {
switch (err.code) {
case 401:
return res.status(401).send(err.message);
case 404:
return res.status(404).send(err.message);
default:
return res.status(400).send(err);
}
};
const handleSuccess = (code, body, res) => {
switch (code) {
case 201:
... | const handleError = (err, res) => {
switch (err.code) {
case 401:
return res.status(401).json(err.message);
case 404:
return res.status(404).json(err.message);
default:
return res.status(400).json(err);
}
};
const handleSuccess = (code, body, res) => {
switch (code) {
case 201:
... | Refactor the helper methods to use json method instead of send method | Refactor the helper methods to use json method instead of send method
| JavaScript | mit | johadi10/PostIt,johadi10/PostIt |
c6335c604a1495d2526f6f395e429e065f9317af | test/endpoints/account.js | test/endpoints/account.js | 'use strict';
var assert = require('assert');
var sinon = require('sinon');
var Account = require('../../lib/endpoints/account');
var Request = require('../../lib/request');
describe('endpoints/account', function () {
describe('changePassword', function () {
it('should set the request URL', function () {... | 'use strict';
const assert = require('assert');
const sinon = require('sinon');
const Account = require('../../lib/endpoints/account');
const Request = require('../../lib/request');
describe('endpoints/account', () => {
describe('changePassword', () => {
it('should set the request URL', () => {
... | Rewrite Account tests to ES2015 | Rewrite Account tests to ES2015
| JavaScript | mit | jwilsson/glesys-api-node |
a151d88b94ee726f0450b93df5ede04124a81ded | packages/rendering/addon/-private/meta-for-field.js | packages/rendering/addon/-private/meta-for-field.js | export default function metaForField(content, fieldName) {
if (!content) { return; }
try {
return content.constructor.metaForProperty(fieldName);
} catch (err) {
return;
}
}
| import { camelize } from "@ember/string";
export default function metaForField(content, fieldName) {
if (!content) { return; }
fieldName = camelize(fieldName);
try {
return content.constructor.metaForProperty(fieldName);
} catch (err) {
return;
}
}
| Fix field editors not appearing for field names that contain dashes | Fix field editors not appearing for field names that contain dashes
| JavaScript | mit | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack |
8c8c3ef0efabbcf07ead714b3fb79f1f7ed81a41 | test/spec/test_captcha.js | test/spec/test_captcha.js | defaultConf = {
height: 100,
width: 300,
fingerprintLength: 20
};
describe("The constructor is supposed a proper Captcha object", function() {
it('Constructor Captcha exists', function(){
expect(Captcha).toBeDefined();
});
var captcha = new Captcha();
it("Captcha object is not null"... | defaultConf = {
height: 100,
width: 300,
fingerprintLength: 20
};
describe("The constructor is supposed a proper Captcha object", function() {
it('Constructor Captcha exists', function(){
expect(Captcha).toBeDefined();
});
var captcha = new Captcha();
it("Captcha object is not null"... | Add one more test and it fails | Add one more test and it fails
| JavaScript | mit | sonjahohlfeld/Captcha-Generator,sonjahohlfeld/Captcha-Generator |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.