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 |
|---|---|---|---|---|---|---|---|---|---|
90d29f9b4968cb4b3f2175847954cb76bee9825b | app/selectors/containers/searchPageSelector.js | app/selectors/containers/searchPageSelector.js | import { createSelector } from 'reselect';
import ActionTypes from 'constants/ActionTypes';
import searchFiltersSelector from 'selectors/searchFiltersSelector';
import searchResultsSelector from 'selectors/searchResultsSelector';
import requestIsActiveSelectorFactory from 'selectors/factories/requestIsActiveSelectorFa... | import { createSelector } from 'reselect';
import ActionTypes from 'constants/ActionTypes';
import searchFiltersSelector from 'selectors/searchFiltersSelector';
import searchResultsSelector from 'selectors/searchResultsSelector';
import requestIsActiveSelectorFactory from 'selectors/factories/requestIsActiveSelectorFa... | Fix search page loading spinner | Fix search page loading spinner
| JavaScript | mit | fastmonkeys/respa-ui |
94a36fed0967ce47563c8b7b0dd31261bc4253e4 | data/bouquets-data.js | data/bouquets-data.js | const Basedata = require('./base-data');
const BouquetModel = require('./models/bouquete-model');
class BouquetsData extends Basedata {
constructor(db) {
super(db, BouquetModel, BouquetModel);
}
}
module.exports = BouquetsData;
| const Basedata = require('./base-data');
const BouquetModel = require('./models/bouquete-model');
class BouquetsData extends Basedata {
constructor(db) {
super(db, BouquetModel, BouquetModel);
}
// override base
create(bouqueteModel) {
bouqueteModel.dateCreated = new Date();
bo... | Set new properties on bouquets | Set new properties on bouquets
| JavaScript | mit | viktoria-flowers/ViktoriaFlowers,viktoria-flowers/ViktoriaFlowers |
b3972a05472f510278dbd5d94e95bde4ae14e6cc | packages/vulcan-admin/lib/modules/fragments.js | packages/vulcan-admin/lib/modules/fragments.js | import { registerFragment } from 'meteor/vulcan:lib';
// ------------------------------ Vote ------------------------------ //
// note: fragment used by default on the UsersProfile fragment
registerFragment(`
fragment UsersAdmin on User {
_id
username
createdAt
isAdmin
displayName
email
... | import { registerFragment } from 'meteor/vulcan:lib';
// ------------------------------ Vote ------------------------------ //
// note: fragment used by default on the UsersProfile fragment
registerFragment(`
fragment UsersAdmin on User {
_id
username
createdAt
isAdmin
displayName
email
... | Add pageUrl and pagePath to user fragment; | Add pageUrl and pagePath to user fragment;
| JavaScript | mit | VulcanJS/Vulcan,VulcanJS/Vulcan |
3b2be9fe350de22a5a4e466287dade2ab983c9ac | lib/component.js | lib/component.js | !function(exports) {
'use strict';
var RunQueue = exports.RunQueue;
function Component() {
this.next = new RunQueue;
this.end = new RunQueue;
}
Component.extend = function(constructorFn) {
var scope = this;
if(!constructorFn) constructorFn = function() { scope.call(this); };
constructo... | !function(exports) {
'use strict';
var RunQueue = exports.RunQueue;
function Component() {
this.next = new RunQueue;
this.end = new RunQueue;
}
Component.extend = function(constructorFn) {
var prop, scope = this;
if(!constructorFn) constructorFn = function() { scope.call(this); };
cons... | Include class methods in extend() | [FIX] Include class methods in extend()
| JavaScript | mit | reissbaker/gamekernel,reissbaker/gamekernel |
7bca0c33e145e79e368f0a2dd216ea424130c312 | installer/app/src/router.js | installer/app/src/router.js | import Router from 'marbles/router';
import WizardComponent from './views/wizard';
import Dispatcher from './dispatcher';
var MainRouter = Router.createClass({
routes: [
{ path: '', handler: 'landingPage' },
{ path: '/install/:install_id', handler: 'landingPage' }
],
willInitialize: function () {
Dispatcher.... | import Router from 'marbles/router';
import WizardComponent from './views/wizard';
import Dispatcher from './dispatcher';
var MainRouter = Router.createClass({
routes: [
{ path: '', handler: 'landingPage' },
{ path: '/install/:install_id', handler: 'landingPage' }
],
willInitialize: function () {
Dispatcher.... | Use replaceState for updating the URL | installer: Use replaceState for updating the URL
Disables back button. The other option is to allow navigating between
steps using the browser's back/forward, but that overlaps with the
current behaviour of picking up an existing install process using the
base URL. This is a temporary fix and will be revisited soon.
... | JavaScript | bsd-3-clause | Brandywine2161/flynn,felixrieseberg/flynn,benbjohnson/flynn,whouses/flynn,shads196770/flynn,lmars/flynn,ozum/flynn,rikur/flynn,tonicbupt/flynn,josephglanville/flynn,arekkas/flynn,josephglanville/flynn,ozum/flynn,benbjohnson/flynn,jzila/flynn,rikur/flynn,schatt/flynn,kgrz/flynn,shads196770/flynn,GrimDerp/flynn,justintun... |
413d998e9a23cf6dea7653a87fef26e52773a622 | client/core/collaborators.js | client/core/collaborators.js | define([
'hr/utils',
'hr/hr',
'collections/users'
], function (_, hr, Users) {
// Collection for all current collaborators
var collaborators = new Users();
return collaborators;
}); | define([
'hr/utils',
'hr/hr',
'collections/users',
'utils/alerts'
], function (_, hr, Users, alerts) {
// Collection for all current collaborators
var collaborators = new Users();
collaborators.on("add", function(user) {
alerts.show(user.get("name")+" just joined the workspace", 500... | Add alert message when users joined and left the workspace | Add alert message when users joined and left the workspace
| JavaScript | apache-2.0 | nobutakaoshiro/codebox,CodeboxIDE/codebox,nobutakaoshiro/codebox,Ckai1991/codebox,rodrigues-daniel/codebox,rajthilakmca/codebox,lcamilo15/codebox,code-box/codebox,etopian/codebox,kustomzone/codebox,smallbal/codebox,kustomzone/codebox,quietdog/codebox,ahmadassaf/Codebox,ronoaldo/codebox,rodrigues-daniel/codebox,Ckai1991... |
39a25f48ec2728f756ae65836d51f15ff7c0f866 | examples/public/examples.js | examples/public/examples.js |
$(function () {
(function fixControlsLength () {
$('.form-group').each(function (index) {
$('.control-label', this)
.addClass('col-xs-4').css({'text-align':'right'})
.next().addClass('col-xs-5')
.next().addClass('col-xs-3');
});
... |
$(function () {
(function disableLinks () {
$('.navbar-brand, .breadcrumb a, #controls .btn, footer .text-muted').on('click', function (e) {
return false;
});
}());
if (!(window.location != window.parent.location)) return;
(function fixControlsLength () {
$('.... | Disable bootstrap responsive only inside an iframe | Disable bootstrap responsive only inside an iframe
| JavaScript | mit | simov/express-admin-site |
54f3ce25289725244ff7945559223c7d9cd12cca | src/app/lobby/lobby.controller.js | src/app/lobby/lobby.controller.js | class LobbyController {
constructor($scope, $log, $location, GameService, SocketService) {
'ngInject';
this.$log = $log;
this.$scope = $scope;
this.GameService = GameService;
this.SocketService = SocketService;
this.game_id = GameService.game_id;
this.password = GameService.roomName;
... | class LobbyController {
constructor(_, $scope, toastr, $log, $location, GameService, SocketService) {
'ngInject';
this._ = _;
this.$log = $log;
this.$scope = $scope;
this.toastr = toastr;
this.GameService = GameService;
this.SocketService = SocketService;
this.game_id = GameService.g... | Modify players list when player disconnects | Modify players list when player disconnects
| JavaScript | mit | hendryl/Famous-Places-Web,hendryl/Famous-Places-Web |
36d6a9c69feb8b13289c8f15ab517a0667b60fdb | addons/storyshots/storyshots-core/src/index.js | addons/storyshots/storyshots-core/src/index.js | import Stories2SnapsConverter from './Stories2SnapsConverter';
import api from './api';
export * from './test-bodies';
export { Stories2SnapsConverter };
export default api;
| import Stories2SnapsConverter from './Stories2SnapsConverter';
import api from './api';
import {
snapshotWithOptions,
multiSnapshotWithOptions,
renderOnly,
renderWithOptions,
shallowSnapshot,
snapshot,
} from './test-bodies';
export {
Stories2SnapsConverter,
snapshotWithOptions,
multiSnapshotWithOpti... | Change "export * from x" to manually importing and exporting named exports. | Change "export * from x" to manually importing and exporting named exports.
| JavaScript | mit | storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook |
118261e590c58a5c69daced92aae03144a98500b | frappe/public/js/frappe/form/controls/html.js | frappe/public/js/frappe/form/controls/html.js | frappe.ui.form.ControlHTML = frappe.ui.form.Control.extend({
make: function() {
this._super();
this.disp_area = this.wrapper;
},
refresh_input: function() {
var content = this.get_content();
if(content) this.$wrapper.html(content);
},
get_content: function() {
return this.df.options || "";
},
html: fun... | frappe.ui.form.ControlHTML = frappe.ui.form.Control.extend({
make: function() {
this._super();
this.disp_area = this.wrapper;
this.frm.$wrapper.on('blur change', () => {
setTimeout(() => this.refresh_input(), 500);
});
},
refresh_input: function() {
var content = this.get_content();
if(content) this.$... | Enable using templates inside ControlHTML | Enable using templates inside ControlHTML
This change would enable showing computed data based on other fields in the same doc, without storing the computed data (which avoid unnecessary redundancy).
| JavaScript | mit | yashodhank/frappe,manassolanki/frappe,paurosello/frappe,frappe/frappe,neilLasrado/frappe,tmimori/frappe,vjFaLk/frappe,RicardoJohann/frappe,saurabh6790/frappe,ESS-LLP/frappe,mhbu50/frappe,ESS-LLP/frappe,mhbu50/frappe,almeidapaulopt/frappe,almeidapaulopt/frappe,mbauskar/frappe,tundebabzy/frappe,yashodhank/frappe,yashodha... |
85b2d4790c23204545d0c12d145b6aea1e0f408d | server/app.js | server/app.js |
/**
* Module dependencies.
*/
var express = require('express');
var path = require('path');
var api = require('./lib/api');
var app = module.exports = express();
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.use(express.logger('dev'));
app.use(express.bod... |
/**
* Module dependencies.
*/
var express = require('express');
var path = require('path');
var api = require('./lib/api');
var app = module.exports = express();
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.use(express.logger('dev'));
app.use(express.bod... | Add a catch-all route to the server, which converts non-hash routes into hashed routes. | Add a catch-all route to the server, which converts non-hash routes into hashed routes.
| JavaScript | mit | brettshollenberger/rootstrikers,brettshollenberger/rootstrikers |
93664c46cc6d4c98ba1143016df5915d685a1c5a | web_external/views/widgets/DatasetInfoWidget.js | web_external/views/widgets/DatasetInfoWidget.js | import View from '../view';
import template from '../../templates/widgets/datasetInfoWidget.pug';
import '../../stylesheets/widgets/datasetInfoWidget.styl';
/**
* This widget is used to diplay minerva metadata for a dataset.
*/
const DatasetInfoWidget = View.extend({
initialize: function (settings) {
this.d... | import View from '../view';
import template from '../../templates/widgets/datasetInfoWidget.pug';
import '../../stylesheets/widgets/datasetInfoWidget.styl';
/**
* This widget is used to diplay minerva metadata for a dataset.
*/
const DatasetInfoWidget = View.extend({
initialize: function (settings) {
this.d... | Make the query of dataset name more reliable on different kind datasets | Make the query of dataset name more reliable on different kind datasets
Some datasets are created at runtime, so it could be missing fields
Also prepare for dataset rename feature
| JavaScript | apache-2.0 | Kitware/minerva,Kitware/minerva,Kitware/minerva |
91faa0f9e1e9d211b7be72b254b18578d2bdb3b3 | www/timelines.js | www/timelines.js | function load_timelines() {
$.getJSON('/time_series.json',function(data) {
var options = {
xaxis: {
mode: "time"
},
series: {
points: {
show: "true"
},
lines: {
show: "true"
}
},
grid: {
},
yaxis: {
min: ... | var wd;
function load_timelines() {
load_timelines_watermark();
}
function load_timelines_watermark() {
$.getJSON('/watermark.json', function(data) {
wd = data;
load_time_series();
}
}
function load_time_series() {
$.getJSON('/time_series.json',function(data) {
var options = {
xaxis: {
... | Refactor timeline support to load watermarks from json file | Refactor timeline support to load watermarks from json file
| JavaScript | mit | tdaede/awcy,tdaede/awcy,mdinger/awcy,tdaede/awcy,mdinger/awcy,tdaede/awcy,mdinger/awcy,tdaede/awcy,tdaede/awcy,mdinger/awcy,mdinger/awcy |
fe5bd0dedb1d5dba919bfe9f7b9aaa721e1598f9 | instance_introspection/static/src/js/tests.js | instance_introspection/static/src/js/tests.js | (function() {
'use strict';
openerp.Tour.register({
id: 'test_instance_introspection',
name: 'Complete a basic order trough the Front-End',
path: '/instance_introspection',
mode: 'test',
steps: [
{
title: 'Wait for the main screen',
... | (function() {
'use strict';
openerp.Tour.register({
id: 'test_instance_introspection',
name: 'Complete a basic order trough the Front-End',
path: '/instance_introspection',
mode: 'test',
steps: [
{
title: 'Wait for the main screen',
... | Test expecting results also since the begining | [IMP] Test expecting results also since the begining
| JavaScript | agpl-3.0 | vauxoo-dev/server-tools,vauxoo-dev/server-tools,vauxoo-dev/server-tools |
535e980c271e6e39514857c54189339a2cb7f70d | weckan/static/js/dataset.js | weckan/static/js/dataset.js | /**
* Dataset page specific features
*/
(function($, swig){
"use strict";
var COW_URL = $('link[rel="cow"]').attr('href'),
COW_API_URL = COW_URL + '/api/1/datasets/{name}/ranking';
$(function() {
var name = $('meta[name="dataset-name"]').attr('content'),
url = COW_API_URL.re... | /**
* Dataset page specific features
*/
(function($, swig){
"use strict";
var QUALITY_PRECISION = 2,
COW_URL = $('link[rel="cow"]').attr('href'),
COW_API_URL = COW_URL + '/api/1/datasets/{name}/ranking';
$(function() {
var name = $('meta[name="dataset-name"]').attr('content'),
... | Set quality precision at 2 digits and handle no weight case | Set quality precision at 2 digits and handle no weight case
| JavaScript | agpl-3.0 | etalab/weckan,etalab/weckan |
4b5444a909d064ec2b8fb1e237001152816b3403 | imports/api/collections/posts/publications.js | imports/api/collections/posts/publications.js | import { Meteor } from 'meteor/meteor';
import { Posts } from '../';
Meteor.publish('posts', () => Posts.find({}, { limit: 10 }));
| import { Meteor } from 'meteor/meteor';
import { Posts, Comments } from '../';
Meteor.publishComposite('posts', (limit = 10) => {
return {
find() {
return Posts.find({}, {
limit,
sort: {
createdAt: -1,
},
});
},
children: [
{
find(post) {
... | Join comments on posts publication | Join comments on posts publication
| JavaScript | apache-2.0 | evancorl/portfolio,evancorl/skate-scenes,evancorl/skate-scenes,evancorl/skate-scenes,evancorl/portfolio,evancorl/portfolio |
ae1cbbc68890a64279ba3a17ba61d8b24cdb0d2d | src/components/HomePage.js | src/components/HomePage.js | /**
* Created by farid on 8/16/2017.
*/
import React, {Component} from "react";
import Category from "./Category";
import {getCategories} from "../actions/Category";
import {connect} from "react-redux";
export class HomePage extends Component {
componentDidMount() {
this.props.getCategories();
}
... | /**
* Created by farid on 8/16/2017.
*/
import React, {Component} from "react";
import Category from "./Category";
import {getCategories} from "../actions/Category";
import {connect} from "react-redux";
export class HomePage extends Component {
componentDidMount() {
this.props.getCategories();
}
... | Add key iterator for categories map | fix: Add key iterator for categories map
| JavaScript | mit | faridsaud/udacity-readable-project,faridsaud/udacity-readable-project |
0a6a8623a2ba76e88718fb733b6f87fffca58dda | src/components/HomeView.js | src/components/HomeView.js | import React, { Component } from 'react';
import { Link } from 'react-router';
class HomeView extends Component {
render() {
return (
<div>
<Link to={"v/1"}>Video Link</Link>
</div>
);
}
}
export default HomeView;
| import React, { Component } from 'react';
import { Link } from 'react-router';
class HomeView extends Component {
constructor() {
super();
this.state = {
videos: ["hello", "world"]
};
}
render() {
return (
<div>
{this.state.videos.map((video, index) => (
<Link to=... | Work on Home view links | Work on Home view links
| JavaScript | mit | mg4tv/mg4tv-web,mg4tv/mg4tv-web |
fba75bcb6bd371d42a22bbe09a34c11631233b21 | modules/roles.js | modules/roles.js | "use strict";
/*Their structure is different because
of how the commands to use them are invoked.*/
module.exports = {
"elevated": {
"80773161284538368": "Admins",
"80773196516700160": "Mods"
},
"user_assignable": {
"Coders" : "229748381159915520",
"Techies": "229748333114163... | "use strict";
/*Their structure is different because
of how the commands to use them are invoked.*/
module.exports = {
"elevated": {
"80773161284538368": "Admins",
"80773196516700160": "Mods"
},
"user_assignable": {
"Coders" : "229748381159915520",
"Techies": "229748333114163... | Add support for WoW assigning guild | Add support for WoW assigning guild | JavaScript | mit | izy521/Sera-PCMR |
47034634668b0baea5cb0b13a88d2172e7e5a8ac | public/main.js | public/main.js | define(['jquery', 'underscore', 'pullManager', 'appearanceManager', 'module', 'PullFilter', 'ElementFilter', 'Column', 'ConnectionManager'],
function($, _, pullManager, appearanceManager, module, PullFilter, ElementFilter, Column, ConnectionManager) {
var spec = View;
var globalPullFilter = new PullFilter(spec... | define(['jquery', 'underscore', 'pullManager', 'PullFilter', 'ElementFilter', 'Column', 'ConnectionManager', 'bootstrap'],
// Note that not all of the required items above are represented in the function argument list. Some just need to be loaded, but that's all.
function($, _, pullManager, PullFilter, ElementFilter, ... | Change requirements to reflect reality | Change requirements to reflect reality
* Add `bootstrap` so the scripts get loaded
* Remove `module` and `appearanceManager` because they aren't used any more
* Stop providing variables in function with modules that are only loaded
for side effects
| JavaScript | mit | iFixit/pulldasher,iFixit/pulldasher,iFixit/pulldasher,iFixit/pulldasher |
0fdd418274a18fa954510053fd34c4730d2c7267 | lib/preload/redir-stdout.js | lib/preload/redir-stdout.js | 'use strict'
const fs = require('fs')
process.stdout.write = ((write) => (chunk, encoding, cb) => {
if (typeof chunk !== 'string' && !(chunk instanceof Buffer)) {
throw new TypeError(
'Invalid data, chunk must be a string or buffer, not ' + typeof chunk);
}
if (typeof encoding === 'function') {
cb =... | 'use strict'
const net = require('net')
const socket = new net.Socket({
fd: 3,
readable: false,
writable: true
})
Object.defineProperty(process, 'stdout', {
configurable: true,
enumerable: true,
get: () => socket
})
| Change process.stdout switcharoo to a full net.Socket instance | Change process.stdout switcharoo to a full net.Socket instance
No matter how you write to stdout, this should catch it!
The `defineProperty` call uses the same options as the default `process.stdout`.
| JavaScript | mit | davidmarkclements/0x |
a4f4dd98a2b78ed66af02761d33ebbc8dd5e516d | src/shared/components/libs/ExperimentImages.js | src/shared/components/libs/ExperimentImages.js | import React from "react";
class ExperimentImages extends React.Component {
constructor() {
super();
}
render() {
let imageDiv = this.props.images.map(url => {
return (<a href={url} target="_blank"><img src={url} alt="experiment image"/></a>)
});
return (
... | import React from "react";
class ExperimentImages extends React.Component {
constructor() {
super();
}
render() {
let imageDiv = null;
if(this.props.images) {
imageDiv = this.props.images.map(url => {
return (<a href={url} target="_blank"><img src={url... | Fix undefined this.props.images. Change between experiments will be smoother | Fix undefined this.props.images.
Change between experiments will be smoother
| JavaScript | mit | olavvatne/ml-monitor |
763e473a5fc126fdbb5d0cf666683c8d9d869e7c | lib/model/classes/StyleSheetExtension.js | lib/model/classes/StyleSheetExtension.js | var props = require("../properties/all.js");
var BaseObj = require("../BaseObj");
var obj = BaseObj.create("XWiki.StyleSheetExtension");
obj.addProp("name", props.XString.create({
"prettyName": "Name",
"size": "30"
}));
obj.addProp("code", props.TextArea.create({
"prettyName": "Code"
}));
obj.addProp("use", prop... | var props = require("../properties/all.js");
var BaseObj = require("../BaseObj");
var obj = BaseObj.create("XWiki.StyleSheetExtension");
obj.addProp("cache", props.StaticList.create({
"prettyName": "Caching policy",
"values": "long|short|default|forbid"
}));
obj.addProp("code", props.TextArea.create({
"prettyNam... | Reorder property to keep XWiki order | Reorder property to keep XWiki order
| JavaScript | agpl-3.0 | xwiki-contrib/node-xwikimodel |
32a7a99b61968f88f1d62c98275b755f3990d1a9 | src/styles/Images/assets/index.js | src/styles/Images/assets/index.js | export default {
BackgroundsPlus: require("./backgrounds-plus.jpg")
};
| import React from "react";
import Image from "../../../components/Image"
export const BackgroundsPlus = p => <Image {...p} src={require("./backgrounds-plus.jpg")} /> | Deploy to GitHub pages | Deploy to GitHub pages [ci skip]
| JavaScript | mit | tutti-ch/react-styleguide,tutti-ch/react-styleguide |
b8b145fee10b51f99deefc86001fa745cc2e96da | test/resourceful-webhooks-test.js | test/resourceful-webhooks-test.js | var http = require('http'),
assert = require('assert'),
cb = require('assert-called'),
resourceful = require('resourceful');
require('../');
var PORT = 8123,
gotCallbacks = 0;
function maybeEnd() {
if (++gotCallbacks === 2) {
server.close();
}
}
var server = http.createServer(function (req, ... | var http = require('http'),
assert = require('assert'),
cb = require('assert-called'),
resourceful = require('resourceful');
require('../');
var PORT = 8123,
gotCallbacks = 0;
function maybeEnd() {
if (++gotCallbacks === 2) {
server.close();
}
}
var server = http.createServer(function (req, ... | Add a failing test for `content-type` header | [test] Add a failing test for `content-type` header
| JavaScript | mit | mmalecki/resourceful-webhooks,mmalecki/resourceful-webhooks |
b8424424ae7e46f2b0fbc36d16a8a1d41f6e66c5 | src/scripts/scanRepliesAndNotify.js | src/scripts/scanRepliesAndNotify.js | import lib from './lib';
import redis from 'src/lib/redisClient';
import addTime from 'date-fns/add';
import Client from 'src/database/mongoClient';
export default async function scanRepliesAndNotify() {
const timeOffset = JSON.parse(process.env.REVIEW_REPLY_BUFFER) || {};
const lastScannedAt =
(await redis.ge... | import lib from './lib';
import redis from 'src/lib/redisClient';
import rollbar from 'src/lib/rollbar';
import addTime from 'date-fns/add';
import Client from 'src/database/mongoClient';
export default async function scanRepliesAndNotify() {
const timeOffset = JSON.parse(process.env.REVIEW_REPLY_BUFFER) || {};
co... | Add error handler and send error to rollbar | Add error handler and send error to rollbar
| JavaScript | mit | cofacts/rumors-line-bot,cofacts/rumors-line-bot,cofacts/rumors-line-bot |
660dc74cef1a6a3f7da701b57e9f3f71ccd6bb57 | app/js/arethusa.core/directives/sentence_list.js | app/js/arethusa.core/directives/sentence_list.js | "use strict";
angular.module('arethusa.core').directive('sentenceList', [
'$compile',
'navigator',
function($compile, navigator) {
return {
restrict: 'A',
scope: true,
link: function(scope, element, attrs) {
scope.n = navigator;
function createList() {
// We want ... | "use strict";
angular.module('arethusa.core').directive('sentenceList', [
'$compile',
'navigator',
function($compile, navigator) {
return {
restrict: 'A',
scope: true,
link: function(scope, element, attrs) {
scope.n = navigator;
function createList() {
// We want ... | Make sentenceList scrollable at all times | Make sentenceList scrollable at all times
| JavaScript | mit | alpheios-project/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa |
dddad05c90b4772a3f4b8c73b5223e044aa65872 | app/views/emailConfirmation/emailConfirmation.js | app/views/emailConfirmation/emailConfirmation.js | angular.module("ccj16reg.view.emailConfirmation", ["ngRoute", "ngMaterial", "ccj16reg.registration"])
.config(function($routeProvider) {
"use strict";
$routeProvider.when("/confirmpreregistration", {
templateUrl: "views/emailConfirmation/emailConfirmation.html",
controller: "EmailConfirmationCtrl",
});
})
.con... | angular.module("ccj16reg.view.emailConfirmation", ["ngRoute", "ngMaterial", "ccj16reg.registration"])
.config(function($routeProvider) {
"use strict";
$routeProvider.when("/confirmpreregistration", {
templateUrl: "views/emailConfirmation/emailConfirmation.html",
controller: "EmailConfirmationCtrl",
});
})
.con... | Remove unnecessary $mdDialog from the EmailConfirmationCtrl. | Remove unnecessary $mdDialog from the EmailConfirmationCtrl.
| JavaScript | agpl-3.0 | CCJ16/registration,CCJ16/registration,CCJ16/registration |
a0ec4aae2d9b4e07f281d49235d11543ffb9066f | cli.js | cli.js | #! /usr/bin/env node
const args = process.argv
const command = args[2]
const config = {
app_dir: process.env.HOME + '/.stay'
}
if (!command) {
require('./cli/help')(args, config)
process.exit(1)
}
try {
require('./cli/' + command)(args, config)
} catch (err) {
console.log(err)
if (err.code === 'MODULE_N... | #! /usr/bin/env node
const fs = require('fs')
const args = process.argv
const command = args[2]
const config = {
app_dir: process.env.HOME + '/.stay'
}
try {
fs.accessSync(config.app_dir, fs.F_OK)
} catch (e) {
const mkdirp = require('mkdirp')
mkdirp.sync(config.app_dir)
}
if (!command) {
require('./cli/h... | Initialize config only if not exists | Initialize config only if not exists
| JavaScript | mit | EverythingStays/stay-cli,EverythingStays/stay-cli |
b9835c9a26829fd36917d16a1a6813f9d54e9d3f | client/app/scripts/services/googleMapsService.js | client/app/scripts/services/googleMapsService.js | angular
.module('app')
.factory('googleMapsService', ['$rootScope', '$q',
function($rootScope, $q) {
/*
// Load the Google Maps scripts Asynchronously
(function(d){
var js, id = 'google-maps', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
... | angular
.module('app')
.factory('googleMapsService', ['$rootScope', '$q',
function($rootScope, $q) {
var methods = {};
methods.geo = function(address, type) {
var geocoder = new google.maps.Geocoder();
var geoData = {};
var han... | Make the digestion of the google geo result standardized | Make the digestion of the google geo result standardized
| JavaScript | mit | brettshollenberger/mrl001,brettshollenberger/mrl001 |
2d3954d279f686187369dfeb673f49f6dd050988 | lib/server/server_router.js | lib/server/server_router.js | var connect = Npm.require('connect');
var Fiber = Npm.require('fibers');
var root = global;
var connectHandlers
, connect;
if (typeof __meteor_bootstrap__.app !== 'undefined') {
connectHandlers = __meteor_bootstrap__.app;
} else {
connectHandlers = WebApp.connectHandlers;
}
ServerRouter = RouterUtils.extend(I... | var connect = Npm.require('connect');
var Fiber = Npm.require('fibers');
var root = global;
var connectHandlers
, connect;
if (typeof __meteor_bootstrap__.app !== 'undefined') {
connectHandlers = __meteor_bootstrap__.app;
} else {
connectHandlers = WebApp.connectHandlers;
}
ServerRouter = RouterUtils.extend(I... | Allow apps to kill the server router. | Allow apps to kill the server router. | JavaScript | mit | Aaron1992/iron-router,Sombressoul/iron-router,leoetlino/iron-router,abhiaiyer91/iron-router,Aaron1992/iron-router,assets1975/iron-router,TechplexEngineer/iron-router,Hyparman/iron-router,jg3526/iron-router,tianzhihen/iron-router,jg3526/iron-router,firdausramlan/iron-router,iron-meteor/iron-router,DanielDornhardt/iron-r... |
d58e398584d35be2ff852d241dbdd0af439f5716 | packages/truffle-core/index.js | packages/truffle-core/index.js | var pkg = require("./package.json");
module.exports = {
build: require("./lib/build"),
create: require("./lib/create"),
compiler: require("truffle-compile"),
config: require("./lib/config"),
console: require("./lib/repl"),
contracts: require("./lib/contracts"),
require: require("truffle-require"),
init... | var pkg = require("./package.json");
module.exports = {
build: require("./lib/build"),
create: require("./lib/create"),
config: require("./lib/config"),
console: require("./lib/repl"),
contracts: require("./lib/contracts"),
init: require("./lib/init"),
package: require("./lib/package"),
serve: require(... | Remove references to items that have been pulled out into their own modules. | Remove references to items that have been pulled out into their own
modules.
| JavaScript | mit | ConsenSys/truffle |
326466c2a866cd27749d6d5561f23b674840fd67 | packages/jest-environment-enzyme/src/setup.js | packages/jest-environment-enzyme/src/setup.js | /* eslint-disable global-require */
export const exposeGlobals = () => {
let dep;
switch (global.enzymedepDescriptor) {
case 'react13':
dep = 'enzyme-adapter-react-13';
break;
case 'react14':
dep = 'enzyme-adapter-react-14';
break;
case 'react15':
dep = 'enzyme-adapter-rea... | /* eslint-disable global-require */
// eslint-disable-next-line import/prefer-default-export
export const exposeGlobals = () => {
let dep;
switch (global.enzymeAdapterDescriptor) {
case 'react13':
dep = 'enzyme-adapter-react-13';
break;
case 'react14':
dep = 'enzyme-adapter-react-14';
... | Use correct global when resolving enzymeAdapter | fix: Use correct global when resolving enzymeAdapter
| JavaScript | mit | blainekasten/enzyme-matchers |
7d8efe71af7abf4bc21f400fd06bc3f2247be4c1 | centreon-frontend/centreon-ui/src/Title/index.js | centreon-frontend/centreon-ui/src/Title/index.js | import React from "react";
import classnames from 'classnames';
import styles from './custom-title.scss';
const Title = ({ icon, label, titleColor, customTitleStyles, onClick, style, labelStyle, children }) => (
<div className={classnames(styles["custom-title"], customTitleStyles ? styles["custom-title-styles"] : ''... | import React from "react";
import classnames from 'classnames';
import styles from './custom-title.scss';
const Title = ({ icon, label, titleColor, customTitleStyles, onClick, style, labelStyle, children }) => (
<div className={classnames(styles["custom-title"], customTitleStyles ? styles["custom-title-styles"] : ''... | Add label to the title component. | fix(extensions): Add label to the title component.
| JavaScript | apache-2.0 | centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon |
776ee9c3d3dd199f5c3ef746cf948bd7c06e162b | test-projects/multi-page-test-project/gulpfile.js | test-projects/multi-page-test-project/gulpfile.js |
var gulp = require('gulp');
var defs = [
{
title: 'Test Index Title',
path: '',
description: 'Test index description',
twitterImage: '20euro.png',
openGraphImage: '50euro.png',
schemaImage: '100euro.png'
},
{
path: '/subpage',
title: 'Test Subpage Title',
description: 'Test s... |
var gulp = require('gulp');
var path = require('path');
var defs = [
{
title: 'Test Index Title',
path: '',
description: 'Test index description',
twitterImage: '20euro.png',
openGraphImage: '50euro.png',
schemaImage: '100euro.png'
},
{
path: '/subpage',
title: 'Test Subpage Titl... | Add missing require to test project | Add missing require to test project
| JavaScript | mit | lucified/lucify-component-builder,lucified/lucify-component-builder,lucified/lucify-component-builder |
d9e92fb56f73f8415f4ca9ed791a27e511faee36 | root/include/news_look_up.js | root/include/news_look_up.js |
function yql_lookup(query, cb_function) {
var url = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent(query) + '&format=json&diagnostics=true';
//alert(url);
$.getJSON(url, cb_function);
}
function look_up_news() {
var feed_url = 'http://mediacloud.org/blog/feed/';
//alert(goo... |
function yql_lookup(query, cb_function) {
var url = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent(query) + '&format=json&diagnostics=true';
//alert(url);
$.getJSON(url, cb_function);
}
function look_up_news() {
// TEMPORARY HACK
//mediacloud.org is password protected so we ... | Add work around for the mediacloud.org/blog page being password protected so we can still display the news dynamically on the front page. | Add work around for the mediacloud.org/blog page being password protected so we can still display the news dynamically on the front page.
| JavaScript | agpl-3.0 | berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter... |
f6259eb662610e8d140028661d41e223d619293d | frontend/src/SubmitButton.js | frontend/src/SubmitButton.js | import React, { Component } from "react";
import styled from "styled-components";
class SubmitButton extends Component {
render() {
const {
isShowingPositive,
onNegativeClick,
onPositiveClick,
disabled,
positiveText,
negativeText
} = this.props;
return (
<Styled... | import React, { Component } from "react";
import styled from "styled-components";
class SubmitButton extends Component {
render() {
const {
isShowingPositive,
onNegativeClick,
onPositiveClick,
disabled,
positiveText,
negativeText
} = this.props;
return (
<Styled... | Set webkit-appearance to none on submit button. | Set webkit-appearance to none on submit button.
| JavaScript | mit | Tejpbit/talarlista,Tejpbit/talarlista,Tejpbit/talarlista |
6fec68f130beffcc842ad79efa94f85eba1009fc | schema/groupofuniquenames.js | schema/groupofuniquenames.js | // Copyright 2012 Joyent, Inc. All rights reserved.
var util = require('util');
var ldap = require('ldapjs');
var Validator = require('../lib/schema/validator');
///--- Globals
var ConstraintViolationError = ldap.ConstraintViolationError;
///--- API
function GroupOfUniqueNames() {
Validator.call(this, {... | // Copyright 2013 Joyent, Inc. All rights reserved.
var util = require('util');
var ldap = require('ldapjs');
var Validator = require('../lib/schema/validator');
///--- Globals
var ConstraintViolationError = ldap.ConstraintViolationError;
///--- API
function GroupOfUniqueNames() {
Validator.call(this, {... | Allow creation of empty user groups | CAPI-219: Allow creation of empty user groups
| JavaScript | mpl-2.0 | joyent/sdc-ufds,arekinath/sdc-ufds,arekinath/sdc-ufds,joyent/sdc-ufds |
df2cf92d8667a3a598aecb37c86c45c82804d089 | app/assets/javascripts/active_admin_pro/components/link.js | app/assets/javascripts/active_admin_pro/components/link.js | App.ready(function() {
"use strict";
var body = $('body');
var links = $('a:not([data-method="delete"]):not(.has_many_add):not(.dropdown_menu_button):not([target="_blank"])');
// Add active class on click to style while loading via turbolinks
// and add loading class to the body element.
links.click(functi... | App.ready(function() {
"use strict";
var body = $('body');
var links = $('a:not([data-method="delete"]):not(.has_many_add):not(.dropdown_menu_button):not([target="_blank"])');
// Add active class on click to style while loading via turbolinks
// and add loading class to the body element.
links.click(functi... | Fix issue with back button and loading indicators | Fix issue with back button and loading indicators
| JavaScript | mit | codelation/active_admin_pro,codelation/active_admin_pro,codelation/activeadmin_pro,codelation/activeadmin_pro |
07688d877058ed228ffb776b927138fc2ad1ed8d | addon/index.js | addon/index.js | import Ember from 'ember';
const { RSVP } = Ember;
function preloadRecord(record, toPreload) {
return preloadAll([record], toPreload).then(() => {
return record;
});
}
function preloadAll(records, toPreload) {
switch(Ember.typeOf(toPreload)) {
case 'object':
const properties = Object.keys(t... | import Ember from 'ember';
const { RSVP } = Ember;
function getPromise(object, property) {
return RSVP.resolve(Ember.get(object, property));
}
function preloadRecord(record, toPreload) {
if (!record) {
return RSVP.resolve(record);
}
switch(Ember.typeOf(toPreload)) {
case 'string':
return getPr... | Refactor preload to handle more cases | Refactor preload to handle more cases
| JavaScript | mit | levanto-financial/ember-data-preload,levanto-financial/ember-data-preload |
7d81ece0291bb469f1bea3bcf2c9225f74eab7d6 | server/game/cards/events/01/puttothetorch.js | server/game/cards/events/01/puttothetorch.js | const DrawCard = require('../../../drawcard.js');
class PutToTheTorch extends DrawCard {
canPlay(player, card) {
if(player !== this.controller || this !== card) {
return false;
}
var currentChallenge = this.game.currentChallenge;
if(!currentChallenge || currentChalleng... | const DrawCard = require('../../../drawcard.js');
class PutToTheTorch extends DrawCard {
canPlay(player, card) {
if(player !== this.controller || this !== card) {
return false;
}
var currentChallenge = this.game.currentChallenge;
if(!currentChallenge || currentChalleng... | Fix put to the torch and allow it to use saves | Fix put to the torch and allow it to use saves
| JavaScript | mit | Antaiseito/throneteki_for_doomtown,jeremylarner/ringteki,jeremylarner/ringteki,samuellinde/throneteki,cavnak/throneteki,cryogen/gameteki,jbrz/throneteki,cryogen/throneteki,gryffon/ringteki,cryogen/throneteki,Antaiseito/throneteki_for_doomtown,cryogen/gameteki,jeremylarner/ringteki,ystros/throneteki,gryffon/ringteki,Duk... |
9cb2f8d9efef1d47ddaec2266bcc203baa1990bc | test/index.js | test/index.js | var readFile = require('fs').readFile;
var assert = require('assert');
var exec = require('child_process').exec;
var join = require('path').join;
// Test the expected output.
exec('node .', function(err, stdout, stderr) {
if (err) {
throw err;
}
readFile(join(__dirname, 'expected.txt'), 'UTF-8', f... | var readFile = require('fs').readFile;
var assert = require('assert');
var exec = require('child_process').exec;
var join = require('path').join;
var platform = require('os').platform;
// Test the expected output.
exec('node .', function(err, stdout, stderr) {
if (err) {
throw err;
}
readFile(join... | Add test support for Windows | Add test support for Windows
| JavaScript | isc | unioncollege-webtech/fizzbuzz |
7e355008d3bc810b84ca4818e4aeecf494a89d20 | assets/components/checkblock/js/inputs/checkblock.js | assets/components/checkblock/js/inputs/checkblock.js | // Wrap your stuff in this module pattern for dependency injection
(function ($, ContentBlocks) {
// Add your custom input to the fieldTypes object as a function
// The dom variable contains the injected field (from the template)
// and the data variable contains field information, properties etc.
Conte... | // Wrap your stuff in this module pattern for dependency injection
(function ($, ContentBlocks) {
// Add your custom input to the fieldTypes object as a function
// The dom variable contains the injected field (from the template)
// and the data variable contains field information, properties etc.
Conte... | Fix checkboxes not ticking themselves | Fix checkboxes not ticking themselves
Closes #1
| JavaScript | mit | jpdevries/checkblock,jpdevries/checkblock |
53db7bd5313293b436d9664d90080eee18315165 | sample/core.js | sample/core.js | enchant();
window.onload = function () {
var core = new Core(320, 320);
core.onload = function () {
core.rootScene.backgroundColor = '#eee';
var field = new TextField(160, 24);
field.x = (core.width - field.width) / 2;
field.y = 64;
field.placeholder = 'what is your name ?';
field.style.... | enchant();
window.onload = function () {
var core = new Core(320, 320);
core.onload = function () {
core.rootScene.backgroundColor = '#eee';
// Create an instance of enchant.TextField
var textField = new TextField(160, 24);
// Set position
textField.x = (core.width - textField.width) / 2;
... | Add some comments and rename TextField instance | Add some comments and rename TextField instance
| JavaScript | mit | 131e55/textField.enchant.js |
3b9af3bf12b4ec3790caf898900b94d3d49aee00 | elemental-ca.js | elemental-ca.js | var w = 300,
gens = 10;
var c = document.getElementById('cs');
var ctx = c.getContext('2d');
var ruleset = [0,1,0,1,1,0,1,0].reverse();
var cells = [];
for (var i=0; i<w; i++) {
cells[i] = 0;
}
cells[Math.ceil(w/2)] = 1;
function rules(l,c,r) {
var rule = '' + l + c + r;
return ruleset[parseInt(rule, 2)];... | var w = 600,
gens = 800;
var c = document.getElementById('cs');
var ctx = c.getContext('2d');
var ruleset = [0,1,0,1,1,0,1,0].reverse();
var cells = [];
for (var i=0; i<w; i++) {
cells[i] = 0;
}
cells[Math.ceil(w/2)] = 1;
function rules(l,c,r) {
var rule = '' + l + c + r;
return ruleset[parseInt(rule, 2)]... | Tweak the color and size a bit | Tweak the color and size a bit
| JavaScript | mit | mmcfarland/canvas-renderings |
4c1987b918d353f849ad1aaad174db797525ee10 | scripts/app.js | scripts/app.js | var ko = require('knockout-client'),
vm = require('./viewModel');
vm.wtf();
ko.applyBindings(vm);
| var ko = require('knockout-client'),
vm = require('./viewModel');
ko.applyBindings(vm);
| Remove increment on refresh / initial visit | Remove increment on refresh / initial visit
| JavaScript | mit | joshka/countw.tf,joshka/countw.tf,joshka/countw.tf,joshka/countw.tf |
c70bb59f3a7357f7d2711f0de20c1cd1717fec70 | react/gameday2/components/EmbedTwitch.js | react/gameday2/components/EmbedTwitch.js | import React from 'react'
import { webcastPropType } from '../utils/webcastUtils'
const EmbedTwitch = (props) => {
const channel = props.webcast.channel
const iframeSrc = `https://player.twitch.tv/?channel=${channel}`
return (
<iframe
src={iframeSrc}
frameBorder="0"
scrolling="no"
hei... | import React from 'react'
import { webcastPropType } from '../utils/webcastUtils'
const EmbedTwitch = (props) => {
const channel = props.webcast.channel
const iframeSrc = `https://player.twitch.tv/?channel=${channel}`
return (
<iframe
src={iframeSrc}
frameBorder="0"
scrolling="no"
hei... | Fix gameday2 not allowing fullscreen Twitch | Fix gameday2 not allowing fullscreen Twitch
| JavaScript | mit | nwalters512/the-blue-alliance,bdaroz/the-blue-alliance,jaredhasenklein/the-blue-alliance,nwalters512/the-blue-alliance,fangeugene/the-blue-alliance,fangeugene/the-blue-alliance,jaredhasenklein/the-blue-alliance,verycumbersome/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,bdaroz/the-bl... |
66e5f23ae0283fd89d313b802c3ed20ea52137ed | app/public/app.js | app/public/app.js | $(function () {
$(document).on({
ajaxStart: function() { $('body').addClass("loading"); },
ajaxStop: function() { $('body').removeClass("loading"); }
})
$( "#request_form" ).submit(function( event ) {
event.preventDefault();
$('.results_container').slideUp( "slow");
$.post( "/call", { ch... | $(function () {
$(document).on({
ajaxStart: function() { $('body').addClass("loading"); },
ajaxStop: function() { $('body').removeClass("loading"); }
})
$( "#request_form" ).submit(function( event ) {
event.preventDefault();
$('.results_container').slideUp( "slow");
$.post( "/call", { ch... | Fix view for empty response | Fix view for empty response
| JavaScript | mit | nezhar/PictureChallenge,nezhar/PictureChallenge |
4be53761875922cc8d27e54363624cd1ae34bc16 | app/containers/Main/index.js | app/containers/Main/index.js | import React, { Component, PropTypes } from 'react';
import fetchData from '../../actions/fetchData';
import Toast from '../../components/Toast';
import Modals from '../Modals';
import types from '../../utils/types';
import SocketEvents from '../../utils/socketEvents';
import './Main.scss';
import MainNav from '../Mai... | import React, { Component, PropTypes } from 'react';
import fetchData from '../../actions/fetchData';
import Toast from '../../components/Toast';
import Modals from '../Modals';
import types from '../../utils/types';
import SocketEvents from '../../utils/socketEvents';
import './Main.scss';
import MainNav from '../Mai... | Check for isFetching with .some | :wrench: Check for isFetching with .some
| JavaScript | mit | JasonEtco/flintcms,JasonEtco/flintcms |
779157a8fb6076e35fce4edcb2eb7a7a55ccdade | js/characters-list.js | js/characters-list.js | var Character = require('./character');
var React = require('react');
var _ = require('underscore')
var CharactersList = React.createClass({
render: function () {
return (
<div>
{
this.props.items.map(function(item, index) {
var name = item.name;
var image = item.image;
... | var Character = require('./character');
var React = require('react');
var _ = require('underscore')
var CharactersList = React.createClass({
render: function () {
return (
<div>
{
this.props.items.map(function(item, index) {
var name = item.name;
var image = item.thumbnail... | Fix for the image prop of the character | Fix for the image prop of the character
| JavaScript | mit | adrrian17/excelsior |
a942d28c315f59428a80d2fd0b268cd99bbe3b66 | common/src/configureStore.js | common/src/configureStore.js | import appReducer from './app/reducer';
import createLogger from 'redux-logger';
import fetch from 'isomorphic-fetch';
import injectDependencies from './lib/injectDependencies';
import promiseMiddleware from 'redux-promise-middleware';
import stateToJS from './lib/stateToJS';
import validate from './validate';
import {... | import appReducer from './app/reducer';
import createLogger from 'redux-logger';
import fetch from 'isomorphic-fetch';
import injectDependencies from './lib/injectDependencies';
import promiseMiddleware from 'redux-promise-middleware';
import stateToJS from './lib/stateToJS';
import validate from './validate';
import {... | Enable Flux logger only for dev | Enable Flux logger only for dev
| JavaScript | mit | puzzfuzz/othello-redux,christophediprima/este,XeeD/este,abelaska/este,skyuplam/debt_mgmt,AugustinLF/este,TheoMer/Gyms-Of-The-World,skyuplam/debt_mgmt,langpavel/este,XeeD/test,robinpokorny/este,aindre/este-example,christophediprima/este,SidhNor/este-cordova-starter-kit,robinpokorny/este,glaserp/Maturita-Project,christop... |
43f0a5cefb43be20ae8f48deb2fa886540528b2d | lib/indie-registry.js | lib/indie-registry.js | 'use babel'
import {Emitter, CompositeDisposable} from 'atom'
import Validate from './validate'
import Indie from './indie'
export default class IndieRegistry {
constructor() {
this.subscriptions = new CompositeDisposable()
this.emitter = new Emitter()
this.indieLinters = new Set()
this.subscriptio... | 'use babel'
import {Emitter, CompositeDisposable} from 'atom'
import Validate from './validate'
import Indie from './indie'
export default class IndieRegistry {
constructor() {
this.subscriptions = new CompositeDisposable()
this.emitter = new Emitter()
this.indieLinters = new Set()
this.subscriptio... | Add a new has method | :new: Add a new has method
| JavaScript | mit | Arcanemagus/linter,e-jigsaw/Linter,atom-community/linter,AtomLinter/Linter,steelbrain/linter |
dcf5dde3cb5833fde7430a0238e3c9436e796dc0 | lib/score-combiner.js | lib/score-combiner.js | /**
* checks if there are scores which can be combined
*/
function checkValidity (scores) {
if (scores == null) {
throw new Error('There must be a scores object parameter')
}
if (Object.keys(scores).length <= 0) {
throw new Error('At least one score must be passed')
}
}
/**
* Score canidate based on... | /**
* checks if there are scores which can be combined
*/
function checkValidity (scores) {
if (scores == null) {
throw new Error('There must be a scores object parameter')
}
if (Object.keys(scores).length <= 0) {
throw new Error('At least one score must be passed')
}
}
/**
* Score canidate based on... | Refactor LargestQ.combine() to use built-ins. | Refactor LargestQ.combine() to use built-ins.
| JavaScript | agpl-3.0 | amos-ws16/amos-ws16-arrowjs-server,amos-ws16/amos-ws16-arrowjs,amos-ws16/amos-ws16-arrowjs,amos-ws16/amos-ws16-arrowjs,amos-ws16/amos-ws16-arrowjs-server |
73b274515279466e125e658e539b1863301c5759 | lib/windshaft/models/dummy_mapconfig_provider.js | lib/windshaft/models/dummy_mapconfig_provider.js | var util = require('util');
var MapStoreMapConfigProvider = require('./mapstore_mapconfig_provider');
function DummyMapConfigProvider(mapConfig, params) {
if (!(this instanceof DummyMapConfigProvider)) {
return new DummyMapConfigProvider(mapConfig, params);
}
MapStoreMapConfigProvider.call(this, u... | var util = require('util');
var MapStoreMapConfigProvider = require('./mapstore_mapconfig_provider');
function DummyMapConfigProvider(mapConfig, params) {
MapStoreMapConfigProvider.call(this, undefined, params);
this.mapConfig = mapConfig;
}
util.inherits(DummyMapConfigProvider, MapStoreMapConfigProvider);
... | Remove instance check as it's an internal class and have full control | Remove instance check as it's an internal class and have full control
| JavaScript | bsd-3-clause | CartoDB/Windshaft,wsw0108/Windshaft,CartoDB/Windshaft,CartoDB/Windshaft,wsw0108/Windshaft,wsw0108/Windshaft |
969cc51155d7be88f97e27f305bf678836fa9220 | packages/server/src/__tests__/jestSetup.js | packages/server/src/__tests__/jestSetup.js | const root = __dirname + '/../../../..';
require('@babel/register')({
root,
cwd: root,
configFile: root + '/packages/server/babel.config.js',
extensions: ['.js', '.jsx', '.ts', '.tsx']
});
require.extensions['.scss'] = () => {};
require.extensions['.css'] = () => {};
require.extensions['.less'] = () => {};
O... | const root = __dirname + '/../../../..';
require('@babel/register')({
root,
cwd: root,
configFile: root + '/packages/server/babel.config.js',
extensions: ['.js', '.jsx', '.ts', '.tsx'],
cache: false
});
require.extensions['.scss'] = () => {};
require.extensions['.css'] = () => {};
require.extensions['.less'... | Work around babel-plugin-import-graphql caching intolerance | Work around babel-plugin-import-graphql caching intolerance
| 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 |
36ae9ccc7f43445485a6baacc4dc18834d61cda2 | pretty-seconds.js | pretty-seconds.js | function quantify(data, unit, value) {
if (value) {
if (value > 1 || value < -1)
unit += 's';
data.push(value + ' ' + unit);
}
return data;
}
module.exports = function prettySeconds(seconds) {
var prettyString = '',
data = [];
if (typeof seconds === 'number')... | function quantify(data, unit, value) {
if (value) {
if (value > 1 || value < -1)
unit += 's';
data.push(value + ' ' + unit);
}
return data;
}
module.exports = function prettySeconds(seconds) {
var prettyString = '',
data = [];
if (typeof seconds === 'number')... | Trim decimal places off seconds | Trim decimal places off seconds | JavaScript | mit | binarykitchen/pretty-seconds |
438e6b49e171e8db87e1982677861b6c61dfcdad | scripts/nummer.js | scripts/nummer.js | // Description:
// Pick and tag a random user that has to do shitty work, replies when the bot
// hears @noen. This script also supports mentions of @aktive and @nye.
const _ = require('lodash');
const members = require('../lib/members');
const prefixes = [
'Time to shine',
"The work doesn't do itself",
'Ge... | // Description:
// Get all phone numbers for active members
const _ = require('lodash');
const members = require('../lib/members');
module.exports = robot => {
robot.respond(/nummer/i, msg => {
members('?active=true')
.then(members => {
if (members.length === 0) {
return;
}
... | Remove duplicate posts by ababot | Remove duplicate posts by ababot
| JavaScript | mit | webkom/ababot,webkom/ababot |
1aef53ef94e4031cb23e9c79c1b677299307284b | app/renderer/js/utils/domain-util.js | app/renderer/js/utils/domain-util.js | 'use strict';
const {app} = require('electron').remote;
const JsonDB = require('node-json-db');
class DomainUtil {
constructor() {
this.db = new JsonDB(app.getPath('userData') + '/domain.json', true, true);
}
getDomains() {
return this.db.getData('/domains');
}
addDomain() {
... | 'use strict';
const {app} = require('electron').remote;
const JsonDB = require('node-json-db');
class DomainUtil {
constructor() {
this.db = new JsonDB(app.getPath('userData') + '/domain.json', true, true);
}
getDomains() {
return this.db.getData('/domains');
}
addDomain() {
... | Change domain config schema and update DomainUtil. | Change domain config schema and update DomainUtil.
| JavaScript | apache-2.0 | zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-electron,zulip/zulip-desktop,zulip/zulip-electron,zulip/zulip-electron,zulip/zulip-desktop |
e91e43feeddafb7d674f67f18cb2c0748a395006 | packages/fela-bindings/src/extractUsedProps.js | packages/fela-bindings/src/extractUsedProps.js | /* @flow */
export default function extractUsedProps(
rule: Function,
theme: Object = {}
): Array<string> {
const usedProps = []
// if the browser doesn't support proxies
// we simply return an empty props object
// see https://github.com/rofrischmann/fela/issues/468
if (typeof Proxy === 'undefined') {
... | /* @flow */
export default function extractUsedProps(
rule: Function,
theme: Object = {}
): Array<string> {
const usedProps = []
// if the browser doesn't support proxies
// we simply return an empty props object
// see https://github.com/rofrischmann/fela/issues/468
if (typeof Proxy === 'undefined') {
... | Handle exception extracting used props | Handle exception extracting used props
Fix #595
| JavaScript | mit | risetechnologies/fela,rofrischmann/fela,risetechnologies/fela,rofrischmann/fela,risetechnologies/fela,rofrischmann/fela |
8bc778f740fa3fa77a49328739265e5d4edd9e54 | modules/slider/Gruntfile.js | modules/slider/Gruntfile.js | module.exports = function(grunt) {
grunt.config.merge({
imagemin: {
slider: {
files: [{
expand: true,
cwd: 'cacao/modules/slider/images',
src: ['**/*.{png,jpg,gif}'],
dest: '<%= global.dest %>/layout... | module.exports = function(grunt) {
grunt.config.merge({
imagemin: {
slider: {
files: [{
expand: true,
cwd: 'bower_components/cacao/modules/slider/images',
src: ['**/*.{png,jpg,gif}'],
dest: '<%= glob... | Update path of slider images. | Update path of slider images.
| JavaScript | mit | aptuitiv/cacao |
49965cc87d2f9ebf8ce7b0601845533b4721ecff | test/spec/sanity-checks.js | test/spec/sanity-checks.js | /* global describe, it, before */
var request = require('supertest')
var assert = require('assert')
var path = require('path')
var fs = require('fs')
/**
* Basic sanity checks on the dev server
*/
describe('The prototype kit', function () {
var app
before(function (done) {
app = require('../../server')
... | /* eslint-env mocha */
var request = require('supertest')
var app = require('../../server.js')
var path = require('path')
var fs = require('fs')
var assert = require('assert')
/**
* Basic sanity checks on the dev server
*/
describe('The prototype kit', function () {
it('should generate assets into the /public fold... | Simplify the sanity test check | Simplify the sanity test check
App doesn't need to listen in the test script as supertest accepts the
app variable and handles the listening and un-listening itself.
This also removes the needs for the after block to stop the server.
| JavaScript | mit | hannalaakso/accessible-timeout-warning,alphagov/govuk_prototype_kit,nhsbsa/ppc-prototype,joelanman/govuk_prototype_kit,davedark/proto-timeline,companieshouse/ch-accounts-prototype,Demwunz/esif-prototype,danblundell/verify-local-patterns,Demwunz/esif-prototype,abbott567/govuk_prototype_kit,dwpdigitaltech/ejs-prototype,c... |
f4ef68a267821b41409b60d1f3efe51e7a8cd588 | tests/dujs/modelfactory.js | tests/dujs/modelfactory.js | /**
* Created by ChengFuLin on 2015/6/10.
*/
var factoryAnalyzedCFG = require('../../lib/dujs').factoryAnalyzedCFG,
should = require('should');
describe('ModelFactory', function () {
"use strict";
describe('Factory Method', function () {
it('should support to create empty Model', function () {
... | /*
* Test cases for ModelFactory
* @lastmodifiedBy ChengFuLin(chengfulin0806@gmail.com)
* @lastmodifiedDate 2015-08-14
*/
var factoryModel = require('../../lib/dujs/modelfactory');
var should = require('should');
describe('ModelFactory', function () {
"use strict";
describe('public methods', function () {
... | Refactor test cases for ModelFactory | Refactor test cases for ModelFactory
| JavaScript | mit | chengfulin/dujs,chengfulin/dujs |
1a71a91e9b143625d5863c21dc9de039e38541a2 | src/user/components/online_payments.js | src/user/components/online_payments.js | import React from 'react'
import CreaditCardPayment from './credit_card_payment.js'
import Paypal from './paypal.js'
export default (props) => {
return props.user_payments.payment_sent
? SuccessfulPayment(props)
: (props.user_payments.braintree_error ? Error() : PaymentOptions(props))
}
const Error = () ... | import React from 'react'
import CreaditCardPayment from './credit_card_payment.js'
import Paypal from './paypal.js'
export default (props) => {
return props.user_payments.payment_sent
? SuccessfulPayment(props)
: (props.user_payments.braintree_error ? Error() : PaymentOptions(props))
}
const Error = () ... | Add paypal component to online payments. | Add paypal component to online payments.
| JavaScript | mit | foundersandcoders/sail-back,foundersandcoders/sail-back |
d23aed5fd0e19b5a6612211810ebce796af3db58 | sieve-of-eratosthenes.js | sieve-of-eratosthenes.js | // Sieve of Eratosthenes
/*RULES:
Function takes one parameter
Return an array of all prime numbers from 0-parameter
*/
/*PSEUDOCODE:
1) Find square root of parameter
2) Create an array of numbers from 0-parameter
3) Loop through numbers, but stop until square root (if a float, stop after number rounded up?... | // Sieve of Eratosthenes
/*RULES:
Function takes one parameter
Return an array of all prime numbers from 0-parameter
*/
/*PSEUDOCODE:
1) Find square root of parameter
2) Create an array of numbers from 0-parameter
3) Loop through numbers, but stop until square root (if a float, stop after number rounded up?... | Create var arr that creates the needed array depending on the given param | Create var arr that creates the needed array depending on the given param
| JavaScript | mit | benjaminhyw/javascript_algorithms |
2b5f19052395fd6364bd488b85e37f15b9a9bda9 | cmds/create.js | cmds/create.js | 'use strict';
/*
* /create [name] - Creates a voice-chat channel. Optionally names it, otherwise names it Username-[current game]
*
*/
class Create{
constructor (bot, config) {
this.bot = bot;
this.config = config;
}
get command () { return 'create' }
// Message input, user id <sn... | 'use strict';
/*
* /create [name] - Creates a voice-chat channel. Optionally names it, otherwise names it Username-[current game]
*
*/
class Create{
constructor (bot, config) {
this.bot = bot;
this.config = config;
}
get command () { return 'create' }
// Message input, user id <sn... | Add temp channel init with game name | Add temp channel init with game name
| JavaScript | mit | Just-Fans-Of/Impromp2 |
9d7c0cf74c1f7c1791cfe9ec8a36edca7a2b646d | sms-notifier/LambdaFunction.js | sms-notifier/LambdaFunction.js | // Sample Lambda Function to send notifications via text when an AWS Health event happens
var AWS = require('aws-sdk');
var sns = new AWS.SNS();
// define configuration
const phoneNumber =''; // Insert phone number here. For example, a U.S. phone number in E.164 format would appear as +1XXX5550100
//main function wh... | // Sample Lambda Function to send notifications via text when an AWS Health event happens
var AWS = require('aws-sdk');
var sns = new AWS.SNS();
//main function which gets AWS Health data from Cloudwatch event
exports.handler = (event, context, callback) => {
//get phone number from Env Variable
var phoneNumb... | Switch phone number to Environment Variable (instead of const) | Switch phone number to Environment Variable (instead of const)
| JavaScript | apache-2.0 | chetankrishna08/aws-health-tools,robperc/aws-health-tools,robperc/aws-health-tools,chetankrishna08/aws-health-tools |
6387ed56e8b5e41aa51a7994ca9f1db5b68a5644 | app/assets/javascripts/multi-part.js | app/assets/javascripts/multi-part.js | // Javascript specific to guide admin
$(function() {
var sortable_opts = {
axis: "y",
handle: "a.accordion-toggle",
stop: function(event, ui) {
$('.part').each(function (i, elem) {
$(elem).find('input.order').val(i + 1);
ui.item.find("a.accordion-toggle").addClass("highlight");
... | // Javascript specific to guide admin
// When we add a new part, ensure we add the auto slug generator handler
$(document).on('nested:fieldAdded:parts', function(event){
addAutoSlugGeneration();
});
function addAutoSlugGeneration() {
$('input.title').
on('change', function () {
var elem = $(this);
... | Fix auto slug generation for newly added parts | Fix auto slug generation for newly added parts
Since moving to use nested forms, we now need to listen for a nested field added event and attach the auto slug generator handler accordingly.
| JavaScript | mit | theodi/publisher,telekomatrix/publisher,alphagov/publisher,theodi/publisher,theodi/publisher,telekomatrix/publisher,alphagov/publisher,leftees/publisher,telekomatrix/publisher,leftees/publisher,leftees/publisher,theodi/publisher,alphagov/publisher,leftees/publisher,telekomatrix/publisher |
940624b8bbd2d18fa4072808cb3037078d5820d3 | public/javascripts/App/Search/SearchPanel.ui.js | public/javascripts/App/Search/SearchPanel.ui.js | App.Search.SearchPanelUi = Ext.extend(Ext.form.FormPanel, {
title: 'Search criteria',
labelWidth: 100,
labelAlign: 'left',
layout: 'form',
tbar: {
xtype: 'toolbar',
items: [{
text: 'Add language',
icon: urlRoot + 'images/add.png',
cls: 'x-btn-text-icon',
ref: '../addLanguageBut... | App.Search.SearchPanelUi = Ext.extend(Ext.form.FormPanel, {
title: 'Search criteria',
labelWidth: 100,
labelAlign: 'left',
layout: 'form',
tbar: {
xtype: 'toolbar',
items: [{
text: 'Add language',
icon: urlRoot + 'images/add.png',
cls: 'x-btn-text-icon',
ref: '../addLanguageBut... | Hide search saving buttons for now | Hide search saving buttons for now
| JavaScript | mit | textlab/glossa,textlab/rglossa,textlab/rglossa,textlab/rglossa,textlab/glossa,textlab/rglossa,textlab/glossa,textlab/glossa,textlab/glossa,textlab/rglossa |
6fe782fcd362e3cd330d22dbd17e270f26ebcf1b | app/js/arethusa/.version_template.js | app/js/arethusa/.version_template.js | 'use strict';
angular.module('arethusa').constant('VERSION', {
revision: '<%= sha %>',
date: '<%= new Date().toJSON() %>'
});
| 'use strict';
angular.module('arethusa').constant('VERSION', {
revision: '<%= sha %>',
date: '<%= new Date().toJSON() %>',
repository: 'http://github.com/latin-language-toolkit/arethusa'
});
| Add the repo to the version CONSTANT | Add the repo to the version CONSTANT
| JavaScript | mit | fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa |
f972dfc1091d58884b0a5b656f0e2cf02d94ba1d | tests/integration/components/loading-bar-test.js | tests/integration/components/loading-bar-test.js | import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, find } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import { later } from '@ember/runloop';
module('Integration | Component | loading bar', function(hooks) {
setupRenderingTest(hooks)... | import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, find, waitFor } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import { later } from '@ember/runloop';
module('Integration | Component | loading bar', function(hooks) {
setupRenderingTe... | Improve async loading bar test | Improve async loading bar test
The waitFor helper is allows us to wait for what we are actually testing
instead of a time which sometimes blocks the rendering and causes the
test to be flaky.
| JavaScript | mit | dartajax/frontend,thecoolestguy/frontend,djvoa12/frontend,dartajax/frontend,thecoolestguy/frontend,djvoa12/frontend,jrjohnson/frontend,ilios/frontend,ilios/frontend,jrjohnson/frontend |
1bbb5f18d567cc45f10b4d1a3b943ccdf93fb7d2 | test/unit/analysis/camshaft-reference.spec.js | test/unit/analysis/camshaft-reference.spec.js | var camshaftReference = require('../../../src/analysis/camshaft-reference');
describe('src/analysis/camshaft-reference', function () {
describe('.getSourceNamesForAnalysisType', function () {
it('should return the source names for a given analyses type', function () {
expect(camshaftReference.getSourceName... | var camshaftReference = require('../../../src/analysis/camshaft-reference');
describe('src/analysis/camshaft-reference', function () {
describe('.getSourceNamesForAnalysisType', function () {
it('should return the source names for a given analyses type', function () {
expect(camshaftReference.getSourceName... | Remove expected/optional param as it was removed from reference | Remove expected/optional param as it was removed from reference
| JavaScript | bsd-3-clause | splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js |
9c11b6de5181e4825a345c103add725a2f487926 | lib/curry-provider.js | lib/curry-provider.js | 'use babel';
import completions from '../data/completions';
class CurryProvider {
constructor() {
this.scopeSelector = '.source.curry';
this.disableForScopeSelector = '.source.curry .comment';
this.suggestionPriority = 2;
this.filterSuggestions = true;
this.acpTypes = new Map([['types', 'type'... | 'use babel';
import completions from '../data/completions';
class CurryProvider {
constructor() {
this.scopeSelector = '.source.curry';
this.disableForScopeSelector = '.source.curry .comment';
this.suggestionPriority = 2;
this.filterSuggestions = true;
this.acpTypes = new Map([['types', 'type'... | Return null as early as possible if the prefix is invalid | Return null as early as possible if the prefix is invalid
| JavaScript | mit | matthesjh/autocomplete-curry |
0da59ee8c95f2d065b6f0b600f4d6cffd654437e | packages/ddp-client/common/getClientStreamClass.js | packages/ddp-client/common/getClientStreamClass.js | import { Meteor } from 'meteor/meteor';
// In the client and server entry points, we make sure the
// bundler loads the correct thing. Here, we just need to
// make sure that we require the right one.
export default function getClientStreamClass() {
// The static analyzer of the bundler specifically looks
// for d... | import { Meteor } from 'meteor/meteor';
// In the client and server entry points, we make sure the
// bundler loads the correct thing. Here, we just need to
// make sure that we require the right one.
export default function getClientStreamClass() {
// The static analyzer of the bundler specifically looks
// for s... | Switch to more concise require as suggested by Ben | Switch to more concise require as suggested by Ben
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor |
db1c42b80ee59bc6ab4b9757c37172a0dab55d0e | examples/index.js | examples/index.js | 'use strict';
var Harmonia = require('harmonia');
// Create a new server that listens to a given queue
var harmonia = new Harmonia.Server('rpc');
harmonia.route({
method : 'math.add',
module : './math/add.js'
});
harmonia.route({
method : 'math.subtract',
module : './math/subtract.js',
});
harmonia.route({... | 'use strict';
var Harmonia = require('harmonia');
// Create a new server that listens to a given queue
var harmonia = new Harmonia.Server('rpc');
harmonia.route({
method : 'math.add',
module : './math/add.js'
});
harmonia.route({
method : 'math.subtract',
module : './math/subtract.js',
});
harmonia.route({... | Update Harmonia client example to reflect changes in 0.4 | Update Harmonia client example to reflect changes in 0.4
| JavaScript | mit | linearregression/harmonia,colonyamerican/harmonia |
4af7e62397088ab5e49f022f1f60f2347249920a | gulpfile.js | gulpfile.js | var gulp = require('gulp'),
csslint = require('gulp-csslint'),
jshint = require('gulp-jshint'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
autoprefixer = require('gulp-autoprefixer'),
minifyCSS = require('gulp-minify-c... | var gulp = require('gulp'),
csslint = require('gulp-csslint'),
jshint = require('gulp-jshint'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
autoprefixer = require('gulp-autoprefixer'),
minifyCSS = require('gulp-minify-css'),
stylish = require('jshint-stylish');
gulp.ta... | Remove code alignment, add trailing comma, add EOF newline | Remove code alignment, add trailing comma, add EOF newline
| JavaScript | mit | Lochlan/imagelightbox,Lochlan/imagelightbox |
61ab0adcfc8750dda6f5aae5552cb5c282fc5282 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var react = require('gulp-react');
var git = require('gulp-git');
var fs = require('fs');
var shell = require('gulp-shell')
gulp.task('brew', function () {
if (fs.existsSync('homebrew')) {
git.pull('origin', 'master', { cwd: 'homebrew' }, function (err) {
if (err) throw err;
... | var gulp = require('gulp');
var react = require('gulp-react');
var git = require('gulp-git');
var fs = require('fs');
var shell = require('gulp-shell')
gulp.task('brew', function () {
if (fs.existsSync('homebrew')) {
git.pull('origin', 'master', { cwd: 'homebrew' }, function (err) {
if (err) throw err;
... | Add automatic running of info script | Add automatic running of info script
| JavaScript | mit | zharley/ferment,zharley/ferment,zharley/ferment,zharley/ferment |
670474a38b8114afd4e990ad3689f50e868ea356 | resources/public/crel.min.js | resources/public/crel.min.js | (e=>{const t="function",n="isNode",r=document,o=(e,t)=>typeof e===t,i=(e,t)=>{null!==t&&(Array.isArray(t)?t.map(t=>i(e,t)):(a[n](t)||(t=r.createTextNode(t)),e.appendChild(t)))};function a(e,f){let l,d,s=arguments,c=1;if(e=a.isElement(e)?e:r.createElement(e),o(f,"object")&&!a[n](f)&&!Array.isArray(f))for(l in c++,f)d=f[... | (e=>{const t="function",n="isNode",r=document,o=(e,t)=>typeof e===t,i=(e,t)=>{null!==t&&(Array.isArray(t)?t.map(t=>i(e,t)):(a[n](t)||(t=r.createTextNode(t)),e.appendChild(t)))};function a(e,f){let l,d,s=arguments,c=1;if(e=a.isElement(e)?e:r.createElement(e),o(f,"object")&&!a[n](f)&&!Array.isArray(f))for(l in c++,f)d=f[... | Update crel to latest version from github.com/KoryNunn/crel | Update crel to latest version from github.com/KoryNunn/crel
| JavaScript | mit | xSke/Pxls,xSke/Pxls,xSke/Pxls,xSke/Pxls |
5ab7f8deedf44a29dffa468ffdbed7a406b46458 | app/assets/javascripts/analytics/_init.js | app/assets/javascripts/analytics/_init.js | (function() {
"use strict";
var cookieDomain = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain;
var property = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? 'UA-49258698-1' : 'UA-49258698-3';
GOVUK.Analytics.load();
GOVU... | (function() {
"use strict";
var cookieDomain = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain;
var property = 'UA-49258698-1';
GOVUK.Analytics.load();
GOVUK.analytics = new GOVUK.Analytics({
universalId: property,
cookieDomain: c... | Use a single UA code for Buyer App analytics | Use a single UA code for Buyer App analytics
Missed out of this story (which only changed the
Supplier App):
https://www.pivotaltracker.com/story/show/106115458
| JavaScript | mit | AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/di... |
3bbb177681f8c05443f001721ebd50dfd205c4f5 | ui/src/pages/blog/index.js | ui/src/pages/blog/index.js | import React from 'react'
import Link from 'gatsby-link'
import './index.scss'
export default ({ data }) => {
return (
<section>
<div className="container">
<header className="major">
<h2>Blog</h2>
</header>
{data.allMarkdownRemark.edges.map(({ node }) => (
<sect... | import React from 'react'
import Link from 'gatsby-link'
import './index.scss'
export default ({ data }) => {
return (
<section>
<div className="container">
<header className="major">
<h2>Blog</h2>
</header>
{data.allMarkdownRemark.edges.map(({ node }) => (
<sect... | Sort blog entries by date. | Sort blog entries by date.
| JavaScript | mit | danielbh/danielhollcraft.com,danielbh/danielhollcraft.com,danielbh/danielhollcraft.com-gatsbyjs,danielbh/danielhollcraft.com |
c13d87bfb90bd3a7a1951305795c586be6afde98 | lib/pick-chain-url.js | lib/pick-chain-url.js | const MAIN_API_URL = 'https://api.etherscan.io';
const OTHER_API_URL_MAP = {
ropsten: 'https://api-ropsten.etherscan.io',
kovan: 'https://api-kovan.etherscan.io',
rinkeby: 'https://api-rinkeby.etherscan.io',
homestead: 'https://api.etherscan.io',
arbitrum: 'https://api.arbiscan.io',
arbitrum_rinkeby: 'https... | const MAIN_API_URL = 'https://api.etherscan.io';
const OTHER_API_URL_MAP = {
ropsten: 'https://api-ropsten.etherscan.io',
kovan: 'https://api-kovan.etherscan.io',
rinkeby: 'https://api-rinkeby.etherscan.io',
goerli: 'https://api-goerli.etherscan.io',
sepolia: 'https://api-sepolia.etherscan.io',
homestead: '... | Add Goerli and Sepolia to the API list | Add Goerli and Sepolia to the API list
Hey @sebs
Thanks a lot for this amazing library.
I created this PR to include the Sepolia and Goerli API endpoints. Currently I'm creating the client (with `axios.create`) to support those two, but I'd be cool if I have directly included on the library.
Thanks! | JavaScript | mit | sebs/etherscan-api |
69d52f1cbac1c63a3a6f05aa32f8b8274cf4854f | src/open.js | src/open.js | function readSingleFile(e) {
var file = e.target.files[0];
if (!file) {
return;
}
var reader = new FileReader();
reader.onload = function(e) {
var contents = e.target.result;
displayContents(contents);
$('#play-input').disabled = false;
};
reader.readAsText(fi... | let csv = (function () {
let buildHeader = function (line) {
return "<thead><tr><th scope=\"col\"><button>"
+ line.slice(0, -1).split(",").join("</button></th><th scope=\"col\"><button>")
+ "</button></th></tr></thead>"
};
let buildAsHtml = function (lines) {
let output = [buildHeader(lines[0... | Move csv in a module | Move csv in a module
| JavaScript | mpl-2.0 | aloisdg/kanti,aloisdg/kanti |
0d5e7868c1cc1354748af529aca5727ffa9472c4 | lib/state-snapshot.js | lib/state-snapshot.js | class StateSnapshot {
constructor({ store, initialState, meta, currentState = initialState }) {
this.store = store;
this.initialState = { ...initialState };
this.items = { ...currentState };
this.meta = meta;
this.closed = false;
}
async dispatchToStateSnapshot(action) {
if (this.closed) ... | class StateSnapshot {
constructor({ store, initialState, meta, currentState = initialState }) {
this.store = store;
this.initialState = { ...initialState };
this.items = { ...currentState };
this.meta = meta;
this.closed = false;
}
_closeSnapshot() {
if (this.closed) {
throw new Err... | Remove code duplication from snapshot closed check | Remove code duplication from snapshot closed check
| JavaScript | mit | jay-depot/cloverleaf |
8513c39e48ed6bd6ff28b21c898f39d96a9a8259 | src/actions/user-actions.js | src/actions/user-actions.js | import db from '../db';
import { createAction } from 'redux-actions';
export const USER_LOGIN = 'USER_LOGIN';
export const USER_LOGIN_SUCCESS = 'USER_LOGIN_SUCCESS';
export const USER_SIGNUP = 'USER_SIGNUP';
export const USER_SIGNUP_SUCCESS = 'USER_SIGNUP_SUCCESS';
export const USER_SIGNUP_FAIL = 'USER_SIGNUP_FAIL';
e... | import db from '../db';
import { createAction } from 'redux-actions';
export const USER_LOGIN = 'USER_LOGIN';
export const USER_SIGNUP = 'USER_SIGNUP';
export const USER_LOGOUT = 'USER_LOGOUT';
export const login = createAction(USER_LOGIN, (username, password) => db.login(username, password));
export const signup = c... | Add actions for user management | Add actions for user management
| JavaScript | mit | andrew-filonenko/habit-tracker,andrew-filonenko/habit-tracker |
c042d3fcdf6f38fc2a6562d4d4c1b17bcc2da269 | client/js/directives/file-uploader-directive.js | client/js/directives/file-uploader-directive.js | "use strict";
angular.module("hikeio").
directive("fileUploader", ["$window", function($window) {
return {
compile: function(tplElm, tplAttr) {
var mulitpleStr = tplAttr.multiple === "true" ? "multiple" : "";
tplElm.after("<input type='file' " + mulitpleStr + " accept='image/png, image/jpeg' style='display: ... | "use strict";
angular.module("hikeio").
directive("fileUploader", ["$window", function($window) {
return {
compile: function(tplElm, tplAttr) {
var mulitpleStr = tplAttr.multiple === "true" ? "multiple" : "";
tplElm.after("<input type='file' " + mulitpleStr + " accept='image/png, image/jpeg' style='display: ... | Disable file inputs on browsers that don't support FileReader / FormData. | Disable file inputs on browsers that don't support FileReader / FormData.
| JavaScript | mit | zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io |
0a0e0ce83fba432df1a108925933a2a1e9a8c2f7 | src/js/rishson/widget/example/nls/es/Wishlist.js | src/js/rishson/widget/example/nls/es/Wishlist.js | define({
root: {
SortBy: "Ordenar por:",
Descending: "Descendente",
Name: "Nombre",
DateAdded: "Fecha de entrada",
Price: "Precio",
Actions: "Acciones",
Add: "Añadir",
Remove: "Eliminar",
Save: "Guardar"
}
});
| define({
SortBy: "Ordenar por:",
Descending: "Descendente",
Name: "Nombre",
DateAdded: "Fecha de entrada",
Price: "Precio",
Actions: "Acciones",
Add: "Añadir",
Remove: "Eliminar",
Save: "Guardar"
});
| Fix mistake in Spanish i18n resource for example widget | Fix mistake in Spanish i18n resource for example widget
| JavaScript | isc | rishson/dojoEnterpriseApp,rishson/dojoEnterpriseApp |
55effc39da807b77262aca98a8587db369ca19e5 | src/js/main.js | src/js/main.js | (function() {
"use strict";
// animate moving between anchor links
smoothScroll.init({
selector: "a",
speed: 500,
easing: "easeInOutCubic"
});
// better external SVG spiresheet support
svg4everybody();
// random placeholders for the contact form fields
var form = document.querySelector(".... | (function() {
"use strict";
// animate moving between anchor hash links
smoothScroll.init({
selector: "a",
speed: 500,
easing: "easeInOutCubic"
});
// better external SVG spritesheet support
svg4everybody();
// random placeholders for the contact form fields
var names = [
"Paul B... | Fix typo and optimize DOM querying | [js] Fix typo and optimize DOM querying
| JavaScript | mit | Pinjasaur/portfolio,Pinjasaur/portfolio |
ab3f0d14c998384b161c966b114c4793e1cb2795 | src/history/startListener.js | src/history/startListener.js | import { manualChange } from '../redux/actions';
/**
* Dispatches a manualChange action once on app start,
* and whenever a popstate navigation event occurs.
*/
function startListener(history, store) {
store.dispatch(manualChange(history.location.path));
history.listen((location, action) => {
if (action ==... | import { manualChange } from '../redux/actions';
/**
* Dispatches a manualChange action once on app start,
* and whenever a popstate navigation event occurs.
*/
function startListener(history, store) {
store.dispatch(manualChange(`${history.location.pathname}${history.location.search}${history.location.hash}`));
... | Fix location dispatched in history listener | Fix location dispatched in history listener
| JavaScript | mit | mksarge/redux-json-router |
a6bc03b09d04df24b049fa9f3e5c257b82040078 | src/Model/Game/Levels.js | src/Model/Game/Levels.js | function Levels(prng, paletteRange, paletteBuilder) {
this.prng = prng;
this.paletteRange = paletteRange;
this.paletteBuilder = paletteBuilder;
}
Levels.prototype.get = function(level) {
if( typeof this.prng.seed === 'function') {
this.prng.seed(level);
}
var hue = Math.floor(this.prng.rand... | function Levels(prng, paletteRange, paletteBuilder) {
this.prng = prng;
this.paletteRange = paletteRange;
this.paletteBuilder = paletteBuilder;
}
Levels.prototype.get = function(level) {
if(typeof this.prng.seed === 'function') {
this.prng.seed(level);
}
var hue = Math.floor(this.prng.rando... | Remove extra space from if statement | Remove extra space from if statement
| JavaScript | mit | mnito/factors-game,mnito/factors-game |
ee2c4f35fdcf4784b08cc341a0aff77d2f33883e | app/assets/javascripts/toggle_display_with_checked_input.js | app/assets/javascripts/toggle_display_with_checked_input.js | (function(window, $){
window.toggleDisplayWithCheckedInput = function(args){
var $input = args.$input,
$element = args.$element,
showElement = args.mode === 'show';
var toggleOnChange = function(){
console.log($input);
console.log("args.$mode =" + args.$mode);
if($input.prop("ch... | (function(window, $){
window.toggleDisplayWithCheckedInput = function(args){
var $input = args.$input,
$element = args.$element,
showElement = args.mode === 'show';
var toggleOnChange = function(){
if($input.prop("checked")) {
$element.toggle(showElement);
} else {
$el... | Remove console.log debug from toggleDisplayWithCheckedInput JS | Remove console.log debug from toggleDisplayWithCheckedInput JS
| JavaScript | mit | alphagov/manuals-publisher,alphagov/manuals-publisher,alphagov/manuals-publisher |
f0ccc846a8e1849e3fb37fbdded2de74ce76e1ae | app/components/add-expense.js | app/components/add-expense.js | import Ember from 'ember';
import $ from 'jquery';
export default Ember.Component.extend({
attributeBindings: ['dialog-open'],
didInsertElement () {
var dialog = document.getElementById(this.$().attr('id'));
var showDialogButton = $('[dialog-open]');
console.log(dialog, showDialogButton);
if (!dial... | import Ember from 'ember';
import $ from 'jquery';
export default Ember.Component.extend({
attributeBindings: ['dialog-open'],
expenseCategories: [
'Charity',
'Clothing',
'Education',
'Events',
'Food',
'Gifts',
'Healthcare',
'Household',
'Leisure',
'Hobbies',
'Trasportat... | Set expense categories in component | feat: Set expense categories in component
| JavaScript | mit | pe1te3son/spendings-tracker,pe1te3son/spendings-tracker |
7b6debe0ab1c1b4beb349ec963cb7ff026a8e48a | server/model/Post/schema.js | server/model/Post/schema.js | import {DataTypes as t} from "sequelize"
import format from "date-fns/format"
import createSlug from "lib/helper/util/createSlug"
/**
* @const schema
*
* @type {import("sequelize").ModelAttributes}
*/
const schema = {
id: {
type: t.INTEGER.UNSIGNED,
primaryKey: true,
autoIncrement: true
},
user... | import {DataTypes as t} from "sequelize"
import format from "date-fns/format"
import createSlug from "lib/helper/util/createSlug"
/**
* @const schema
*
* @type {import("sequelize").ModelAttributes}
*/
const schema = {
id: {
type: t.INTEGER.UNSIGNED,
primaryKey: true,
autoIncrement: true
},
user... | Change slug format in Post model | Change slug format in Post model
| JavaScript | mit | octet-stream/eri,octet-stream/eri |
cd8a3d11287f247fe3898593f80bf1bdf3840d4f | app/js/services/apihandler.js | app/js/services/apihandler.js | 'use strict';
/*
* Abstration layer for various RESTful api calls
*/
var apihandler = angular.module('apihandler', []);
apihandler.factory('apiFactory', function ($http, configFactory) {
// Private API
var url = configFactory.getValue('apiUrl')
// Public API
return {};
});
| 'use strict';
/*
* Abstration layer for various RESTful API calls
*/
var apihandler = angular.module('apihandler', []);
apihandler.factory('apiFactory', function ($http, configFactory) {
// Private API
var url = configFactory.getValue('apiUrl');
// Various different kinds of errors that can be returne... | Add error types from REST Api | Add error types from REST Api
| JavaScript | mit | learning-layers/sardroid,learning-layers/sardroid,learning-layers/sardroid |
a5468c3b575dfe2d04e03d72bcec34b8e353e9b7 | src/lb/lb.base.js | src/lb/lb.base.js | /*
* Namespace: lb.base
* Adapter Modules for Base JavaScript Library
*
* Authors:
* o Eric Bréchemier <github@eric.brechemier.name>
* o Marc Delhommeau <marc.delhommeau@legalbox.com>
*
* Copyright:
* Eric Bréchemier (c) 2011, Some Rights Reserved
* Legal-Box SAS (c) 2010-2011, All Rights Reserved
*
* L... | /*
* Namespace: lb.base
* Adapter Modules for Base JavaScript Library
*
* Authors:
* o Eric Bréchemier <github@eric.brechemier.name>
* o Marc Delhommeau <marc.delhommeau@legalbox.com>
*
* Copyright:
* Eric Bréchemier (c) 2011-2013, Some Rights Reserved
* Legal-Box SAS (c) 2010-2011, All Rights Reserved
*... | Add implementation of no(), copied from nada project (CC0) | Add implementation of no(), copied from nada project (CC0)
| JavaScript | bsd-3-clause | eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp |
97fc9bbf3ddeeec0d3f3fbae0a08346e6fad0987 | app/assets/javascripts/modules/moj.submit-once.js | app/assets/javascripts/modules/moj.submit-once.js | (function () {
'use strict';
moj.Modules.SubmitOnce = {
el: '.js-SubmitOnce',
init: function () {
this.cacheEls();
this.bindEvents();
this.options = {
alt: this.$el.data('alt') || 'Please wait…'
};
},
cacheEls: function () {
this.$el = $(this.el);
this... | (function () {
'use strict';
moj.Modules.SubmitOnce = {
el: '.js-SubmitOnce',
init: function () {
this.cacheEls();
this.bindEvents();
this.options = {
alt: this.$el.data('alt') || 'Please wait…'
};
},
cacheEls: function () {
this.$el = $(this.el);
this... | Fix tagName selection for IE8 | Fix tagName selection for IE8 | JavaScript | mit | ministryofjustice/prison-visits-public,ministryofjustice/prison-visits-public,ministryofjustice/prison-visits-public,ministryofjustice/prison-visits-public |
47382b8696201a939ce1394586701d1715e28ffa | src/js/plugin.js | src/js/plugin.js | // Save the other cropper
Cropper.other = $.fn.cropper;
// Register as jQuery plugin
$.fn.cropper = function (options) {
var args = toArray(arguments, 1),
result;
this.each(function () {
var $this = $(this),
data = $this.data('cropper'),
fn;
if (!data) {
... | // Save the other cropper
Cropper.other = $.fn.cropper;
// Register as jQuery plugin
$.fn.cropper = function (options) {
var args = toArray(arguments, 1),
result;
this.each(function () {
var $this = $(this),
data = $this.data('cropper'),
fn;
if (!data) {
... | Break destroy calling when not initialized | Break destroy calling when not initialized
| JavaScript | mit | Paulyoufu/cropper,samudiogo/cropper,shinygang/cropper,99designs/cropper,liuyan5258/cropper,ashokpant/cropper,iacdingping/cropper,OddPrints/cropper,mesnilgr/cropper,FuYung/cropper,tekinaggul/cropper,bercanozcan/cropper,tekinaggul/cropper,websdotcom/cropper,liuyan5258/cropper,iacdingping/cropper,VANITAX/cropper,itxd/crop... |
d58d68a2990c6effd98093957bb7520814508fcd | web/static/js/battle_snake/board_viewer.js | web/static/js/battle_snake/board_viewer.js | import Mousetrap from "mousetrap";
import $ from "jquery";
import socket from "../socket"
import "../empties/modal";
const logError = resp => {
console.error("Unable to join", resp)
};
const init = (gameId) => {
if(typeof gameId === "undefined") {
return;
}
const boardViewerChannel = socket.channel(`boar... | import Mousetrap from "mousetrap";
import socket from "../socket"
import "../empties/modal";
const logError = resp => {
console.error("Unable to join", resp)
};
const init = (gameId) => {
if(typeof gameId === "undefined") {
return;
}
const boardViewerChannel = socket.channel(`board_viewer:${gameId}`, {co... | Optimize dom replacement for board viewer | Optimize dom replacement for board viewer
This one line cuts down the "loading" slice from the chrome timeline from 25% to
3%. jQuery.html performs a very expensive html validation before inserting to
into the dom.
Because we *hope* that we're sending valid html before hand we don't need to do
this.
This leaves page... | JavaScript | agpl-3.0 | Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake |
df039b068a097624e99755199ff86d3d4c6365be | app/components/organization/SettingsSection.js | app/components/organization/SettingsSection.js | import React from 'react';
import Relay from 'react-relay';
import SettingsMenu from './SettingsMenu';
const SettingsSection = (props) =>
<div className="twbs-container">
<div className="clearfix mxn2">
<div className="md-col md-col-3 px2">
<SettingsMenu organization={props.organization} />
... | import React from 'react';
import Relay from 'react-relay';
import PageWithMenu from '../shared/PageWithMenu';
import SettingsMenu from './SettingsMenu';
const SettingsSection = (props) => <PageWithMenu>
<SettingsMenu organization={props.organization} />
{props.children}
</PageWithMenu>
SettingsSection.propTypes... | Use the new PageWithMenu component | Use the new PageWithMenu component
| JavaScript | mit | buildkite/frontend,buildkite/frontend,fotinakis/buildkite-frontend,fotinakis/buildkite-frontend |
978425c95077c11682d9f01a378f0e2fd7513f63 | src/middleware.js | src/middleware.js | import interceptor from "express-interceptor";
import SVGO from "svgo";
/**
* SVGO middleware: optimize any SVG response.
*/
export function svgo(options) {
const svgo = new SVGO(options);
return interceptor((req, res) => {
return {
isInterceptable: function() {
return /image\/svg\+xml(;|$)/.te... | import interceptor from "express-interceptor";
import SVGO from "svgo";
/**
* SVGO middleware: optimize any SVG response.
*/
export function svgo(options) {
const svgo = new SVGO(options);
return interceptor((req, res) => {
return {
isInterceptable: function() {
return /image\/svg\+xml(;|$)/.te... | Fix HEAD requests breaking SVG responses | Fix HEAD requests breaking SVG responses
| JavaScript | mit | exogen/badge-matrix,exogen/badge-matrix,exogen/badge-matrix |
c04bab344d7aa2eb6c25e0bcb5492b1405657f07 | lib/av-extra.js | lib/av-extra.js | 'use strict';
var AV = require('avoscloud-sdk');
var crypto = require('crypto');
AV._config.disableCurrentUser = true;
AV.Promise.setPromisesAPlusCompliant(true);
// 调用 API 时增加 prod 信息
if (!AV._old_request) {
AV._old_request = AV._request;
AV._request = function (route, className, objectId, method, dataObject, se... | 'use strict';
var AV = require('avoscloud-sdk');
var crypto = require('crypto');
AV._config.disableCurrentUser = true;
AV.Promise.setPromisesAPlusCompliant(true);
AV._config.applicationProduction = AV.Cloud.__prod;
AV.Object.prototype.disableBeforeHook = function() {
this.set('__before', signDisableHook('__before_f... | Set API prod by AV._config.applicationProduction. | Set API prod by AV._config.applicationProduction.
| JavaScript | mit | sdjcw/leanengine-node-sdk,leancloud/leanengine-node-sdk,aisk/leanengine-node-sdk |
9762b789a4e94d2f4ab7fbb553f1a3d08dcd07df | src/App/Body/AboutButton.js | src/App/Body/AboutButton.js | import React from 'react';
import { version } from 'root/package.json';
import RaisedButton from 'material-ui/lib/raised-button';
import FlatButton from 'material-ui/lib/flat-button';
import Dialog from 'material-ui/lib/dialog';
export default class AboutButton extends React.Component {
state = {
dialogIsOpen: f... | import React from 'react';
import { version } from 'root/package.json';
import RaisedButton from 'material-ui/lib/raised-button';
import FlatButton from 'material-ui/lib/flat-button';
import Dialog from 'material-ui/lib/dialog';
export default class AboutButton extends React.Component {
state = {
dialogIsOpen: f... | Change one more CAPTIVA to Intelligent Capture | Change one more CAPTIVA to Intelligent Capture
| JavaScript | cc0-1.0 | ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.