commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 624 | message stringlengths 15 4.7k | lang stringclasses 3
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
d31eb501d5ffaad8900e1a91e7c28b97a4c75f78 | src/Ractive/prototype/shared/makeArrayMethod.js | src/Ractive/prototype/shared/makeArrayMethod.js | import { isArray } from 'utils/is';
import { getKeypath, normalise } from 'shared/keypaths';
import runloop from 'global/runloop';
import getNewIndices from 'shared/getNewIndices';
var arrayProto = Array.prototype;
export default function ( methodName ) {
return function ( keypath, ...args ) {
var array, newIndice... | import { isArray } from 'utils/is';
import { getKeypath, normalise } from 'shared/keypaths';
import runloop from 'global/runloop';
import getNewIndices from 'shared/getNewIndices';
var arrayProto = Array.prototype;
export default function ( methodName ) {
return function ( keypath, ...args ) {
var array, newIndice... | Use keypath.str property to prevent coercion erros | Use keypath.str property to prevent coercion erros | JavaScript | mit | thomsbg/ractive,thomsbg/ractive,Rich-Harris/ractive,ISNIT0/ractive,dyx/ractive,heavyk/ractive,marcalexiei/ractive,dyx/ractive,aliprogrammer69/ractive,aliprogrammer69/ractive,JonDum/ractive,pingjiang/ractive,heavyk/ractive,Rich-Harris/ractive,squaredup/ractive,cgvarela/ractive,JonDum/ractive,JonDum/ractive,ractivejs/rac... |
e49c8ea16ed78ed1246905f4139aac9674122b83 | src/components/toolbar/models/SelectStateModel.js | src/components/toolbar/models/SelectStateModel.js | import SelectStateItemsCollection from '../collections/SelectStateItemsCollection';
import meta from '../meta';
export default Backbone.Model.extend({
initialize() {
const items = this.get('items');
const itemsCollection = new SelectStateItemsCollection(items);
this.listenTo(itemsCollection... | import SelectStateItemsCollection from '../collections/SelectStateItemsCollection';
import meta from '../meta';
export default Backbone.Model.extend({
initialize() {
const items = this.get('items');
const itemsCollection = new SelectStateItemsCollection(items);
this.listenTo(itemsCollection... | Add default selected state to toolbar selections. | Add default selected state to toolbar selections.
| JavaScript | mit | comindware/core-ui,comindware/core-ui,comindware/core-ui,comindware/core-ui |
11290de91c78b3e5c98c96723b8bd4935be2b2a4 | ghost/admin/app/session-stores/application.js | ghost/admin/app/session-stores/application.js | import AdaptiveStore from 'ember-simple-auth/session-stores/adaptive';
export default AdaptiveStore.extend({
localStorageKey: 'ghost:session',
cookieName: 'ghost:session'
});
| import AdaptiveStore from 'ember-simple-auth/session-stores/adaptive';
import ghostPaths from 'ghost/utils/ghost-paths';
const paths = ghostPaths();
const keyName = `ghost${(paths.subdir.indexOf('/') === 0 ? `-${paths.subdir.substr(1)}` : ``) }:session`;
export default AdaptiveStore.extend({
localStorageKey: keyN... | Set localStorage key based on subdir | Set localStorage key based on subdir
closes #6326
| JavaScript | mit | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost |
83c643c19035a44d74b8aeccfe279dc2c7ce3367 | lib/config/index.js | lib/config/index.js | 'use strict';
const readConfig = require('restore-server-config');
// singleton
let config;
/**
* Loads the configuration and stores it in the config singleton.
* @param {string} baseDir Directory which contains the folder cfg with the config files.
* @param [Logger] logger
*/
function load(baseDir, logger) {
... | 'use strict';
const readConfig = require('restore-server-config');
// singleton
let config;
/**
* Loads the configuration and stores it in the config singleton.
* @param {string} baseDir Directory which contains the folder cfg with the config files.
* @param [Logger] logger
*/
function load(baseDir, logger) {
... | Replace config load callback wrapper | Replace config load callback wrapper
| JavaScript | mit | restorecommerce/chassis-srv,restorecommerce/chassis-srv |
bc85619117de88c6248f7652bb82a9396f35adc9 | app/assets/javascripts/web.js | app/assets/javascripts/web.js | //= require jquery
//= require leaflet
//= require leaflet-ajax
//= require leaflet-routing-machine
//= require osmtogeojson
//= require maps
$("#agua").change(function () {
if (this.checked) {
showWindsLayer();
} else {
hideWindsLayer();
}
})
$("#lluvia").change(function () {
if (thi... | //= require jquery
//= require leaflet
//= require leaflet-ajax
//= require leaflet-routing-machine
//= require osmtogeojson
//= require maps
$( document ).ready(function() {
$("#agua").change(function () {
if (this.checked) {
showWindsLayer();
} else {
hideWindsLayer();
... | Add checkbox event listeners after document load. | Add checkbox event listeners after document load.
| JavaScript | mit | ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend |
8e8f489721dead1c9cecc9cc4934865633bea258 | config.js | config.js | /*
* Copyright (c) 2014 Giovanni Capuano <webmaster@giovannicapuano.net>
* Released under the MIT License
* http://opensource.org/licenses/MIT
*/
var config = {};
// Images configuration
config.images = {
path: '../images',
url : '/images'
};
// Set the following line to false if you have a webserver that s... | /*
* Copyright (c) 2014 Giovanni Capuano <webmaster@giovannicapuano.net>
* Released under the MIT License
* http://opensource.org/licenses/MIT
*/
var config = {};
// Images configuration
config.images = {
path: '../images',
url : '/images'
};
// Set the following line to false if you have a webserver that s... | Set default thumbs width to 250 | Set default thumbs width to 250
| JavaScript | mit | RoxasShadow/Vasilij |
685e7f437e4155c80814ca81f246a3571f85289f | spec/components/link.js | spec/components/link.js | import React, { PureComponent } from 'react';
import Link from '../../components/link';
class LinkTest extends PureComponent {
handleClick = () => {
console.log('Clicked on a link');
};
render () {
return (
<article>
<header>
<h1>Links</h1>
</header>
<div classNam... | import React, { PureComponent } from 'react';
import { Link, Heading1, Section } from '../../components/';
import { BrowserRouter as Router, Link as ReactRouterLink } from 'react-router-dom';
Link.use(ReactRouterLink);
class LinkTest extends PureComponent {
handleClick = () => {
console.log('Clicked on a link')... | Use the Link component from react-router in combination with our custom styled Link | Use the Link component from react-router in combination with our custom styled Link
| JavaScript | mit | teamleadercrm/teamleader-ui |
6bbed196b8b30180936e38e17bfddd3617752d31 | __tests__/components/Thumbnail-test.js | __tests__/components/Thumbnail-test.js | import React from 'react';
import shallowRender from '../utils/shallowRender';
import Thumbnail from '../../src/components/Thumbnail';
jest.unmock('../../src/components/Thumbnail');
describe('Thumbnail Component', () => {
it('should be a div HTML element', () => {
const output = shallowRender(<Thumbnail />);
... | import React from 'react';
import shallowRender from '../utils/shallowRender';
import Thumbnail from '../../src/components/Thumbnail';
jest.unmock('../../src/components/Thumbnail');
describe('Thumbnail Component', () => {
it('should be a div HTML element', () => {
const output = shallowRender(<Thumbnail />);
... | Update tests for Thumbnail component | Update tests for Thumbnail component
| JavaScript | mit | LittleFurryBastards/webpack-react-redux,LittleFurryBastards/webpack-babel-react,LittleFurryBastards/webpack-babel-react,LittleFurryBastards/webpack-react-redux |
d23a0c33a1db143c2b821dd307096d466db3c7af | src/frontend/lite/src/walletPath.js | src/frontend/lite/src/walletPath.js | import { app } from "electron";
const isDevelopment = process.env.NODE_ENV !== "production";
import os from "os";
import path from "path";
let walletPath = "";
if (process.type !== "renderer") {
if (os.platform() === "linux") {
walletPath = path.join(
app.getPath("home"),
isDevelopment ? ".gulden_d... | import { app } from "electron";
const isDevelopment = process.env.NODE_ENV !== "production";
import os from "os";
import path from "path";
let walletPath = "";
if (process.type !== "renderer") {
if (os.platform() === "linux") {
walletPath = path.join(
app.getPath("home"),
isDevelopment ? ".gulden_l... | Change wallet path for lite wallet | ELECTRON: Change wallet path for lite wallet
| JavaScript | mit | nlgcoin/guldencoin-official,nlgcoin/guldencoin-official,nlgcoin/guldencoin-official,nlgcoin/guldencoin-official,nlgcoin/guldencoin-official,nlgcoin/guldencoin-official |
2014d17c9c301508b0747327fc6a2a7b8dd538a3 | src/main/web/florence/js/functions/_reset.js | src/main/web/florence/js/functions/_reset.js | function resetPage() {
// Prevent default behaviour of all form submits throught Florence
$(document).on('submit', 'form', function(e) {
e.preventDefault();
console.log('Form submit stopped on: ', e);
});
// Fix for modal form submits not being detected
$(document).on('click', 'butt... | function resetPage() {
// Prevent default behaviour of all form submits throught Florence
$(document).on('submit', 'form', function(e) {
e.preventDefault();
});
// Fix for modal form submits not being detected
$(document).on('click', 'button', function() {
var $closestForm = $(this)... | Remove form submit prevention logging | Remove form submit prevention logging
| JavaScript | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence |
dc14852989ce28312ea93b1e2210f70f9928ee79 | app/navigation/renderScene.js | app/navigation/renderScene.js | /* @flow */
import React from "react-native";
import routeMapper from "../routes/routeMapper";
import Colors from "../../Colors.json";
const {
NavigationCard,
StyleSheet,
View
} = React;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: Colors.lightGrey
},
normal: {
marginTop: 56... | /* @flow */
import React from "react-native";
import routeMapper from "../routes/routeMapper";
import Colors from "../../Colors.json";
const {
NavigationCard,
StyleSheet,
View
} = React;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: Colors.lightGrey
},
normal: {
marginTop: 56... | Use sceneRecord.get to get current route | Use sceneRecord.get to get current route
| JavaScript | unknown | scrollback/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods |
d84468b7631cf9c08d1f9d185f59f36c79d16d68 | app/static/js/lib/reserves.js | app/static/js/lib/reserves.js | import {
fromPairs,
isEmpty,
head,
last,
max,
mapObjIndexed,
sortBy,
toPairs,
} from 'ramda'
export function calculateReserves (cumulative, reserveData, mineral, column, series) {
const reserves = getReserves(reserveData, mineral)
if (!reserves) {
// console.debug('No r... | import {
fromPairs,
isEmpty,
head,
last,
max,
mapObjIndexed,
sortBy,
toPairs,
} from 'ramda'
export function calculateReserves (cumulative, reserveData, mineral, column, series) {
const reserves = getReserves(reserveData, mineral)
if (!reserves) {
// console.debug('No r... | Change calculateReserves minimum value to zero | Change calculateReserves minimum value to zero
| JavaScript | mit | peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag |
722184133a934315f1bd261bd4a16c54d5607be7 | app/themes/base/containers.js | app/themes/base/containers.js | export default ({ borders, colors, radii, space }) => {
const defaultStyles = {
mx: 'auto',
bg: colors.white,
width: ['100%', '85%'],
mb: `${space[6]}px`,
};
const large = {
...defaultStyles,
maxWidth: '1280px',
};
const medium = {
...defaultStyles,
maxWidth: '840px',
};
... | export default ({ borders, colors, radii, space }) => {
const defaultStyles = {
mx: 'auto',
bg: colors.white,
width: ['100%', '85%'],
mb: `${space[6]}px`,
position: 'relative',
};
const large = {
...defaultStyles,
maxWidth: '1280px',
};
const medium = {
...defaultStyles,
... | Add relative position to default container styles | [WEB-1338] Add relative position to default container styles
| JavaScript | bsd-2-clause | tidepool-org/blip,tidepool-org/blip,tidepool-org/blip |
940f3dce1f1aa7c885e66705c42df93810a308dd | lib/ticket-types.js | lib/ticket-types.js | 'use strict';
function ticketTypes (args, callback) {
var ticketTypes = [
{name: 'ninja', title: 'Ninja', tooltip: 'Select Ninja to create tickets for attendees under 13 or over 13.'},
{name: 'parent-guardian', title: 'Parent/Guardian', tooltip: 'Select Parent/Guardian to create tickets for parents/guardians... | 'use strict';
function ticketTypes (args, callback) {
/* ninja is defined as a key in many areas, keep it for backward compatibility */
var ticketTypes = [
{name: 'ninja', title: 'Youth', tooltip: 'Select Youth to create tickets for attendees under 18.'},
{name: 'parent-guardian', title: 'Parent/Guardian',... | Rename ninja to youth to reduce confusion | Rename ninja to youth to reduce confusion
| JavaScript | mit | CoderDojo/cp-events-service,CoderDojo/cp-events-service |
2984f42931b1030093f4329b51fc202063001eda | src/app/index.module.js | src/app/index.module.js | /* global malarkey:false, moment:false */
import { config } from './index.config';
import { routerConfig } from './index.route';
import { themeConfig } from './index.theme';
import { runBlock } from './index.run';
import { MainController } from './main/main.controller';
import { DetailsController } from './details/det... | /* global moment:false */
import { config } from './index.config';
import { routerConfig } from './index.route';
import { themeConfig } from './index.theme';
import { runBlock } from './index.run';
import { MainController } from './main/main.controller';
import { DetailsController } from './details/details.controller'... | FIX - Removed unused dependencies | FIX - Removed unused dependencies
| JavaScript | mit | lucasdesenna/generic-search-flow,lucasdesenna/generic-search-flow |
ad0ab578bfaa2f16ec7235f6943928859f65f01b | src/Store.js | src/Store.js | import AsyncStorage from '@react-native-community/async-storage';
import { persistStore, persistReducer } from 'redux-persist';
import { applyMiddleware, createStore } from 'redux';
import thunk from 'redux-thunk';
import { createReactNavigationReduxMiddleware } from 'react-navigation-redux-helpers';
import reducers fr... | import AsyncStorage from '@react-native-community/async-storage';
import { persistStore, persistReducer } from 'redux-persist';
import { applyMiddleware, createStore } from 'redux';
import thunk from 'redux-thunk';
import { createReactNavigationReduxMiddleware } from 'react-navigation-redux-helpers';
import reducers fr... | Add blacklist pages store state | Add blacklist pages store state
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile |
4ba2b6b0e60bbd7d101f61e228ec4191c608e288 | src/index.js | src/index.js | 'use strict';
/**
* Make a web element pannable.
*/
module.exports = {
init: (elem, containerElem) => {
var container = containerElem ?
containerElem : elem.parentElement;
elem.addEventListener('mousemove', (e) => {
e.preventDefault();
if (e && e.which === 1) {
if (e.movementX !== 0) {
con... | 'use strict';
/**
* Limit execution of onReady function
* to once over the given wait time.
*
* @function _throttle
* @private
*
* @param {function} onReady
* @param {function} onStandby
* @param {number} wait
*
* @returns {function}
*/
const _throttle = (onReady, onStandby, wait) => {
let time = Date.... | Implement throttling on event listener | Implement throttling on event listener
| JavaScript | mit | selcher/panner,selcher/panner |
775cc483bbae71e5fd9793e9986e0348d2474d06 | src/index.js | src/index.js | 'use strict';
/* globals window, angular */
angular.module('vlui', [
'LocalStorageModule',
'ui.select',
])
.constant('_', window._)
// datalib, vegalite, vega
.constant('dl', window.dl)
.constant('vl', window.vl)
.constant('vg', window.vg)
// other libraries
.constant('Blob', window.Blob)
.consta... | 'use strict';
/* globals window, angular */
angular.module('vlui', [
'LocalStorageModule',
'ui.select',
'angular-google-analytics'
])
.constant('_', window._)
// datalib, vegalite, vega
.constant('dl', window.dl)
.constant('vl', window.vl)
.constant('vg', window.vg)
// other libraries
.constant('... | Add angular analytics as dependency | Add angular analytics as dependency | JavaScript | bsd-3-clause | vega/vega-lite-ui,uwdata/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui,vega/vega-lite-ui,uwdata/vega-lite-ui |
e4da867c2422df1279ed0e13dcc3143af473aa6a | src/index.js | src/index.js | /* @flow */
import matches from 'matches-selector-ng';
const proto = global.Element && global.Element.prototype;
const vendor = proto && proto.closest;
export default function closest(element: HTMLElement, selector: string): ?HTMLElement {
if (vendor) return vendor.call(element, selector);
let parent = element;
... | /* @flow */
import matches from 'matches-selector-ng';
const proto = global.Element && global.Element.prototype;
const vendor = proto && proto.closest;
export default function closest(element: HTMLElement, selector: string): HTMLElement | null {
if (vendor) return vendor.call(element, selector);
let parent = ele... | Make return type more specific. | Make return type more specific.
| JavaScript | mit | AgentME/closest-ng |
7235b162e7080fe287f83edd84b13a91a4aa0ab2 | app/scripts/plugins/draw/draw.js | app/scripts/plugins/draw/draw.js | define(['backbone', 'backbone.marionette', 'communicator', 'leaflet', 'leaflet.draw'],
function(Backbone, Marionette, Communicator, L, LeafletDraw) {
return Marionette.Object.extend({
map: null,
mapController: null,
initialize: function(o) {
var self = this;
Communicator.medi... | define(['backbone', 'backbone.marionette', 'communicator', 'leaflet', 'leaflet.draw'],
function(Backbone, Marionette, Communicator, L, LeafletDraw) {
return Marionette.Object.extend({
map: null,
mapController: null,
initialize: function(o) {
var self = this;
Communicator.medi... | Remove circle and rectangle tools | Remove circle and rectangle tools
| JavaScript | mit | TotalActiveMedia/erfgeoviewer,TotalActiveMedia/erfgeoviewer,TotalActiveMedia/erfgeoviewer |
2b2aae763a3dc985a6bde7345a0798a7e0347423 | projects/immersive-and-narrative/plugins/MediaEvents/src/MediaEvents.js | projects/immersive-and-narrative/plugins/MediaEvents/src/MediaEvents.js | var ForgePlugins = ForgePlugins || {};
ForgePlugins.MediaEvents = function()
{
this._video = null;
};
ForgePlugins.MediaEvents.prototype =
{
boot: function()
{
this._setupVideo();
},
reset: function()
{
this._clearVideo();
this._setupVideo();
},
_setupVideo: f... | var ForgePlugins = ForgePlugins || {};
ForgePlugins.MediaEvents = function()
{
this._video = null;
};
ForgePlugins.MediaEvents.prototype =
{
boot: function()
{
this._setupVideo();
},
reset: function()
{
this._clearVideo();
this._setupVideo();
},
_setupVideo: f... | Fix MediaEvent plugin of immersive project for new scene media | Fix MediaEvent plugin of immersive project for new scene media
| JavaScript | apache-2.0 | gopro/forgejs-samples,gopro/forgejs-samples |
aa7245ba61b8a9f4c0c50d1516b59e618caf3050 | src/subtitulamos/resources/assets/js/rules.js | src/subtitulamos/resources/assets/js/rules.js | /**
* This file is covered by the AGPLv3 license, which can be found at the LICENSE file in the root of this project.
* @copyright 2020 subtitulamos.tv
*/
import "../css/rules.scss";
import { onDomReady } from "./utils";
onDomReady(() => {
for (const $spoilerWrapper of document.querySelectorAll(".spoiler-wrapper... | /**
* This file is covered by the AGPLv3 license, which can be found at the LICENSE file in the root of this project.
* @copyright 2020 subtitulamos.tv
*/
import "../css/rules.scss";
import { get_all, onDomReady } from "./utils";
onDomReady(() => {
for (const $spoilerName of get_all(".spoiler-name")) {
$spoi... | Fix collapsing of rule explanations | Fix collapsing of rule explanations
| JavaScript | agpl-3.0 | subtitulamos/subtitulamos,subtitulamos/subtitulamos,subtitulamos/subtitulamos,subtitulamos/subtitulamos,subtitulamos/subtitulamos |
675065d9085e8c4dc7ee8214a7eade47d5041f51 | src/utils.js | src/utils.js | const defaults = require('./defaults.js');
const parseBoolean = boolean => boolean === 'true';
const parseIntervals = (intervals) => {
if (Array.isArray(intervals)) {
return intervals
.filter(i => !isNaN(i))
.map(parseFloat)
.sort((a, b) => a - b);
}
const interval = parseFloat(intervals);... | const defaults = require('./defaults.js');
const parseBoolean = boolean => boolean === 'true';
const parseIntervals = (intervals) => {
if (Array.isArray(intervals)) {
return intervals
.filter(i => !isNaN(i))
.map(parseFloat)
.sort((a, b) => a - b);
}
const interval = parseFloat(intervals);... | Clone `defaults` object to avoid member assignment | Clone `defaults` object to avoid member assignment
Fixes urbica/galton#183
| JavaScript | mit | urbica/galton,urbica/galton |
57125a8c83882e44b2108e7ecac9240dfd90c8cf | src/js/pebble-js-app.js | src/js/pebble-js-app.js | var initialized = false;
Pebble.addEventListener("ready", function() {
console.log("ready called!");
initialized = true;
});
Pebble.addEventListener("showConfiguration", function() {
console.log("showing configuration");
var shakeToCheat = 1; // get current setting from pebble
Pebble.openURL('http://rawgith... | var initialized = false;
Pebble.addEventListener("ready", function() {
console.log("ready called!");
initialized = true;
});
Pebble.addEventListener("showConfiguration", function() {
console.log("showing configuration");
var shakeToCheat = localStorage.getItem("shake-to-cheat") || 1;
Pebble.openURL('http://... | Load and persist config on phone app | Load and persist config on phone app
| JavaScript | mit | chasecolburn/line-maze,chasecolburn/line-maze,chasecolburn/line-maze |
f74006ac42b9a1d75b2887130fd0046b7d05f268 | client/components/admin-lte/Sidebar.js | client/components/admin-lte/Sidebar.js | import React from 'react';
import SideLink from '../common/SideLink';
import { Link } from 'react-router';
const Sidebar = (props) => { // eslint-disable-line no-unused-vars
return (
<aside className="main-sidebar">
<section className="sidebar">
<div className="user-panel">
... | import React from 'react';
import SideLink from '../common/SideLink';
import { Link } from 'react-router';
const Sidebar = (props) => { // eslint-disable-line no-unused-vars
return (
<aside className="main-sidebar">
<section className="sidebar">
<div className="user-panel">
... | Add a link to the import-subscribers page in the sidebar | Add a link to the import-subscribers page in the sidebar
| JavaScript | bsd-3-clause | zhakkarn/Mail-for-Good,zhakkarn/Mail-for-Good,karuppiah7890/Mail-for-Good,karuppiah7890/Mail-for-Good,karuppiah7890/Mail-for-Good,zhakkarn/Mail-for-Good |
3bfd0e3be920ac3e9b35ef9e906aeee47f34abe6 | src/doors.js | src/doors.js | //TODO: Implement helper functions for:
// open/close, lock/unlock, and other player and NPC interactions with doors.
| //TODO: Implement helper functions for:
// open/close, lock/unlock, and other player and NPC interactions with doors.
'use strict';
const CommandUtil = require('./command_util').CommandUtil;
const util = require('util');
/*
* Handy little util functions.
*/
const has = (collection, thing) => collection.indexOf(thin... | Refactor open and close function to be the same thing, exported to be called from the command files. | Refactor open and close function to be the same thing, exported to be called from the command files.
| JavaScript | mit | seanohue/ranviermud,shawncplus/ranviermud,seanohue/ranviermud |
2ef6613becea4df29aaf9aeff58d308686743084 | app/js/app.js | app/js/app.js | var store = null;
$(function() {
$(document).on("dragstart", "img", false);
$("#page-back").click(function() {
utils.page(utils.page() - 1);
});
$("#page-next").click(function() {
utils.page(utils.page() + 1);
});
$.getJSON("data.json").done(function(data) {
if(data.length == 0) alert("No dat... | var store = null;
$(function() {
$(document).on("dragstart", "img", false);
$("#page-back").click(function() {
utils.page(utils.page() - 1);
});
$("#page-next").click(function() {
utils.page(utils.page() + 1);
});
$(window).keydown(function(event) {
if(event.keyCode == 39) {
event.preve... | Allow using keyboard to move between pages as well | Allow using keyboard to move between pages as well
| JavaScript | mit | bloopletech/mangos,bloopletech/videos,bloopletech/videos |
b81ff5ecc2ccb982c136305f9df3fb3c0d72827c | libs/Mailer.js | libs/Mailer.js | // let messanger = require('./mailer/transport')();
module.exports = function(_db, messanger){
if(!SlickSources[_db]) return {start: () => false};
let _req = {db:SlickSources[_db]},
Mails = Models.Mails(_req),
fetchMails = cb => {
Mails.find({limit:100,sent:'0'}, function(e, rec... | // let messanger = require('./mailer/transport')();
module.exports = function(_db, messanger){
if(!SlickSources[_db]) return {start: () => false};
let _req = {db:SlickSources[_db]},
Mails = Models.Mails(_req),
fetchMails = cb => {
Mails.find({limit:100}, function(e, recs){
... | Remove handling of failed send error | Remove handling of failed send error
| JavaScript | mit | steveesamson/slicks-bee,steveesamson/slicks-bee |
5c4c8f1b0b3557cde47b7ec4a2c553a3acca7a36 | src/error.js | src/error.js | //
// Error handling
//
export var onError
export function catchFunctionErrors(delegate) {
return onError ? function () {
try {
return delegate.apply(this, arguments);
} catch (e) {
onError && onError(e);
throw e;
}
} : delegate;
}
export function de... | //
// Error handling
// ---
//
// The default onError handler is to re-throw.
export var onError = function (e) { throw(e); };
export function catchFunctionErrors(delegate) {
return onError ? function () {
try {
return delegate.apply(this, arguments);
} catch (e) {
onError(e... | Change onError behaviour; export safeSetTimeout | Change onError behaviour; export safeSetTimeout
| JavaScript | mit | knockout/tko.utils |
1dbec704daf75b7e48f6508fad00951ce1b562d4 | app/assets/javascripts/renalware/components/tabs.js | app/assets/javascripts/renalware/components/tabs.js | function initTabs() {
$(".sub-nav.with-tabs dl a").on("click", function(e) {
e.preventDefault();
var anchor = e.target
var dl = anchor.closest("dl");
var dd = anchor.closest("dd");
var idToDeactivate = $("dd.active a", dl).attr("href");
$("dd.active", dl).removeClass("active")
$(dd).addCla... | function initTabs() {
$(".sub-nav.with-tabs dl a").on("click", function(e) {
e.preventDefault();
var anchor = e.target
var dl = $(anchor).closest("dl");
var dd = $(anchor).closest("dd");
var idToDeactivate = $("dd.active a", dl).attr("href");
$("dd.active", dl).removeClass("active")
$(dd).... | Fix an IE11 js bug in tab toggling | Fix an IE11 js bug in tab toggling
| JavaScript | mit | airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core |
0287791b0c12f2f952d2289fd6b99a9ab5cb6203 | dev/_/components/js/sourceCollectionView.js | dev/_/components/js/sourceCollectionView.js | AV.SourceCollectionView = Backbone.View.extend({
el: '#list_container',
initialize: function() {
this.listenTo(this.collection, 'all', this.render);
console.log("Initialize View");
},
events: {
"click #deleteButton": "delete",
//"click #uploadButton": "upload",
},
template: _.t... | AV.SourceCollectionView = Backbone.View.extend({
el: '#list_container',
initialize: function() {
this.listenTo(this.collection, 'all', this.render);
console.log("Initialize View");
},
events: {
"click #deleteButton": "delete",
//"click #uploadButton": "upload",
},
templ... | Remove upload view from sourcecollectionview | Remove upload view from sourcecollectionview
| JavaScript | bsd-3-clause | Swarthmore/juxtaphor,Swarthmore/juxtaphor |
2d4f8b734a297942ba4ddc875359a165a68184b4 | lib/form/index.js | lib/form/index.js | /** @jsx dom */
import dom from 'magic-virtual-element';
import formSerialize from 'form-serialize';
export const propTypes = {
onSubmit: {
type: 'function'
},
transform: {
type: 'function'
}
};
export function render({props}) {
const {children, transform, onSubmit} = props;
function handle(e) {
e.preven... | /** @jsx dom */
import dom from 'magic-virtual-element';
import formSerialize from 'form-serialize';
export const propTypes = {
onSubmit: {
type: 'function'
},
transform: {
type: 'function'
}
};
export function render({props}) {
const {children, transform, onSubmit} = props;
function handle(e) {
e.preven... | Return the submit event in callback | Return the submit event in callback
| JavaScript | mit | kevva/deku-form |
a4dcb20a78bf8e72f943ae24247a4330c68c56c9 | src/index.js | src/index.js | (function () {
module.exports = function (onCreate, onAppend) {
var baseApp;
return {
/**
* Array of properties to be copied from main app to sub app
*/
merged: ['view engine', 'views'],
/**
* Array of properties to be co... | (function () {
module.exports = function (onCreate, onAppend) {
var baseApp;
return {
/**
* Array of properties to be copied from main app to sub app
*/
merged: ['view engine', 'views'],
/**
* Array of properties to be co... | Include the baseApp when running onAppend function | Include the baseApp when running onAppend function
| JavaScript | mit | steveukx/express-subapp |
7533d0283f658aaf5e93b017be5f96d021c1581e | src/index.js | src/index.js | var Laminate = {};
Laminate.Badge = require('./components/badge.js');
Laminate.Button = require('./components/button.js');
Laminate.Card = require('./components/card.js');
Laminate.Content = require('./components/content.js');
Laminate.Icon = require('./components/icon.js');
Laminate.Modal = require('./components/moda... | var Laminate = {};
Laminate.Badge = require('./components/badge');
Laminate.Button = require('./components/button');
Laminate.Card = require('./components/card');
Laminate.Content = require('./components/content');
Laminate.Icon = require('./components/icon');
Laminate.InputGroup = require('./components/input-group');... | Remove the .js from requires. | Remove the .js from requires.
| JavaScript | bsd-3-clause | joestump/laminate |
184c92f89191ebcbe9135ec6f04bce0cb97f55cf | js/getData.js | js/getData.js | window.onload = initializeData()
function initializeData() {
var div = document.getElementById("right_now");
var date = new Date();
div.textContent = date.getFullYear() + '-' + date.getMonth() + '-' + date.getDate();
var text = div.textContent;
}
| window.onload = initializeData()
function initializeData() {
var right_now = document.getElementById("right_now");
var date = new Date();
right_now.textContent = date.getFullYear() + '-' + date.getMonth() + '-' + date.getDate();
var text = right_now.textContent;
}
| Rename div variable to right_now | Rename div variable to right_now
| JavaScript | mit | mercysmart/cepatsembuh-iqbal,mercysmart/cepatsembuh-iqbal |
ef5a0a25ba4cd62820838f2cdae2db8cf50bd3cc | app/stores/SettingsStore.js | app/stores/SettingsStore.js | // @flow
import { observable, computed } from 'mobx';
import BigNumber from 'bignumber.js';
import Store from './lib/Store';
import CachedRequest from './lib/CachedRequest';
export default class SettingsStore extends Store {
@observable termsOfUseRequest = new CachedRequest(this.api, 'getTermsOfUse');
@observabl... | // @flow
import { observable, computed } from 'mobx';
import BigNumber from 'bignumber.js';
import Store from './lib/Store';
import CachedRequest from './lib/CachedRequest';
export default class SettingsStore extends Store {
@observable termsOfUseRequest = new CachedRequest(this.api, 'getTermsOfUse');
@observabl... | Fix big number format configuration | Fix big number format configuration
| JavaScript | apache-2.0 | input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus |
6468e300b31dc2b1bf87e35f11a77952825a9e75 | karma.conf.js | karma.conf.js | const base = require('skatejs-build/karma.conf');
module.exports = function (config) {
base(config);
// Remove all explicit IE definitions.
config.browsers = config.browsers.filter(name => !/^internet_explorer/.test(name));
// Only test IE latest.
config.browsers.push('internet_explorer_latest');
// Shim... | const base = require('skatejs-build/karma.conf');
module.exports = function (config) {
base(config);
// Remove all explicit IE definitions.
config.browsers = config.browsers.filter(name => !/^internet_explorer/.test(name));
// Only test IE latest.
config.browsers.push('internet_explorer_11');
// Shims fo... | Add browser spec for ie11. Doesn't seem that internet_explorer_latest works. | test(ie11): Add browser spec for ie11. Doesn't seem that internet_explorer_latest works.
| JavaScript | mit | skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs,chrisdarroch/skatejs |
0d8e1060b97b42c3937267de07a4a9587ebdba1b | karma.conf.js | karma.conf.js | module.exports = function (config) {
config.set({
frameworks: ['jasmine', 'browserify'],
preprocessors: {
'dist/lion.js': ['browserify', 'coverage'],
'test/**/*.js': ['browserify']
},
reporters: ['progress', 'junit', 'coverage'],
junitReporter: {
outputFile: 'test-results.xml',
... | module.exports = function (config) {
config.set({
frameworks: ['jasmine', 'browserify'],
preprocessors: {
'dist/lion.js': ['browserify', 'coverage'],
'test/**/*.js': ['browserify']
},
reporters: ['progress', 'junit', 'coverage'],
junitReporter: {
outputFile: path.join(process.env... | Add test output to Karma | Add test output to Karma
| JavaScript | mit | asilluron/lionjs |
cf285d9197c1e6c65d0d99583d588b09b264110f | test-main.js | test-main.js | if (!Function.prototype.bind) {
Function.prototype.bind = function(oThis) {
if (typeof this !== 'function') {
// closest thing possible to the ECMAScript 5
// internal IsCallable function
throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
}
var ... | // PhantomJS doesn't support Function.prototype.bind
if (!Function.prototype.bind) {
var slice = Array.prototype.slice;
Function.prototype.bind = function(context) {
var func = this;
var args = slice.call(arguments, 1);
function bound() {
var calledAsConstructor = func.prototype && (this instance... | Fix Function.bind polyfill to work properly on PhantomJS. | Fix Function.bind polyfill to work properly on PhantomJS.
| JavaScript | mit | OneJSToolkit/onejs,OneJSToolkit/onejs |
ac903898478d239b507afa29a4bf10614cdc8976 | data/maps/caveCombat.js | data/maps/caveCombat.js | eburp.registerMap("caveCombat",{
name: "Cave Combat",
width: 9,
height: 9,
map: "\
C'''''''C\
C'''''''C\
C'''''''C\
C'''''''C\
C'''''''C\
C'''''''C\
C'''''''C\
C'''''''C\
"
}); | eburp.registerMap("caveCombat",{
name: "Cave Combat",
width: 9,
height: 9,
map: "\
C'''''''C\
C'''''''C\
C'''''''C\
C'''''''C\
C'''''''C\
C'''''''C\
C'''''''C\
C'''''''C\
C'''''''C\
"
}); | Fix cave combat to reflect new battle sizes. 9x9 | Fix cave combat to reflect new battle sizes. 9x9
| JavaScript | apache-2.0 | justindujardin/pow2,justindujardin/pow2,justindujardin/pow2 |
e0976a86e8ea6145337ac4962a861638ca6d0488 | models/Game.js | models/Game.js | /**
* Module dependencies.
*/
const Score = require('./score');
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
// create a schema
const gameSchema = new Schema({
started_at: Date,
ended_at: Date,
teams: [Schema.Types.ObjectId],
score: [Score.schema]
});
// create a model using... | /**
* Module dependencies.
*/
const Score = require('./score');
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
// create a schema
const gameSchema = new Schema({
started_at: Date,
ended_at: Date,
teams: [Schema.Types.ObjectId],
score: [Score.schema]
});
gameSchema.methods.star... | Replace pre function with start game function | Replace pre function with start game function
| JavaScript | mit | lostatseajoshua/Challenger |
c5fd2290ef4ab86998fcb2ee887043920aa52e31 | packages/github-oauth/package.js | packages/github-oauth/package.js | Package.describe({
summary: 'GitHub OAuth flow',
version: '1.2.0'
});
Package.onUse(function (api) {
api.use('oauth2', ['client', 'server']);
api.use('oauth', ['client', 'server']);
api.use('http', ['server']);
api.use('underscore', 'server');
api.use('random', 'client');
api.use('service-configuration... | Package.describe({
summary: 'GitHub OAuth flow',
version: '1.2.1'
});
Package.onUse(function (api) {
api.use('oauth2', ['client', 'server']);
api.use('oauth', ['client', 'server']);
api.use('http', ['server']);
api.use('underscore', ['client', 'server']);
api.use('random', 'client');
api.use('service-c... | Use underscore on client in github-oauth | Use underscore on client in github-oauth
`_` is being used in github_client.js, but not specified in the package
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor |
b7dd1f5adf6eeb229805dece644ac90f0625f4d7 | models/user.js | models/user.js | module.exports = function(sequelize, DataTypes) {
var User = sequelize.define('User', {
username: {type: DataTypes.STRING, unique: true},
password: DataTypes.STRING,
email: DataTypes.STRING
});
return User;
};
| module.exports = function(sequelize, DataTypes) {
var User = sequelize.define('User', {
username: {
type: DataTypes.STRING,
allowNull: false,
unique: true
},
password: {
type: DataTypes.STRING,
allowNull: false
},
em... | Add experience and non-null constraints to User model. | Add experience and non-null constraints to User model.
| JavaScript | mit | kevinwang/questkey |
fba33f2eb3ad86f45d733cf349c6b13a7ebb6ee5 | addon/locales/ru/components/flexberry-maplayer.js | addon/locales/ru/components/flexberry-maplayer.js | export default {
'opacity-label': {
'tooltip': 'Видимость слоя'
},
'attributes-button': {
'tooltip': 'Показать панель атрибутов слоя'
},
'bounds-button': {
'tooltip': 'Приблизить к границам слоя'
},
'add-button': {
'tooltip': 'Добавить новй дочерний слой'
},
'copy-button': {
'toolt... | export default {
'opacity-label': {
'tooltip': 'Видимость слоя'
},
'attributes-button': {
'tooltip': 'Показать панель атрибутов слоя'
},
'bounds-button': {
'tooltip': 'Приблизить к границам слоя'
},
'add-button': {
'tooltip': 'Добавить новый дочерний слой'
},
'copy-button': {
'tool... | Fix typo on add new layer button | Fix typo on add new layer button
| JavaScript | mit | Flexberry/ember-flexberry-gis,Flexberry/ember-flexberry-gis,Flexberry/ember-flexberry-gis |
a9d782a0953b13a18487883ae727b821813a98ef | assets/javascripts/color.js | assets/javascripts/color.js | (function(){
var app = angular.module('color', []);
app.config(['$httpProvider', function($httpProvider) {
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
}]);
app.controller('ColorController', [ '$http', function($http) {
var color = thi... | (function(){
angular.module('color', [])
.config(['$httpProvider', function($httpProvider) {
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
}])
.controller('ColorController', [ '$http', function($http) {
var color = this;
color.sta... | Remove the app variable for styling | Remove the app variable for styling
| JavaScript | mit | cbachich/color_divider-fe |
cd32d405c9f9bc703e5fd4b12c883846b17bdf90 | gulp/build.js | gulp/build.js | 'use strict';
var gulp = require('gulp');
var config = require('./_config.js');
var paths = config.paths;
var $ = config.plugins;
var istanbul = require('browserify-istanbul');
gulp.task('clean', function () {
return gulp.src(paths.tmp, {read: true})
.pipe($.rimraf());
});
gulp.task('build', ['index.html', '... | 'use strict';
var gulp = require('gulp');
var config = require('./_config.js');
var paths = config.paths;
var $ = config.plugins;
var istanbul = require('browserify-istanbul');
gulp.task('clean', function () {
return gulp.src(paths.tmp, {read: true})
.pipe($.rimraf());
});
gulp.task('build', ['index.html', '... | Switch browserify back to debugging mode. | Switch browserify back to debugging mode.
| JavaScript | mpl-2.0 | learnfwd/learnfwd.com,learnfwd/learnfwd.com,learnfwd/learnfwd.com |
2750c4c4c08dc452e7dedea70f15e28e25e0f334 | app/components/Avatar/index.js | app/components/Avatar/index.js | // @flow
import React from 'react';
import { Image, View } from 'react-native';
import theme from '../../theme';
type Props = {
size?: number,
source: string,
style?: Object,
};
export default function Avatar({ size = 44, source, style, ...props }: Props) {
const styles = {
wrapper: {
backgroundCol... | // @flow
import React from 'react';
import { Image, Platform, View } from 'react-native';
import theme from '../../theme';
type Props = {
size?: number,
source: string,
style?: Object,
};
export default function Avatar({ size = 44, source, style, ...props }: Props) {
const styles = {
wrapper: {
bac... | Fix for double attempt at circle on iOS. | Fix for double attempt at circle on iOS.
| JavaScript | mit | Thinkmill/react-conf-app,Thinkmill/react-conf-app,brentvatne/react-conf-app,Thinkmill/react-conf-app |
ca3bfdc68e01285f1118496906799f4a4cef0eb1 | app/routes/events/components/RegisteredSummary.js | app/routes/events/components/RegisteredSummary.js | import React from 'react';
import { Link } from 'react-router';
import Tooltip from 'app/components/Tooltip';
import { FlexRow, FlexColumn, FlexItem } from 'app/components/FlexBox';
const Reg = ({ user }) => (
<Tooltip content={user.fullName}>
<Link to={`/users/${user.username}`} style={{ color: 'white' }}>
... | import React from 'react';
import { Link } from 'react-router';
import Tooltip from 'app/components/Tooltip';
import { FlexRow, FlexColumn, FlexItem } from 'app/components/FlexBox';
const Registration = ({ user }) => (
<Tooltip content={user.fullName}>
<Link to={`/users/${user.username}`} style={{ color: 'white'... | Fix naming and remove unnecessary | Fix naming and remove unnecessary []
| JavaScript | mit | webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp |
096e398fbc89bf0dd3751ad012e6f944e4093949 | assets/js/components/adminbar/AdminBarZeroData.js | assets/js/components/adminbar/AdminBarZeroData.js | /**
* Admin Bar Clicks component.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | /**
* Admin Bar Clicks component.
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | Update zero data column width on desktop. | Update zero data column width on desktop.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
abb3d6440881e4aac491eae0bb90817f469637b2 | controllers/artist-controller.js | controllers/artist-controller.js | var request = require('request');
var model = require('../models/index');
/* Sets a like in the Like table for a given artist and user (by Facebook ID number) */
exports.likeArtist = function(req, res) {
if (isNaN(req.params.id)) {
return res.status(400).send('Bad input: ' + req.params.id);
}
else {
if (... | var model = require('../models/index');
/* Sets a like in the Like table for a given artist and user (by Facebook ID number) */
exports.likeArtist = function(req, res) {
return res.status(200).send('Success');
}
/* Retrieves the artist recommendations for the user */
exports.getArtistRecommendations = function(req,... | Move code to the job queue implementation | Move code to the job queue implementation
| JavaScript | mit | kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender |
15c1b77326ce093c3b2e9be837fdc2d914a10aee | app/views/DiscussionDetails.js | app/views/DiscussionDetails.js | import React from "react-native";
import PeopleListContainer from "../containers/PeopleListContainer";
import Card from "./Card";
import CardTitle from "./CardTitle";
import DiscussionSummary from "./DiscussionSummary";
import CardAuthor from "./CardAuthor";
import ListHeader from "./ListHeader";
const {
ScrollView,
... | import React from "react-native";
import PeopleListContainer from "../containers/PeopleListContainer";
import Card from "./Card";
import CardTitle from "./CardTitle";
import DiscussionSummary from "./DiscussionSummary";
import CardAuthor from "./CardAuthor";
import ListHeader from "./ListHeader";
const {
ScrollView,
... | Remove vertical padding from details card | Remove vertical padding from details card
| JavaScript | unknown | wesley1001/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods |
6be99d06a66f2e339e8f58453829bf2f4b2b6470 | static/main_site/index.js | static/main_site/index.js | $(function () {
$('.frilinks .fri').each(function (n, e) {
e = $(e);
var hr = e.find('a').attr('href');
if (!hr)
return;
e.css({cursor: 'pointer'});
e.click(function (e) {
window.open(hr);
e.preventDefault();
});
});
var hea... | $(function () {
$('.frilinks .fri').each(function (n, e) {
e = $(e);
var hr = e.find('a').attr('href');
if (!hr)
return;
e.css({cursor: 'pointer'});
e.click(function (e) {
window.open(hr);
e.preventDefault();
});
});
var hea... | Use jQuery.scrollTop to support IE. | Use jQuery.scrollTop to support IE.
| JavaScript | mit | micromaomao/maowtm.org,micromaomao/maowtm.org |
970c1663a035f57133359a84d7cabf2d2ebc68ac | unify/framework/source/class/unify/core/Init.js | unify/framework/source/class/unify/core/Init.js | (function() {
var app;
var getApplication = function() {
return app;
};
var shutDown = function() {
lowland.ObjectManager.dispose();
};
var startUp = function() {
var Application = core.Class.getByName(core.Env.getValue("application") + ".Application");
var init = new Application()... | (function() {
var app;
var getApplication = function() {
return app;
};
var shutDown = function() {
lowland.ObjectManager.dispose();
};
var startUp = function() {
var Application = core.Class.getByName(core.Env.getValue("application") + ".Application");
var init = new Application()... | Remove unload objects as this leads to errors | Remove unload objects as this leads to errors
| JavaScript | mit | unify/unify,unify/unify,unify/unify,unify/unify,unify/unify,unify/unify |
45659acb2978512fa873234a2017ace6e68c5be3 | client/datamodel/datamodel.js | client/datamodel/datamodel.js | xcomponents.appVersion = '0.1';
xcomponents.menuOptions = [
{ label : 'Data objects', url : '/', icon : 'fa-dashboard' }
];
xcomponents.models['dataObject'] = {
name : 'Data object',
fields : [
{ label : 'Name' , field: 'name', required: true},
{ label : 'Scope/module', field : 'scope', typ... | xcomponents.appVersion = '0.1';
xcomponents.menuOptions = [
{ label : 'Data objects', url : '/', icon : 'fa-dashboard' }
];
xcomponents.models['dataObject'] = {
name : 'Data object',
fields : [
{ label : 'Name' , field: 'name', required: true},
{ label : 'Scope/module', field : 'scope', typ... | Document library renamed to Document Wiki | Document library renamed to Document Wiki
| JavaScript | agpl-3.0 | SteveFortune/isometrica-app,SteveFortune/isometrica-app,SteveFortune/isometrica-app |
7852d101c6c1e5a1081e38c89923a5de16317c71 | rhaptos2/repo/static/authortools_aloha_settings.js | rhaptos2/repo/static/authortools_aloha_settings.js | /**
* Used to initialize the Aloha settings for this application.
*
* Author: Michael Mulich
* Copyright (c) 2012 Rice University
*
* This software is subject to the provisions of the GNU Lesser General
* Public License Version 2.1 (LGPL). See LICENSE.txt for details.
*/
Aloha = window.Aloha || {};
Aloha.set... | /**
* Used to initialize the Aloha settings for this application.
*
* Author: Michael Mulich
* Copyright (c) 2012 Rice University
*
* This software is subject to the provisions of the GNU Lesser General
* Public License Version 2.1 (LGPL). See LICENSE.txt for details.
*/
Aloha = window.Aloha || {};
Aloha.set... | Use the oerpub image plugin instead. | Use the oerpub image plugin instead.
| JavaScript | lgpl-2.1 | philschatz/rhaptos2.repo,philschatz/rhaptos2.repo,philschatz/rhaptos2.repo |
cc1092a5c94b102448090429f0d7ee14ed26e19d | server/model/content_code/schema.js | server/model/content_code/schema.js | 'use strict';
const _ = require('lodash');
const Bluebird = require('bluebird');
const mongoose = require('mongoose');
const mongooseDelete = require('mongoose-delete');
const ShortId = require('mongoose-shortid-nodeps');
const Settings = require('../../settings');
const Content ... | 'use strict';
const _ = require('lodash');
const Bluebird = require('bluebird');
const mongoose = require('mongoose');
const mongooseDelete = require('mongoose-delete');
const ShortId = require('mongoose-shortid-nodeps');
const Settings = require('../../settings');
const Content ... | Sort content items by DEC _id | Sort content items by DEC _id
| JavaScript | mit | jedbangers/exclusive-content-web,jedbangers/exclusive-content-web |
dfcf1531726ad89afbec3054b666fc6b84a2093a | scripts/embedQA.js | scripts/embedQA.js | /* global $ */
$(() => {
"use strict";
var $qanda = $(".js-q-and-a");
var url = "http://localhost:8000/5614e8bded37eded3f16a9e6";
fetch(url).then((response) => {
response.json().then((resp) => {
if (!resp._embedded || !resp._embedded["hack:questions"] || !resp._embedded["hack:questions"].length) {
... | /* global $ */
$(() => {
"use strict";
var $qanda = $(".js-q-and-a");
var url = "http://localhost:8000/5614e8bded37eded3f16a9e6";
fetch(url).then((response) => {
response.json().then((resp) => {
if (!resp._embedded || !resp._embedded["hack:questions"] || !resp._embedded["hack:questions"].length) {
... | Add styling classes to the embedded product page script | Add styling classes to the embedded product page script
| JavaScript | mit | roelbaka/hyperquaid,eturan/hyperquaid,epallerols/hyperquaid,peej/hyperquaid |
b79362a07eaa527f27f2e28b8e6f4f5ebf37af30 | app/src/index.js | app/src/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import './index.css';
import App from './App';
import Immutable from 'immutable'
import rootReducer from './rootReducer'
import registerServiceWorker from './registerServiceWorker';
im... | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import './index.css';
import App from './components/App';
import Immutable from 'immutable'
import rootReducer from './rootReducer'
import registerServiceWorker from './registerService... | Fix App import pointing to old place | Fix App import pointing to old place
| JavaScript | mit | kheldysh/discursor,kheldysh/discursor |
6ca919bb4d7d42ef8dd1aa284a07bf3500a2d2a5 | examples/express/api.js | examples/express/api.js | const bugsnag = require("./bugsnag");
function attemptLogin(username, password) {
return new Promise((resolve, reject) => {
if (username === "crash") {
// Obviously you wouldn't expect to see this in your production app, but here is an example of what
// you might have underlying your database abstra... | const bugsnag = require("./bugsnag");
function attemptLogin(username, password) {
return new Promise((resolve, reject) => {
if (username === "crash") {
// Obviously you wouldn't expect to see this in your production app, but here is an example of what
// you might have underlying your database abstra... | Check for request data prior to setting user | chore(examples): Check for request data prior to setting user
If outside of request scope (or the process domain is otherwise null,
then skip setting request data) | JavaScript | mit | bugsnag/bugsnag-node |
04ca961a6b19d7bfc2d2962a6f9c6e9f876b333d | client/app/config/config.js | client/app/config/config.js | module.exports = {
notice: {
'logFile': './logs/ark-desktop.log',
'level': 1,
'defaultHideDelay': 5000
}
}; | module.exports = {
notice: {
'logFile': null,
'level': 1,
'defaultHideDelay': 5000
}
}; | Disable logging to file by default | Disable logging to file by default
| JavaScript | mit | krau612/ark-desktop,krau612/ark-desktop,krau612/ark-desktop |
e66ec1691a3ba9bf445a166ac3ebdb84efe37df9 | src/DeepNgRoot/Frontend/js/app/module/ng-config.js | src/DeepNgRoot/Frontend/js/app/module/ng-config.js | 'use strict';
'format es6';
export class Config {
/**
*
* @param {Boolean} isLocalhost
* @param {String} ngRewrite
* @param {Object} $locationProvider
*/
constructor(isLocalhost, ngRewrite, $locationProvider) {
if (!isLocalhost && ngRewrite === '/') {
$locationProvider.html5Mode(true);
... | 'use strict';
'format es6';
export class Config {
/**
*
* @param {Boolean} isLocalhost
* @param {String} ngRewrite
* @param {Object} $locationProvider
*/
constructor(isLocalhost, ngRewrite, $locationProvider) {
let isAwsWebsite = /\.amazonaws\.com$/i.test(window.location.hostname);
if (!isAw... | Disable html5Mode if hostname is s3-website | Disable html5Mode if hostname is s3-website
| JavaScript | mit | MitocGroup/deep-microservices-root-angularjs,MitocGroup/deep-microservices-root-angularjs,MitocGroup/deep-microservices-root-angularjs |
9f946527929d65607c0d42d33733d370fee27f83 | spec/api-system-preferences-spec.js | spec/api-system-preferences-spec.js | const assert = require('assert')
const {remote} = require('electron')
const {systemPreferences} = remote
describe('systemPreferences module', function () {
if (process.platform !== 'darwin') {
return
}
describe('systemPreferences.getUserDefault(key, type)', function () {
it('returns values for known use... | const assert = require('assert')
const {remote} = require('electron')
const {systemPreferences} = remote
describe('systemPreferences module', function () {
describe('systemPreferences.getAccentColor', function () {
if (process.platform !== 'win32') {
return
}
it('should return a non-empty string',... | Add basic spec for getAccentColor | Add basic spec for getAccentColor
| JavaScript | mit | shiftkey/electron,renaesop/electron,brenca/electron,wan-qy/electron,electron/electron,miniak/electron,seanchas116/electron,seanchas116/electron,aliib/electron,aliib/electron,the-ress/electron,gabriel/electron,the-ress/electron,electron/electron,dongjoon-hyun/electron,biblerule/UMCTelnetHub,tonyganch/electron,dongjoon-h... |
0798ad99e384fb91233ff0ba9c7ab8f439d1cb85 | public/js/report.js | public/js/report.js | /* Can't use $.toggle() as we are using a custom `display` that is `none`
when the page first loads */
function toggle (name, mode) {
var id = name + '-' + mode
var e = document.getElementById(id)
var ej = $(e)
e.style.display = e.style.display == 'table-row' ? 'none' : 'table-row'
$('#' + id + '-btn').tog... | /* Can't use $.toggle() as we are using a custom `display` that is `none`
when the page first loads */
function toggle (name, mode) {
var id = name.replace(/\./g, '\\.') + '-' + mode
, e = $('#' + id)
if (e.css('display') === 'none') var activating = 1
else var activating = 0
... | Fix dot escaping for jQuery and use $()[0] | Fix dot escaping for jQuery and use $()[0]
| JavaScript | mit | TimothyGu/fateserver-node,TimothyGu/fateserver-node |
013aea55f73a9cdf4063be8efb6689ae6fd6f985 | services/ui/src/components/LogViewer/index.js | services/ui/src/components/LogViewer/index.js | import React from 'react';
import { bp } from 'lib/variables';
const LogViewer = ({ logs }) => (
<React.Fragment>
<div className="logs">
<div className="log-viewer">{logs || 'Logs are not available.'}</div>
</div>
<style jsx>{`
.logs {
padding: 0 calc(100vw / 16) 48px;
width: ... | import React from 'react';
import { bp } from 'lib/variables';
const LogViewer = ({ logs }) => (
<React.Fragment>
<div className="logs">
<div className="log-viewer">{logs || 'Logs are not available.'}</div>
</div>
<style jsx>{`
.logs {
padding: 0 calc(100vw / 16) 48px;
width: ... | Allow log container to be full height | Allow log container to be full height
When viewing deployment logs in the dashboard, the logs are typically very long, but the log window is limited to 600px heigh. Given there is nothing else on the deployment page other than the logs, would be good if the height wasn't limited.
There's a few benefits to this:
... | JavaScript | apache-2.0 | amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon |
3ea4eebf2ed5dc409460b86a148b8fb0cdb2f9d7 | components/counter/Counter.js | components/counter/Counter.js | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import omit from 'lodash.omit';
import theme from './theme.css';
class Counter extends PureComponent {
static propTypes = {
children: PropTypes.node,
className: PropTypes.string,
color: PropType... | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import omit from 'lodash.omit';
import { Monospaced } from '../typography';
import theme from './theme.css';
class Counter extends PureComponent {
static propTypes = {
children: PropTypes.node,
clas... | Use our own Monospaced component instead of applying monospace class from ui-typography | Use our own Monospaced component instead of applying monospace class from ui-typography
| JavaScript | mit | teamleadercrm/teamleader-ui |
6c0ed962b38457d9b95e9318a711ffbf0cf838c3 | backend/models/users.js | backend/models/users.js | (function () {
var User = require('../database/mongodb').Users,
jwt = require('jwt-simple'),
async = require('async'),
crypto = require('crypto');
function _getUserInfo(userId, callback) {
User.findById(userId, function (err, resp) {
callback(err, resp);
})
... | (function () {
var User = require('../database/mongodb').Users,
jwt = require('jwt-simple'),
async = require('async'),
crypto = require('crypto');
function _getUserInfo(userId, callback) {
User.findById(userId, function (err, resp) {
callback(err, resp);
})
... | Update function help interact with User | Update function help interact with User
| JavaScript | mit | thinhit/Buzz |
65a6f25c4523a2844ef7c0bc8dc1dbb2b0edc347 | app/components/code-snippet.js | app/components/code-snippet.js | import Ember from "ember";
import Snippets from "../snippets";
/* global require */
var Highlight = require('highlight.js');
export default Ember.Component.extend({
tagName: 'pre',
classNameBindings: ['language'],
unindent: true,
_unindent: function(src) {
if (!this.get('unindent')) {
return src;
... | import Ember from "ember";
import Snippets from "../snippets";
/* global require */
var Highlight = require('highlight.js');
export default Ember.Component.extend({
tagName: 'pre',
classNameBindings: ['language'],
unindent: true,
_unindent: function(src) {
if (!this.get('unindent')) {
return src;
... | Remove reliance on function prototype extension. | Remove reliance on function prototype extension.
| JavaScript | mit | greyhwndz/ember-code-snippet,mike-north/ember-code-snippet,ef4/ember-code-snippet,ef4/ember-code-snippet |
4279d160bdd741ff40b6f1d0b87eccea9b16bf18 | lib/commands/help.js | lib/commands/help.js | 'use strict';
var Command = require('../models/command');
var lookupCommand = require('../cli/lookup-command');
var string = require('../utilities/string');
module.exports = Command.extend({
name: 'help',
works: 'everywhere',
description: 'Outputs the usage instructions for all commands or the provided command'... | 'use strict';
var Command = require('../models/command');
var lookupCommand = require('../cli/lookup-command');
var string = require('../utilities/string');
module.exports = Command.extend({
name: 'help',
works: 'everywhere',
description: 'Outputs the usage instructions for all commands or the provided command'... | Remove var command declaration (failing jshint test) | Remove var command declaration (failing jshint test)
| JavaScript | mit | eliotsykes/ember-cli,szines/ember-cli,beatle/ember-cli,xiujunma/ember-cli,code0100fun/ember-cli,ServiceTo/ember-cli,typeoneerror/ember-cli,taras/ember-cli,mixonic/ember-cli,williamsbdev/ember-cli,romulomachado/ember-cli,ef4/ember-cli,quaertym/ember-cli,coderly/ember-cli,nruth/ember-cli,kriswill/ember-cli,seawatts/ember... |
d9e767bc15f62a28bba34b139e98876fb3ad9f03 | lib/commands/help.js | lib/commands/help.js | 'use strict';
var fs = require('fs');
var path = require('path');
module.exports = function() {
var content = fs.readFileSync(path.resolve(__dirname, '../templates/help.txt'), 'utf8');
console.log(content);
};
| 'use strict';
var fs = require('fs');
var path = require('path');
module.exports = function() {
var content = fs.readFileSync(
path.resolve(__dirname, '../templates/help.txt'), 'utf8');
console.log(content);
};
| Break line to avoid having a line that's too long. | Break line to avoid having a line that's too long.
| JavaScript | mit | stillesjo/buh |
913c4f65c986da00961221356cc74c17ac270553 | js/app.js | js/app.js | App = Ember.Application.create({});
App.IndexRoute = Ember.Route.extend({
setupController: function(controller) {
controller.set('content', ['red', 'yellow', 'blue']);
}
}); | App = Ember.Application.create();
App.Router.map(function() {
// put your routes here
});
App.IndexRoute = Ember.Route.extend({
model: function() {
return ['red', 'yellow', 'blue'];
}
});
| Add router stub and clean up IndexRoute | Add router stub and clean up IndexRoute | JavaScript | mit | miguelcoba/ember-intro-code,miguelcoba/ember-intro-code |
1ffc1f60cb159cf47152c5d778505bd04ec71f0e | js/rts.js | js/rts.js | // Runtime
////////////////////////////////////////////////////////////////////////////////
// Thunks
// A thunk object
function $(value)
{
this.forced = false;
this.value = value;
}
// Force the thunk object
$.prototype.force = function(nocache)
{
return nocache ?
this.value() :
(this.forced ?
th... | // Runtime
////////////////////////////////////////////////////////////////////////////////
// Thunks
// A thunk object
function $(value)
{
this.forced = false;
this.value = value;
}
// Force the thunk object
$.prototype.force = function()
{
return this.forced ?
this.value :
(this.value = this.value(),... | Speed up by having separate thunk forcings | Speed up by having separate thunk forcings
| JavaScript | bsd-3-clause | chrisdone/fore |
d80b1ea4db12bc7f09f57b1ce9986a0eab9aa327 | src/html.js | src/html.js | import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import { ServerStyleSheet } from 'styled-components';
const HTML = props => {
const head = Helmet.rewind();
const sheet = new ServerStyleSheet();
const main = sheet.collectStyles(<div id="___gatsby" dangerouslySet... | import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import { ServerStyleSheet } from 'styled-components';
const HTML = props => {
const head = Helmet.rewind();
const sheet = new ServerStyleSheet();
const main = sheet.collectStyles(<div id="___gatsby" dangerouslySet... | Fix PropTypes for local dev server | Fix PropTypes for local dev server
| JavaScript | mit | iiroj/iiro.fi,iiroj/iiro.fi,iiroj/iiro.fi |
c4158a6e6b11915fc09336bc58376089f4fcd7d1 | src/main.js | src/main.js | import Vue from 'vue';
import VueRouter from 'vue-router';
import App from './App';
Vue.use(VueRouter);
const Main = Vue.extend({});
const router = new VueRouter();
router.map({
'/': { component: App },
});
router.start(Main, 'body');
| import Vue from 'vue';
import VueRouter from 'vue-router';
import App from './App';
Vue.use(VueRouter);
const Main = Vue.extend({});
const router = new VueRouter({ history: true });
router.map({
'/': { component: App },
});
router.start(Main, 'body');
| Use history option for vue-router | Use history option for vue-router
| JavaScript | mit | noraesae/soramaru,noraesae/soramaru |
98889b08d5dc039c5a58c522e5b2c9def1081a2d | src/util.js | src/util.js | const moment = require("moment");
let ctx;
try {
const chalk = require("chalk");
ctx = new chalk.constructor({enabled:true});
} catch (err) {
// silent
}
function getTime() {
const curHour = new Date().getHours() % 12 || 12;
return (curHour < 10 ? " " : "") + moment().format("LTS");
}
module.e... | const moment = require("moment");
let ctx;
try {
const chalk = require("chalk");
ctx = new chalk.constructor({enabled:true});
} catch (err) {
// silent
}
function getTime() {
return (" " + moment().format("LTS")).slice(-11);
}
module.exports = {
log(...args) {
if (ctx) console.log(getTi... | Improve time generation for logging | Improve time generation for logging
| JavaScript | mit | EPICZEUS/simple-discord.js |
c7812c809faab6ff14d7125edcce9b0bb2e58abc | react-pure-function/app/index.js | react-pure-function/app/index.js | var React = require('react');
var ReactDOM = require('react-dom');
var ProfilePic = React.createClass({
render: function() {
return (
<img src={'https://photo.fb.com/' + this.props.username}></img>
);
}
});
var ProfileLink = React.createClass({
render: function() {
retu... | var React = require('react');
var ReactDOM = require('react-dom');
var ProfilePic = function(props) {
return <img src={'https://twitter.com/' + this.props.username + '/profile_image?size=original'}></img>
}
// var ProfilePic = React.createClass({
// render: function() {
// return (
// <img... | Create component using statelless component | Create component using statelless component
| JavaScript | mit | kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidch... |
1cf5a0fe163a7769a83abc3cf5b14b91089a5f28 | lib/s3.js | lib/s3.js | var assert = require('assert')
var AWS = require('aws-sdk')
/**
* Create s3 client
* @param {Object} config AWS configuration
* @returns {Object} s3 client and helpers
*/
module.exports = function s3Loader (config) {
assert(config, 's3Loader requires config')
var client = new AWS.S3(config)
client.endpoint ... | const assert = require('assert')
const AWS = require('aws-sdk')
/**
* Create s3 client
* @param {Object} config AWS configuration
* @returns {Object} s3 client and helpers
*/
module.exports = function s3Loader (config) {
assert(config, 's3Loader requires config')
const client = new AWS.S3(config)
return {
... | Use const and remove useless lines | Use const and remove useless lines
| JavaScript | apache-2.0 | cesarandreu/bshed,cesarandreu/bshed |
94564b672b27eeb8229e03aa324f73d8f0339bc2 | js/outputs.js | js/outputs.js | 'use strict';
var OutputManager = (function () {
var outputs = [];
var active = [];
var display = undefined;
var addOutput = function(o) {
outputs.push(o);
};
var activateOutput = function(o) {
active.push(o);
};
var deactivateOutput = function(o) {
var i = active.indexOf(o);
active... | 'use strict';
var OutputManager = (function() {
var outputs = [];
var active = [];
var display = undefined;
var addOutput = function(o) {
outputs.push(o);
};
var activateOutput = function(o) {
active.push(o);
};
var deactivateOutput = function(o) {
var i = active.indexOf(o);
active.... | Fix up gjshint errors in output manager | Fix up gjshint errors in output manager
| JavaScript | bsd-3-clause | qdot/giftic,qdot/giftic,qdot/giftic |
7cf0ff5e0bcf845638d5c4bdbae06811bfc5614b | app/assets/javascripts/teikei.js | app/assets/javascripts/teikei.js | // Overwriting Backbone.Marionette.Renderer to use JST
Backbone.Marionette.Renderer.render = function(template, data) {
if (!JST[template]) throw "Template '" + template + "' not found!";
return JST[template](data);
};
// Extend and configure backbone-forms editors
var editors = Backbone.Form.editors;
editors.Ye... | // Overwriting Backbone.Marionette.Renderer to use JST
Backbone.Marionette.Renderer.render = function(template, data) {
if (!JST[template]) throw "Template '" + template + "' not found!";
return JST[template](data);
};
// Extend and configure backbone-forms editors
var editors = Backbone.Form.editors;
editors.Ye... | Set German month names for date editor. | Set German month names for date editor.
| JavaScript | agpl-3.0 | sjockers/teikei,teikei/teikei,sjockers/teikei,sjockers/teikei,teikei/teikei,teikei/teikei |
458ab503f8d0f6a7cc05ec735efac7cf15f46e67 | app/assets/scripts/views/home.js | app/assets/scripts/views/home.js | 'use strict';
import React from 'react';
import { Link } from 'react-router';
var Home = React.createClass({
displayName: 'Home',
render: function () {
return (
<section>
<header className='page__header--landing'>
<div className='page__headline--landing'>
<h1 className='pag... | 'use strict';
import React from 'react';
import { Link } from 'react-router';
var Home = React.createClass({
displayName: 'Home',
render: function () {
return (
<section>
<header className='page__header--landing'>
<div className='page__headline--landing'>
<h1 className='pag... | Replace Lorem Ipsum with intro text | Replace Lorem Ipsum with intro text
| JavaScript | bsd-2-clause | orma/openroads-vn-analytics,orma/openroads-vn-analytics,orma/openroads-vn-analytics |
5be6cac6e0fa7d206a47329c0cbabf484b203317 | src/request/repository/user-repository-internal.js | src/request/repository/user-repository-internal.js | 'use strict';
var _ = require('lodash');
var glimpse = require('glimpse');
// store Found Summary
(function () {
function processFoundSummary(requestRepositoryPayload) {
// TODO: need to update to deal with the fact that requests aren't distinct
var messages = requestRepositoryPayload.new... | 'use strict';
var _ = require('lodash');
var glimpse = require('glimpse');
// store Found Summary
(function () {
function processFoundSummary(requestRepositoryPayload) {
// TODO: need to update to deal with the fact that requests aren't distinct
var messages = requestRepositoryPayload.new... | Update user to only include requests that match root filter set | Update user to only include requests that match root filter set
| JavaScript | unknown | Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype |
61212b63fb10e5a75ac5f87685823cd1f24dab2a | app/models/coordinator.js | app/models/coordinator.js | import EmberObject from '@ember/object';
import Evented from '@ember/object/evented';
import { computed } from '@ember/object';
import ObjHash from './obj-hash';
import { unwrapper } from 'ember-drag-drop/utils/proxy-unproxy-objects';
export default EmberObject.extend(Evented, {
objectMap: computed(function() {
... | import EmberObject from '@ember/object';
import Evented from '@ember/object/evented';
import { computed } from '@ember/object';
import ObjHash from './obj-hash';
import { unwrapper } from 'ember-drag-drop/utils/proxy-unproxy-objects';
export default EmberObject.extend(Evented, {
objectMap: computed(function() {
... | Use send instead of sendAction | Use send instead of sendAction
| JavaScript | mit | mharris717/ember-drag-drop,mharris717/ember-drag-drop |
7fbf23d3569563524f9defa413b9e59da123b04a | styleguide/devServer.js | styleguide/devServer.js | var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack-dev.config');
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(8181, 'localhost', function(err) {
if (err) {
con... | var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack-dev.config');
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(8080, 'localhost', function(err) {
if (err) {
con... | Change dev server port so less confusing | Change dev server port so less confusing
| JavaScript | mit | scott-riley/loggins,PactCoffee/loggins,iest/loggins,tomgatzgates/loggins,tomgatzgates/loggins,PactCoffee/loggins,chrisspang/loggins,chrisspang/loggins,rdjpalmer/loggins,rdjpalmer/loggins,iest/loggins,scott-riley/loggins |
23e751b09f927e2826a6a4083868f7f864fbc94c | helpers.js | helpers.js | console.log("Loading helpers.js");
window.snip$ = (function() {
var path = require("path");
function currEd() { return lt.objs.editor.pool.last_active.call(null); }
function currPath() { return lt.objs.tabs.__GT_path(currEd()); }
function hasSelection() { return lt.objs.editor.selection_QMARK_.call(null, c... | console.log("Loading helpers.js");
window.snip$ = (function() {
var path = require("path");
function currEd() { return lt.objs.editor.pool.last_active.call(null); }
function currPath() { return lt.objs.tabs.__GT_path(currEd()); }
function currFileName() {
var p = currPath();
return p ? path.basena... | Allow wrapping around current line even though not selected | Allow wrapping around current line even though not selected
| JavaScript | mit | rundis/lt-snippets,weaver-viii/lt-snippets |
9a0198e14d43498ff563db56fec0747cb5419489 | main/constants/ui.js | main/constants/ui.js | // Height of main input
export const INPUT_HEIGHT = 45;
// Heigth of default result line
export const RESULT_HEIGHT = 45;
// Heigth of default result line
export const RESULT_WIDTH = 250;
// Width of main window
export const WINDOW_WIDTH = 600;
// Maximum results that would be rendered
export const MAX_RESULTS = 25... | // Height of main input
export const INPUT_HEIGHT = 45;
// Heigth of default result line
export const RESULT_HEIGHT = 45;
// Heigth of default result line
export const RESULT_WIDTH = 250;
// Width of main window
export const WINDOW_WIDTH = 650;
// Maximum results that would be rendered
export const MAX_RESULTS = 25... | Increase width of main input to 650px | Increase width of main input to 650px
| JavaScript | mit | KELiON/cerebro,KELiON/cerebro |
a1e304bb328a6b4ea8b136414e496929df2085a1 | contrib/rethinkdb-co/index.js | contrib/rethinkdb-co/index.js | var _ = require('lodash');
var RethinkDB = require(__dirname + '/../rethinkdb');
var connex = require(__dirname + '/../../lib');
var RethinkDBCo = module.exports = function(options) {
if(!(this instanceof RethinkDBCo)) {
return new RethinkDBCo(options);
}
return RethinkDB.apply(this, arguments);
};
requir... | var _ = require('lodash');
var RethinkDB = require(__dirname + '/../rethinkdb');
var connex = require(__dirname + '/../../lib');
var RethinkDBCo = module.exports = function(options) {
if(!(this instanceof RethinkDBCo)) {
return new RethinkDBCo(options);
}
return RethinkDB.apply(this, arguments);
};
requir... | Add possibility to pass options to rethinkdb-co run | Add possibility to pass options to rethinkdb-co run
| JavaScript | mit | tedeh/connex |
1039beba35e4eb474cb35ce300aa8f0b437a7ea0 | lib/config.js | lib/config.js | 'use strict';
var cc = require('config-chain');
var autoconfig = function(overrides) {
var config = cc(overrides).add({
IP: process.env.OPENSHIFT_NODEJS_IP || '0.0.0.0',
PORT: process.env.FH_PORT || process.env.OPENSHIFT_NODEJS_PORT || 8001,
dataTopicPrefix: ':cloud:data',
persistentStore: process.e... | 'use strict';
var cc = require('config-chain');
/**
* The sync frequency to be passed to fh-wfm-sync.
* Sync frequency is set individually for the client and the server.
* * On the client the setting is named `sync_frequency`.
* * On the server the setting is named `syncFrequency`.
* It is recommended that these... | Update server `syncFrequency` value to match client `sync_frequency` | Update server `syncFrequency` value to match client `sync_frequency`
Currently the server-side dataset sync frequencies are set to 10 seconds
whereas the client-side dataset sync frequencies are set to 5 seconds.
Having differing sync frequencies can cause unnecessary load on the
server, causing a full sync to be per... | JavaScript | mit | feedhenry-raincatcher/raincatcher-demo-cloud |
51cf6e6bc5fab543b18c23a7698eccaf006a9ca9 | generators/app/templates/_gulpfile.js | generators/app/templates/_gulpfile.js | var gulp = require('gulp');
var tslint = require('gulp-tslint');
var exec = require('child_process').exec;
var jasmine = require('gulp-jasmine');
var gulp = require('gulp-help')(gulp);
gulp.task('tslint', 'Lints all TypeScript source files', function(){
return gulp.src('src/**/*.ts')
.pipe(tslint())
.p... | var gulp = require('gulp');
var tslint = require('gulp-tslint');
var exec = require('child_process').exec;
var jasmine = require('gulp-jasmine');
var gulp = require('gulp-help')(gulp);
var tsFilesGlob = (function(c) {
return c.filesGlob || c.files || '**/*.ts';
})(require('./tsconfig.json'));
gulp.task('t... | Use filesGlob from tsconfig in gulp file | Use filesGlob from tsconfig in gulp file
| JavaScript | mit | ospatil/generator-node-typescript,ospatil/generator-node-typescript |
5a5565b39d96ce64767089bab8911ed891f44374 | isaac_math.js | isaac_math.js | // Math Library for ISAAC Physics.
// addVector function.
// Takes in two vectors, returns a new vector made by adding
// the inputs together. If the two input vectors don't have the same
// length, the first input vector will be returned.
function addVector (vectorA, vectorB) {
if(vectorA.length === vectorB.length) ... | // Math Library for ISAAC Physics.
// addVector function.
// Takes in two vectors, returns a new vector made by adding
// the inputs together. If the two input vectors don't have the same
// length, the first input vector will be returned.
function addVector (vectorA, vectorB) {
if(vectorA.length === vectorB.length) ... | Add dot product function to math module. | Add dot product function to math module.
| JavaScript | mit | isaacjs/ISAAC |
77e033f68bc06a8b522ab1d13c43473cc22e6911 | build/build.js | build/build.js | const rollup = require('rollup').rollup;
const babel = require('rollup-plugin-babel');
rollup({
entry: './src/index.js',
external: [
'babel-runtime/core-js/json/stringify',
'babel-runtime/core-js/object/assign',
'babel-runtime/helpers/asyncToGenerator',
'babel-runtime/regenerato... | const rollup = require('rollup').rollup;
const babel = require('rollup-plugin-babel');
rollup({
entry: './src/index.js',
external: [
'babel-runtime/core-js/json/stringify',
'babel-runtime/core-js/object/assign',
'babel-runtime/helpers/asyncToGenerator',
'babel-runtime/regenerato... | Remove arrow func compatible with old version node | Remove arrow func compatible with old version node
| JavaScript | mit | differui/rollup-plugin-sass,differui/rollup-plugin-sass |
bc629f18472ae90a87e4966a73e0cce6f0b250bf | lib/current.js | lib/current.js | // Date object that always reflects current time (with one second resolution)
'use strict';
var curry = require('es5-ext/lib/Function/prototype/curry')
, update;
update = function () {
this.setTime(Date.now());
};
module.exports = function () {
var date = new Date();
date.clear = curry.call(clearInterval, set... | // Date object that always reflects current time (with one second resolution)
'use strict';
var partial = require('es5-ext/lib/Function/prototype/partial')
, update;
update = function () {
this.setTime(Date.now());
};
module.exports = function () {
var date = new Date();
date.clear = partial.call(clearInterva... | Update up to changes in es5-ext | Update up to changes in es5-ext
| JavaScript | mit | medikoo/clock |
134d89a3d6379df9cbdf2a2194a229cd2980a0f5 | modules/DTMF/DTMF.js | modules/DTMF/DTMF.js | /* global APP */
/**
* A module for sending DTMF tones.
*/
var DTMFSender;
var initDtmfSender = function() {
// TODO: This needs to reset this if the peerconnection changes
// (e.g. the call is re-made)
if (DTMFSender)
return;
var localAudio = APP.RTC.localAudio;
if (localAudio && localA... | /* global APP */
/**
* A module for sending DTMF tones.
*/
var DTMFSender;
var initDtmfSender = function() {
// TODO: This needs to reset this if the peerconnection changes
// (e.g. the call is re-made)
if (DTMFSender)
return;
var localAudio = APP.RTC.localAudio;
if (localAudio && localA... | Fix a problem with accessing peerconnection, use duration and pause in the API. | Fix a problem with accessing peerconnection, use duration and pause in the API.
| JavaScript | apache-2.0 | dyweb/jitsi-meet,gerges/jitsi-meet,JiYou/jitsi-meet,IpexCloud/jitsi-meet,gpolitis/jitsi-meet,jitsi/jitsi-meet,gpolitis/jitsi-meet,kosmosby/jitsi-meet,jitsi/jitsi-meet,NxTec/jitsi-meet,gpolitis/jitsi-meet,jitsi/jitsi-meet,bgrozev/jitsi-meet,jitsi/jitsi-meet,bgrozev/jitsi-meet,buzzyboy/jitsi-meet,procandi/jitsi-meet,proc... |
32828677d21b5de37859289632f91485ec20a2a1 | lib/router.js | lib/router.js | var subscriptions = new SubsManager();
Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound'
});
Router.route('/', {
name: 'home',
waitOn: function() {
return subscriptions.subscribe('allOwnedMangas', Meteor.userId());
},
fastRender: true
});
Router.route('/mi... | var subscriptions = new SubsManager();
Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound'
});
Router.route('/', {
name: 'home',
waitOn: function() {
return subscriptions.subscribe('allOwnedMangas', Meteor.userId());
},
fastRender: ... | Add a new subcription for the tomeDetails route | Add a new subcription for the tomeDetails route
| JavaScript | mit | dexterneo/mangas,dexterneo/mangas,dexterneo/mangatek,dexterneo/mangatek |
6e185f1b5f34fe3416ee95a00aeeb5c5d0273fc9 | lib/config.js | lib/config.js | 'use strict';
var fs = require('fs');
var path = require('path');
exports.getApiConfig = function() {
return Object.freeze({
port: process.env.SERVER_PORT || 4002,
heartbeat: process.env.HEARTBEAT === 'true',
logLevel: process.env.LOG_LEVEL || 'info',
api: Object.freeze({
apiURL: process.env.A... | 'use strict';
var fs = require('fs');
var path = require('path');
exports.getApiConfig = function() {
return Object.freeze({
port: process.env.SERVER_PORT || 4002,
heartbeat: process.env.HEARTBEAT === 'true',
logLevel: process.env.LOG_LEVEL || 'info',
api: Object.freeze({
apiURL: process.env.A... | Change apiURL default from docker to localhost | Change apiURL default from docker to localhost
As this is a public repository, we can't assume everybody will be using docker
and have the same container name.
MOM-554
| JavaScript | mpl-2.0 | jembi/openhim-mediator-file-queue,jembi/openhim-mediator-file-queue |
1d158c46020f6b9d42d5043a6f84c551032003fc | lib/config.js | lib/config.js | /*****************************************************************************
* utils.js
* Includes various utility functions
*/
var path = require('path');
var fs = require('fs');
var nconf = require('nconf');
var internals = {};
internals.configInited = false;
internals.Config = {}
internals.Config.load = f... | /*****************************************************************************
* utils.js
* Includes various utility functions
*/
var path = require('path');
var fs = require('fs');
var nconf = require('nconf');
var internals = {};
internals.configInited = false;
internals.Config = {}
/**
* Loads the config f... | Return default value on undefined only | Return default value on undefined only
| JavaScript | mit | altenia/ecofyjs-config |
9adb2f964716f4766765a566428ea101773fb878 | helper/DiskDataStore.js | helper/DiskDataStore.js | var fs = require('fs');
var Settings = require('./Settings');
var DiskDataStore = {};
DiskDataStore.init = function (){
this._CACHE_PATH = Settings.get('cache_path');
fs.mkdirSync(this._CACHE_PATH);
};
DiskDataStore.deleteEntry = function (key){
var fileName = this._CACHE_PATH + '/' + key;
fs.unlink(fileName... | var fs = require('fs');
var Settings = require('./Settings');
var DiskDataStore = {};
var fs = require('fs');
var deleteFolderRecursive = function(path) {
if( fs.existsSync(path) ) {
fs.readdirSync(path).forEach(function(file,index){
var curPath = path + '/' + file;
if(fs.lstatSync(curPath).isDirect... | Remove the cache folder before initializing data cache. | Remove the cache folder before initializing data cache.
| JavaScript | apache-2.0 | weilonge/unidisk,weilonge/unidisk,weilonge/unidisk |
92d2afce8ed638f0b8673c52ce14af955423a25c | lib/router.js | lib/router.js | Router.configure({
layoutTemplate: 'layout',
waitOn: function() {
return Meteor.subscribe('projects');
}
});
Router.route('/', {
});
| Router.configure({
layoutTemplate: 'layout'
});
Router.route('/', {
name: 'projectsList'
});
| Add routes for layout and projects list | Add routes for layout and projects list
| JavaScript | mit | PUMATeam/puma,PUMATeam/puma |
2d815e46d2cde87c660f38af6ec39843470359ed | grunt/mkdir.js | grunt/mkdir.js | module.exports = {
mklibdir: {
options: {
mode: 0644,
create: ['lib/fonts', 'lib/css', 'lib/font','lib/lang', 'dist', 'dist/font','dist/lang']
}
}
};
| module.exports = {
mklibdir: {
options: {
mode: 0755,
create: ['lib/fonts', 'lib/css', 'lib/font','lib/lang', 'dist', 'dist/font','dist/lang']
}
}
};
| Change folder access right to 0755 | Change folder access right to 0755
| JavaScript | mit | stevennick/videojs-ad-scheduler,stevennick/ott-ad-scheduler,stevennick/videojs-ad-scheduler,stevennick/ott-ad-scheduler |
1135366b62530ffa4ecb8e2c9505f73d79e94d7a | gulp-config.js | gulp-config.js | module.exports = {
folder: {
tasks: 'tasks',
src: 'src',
build: 'assets',
prod: 'production'
},
task: {
htmlHint: 'html-hint',
jsHint: 'js-hint',
buildCustomJs: 'build-custom-js',
buildJsVendors: 'build-js-vendors',
buildSass: 'build-sass',
buildSassProd: 'build-sass-produc... | module.exports = {
folder: {
tasks: 'tasks',
src: 'src',
build: 'assets',
prod: 'production'
},
task: {
htmlHint: 'html-hint',
jsHint: 'js-hint',
buildCustomJs: 'build-custom-js',
buildJsVendors: 'build-js-vendors',
buildSass: 'build-sass',
buildSassProd: 'build-sass-produc... | Add more files to ignore for production task | Add more files to ignore for production task
| JavaScript | mit | KirillPd/web-starter-kit,KirillPd/web-starter-kit,justcoded/web-starter-kit,vodnycheck/justcoded,justcoded/web-starter-kit,vodnycheck/justcoded |
3c85a294c6173604793faa68ed829a10122efc7d | examples/babel/webpack.config.js | examples/babel/webpack.config.js | // Note: this example requires babel-loader
// npm install babel-loader
var path = require('path');
module.exports = {
context: __dirname,
entry: './file-to-annotate',
output: {
path: __dirname + '/dist',
filename: 'build.js'
},
resolveLoader: {
fallback: path.resolve(__dirname, '.... | // Note: this example babel and equires babel-loader
// npm install babel babel-loader
var path = require('path');
module.exports = {
context: __dirname,
entry: './file-to-annotate',
output: {
path: __dirname + '/dist',
filename: 'build.js'
},
resolveLoader: {
fallback: path.resolv... | Update babel example to take peer dependency to babel into account. | Update babel example to take peer dependency to babel into account.
Since npm 3 peer dependencies will not be installed automatically
(which was the default in npm 2.x). For this reason, running
npm install babel-loader
in examples/babel will throw an error when running with npm 3.
This change simply updates the com... | JavaScript | mit | huston007/ng-annotate-loader,huston007/ng-annotate-loader |
2f4d3ee03667fffb105fa2080abbcefe73a10e94 | src/file_seacher.js | src/file_seacher.js | /* @flow */
import _ from 'lodash'
import type { OrderedMap } from 'immutable';
import type MediaFile from './media_file';
export default class FileSeacher {
files: OrderedMap<number, MediaFile>;
constructor(files: OrderedMap<number, MediaFile>) {
this.files = files;
}
search(searchKeyword: string): Ord... | /* @flow */
import _ from 'lodash'
import type { OrderedMap } from 'immutable';
import type MediaFile from './media_file';
export default class FileSeacher {
files: OrderedMap<number, MediaFile>;
constructor(files: OrderedMap<number, MediaFile>) {
this.files = files;
}
search(searchKeyword: string): Ord... | Implement smartcase matching with search keyword | Implement smartcase matching with search keyword
| JavaScript | mit | joker1007/blackalbum,joker1007/blackalbum |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.