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
ad11af7002bfb7e6c0737bae5f48270010e1a42e
modules/wikipedia/index.js
modules/wikipedia/index.js
const wiki = require('wikijs').default; module.exports.commands = ['wiki', 'wikipedia']; function prettyPage(page) { return page.summary() // Get the first "sentence" (hopefully) .then(str => str.substr(0, str.indexOf('.') + 1)) // Truncate with an ellipsis if length exceeds 250 chars .then(str => (...
const wiki = require('wikijs').default; module.exports.commands = ['wiki', 'wikipedia']; const urlRegex = /^(?:https?:\/\/)?(?:en\.)?wikipedia\.org\/wiki\/(.+)/; const errorMessage = term => `No Wikipedia page found for "${term}"`; function shortSummary(page, withUrl) { return page.summary() // Get the first ...
Add URL matching to Wikipedia module
Add URL matching to Wikipedia module
JavaScript
mit
LinuxMercedes/EuIrcBot,gmackie/EuIrcBot,euank/EuIrcBot,euank/EuIrcBot,gmackie/EuIrcBot,LinuxMercedes/EuIrcBot
334c168af32f349fa8dbd1ee319611647fa44004
components/org.wso2.carbon.siddhi.editor.core/src/main/resources/web/commons/js/menu-bar/deploy-menu.js
components/org.wso2.carbon.siddhi.editor.core/src/main/resources/web/commons/js/menu-bar/deploy-menu.js
/** * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
/** * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
Change shortcut key for deploy to server
Change shortcut key for deploy to server
JavaScript
apache-2.0
tishan89/carbon-analytics,minudika/carbon-analytics,Niveathika92/carbon-analytics,erangatl/carbon-analytics,Niveathika92/carbon-analytics,minudika/carbon-analytics,minudika/carbon-analytics,tishan89/carbon-analytics,tishan89/carbon-analytics,wso2/carbon-analytics,wso2/carbon-analytics,tishan89/carbon-analytics,wso2/car...
da490e3f5353be00b9deb384813b48952a8db3cc
erpnext/stock/doctype/serial_no/serial_no.js
erpnext/stock/doctype/serial_no/serial_no.js
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt cur_frm.add_fetch("customer", "customer_name", "customer_name") cur_frm.add_fetch("supplier", "supplier_name", "supplier_name") cur_frm.add_fetch("item_code", "item_name", "item_name") c...
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt cur_frm.add_fetch("customer", "customer_name", "customer_name") cur_frm.add_fetch("supplier", "supplier_name", "supplier_name") cur_frm.add_fetch("item_code", "item_name", "item_name") c...
Set status button in serial no
Set status button in serial no
JavaScript
agpl-3.0
Tejal011089/fbd_erpnext,indictranstech/erpnext,suyashphadtare/sajil-final-erp,rohitwaghchaure/erpnext-receipher,mbauskar/Das_Erpnext,rohitwaghchaure/New_Theme_Erp,gangadharkadam/office_erp,Tejal011089/huntercamp_erpnext,suyashphadtare/gd-erp,mbauskar/helpdesk-erpnext,gangadharkadam/v5_erp,rohitwaghchaure/New_Theme_Erp,...
44f3adfdbf85467272d71cf10c9ecd4fe75b57b7
src/KeyboardObserver.js
src/KeyboardObserver.js
import {DeviceEventEmitter} from 'react-native'; class KeyboardObserver { constructor() { this.keyboardHeight = 0; this.animationWillEndAt = 0; this.listeners = {}; this.listenerId = 0; DeviceEventEmitter.addListener('keyboardWillShow', this.handleKeyboardWillShow.bind(this)); DeviceEventEmi...
import {Keyboard} from 'react-native'; class KeyboardObserver { constructor() { this.keyboardHeight = 0; this.animationWillEndAt = 0; this.listeners = {}; this.listenerId = 0; Keyboard.addListener('keyboardWillShow', this.handleKeyboardWillShow.bind(this)); Keyboard.addListener('keyboardWill...
Fix React Native Keyboard warnings
Fix React Native Keyboard warnings
JavaScript
mit
azendoo/react-native-keyboard-responsive-view
8c4b151b36ac5ff4d83206e19675c45932248809
src/BBM.fn.toBBM.js
src/BBM.fn.toBBM.js
(function (){ "use strict"; var BBM = require("./BBM.js"); var ENUM = BBM.ENUM; var REGSTR = [ "\"{3,}" , "--" , "\\*{2}" , "\\^{2}" , ",," , "__" , "''" , "\\?<" , "!<" , "#<" , "#\\[" , "-\\[" , "\\]" ]; var REGEX = new RegExp(REGSTR.join("|"), "g"); //Serializes this subtree into BBM. function toBBM() { } ...
(function (){ "use strict"; var BBM = require("./BBM.js"); var ENUM = BBM.ENUM; var REGSTR = [ "\\\\[\\s\\S]" , "\"{3,}" , "--" , "\\*{2}" , "\\^{2}" , ",," , "__" , "''" , "\\?<" , "!<" , "#<" , "#\\[" , "-\\[" , "\\]" ]; var REGEX = new RegExp(REGSTR.join("|"), "g"); //Serializes this subtree into BBM. functio...
Add backslash tokens to the escape list.
Add backslash tokens to the escape list.
JavaScript
mit
Preole/bbm,Preole/bbm
a8bde2cb21c53fbdcf6a4aae9124a310f9e0111f
lib/client/error_reporters/window_error.js
lib/client/error_reporters/window_error.js
var prevWindowOnError = window.onerror; window.onerror = function(message, url, line, stack) { var now = Date.now(); stack = stack || 'window@'+url+':'+line+':0'; Kadira.sendErrors([{ appId : Kadira.options.appId, name : message, source : 'client', startTime : now, type : 'window.onerror', ...
var prevWindowOnError = window.onerror; window.onerror = function(message, url, line, stack) { var now = Date.now(); stack = stack || 'window@'+url+':'+line+':0'; Kadira.sendErrors([{ appId : Kadira.options.appId, name : 'Error: ' + message, source : 'client', startTime : now, type : 'window.o...
Use 'ErrorName: message' format for name
Use 'ErrorName: message' format for name
JavaScript
mit
chatr/kadira,meteorhacks/kadira
7035a1f61994961884bc8c584b793b2f657ad242
web/frontend/pages/rich_text_editor.js
web/frontend/pages/rich_text_editor.js
import tinymce from 'tinymce/tinymce'; window.tinymce = tinymce; import 'tinymce/themes/silver'; import 'tinymce/plugins/link'; import 'tinymce/plugins/lists'; import 'tinymce/plugins/image'; import 'tinymce/plugins/table'; import 'tinymce/plugins/code'; import 'tinymce/plugins/paste'; import 'tinymce/plugins/media'; i...
import tinymce from 'tinymce/tinymce'; window.tinymce = tinymce; import 'tinymce/themes/silver'; import 'tinymce/icons/default'; import 'tinymce/plugins/link'; import 'tinymce/plugins/lists'; import 'tinymce/plugins/image'; import 'tinymce/plugins/table'; import 'tinymce/plugins/code'; import 'tinymce/plugins/paste'; i...
Include TinyMCE icons after update
Include TinyMCE icons after update
JavaScript
agpl-3.0
harvard-lil/h2o,harvard-lil/h2o,harvard-lil/h2o,harvard-lil/h2o
61ef41e923fe2d05f36f47ed26139fcf6e4685ae
app/components/language-picker/component.js
app/components/language-picker/component.js
import Ember from 'ember'; import countries from './countries'; export default Ember.Component.extend({ i18n: Ember.inject.service(), countries: countries, languages: Ember.computed('countries', function() { var langs = []; this.get('countries').forEach((country) => { country.language...
import Ember from 'ember'; import countries from './countries'; export default Ember.Component.extend({ i18n: Ember.inject.service(), countries: countries, languages: Ember.computed('countries', function() { var langs = []; this.get('countries').forEach((country) => { country.language...
Sort flags by country code
Sort flags by country code
JavaScript
apache-2.0
CenterForOpenScience/isp,CenterForOpenScience/isp,samanehsan/isp,samanehsan/isp,CenterForOpenScience/isp,samanehsan/isp
4f0b898c968cca08ac87638d4250c6140f354a7f
src/components/HomepagePetitions/index.js
src/components/HomepagePetitions/index.js
import React from 'react'; import TeaserGrid from 'components/TeaserGrid'; import Container from 'components/Container'; import BlockContainer from 'components/BlockContainer'; import Section from 'components/Section'; import Heading2 from 'components/Heading2'; import styles from './homepage-petitions.scss'; import Li...
import React from 'react'; import TeaserGrid from 'components/TeaserGrid'; import Container from 'components/Container'; import BlockContainer from 'components/BlockContainer'; import Section from 'components/Section'; import Heading2 from 'components/Heading2'; import styles from './homepage-petitions.scss'; import Li...
Use latest petitions on HP instead...
Use latest petitions on HP instead...
JavaScript
apache-2.0
iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend
8ea1ff2f989480a77181a384d64cfdcd68a88c18
blueprints/ember-flexberry-designer/index.js
blueprints/ember-flexberry-designer/index.js
/* globals module */ module.exports = { afterInstall: function() { var _this = this; return _this.addAddonsToProject({ packages: [ { name: 'ember-flexberry', target: '0.12.3' } ] }).then(function () { return _this.addPackagesToProject([ { name: 'npm:jointjs', target: '^2.1....
/* globals module */ module.exports = { afterInstall: function() { var _this = this; return _this.addAddonsToProject({ packages: [ { name: 'ember-cli-jstree', target: '1.0.9' }, { name: 'ember-flexberry', target: '0.12.3' }, { name: 'ember-promise-helpers', target: '1.0.3' } ...
Fix default blueprint add missing dependencies
Fix default blueprint add missing dependencies
JavaScript
mit
Flexberry/ember-flexberry-designer,Flexberry/ember-flexberry-designer,Flexberry/ember-flexberry-designer
3322f2a9c5627719c552d737543a3f7f88888122
webpack.config.dist.js
webpack.config.dist.js
var config = require('./webpack.config.js'); var webpack = require('webpack'); config.devtool = 'source-map'; config.output.publicPath = './'; config.plugins.push( new webpack.DefinePlugin({ 'process.env': { 'NODE_ENV': JSON.stringify('production') } }) ); config.plugins.push( new webpack.optimi...
var config = require('./webpack.config.js'); var webpack = require('webpack'); var pkg = require('./package.json'); var banner = '@license minigrid '; banner = banner + pkg.version; banner = banner + ' – minimal cascading grid layout http://alves.im/minigrid'; config.devtool = 'source-map'; config.output.publicPath ...
Add banner comment to dis version
Add banner comment to dis version
JavaScript
mit
messinmotion/minigrid,henriquea/minigrid,henriquea/minigrid
9dd210893d6e961f89836281df4a16c056917d8f
src/TileMap.js
src/TileMap.js
function TileMap(w, h) { this.width = w; this.height = h; this.reset(); } TileMap.prototype.reset = function() { this.map = []; for(var y = 0; y < this.height; y++) { this.map[y] = []; for(var x = 0; x < this.width; x++) { this.map[y][x] = new Tile(); } } } function Tile() { } TileMap...
function TileMap(w, h) { this.width = w; this.height = h; this.reset(); } TileMap.prototype.reset = function() { this.map = []; for(var y = 0; y < this.height; y++) { this.map[y] = []; for(var x = 0; x < this.width; x++) { this.map[y][x] = new Tile(x, y); } } } function Tile(x, y) { t...
Change Tile to store its own coordinates
Change Tile to store its own coordinates
JavaScript
mit
yoo2001818/TableFlip
5068d340bf68c03d79d3c6b9325f5557d4daa3c9
lib/libra2/app/assets/javascripts/file_upload_options.js
lib/libra2/app/assets/javascripts/file_upload_options.js
(function() { "use strict"; function initPage() { var fileTypes = [ "csv", "gif", "jpeg", "jpg", "mp3", "mp4", "pdf", "png", "tif", "tiff", "txt", "xml" ]; var list = fileTypes.join(", ").toUpperCase(); var filter = fileTypes.join("|"); // Match any file that doesn't c...
(function() { "use strict"; function initPage() { var fileTypes = [ "csv", "gif", "htm", "html", "jpeg", "jpg", "mp3", "mp4", "pdf", "png", "tif", "tiff", "txt", "xml" ]; var list = fileTypes.join(", ").toUpperCase(); var filter = fileTypes.join("|"); // Match an...
Add html and htm to list of acceptable files
LIBRA-235: Add html and htm to list of acceptable files
JavaScript
apache-2.0
uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2
253529d42c1ef9b7aed7b2754c77bc8a246d892e
repeat.js
repeat.js
/*! http://mths.be/repeat v0.1.0 by @mathias */ if (!String.prototype.repeat) { (function() { 'use strict'; // needed to support `apply`/`call` with `undefined`/`null` var repeat = function(count) { if (this == null) { throw TypeError(); } var string = String(this); // `ToInteger` var n = count ...
/*! http://mths.be/repeat v0.1.0 by @mathias */ if (!String.prototype.repeat) { (function() { 'use strict'; // needed to support `apply`/`call` with `undefined`/`null` var repeat = function(count) { if (this == null) { throw TypeError(); } var string = String(this); // `ToInteger` var n = count ...
Remove unnecessary check for `n == 0`
Remove unnecessary check for `n == 0` The `while` loop below handles this case anyway. The only ‘overhead’ the check avoided was a single `n--` and a `ToBoolean(0)` — so this was definitely a micro-optimization. Closes #3.
JavaScript
mit
mathiasbynens/String.prototype.repeat
c7dd9a0b4aacce1e04e9cbe4400b085cd0eb9119
src/build.js
src/build.js
var requirejs = require('requirejs'); var applicationConfig = { baseUrl: './public/js', name: 'app', out: './public/app.js', mainConfigFile: './public/js/app.js', paths: { 'socket.io': 'empty:', 'requireLib': 'require' }, include: [ 'requireLib' ] }; var mainConfig...
var requirejs = require('requirejs'); var applicationConfig = { baseUrl: './public/js', name: 'app', out: './public/app.js', mainConfigFile: './public/js/app.js', paths: { 'socket.io': 'empty:', 'requireLib': 'require' }, include: [ 'requireLib' ] }; var mainConfig...
Compress CSS into a single file
Compress CSS into a single file
JavaScript
apache-2.0
pinittome/pinitto.me,pinittome/pinitto.me,pinittome/pinitto.me
a9ed364ba26e9952a05934ac5369dce8db23c4da
public/nav_control/nav_control.js
public/nav_control/nav_control.js
import { constant, includes } from 'lodash'; import { element } from 'angular'; import uiModules from 'ui/modules'; import registry from 'ui/registry/chrome_nav_controls'; import '../components/notification_center'; import template from './nav_control.html'; import 'ui/angular-bootstrap'; registry.register(constant({ ...
import { constant, includes } from 'lodash'; import { element } from 'angular'; import uiModules from 'ui/modules'; import registry from 'ui/registry/chrome_nav_controls'; import '../components/notification_center'; import template from './nav_control.html'; import 'ui/angular-bootstrap'; registry.register(constant({ ...
Fix notification-center not to close when button clicked.
Fix notification-center not to close when button clicked.
JavaScript
mit
sw-jung/kibana_notification_center,sw-jung/kibana_notification_center
225df4bb8f5e6561161dab095c49a8b78286dbb2
src/components/Heading.js
src/components/Heading.js
/* * A reusable component to display a styled heading. */ import PropTypes from 'prop-types'; import React, {Component} from 'react'; import {StyleSheet, css} from 'aphrodite/no-important'; export default class Heading extends Component { static propTypes = { level: PropTypes.oneOf([1, 2]).isRequired, ...
/* * A reusable component to display a styled heading. */ import PropTypes from 'prop-types'; import React, {Component} from 'react'; import {StyleSheet, css} from 'aphrodite/no-important'; export default class Heading extends Component { static propTypes = { level: PropTypes.oneOf([1, 2, 3]).isRequire...
Add support for level-3 headings
Add support for level-3 headings
JavaScript
mit
wchargin/wchargin.github.io,wchargin/wchargin.github.io
641b6937f8b8b54bd654c4ca6ca5345be5ff3f0e
router.js
router.js
var httpProxy = require('http-proxy'); var http = require('http'); var proxy = httpProxy.createProxy(); var routes = { // Router 'hook.labeli.org' : 'http://localhost:9000', // Api 'api.labeli.org' : 'http://localhost:9010', 'hook.api.labeli.org' : 'http://localhost:9011', ...
var httpProxy = require('http-proxy'); var http = require('http'); var proxy = httpProxy.createProxyServer({}); var routes = { // Router 'hook.labeli.org' : 'http://localhost:9000', // Api 'api.labeli.org' : 'http://localhost:9010', 'hook.api.labeli.org' : 'http://localhost:9011', // Website ...
Add method getRouteFor() to create default route
Add method getRouteFor() to create default route
JavaScript
mit
asso-labeli/labeli-router,asso-labeli/labeli-router
c956e63c62f17c3c671ea991f978e42218a94691
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Add explicit include (early in order) for the leaflet.markercluster js file
Add explicit include (early in order) for the leaflet.markercluster js file
JavaScript
mit
codeforgso/cityvoice,ajb/cityvoice,daguar/cityvoice,ajb/cityvoice,codeforgso/cityvoice,daguar/cityvoice,codeforgso/cityvoice,codeforamerica/cityvoice,codeforamerica/cityvoice,ajb/cityvoice,codeforamerica/cityvoice,daguar/cityvoice,daguar/cityvoice,codeforamerica/cityvoice,ajb/cityvoice,codeforgso/cityvoice
d703dad4967b92c85a470b5d445a7a1fd5765352
app/assets/javascripts/osem-switch.js
app/assets/javascripts/osem-switch.js
$(function () { $("[class='switch-checkbox']").bootstrapSwitch(); $('input[class="switch-checkbox"]').on('switchChange.bootstrapSwitch', function(event, state) { var url = $(this).attr('url') + state; var method = $(this).attr('method'); $.ajax({ url: url, type: method, dataType: 'sc...
function checkboxSwitch(selector){ $(selector).bootstrapSwitch( ); $(selector).on('switchChange.bootstrapSwitch', function(event, state) { var url = $(this).attr('url') + state; var method = $(this).attr('method'); $.ajax({ url: url, type: method, dataType: 'script' }); }); ...
Add a function for initing boostrapSwitch outside of $()
Add a function for initing boostrapSwitch outside of $()
JavaScript
mit
bear454/osem,hennevogel/osem,AndrewKvalheim/osem,differentreality/osem,differentreality/osem,rishabhptr/osem,openSUSE/osem,rishabhptr/osem,bear454/osem,SeaGL/osem,openSUSE/osem,rishabhptr/osem,differentreality/osem,hennevogel/osem,hennevogel/osem,SeaGL/osem,hennevogel/osem,openSUSE/osem,bear454/osem,rishabhptr/osem,And...
23a7aefe2d78f46523bd71a25c3ceb90db254f5e
src/index.js
src/index.js
const fs = require('fs'); const path = require('path'); const { infer } = require('bayesjs'); const { json, send } = require('micro'); const htmlContent = fs .readFileSync(path.join(__dirname, 'index.html')) .toString(); module.exports = async (req, res) => { if (req.url !== '/') { return send(res, 404); ...
const fs = require('fs'); const path = require('path'); const { infer } = require('bayesjs'); const { json, send } = require('micro'); const htmlContent = fs .readFileSync(path.join(__dirname, 'index.html')) .toString(); module.exports = async (req, res) => { if (req.url !== '/') { return send(res, 404); ...
Change 'not found' to 'method not allowed'
Change 'not found' to 'method not allowed'
JavaScript
mit
fhelwanger/bayesjs-ws,fhelwanger/bayesjs-ws
73f420d634399f26a329fd66f1afc6221e1aeb8b
src/index.js
src/index.js
const Discord = require('discord.js'); const config = require('./config.json'); const manager = new Discord.ShardingManager('./bot.js'); //Spawn with a relevant number of shards automatically manager.spawn();
const Discord = require('discord.js'); const config = require('./config.json'); const API = require("./api.json"); const manager = new Discord.ShardingManager('./bot.js', { token: API.discord }); //Spawn with a relevant number of shards automatically manager.spawn();
Add token in sharding manager
Add token in sharding manager
JavaScript
mit
moustacheminer/MSS-Discord,moustacheminer/MSS-Discord,moustacheminer/MSS-Discord
5955b691f3e44cbf8224e070c1c67fdd070f5454
src/content.js
src/content.js
/* Listen for messages and get modResource meta tag*/ chrome.runtime.onMessage.addListener(function(msg, sender, sendResponse) { if (msg.command && (msg.command == "getResource")) { function getMetaContentByName(name,content){ var content = (content==null)?'content':content; var meta = document.q...
/* Listen for messages and get modResource meta tag*/ chrome.runtime.onMessage.addListener(function(msg, sender, sendResponse) { if (msg.command && (msg.command == "getResource")) { function getMetaContentByName(name,content){ var content = (content==null)?'content':content; var meta = document.q...
Change meta name for valid html output
Change meta name for valid html output
JavaScript
mit
bartholomej/modx-manager-switch,bartholomej/modx-manager-switch
490f0af6992eab28938273d91341073138082b35
test/unit/tadaboard-node-sdk.js
test/unit/tadaboard-node-sdk.js
import TB from '../../src/tadaboard-node-sdk'; describe('TB', () => { });
import TB from '../../src/tadaboard-node-sdk'; describe('TB', () => { describe('response', () => { it('is a function', () => { expect(TB.response).to.be.a('function'); }); }); });
Add simple test for TB.response
Add simple test for TB.response
JavaScript
mit
tadaboard/node-sdk,tadaboard/node-sdk
c716b8f23392e2d26c7675f193be4c54f72205cd
app/renderer/js/notification/index.js
app/renderer/js/notification/index.js
'use strict'; const { remote: { app } } = require('electron'); const DefaultNotification = require('./default-notification'); const { appId, loadBots } = require('./helpers'); // From https://github.com/felixrieseberg/electron-windows-notifications#appusermodelid // On windows 8 we have to explicitly set the appUs...
'use strict'; const { remote: { app } } = require('electron'); const DefaultNotification = require('./default-notification'); const { appId, loadBots } = require('./helpers'); // From https://github.com/felixrieseberg/electron-windows-notifications#appusermodelid // On windows 8 we have to explicitly set the appUs...
Refactor code for bot mention in reply.
notification: Refactor code for bot mention in reply.
JavaScript
apache-2.0
zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-electron,zulip/zulip-electron,zulip/zulip-desktop,zulip/zulip-electron
2237d762db94f82264d5784412720fcfe69226a0
Assets/js/init-dropzone.js
Assets/js/init-dropzone.js
$( document ).ready(function() { Dropzone.autoDiscover = false; var myDropzone = new Dropzone(".dropzone", { url: '/api/file', autoProcessQueue: true, maxFilesize: maxFilesize, acceptedFiles : acceptedFiles }); myDropzone.on("success", function(file, http) { windo...
$( document ).ready(function() { Dropzone.autoDiscover = false; var myDropzone = new Dropzone(".dropzone", { url: '/api/file', autoProcessQueue: true, maxFilesize: maxFilesize, acceptedFiles : acceptedFiles }); myDropzone.on("queuecomplete", function(file, http) { ...
Fix early redirect when uploading multiple files
Fix early redirect when uploading multiple files I had the case where I needed to upload 20+ files. Some files were uploaded others not. The others failed due to the location.reload() function triggered on the first success emit from a first successful upload. It seems by using the queuecomplete event it works in...
JavaScript
mit
zedee/Media,zedee/Media,AsgardCms/Media,oimken/Media,MentallyFriendly/Media,mikemand/Media,gabva/Media,mikemand/Media,AsgardCms/Media,mikemand/Media,AsgardCms/Media,MentallyFriendly/Media,gabva/Media,ruscon/Media,oimken/Media,zedee/Media,oimken/Media,ruscon/Media
16eadc7fd084c4d4471655aa5239b77c933529db
tasks/options/concat_sourcemap.js
tasks/options/concat_sourcemap.js
module.exports = { app: { src: ['tmp/transpiled/app/**/*.js'], dest: 'tmp/public/assets/app.js' }, test: { src: 'tmp/transpiled/tests/**/*.js', dest: 'tmp/public/tests/tests.js' } };
module.exports = { app: { src: ['tmp/transpiled/app/**/*.js'], dest: 'tmp/public/assets/app.js', options: { sourcesContent: true }, }, test: { src: 'tmp/transpiled/tests/**/*.js', dest: 'tmp/public/tests/tests.js', options: { sourcesContent: true } } };
Revert "sourceMappingURL instead of sourceContent for now"
Revert "sourceMappingURL instead of sourceContent for now" This reverts commit cd758092a64445d48c5e4ab61407a5c5b51ea8f1.
JavaScript
mit
sajt/ember-weather,mixonic/ember-app-kit,duvillierA/try_ember,grese/miner-app-OLD,cevn/tasky-web,ClockworkNet/ember-boilerplate,stefanpenner/ember-app-kit,kiwiupover/seattle-auckland-weather,kiwiupover/ember-weather,shin1ohno/want-js,tomclose/minimal_eak_test_stub_problem,ClockworkNet/ember-boilerplate,Anshdesire/ember...
c518210b525a55e01f8ec1551ec40a2d08133bac
public/js/routes/Routes.js
public/js/routes/Routes.js
define(['app', 'controllers/Today', 'controllers/History', 'services/History'], function (app) { "use strict"; return app.config(['$routeProvider', function (routes) { routes .when('/', { controller: 'TodayController', templateUrl: '/partials/today.html' }) .when('/history', {...
define(['app', 'controllers/Today', 'controllers/History', 'services/History'], function (app) { "use strict"; return app.config(['$routeProvider', function (routes) { routes .when('/', { controller: 'TodayController', templateUrl: '/partials/today.html' }) .when('/history', {...
Fix resolve for minified route controller
Fix resolve for minified route controller
JavaScript
mit
BrettBukowski/tomatar
11764092ee043286fd017da940c28df51a4eba00
client/js/directives/fancy-box-directive.js
client/js/directives/fancy-box-directive.js
"use strict"; angular.module("hikeio"). directive("fancybox", ["$rootScope", function($rootScope) { return { link: function (scope, element, attrs) { scope.$on("$routeChangeStart", function () { $.fancybox.close(); }); scope.$on("fancyboxClose", function () { $.fancybox.close(); }); ...
"use strict"; angular.module("hikeio"). directive("fancybox", ["$rootScope", function($rootScope) { return { link: function (scope, element, attrs) { var context = { afterLoad: function(current, previous) { $rootScope.$broadcast("fancyboxLoaded"); }, afterClose: function(current, previou...
Remove fancybox afterLoad / afterClose event on destroy.
Remove fancybox afterLoad / afterClose event on destroy.
JavaScript
mit
zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io
3716935789ed49ae905df0d3da6adf8c52e0f966
platform/wasm/test-server.js
platform/wasm/test-server.js
"use strict"; const http = require("http"); const express = require("express"); let app = express(); // Use Cross-Origin headers so browsers allow SharedArrayBuffer app.use(function(req, res, next) { res.header("Cross-Origin-Opener-Policy", "same-origin"); res.header("Cross-Origin-Embedder-Policy", "require-corp")...
"use strict"; const http = require("http"); const express = require("express"); let app = express(); // Add some logging on each request app.use(function(req, res, next) { const date = new Date().toISOString(); console.log( `[${date}] "${cyan(req.method)} ${cyan(req.url)}" "${req.headers["user-agent"]}"` ); ne...
Add logging to test server
muwasm: Add logging to test server
JavaScript
agpl-3.0
ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf
a1bf63b212b97d8b7e1ad90e7397ab79defe902c
generatorTests/test/directoryStructureSpec.js
generatorTests/test/directoryStructureSpec.js
var path = require('path'); var chai = require('chai'); chai.use(require('chai-fs')); chai.should(); const ROOT_DIR = path.join(process.cwd(), '..'); describe('As a dev', function() { describe('When testing generator directory structure', function() { it('then _config folder should exist', function() {...
var path = require('path'); var chai = require('chai'); chai.use(require('chai-fs')); chai.should(); const ROOT_DIR = path.join(process.cwd(), '..'); describe('As a dev', function() { describe('When testing generator directory structure', function() { var pathToTest; it('then _config folder sh...
Update directoryStructure test to include all base folders. Refactor order to mirror folder order, minor refactor
test: Update directoryStructure test to include all base folders. Refactor order to mirror folder order, minor refactor
JavaScript
mit
CodeRichardJohnston/slate-demo,cartridge/cartridge-cli,code-computerlove/quarry,code-computerlove/slate-cli,cartridge/cartridge,code-computerlove/slate,CodeRichardJohnston/slate-demo,code-computerlove/slate
eaac19a6be8c660bec896dea0c0968590e3eeee4
src/js/app/view/history.js
src/js/app/view/history.js
var Backbone = require('backbone'); var url = require('url'); "use strict"; exports.HistoryUpdate = Backbone.View.extend({ initialize : function () { console.log('HistoryUpdate:initialize'); this.listenTo(this.model, "change:asset", this.assetChanged); this.listenTo(this.model, "change:ac...
var Backbone = require('backbone'); var url = require('url'); "use strict"; exports.HistoryUpdate = Backbone.View.extend({ initialize : function () { console.log('HistoryUpdate:initialize'); this.listenTo(this.model, "change:asset", this.assetChanged); this.listenTo(this.model, "change:ac...
Allow for more flexible url pattern
Allow for more flexible url pattern
JavaScript
bsd-3-clause
menpo/landmarker.io,menpo/landmarker.io,menpo/landmarker.io
ffae6c6f7c935684a132b191b71bae1919ecffab
src/js/config/config.js
src/js/config/config.js
var url = require("url"); var packageJSON = require("../../../package.json"); var config = { // @@ENV gets replaced by build system environment: "@@ENV", // If the UI is served through a proxied URL, this can be set here. rootUrl: "", // Defines the Marathon API URL, // leave empty to use the same as the U...
var packageJSON = require("../../../package.json"); var config = { // @@ENV gets replaced by build system environment: "@@ENV", // If the UI is served through a proxied URL, this can be set here. rootUrl: "", // Defines the Marathon API URL, // leave empty to use the same as the UI is served. apiURL: ".....
Revert "Convert relative apiURL paths to absolute paths"
Revert "Convert relative apiURL paths to absolute paths" This reverts commit d4649622aecd8d1cae56963fd4f214acf45b0cf3.
JavaScript
apache-2.0
cribalik/marathon-ui,mesosphere/marathon-ui,mesosphere/marathon-ui,cribalik/marathon-ui
9f2b45cec678d106844359977968c859f1bc9c16
app/scripts/services/invitation-service.js
app/scripts/services/invitation-service.js
'use strict'; (function() { angular.module('ncsaas') .service('invitationService', ['baseServiceClass', '$http', 'ENV', invitationService]); function invitationService(baseServiceClass, $http, ENV) { /*jshint validthis: true */ var vm = this; var ServiceClass = baseServiceClass.extend({ init...
'use strict'; (function() { angular.module('ncsaas') .service('invitationService', ['baseServiceClass', '$http', 'ENV', invitationService]); function invitationService(baseServiceClass, $http, ENV) { /*jshint validthis: true */ var ServiceClass = baseServiceClass.extend({ init: function() { ...
Implement invitation data service (WAL-32)
Implement invitation data service (WAL-32)
JavaScript
mit
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
1e2dacf7b8946f8e97d0ae823cfd00a2cf131819
src/lib/backend/lib/find_dirs_with_entry.js
src/lib/backend/lib/find_dirs_with_entry.js
"use strict"; const fs = require("fs-extra-promise"); const path = require("path"); const log = require("log"); const findDirsWithEntry = async (baseDir, entryFile = "index.js") => { const res = []; const dirContent = await fs.readdirAsync(baseDir); for (const dirName of dirContent) { const dirPat...
"use strict"; const fs = require("fs-extra-promise"); const path = require("path"); const log = require("log"); const findDirsWithEntry = async (baseDir, entryFile = "index.js") => { const res = []; const dirContent = await fs.readdirAsync(baseDir); for (const dirName of dirContent) { const dirPat...
Fix problem with regular files in search paths
backend: Fix problem with regular files in search paths
JavaScript
mit
Combitech/codefarm,Combitech/codefarm,Combitech/codefarm
0dae84d675d76dafcde86eb1911b9c9f3cf31997
src/view/table/cell/EditableAmountCell.js
src/view/table/cell/EditableAmountCell.js
/** * Cell used for showing and allowing the editing of an AmountEntry * * Copyright 2015 Ethan Smith */ var $ = require('jquery'), AmountEntryCell = require('./AmountEntryCell'); var EditableAmountCell = AmountEntryCell.extend({ render: function() { var self = this; this._super(); this...
/** * Cell used for showing and allowing the editing of an AmountEntry * * Copyright 2015 Ethan Smith */ var $ = require('jquery'), AmountEntryCell = require('./AmountEntryCell'); var EditableAmountCell = AmountEntryCell.extend({ render: function() { var self = this; this._super(); this...
Update model and trigger edited event on blur
Update model and trigger edited event on blur
JavaScript
mit
onebytegone/banknote-client,onebytegone/banknote-client
6aa462a2d69c71f8813925b65c715d329a912ef0
packages/react/src/TransitionContainer.js
packages/react/src/TransitionContainer.js
// @flow import type { Children } from 'react'; import React from 'react'; import { addTransitionListener } from 'yubaba-core'; export default class TransitionContainer extends React.Component { _detatch: Function; props: { pair: string, children?: Children, style?: any, }; state = { visibl...
// @flow import type { Children } from 'react'; import React from 'react'; import { addTransitionListener } from 'yubaba-core'; export default class TransitionContainer extends React.Component { _detatch: Function; props: { pair: string, children?: Children, style?: any, }; state = { visibl...
Check for documents existance in transition container
Check for documents existance in transition container
JavaScript
mit
madou/yubaba,madou/yubaba
2754983001e7a5853620db4d1b13b91a944424c9
server.js
server.js
require('dotenv').config({silent: true}); const process = require('process'); const http = require('http'); const createHandler = require('github-webhook-handler'); const GitHubApi = require('github'); const Configuration = require('./lib/configuration'); const Dispatcher = require('./lib/dispatcher'); const installat...
require('dotenv').config({silent: true}); const process = require('process'); const http = require('http'); const createHandler = require('github-webhook-handler'); const Configuration = require('./lib/configuration'); const Dispatcher = require('./lib/dispatcher'); const installations = require('./lib/installations')...
Remove unused github api instance
Remove unused github api instance
JavaScript
isc
pholleran-org/probot,probot/probot,bkeepers/PRobot,probot/probot,pholleran-org/probot,probot/probot,pholleran-org/probot,bkeepers/PRobot
9f3981cd7e6ba35ee01a5a81e6cd1ba8f6e524f2
server.js
server.js
var queue = require('queue-async'); var express = require('express'); var request = require('request'); var app = express(); app.use(express.static(__dirname + '/static')); app.get('/:owner/:repo', function(req, res, next) { var q = queue(); var repoName = req.params.owner + '/' + req.params.repo; res.locals.re...
var queue = require('queue-async'); var express = require('express'); var request = require('request'); var app = express(); app.use(express.static(__dirname + '/static')); function renderStargazes(req, res, next) { var q = queue(); for (var i=1; i<=10; i++) { q.defer(request,{ url:'https://api.github.c...
Add environmental config for root repo
Add environmental config for root repo
JavaScript
mit
stuartpb/starwatchcats,stuartpb/starwatchcats
27e591f9b15c2b73b3f1ddef7c7c61208f90b53c
karma.config.js
karma.config.js
var _ = require('lodash'), path = require('path'), webpackConfig = require('./webpack.config.js'); _.merge(webpackConfig, { devtool: 'inline-source-map', module: { preLoaders: [ { test: /\.(js|jsx)?$/, include: path.resolve('src/'), loader: 'babel-istanbul-in...
var _ = require('lodash'), path = require('path'), webpackConfig = require('./webpack.config.js'); _.merge(webpackConfig, { devtool: 'inline-source-map', module: { postLoaders: [ { test: /\.(js|jsx)?$/, include: path.resolve('src/'), loader: 'babel-istanbul-i...
Change from `preLoaders` to `postLoaders`
Change from `preLoaders` to `postLoaders`
JavaScript
mit
ufocoder/WebsocketUI,ufocoder/WebsocketUI
ecf867bf88ddd300d4dab1ad978db8d0554258d7
app/assets/javascripts/browser-check.js
app/assets/javascripts/browser-check.js
/*globals $, GOVUK, suchi */ /*jslint white: true, browser: true */ $(function() { "use strict"; function browserWarning() { var container = $('<div id="global-browser-prompt"></div>'), text = $('<p><a href="/help/browsers">Upgrade your web browser</a> (the software you use to access the internet), i...
/*globals $, GOVUK, suchi */ /*jslint white: true, browser: true */ $(function() { "use strict"; function browserWarning() { var container = $('<div id="global-browser-prompt"></div>'), text = $('<p><a href="/help/browsers">Upgrade your web browser</a> (the software you use to access the internet), i...
Increase the browser upgrade dismissal duration
Increase the browser upgrade dismissal duration As some users are not in a position to upgrade, eg, anywhere with restrictive IT policies and slow update rollout. While we still want to re-remind users, we shouldn't do it too often. A month seems reasonable
JavaScript
mit
kalleth/static,alphagov/static,tadast/static,alphagov/static,robinwhittleton/static,alphagov/static,robinwhittleton/static,tadast/static,kalleth/static,kalleth/static,tadast/static,tadast/static,kalleth/static,robinwhittleton/static,robinwhittleton/static
4a4a71225c39f12c981f8c1b5962f05154496fa3
app/common/modules/single-timeseries.js
app/common/modules/single-timeseries.js
define([ 'common/collections/single-timeseries' ], function (Collection) { return { requiresSvg: true, hasDatePicker: true, collectionClass: Collection, collectionOptions: function () { return { numeratorMatcher: new RegExp(this.model.get('numerator-matcher')), denominatorMatc...
define([ 'common/collections/single-timeseries' ], function (Collection) { return { requiresSvg: true, hasDatePicker: true, collectionClass: Collection, collectionOptions: function () { var options = {}; options.numeratorMatcher = new RegExp(this.model.get('numerator-matcher')), o...
Switch to using options, as with newer module definitions
Switch to using options, as with newer module definitions - Also allows easier extension of existing objects within the option set
JavaScript
mit
tijmenb/spotlight,alphagov/spotlight,keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight,keithiopia/spotlight,keithiopia/spotlight,tijmenb/spotlight,alphagov/spotlight
ba6e39146412a83443c0110af7d77e642c747115
src/field-inputs/Url.js
src/field-inputs/Url.js
import React, {PropTypes} from 'react' import FormBuilderPropTypes from '../FormBuilderPropTypes' import Str from './String' export default React.createClass({ propTypes: { field: FormBuilderPropTypes.field.isRequired, value: PropTypes.string, onChange: PropTypes.func }, getDefaultProps() { retu...
import React, {PropTypes} from 'react' import FormBuilderPropTypes from '../FormBuilderPropTypes' import Str from './String' export default React.createClass({ propTypes: { field: FormBuilderPropTypes.field.isRequired, value: PropTypes.string, onChange: PropTypes.func }, getDefaultProps() { retu...
Set type on url field
Set type on url field
JavaScript
mit
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
25b6134a2ced438ec2ab2dbfde6ff7a3003c1ab7
src/routes/names.js
src/routes/names.js
const thesaurus = require('powerthesaurus-api') module.exports = (router) => { router.use('/v1/names', (req, res, next) => { Promise.all(req.query.bandname.split(' ').map((name) => thesaurus(name))) .then((results) => { const wordlist = results.map((item) => { return item.map((data) => { ...
const thesaurus = require('powerthesaurus-api') const ignore = [ 'a', 'the', 'of', 'in', ] module.exports = (router) => { router.use('/v1/names', (req, res, next) => { Promise.all(req.query.bandname.split(' ').map((name) => { if (ignore.indexOf(name) !== -1) return name return thesaurus(name...
Add ignore list for common words
Add ignore list for common words
JavaScript
mit
signup-from-bandname/banGen,signup-from-bandname/banGen,signup-from-bandname/banGen
a8857834ca63ead1d53c7136ada3f27d77bc7a99
src/store.js
src/store.js
//@flow import { createStore, compose, applyMiddleware } from "redux"; import { routerMiddleware } from "react-router-redux"; import createHistory from "history/createBrowserHistory"; import reducers from "./data/reducers"; const defaultState = {}; export const history = createHistory(); const middlewares = [routerM...
//@flow import { createStore, compose, applyMiddleware } from "redux"; import { routerMiddleware } from "react-router-redux"; import createHistory from "history/createBrowserHistory"; import reducers from "./data/reducers"; import cards from "./data/state/cards"; const defaultState = { cards }; export const history =...
Add cards to default state and hot reload reducers
Add cards to default state and hot reload reducers
JavaScript
mit
slightly-askew/portfolio-2017,slightly-askew/portfolio-2017
35e083ed2ae2c8e2d0ba286303ee8f3ab120ff2e
src/store.js
src/store.js
// @flow import type { ThunkOrActionType } from "./actionCreators"; import type { ActionType } from "./actionTypes"; import type { AppState } from "./reducers"; import type { Store as ReduxStore } from "redux"; import { browserHistory } from "react-router"; import { routerMiddleware } from "react-router-redux"; import...
// @flow import type { ThunkOrActionType } from "./actionCreators"; import type { ActionType } from "./actionTypes"; import type { AppState } from "./reducers"; import type { Store as ReduxStore } from "redux"; import { browserHistory } from "react-router"; import { routerMiddleware } from "react-router-redux"; import...
Add AppState annotation to slicer
Add AppState annotation to slicer
JavaScript
mit
captbaritone/markdown.today,captbaritone/markdown.today,captbaritone/markdown.today
809aaa2d1cd4007e36c1518d8a44944e3b88a9d6
src/modules/mymodule.js
src/modules/mymodule.js
// ------------------------------------ // Constants const COUNTER_INCREMENT = 'COUNTER_INCREMENT'; // ------------------------------------ // Action creators export function increment(value = 1) { return { type: COUNTER_INCREMENT, payload: value }; } // ------------------------------------ // Selectors...
// ------------------------------------ // Constants const COUNTER_INCREMENT = 'COUNTER_INCREMENT'; // ------------------------------------ // Action creators export function increment(value = 1) { return { type: COUNTER_INCREMENT, payload: value }; } // ------------------------------------ // Selectors...
Replace Object.assign with the spread object operator (supported by CRA)
Replace Object.assign with the spread object operator (supported by CRA) Signed-off-by: Gianni Valdambrini <c5d749f9a9fad12805bcb3c96e57c90355771f56@develer.com>
JavaScript
mit
nbschool/ecommerce_web,nbschool/ecommerce_web
d78e7efdadd90cb3a167fce2d60043693e4c32e9
server/init/default-users.js
server/init/default-users.js
var mongoose = require('mongoose'), User = mongoose.model('User'), constants = require('../common/constants'), SHA256 = require('crypto-js/sha256'); User.findOne({username: 'admin'}) .exec(function (err, user) { 'use strict'; if (!user && !err) { User({ user...
var mongoose = require('mongoose'), User = mongoose.model('User'), constants = require('../common/constants'), SHA256 = require('crypto-js/sha256'); User.findOne({username: 'admin'}) .exec(function (err, user) { 'use strict'; if (!user && !err) { User({ user...
Fix default-user to have adequate length for username and password.
Fix default-user to have adequate length for username and password.
JavaScript
mit
TA-2016-NodeJs-Team2/Telerik-Racer,TA-2016-NodeJs-Team2/Telerik-Racer
2ae406a61f6bbe200c7e5a4c6fcb1d6422d32fc9
tools/tool-env/install-runtime.js
tools/tool-env/install-runtime.js
// Install ES2015-complaint polyfills for Object, Array, String, Function, // Symbol, Map, Set, and Promise, patching the native implementations when // they are available. require("./install-promise.js"); var Mp = module.constructor.prototype; var moduleLoad = Mp.load; Mp.load = function (filename) { var result = m...
// Install ES2015-complaint polyfills for Object, Array, String, Function, // Symbol, Map, Set, and Promise, patching the native implementations when // they are available. require("./install-promise.js"); // Enable the module.{watch,export,...} runtime API needed by Reify. require("reify/lib/runtime").enable(module.c...
Enable the Reify runtime API even if meteor-babel/register does not.
Enable the Reify runtime API even if meteor-babel/register does not.
JavaScript
mit
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
e356d1dda09d7303b8fead6c158c308a154607ee
client/app/i18n/container_helper.service.js
client/app/i18n/container_helper.service.js
'use strict'; angular.module('arethusaTranslateGuiApp').service('containerHelper', [ function() { var self = this; var DIRTY = 'dirty-bg'; var CLEAN = 'clean-bg'; function stats(scope) { return scope.getStats(scope.container); } this.checkStatus = function(scope) { var cont = s...
'use strict'; angular.module('arethusaTranslateGuiApp').service('containerHelper', [ function() { var self = this; var DIRTY = 'dirty-bg'; var CLEAN = 'clean-bg'; function stats(scope) { return scope.getStats(scope.container); } function isDirty(scope) { return stats(scope).dir...
Fix dirty check in containerHelper
Fix dirty check in containerHelper
JavaScript
mit
LFDM/angular-translate-gui
e189c3bef0dfa572e4d966635475d8c23bfda79e
client/src/components/forms/FormActions.js
client/src/components/forms/FormActions.js
import React from 'react'; import PropTypes from 'prop-types'; import { translate } from 'react-i18next'; import Button from 'react-bootstrap/lib/Button'; import Glyphicon from 'react-bootstrap/lib/Glyphicon'; const ActionsButtons = ({ t, resetForm, saving }) => ( <p> <Button bsStyle="danger" onClick={resetForm}...
import React from 'react'; import PropTypes from 'prop-types'; import { translate } from 'react-i18next'; import Button from 'react-bootstrap/lib/Button'; import Glyphicon from 'react-bootstrap/lib/Glyphicon'; const ActionsButtons = ({ t, saving }) => ( <p> {/* Bug for the moment */} {/* <Button bsStyle="dan...
Disable reset for the moment
[Client] Disable reset for the moment
JavaScript
mit
DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager
0da020c61817474e15c63bd6dc40d4b65a40fda9
web/src/js/components/General/Fireworks.js
web/src/js/components/General/Fireworks.js
import React, { useRef } from 'react' import * as FireworksCanvas from 'fireworks-canvas' import { withStyles } from '@material-ui/core/styles' import FadeInDashboardAnimation from 'js/components/General/FadeInDashboardAnimation' const styles = { container: { position: 'absolute', zIndex: 5000, top: 0, ...
import React, { useRef, useState } from 'react' import * as FireworksCanvas from 'fireworks-canvas' import { withStyles } from '@material-ui/core/styles' import FadeInDashboardAnimation from 'js/components/General/FadeInDashboardAnimation' import IconButton from '@material-ui/core/IconButton' import CloseIcon from '@ma...
Add a close button to the fireworks
Add a close button to the fireworks
JavaScript
mpl-2.0
gladly-team/tab,gladly-team/tab,gladly-team/tab
cf269a26ac586a948b7cbb332e1f88113f15221b
src/routes/index.js
src/routes/index.js
const router = require('express').Router() const nonUser = require('./non-user') const user = require('./user-only') router.use('/', nonUser) router.use('/', user) module.exports = router
const router = require('express').Router() const nonUser = require('./non-user') const user = require('./user-only') router.use((req, res, next) => { console.log('middleware stuff') next() }) router.use('/', nonUser) router.use('/', user) module.exports = router
Add middleware function that's console logging to make sure it's working
Add middleware function that's console logging to make sure it's working
JavaScript
mit
Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge
a9e219a5e5be3b18335b5031b5c0450b1e54bd5b
src/text-grabber.js
src/text-grabber.js
;(function(exports) { var TextGrabber = function() { this.submittedText = ""; this.currentLine = ""; }; TextGrabber.prototype = { write: function(e) { if (e.event === "submit") { this.submittedText += e.text + "\n"; this.currentLine = ""; } else { this.currentLine ...
;(function(exports) { var TextGrabber = function() { this.submittedText = []; this.currentLine = {}; }; TextGrabber.prototype = { write: function(e) { if (e.event === "permanent") { var lines = e.text.split("\n"); for (var i = 0; i < lines.length; i++) { if (lines[i] !...
Make text grabber categorise text in input and output.
Make text grabber categorise text in input and output.
JavaScript
mit
maryrosecook/codewithisla
b62d9b600dda1e65bf23aeaa1eb5578acfbd9f6d
start.js
start.js
#!/usr/bin/env node var cp = require('child_process') var BIN = '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary' var ARGS = ['--load-and-launch-app=chrome'] var child = cp.spawn(BIN, ARGS) // Nodemon is trying to kill us, so kill Chrome process.once('SIGUSR2', function () { child.kill(...
#!/usr/bin/env node var cp = require('child_process') var BIN = process.platform=='linux' ? '/bin/google-chrome' : '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'; var ARGS = ['--load-and-launch-app=chrome'] var child = cp.spawn(BIN, ARGS) // Nodemon is trying to kill us, so kill Chrome...
Improve the accessibility of the project for linux users.
Improve the accessibility of the project for linux users.
JavaScript
mit
feross/webtorrent-cli,feross/webtorrent-cli
b163c12143f332b276cd1104ab42598489994c6e
client/lecturer/app/courses.factory.js
client/lecturer/app/courses.factory.js
(function() { 'use strict'; angular .module('lecturer') .factory('coursesFactory', coursesFactory); /* @ngInject */ function coursesFactory(coursesService) { var selectedCourse = {}; var Course = false; var service = { getCourses: getCou...
(function() { 'use strict'; angular .module('lecturer') .factory('coursesFactory', coursesFactory); /* @ngInject */ function coursesFactory(coursesService, lecturerFactory) { var selectedCourse = {}; var Course = false; var service = { g...
Fix all courses being displayed for all lecturers
Fix all courses being displayed for all lecturers
JavaScript
mit
MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS
e6a72cd9754ea4bf2332c8a5262614295f10ebef
bot.js
bot.js
var telegramBot = require('node-telegram-bot-api'); var twitter = require('twitter'); var aws = require('aws-sdk'); var nconf = require('nconf'); var log4js = require('log4js'); nconf.file('config', __dirname + '/config/config.json'); var botToken = nconf.get('telegram').bot_token; var bot = new TelegramBot(botToken,...
var telegramBot = require('node-telegram-bot-api'); var twitter = require('twitter'); var aws = require('aws-sdk'); var nconf = require('nconf'); var log4js = require('log4js'); nconf.file('config', __dirname + '/config/config.json'); var botToken = nconf.get('telegram').bot_token; var bot = new TelegramBot(botToken,...
Add dydb object and put updateUserList function again
Add dydb object and put updateUserList function again
JavaScript
mit
dollars0427/mtrupdate-bot
86a611bf64d3fb18bde62e3457c1c09953c4b158
test/file-collection.js
test/file-collection.js
import test from 'ava'; import '../src/index'; import FileCollection from '../src/FileCollection'; test('that it sets the output file if a src file and output directory are provided', t => { let src = new File('src/file.txt').parsePath(); let files = new FileCollection(src.path); files.destination = 'outpu...
import test from 'ava'; import '../src/index'; import FileCollection from '../src/FileCollection'; test('that it sets the output file if a src file and output directory are provided', t => { let src = new File('src/file.txt').parsePath(); let files = new FileCollection(src.path); files.destination = 'outpu...
Add test for file collection
Add test for file collection
JavaScript
mit
JeffreyWay/laravel-mix
c4e98094e2250d556566d76512f502e382d05ae5
test/functional/conf.js
test/functional/conf.js
exports.config = { baseUrl: 'http://dev.hmda-pilot.ec2.devis.com/', specs: ['cucumber/*.feature'], allScriptsTimeout: 30000, getPageTimeout: 30000, capabilities: { browserName: 'chrome' }, framework: 'cucumber', cucumberOpts: { require: 'cucumber/step_definitions/*.j...
'use strict'; exports.config = { baseUrl: 'http://dev.hmda-pilot.ec2.devis.com/', specs: ['cucumber/*.feature'], allScriptsTimeout: 30000, getPageTimeout: 30000, capabilities: { browserName: 'chrome' }, framework: 'cucumber', cucumberOpts: { require: 'cucumber/step_...
Set the browser size to 1280x1024
Set the browser size to 1280x1024
JavaScript
cc0-1.0
cfpb/hmda-pilot,LinuxBozo/hmda-pilot,LinuxBozo/hmda-pilot,cfpb/hmda-pilot,cfpb/hmda-pilot,LinuxBozo/hmda-pilot
122abc843a93c20ccaa48deea0675cbd281f3c41
sencha-workspace/SlateAdmin/app/view/progress/NavPanel.js
sencha-workspace/SlateAdmin/app/view/progress/NavPanel.js
Ext.define('SlateAdmin.view.progress.NavPanel', { extend: 'SlateAdmin.view.LinksNavPanel', xtype: 'progress-navpanel', title: 'Student Progress', data: true, applyData: function(data) { if (data !== true) { return data; } return [ { ...
Ext.define('SlateAdmin.view.progress.NavPanel', { extend: 'SlateAdmin.view.LinksNavPanel', xtype: 'progress-navpanel', title: 'Student Progress', data: true, applyData: function(data) { if (data !== true) { return data; } return [ { ...
Use consistent naming for 'Print / Export' section
Use consistent naming for 'Print / Export' section
JavaScript
mit
SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin
796a9e6f66b019fbe102c79ed2c0836369cde36f
src/sw-precache-config.js
src/sw-precache-config.js
/* eslint-env node */ 'use strict'; module.exports = { staticFileGlobs: [ 'index.html', 'bower_components/webcomponentsjs/webcomponents-*.js', 'images/*', 'favicon.ico' ], navigateFallback: 'index.html' };
/* eslint-env node */ 'use strict'; module.exports = { staticFileGlobs: [ 'index.html', 'bower_components/webcomponentsjs/webcomponents-*.js', 'images/*', 'favicon.ico' ], navigateFallback: 'index.html', navigateFallbackWhitelist: [/^\/(projects|posts|impress)\//] };
Exclude "/demo" from SW navigateFallback.
Exclude "/demo" from SW navigateFallback.
JavaScript
mit
frigus02/website,frigus02/website
9e7379f863ab7bb8b4ae2fd39530692a427df5a1
test/loader.js
test/loader.js
/*globals mocha*/ require.config({ baseUrl: '/', paths: { 'tabler': '../', 'jquery': 'test/lib/jquery-1.7.1', 'underscore': 'test/lib/underscore' } }); mocha.setup({ ui: 'bdd', globals: ['jQuery'] }); require(['jquery', 'test/tabler.tests', 'test/tabler.aggreg...
/*globals mocha*/ require.config({ baseUrl: '/', paths: { 'tabler': '../', 'jquery': 'test/lib/jquery-1.7.1', 'underscore': 'test/lib/underscore' } }); mocha.setup({ ui: 'bdd', globals: ['jQuery'] }); require(['jquery', 'test/tabler.tests', 'test/tabler.aggreg...
Add removeColumns plugin to the test suite
Add removeColumns plugin to the test suite
JavaScript
mit
BrandwatchLtd/tabler,BrandwatchLtd/tabler,BrandwatchLtd/tabler
b08269f679a78d1f24774a687706927a8b00bd57
tests/index.js
tests/index.js
'use strict'; var path = require('path'); var expect = require('expect.js'); var walkSync = require('walk-sync'); var broccoli = require('broccoli'); var fs = require('fs'); // require('mocha-jshint')(); var Tar = require('..'); describe('broccoli-targz', function(){ var fixturePath = path.join(__dirname, 'fixtur...
'use strict'; var path = require('path'); var expect = require('expect.js'); var walkSync = require('walk-sync'); var broccoli = require('broccoli'); var fs = require('fs'); // require('mocha-jshint')(); var Tar = require('..'); describe('broccoli-targz', function(){ var fixturePath = path.join(__dirname, 'fixtur...
Add tests for non-constructor pattern.
Add tests for non-constructor pattern.
JavaScript
mit
trek/broccoli-tar,vasman/broccoli-zip
d938dec90ecc359be562851b91223e3512dd0dea
src/ui/mixin/element.js
src/ui/mixin/element.js
/** section: scripty2 ui * mixin S2.UI.Mixin.Element * * Provides a few convenience methods for widgets that map easily to a * single element. **/ (function() { var METHODS = $w('observe stopObserving show hide ' + 'addClassName removeClassName hasClassName setStyle getStyle' + 'writeAttribute readAt...
/** section: scripty2 ui * mixin S2.UI.Mixin.Element * * Provides a few convenience methods for widgets that map easily to a * single element. **/ (function() { var METHODS = $w('observe stopObserving show hide ' + 'addClassName removeClassName hasClassName setStyle getStyle' + 'writeAttribute readAt...
Redefine `S2.UI.Mixin.Element.on` so that it caches its observers.
Redefine `S2.UI.Mixin.Element.on` so that it caches its observers.
JavaScript
mit
madrobby/scripty2,madrobby/scripty2
cb68b3bb815013c4f933665da4d1c9805e64b899
examples/webpack.config.js
examples/webpack.config.js
var webpack = require("webpack"); var path = require("path"); module.exports = { devtool: "source-map", entry: path.join(__dirname, "src/main.js"), output: { path: path.join(__dirname, "build"), publicPath: "/js/", filename: "main.js" }, resolve: { extensions: ["", ".js"] }, module: { lo...
var webpack = require("webpack"); var path = require("path"); module.exports = { devtool: "source-map", entry: path.join(__dirname, "src/main.js"), output: { path: "./built/js", publicPath: "/js/", filename: "main.js" }, resolve: { extensions: ["", ".js"] }, module: { loaders: [{ t...
Return to the right build dir
Return to the right build dir
JavaScript
mit
gpbl/react-day-picker,saenglert/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker
e25af70c3c3043e7028fa6c85d06ea976c35997e
server/votes/countVotes.js
server/votes/countVotes.js
var countVotes = function () { "use strict"; // find votes for object var deltaVotesQuery = { delta: { $exists: true } }; var deltaVotes = Votes.find(deltaVotesQuery).fetch(); var voteTable = {}; // count how many votes each object has _.forEach(deltaVotes, function (vote) { var p...
var countVotes = function () { "use strict"; // find votes for object var deltaVotesQuery = { delta: { $exists: true } }; var deltaVotes = Votes.find(deltaVotesQuery).fetch(); var voteTable = {}; // count how many votes each object has _.forEach(deltaVotes, function (vote) { var p...
Apply votes quietly every 5 seconds
Apply votes quietly every 5 seconds
JavaScript
mit
rrevanth/news,rrevanth/news
2a146bcf5e104d9d35874858380c5ae29cfcd845
business-processes/index.js
business-processes/index.js
// Collection of all business processes which where made online 'use strict'; module.exports = require('./resolve')(require('../db').BusinessProcess);
// Collection of all business processes which where made online 'use strict'; var isFalsy = require('../utils/is-falsy'); module.exports = require('../db').BusinessProcess.instances .filter(function (obj) { if (obj.master !== obj) return false; return (obj.constructor.prototype !== obj); }) .filterByKey('isF...
Update up to changes in resolver
Update up to changes in resolver
JavaScript
mit
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
e6080452d70ad2b16ab3fac3a93f1816549b57c1
test/featherlight_test.js
test/featherlight_test.js
if(!this.chai) { chai = require("chai"); } var expect = chai.expect; (function($) { var cleanupDom = function(){ $('body >:not(#mocha)').remove() }; describe('Featherlight', function() { afterEach(cleanupDom); it ('works on items with data-featherlight by default', function(done) { var $bound = $('#auto-...
if(!this.chai) { chai = require("chai"); } var expect = chai.expect; (function($) { var cleanupDom = function(){ $('body >:not(#mocha)').remove() }; $.fx.off = true; describe('Featherlight', function() { afterEach(cleanupDom); it ('works on items with data-featherlight by default', function() { var $boun...
Simplify tests by turning off effects
Simplify tests by turning off effects
JavaScript
mit
xStrom/featherlight,danielchikaka/featherlight,noelboss/featherlight,noelboss/featherlight,danielchikaka/featherlight,getprodigy/featherlight,xStrom/featherlight,hnkent/featherlight,minervaproject/featherlight,beeseenmedia/featherlight,n7best/featherlight,n7best/featherlight,minervaproject/featherlight,hnkent/featherli...
0f309adcd9742f4d2a7c4f85cdaf852f19552436
test/onPort.test.js
test/onPort.test.js
'use strict' const t = require('tap') const spawn = require('child_process').spawn const split = require('split2') const autocannon = require.resolve('../autocannon') const target = require.resolve('./targetProcess') const lines = [ /Running 1s test @ .*$/, /10 connections.*$/, /$/, /Stat.*Avg.*Stdev.*Max.*$/...
'use strict' const t = require('tap') const spawn = require('child_process').spawn const split = require('split2') const autocannon = require.resolve('../autocannon') const target = require.resolve('./targetProcess') const lines = [ /Running 1s test @ .*$/, /10 connections.*$/, /$/, /Stat.*Avg.*Stdev.*Max.*$/...
Revert "add debug line for travis bc this is passing locally"
Revert "add debug line for travis bc this is passing locally" This reverts commit c930369362fa9c68e8f44296617695fc804e141d.
JavaScript
mit
mcollina/autocannon
1dec88178c4a0c939cd21045d3584a9429d702bf
app/main/plugins/hain-plugin-math/index.js
app/main/plugins/hain-plugin-math/index.js
'use strict'; const lo_isNumber = require('lodash.isnumber'); const lo_isString = require('lodash.isstring'); const lo_isObject = require('lodash.isobject'); const lo_has = require('lodash.has'); const math = require('mathjs'); module.exports = ({ app }) => { function search(query, res) { try { const an...
'use strict'; const lo_isNumber = require('lodash.isnumber'); const lo_isString = require('lodash.isstring'); const lo_isObject = require('lodash.isobject'); const lo_has = require('lodash.has'); const math = require('mathjs'); module.exports = (context) => { const app = context.app; const clipboard = context.cl...
Copy result into clipboard on execute equation
hain-plugin-math: Copy result into clipboard on execute equation
JavaScript
mit
appetizermonster/hain,hainproject/hain,hainproject/hain,hainproject/hain,appetizermonster/hain,hainproject/hain,appetizermonster/hain,appetizermonster/hain
6d505a32934e0cadf929accb8cebfce40ef63b68
test/stories/frontPage.js
test/stories/frontPage.js
var basePage = require('../pages/Base'); describe('Main page', function() { basePage.go(); it('should be at the correct URL', function() { expect(basePage.currentUrl).toEqual(browser.baseUrl + basePage.url); }); });
var basePage = require('../pages/Base'); var expect = require('./setupExpect').expect; describe('Main page', function() { basePage.go(); it('should be at the correct URL', function() { expect(basePage.currentUrl).to.eventually.equal(browser.baseUrl + basePage.url); }); });
Use mocha in spec files.
Use mocha in spec files.
JavaScript
mit
Droogans/ProtractorPageObjects
8048e4007edd44d2299945fc4802a7cb525bf053
app/javascript/packs/components/dashboard/Header.js
app/javascript/packs/components/dashboard/Header.js
import React from 'react'; import styles from './Header.sass'; import classNames from 'classnames'; import { Link } from 'react-router-dom'; export default function Head() { const button = classNames('waves-effect', 'waves-light', 'btn', styles.button); return ( <div className={styles.container}> <div cl...
import { isEmpty } from 'lodash'; import React from 'react'; import classNames from 'classnames'; import { Link } from 'react-router-dom'; import styles from './Header.sass'; import User from '../../models/user'; export default function Head() { const button = classNames('waves-effect', 'waves-light', 'btn', styles....
Hide links for sign in and sign up if already exists user token.
Hide links for sign in and sign up if already exists user token.
JavaScript
agpl-3.0
GuHoo/Kunto-Backend,GuHoo/Kunto-Backend,GuHoo/Kunto-Backend
7c333b1ea5ffa23334d81e125a87841c91c719ae
config/front.prod.config.js
config/front.prod.config.js
const merge = require('webpack-merge'); const webpack = require('webpack'); const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const ManifestPlugin = require('webpack-manifest-plugin'); const baseConfig = require('./base.config...
const merge = require('webpack-merge'); const webpack = require('webpack'); const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const frontConfig = require('./front.config'); const devConfig = merge(frontConfig, { output: {...
Update paths and remove dupl. plugins from front prod
Update paths and remove dupl. plugins from front prod
JavaScript
mit
tuelsch/bolg,tuelsch/bolg
172ec0b4c753fc6a99eb7912cf9fca06d71103fa
test/api/getLanguage.js
test/api/getLanguage.js
'use strict'; var hljs = require('../../build'); describe('.getLanguage', function() { it('should get an existing language', function() { var result = hljs.getLanguage('python'); result.should.be.instanceOf(Object); }); it('should be case insensitive', function() { var result = hljs.getLanguage('p...
'use strict'; var hljs = require('../../build'); var should = require('should'); describe('.getLanguage', function() { it('should get an existing language', function() { var result = hljs.getLanguage('python'); result.should.be.instanceOf(Object); }); it('should be case insensitive', function() { ...
Make testing for undefined more clear
Make testing for undefined more clear
JavaScript
bsd-3-clause
Sannis/highlight.js,dbkaplun/highlight.js,sourrust/highlight.js,bluepichu/highlight.js,bluepichu/highlight.js,isagalaev/highlight.js,palmin/highlight.js,palmin/highlight.js,StanislawSwierc/highlight.js,carlokok/highlight.js,teambition/highlight.js,teambition/highlight.js,dbkaplun/highlight.js,Sannis/highlight.js,highli...
587dc3f78c3b100ed84476849de7fc9d59a2a865
src/app/constants/index.js
src/app/constants/index.js
// Workflow State export const WORKFLOW_STATE_RUNNING = 'running'; export const WORKFLOW_STATE_PAUSED = 'paused'; export const WORKFLOW_STATE_IDLE = 'idle';
// Workflow State export const WORKFLOW_STATE_RUNNING = 'running'; export const WORKFLOW_STATE_PAUSED = 'paused'; export const WORKFLOW_STATE_IDLE = 'idle'; // Macro action export const MACRO_ACTION_START = 'start'; export const MACRO_ACTION_STOP = 'stop';
Define constants for macro actions
Define constants for macro actions
JavaScript
mit
cheton/cnc.js,cheton/cnc,cncjs/cncjs,cheton/cnc.js,cheton/piduino-grbl,cheton/cnc.js,cncjs/cncjs,cncjs/cncjs,cheton/piduino-grbl,cheton/piduino-grbl,cheton/cnc,cheton/cnc
60248caad30d984b8879d260b0a3d1c2a1105565
server/api.js
server/api.js
var express = require('express'); var app = express(); var fb = require("./firebaselogin.js"); var db = fb.database(); var ref = db.ref(); var glob = require('glob'); exports.test = function(req, res) { ref.on("value", function(snapshot) { res.send(snapshot.val()); }, function (errorObject) { ...
var express = require('express'); var app = express(); var fb = require("./firebaselogin.js"); var db = fb.database(); var ref = db.ref(); var glob = require('glob'); exports.test = function(req, res) { ref.on("value", function(snapshot) { res.send(snapshot.val()); }, function (errorObject) { ...
Make sure only files below src/ are included with glob.
Security: Make sure only files below src/ are included with glob.
JavaScript
mit
hookbot/multi-player,hookbot/multi-player
26f807c3687ceac296280c2918f0e7b67526da38
test/functional/user.js
test/functional/user.js
user_pref("media.peerconnection.default_iceservers", "[]"); user_pref("media.peerconnection.use_document_iceservers", false); user_pref("social.activeProviders", "{\"http://localhost:3000\":1}"); user_pref("social.enabled", true); user_pref("social.manifest.tests", "{\"name\":\"Talkilla Functional tests\",\"iconURL\":\...
user_pref("browser.dom.window.dump.enabled", true); user_pref("media.peerconnection.default_iceservers", "[]"); user_pref("media.peerconnection.use_document_iceservers", false); user_pref("social.activeProviders", "{\"http://localhost:3000\":1}"); user_pref("social.enabled", true); user_pref("social.manifest.tests", "{...
Enable console output of dump by default in selenium tests
Enable console output of dump by default in selenium tests
JavaScript
mpl-2.0
mozilla/talkilla,mozilla/talkilla,mozilla/talkilla
54dbeb7bef3f31244dc4ca6f5b0ab5ff71c2bb3e
src/patch/operators/array.js
src/patch/operators/array.js
'use strict'; const ANY_ARRAY = [ 'boolean[]', 'integer[]', 'number[]', 'string[]', 'object[]', 'null[]', ]; // `_slice` patch operator const sliceOperator = { attribute: ANY_ARRAY, argument: ['integer[]'], check (opVal) { if (opVal.length <= 2) { return; } return 'the argument must be an...
'use strict'; const ANY_ARRAY = [ 'boolean[]', 'integer[]', 'number[]', 'string[]', 'object[]', 'null[]', ]; // `_push` patch operator const pushOperator = { attribute: ANY_ARRAY, argument: ANY_ARRAY, apply (attrVal, opVal) { return [...attrVal, ...opVal]; }, }; // `_unshift` patch operator...
Add _push and _unshift patch operators
Add _push and _unshift patch operators
JavaScript
apache-2.0
autoserver-org/autoserver,autoserver-org/autoserver
22ba78f09327a540e3d5f49509906989aeb6ce4a
app/bootstrap.js
app/bootstrap.js
module.exports = (function() { var Router = require('router'), Connection = require('lib/connection'); // App namespace. window.Boards = { Models: {}, Collections: {} }; // Load helpers. require('lib/helpers'); // Register Swag Helpers. Swag.registerHelpers(); // Initialize Router. ...
module.exports = (function() { var Router = require('router'), Connection = require('lib/connection'); // App namespace. window.Boards = { Models: {}, Collections: {} }; // Load helpers. require('lib/helpers'); $.ajaxSetup({ beforeSend: function(xhr, settings) { xhr.setRequestHe...
Send JWT auth token on the as an authorization header of every HTTP request.
Send JWT auth token on the as an authorization header of every HTTP request.
JavaScript
agpl-3.0
GetBlimp/boards-web,jessamynsmith/boards-web,jessamynsmith/boards-web
9673596b7c313b8544c51f0053131008909de6dc
server/middleware/requireEmailWithDomains.js
server/middleware/requireEmailWithDomains.js
module.exports = (req, res, next, { /** * @param acceptableDomains * * List of fully qualified accceptable domain names. * Should be for example 'safaricom.co.ke', not just 'safaricom' or 'co.ke' * * IMPORTANT!! * If you use this middleware and add other acceptableDomains, make sure to * add '...
let acceptableDomainsFromEnv = process.env.ACCEPTABLE_DOMAINS; if (acceptableDomainsFromEnv) { acceptableDomainsFromEnv = acceptableDomainsFromEnv.split(',').filter( domain => !!domain // Remove any empty items from the list. ); } module.exports = (req, res, next, { /** * @param acceptableDomains * ...
Make `acceptableDomains` configurable without editing source code.
Make `acceptableDomains` configurable without editing source code. A list of available domains is now being read in from the env and added to the default list.
JavaScript
mit
Waiyaki/provisioning-scheduler,Waiyaki/provisioning-scheduler,Waiyaki/provisioning-scheduler
14213152b43a4b9d6be88e161b0d9fb2e56d9a0c
src/mist/io/static/js/app/views/delete_tag.js
src/mist/io/static/js/app/views/delete_tag.js
define('app/views/delete_tag', [ 'ember', 'jquery' ], /** * * Delete tag view * * @returns Class */ function() { return Ember.View.extend({ tagName: false, didInsertElement: function(e){ $("a.tagButton").button(); ...
define('app/views/delete_tag', [ 'ember', 'jquery' ], /** * * Delete tag view * * @returns Class */ function() { return Ember.View.extend({ tagName: false, didInsertElement: function(e){ $("a.tagButton").button(); ...
Delete tag only on success
Delete tag only on success
JavaScript
agpl-3.0
Lao-liu/mist.io,munkiat/mist.io,DimensionDataCBUSydney/mist.io,afivos/mist.io,kelonye/mist.io,johnnyWalnut/mist.io,zBMNForks/mist.io,johnnyWalnut/mist.io,DimensionDataCBUSydney/mist.io,zBMNForks/mist.io,Lao-liu/mist.io,DimensionDataCBUSydney/mist.io,munkiat/mist.io,munkiat/mist.io,Lao-liu/mist.io,DimensionDataCBUSydney...
20fa652bb202bd6d0b02e0fe56ccdff2b47ba29d
cordova/scripts/replace-config-env-vars.js
cordova/scripts/replace-config-env-vars.js
module.exports = function(context) { const fs = context.requireCordovaModule('fs'); const cordova_util = context.requireCordovaModule('cordova-lib/src/cordova/util'); let projectRoot = cordova_util.isCordova(); let configXML = cordova_util.projectConfig(projectRoot); let data = fs.readFileSync(configXML, 'u...
module.exports = function(context) { const fs = require('fs'); const cordova_util = context.requireCordovaModule('cordova-lib/src/cordova/util'); let projectRoot = cordova_util.isCordova(); let configXML = cordova_util.projectConfig(projectRoot); let data = fs.readFileSync(configXML, 'utf8'); for (var env...
Fix loading non-cordova modules in scripts
Fix loading non-cordova modules in scripts Loading non-cordova modules with `requireCordovaModule` is not supported.
JavaScript
epl-1.0
eclipsesource/tabris-js-hello-world,eclipsesource/tabris-js-hello-world,eclipsesource/tabris-js-hello-world
9cbfc459fd163d79d7e8e99e339a05f04377cb66
src/classes/modifiers/outlets-receivable.js
src/classes/modifiers/outlets-receivable.js
class OutletsReceivable { static transform(modified, ...names) { modified.outlets = names; modified._argsTransformFns.push(this.filterOutlets.bind(null, modified)); } static filterOutlets(modified, opts, ...args) { let names = modified.outlets; let outlets = opts.outlets || ...
class OutletsReceivable { static transform(modified, ...names) { modified.outlets = names; modified._argsTransformFns.push(this.filterOutlets.bind(null, modified)); } static filterOutlets(modified, opts, ...args) { let names = modified.outlets; let outlets = opts.outlets || ...
Use JSON.stringify to stringify Array
Use JSON.stringify to stringify Array
JavaScript
mit
darvelo/ether,darvelo/ether,darvelo/ether
81dc99e8e63041c57c477fda1c56da228c259fcf
fan/tasks/views/TaskItemView.js
fan/tasks/views/TaskItemView.js
jsio('from shared.javascript import Class') jsio('import fan.ui.Button') jsio('import fan.ui.RadioButtons') jsio('import fan.tasks.views.View') exports = Class(fan.tasks.views.View, function(supr) { this._className += ' TaskItemView' this._minWidth = 390 this._maxWidth = 740 this._headerHeight = 0 this.init =...
jsio('from shared.javascript import Class') jsio('import fan.ui.Button') jsio('import fan.ui.RadioButtons') jsio('import fan.tasks.views.View') exports = Class(fan.tasks.views.View, function(supr) { this._className += ' TaskItemView' this._minWidth = 390 this._maxWidth = 740 this._headerHeight = 0 this.init =...
Comment out unused buildHeader code in taskItemView
Comment out unused buildHeader code in taskItemView
JavaScript
mit
marcuswestin/Focus
a4f0ef9e898417a51bcc7a92c1e81605b62df5ce
tests/features/api/02-import-json_spec.js
tests/features/api/02-import-json_spec.js
describe('Import JSON', () => { it('should work properly', () => { cy.loginVisit('/') cy.fixture('import.json').then(IMPORT_API => { // Click [Import JSON] button cy.get('.j-buttons__wrapper > a[href="/new"] + div > button') .click() // Prepare file upload const file = JSON.s...
describe('Import JSON', () => { it('should work properly', () => { cy.loginVisit('/') cy.fixture('import.json').then(IMPORT_API => { // Click [Import JSON] button cy.get('.j-buttons__wrapper > a[href="/new"] + div > button') .click() // Prepare file upload const file = JSON.s...
Fix tests failing on cypress 3.1.0
Fix tests failing on cypress 3.1.0
JavaScript
mit
hellofresh/janus-dashboard,hellofresh/janus-dashboard
f418d87d1c57b19ac5fb85ab14fa2f57db63ac06
content/menu-fill.js
content/menu-fill.js
console.log("menu-fill"); var menu_env = $("#menu-env"); var item1 = menu_env_data[0]; var item2 = menu_env_data[1]; function createLinkItem (item) { var _a = $("<a/>", { href: item.link }); $("<i/>", { class: item.icon }).appendTo(_a); $("<span/>", { text: " " + item.name }).appendTo(_a); return _a; } fu...
console.log("menu-fill"); var menu_env = $("#menu-env"); function createLinkItem (item) { var _a = $("<a/>", { href: item.link }); $("<i/>", { class: item.icon }).appendTo(_a); $("<span/>", { text: " " + item.name }).appendTo(_a); return _a; } function createSingleLevelMenuItem (item) { return $("<li/>")....
Fix the order issue of menu items
Fix the order issue of menu items
JavaScript
mit
vejuhust/yet-another-monitoring-dashboard,vejuhust/yet-another-monitoring-dashboard
7c42661294649483a283fc6d15866ea044da9bc4
test/functional/initialize_map.js
test/functional/initialize_map.js
module.exports = { before : function(client) { console.log('Setting up functional tests...'); client .url('http://localhost:3000') .pause(1000); }, after : function(client) { console.log('Closing down functional tests...'); client.end(); }, 'HTML body is present' : function(clien...
module.exports = { before : function(client) { console.log('Setting up functional tests...'); client .url('http://localhost:3000') .pause(1000); }, after : function(client) { console.log('Closing down functional tests...'); client.end(); }, 'Basic HTML loads' : function(client) {...
Add tests for panes loading in app.
Add tests for panes loading in app.
JavaScript
mit
coshx/cmv-app,coshx/cmv-app
c35453c01ded83c521c1b953a3830185aa9bd74c
lib/rules/mixins-before-declarations.js
lib/rules/mixins-before-declarations.js
'use strict'; var helpers = require('../helpers'); module.exports = { 'name': 'mixins-before-declarations', 'defaults': { 'exclude': [ 'breakpoint', 'mq' ] }, 'detect': function (ast, parser) { var result = [], error; ast.traverseByType('include', function (node, i, parent...
'use strict'; var helpers = require('../helpers'); module.exports = { 'name': 'mixins-before-declarations', 'defaults': { 'exclude': [ 'breakpoint', 'mq' ] }, 'detect': function (ast, parser) { var result = [], error; ast.traverseByType('include', function (node, i, parent...
Fix mixin before declaration issues
:bug: Fix mixin before declaration issues Add check for declaration node content type Fixes #227 Fixes #230
JavaScript
mit
sktt/sass-lint,srowhani/sass-lint,DanPurdy/sass-lint,srowhani/sass-lint,sasstools/sass-lint,donabrams/sass-lint,ngryman/sass-lint,Dru89/sass-lint,bgriffith/sass-lint,flacerdk/sass-lint,benthemonkey/sass-lint,sasstools/sass-lint
1836d5b36ad6185e1152de0b11be07c2f10d629f
webpack.config.babel.js
webpack.config.babel.js
import Bootstrap from 'bootstrap-webpack-plugin' import Path from 'path' const path = Path.join.bind(null, __dirname) const outputDir = path(`build`) export default { entry: { playground: `./examples/playground/main.js`, multipleTriggers: `./examples/multiple-triggers/main.js`, }, output: { path: ...
import Bootstrap from 'bootstrap-webpack-plugin' import Path from 'path' const path = Path.join.bind(null, __dirname) const outputDirName = `build` const outputDir = path(outputDirName) export default { entry: { playground: `./examples/playground/main.js`, multipleTriggers: `./examples/multiple-triggers/m...
Make a part of webpack config consistent with gh-pages branch variant for simpler future conflict resolutions.
Make a part of webpack config consistent with gh-pages branch variant for simpler future conflict resolutions.
JavaScript
mit
gregory90/react-popover,littlebits/react-popover,clara-labs/react-popover
02be6197ffec6c3f6d0214617c815423c6b8c4d4
voice/proxy-call.js
voice/proxy-call.js
/* Voice Tutorial 4: Making a Proxy Call API Reference: https://docs.nexmo.com/voice/voice-api/api-reference */ 'use strict'; require('dotenv').config({path: __dirname + '/../.env'}); const app = require('express')(); const bodyParser = require('body-parser'); app.use(bodyParser.json()); app.use(bodyParser.urlenco...
/* Voice Tutorial 4: Making a Proxy Call API Reference: https://docs.nexmo.com/voice/voice-api/api-reference */ 'use strict'; require('dotenv').config({path: __dirname + '/../.env'}); const app = require('express')(); const bodyParser = require('body-parser'); app.use(bodyParser.json()); app.use(bodyParser.urlenco...
Use `NEXMO_` prefixes in proxy example
Use `NEXMO_` prefixes in proxy example
JavaScript
mit
nexmo-community/nexmo-node-quickstart,nexmo-community/nexmo-node-quickstart
1bf0f61c03478a1e2277fecbdf770bcb2a920041
src/notebook/api/kernel.js
src/notebook/api/kernel.js
import { createControlSubject, createStdinSubject, createIOPubSubject, createShellSubject, } from 'enchannel-zmq-backend'; import * as fs from 'fs'; import * as uuid from 'uuid'; import { launch } from 'spawnteract'; export function launchKernel(kernelSpecName, spawnOptions) { return launch(kernelSpecName, ...
import { createControlSubject, createStdinSubject, createIOPubSubject, createShellSubject, } from 'enchannel-zmq-backend'; import * as fs from 'fs'; import * as uuid from 'uuid'; import { launch } from 'spawnteract'; export function launchKernel(kernelSpecName, spawnOptions) { return launch(kernelSpecName, ...
Complete the control channel too.
Complete the control channel too.
JavaScript
bsd-3-clause
rgbkrk/nteract,nteract/nteract,jdfreder/nteract,jdetle/nteract,nteract/nteract,0u812/nteract,rgbkrk/nteract,jdfreder/nteract,rgbkrk/nteract,0u812/nteract,captainsafia/nteract,nteract/nteract,nteract/nteract,jdetle/nteract,rgbkrk/nteract,jdfreder/nteract,0u812/nteract,nteract/composition,captainsafia/nteract,temogen/nte...
15262b0348636af809d6c4b9240428412a367a96
gulpfile.js/tasks/production.js
gulpfile.js/tasks/production.js
var gulp = require('gulp') var gulpSequence = require('gulp-sequence') var getEnabledTasks = require('../lib/getEnabledTasks') var os = require('os') var path = require('path') var productionTask = function(cb) { global.production = true // Build to a temporary directory, the...
var gulp = require('gulp') var gulpSequence = require('gulp-sequence') var getEnabledTasks = require('../lib/getEnabledTasks') var os = require('os') var path = require('path') var productionTask = function(cb) { global.production = true // Build to a temporary directory, the...
Fix bug when trying to "cross-link" between multiple devices
Fix bug when trying to "cross-link" between multiple devices
JavaScript
mit
jakefleming/mezzotent,jakefleming/mezzotent,vigetlabs/gulp-starter,jakefleming/mezzotent,greypants/gulp-starter,greypants/gulp-starter,vigetlabs/gulp-starter,jakefleming/mezzotent,greypants/gulp-starter,greypants/gulp-starter,vigetlabs/gulp-starter,vigetlabs/gulp-starter
da97d8885b8a9145c933d7cce7c713446f817f6c
src/components/views/messages/UnknownBody.js
src/components/views/messages/UnknownBody.js
/* Copyright 2015, 2016 OpenMarket Ltd Copyright 2020 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless require...
/* Copyright 2015, 2016 OpenMarket Ltd Copyright 2020 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless require...
Fix react error about functional components can't take props
Fix react error about functional components can't take props
JavaScript
apache-2.0
matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk
385658e20f1f513a77ce34758d0e41f197a8a4ba
core/workers.js
core/workers.js
(function() { 'use strict'; self.addEventListener('message', function(obj) { window.setInterval(function() { console.log('worker: ' + obj.existence); var limit = obj.existence - 1; if (obj.isDead !== undefined) { obj.isDead(limit); ...
(function() { 'use strict'; function calculateDeath(dead) { setInterval(function() { var limit = dead - 1; if (limit === 0) { self.postMessage(limit); } return (dead = limit); }, 1000); } self.addEventListe...
Improve web worker with new dead calculate
Improve web worker with new dead calculate
JavaScript
mit
AlbertoFuente/lab,AlbertoFuente/lab
45df2186d52482b810fee9ef71179d46e4886ff8
app/components/Settings/components/option.js
app/components/Settings/components/option.js
import React from 'react'; import PropTypes from 'prop-types'; import { InputGroup, Intent } from '@blueprintjs/core'; const Option = ({ intent, title, type, value, unit, onChange, inputStyles }) => ( <label className="pt-label pt-inline"> <div className="d-inline-block w-exact-225">{title} {unit && `(${unit})`}...
import React from 'react'; import PropTypes from 'prop-types'; import { InputGroup } from '@blueprintjs/core'; const Option = ({ intent, title, type, value, unit, onChange, inputStyles }) => ( <label className="pt-label pt-inline"> <div className="d-inline-block w-exact-225">{title} {unit && `(${unit})`}</div> ...
Remove intent warning and allow zero values for settings
Remove intent warning and allow zero values for settings
JavaScript
mit
builtwithluv/ZenFocus,builtwithluv/ZenFocus
cb592c2306fbe401c13917a34f0813b5bcb5e04c
src/router.js
src/router.js
var express = require('express'); var parseCommand = require('./parse-command'); var router = express.Router(); router.post('/', (req, res) => { parseCommand(req) .then(res.send); }); module.exports = router;
const express = require('express'); const winston = require('winston'); const parseCommand = require('./parse-command'); const router = express.Router(); router.post('/', (req, res) => { parseCommand(req) .then((text) => { res.status(200).send(text); }) .catch((err) => { winston.error(err); res.se...
Add general handling of any rejections
feat: Add general handling of any rejections
JavaScript
mit
NSAppsTeam/nickel-bot
2df12a10c390da8bf0e886b7717b70126508aa41
web/src/scripts/controller/CartOauthCtrl.js
web/src/scripts/controller/CartOauthCtrl.js
'use strict'; module.exports = function ($scope, $location, $service) { console.log('CartOauthCtrl'); $scope.hasBeenInited = false; $scope.startOauthProcess = function() { $service.getOauthUrl().then(function(result) { window.location.href = result.url; }); }; $servic...
'use strict'; module.exports = function ($scope, $location, $accessService) { console.log('CartOauthCtrl'); $scope.hasBeenInited = false; $scope.startOauthProcess = function() { $accessService.getOauthUrl().then(function(result) { window.location.href = result.url; }); }; ...
Fix oauth page response, redirect user to login page, if site already authed, not throw user into error page.
Fix oauth page response, redirect user to login page, if site already authed, not throw user into error page.
JavaScript
mit
agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart
768ea00e7bee2b9de34d07b21fd18813cbdb6f2b
src/providers/weather/air-pollution-service.js
src/providers/weather/air-pollution-service.js
import { apiConstants, apiProvidersConst, httpService, newsModelFactory } from '../../common/common.js'; export default class AirPollution { static getSummary() { let options = httpService.clone(apiConstants.airPollution); options.path = options.path.replace('{0}', options.token); return ht...
import { apiConstants, apiProvidersConst, httpService, newsModelFactory } from '../../common/common.js'; export default class AirPollution { static getSummary() { let options = httpService.clone(apiConstants.airPollution); options.path = options.path.replace('{0}', options.token); return ht...
Enhance air pollution service formatting
Enhance air pollution service formatting
JavaScript
mit
AlexanderAntov/scraper-js,AlexanderAntov/scraper-js
f83b13af8fa49a500fd554a53ba800f999be5919
lib/copy-sync/copy-file-sync.js
lib/copy-sync/copy-file-sync.js
var fs = require('graceful-fs') var BUF_LENGTH = 64 * 1024 var _buff = new Buffer(BUF_LENGTH) function copyFileSync (srcFile, destFile, options) { var clobber = options.clobber var preserveTimestamps = options.preserveTimestamps if (fs.existsSync(destFile)) { if (clobber) { fs.chmodSync(destFile, par...
var fs = require('graceful-fs') var BUF_LENGTH = 64 * 1024 var _buff = new Buffer(BUF_LENGTH) function copyFileSync (srcFile, destFile, options) { var clobber = options.clobber var preserveTimestamps = options.preserveTimestamps if (fs.existsSync(destFile)) { if (clobber) { fs.chmodSync(destFile, par...
Improve EEXIST error message for copySync
Improve EEXIST error message for copySync
JavaScript
mit
jprichardson/node-fs-extra
45ab550d51fddf10526996423e1bcd70169c3e6f
benchmark/sync-vs-async.js
benchmark/sync-vs-async.js
#!/usr/bin/env node const crypto = require('crypto'); const b64 = require('../'); const prettyBytes = require('pretty-bytes'); const timer = { reset: () => timer.startTime = process.hrtime(), duration: () => process.hrtime(timer.startTime)[1] / 1000000 }; const bench = noOfBytes => Promise.resolve().then(async (...
#!/usr/bin/env node const crypto = require('crypto'); const b64 = require('../'); const prettyBytes = require('pretty-bytes'); const bytesToBenchmark = [10000, 100000, 1000000, 10000000]; const timer = { reset: () => timer.startTime = process.hrtime(), duration: () => process.hrtime(timer.startTime)[1] / 1000000...
Use array for benchmark bytes
Use array for benchmark bytes
JavaScript
mit
lukechilds/base64-async