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 |
|---|---|---|---|---|---|---|---|---|---|
3e6d2fb2bf4f4405fb11d43ee44e0c56b787ed68 | src/common/analytics.js | src/common/analytics.js | function init() {
window._paq = window._paq || [];
}
function paq() {
return window._paq;
}
function installed() {
return !!paq();
}
function push(...args) {
return paq().push(...args);
}
export function install() {
if (process.env.NODE_ENV === 'production') {
init();
/* tracker methods like "setCust... | // function init() {
// window._paq = window._paq || [];
// }
// function paq() {
// return window._paq;
// }
// function installed() {
// return !!paq();
// }
// function push(...args) {
// return paq().push(...args);
// }
export function install() {
if (process.env.NODE_ENV === 'production') {
// init(... | Disable matomo since it's misconfigured anyway | Disable matomo since it's misconfigured anyway
| JavaScript | agpl-3.0 | anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,sMteX/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,ronaldpereira/WoWAnalyzer,Juko8/WoWAnalyzer,ronaldpereira/WoWAnalyzer,fyruna/WoWAnalyzer,FaideWW/WoWAnalyzer,fyruna/WoWAnalyzer,yajinni/WoWAnalyzer,sMteX/WoWAnalyzer,FaideWW/... |
7adde24e9c4c29467a137c33163d6bde62de1b1a | app/donate/donate.js | app/donate/donate.js | 'use strict';
angular.module('app.donate', [
'ui.router',
'ui.bootstrap'
])
.controller('DonateModalCtrl', function($rootScope, $scope, $modalInstance, $timeout, twitter) {
$scope.ok = function(amount) {
var form = $('#paypalform');
form.find('[name="amount"]').val(amount);
form.find('[name="notify_... | 'use strict';
angular.module('app.donate', [
'ui.router',
'ui.bootstrap'
])
.controller('DonateModalCtrl', function($rootScope, $scope, $modalInstance, $timeout, twitter) {
$scope.ok = function(amount) {
var form = $('#paypalform');
form.find('[name="amount"]').val(amount);
form.find('[name="notify_... | Add amount to paypal callback | Add amount to paypal callback
| JavaScript | mit | gdi2290/client |
ab95dd20073cdbd4b45c45f5c1ab8fda41f93e35 | app/js/background.js | app/js/background.js | chrome.experimental.app.onLaunched.addListener(function (launchData) {
var options = {
frame: 'none',
minWidth: 400,
minHeight: 400,
width: 700,
height: 750,
left: 0,
top: 0
};
chrome.app.window.create('index.html', options, function (win) {
win.launchData = launchData;
consol... | chrome.app.runtime.onLaunched.addListener(function (launchData) {
var options = {
frame: 'none',
minWidth: 400,
minHeight: 400,
width: 700,
height: 750,
left: 0,
top: 0
};
chrome.app.window.create('index.html', options, function (win) {
win.launchData = launchData;
console.log... | Use chrome.app.runtime instead of experimental | Use chrome.app.runtime instead of experimental
| JavaScript | bsd-3-clause | codex8/text-app,modulexcite/text-app,zkendall/WordBinder,l3dlp/text-app,zkendall/WordBinder,modulexcite/text-app,l3dlp/text-app,codex8/text-app,l3dlp/text-app,zkendall/WordBinder,codex8/text-app,wearefractal/extension-boiler,modulexcite/text-app |
1043c419195f87ec28d5b0794c6edb139016895b | server/models/Venue.js | server/models/Venue.js | var mongoose = require('mongoose');
var VenueSchema = new mongoose.Schema({
name: String,
address: String,
latitude: Number,
longitude: Number
})
module.exports = mongoose.model('Venue', VenueSchema);
| var mongoose = require('mongoose');
var VenueSchema = new mongoose.Schema({
name: {type: String, trim: true},
address: {type: String, trim: true},
latitude: Number,
longitude: Number
})
module.exports = mongoose.model('Venue', VenueSchema);
| Trim venue name and address in schema | Trim venue name and address in schema
| JavaScript | apache-2.0 | Studentmediene/Barteguiden,Studentmediene/Barteguiden |
64dd8252787dae196eeb29270ceb5cbba32eaf90 | js/script.js | js/script.js | $(document).ready(function(){
$('.popup__toggle').on('click', popup);
$('.filter-drawer__toggle').on('click', openFilterDrawer);
$('.create-drawer__toggle').on('click', openCreateDrawer);
function popup() {
$('#popup').toggleClass("popup--open");
}
function openFilterDrawer() {
$... | $(document).ready(function(){
$('.popup__toggle').on('click', popup);
$('.filter-drawer__toggle').on('click', openFilterDrawer);
$('.create-drawer__toggle').on('click', openCreateDrawer);
function popup() {
$('#popup').toggleClass("popup--open");
}
function openFilterDrawer() {
$... | Change event listener on input | Change event listener on input
| JavaScript | mit | sjbuysse/javascriting,sjbuysse/javascriting |
64daac2055bba301100a73264edaf7b8af6855ea | lib/message.js | lib/message.js | /*!
* node-gcm
* Copyright(c) 2013 Marcus Farkas <toothlessgear@finitebox.com>
* MIT Licensed
*/
function Message(obj) {
if (!(this instanceof Message)) {
return new Message(obj);
}
if (!obj) {
obj = {};
}
this.collapseKey = obj.collapseKey || undefined;
this.delayWhileId... | /*!
* node-gcm
* Copyright(c) 2013 Marcus Farkas <toothlessgear@finitebox.com>
* MIT Licensed
*/
function Message(obj) {
if (!(this instanceof Message)) {
return new Message(obj);
}
if (!obj) {
obj = {};
}
this.collapseKey = obj.collapseKey || undefined;
this.delayWhileId... | Make addData dynamically recognize how data is being added | Make addData dynamically recognize how data is being added
| JavaScript | mit | pablonazareno/node-gcm,kaija/node-gcm,mauron85/node-gcm,bastienleonard/node-gcm,SpireTeam/yodel-gcm,SpireTeam/spire-fcm,imjerrybao/node-gcm |
e1465f5555de63dc68772949891a6d5b5d6f3331 | js/widget.js | js/widget.js | (function ($) {
$(window).load(function(){
var fields = document.getElementsByClassName('field-widget-hologram-image');
Array.prototype.forEach.call(fields, function(field){
var area = $(field).find('.hologram-area').get(0);
var handle = window.hologram(area, {
uploadUrl: Dr... | (function ($) {
$(window).load(function(){
var fields = document.getElementsByClassName('field-widget-hologram-image');
Array.prototype.forEach.call(fields, function(field){
var jsonField = $(field).find('input').get(0);
var area = $(field).find('.hologram-area').get(0);
var ha... | Store can pass file json to input field | Store can pass file json to input field
| JavaScript | mit | dollars0427/hologram-widget |
9ad8629a105278622866171b0ba903ae143caadf | lib/index.js | lib/index.js | import GithubPackage from './github-package';
let pack;
const entry = {
activate(...args) {
pack = new GithubPackage(
atom.workspace, atom.project, atom.commands, atom.notifications, atom.tooltips,
atom.styles, atom.config, atom.confirm.bind(atom),
);
pack.activate(...args);
},
};
[
'ser... | import GithubPackage from './github-package';
let pack;
const entry = {
activate(...args) {
pack.activate(...args);
},
initialize() {
pack = new GithubPackage(
atom.workspace, atom.project, atom.commands, atom.notifications, atom.tooltips,
atom.styles, atom.config, atom.confirm.bind(atom),
... | Create GithubPackage instance in `initialize` package hook | Create GithubPackage instance in `initialize` package hook
This ensures that the instance is available before any consume* or
deserialize* hooks are called
| JavaScript | mit | atom/github,atom/github,atom/github |
71d724d247a8bcfbfc31709cdfc6603414ca9f56 | src/fixtures/brWidth.js | src/fixtures/brWidth.js | import toWord from '../util/toWord';
import {brWidths} from '../validators/isBrWidth';
export const fixtures = {
valid: brWidths,
invalid: ['huuuuge'],
};
export const nodes = {
valid: fixtures.valid.map(toWord),
invalid: fixtures.invalid.map(toWord),
};
| import toWord from '../util/toWord';
import {brWidths} from '../validators/isBrWidth';
import {fixtures as length} from './length';
export const fixtures = {
valid: [
...brWidths,
...length.valid,
],
invalid: [
'huuuuge',
...length.invalid,
],
};
export const nodes = {
... | Add length fixtures to br-width. | Add length fixtures to br-width.
| JavaScript | mit | ben-eb/css-values |
c80e537738e1c2d0c4d8b06595c7e06f9ac936b1 | app/food/route.js | app/food/route.js | import Ember from 'ember';
import config from '../config/environment';
export default Ember.Route.extend({
model: function(params) {
var CLIENT_ID = config.myCLIENT_ID;
var CLIENT_SECRET = config.myCLIENT_SECRET;
var location= Object.values(params);
var url = 'https://api.foursquare.com/v2/... | import Ember from 'ember';
import config from '../config/environment';
export default Ember.Route.extend({
model: function(params) {
var CLIENT_ID = config.myCLIENT_ID;
var CLIENT_SECRET = config.myCLIENT_SECRET;
var location= Object.values(params);
var url = 'https://api.foursquare.com/v2/... | Fix indentation and spacing errors | Fix indentation and spacing errors
| JavaScript | mit | marynganga/FunSquare,marynganga/FunSquare |
c3f85b55bc393386cabff6be82a088c9e66495c0 | lib/utils.js | lib/utils.js | exports.base64ToBuffer = function ( data ) {
return new Buffer( data, 'base64' );
};
exports.base64ToString = function ( data ) {
return new Buffer( data, 'base64' ).toString();
};
| exports.base64ToBuffer = function ( data ) {
return new Buffer( data, 'base64' );
};
exports.base64ToString = function ( data ) {
return new Buffer( data, 'base64' ).toString();
};
exports.stringToBase64 = function ( data ) {
return new Buffer( data ).toString( 'base64' );
};
| Add string to base64 util | Add string to base64 util
| JavaScript | mit | web-audio-components/web-audio-components-service |
2839f62fa2c9869f8ac2d9557fb2be8dfd1a6f14 | lib/index.js | lib/index.js | const regexEmoji = require("regex-emoji")
, regexParser = require("regex-parser")
;
const REGEX_EMOJI = regexParser("/^" + regexEmoji().toString().substring(1));
/**
* startsWithEmoji
* Checks if a string starts with emoji.
*
* @name startsWithEmoji
* @function
* @param {String} s The input string.
* @... | const regexEmoji = require("regex-emoji")
, regexParser = require("regex-parser")
;
const REGEX_EMOJI = regexParser("/^" + regexEmoji().toString().substring(1));
/**
* startsWithEmoji
* Checks if a string starts with emoji.
*
* @name startsWithEmoji
* @function
* @param {String} s The input string.
* @... | Reset the lastIndex and export the regex | Reset the lastIndex and export the regex
| JavaScript | mit | IonicaBizau/starts-with-emoji |
60f3ea03464308772152e82bef6ee32274b77e6b | libs/kill.js | libs/kill.js | var exeq = require('exeq');
module.exports = kill;
function kill(port) {
var p = port || 3000;
var killInMacOSX = "lsof -i tcp:" + p + " | grep LISTEN | awk '{print $2}' | xargs kill -9 ";
exeq(killInMacOSX)
.then(function(){
goodbye(p);
}).catch(function(err){
throw err;
});
}
function goodbye(... | var exeq = require('exeq');
module.exports = kill;
function kill(port, callback) {
var p = port || 3000;
var killInMacOSX = "lsof -i tcp:" + p + " | grep LISTEN | awk '{print $2}' | xargs kill -9 ";
exeq(killInMacOSX)
.then(function(){
if (!module.parent)
return goodbye(p)
if (callback && type... | Improve behavior when require module | Improve behavior when require module
| JavaScript | mit | guo-yu/kill3k,turingou/kill3k |
a851179e0ceaefbcfbffb509b91b645f88ee0eea | lib/santa.js | lib/santa.js | var path = require('path');
var fs = require('fs');
var flatiron = require('flatiron');
var pkgcloud = require('pkgcloud');
var santa = module.exports = flatiron.app;
santa.use(flatiron.plugins.cli, {
version: true,
source: path.join(__dirname, 'commands'),
usage: [
'Welcome to santa!',
'',
'Availabl... | var path = require('path');
var fs = require('fs');
var flatiron = require('flatiron');
var pkgcloud = require('pkgcloud');
var santa = module.exports = flatiron.app;
santa.use(flatiron.plugins.cli, {
version: true,
source: path.join(__dirname, 'commands'),
usage: [
'Welcome to santa!',
'',
'Availabl... | Add images and flavors commands | Add images and flavors commands
| JavaScript | mit | mmalecki/santa,mmalecki/santa |
f956e8f93832bc2e8b1ed1d78910d9acb4442a2b | src/app/sagas/index.js | src/app/sagas/index.js | /* eslint-disable no-undef */
import { select, fork } from 'redux-saga/effects';
import { isIos } from 'worona-deps';
import { blackOrWhite } from '../libs';
import * as deps from '../deps';
function* colorStatusBar() {
const contentType = yield select(deps.selectors.getContentType);
const color = yield select(dep... | /* eslint-disable no-undef */
import { select, fork } from 'redux-saga/effects';
import { isIos } from 'worona-deps';
import { blackOrWhite } from '../libs';
import * as deps from '../deps';
function* colorStatusBar() {
const contentType = yield select(deps.selectors.getContentType);
const color = yield select(dep... | Add log to check contentType | Add log to check contentType
| JavaScript | mit | worona/starter-app-theme-worona |
3d925d5fe3dc5c849f232324a7f7dd01414b8b92 | share/spice/rain/rain.js | share/spice/rain/rain.js | (function(env) {
"use strict";
env.ddg_spice_rain = function(api_result) {
console.log(api_result);
// Check for errors.
if(!api_result || api_result.error || !api_result.currently || !api_result.flags['ddg-location']) {
return Spice.failed('rain');
}
Spice.... | (function(env) {
"use strict";
env.ddg_spice_rain = function(api_result) {
// Check for errors.
if(!api_result || api_result.error || !api_result.currently || !api_result.flags['ddg-location']) {
return Spice.failed('rain');
}
Spice.add({
id: 'rain',
... | Remove debug console.log - Rain IA | Remove debug console.log - Rain IA
Remove debug console.log - Rain IA | JavaScript | apache-2.0 | sagarhani/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,P71/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,lernae/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,deserted/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,P71/zeroclickinfo-spice,xavie... |
f3c6560a8995fe44096dee487300fe13db29c39b | client/app/services/urlHandlerService.js | client/app/services/urlHandlerService.js | "use strict";
angular.module("myApp.services.urlHandler", [])
.service("urlHandler", function() {
this.serviceURL = function () {//eslint-disable-line no-unused-vars
return "http://localhost:8080/";
};
});
| "use strict";
angular.module("myApp.services.urlHandler", [])
.service("urlHandler", function() {
this.serviceURL = function () {//eslint-disable-line no-unused-vars
return "http://project-c404.rhcloud.com/";
};
});
| Change url to openshift backend | Change url to openshift backend
| JavaScript | apache-2.0 | pmaidens/CMPUT404-project,pmaidens/CMPUT404-project,pmaidens/CMPUT404-project,pmaidens/CMPUT404-project |
d64579b3af7db840f8204b2be6aeb633d18633e2 | src/js/showcar-ui.js | src/js/showcar-ui.js | window.$ = window.Zepto = require('zepto-browserify').$;
require('./components/polyfills.js')();
let warn = (msg) => {
if (!window || !window.console) {
return;
}
window.console.warn(msg);
};
window.Storage = require('showcar-storage');
window.Pager = require('./components/pager.js');
require('sh... | window.$ = window.Zepto = require('zepto-browserify').$;
require('./components/polyfills.js')();
let warn = (msg) => {
if (!window || !window.console) {
return;
}
window.console.warn(msg);
};
window.Storage = require('showcar-storage');
window.Pager = require('./components/pager.js');
require('sh... | Revert "only including tracking if it was not already included before" | Revert "only including tracking if it was not already included before"
This reverts commit bfc2b27e3e2386687a8bbf24f36bef46874d939e.
| JavaScript | mit | AutoScout24/showcar-ui,AutoScout24/showcar-ui,AutoScout24/showcar-ui,AutoScout24/showcar-ui |
e5dd7ccdcc3adafff672484e9e1eaa71748f066a | run.js | run.js | var Run = function(parent, op, befores, afters, timeout) {
this.parent = parent;
this.op = op;
this.expects = [];
this.ran = false;
if (timeout) {
this.timeout = timeout;
} else if (defaultTimeout) {
this.timeout = defaultTimeout
}
if (befores)
this.befores = befores;
if (afters)
this.afters = after... | var Run = function(parent, op, befores, afters, timeout) {
this.parent = parent;
this.op = op;
this.expects = [];
this.ran = false;
if (timeout) {
this.timeout = timeout;
} else if (defaultTimeout) {
this.timeout = defaultTimeout
}
if (befores)
this.befores = befores;
if (afters)
this.afters = after... | Tweak how Run handles checking if timeout occurred. | Tweak how Run handles checking if timeout occurred.
| JavaScript | mit | ryanashcraft/relay |
cf4872f28fdac08f4e3a5dd838f512e66b323bb2 | installer/createInstaller.js | installer/createInstaller.js | const electronInstaller = require('electron-winstaller')
const config = require('../package.json')
const format = require('string-template')
const fs = require('fs')
const path = require('path')
const outputDirectory = './dist'
let resultPromise = electronInstaller.createWindowsInstaller({
appDirectory: path.join... | const electronInstaller = require('electron-winstaller')
const config = require('../package.json')
const format = require('string-template')
const fs = require('fs')
const path = require('path')
const outputDirectory = './dist'
const appName = 'KioskDemoElectron'
let resultPromise = electronInstaller.createWindowsIns... | Fix outputMsiPath to be absolute | Fix outputMsiPath to be absolute
| JavaScript | mit | syedhassaanahmed/kiosk-demo-electron,syedhassaanahmed/kiosk-demo-electron |
74a94d0cfb5d36a4aa977766c3c44e3ae60d5364 | addon/utils/load-polyfills.js | addon/utils/load-polyfills.js | export async function loadPolyfills() {
await Promise.all([
intlPluralRules(),
intlRelativeTimeFormat(),
]);
}
async function intlPluralRules() {
if ('Intl' in window && 'PluralRules' in Intl) {
return;
}
await import('@formatjs/intl-pluralrules/polyfill');
await Promise.all([
import('@for... | export async function loadPolyfills() {
await Promise.all([
intlPluralRules(),
intlRelativeTimeFormat(),
]);
}
async function intlPluralRules() {
if ('Intl' in window && 'PluralRules' in Intl) {
return;
}
await import('@formatjs/intl-pluralrules/polyfill');
await Promise.all([
import('@for... | Load intl packages from correct location | Load intl packages from correct location
This path changed in the last major version to remove `dist`.
| JavaScript | mit | ilios/common,ilios/common |
500e9ad22e08f6227c4c0e15b0507f1623330845 | Client/src/App.js | Client/src/App.js | import React from 'react';
import $ from 'jquery'
import './App.css';
import Inventory from './Inventory'
var App = React.createClass({
getInitialState: function() {
return { data: [] }
},
componentWillMount: function() {
$.ajax({
url: `/api/shoe`,
dataType: "json",
success: function(... | import React from 'react';
import './App.css';
import Inventory from './Inventory'
var App = React.createClass({
getInitialState: function() {
return { data: [] }
},
componentWillMount: function() {
return fetch('/api/shoe')
.then((response) => response.json())
.then((data) => {
con... | Refactor of jquery ajax call to fetch call | Refactor of jquery ajax call to fetch call
| JavaScript | mit | seanyboy49/AScannerSmartLeeAPI,seanyboy49/AScannerSmartLeeAPI,seanyboy49/AScannerSmartLeeAPI |
1ec48c7fe2ca15f2a1df7430e47419939182a1ee | src/tokenize.test.js | src/tokenize.test.js | import fs from 'fs';
import tokenize from './tokenize';
describe('tokenize', () => {
it('should support line comments', () => {
expect([...tokenize(`
// What do you expect?
// Hello!
`)]).toEqual([]);
});
it('should support block comments', () => {
expect([...tokenize(`
/* This is a... | import fs from 'fs';
import tokenize from './tokenize';
describe('tokenize', () => {
it('should support line comments', () => {
expect(Array.from(tokenize(`
// What do you expect?
// Hello!
`))).toEqual([]);
});
it('should support block comments', () => {
expect(Array.from(tokenize(`
... | Change to use Array.from to workaround babel loose | Change to use Array.from to workaround babel loose
| JavaScript | mit | yoo2001818/bossam |
5bfcb5cf12bc8c1672353c20f266b891de5ee775 | cloud-app-info.js | cloud-app-info.js |
var AppInfo = {
AppId: "600fdef8-5ee5-4047-ac73-6c51616532e0",
AppVersion: "1.1.PROD_1.58",
}
|
var AppInfo = {
Wss: true,
AppId: "600fdef8-5ee5-4047-ac73-6c51616532e0",
AppVersion: "1.1.PROD_1.58",
}
| Use wss instead of ws | Use wss instead of ws
| JavaScript | apache-2.0 | PeturDarri/Werewolves-Server-List,PeturDarri/Werewolves-Server-List |
4b778035c214ea36ade00b6e048532990dac304b | app/assets/javascripts/components/managing_actions/ManagingModalDelete.js | app/assets/javascripts/components/managing_actions/ManagingModalDelete.js | import React from 'react';
import {Button, ButtonToolbar, Checkbox} from 'react-bootstrap';
export default class ManagingModalDelete extends React.Component {
constructor(props) {
super(props);
this.state = {
delete_subsamples: false
}
}
handleClick() {
const {onHide, action} = this.props;... | import React from 'react';
import {Button, ButtonToolbar, Checkbox} from 'react-bootstrap';
export default class ManagingModalDelete extends React.Component {
constructor(props) {
super(props);
this.state = {
deleteSubsamples: false,
};
this.handleCheck = this.handleCheck.bind(this);
this.... | Fix "Also delete reaction subsamples" checkbox | Fix "Also delete reaction subsamples" checkbox
| JavaScript | agpl-3.0 | ComPlat/chemotion_ELN,ComPlat/chemotion_ELN,ComPlat/chemotion_ELN,ComPlat/chemotion_ELN |
64d80a32b5a90d5bade5a63a03e428c2d87dfa5c | node/createEvent.js | node/createEvent.js | //js for first creation of event.
var sql = require('./sql');
exports.createNewEvent = function(req, res){
console.log(req.user);
if(!req.user){
res.render('facebook.html');
}
//should have a session and profile object.
else{
//generate new game: for now just load up current game
var fbid;
va... | //js for first creation of event.
var sql = require('./sql');
exports.createNewEvent = function(req, res){
console.log(req.user);
if(!req.user){
res.render('facebook.html');
}
//should have a session and profile object.
else{
//generate new game: for now just load up current game
var fbid = req.u... | Add user if not exist | Add user if not exist
| JavaScript | mit | kevinychen/radar,katzdave/Radar-Game,katzdave/Radar-Game,kevinychen/radar |
9e24d6ac37ce8f95a6b23333436b48306632da01 | assets/src/edit-story/elements/text/updateForResizeEvent.js | assets/src/edit-story/elements/text/updateForResizeEvent.js | /*
* 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.0
*
* Unless required by applicable law or agreed to ... | /*
* 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.0
*
* Unless required by applicable law or agreed to ... | Fix big text after insertion (not pure function) | Fix big text after insertion (not pure function)
| JavaScript | apache-2.0 | GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp |
acae5f4127ab0b420d0e3f0a856caf436c323d58 | routes/clip.js | routes/clip.js | var db = require('../lib/db');
var path = require('path');
/*
* Fetch a single clip
*/
exports.fetch = function(req, res, next) {
var hash = req.params.hash;
db.fetchItemByHash(hash, function(err, item) {
if (err) res.send(500);
req.store.item = item;
next();
});
};
/*
* Handle clip downloadin... | var db = require('../lib/db');
var path = require('path');
/*
* Fetch a single clip
*/
exports.fetch = function(req, res, next) {
var hash = req.params.hash;
db.fetchItemByHash(hash, function(err, item) {
if (err) return res.send(500);
if (!item) return res.send(404);
req.store.item = item;
nex... | Fix a delete item related bug | Fix a delete item related bug
Fixes #32
| JavaScript | mit | leftshifters/clipboard,leftshifters/clipboard |
84655ef6c85b18c3902876f2e034c2eaf6e23780 | client/src/reducers/voting.js | client/src/reducers/voting.js | import { VOTING_STATE } from '../../../common/actionTypes/voting';
const votedState = (state = false, action) => {
switch (action.type) {
case VOTING_STATE:
return {
voted: action.data.voted,
};
default:
return state;
}
};
export default votedState;
| import { OPEN_ISSUE } from '../../../common/actionTypes/issues';
import { VOTING_STATE } from '../../../common/actionTypes/voting';
const votedState = (state = false, action) => {
switch (action.type) {
case VOTING_STATE:
return {
voted: action.data.voted,
};
case OPEN_ISSUE:
return... | Set votedState upon ISSUE OPEN | Set votedState upon ISSUE OPEN
| JavaScript | mit | dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta |
c6c3d14cc05684e26a89b66d4aae74666e6ccd92 | src/js/components/forms/WaypointLink.js | src/js/components/forms/WaypointLink.js |
import React from 'react';
class WaypointLinks extends React.Component {
constructor(props) {
super(props);
this.state = {
link: null
};
this.handleChange = this.handleChange.bind(this);
}
handleChange(event) {
var value = undefined;
if (event.target.value)
value =... |
import React from 'react';
class WaypointLinks extends React.Component {
constructor(props) {
super(props);
this.state = {
link: null
};
this.handleChange = this.handleChange.bind(this);
}
handleChange(event) {
var value = undefined;
if (event.target.value)
value =... | Fix the Waypoint Details for nodes without links. | Fix the Waypoint Details for nodes without links.
| JavaScript | mit | Krizzzn/Wayfinder.Mapper,Krizzzn/Wayfinder.Mapper |
7d83a3708208a0816b6eb69c5dda052e11769497 | scripts/api.js | scripts/api.js | (function () {
})(); | (function () {
// Mock repository
let users = [
{
_kmd: {
authtoken: "mock_token0"
},
_id: 0,
username: "Pesho",
password: "p"
},
{
_kmd: {
authtoken: "mock_token1"
},
... | Handle user accounts and simple styling to the appearance of the webpage. | Handle user accounts and simple styling to the appearance of the webpage.
| JavaScript | mit | Xapuu/JSTeamworkProject,Xapuu/JSTeamworkProject |
581a72c407686bccf7040006788c05922a486026 | test/lib/test-action.js | test/lib/test-action.js | describe('action', function() {
beforeEach(function() {
this.subject = require(libDir + 'action');
});
it('has a list of available methods', function() {
var methodNames = Object.keys(this.subject.methods);
assert(methodNames.length > 0, 'expected more than 0 method names');
});
it('has actions... | describe('action', function() {
beforeEach(function() {
this.subject = require(libDir + 'action');
});
it('is an invoker', function() {
assert.isFunction(this.subject.invoke);
});
it('has a list of available methods', function() {
var methodNames = Object.keys(this.subject.methods);
assert(... | Test that lib/action is an invoker | Test that lib/action is an invoker
| JavaScript | apache-2.0 | radiodan/radiodan.js,radiodan/radiodan.js |
6763ef7e57613a1658d3f18783a7d00922471d0d | src/common/fermenter/fermenterState.js | src/common/fermenter/fermenterState.js | /* NOTE / IMPORTANT: This is *almost* a 1:1 verbatim copy of the file
'initialState.js' from our fermenter-project. Both files should be kept in
sync most of the time. */
import { Record, Map, Seq } from 'immutable';
const Env = new Record({
createdAt: null,
temperature: null,
humidity: null,
isValid: fa... | /* NOTE / IMPORTANT: This is *almost* a 1:1 verbatim copy of the file
'initialState.js' from our fermenter-project. Both files should be kept in
sync most of the time. */
import { Record, Map, Seq, List } from 'immutable';
const Env = new Record({
createdAt: null,
temperature: null,
humidity: null,
isVal... | Update to most recent fermenter-state used upstream. | Update to most recent fermenter-state used upstream.
| JavaScript | mit | cjk/smart-home-app |
6f974914cabd1d5b4305e2eee25191192875cb42 | tests/helpers/api.js | tests/helpers/api.js | var http = require('http');
var _ = require('underscore');
function request(rest, method, data, done)
{
done = done || data;
var ctype = 'text/plain';
if (typeof data === 'object') {
data = JSON.stringify(data);
ctype = 'application/json';
}
var options = {
'hostname' : 'localhost',
'por... | var http = require('http');
var _ = require('underscore');
function request(rest, method, data, done)
{
done = done || data;
var ctype = 'text/plain';
if (typeof data === 'object') {
data = JSON.stringify(data);
ctype = 'application/json';
}
var options = {
'hostname' : 'localhost',
'por... | Call correct port when API testing | Tests: Call correct port when API testing
| JavaScript | mit | noseglid/canumb |
a37a25854c1ded730f014464a04c62a95a5a76b2 | config/configValues.github.js | config/configValues.github.js | /* eslint-disable @typescript-eslint/camelcase */
// @ts-check
/**
* @type {import('./index.d').Configuration}
*/
const appConfig = {
url_basePath: "/",
// On GitHub Pages, we need to use hash routing
url_historyType: "hash",
};
const buildConfig = {
url_publicPath: "/",
};
module.exports = {
appConfig,
... | /* eslint-disable @typescript-eslint/camelcase */
// @ts-check
/**
* @type {import('./index.d').Configuration}
*/
const appConfig = {
// Change this to your repo name
url_basePath: "/jsapp-boilerplate/",
// On GitHub Pages, we need to use hash routing
url_historyType: "hash",
};
const buildConfig = {
url_... | Fix bad GitHub action base URL pointing to root instead of repo name | bug: Fix bad GitHub action base URL pointing to root instead of repo name
| JavaScript | mit | gyng/jsapp-boilerplate,gyng/jsapp-boilerplate,gyng/jsapp-boilerplate,gyng/jsapp-boilerplate |
2852802702be6c335213739b248842ddbd6a9c3e | src/game/model/MagicPoint.js | src/game/model/MagicPoint.js | const EventEmitter = require('eventemitter2').EventEmitter2;
function filter(v, min, max) {
v = Math.min(v, max);
v = Math.max(v, min);
return v;
}
class MagicPoint extends EventEmitter {
constructor(current, max) {
this.max = max;
this.min = 0;
this.current = filter(current, 0... | const EventEmitter = require('eventemitter2').EventEmitter2;
function filter(v, min, max) {
v = Math.min(v, max);
v = Math.max(v, min);
return v;
}
class MagicPoint extends EventEmitter {
constructor(current, max) {
super();
this.max = max;
this.min = 0;
this.current = ... | Add super to constructor of magic point | [FIX] Add super to constructor of magic point
| JavaScript | mit | ara-ta3/node-quest |
fa3df2db6fc61e8fbf6080b002412aad402ee65a | static/main.js | static/main.js | function init() {
var input = document.getElementById("input");
var math = document.getElementById("math");
var permalink = document.getElementById("permalink");
if ("oninput" in input) {
input.addEventListener("input", reprocess, false);
} else {
input.attachEvent("onkeyup", reproc... | function init() {
var input = document.getElementById("input");
var math = document.getElementById("math");
var permalink = document.getElementById("permalink");
if ("oninput" in input) {
input.addEventListener("input", reprocess, false);
} else {
input.attachEvent("onkeyup", reproc... | Make permalink button work in IE8. | Make permalink button work in IE8.
IE8 doesn't have addEventListener, so use attachEvent if that doesn't exist.
Auditors: alpert
| JavaScript | mit | twitwi/KaTeX,saschatimme/KaTeX,twitwi/KaTeX,crepererum/KaTeX,franciscop/KaTeX,frankandrobot/KaTeX,kwangkim/katex-npm-0.7.0-pre,azotova/KaTeX,kwangkim/KaTeX,zhanghuiguoanlige/KaTeX,mcanthony/KaTeX,xymostech/KaTeX,zhanghuiguoanlige/KaTeX,mcanthony/KaTeX,kwangkim/katex-npm-0.7.0-pre,kwangkim/katex-npm-0.7.0-pre,gagern/KaT... |
9c15574e955c1f6766a64da52980723b70028793 | src/util/useragent.js | src/util/useragent.js | /**
* @file The ethtaint user agent string.
* @module util/useragent
*/
'use strict'
// Imports
const version = require('project-version')
/**
* The ethtaint user agent string.
* @static
*/
let userAgent = 'ethtaint'
// Add version
if (version) {
userAgent += '/' + version
}
// Expose
module.exports = user... | /**
* @file The ethtaint user agent string.
* @module util/useragent
*/
'use strict'
// Imports
const version = require('project-version')
/**
* Web address of project repository.
* @private
*/
const repositoryAddress =
'https://github.com/jestcrows/ethtaint'
/**
* The ethtaint user agent string.
* @stati... | Add repository address to user agent | Add repository address to user agent
The Googlebot user agent string uses a plus +
before the information URL in the comment:
>Googlebot/2.1 (+http://www.google.com/bot.html)
Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
The reason for this is unclear but probably sensible
so I'm follo... | JavaScript | unlicense | jestcrows/ethtaint,jestcrows/ethtaint |
03de80f049227fdb955b88b1848ae09ad8f074b2 | gulp/tasks/clean/clean.js | gulp/tasks/clean/clean.js | module.exports = function(gulp, config, plugins, callback) {
'use strict';
var del = require('del');
return function() {
del([config.dist.base]).then(callback());
}();
};
| module.exports = function(gulp, config, plugins, callback) {
'use strict';
var del = require('del');
return function() {
del([config.dist.base+'/**', '!'+config.dist.base, '!'+config.dist.base+'/.gitkeep']).then(callback());
}();
};
| Clean task ignores .gitkeep files | Clean task ignores .gitkeep files
| JavaScript | mit | alexryans/Lynchburg |
991f3bdc32fd74e8cd2eca88b2b680ec26f58622 | server/zanata-frontend/src/frontend/app/containers/ProjectVersion/index.js | server/zanata-frontend/src/frontend/app/containers/ProjectVersion/index.js | import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import Helmet from 'react-helmet'
import TMMergeModal from './TMMergeModal'
import {
toggleTMMergeModal
} from '../../actions/version-actions'
/**
* Root component for Project Version Page
*/
class Projec... | import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import TMMergeModal from './TMMergeModal'
import {
toggleTMMergeModal
} from '../../actions/version-actions'
/**
* Root component for Project Version Page
*/
class ProjectVersion extends Component {
sta... | Remove Helmet from ProjectVersion page | fix(ZNTA-2146): Remove Helmet from ProjectVersion page
| JavaScript | lgpl-2.1 | zanata/zanata-platform,zanata/zanata-platform,zanata/zanata-platform,zanata/zanata-platform,zanata/zanata-platform,zanata/zanata-platform,zanata/zanata-platform |
2a787054ce1b196a9af9cf8a0e6d6752e1964851 | src/apps/companies/apps/activity-feed/es-queries/contact-activity-query.js | src/apps/companies/apps/activity-feed/es-queries/contact-activity-query.js | const contactActivityQuery = (
from,
size,
email,
contactId,
objectTypes,
sortOrder
) => {
return {
from,
size,
query: {
bool: {
must: [
{
bool: {
should: [
{
bool: {
must: [
... | const contactActivityQuery = (
from,
size,
email,
contactId,
objectTypes,
sortOrder
) => {
return {
from,
size,
query: {
bool: {
must: [
{
bool: {
should: [
{
bool: {
must: [
... | Update contact activity query to remove Incomplete registrations | Update contact activity query to remove Incomplete registrations
| JavaScript | mit | uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend |
af7358db3fdb9c597d3daee010a1c2dddc52fff1 | src/helpers.js | src/helpers.js | const ALLOW_SET_SELECTION_RANGE = ['text', 'search', 'URL', 'tel', 'password']
export const selectAll = (control) => {
if (ALLOW_SET_SELECTION_RANGE.includes(control.type)) {
control.setSelectionRange(0, control.value.length)
}
}
| export const selectAll = (control) => {
if (control.setSelectionRange) {
control.setSelectionRange(0, control.value.length)
}
}
| Use duck typing in selectAll() helper | refactor: Use duck typing in selectAll() helper
| JavaScript | mit | bouvens/state-control |
02830182e85ca7862ca9816e273db5a4d05a6a86 | Gruntfile.js | Gruntfile.js | 'use strict'; /*jslint es5: true, node: true, indent: 2 */
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
handlebars: {
all: {
templates: 'templates/**/*.bars',
root: 'templates',
extension: 'bars',
output: 'static/templat... | 'use strict'; /*jslint es5: true, node: true, indent: 2 */
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
handlebars: {
all: {
templates: 'templates/**/*.bars',
root: 'templates',
extension: 'bars',
output: 'static/templat... | Remove handlebars precompile from normal Grunt run. | Remove handlebars precompile from normal Grunt run.
| JavaScript | mit | chbrown/drags,chbrown/drags |
df73496e5db924228d614d49e8e1d0db10a23d2d | Gruntfile.js | Gruntfile.js | 'use strict';
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify: {
dist: {
files: {
'build/stanzaio.bundle.js': ['<%= pkg.main %>']
},
options: {
... | 'use strict';
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify: {
dist: {
files: {
'build/stanzaio.bundle.js': ['<%= pkg.main %>']
},
options: {
... | Remove banner comment from minified bundled file. | Remove banner comment from minified bundled file.
Fixes #55
| JavaScript | mit | glpenghui/stanza.io,Palid/stanza.io,soapdog/stanza.io,spunkydunker/stanza.io,rogervaas/stanza.io,legastero/stanza.io,legastero/stanza.io,Palid/stanza.io,otalk/stanza.io,firdausramlan/stanza.io,rogervaas/stanza.io,firdausramlan/stanza.io,spunkydunker/stanza.io,flavionegrao/stanza.io,soapdog/stanza.io,glpenghui/stanza.io... |
0dbdd5b1a571a5c456be23ffe0adb1ff193cda1c | test/helpers/api_fixture.js | test/helpers/api_fixture.js | import APIConstants from '../constants/APIConstants'
import randomInt from '../../app/helpers/random-int'
const fixture = require('../fixture-data')
function getLatest(){
var p = new Promise((resolve, reject) => {
setTimeout(() => {
resolve(fixture)
}, AppConstants.DEV_TIMEOUT)
})
return p
}
func... | import APIConstants from '../constants/APIConstants'
import randomInt from '../../app/helpers/random-int'
const fixture = require('../fixture-data')
function getLatest(){
var p = new Promise((resolve, reject) => {
setTimeout(() => {
resolve(fixture)
}, AppConstants.DEV_TIMEOUT)
})
return p
}
func... | Add data to api fixture | Add data to api fixture
| JavaScript | bsd-2-clause | Nafta7/the-pod,Nafta7/the-pod |
8e125946866ae9980d52b8e837399e1ef8cdcbfc | library/spec/pivotal-ui-react/labels/labels_spec.js | library/spec/pivotal-ui-react/labels/labels_spec.js | require('../spec_helper');
describe('Label', function() {
var Label;
beforeEach(function() {
Label = require('../../../src/pivotal-ui-react/labels/labels').Label;
ReactDOM.render(<Label>bananas</Label>, root);
});
afterEach(function() {
ReactDOM.unmountComponentAtNode(root);
});
it('renders a ... | import '../spec_helper'
import {Label} from '../../../src/pivotal-ui-react/labels/labels'
import ReactTestUtils from 'react-addons-test-utils'
describe('Label Component', () => {
const renderComponent = (props, children) => ReactTestUtils.renderIntoDocument(<Label {...props}>{children}</Label>)
it('renders a prim... | Refactor label spec to use react test utils | Refactor label spec to use react test utils
| JavaScript | mit | sjolicoeur/pivotal-ui,pivotal-cf/pivotal-ui,sjolicoeur/pivotal-ui,sjolicoeur/pivotal-ui,pivotal-cf/pivotal-ui,pivotal-cf/pivotal-ui,sjolicoeur/pivotal-ui |
c968741de42dc0da6abd4955ce9fd944843aa650 | test/github.js | test/github.js | /* global describe it */
'use strict'
const chai = require('chai')
const requireInject = require('require-inject')
const sinon = require('sinon')
const expect = chai.expect
describe('getMergeCommits', function () {
it('returns one commit per line', function () {
let stubs = {}
stubs[require.resolve('../lib... | /* global describe it beforeEach */
'use strict'
const chai = require('chai')
const requireInject = require('require-inject')
const sinon = require('sinon')
const expect = chai.expect
describe('getMergeCommits', function () {
let stubs
let exec
beforeEach('create stubs', function () {
exec = sinon.stub()
... | Add test case to verify no commits found | Add test case to verify no commits found
| JavaScript | isc | jcollado/pr-tagger |
8f450b67a7e3d321ccac2d12bed8d44cf471eef2 | test/helper.js | test/helper.js | import thread from 'child_process';
import { promisify } from 'bluebird';
const promisifyStream = fn => promisify((param, callback) => {
fn(param, result => { callback(null, result); });
});
export function createStream(args) {
const task = thread.spawn('node', ['dist/cli.js', ...args], { stdio: 'pipe' });
... | import thread from 'child_process';
import { promisify } from 'bluebird';
const promisifyStream = fn => promisify((param, callback) => {
fn(param, result => { callback(null, result); });
});
export function createCustomStream(env, args) {
const task = thread.spawn('node', ['dist/cli.js', ...args], { stdio: 'p... | Add test case for publish | Add test case for publish
| JavaScript | mit | rung-tools/rung-cli,rung-tools/rung-cli,rung-tools/rung-cli |
09a32be56216ae067e8e371acf5776ceb7b9afc5 | test/runner.js | test/runner.js | "use strict";
require('should');
var wordpressLib = require(__dirname + '/../lib/wordpress.js');
describe('Wordpressorg', function () {
describe('getYoastAnalysis', function () {
var blog,
url = 'http://somedomain.com';
beforeEach(function () {
blog = wordpressLib.createClient({
url: ur... | "use strict";
require('should');
var wordpressLib = require(__dirname + '/../lib/wordpress.js');
describe('Wordpressorg', function () {
}); | Remove the test for deleted endpoint | Remove the test for deleted endpoint
| JavaScript | mit | newscred/node-wordpress |
df198da334ed207ba1cb6e47d0daad96d164a803 | src/delir-core/src/index.js | src/delir-core/src/index.js | // @flow
import * as Project from './project/index'
import Renderer from './renderer/renderer'
import * as Services from './services'
import LayerPluginBase from './plugin/layer-plugin-base'
import Type from './plugin/type-descriptor'
import * as ProjectHelper from './helper/project-helper'
import * as Exception from '... | // @flow
import * as Project from './project/index'
import Renderer from './renderer/renderer'
import * as Services from './services'
import * as Exception from './exceptions/index'
import ColorRGB from './struct/color-rgb'
import ColorRGBA from './struct/color-rgba'
import Type from './plugin/type-descriptor'
import... | Order module exports and comment for order | Order module exports and comment for order
| JavaScript | mit | Ragg-/Delir,Ragg-/Delir,Ragg-/Delir,Ragg-/Delir |
61159431117aaedce93a0991077f24e4511c0f11 | Architecture/WebService.js | Architecture/WebService.js | var PermissionConstructor = require('./PermissionConstructor').PermissionConstructor;
function WebService(currentUser) {
this._currentUser = currentUser;
this._dependencies = {};
this.runRef = undefined;
}
WebService.prototype.runWrapper = function () {
var self = this;
return function (name, allowedTypeAccount... | var PermissionConstructor = require('./PermissionConstructor').PermissionConstructor;
function WebService(currentUser) {
this._currentUser = currentUser;
this._dependencies = {};
this.runRef = undefined;
}
WebService.prototype.runWrapper = function () {
var self = this;
return function (name, allowedTypeAccount... | Change element allowed type account if not exists. | Change element allowed type account if not exists.
| JavaScript | mit | rootsher/server-side-portal-framework |
f4c2dd25cc23b8e1a693877b120f0160d0c23924 | gruntfile.js | gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
paths: {
js: ['gruntfile.js']
},
scsslint: {
all: ['<%= paths.scss %>']
},
jshint: {
all: ['<%= paths.js %>']
},
jscs: {
all: ['<%= paths.js %>']
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt... | module.exports = function(grunt) {
grunt.initConfig({
paths: {
js: ['gruntfile.js']
},
jshint: {
all: ['<%= paths.js %>']
},
jscs: {
all: ['<%= paths.js %>']
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jscs');
grunt.registerTask('defa... | Remove unused scsslint grunt task config | Remove unused scsslint grunt task config
| JavaScript | bsd-3-clause | praekelt/numi-swatch |
9bda1106130aec061445abf16665cbbdef069a2c | hyperterm.js | hyperterm.js | module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// `BEAM` for |, `UNDERLINE` for _, `BLOCK` for █
cursorShape: 'BLOCK',
// custom css to em... | module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Hasklig, Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// `BEAM` for |, `UNDERLINE` for _, `BLOCK` for █
cursorShape: 'BLOCK',
// custom ... | Add Hasklig font to HyperTerm | Add Hasklig font to HyperTerm
| JavaScript | mit | andrewgarner/dotfiles,andrewgarner/config |
4bff9965c4c98b70083f24fabc55da47dc222b5b | webpack.mix.js | webpack.mix.js | const path = require('path')
const mix = require('laravel-mix')
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
mix
.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.sourceMaps()
.disableNotifications()
if (mix.inProduction()) {
mix... | const path = require('path')
const mix = require('laravel-mix')
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
mix
.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.sourceMaps()
.disableNotifications()
if (mix.inProduction()) {
mix... | Fix public path when hmr is enabled | Fix public path when hmr is enabled
| JavaScript | mit | cretueusebiu/laravel-vue-spa,cretueusebiu/laravel-vue-spa |
1ac8370df51187d37ae53e8e5e691c4144581239 | js/config.js | js/config.js | var mapServiceURL = "http://gis.wirapids.org/arcgis/rest/services/DynamicBasemap/MapServer";
//var featureServiceURL = "http://gis.wirapids.org/arcgis/rest/services/DynamicBasemap/FeatureServer";
var aerialServiceUrl = "http://gis.wirapids.org/arcgis/rest/services/AerialBasemap/MapServer";
var vectorBaseUrl = "http://g... |
// var mailLabelUrl = "https://gis.wirapids.org/CityViewer/outputs/mail Labels.pdf";
var csvUrl = "http://gis.wirapids.org/CityViewer/outputs/parcelInfo.csv";
var utilityLayerID = [-1];
var parcelLayerID = 27;
// var link = "gis.wirapids.org/CityViewer/Asbuilts/";
var mailLink = "https://gis.wirapids.org/CityVi... | Remove reference to map services-AMD style bitches | Remove reference to map services-AMD style bitches | JavaScript | unlicense | Ccantey/GIS_UI,Ccantey/GIS_UI,Ccantey/GIS_UI |
e79dc378f507eeadf28f3a08f563670ed56e39ac | app/javascript/app/utils/ghg-emissions.js | app/javascript/app/utils/ghg-emissions.js | import {
DEFAULT_EMISSIONS_SELECTIONS,
DATA_SCALE,
CALCULATION_OPTIONS
} from 'data/constants';
export const getGhgEmissionDefaults = (source, meta) => {
const defaults = DEFAULT_EMISSIONS_SELECTIONS[source];
const sectorDefaults =
source === 'UNFCCC'
? Object.keys(defaults.sector).map(key => defau... | import {
DEFAULT_EMISSIONS_SELECTIONS,
DATA_SCALE,
CALCULATION_OPTIONS
} from 'data/constants';
export const getGhgEmissionDefaults = (source, meta) => {
const defaults = DEFAULT_EMISSIONS_SELECTIONS[source];
if (!defaults) return {};
const sectorDefaults =
source === 'UNFCCC'
? Object.keys(defa... | Fix crash when no data | Fix crash when no data
| JavaScript | mit | Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch |
fb934e0916a8e42eb1e790d815adca25a6b1d7e2 | webpack.dev.js | webpack.dev.js | const path = require('path');
const merge = require('webpack-merge');
const exec = require('child_process').exec;
const FilewatcherPlugin = require('filewatcher-webpack-plugin');
const WatchPlugin = require('webpack-watch-files-plugin').default;
const ShellPlugin = require('webpack-shell-plugin');
const common = requir... | const path = require('path');
const merge = require('webpack-merge');
const exec = require('child_process').exec;
const FilewatcherPlugin = require('filewatcher-webpack-plugin');
const WatchPlugin = require('webpack-watch-files-plugin').default;
const ShellPlugin = require('webpack-shell-plugin');
const common = requir... | Change port and do make clean build | Change port and do make clean build
| JavaScript | mit | snide/sphinx_rtd_theme,snide/sphinx_rtd_theme,snide/sphinx_rtd_theme,snide/sphinx_rtd_theme |
1a6837addd648a5684b854b5f8b1b1acda871081 | src/client/app/components/basket/basket.template.js | src/client/app/components/basket/basket.template.js | export class BasketTemplate {
static update(render, state, events) {
/* eslint-disable indent */
render`
<h2>Basket</h2>
<input id="assetsSearch" size="32" oninput="${events}" placeholder="What assets to be added?">
<ul onclick="${events}">${state.assetsSearch.ma... | export class BasketTemplate {
static update(render, state, events) {
const headerClasses = "fw6 bb b--black-20 tl pb1 pr1 bg-white tr";
const trClasses = "pv1 pr1 bb b--black-20 tr";
/* eslint-disable indent */
render`
<h2>Basket</h2>
<input id="assetsSearch... | Use a table for the basket. | Use a table for the basket.
| JavaScript | mit | albertosantini/node-conpa,albertosantini/node-conpa |
1ee5fa0cd4eec1e4362ac7f763073118afe07d65 | Sources/Common/Core/index.js | Sources/Common/Core/index.js | import vtkDataArray from './DataArray';
import vtkEndian from './Endian';
import vtkLookupTable from './LookupTable';
import vtkMath from './Math';
import vtkPoints from './Points';
import vtkScalarsToColors from './ScalarsToColors';
import vtkStringArray from './StringArray';... | import vtkCellArray from './CellArray';
import vtkDataArray from './DataArray';
import vtkEndian from './Endian';
import vtkLookupTable from './LookupTable';
import vtkMath from './Math';
import vtkPoints from './Points';
import vtkScalarsToColors from './ScalarsToColors';
i... | Add missing CellArray to main vtk.js | fix(CellArray): Add missing CellArray to main vtk.js
| JavaScript | bsd-3-clause | Kitware/vtk-js,Kitware/vtk-js,Kitware/vtk-js,Kitware/vtk-js |
43a515f25e7bebd90ad2ccce4f60f6b5e0fe71d0 | src/util/arrayEqual.js | src/util/arrayEqual.js | export default function arrayEqual (a, b) {
if (a.length === b.length) {
return a.every((value, index) => {
return value === b[index];
});
}
return false;
}
| export default function arrayEqual (a, b) {
if (a.length === b.length) {
return a.every((value, index) => value === b[index]);
}
return false;
}
| Tidy up array equal function. | Tidy up array equal function.
| JavaScript | mit | ben-eb/css-values |
60858b7850313680b401ddc4b82a3cc277f077e8 | web/src/containers/WorkshopWrapper/ExportButtons.js | web/src/containers/WorkshopWrapper/ExportButtons.js | import React, { Component } from 'react'
import Radium from 'radium'
import { Button } from 'components'
import mediaQueries from 'styles/common'
const styles = {
spacer: {
height: '5em'
},
wrapper: {
[mediaQueries.smallUp]: {
display: 'none'
},
[mediaQueries.print]: {
display: 'none'... | import React, { Component } from 'react'
import Radium from 'radium'
import { Button } from 'components'
import mediaQueries from 'styles/common'
const styles = {
spacer: {
height: '5em'
},
wrapper: {
[mediaQueries.print]: {
display: 'none'
},
bottom: '1em',
[mediaQueries.mediumUp]: {
... | Print and download buttons show up on mobile | Print and download buttons show up on mobile
| JavaScript | mit | hackclub/api,hackclub/api,hackclub/api |
4983d1c11552a52d8a1fdfbc7c0ddcd2a91099db | test/node/unit/cli/runners/node-runner-test.js | test/node/unit/cli/runners/node-runner-test.js | var helper = require("../../../test-helper");
var buster = require("buster");
assert = buster.assert;
var run = helper.runTest;
var nodeRunner = helper.require("cli/runners/node-runner");
buster.testCase("Node runner", {
});
| var helper = require("../../../test-helper");
var buster = require("buster");
buster.autoRun = require("buster-test").autoRun;
buster.testCase = require("buster-test").testCase;
buster.spec = require("buster-test").spec;
assert = buster.assert;
var run = helper.runTest;
var nodeRunner = helper.require("cli/runners/node... | Add tests for node runner | Add tests for node runner
| JavaScript | bsd-3-clause | busterjs/buster-test-cli |
5851a686bd84a60a1d7e14afd605ccb00f2988cd | tasks/loadHerokuEnv.js | tasks/loadHerokuEnv.js | import { herokuConfig } from './util'
import { each, includes } from 'lodash'
const keys = [
'ASSET_HOST',
'ASSET_PATH',
'AWS_ACCESS_KEY_ID',
'AWS_S3_BUCKET',
'AWS_S3_HOST',
'AWS_SECRET_ACCESS_KEY',
'FACEBOOK_APP_ID',
'FILEPICKER_API_KEY',
'GOOGLE_BROWSER_KEY',
'GOOGLE_CLIENT_ID',
'HOST',
'LOG_... | import { herokuConfig } from './util'
import { extend, pick } from 'lodash'
const keys = [
'ASSET_HOST',
'ASSET_PATH',
'AWS_ACCESS_KEY_ID',
'AWS_S3_BUCKET',
'AWS_S3_HOST',
'AWS_SECRET_ACCESS_KEY',
'FACEBOOK_APP_ID',
'FILEPICKER_API_KEY',
'GOOGLE_BROWSER_KEY',
'GOOGLE_CLIENT_ID',
'HOST',
'LOG_LE... | Revert "add all feature flag env variables during deployment" | Revert "add all feature flag env variables during deployment"
This reverts commit 30054de694abf26b8871ff06421a930012019390.
This is unnecessary because we’re not setting feature flag env
variables on the client side using envify (see previous commit).
| JavaScript | agpl-3.0 | Hylozoic/hylo-redux,Hylozoic/hylo-redux |
9cc6a51632b545818afe71f04b6304adac856d20 | edwin/client/static/js/components/Welcome.js | edwin/client/static/js/components/Welcome.js | import React from 'react';
/**
* Wrapper for the rest of the app.
* @class
*/
export default class Welcome extends React.Component {
render() {
return (
<div className="Welcome">
<h1>Oh hai!</h1>
</div>
);
}
}
| import React from 'react';
/**
* Wrapper for the rest of the app.
* @class
*/
export default class Welcome extends React.Component {
render() {
return (
<div className="Welcome">
<h1>Oh hai!</h1>
<p>
This is Edwin. It is super pre-alpha. Click on <b>Teams</b> above, then ch... | Tweak welcome page to be more helpful | Tweak welcome page to be more helpful
This adds some instructions and a link to the issue tracker to the front
page. This is just a stop-gap until things are more fleshed out.
| JavaScript | mpl-2.0 | mythmon/edwin,mythmon/edwin,mythmon/edwin,mythmon/edwin |
5282e85a36a085cab18510430f2a44f2b3ae5833 | src/suspense.js | src/suspense.js | import { Component } from './component';
import { createElement } from './create-element';
// having a "custom class" here saves 50bytes gzipped
export function s(props) {}
s.prototype = new Component();
/**
* @param {Promise} promise The thrown promise
*/
s.prototype._childDidSuspend = function(promise) {
this.se... | import { Component } from './component';
import { createElement } from './create-element';
// having a "custom class" here saves 50bytes gzipped
export function Suspense(props) {}
Suspense.prototype = new Component();
/**
* @param {Promise} promise The thrown promise
*/
Suspense.prototype._childDidSuspend = functio... | Fix display name of Suspense | Fix display name of Suspense
| JavaScript | mit | developit/preact,developit/preact |
f0e159916a6876ed1307b72ffe1551ea5881e56b | src/pages/index.js | src/pages/index.js | import React from "react";
import { rhythm } from "../utils/typography";
import Link from "gatsby-link";
export default ({ data }) => {
console.log(data);
return (
<div>
<h4>{data.allMarkdownRemark.totalCount} Posts</h4>
{data.allMarkdownRemark.edges.map(({ node }) => (
<div key={node.id}>
... | import React from "react";
import { rhythm } from "../utils/typography";
import Link from "gatsby-link";
export default ({ data }) => {
console.log(data);
return (
<div>
<h4>{data.allMarkdownRemark.totalCount} Posts</h4>
{data.allMarkdownRemark.edges.map(({ node }) => (
<div key={node.id}>
... | Add a more button to excerpt in blog list | feat: Add a more button to excerpt in blog list
| JavaScript | mit | aksharpatel47/me,aksharpatel47/me |
9bd5383e43b70cae1b26a0556194f3d8eeee9830 | tests/commands/cmmTests.js | tests/commands/cmmTests.js | var cmm = require("__buttercup/classes/commands/command.cmm.js");
module.exports = {
setUp: function(cb) {
this.command = new cmm();
(cb)();
}
};
| var cmm = require("__buttercup/classes/commands/command.cmm.js");
module.exports = {
setUp: function(cb) {
this.command = new cmm();
(cb)();
},
callbackInjected: {
callsToCallback: function(test) {
var callbackCalled = false;
var callback = function(comment)... | Test that it calls to callback | Test that it calls to callback
| JavaScript | mit | buttercup/buttercup-core,perry-mitchell/buttercup-core,buttercup-pw/buttercup-core,buttercup/buttercup-core,perry-mitchell/buttercup-core,buttercup-pw/buttercup-core,buttercup/buttercup-core |
618e97b8ee5b24e0bc4c6aa7452872b4e4ee9e0e | src/containers/TimerFormContainer.js | src/containers/TimerFormContainer.js | import { connect } from 'react-redux'
import { createTimer } from '../actions/actions'
import TimerForm from '../Components/TimerForm'
const mapStateToProps = state => {
return {
errorText: state.errorText
}
}
const mapDispatchToProps = dispatch => {
return {
createTimer: (minutes) => {
dispatch(... | import { connect } from 'react-redux'
import { requestCreateRemoteTimer } from '../actions/actions'
import TimerForm from '../Components/TimerForm'
const mapStateToProps = state => {
return {
errorText: state.errorText
}
}
const mapDispatchToProps = dispatch => {
return {
createTimer: (minutes) => {
... | Use async action creators in timer form | Use async action creators in timer form
| JavaScript | mit | severnsc/brewing-app,severnsc/brewing-app |
7832d2f5d63a307beb934bf0cbc68a97e756a3ea | theme_1/main.js | theme_1/main.js | import "babel-polyfill"
import React from 'react'
import ReactDOM from 'react-dom'
import { createStore, applyMiddleware } from 'redux'
import createSagaMiddleware from 'redux-saga'
import Counter from './Counter'
import reducer from './reducers'
import rootSaga from './sagas'
const sagaMiddleware = createSagaMiddle... | import "babel-polyfill"
import React from 'react'
import ReactDOM from 'react-dom'
import { createStore, applyMiddleware } from 'redux'
import createSagaMiddleware from 'redux-saga'
import Counter from './Counter'
import reducer from './reducers'
import rootSaga from './sagas'
const sagaMiddleware = createSagaMiddle... | Add new action : fetchData | Add new action : fetchData
| JavaScript | mit | kimisan/classic-dapp-ui |
289ce4bdec3f7432052b3d34afe1e821abb8231d | bs-config.js | bs-config.js | module.exports = {
// browser: 'google chrome',
open: false,
files: ['dist/*.css', 'dist/*.js', 'dist/*.html'],
server: {
baseDir: './dist',
},
notify: false,
}
| module.exports = {
// browser: 'google chrome',
reloadDelay: 500,
open: false,
files: ['dist/*.css', 'dist/*.js', 'dist/*.html'],
server: {
baseDir: './dist',
},
notify: false,
}
| Add a delay to browserSync | Add a delay to browserSync
| JavaScript | agpl-3.0 | hawkrives/gobbldygook,hawkrives/gobbldygook,hawkrives/gobbldygook |
ff076fd1522785a7b83456052b61d26442a87f35 | app/ShotCell.js | app/ShotCell.js | 'use strict';
var React = require('react-native');
var {
Image,
PixelRatio,
StyleSheet,
Text,
TouchableHighlight,
View
} = React;
var getImage = require('./helpers/getImage'),
screen = require('Dimensions').get('window');
var ShotCell = React.createClass({
render: function() {
return (
<V... | 'use strict';
var React = require('react-native');
var {
Image,
PixelRatio,
StyleSheet,
Text,
TouchableHighlight,
View
} = React;
var getImage = require('./helpers/getImage'),
screen = require('Dimensions').get('window');
var ShotCell = React.createClass({
render: function() {
return (
<V... | Remove defaultSource for shot image | Remove defaultSource for shot image
| JavaScript | mit | catalinmiron/react-native-dribbble-app,future-challenger/react-native-dribbble-app,future-challenger/react-native-dribbble-app,future-challenger/react-native-dribbble-app,catalinmiron/react-native-dribbble-app |
8bae636659e5339b0071e6fa3b65903408d17905 | tests/main.spec.js | tests/main.spec.js | var expect = require('chai').expect;
describe('Main', function() {
var arr;
// roda todas as vezes, antes de CADA bloco
beforeEach(function() {
arr = [1, 2, 3];
});
// testar tipos ou se existe (smoke test)
it('should be an array', function() {
expect(arr).to.be.a('array');
});
it('should ha... | import { expect } from 'chai';
describe('Main', () => {
});
| Edit test to es6 syntax | Edit test to es6 syntax
| JavaScript | mit | willianjusten/js-tdd-course |
107075862d309e951ac72af134ce6370528333cd | webpack.prod.js | webpack.prod.js | const merge = require('webpack-merge');
const common = require('./webpack.common.js');
const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = merge(common, {
mode: 'production',
devtool: "source-map",
plugins: [
new CleanWebpackPlugin('dist')
]
}); | const merge = require('webpack-merge');
const common = require('./webpack.common.js');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = merge(common, {
mode: 'production',
devtool: "source-map",
optimization: {
minimizer:... | Delete comments from bundle of js | Delete comments from bundle of js
| JavaScript | mit | Harrix/Harrix-Html-Template |
b6c1ca1c3b3724d3609a11771c1072462ac55ac1 | components/message/Message.js | components/message/Message.js | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Box from '../box';
import cx from 'classnames';
import theme from './theme.css';
class Message extends PureComponent {
static propTypes = {
className: PropTypes.string,
children: PropTypes.any.isRequired,
image: Prop... | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Box from '../box';
import { ButtonGroup } from '../button';
import cx from 'classnames';
import theme from './theme.css';
class Message extends PureComponent {
static propTypes = {
className: PropTypes.string,
children: ... | Use our ButtonGroup component instead of a div with custom styling | Use our ButtonGroup component instead of a div with custom styling
| JavaScript | mit | teamleadercrm/teamleader-ui |
825b5bfe40f12bebac2b129664eadb39524905a1 | lib/polish-process-stylesheet.js | lib/polish-process-stylesheet.js | var fs = require('fs');
var path = require('path');
var Q = require('kew');
var gonzales = require('gonzales-pe');
module.exports = function(file){
return {
name: path.basename(file.path).split('.')[0],
cssDOM: gonzales.parse(file.contents.toString('utf8'), { syntax: 'scss' })
};
}; | var fs = require('fs');
var path = require('path');
var Q = require('kew');
var _ = require('lodash');
var gutil = require('gulp-util');
var PluginError = gutil.PluginError;
var gonzales = require('gonzales-pe');
var PLUGIN_NAME = 'gulp-polish';
module.exports = function(file, syntax){
var filetype ... | Set gonzales-pe syntax based on the file extension. Throw an error if trying to process a file not of type css, scss, sass, or less. | Set gonzales-pe syntax based on the file extension. Throw an error if trying to process a file not of type css, scss, sass, or less.
| JavaScript | mit | brendanlacroix/gulp-polish |
b3dae23a984f655a9d14c58d08b866ebb7aa398b | src/utils/packetCodes.js | src/utils/packetCodes.js | module.exports = {
// Packet constants
PLAYER_START: "1",
PLAYER_ADD: "2",
PLAYER_ANGLE: "2",
PLAYER_UPDATE: "3",
PLAYER_ATTACK :"4",
LEADERBOAD: "5",
PLAYER_MOVE: "3",
PLAYER_REMOVE: "4",
LEADERS_UPDATE: "5",
LOAD_GAME_OBJ: "6",
GATHER_ANIM: "7",
AUTO_ATK: "7",
W... | module.exports = {
// Packet constants
PLAYER_START: "1",
PLAYER_ADD: "2",
PLAYER_ANGLE: "2",
PLAYER_UPDATE: "3",
PLAYER_ATTACK :"4",
LEADERBOAD: "5",
PLAYER_MOVE: "3",
PLAYER_REMOVE: "4",
LEADERS_UPDATE: "5",
LOAD_GAME_OBJ: "6",
GATHER_ANIM: "7",
AUTO_ATK: "7",
W... | Add health update packet code | Add health update packet code
| JavaScript | mit | wwwwwwwwwwwwwwwwwwwwwwwwwwwwww/m.io |
8d9eb3e8938608a623e8af8dd22c70d5b101aa79 | commands/index.js | commands/index.js | // Adapted from https://github.com/tsantef/commander-starter
var fs = require('fs');
var path = require('path');
require('json5/lib/register')
module.exports = function commandLoader(program) {
'use strict';
var commands = {};
var loadPath = path.dirname(__filename);
// Loop though command files
fs.readdi... | // Adapted from https://github.com/tsantef/commander-starter
var fs = require('fs');
var path = require('path');
require('json5/lib/register')
module.exports = function commandLoader(program) {
'use strict';
var commands = {};
var loadPath = path.dirname(__filename);
// Loop though command files
fs.readdi... | Make config file optional by default. | Make config file optional by default.
| JavaScript | mit | krues8dr/lazuli |
82db36be2e13211149d7aec09ce166eba7ddda87 | lib/create.js | lib/create.js | function create(req, next) {
var opts = req.argv
, pkg = opts.pkg
, clazz;
var defname = 'program';
name = opts.name || defname;
var clazz = opts.clazz || require('cli-define').Program;
var prg = opts.program || new clazz(name);
if(pkg) prg.package(pkg);
// inherit name from package descriptor
... | function create(req, next) {
var opts = req.argv
, pkg = opts.pkg
, clazz;
var defname = 'program';
name = opts.name || defname;
var clazz = opts.clazz || require('cli-define').Program;
var prg = opts.program || new clazz(name);
if(pkg) prg.package(pkg);
var sets = !prg.name() || (prg.name() ===... | Update logic for setting name from package. | Update logic for setting name from package.
| JavaScript | mit | cli-kit/cli-compiler,freeformsystems/cli-compiler |
5843294bc7463e061908b96cc7117870bf10e237 | client/templates/course/sidebar/add-section.js | client/templates/course/sidebar/add-section.js | Template.addSection.events({
'click #add-section-button': function (event, template) {
console.log('Adding section to course.');
}
});
| Template.addSection.events({
'click #add-section-button': function (event, template) {
// Get current sections, before adding new section
if (this.sections) {
// If sections exists, use them
var sections = this.sections;
} else {
// otherwise create empty ... | Add section to course in db. | Add section to course in db.
| JavaScript | agpl-3.0 | Crowducate/crowducate-platform,KshirsagarNaidu/bodhiprocessor,Crowducate/crowducate-next,KshirsagarNaidu/bodhiprocessor,Crowducate/crowducate-next,Crowducate/crowducate-platform |
e3e928560fedfe6c0941b2326c66b8b7039f223a | app/javascript/scoreboard/components/Player.js | app/javascript/scoreboard/components/Player.js | import React from 'react'
export default class Player extends React.Component {
render() {
const { id, player, onPlayerScored } = this.props
return (
<div className="player">
<h1>Player {id + 1}</h1>
<div className="score">{player.score}</div>
<div className="score-button">
... | import React from 'react'
export default class Player extends React.Component {
componentDidMount() {
document.addEventListener('keydown', e => {
if (e.shiftKey && e.location - 1 === this.props.id) {
this.props.onPlayerScored()
}
})
}
render() {
const { id, player, onPlayerScored... | Increment scores with left/right shift keys | Increment scores with left/right shift keys
| JavaScript | agpl-3.0 | jbhannah/zenpong,jbhannah/zenpong,jbhannah/zenpong |
bc9299d1b1742e8e4201ab65ac0a683168b1e14d | app/main/plugins/core/cerebro/version/index.js | app/main/plugins/core/cerebro/version/index.js | import React from 'react'
import { search } from 'cerebro-tools'
import icon from '../icon.png'
// Settings plugin name
const NAME = 'Cerebro Version'
// Settings plugins in the end of list
const order = 9
// Phrases that used to find settings plugins
const KEYWORDS = [
NAME,
'ver',
'version'
]
/**
* Plugin ... | import React from 'react'
import { search } from 'cerebro-tools'
import icon from '../icon.png'
import { version } from '../../../../../package.json'
// Settings plugin name
const NAME = 'Cerebro Version'
// Settings plugins in the end of list
const order = 9
// Phrases that used to find settings plugins
const KEYWO... | Use global version from './package.json' file. | Use global version from './package.json' file.
| JavaScript | mit | KELiON/cerebro,KELiON/cerebro |
ed528bc4cb823da356fe38c01747d016f2ea18bb | webpack-production.config.js | webpack-production.config.js | const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
context: __dirname,
devtool: 'source-map',
entry: './app/index.jsx',
output: {
path: './public',
publicPath: '/',
filename: 'app-bundle.js'
},
plugins: ... | const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
context: __dirname,
devtool: 'source-map',
entry: './app/index.jsx',
output: {
path: './public',
publicPath: '/',
filename: 'app-bundle.js'
},
plugins: ... | Disable source map for production | Disable source map for production
| JavaScript | mit | elstgav/step-up,elstgav/stair-climber,elstgav/stair-climber |
731c12b08f7ae03cf4506e5a24eb2afd147ceb38 | connect-four.js | connect-four.js | (function() {
// see http://benalman.com/news/2010/11/immediately-invoked-function-expression/
var Game = function(canvasId) {
var canvas = document.getElementById(canvasId);
var screen = canvas.getContext('2d');
var gameSize = {
x: canvas.width,
... | (function() {
// see http://benalman.com/news/2010/11/immediately-invoked-function-expression/
var Game = function(canvasId) {
// see http://html5doctor.com/an-introduction-to-the-canvas-2d-api/
var canvas = document.getElementById(canvasId);
var gameSize = {
... | Add some links to docs, and learn to draw a red circle. | Add some links to docs, and learn to draw a red circle.
| JavaScript | apache-2.0 | wsmoak/hackerschool,wsmoak/hackerschool |
4f2d48de75f70393891f4b78d11570b5c8cedae7 | server/db/orm-model.js | server/db/orm-model.js | 'use strict';
var db = require('./database');
var Sequelize = require('sequelize');
module.exports = function(){
var User = db.define('Users', {
userId: {type: Sequelize.STRING,
unique: true,
notEmpty: true,
notNull: true,
primaryKey: true
},
email: Sequelize.STRING,
pictu... | 'use strict';
var db = require('./database');
var Sequelize = require('sequelize');
module.exports = function(){
var User = db.define('Users', {
userId: {type: Sequelize.STRING,
unique: true,
notEmpty: true,
notNull: true,
primaryKey: true
},
email: Sequelize.STRING,
pictu... | Update activity table to include a boolean for active or not | Update activity table to include a boolean for active or not
| JavaScript | mit | hmfoster/beards-of-zeus,beards-of-zeus/beards-of-zeus,marqshort/beards-of-zeus,hmfoster/beards-of-zeus,marqshort/beards-of-zeus,marqshort/beards-of-zeus,beards-of-zeus/beards-of-zeus,beards-of-zeus/beards-of-zeus,hmfoster/beards-of-zeus |
d664624e88ae5f37d09580908e87a8b7f97ab8a2 | lib/server.js | lib/server.js | var Canvas = require('canvas'),
Image = Canvas.Image,
fs = require('graceful-fs');
module.exports = {
createCanvas: function(width, height) {
return new Canvas(width, height);
},
loadImageData: function(path, callback){
fs.readFile(path, function(err, data) {
if (err) {
throw err;... | var Canvas = require('canvas'),
Image = Canvas.Image,
fs = require('graceful-fs');
module.exports = {
createCanvas: function(width, height) {
return new Canvas(width, height);
},
loadImageData: function(path, callback){
if (Buffer.isBuffer(path)) {
load(undefined, path);
} else {
... | Allow loading images from buffers | Allow loading images from buffers | JavaScript | mit | kpdecker/node-resemble,prezi/node-resemble |
d8a9cfe448f99dac0c743d7ed0643307070ae737 | data/findrfc.js | data/findrfc.js | /**
* Parse text, return RFCs
*
* @param text String Content you want IETF RFC identifiers pulled out of
*
* @return Array The list of RFC numbers as strings. Ex: ["2616", "2068"]
**/
function collectRFCs(text) {
var rfc_rex = /RFC\W*([1-9][0-9]{0,3})/gi
var match;
var rv = [];
while ((match = rfc_rex.ex... | /**
* Parse text, return RFCs
*
* @param text String Content you want IETF RFC identifiers pulled out of
*
* @return Array The list of RFC numbers as strings. Ex: ["2616", "2068"]
**/
function collectRFCs(text) {
var rfc_rex = /RFC\W*([1-9][0-9]{0,3})/gi
var match;
var rfcs = [];
while ((match = rfc_rex.... | Fix var name bug; Dedup RFC menu items | Fix var name bug; Dedup RFC menu items
| JavaScript | mit | BigBlueHat/rfc-link |
1336fccc525e5d2f20146d8cbff436561d54c754 | gruntfile.js | gruntfile.js | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
// define the files to lint
files: ['gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
// configure JSHint (documented at http://w... | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
// define the files to lint
files: ['gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
// configure JSHint (documented at http://w... | Remove version from minified js name | Remove version from minified js name
| JavaScript | mit | burivuhster/angular-dg-maps,soulman-is-good/angular-dg-maps,soulman-is-good/angular-dg-maps |
e1237ffd9348c01ede371153bfcac22efecbe18d | test/app.js | test/app.js | /**
* @license
* Copyright (c) 2016 The IBM Research Emergent Solutions authors. All rights reserved.
* This code may only be used under the MIT style license found at https://ibmresearch.github.io/LICENSE.txt
* The complete set of authors may be found at https://ibmresearch.github.io/AUTHORS.txt
* The complete se... | /**
* @license
* Copyright (c) 2016 The IBM Research Emergent Solutions authors. All rights reserved.
* This code may only be used under the MIT style license found at https://ibmresearch.github.io/LICENSE.txt
* The complete set of authors may be found at https://ibmresearch.github.io/AUTHORS.txt
* The complete se... | Update the test with the expected files | Update the test with the expected files
| JavaScript | mit | IBMResearch/generator-polymer-init-ibm-application,IBMResearch/generator-polymer-init-ibm-application |
e1321928269119cde884a27a106e29f9297b9b11 | eventPage.js | eventPage.js | (function(console,$runtime,$declarativeWebRequest,$pageAction,$tabs){
"use strict";
function installRequestFilter(){
$declarativeWebRequest.onRequest.removeRules(undefined, function(){
$declarativeWebRequest.onRequest.addRules([{
conditions:[
new $declarativeWebRequest.RequestMatcher({
contentTyp... | (function(console,$runtime,$declarativeWebRequest,$pageAction,$tabs){
"use strict";
function installRequestFilter(){
$declarativeWebRequest.onRequest.removeRules(undefined, function(){
$declarativeWebRequest.onRequest.addRules([{
conditions:[
new $declarativeWebRequest.RequestMatcher({
contentTyp... | Add request matching for occet-strean and for webm | Add request matching for occet-strean and for webm
| JavaScript | mit | JohnNilsson/chrome-play-on-tv |
f85a66591d9b02ba2053103f4afab6c9dd7260b7 | libs/redis.js | libs/redis.js | /*eslint no-console: ["error", { allow: ["log"] }] */
// dependencies --------------------------------------------------
import Redis from 'ioredis';
import config from '../config';
export default {
redis: new Redis(config.redis),
}
| /*eslint no-console: ["error", { allow: ["log"] }] */
// dependencies --------------------------------------------------
import Redis from 'ioredis';
export default {
redis: null,
connect(config, callback) {
if (!this.redis) {
console.log('Connecting to Redis "redis://%s:%d/0"', config.ho... | Rework Redis connection to support callback on connect. | Rework Redis connection to support callback on connect.
| JavaScript | mit | poldracklab/crn_server,poldracklab/crn_server |
1955723258e84e8451a0cdc3851e8cf51e4416c2 | js/widget.js | js/widget.js | (function ($) {
$(window).load(function(){
var store = window.hologram.store;
window.hologram(document.getElementsByClassName('hologram-area')[0], {
uploadUrl: Drupal.settings.Hologram.uploadUrl,
onComplete: function(result){
var json = JSON.stringify(result);
$('#hologram-image-... | (function ($) {
$(window).load(function(){
var store = window.hologram.store;
window.hologram(document.getElementsByClassName('hologram-area')[0], {
uploadUrl: Drupal.settings.Hologram.uploadUrl,
onComplete: function(result){
var files = [];
result['response'].forEach(function(re... | Allow user remove uploaded image | Allow user remove uploaded image
| JavaScript | mit | dollars0427/hologram-widget |
56fdf1f0770905e5024102f938a2899bae36922a | gulp/version.js | gulp/version.js | var _ = require('lodash');
var jsonfile = require('jsonfile');
var thenify = require('thenify');
var args = require('yargs')
.alias('v', 'version')
.argv;
var readJson = thenify(jsonfile.readFile);
var writeJson = thenify(jsonfile.writeFile);
var packageFile = 'package.json';
exports.config = function(gulp) {
if ... | var _ = require('lodash');
var jsonfile = require('jsonfile');
var thenify = require('thenify');
var args = require('yargs')
.alias('v', 'version')
.argv;
var readJson = thenify(jsonfile.readFile);
var writeJson = thenify(jsonfile.writeFile);
var packageFile = 'package.json';
exports.config = function(gulp) {
if ... | Return promise instead of done | Return promise instead of done
It appears that if you return a promise to gulp, gulp waits on the promise and catches the failed promise. By return the promise AND calling done, task completion was getting called twice.
| JavaScript | mit | RenovoSolutions/Gulp-Typescript-Utilities |
ae14be2e53007bb5c0f5d2e8dd82100df078ac43 | src/index.js | src/index.js | var L = require('leaflet'),
map = L.map('map', { attributionControl: false }),
Repository = require('./repository'),
Sidebar = require('./sidebar.js'),
Projections = require('./projections'),
CoordDisplay = require('./coordinates'),
createStyle = require('./feature-style'),
projs = new Proje... | var L = require('leaflet'),
map = L.map('map', { attributionControl: false }),
Repository = require('./repository'),
Sidebar = require('./sidebar.js'),
Projections = require('./projections'),
CoordDisplay = require('./coordinates'),
createStyle = require('./feature-style'),
projs = new Proje... | Use circles for points instead of markers | Use circles for points instead of markers
| JavaScript | bsd-2-clause | perliedman/gis-nerd-tools,perliedman/gis-nerd-tools |
fe62f51bd2b5b33180616375e70c72b054a7c063 | src/index.js | src/index.js | #!/usr/bin/env node
"use strict";
import {install} from './install';
let orgRepos = [
'pip:ipython/traitlets',
'pip:ipython/ipython',
'pip:jupyter/jupyter_core',
'pip:jupyter/jupyter_client',
'pip:ipython/ipykernel',
'pip:jupyter/jupyter_console',
'pip:jupyter/qtconsole',
'pip:jupyter/... | #!/usr/bin/env node
"use strict";
import {install} from './install';
let orgRepos = [
'pip:ipython/traitlets',
'pip:ipython/ipython',
'pip:jupyter/jupyter_core',
'pip:jupyter/jupyter_client',
'pip:ipython/ipykernel',
'pip:jupyter/jupyter_console',
'pip:jupyter/qtconsole',
'pip:jupyter/... | Remove jupyter-devinstall from the package list | Remove jupyter-devinstall from the package list
| JavaScript | bsd-3-clause | jovyan/jupyter-devinstall |
24ba0a4a8e450d86b0deb3235dbdb860986a2d3e | src/index.js | src/index.js | require('../node_modules/github-markdown-css/github-markdown.css')
require('../node_modules/codemirror/lib/codemirror.css')
require('codemirror')
require('codemirror/mode/javascript/javascript')
require('codemirror/mode/markdown/markdown')
var React = require('react')
var App = require('./containers/App')
React.rend... | require('github-markdown-css/github-markdown.css')
require('codemirror/lib/codemirror.css')
require('codemirror')
require('codemirror/mode/javascript/javascript')
require('codemirror/mode/markdown/markdown')
var React = require('react')
var App = require('./containers/App')
React.render(<App/>, document.getElementBy... | Remove node_modules from CSS requires | Remove node_modules from CSS requires
| JavaScript | mit | zalmoxisus/react-lessons,insin/react-lessons,zalmoxisus/react-lessons,insin/react-lessons |
8217f0f5829bda6cb3ef999fa62e99e3d834ee5e | server/standalone.js | server/standalone.js | var Runner = require('./runner').Runner,
_ = require('underscore');
var argv = require('optimist')
.string('a')
.string('w')
.string('p')
.string('u')
.argv;
var numAIs = 4;
var aiCommands = argv.a,
workingDirs = argv.w,
pauseCommands = argv.p,
unpauseCommands = argv.u;
aiCommands =... | var Runner = require('./runner').Runner,
_ = require('underscore');
var argv = require('optimist')
.string('a')
.string('w')
.string('p')
.string('u')
.argv;
var numAIs = 4;
var aiCommands = argv.a,
workingDirs = argv.w,
pauseCommands = argv.p,
unpauseCommands = argv.u;
aiCommands =... | Fix an error when the arguments are complete | Fix an error when the arguments are complete
| JavaScript | apache-2.0 | AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers |
e56ca798e920e1baa2cf391569540f131de51f42 | src/stylesheet.js | src/stylesheet.js | import Decl from './decl'
const proto = Object.freeze({
addRule(selector, decl) {
this._root.nest(selector, decl)
return this
},
export() {
return this._root.export(null)
},
})
export default () => {
const styles = Object.create(proto)
styles._root = Decl()
return styles
}
| import Decl from './decl'
const proto = {
addRule(selector, decl) {
this._root.nest(selector, decl)
return this
},
export() {
return this._root.export(null)
},
}
export default () => {
const styles = Object.create(proto)
styles._root = Decl()
return styles
}
| Drop `Object.freeze()` for prototype of `StyleSheet` objects | Drop `Object.freeze()` for prototype of `StyleSheet` objects
| JavaScript | mit | jason2506/style-script |
b56cb03c19dda1c34e4b310be615008dd2a5ecf8 | app/lib/utils.js | app/lib/utils.js | //////////////////////////
// Utils functions file //
//////////////////////////
'use strict';
/**
* JS Date -> MySQL DateTime
* @return {string} SQL compliant datetime
*/
Date.prototype.toDateTime = function () {
return this.toISOString().slice(0, 19).replace('T', ' ');
};
/**
* Returns true if the given st... | //////////////////////////
// Utils functions file //
//////////////////////////
'use strict';
/**
* JS Date -> MySQL DateTime
* @return {string} SQL compliant datetime
*/
Date.prototype.toDateTime = function () {
return this.toISOString().slice(0, 19).replace('T', ' ');
};
/**
* Returns true if the given st... | Add String.random (used in token generation) | Add String.random (used in token generation)
| JavaScript | mit | buckutt/BuckUTT-pay,buckutt/BuckUTT-pay,buckutt/BuckUTT-pay |
5630334effea59f0a64a37e68b962df892e8fc47 | tests/integration/components/noteworthy-and-popular-project/component-test.js | tests/integration/components/noteworthy-and-popular-project/component-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('noteworthy-and-popular-project', 'Integration | Component | noteworthy and popular project', {
integration: true,
});
test('it renders', function(assert) {
this.set('project', FactoryGuy.m... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import FactoryGuy, { manualSetup } from 'ember-data-factory-guy';
moduleForComponent('noteworthy-and-popular-project', 'Integration | Component | noteworthy and popular project', {
integration: true,
beforeEa... | Update test to include FactoryGuy | Update test to include FactoryGuy
| JavaScript | apache-2.0 | hmoco/ember-osf-web,hmoco/ember-osf-web,hmoco/ember-osf-web |
86c12e150f3206e55a1e28d9daa255c2c6da7001 | js/fix-tagsyo-link.js | js/fix-tagsyo-link.js | function fixTagsyoLink() {
var subMatch = /\/r\/([a-zA-Z_0-9\-]+)/.exec(window.location.href);
if (!subMatch) {
return;
}
var subName = subMatch[1];
var query = "SELECT * FROM url WHERE LOWER(channel) = '" + subName + "' !slideshow";
var tagsyoLink = "http://www.tagsyo.com/q/?q=" + encodeURICom... | function fixTagsyoLink() {
var subMatch = /\/r\/([a-zA-Z_0-9\-]+)/.exec(window.location.href);
if (!subMatch) {
return;
}
var subName = subMatch[1];
var query = "SELECT * FROM url WHERE LOWER(channel) = '" + subName.toLowerCase() + "' !slideshow";
var tagsyoLink = "http://www.tagsyo.com/q/?q=" ... | Fix tagsyo query to lower case subreddit name | Fix tagsyo query to lower case subreddit name
| JavaScript | mit | ubershmekel/redditp,ubershmekel/redditp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.