commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
624
message
stringlengths
15
4.7k
lang
stringclasses
3 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
67ba39eb790d8c7baaf51025dd101bcc9cf2190c
server/Queue/getQueue.js
server/Queue/getQueue.js
const db = require('sqlite') const squel = require('squel') async function getQueue (roomId) { const result = [] const entities = {} try { const q = squel.select() .field('queueId, mediaId, userId') .field('media.title, media.duration, media.provider, users.name AS username, artists.name AS arti...
const db = require('sqlite') const squel = require('squel') async function getQueue (roomId) { const result = [] const entities = {} try { const q = squel.select() .field('queueId, mediaId, userId') .field('media.title, media.duration, media.provider, media.providerData') .field('users.nam...
Include providerData for queue items
Include providerData for queue items
JavaScript
isc
bhj/karaoke-forever,bhj/karaoke-forever
a65add662ca18941d6e38ca80f0d268cd8098f13
public/js/jsondates.js
public/js/jsondates.js
/** * convert json dates to date objects * for all requests using the $http service * * @return callback for app.config() */ define([], function () { 'use strict'; var regexIso8601 = /^(\d{4}|\+\d{6})(?:-(\d{2})(?:-(\d{2})(?:T(\d{2}):(\d{2}):(\d{2})\.(\d{1,})(Z|([\-+])(\d{2}):(\d{2}))?)?)?)?$/; functio...
/** * convert json dates to date objects * for all requests using the $http service * * @return callback for app.config() */ define([], function () { 'use strict'; var regexIso8601 = /^(\d{4}|\+\d{6})(?:-(\d{2})(?:-(\d{2})(?:T(\d{2}):(\d{2}):(\d{2})\.(\d{1,})(Z|([\-+])(\d{2}):(\d{2}))?)?)?)?$/; functio...
Fix bug with automatic date transformations
Fix bug with automatic date transformations
JavaScript
mit
gadael/gadael,gadael/gadael
5c07f22de61a6e96699819b45d4682297c66f0b2
index.js
index.js
/* * decaffeinate suggestions: * DS101: Remove unnecessary use of Array.from * DS102: Remove unnecessary code created because of implicit returns * DS205: Consider reworking code to avoid use of IIFEs * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blo...
/* * decaffeinate suggestions: * DS101: Remove unnecessary use of Array.from * DS102: Remove unnecessary code created because of implicit returns * DS205: Consider reworking code to avoid use of IIFEs * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blo...
Fix undefined error in scripts
Fix undefined error in scripts
JavaScript
mit
patsissons/hubot-giphy
5309b9ab76d9b6d244c44582de5ed6d8ba170fa8
index.js
index.js
"use strict"; hex.Transform = require('./hex_transform'); hex.ChunkedTransform = require('./chunked_hex_transform'); module.exports = hex; function hex(buffer, options) { if (!options.offsetWidth) { options.offsetWidth = 2 * Math.ceil(buffer.length.toString(16).length / 2); } var stream = hex.Tra...
"use strict"; hex.Transform = require('./hex_transform'); hex.ChunkedTransform = require('./chunked_hex_transform'); module.exports = hex; function hex(buffer, options) { options = options || {}; if (!options.offsetWidth) { options.offsetWidth = 2 * Math.ceil(buffer.length.toString(16).length / 2); ...
Fix derp in primary interface
Fix derp in primary interface
JavaScript
mit
kriskowal/hexer,jcorbin/hexer
8a1db8513c44695f52ac3ed2cd105c389f8f8518
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-cli-nouislider', included: function(app) { this._super.included(app); if(!process.env.EMBER_CLI_FASTBOOT) { // Fix for loading it in addons/engines if (typeof app.import !== 'function' && app.app) { app = app.app; ...
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-cli-nouislider', included: function(app) { this._super.included(app); if(!process.env.EMBER_CLI_FASTBOOT) { // Fix for loading it in addons/engines app = recursivelyFindApp(app); app.import({ development: app...
Improve handling of nested usage
Improve handling of nested usage
JavaScript
mit
kennethkalmer/ember-cli-nouislider,kennethkalmer/ember-cli-nouislider,kennethkalmer/ember-cli-nouislider
4278b190dc8088ab38672b5674fa5066fe427ba8
index.js
index.js
var fs = require("fs"); var path = require("path"); var acme = require("acme/acme.json"); if (typeof(acme) !== 'undefined' && (!acme.hasOwnProperty("DomainsCertificate") || !acme.DomainsCertificate.hasOwnProperty("Certs"))) { console.log("Nothing to do"); } else { if(typeof(acme) !== 'undefined'){ for (v...
var fs = require("fs"); var path = require("path"); var acme = require(__dirname + "/acme/acme.json"); if (typeof(acme) !== 'undefined' && (!acme.hasOwnProperty("DomainsCertificate") || !acme.DomainsCertificate.hasOwnProperty("Certs"))) { console.log("Nothing to do"); } else { if(typeof(acme) !== 'undefined'...
Fix : Correcting path for acme.json
Fix : Correcting path for acme.json
JavaScript
mit
dalim-it/docker-images,dalim-it/docker-images,dalim-it/docker-images
258906b161ddc783c21b918a34d264363c461daf
index.js
index.js
var _ = require('lodash'); exports.register = function (plugin, options, next) { var environment = process.env.NODE_ENV || 'development'; // Hook onto the 'onPostHandler' plugin.ext('onPostHandler', function (request, next) { // Get the response object var response = request.response; ...
var _ = require('lodash'); exports.register = function (plugin, options, next) { var environment = process.env.NODE_ENV || 'development'; // Hook onto the 'onPostHandler' plugin.ext('onPostHandler', function (request, next) { // Get the response object var response = request.response; ...
Fix issue with error when the context object is not set
Fix issue with error when the context object is not set
JavaScript
mit
poeticninja/hapi-assets
2b924c9b780e3266b1eba47b8e657ac82ad59996
index.js
index.js
var sweet = require('sweet.js'); var gutil = require('gulp-util'); var applySourceMap = require('vinyl-sourcemaps-apply'); var es = require('event-stream'); var merge = require('merge'); module.exports = function(opts) { var moduleCache = {}; return es.through(function(file) { if(file.isNull()) { return...
var sweet = require('sweet.js'); var gutil = require('gulp-util'); var applySourceMap = require('vinyl-sourcemaps-apply'); var es = require('event-stream'); var merge = require('merge'); module.exports = function(opts) { if(opts.modules){ opts.modules = opts.modules.map(function(mod) { return sweet.loadNo...
Load modules and set readtables only once
Load modules and set readtables only once Don't re-setup modules and readtables for each file to prevent the module cache from breaking the plugin when processing multiple files.
JavaScript
bsd-2-clause
jlongster/gulp-sweetjs
aef23e6966ba96a53d3d46a92f2c5ec0c0876347
index.js
index.js
'use strict'; var jest = require('jest-cli'), gutil = require('gulp-util'), through = require('through2'); module.exports = function (options) { options = options || {}; return through.obj(function (file, enc, cb) { options.rootDir = options.rootDir || file.path; jest.runCLI({ ...
'use strict'; var jest = require('jest-cli'), gutil = require('gulp-util'), through = require('through2'); module.exports = function (options) { options = options || {}; return through.obj(function (file, enc, cb) { options.rootDir = options.rootDir || file.path; var cliOptions = {con...
Support --name options to filter spec files
Support --name options to filter spec files
JavaScript
mit
M6Web/gulp-jest
2fae8caff4eb5f7dac7aafe16596337f9e99eb3d
index.js
index.js
'use strict'; var net = require('net'); module.exports = { get: get }; function get(opts, text, callback) { var socket = new net.Socket(); socket.connect(opts.port, opts.host, function () { socket.setNoDelay(true); socket.write(text + '\n'); }); socket.on('data', function (data) { var re = /<([A-Z]+?)>(....
'use strict'; var net = require('net'); module.exports = { get: get }; function get(opts, text, callback) { var socket = new net.Socket(); socket.connect(opts.port, opts.host, function () { socket.setNoDelay(true); socket.write(text.replace(/\r?\n|\r|\t/g, ' ') + '\n'); }); socket.on('data', function (data...
Fix no response due to newlines
Fix no response due to newlines
JavaScript
mit
niksrc/ner,niksrc/ner
d27bcc3e5cfa824dabbb4f16bf9dcee17764ff77
index.js
index.js
var config = require('./config'), _ = require('underscore'); module.exports = require('./lib/api').Api.buildFromFile(config); module.exports.configure = function(options) { options = options || {}; _.defaults(options, config); return require('./lib/api').Api.buildFromFile(options); }; module.exports.oauth = re...
var config = require('./config'), underscore = require('underscore'); module.exports = require('./lib/api').Api.buildFromFile(config); module.exports.configure = function (options) { options = options || {}; underscore.defaults(options, config); return require('./lib/api').Api.buildFromFile(options); }; module...
Rename underscore variable to fix jslint warning
Rename underscore variable to fix jslint warning
JavaScript
isc
raoulmillais/7digital-api,raoulmillais/node-7digital-api,7digital/7digital-api
f1fce55cf4a1ba1205b040a51d5f7fb5dfc5615c
index.js
index.js
'use strict'; var assign = require('object-assign'); var hasOwn = require('hasown'); module.exports = function(object, keys){ var result = {} if (keys){ keys = keys.filter(hasOwn(object)) } keys.forEach(function(key){ var value = object[key] try { value = JSON.parse(value) } catch (ex){ } result[key]...
'use strict'; var assign = require('object-assign'); var hasOwn = require('hasown'); module.exports = function(object, keys){ var result = {} if (Array.isArray(keys)){ keys = keys.filter(hasOwn(object)) } keys.forEach(function(key){ var value = object[key] try { value = JSON.parse(value) } catch (ex){ }...
Add Array.isArray check for keys
Add Array.isArray check for keys
JavaScript
mit
radubrehar/parse-keys
bb90814b60040ef1ebb5ceba46ab9d3086384c07
packages/rotonde-core/src/server.js
packages/rotonde-core/src/server.js
import path from 'path'; import express from 'express'; import morgan from 'morgan'; require('dotenv').config(); export default callback => { const server = express(); server.set('env', process.env.NODE_ENV || 'development'); server.set('host', process.env.HOST || '0.0.0.0'); server.set('port', process.env.PO...
import path from 'path'; import express from 'express'; import morgan from 'morgan'; require('dotenv').config(); export default callback => { const server = express(); server.set('env', process.env.NODE_ENV || 'development'); server.set('host', process.env.HOST || '0.0.0.0'); server.set('port', process.env.PO...
Add some websocket debugging code
Add some websocket debugging code
JavaScript
mit
merveilles/Rotonde,merveilles/Rotonde
810a957b56dee0d032535c3cfa403079ac32aa71
gevents.js
gevents.js
'use strict'; var request = require('request'); var opts = { uri: 'https://api.github.com' + '/users/' + parseParams(process.argv[2]) + '/events', json: true, method: 'GET', headers: { 'User-Agent': 'nodejs script' } } request(opts, function (err, res, body) { if (err) throw new Error...
'use strict'; var request = require('request'); var opts = parseOptions(process.argv[2]); request(opts, function (err, res, body) { if (err) throw new Error(err); var format = '[%s]: %s %s %s %s'; for (var i = 0; i < body.length; i++) { /* * TODO return something like this as JSON ...
Move options building to dedicated function
Move options building to dedicated function * No validation (yet), just returns request-friendly object. * Add newline before return in parseParams fn. * Add newline to EOF * TODO ** Validate parameters ** Accept and parse multiple parameters
JavaScript
mit
jm-janzen/scripts,jm-janzen/scripts,jm-janzen/scripts
7ac7843a019996837ad56e781178612f1de706d3
pinpoint-items-from-dom-extractor.js
pinpoint-items-from-dom-extractor.js
PinPoint.ItemsfromDomExtractor = function(targetName) { this.targetName = targetName; } PinPoint.ItemsfromDomExtractor.prototype = { getElements : function(element) { var timeDivArray = document.getElementsbyClassName("ytp-time-current") var time = timeDivArray[0].innerHTML } }
PinPoint.ItemsfromDomExtractor = function(targetName) { this.targetName = targetName; } // We'll need logic stating what className to use depending on sit: // YouTube: "ytp-time-current" // Vimeo: "box" PinPoint.ItemsfromDomExtractor.prototype = { getTime : function(className) { var timeDivArray = document.get...
Change function name from getElements to getTime.
Change function name from getElements to getTime.
JavaScript
mit
jbouzi12/PinPoint,ospreys-2014/PinPoint,jbouzi12/PinPoint
f8717ac3301639f0cbb7103f686af2a27eb96c87
examples/dump-burp-xml.js
examples/dump-burp-xml.js
var BurpImporter = require(__dirname + '/../index'), util = require('util'); var importer = new BurpImporter(__dirname + '/example1.xml'); importer.on('start', function (info) { console.log('Dump: start'); console.log(' burpVersion: ' + info.burpVersion); console.log(' exportTime: ' + info.exportTim...
var BurpImporter = require(__dirname + '/../index'), util = require('util'); // source below may be stream or filename. var importer = new BurpImporter(__dirname + '/example1.xml'); importer.on('start', function (info) { console.log('Dump: start'); console.log(' burpVersion: ' + info.burpVersion); co...
Add comment to example regarding source.
Add comment to example regarding source.
JavaScript
mit
bls/node-burp-importer
020c793fed4c1b11197c6ee311a10940709d2c22
lib/assets/javascripts/jasmine-console-shims.js
lib/assets/javascripts/jasmine-console-shims.js
(function() { /** * Function.bind for ECMAScript 5 Support * * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind */ if (!Function.prototype.bind) { Function.prototype.bind = function (oThis) { if (typeof this !== "function") { // closest th...
// using react's Function.prototype.bind polyfill for phantomjs // https://github.com/facebook/react/blob/master/src/test/phantomjs-shims.js (function() { var Ap = Array.prototype; var slice = Ap.slice; var Fp = Function.prototype; if (!Fp.bind) { // PhantomJS doesn't support Function.prototype.bind natively, so ...
Replace Function.prototype.bind polyfill with one that works for the latest version of Phantomjs
Replace Function.prototype.bind polyfill with one that works for the latest version of Phantomjs
JavaScript
mit
mallikarjunayaddala/jasmine-rails,ennova/jasmine-rails,carwow/jasmine-rails,henrik/jasmine-rails,alphagov/jasmine-rails,carwow/jasmine-rails,carwow/jasmine-rails,sharethrough/jasmine-rails,searls/jasmine-rails,spadin/jasmine-rails,PericlesTheo/jasmine-rails,PericlesTheo/jasmine-rails,mallikarjunayaddala/jasmine-rails,s...
c7216b228e14aa30ec83d7415d11aa3c6c7ff198
app/server.js
app/server.js
var express = require('express'), Memcached = require('memcached'); // Constants var port = 3000; var env = process.env.NODE_ENV || 'production'; var mc = new Memcached(process.env.MC_PORT.replace('tcp://', '')); // App var app = express(); app.use(express.urlencoded()); app.get('/', function (req, res) { res....
var express = require('express'), Memcached = require('memcached'), fs = require('fs'); // Constants var port = 3000; var env = process.env.NODE_ENV || 'production'; var mc = new Memcached(process.env.MC_PORT.replace('tcp://', '')); // App var app = express(); app.use(express.urlencoded()); app.get('/', func...
Write set values to log file
Write set values to log file
JavaScript
mit
ndemoor/dockerbel,ndemoor/dockerbel,ndemoor/dockerbel
da2ed8f22a4aeb6b71b0ee028891cff0d2904753
js/Landing.js
js/Landing.js
import React from 'react' import { Link } from 'react-router' import { setSearchTerm } from './actionCreators' import { connect } from 'react-redux' const { string, func, object } = React.PropTypes const Landing = React.createClass({ contextTypes: { router: object }, propTypes: { searchTerm: string, ...
import React from 'react' import { connect } from 'react-redux' import { Link } from 'react-router' import { setSearchTerm } from './actionCreators' const { string, func, object } = React.PropTypes const Landing = React.createClass({ contextTypes: { router: object }, propTypes: { searchTerm: string, ...
Refactor landing page to use mapDispatchToProps which is another method of doing what we were already doing
Refactor landing page to use mapDispatchToProps which is another method of doing what we were already doing
JavaScript
mit
galaxode/ubiquitous-eureka,galaxode/ubiquitous-eureka
e7485014cf2f3e591360b3215871c2b8d2f9382e
src/components/DiagonalDivider/DiagonalDivider.js
src/components/DiagonalDivider/DiagonalDivider.js
// DiagonalDivider import React, { PropTypes } from 'react/addons'; // eslint-disable-line no-unused-vars import styles from './DiagonalDivider.less'; import withStyles from '../../decorators/withStyles'; @withStyles(styles) export default class DiagonalDivider extends React.Component { static propTypes = { id:...
// DiagonalDivider import React, { PropTypes } from 'react/addons'; // eslint-disable-line no-unused-vars import styles from './DiagonalDivider.less'; import withStyles from '../../decorators/withStyles'; @withStyles(styles) export default class DiagonalDivider extends React.Component { static propTypes = { id:...
Make <canvas> drawings look sharp on high-density ("Retina") screens
Make <canvas> drawings look sharp on high-density ("Retina") screens
JavaScript
mit
tonikarttunen/tonikarttunen-com,tonikarttunen/tonikarttunen-com
57fefba0eb45a21e7fb57bc2400a1cff22c7b72b
addon/utils/has-block.js
addon/utils/has-block.js
import Ember from 'ember'; import emberVersionInfo from './ember-version-info'; const { major, minor, isGlimmer } = emberVersionInfo(); let hasBlockSymbol; if (major > 3 || (major == 3 && minor >= 1)) { // Ember-glimmer moved to TypeScript since v3.1 // Do nothing since the symbol is not exported } else if (isGl...
import Ember from 'ember'; import emberVersionInfo from './ember-version-info'; const { major, minor, isGlimmer } = emberVersionInfo(); let hasBlockSymbol; try { if (major > 3 || (major == 3 && minor >= 1)) { // Ember-glimmer moved to TypeScript since v3.1 // Do nothing since the symbol is not exported }...
Add try block to allow fallback to runtime check for HAS_BLOCK symbol
Add try block to allow fallback to runtime check for HAS_BLOCK symbol
JavaScript
mit
pswai/ember-cli-react,pswai/ember-cli-react
ef5db3df7c7e4dd76f920fc44a20a75b1511cf95
karma.conf.js
karma.conf.js
module.exports = function(config) { config.set({ frameworks: [ 'jasmine', 'karma-typescript', ], plugins: [ 'karma-typescript', 'karma-jasmine', 'karma-firefox-launcher', 'karma-chrome-launcher', 'karma-edge-launcher' ], files: [ "./src/**/*.ts", ...
module.exports = function(config) { config.set({ frameworks: [ 'jasmine', 'karma-typescript', ], plugins: [ 'karma-typescript', 'karma-jasmine', 'karma-firefox-launcher', 'karma-chrome-launcher', ], files: [ "./src/**/*.ts", "./test/**/*.ts" ], ...
Remove Edge launcher from Karma Conf
Remove Edge launcher from Karma Conf
JavaScript
mit
arogozine/LinqToTypeScript,arogozine/LinqToTypeScript
33c025904ffccf45e3ef43747a60730241ef53b6
karma.conf.js
karma.conf.js
// @AngularClass // Look in config for karma.conf.js module.exports = require('./config/karma.conf.js');
// @AngularClass // Look in config for karma.conf.js module.exports = require('./config/karma.conf.js');
Debug Error: No such file
Debug Error: No such file
JavaScript
mit
ZombieHippie/fantastic-repository,ZombieHippie/fantastic-repository,ZombieHippie/fantastic-repository,ZombieHippie/fantastic-repository
e371cdfc4f43935caae843310bb3a7fb1468de17
test/support/assert-paranoid-equal.js
test/support/assert-paranoid-equal.js
'use strict'; var assert = require('assert'); var inspectors = require('./assert-paranoid-equal/inspectors'); var Context = require('./assert-paranoid-equal/context'); function paranoidEqual(value1, value2) { inspectors.ensureEqual(new Context(value1, value2), value1, value2); } function notParanoidEqual(value1...
'use strict'; var assert = require('assert'); var inspectors = require('./assert-paranoid-equal/inspectors'); var Context = require('./assert-paranoid-equal/context'); /* * This function provides a "paranoid" variant of Node's assert.deepEqual * See assert-paranoid-equal's README for details. * * https://npmjs....
Add description for `paranoidEqual` function
Add description for `paranoidEqual` function
JavaScript
mit
nodeca/js-yaml,SmartBear/js-yaml,SmartBear/js-yaml,deltreey/js-yaml,crissdev/js-yaml,djchie/js-yaml,crissdev/js-yaml,rjmunro/js-yaml,crissdev/js-yaml,doowb/js-yaml,nodeca/js-yaml,cesarmarinhorj/js-yaml,SmartBear/js-yaml,joshball/js-yaml,pombredanne/js-yaml,joshball/js-yaml,minj/js-yaml,rjmunro/js-yaml,vogelsgesang/js-y...
881cda193c44a1bea0bd02f0cf5ca263a5e3730f
packages/react-scripts/template/src/App.test.js
packages/react-scripts/template/src/App.test.js
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; it('renders without crashing', () => { const div = document.createElement('div'); ReactDOM.render(<App />, div); });
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; it('renders without crashing', () => { window.matchMedia = jest.genMockFunction().mockImplementation(function () { return { matches: true }; }); const div = document.createElement('div'); ReactDOM.render(<App />...
Add a mock for window.matchMedia.
Add a mock for window.matchMedia. The window.matchMedia function is used in the Spectacle Slide component (and other parts of Radium).
JavaScript
bsd-3-clause
igetgames/spectacle-create-react-app,igetgames/spectacle-create-react-app,igetgames/spectacle-create-react-app
fbe99b3addf8e6da1f9e004b01f37ddddce035db
app/services/fastboot.js
app/services/fastboot.js
import Ember from "ember"; let alias = Ember.computed.alias; let computed = Ember.computed; export default Ember.Service.extend({ cookies: alias('_fastbootInfo.cookies'), headers: alias('_fastbootInfo.headers'), host: computed(function() { return this._fastbootInfo.host(); }), isFastboot: computed(funct...
/* global FastBoot */ import Ember from "ember"; let alias = Ember.computed.alias; let computed = Ember.computed; export default Ember.Service.extend({ cookies: alias('_fastbootInfo.cookies'), headers: alias('_fastbootInfo.headers'), host: computed(function() { return this._fastbootInfo.host(); }), isFa...
Add isFastBoot property to service
Add isFastBoot property to service
JavaScript
mit
tildeio/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot,josemarluedke/ember-cli-fastboot,josemarluedke/ember-cli-fastboot,rwjblue/ember-cli-fastboot,habdelra/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot,habdelra/ember-cli-fastboot,kratiahuja/ember-cli-fastboot,tildeio/ember-cli-fastboot,kratiahuja/ember-cl...
94c6656d834febbe16b2c732912dbbab109a6d39
test-projects/electron-log-test-nwjs/main.spec.js
test-projects/electron-log-test-nwjs/main.spec.js
'use strict'; const expect = require('chai').expect; const helper = require('../spec-helper'); const APP_NAME = 'electron-log-test-nwjs'; describe('nwjs test project', function() { this.timeout(5000); it('should write one line to a log file', () => { return helper.run(APP_NAME).then((logs) => { expect...
'use strict'; const expect = require('chai').expect; const helper = require('../spec-helper'); const APP_NAME = 'electron-log-test-nwjs'; describe('nwjs test project', function() { this.timeout(5000); it('should write one line to a log file', () => { return helper.run(APP_NAME).then((logs) => { expect...
Remove line number check for nwjs.
Remove line number check for nwjs.
JavaScript
mit
megahertz/electron-log,megahertz/electron-log,megahertz/electron-log
de10bbbd46e148fe38e82256eb5d92a13550e1c3
protocol-spec/.vuepress/plugin-matomo/inject.js
protocol-spec/.vuepress/plugin-matomo/inject.js
/* global MATOMO_SITE_ID, MATOMO_TRACKER_URL, MATOMO_ENABLE_LINK_TRACKING */ export default ({ router }) => { // Google analytics integration if (MATOMO_SITE_ID && MATOMO_TRACKER_URL) { var _paq = _paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.p...
/* global MATOMO_SITE_ID, MATOMO_TRACKER_URL, MATOMO_ENABLE_LINK_TRACKING */ export default ({ router }) => { // Google analytics integration if (process.env.NODE_ENV === 'production' && typeof window !== 'undefined' && MATOMO_SITE_ID && MATOMO_TRACKER_URL) { var _paq = _paq || []; /* tracker methods like ...
Fix matomo generation to only happen in production
Fix matomo generation to only happen in production
JavaScript
bsd-3-clause
metafetish/buttplug
674452e37dc30389046b1d3f99a0c20062bf7100
assets/scripts/script.js
assets/scripts/script.js
(function(document, saveAs, smoothScroll, downloadName) { 'use strict'; if(window.location.protocol.indexOf('http') !== -1) { // Created before download in order to be JS-modifications-free. var blob = new Blob(['<!doctype html>' + document.documentElement.outerHTML], {type: 'text/html;charset=utf-8'}); ...
(function(document, saveAs, smoothScroll, downloadName) { 'use strict'; if (window.location.protocol.indexOf('http') !== -1) { // Created before download in order to be JS-modifications-free. var blob = new Blob(['<!doctype html>' + document.documentElement.outerHTML], {type: 'text/html;charset=utf-8'}); ...
Move click handler inside the right block
Move click handler inside the right block
JavaScript
isc
ThibWeb/jsonresume-theme-eloquent,ThibWeb/jsonresume-theme-eloquent,ThibWeb/jsonresume-theme-eloquent
6b4498d48865bd7fde55cc03ee3a682543c4d96d
.mocharc.js
.mocharc.js
module.exports = { recursive: true, reporter: 'spec', slow: 0, timeout: 40000, ui: 'bdd', extension: 'js', };
module.exports = { recursive: true, reporter: 'spec', slow: 0, timeout: 50000, ui: 'bdd', extension: 'js', };
Increase mocha timeout to 50000ms
Increase mocha timeout to 50000ms Fix #13090
JavaScript
apache-2.0
ctamisier/generator-jhipster,pascalgrimaud/generator-jhipster,dynamicguy/generator-jhipster,atomfrede/generator-jhipster,liseri/generator-jhipster,dynamicguy/generator-jhipster,ruddell/generator-jhipster,gmarziou/generator-jhipster,atomfrede/generator-jhipster,vivekmore/generator-jhipster,mraible/generator-jhipster,cta...
74081cd1ba00c1efcba11eae021b474adc26c126
config/webpack.config.devserver.js
config/webpack.config.devserver.js
const path = require('path'); const webpack = require('webpack'); // Listen port const PORT = process.env.PORT || 8080; // Load base config const baseConfig = require('./webpack.config.base'); // Create the config const config = Object.create(baseConfig); config.devtool = 'cheap-source-map'; config.devServer = { ...
const path = require('path'); const webpack = require('webpack'); // Listen port const PORT = process.env.PORT || 8080; // Load base config const baseConfig = require('./webpack.config.base'); // Create the config const config = Object.create(baseConfig); config.devtool = 'cheap-source-map'; config.devServer = { ...
Fix this crashing spewage: Uncaught Error: [HMR] Hot Module Replacement is disabled.
Fix this crashing spewage: Uncaught Error: [HMR] Hot Module Replacement is disabled.
JavaScript
mit
gaudeon/interstice,gaudeon/interstice,gaudeon/interstice
a8875ecedd19d33baf1832b5ed1b710cf8de0019
public/js/app/mixins/Pagination.js
public/js/app/mixins/Pagination.js
define(["app/app", "ember"], function(App, Ember) { "use strict"; App.Pagination = Ember.Mixin.create({ queryParams: ['offset'], limit: 30, offset: 0, actions: { nextPage: function() { this.incrementProperty('offset', this.get('limit')) }, prevPage: function() {...
define(["app/app", "ember"], function(App, Ember) { "use strict"; App.Pagination = Ember.Mixin.create({ queryParams: ['offset'], limit: 30, offset: 0, actions: { nextPage: function() { this.incrementProperty('offset', this.get('limit')) }, prevPage: function() {...
Disable pagination check for prev page.
Disable pagination check for prev page. Due to bans timelines can return less than limit posts now. To work, it requires proper pagination metadata from timelines.
JavaScript
mit
FreeFeed/freefeed-html,epicmonkey/pepyatka-html,SiTLar/pepyatka-html,dsumin/freefeed-html,SiTLar/pepyatka-html,dsumin/freefeed-html,pepyatka/pepyatka-html,FreeFeed/freefeed-html,epicmonkey/pepyatka-html,pepyatka/pepyatka-html
2baa9b0490355c15a317205fa6cfd94e0ce89f6b
static/js/append-contents.js
static/js/append-contents.js
/** * Load all h2, h3, h4, h5 and h6 tags as contents. */ $('.append-contents').each(function() { let html = '<ul class="list-unstyled contents">', level = 2; for(let h of $('h2, h3, h4, h5, h6').not('.append-contents')) { let newLevel = parseInt(h.tagName.charAt(1)); if ...
/** * Load all h2, h3, h4, h5 and h6 tags as contents. */ $('.append-contents').each(function() { let html = '<ul class="list-unstyled contents">', level = 2; for(let h of $('h2, h3, h4, h5, h6').not('.append-contents')) { let newLevel = parseInt(h.tagName.charAt(1)); if ...
Fix append contents js again
Fix append contents js again
JavaScript
bsd-3-clause
LibCrowds/libcrowds-bs4-pybossa-theme,LibCrowds/libcrowds-bs4-pybossa-theme
849af48a8ca902ecc8414d200c691f51f99a399c
mmir-plugin-tts-speakjs/www/speakWorkerExt.js
mmir-plugin-tts-speakjs/www/speakWorkerExt.js
/* * based on speakWorker.js from: * * speak.js * https://github.com/logue/speak.js * License: GPL-3.0 */ importScripts('speakGenerator.js'); onmessage = function(event) { var msg = event.data; var id = msg.id; var audioData = generateSpeech(msg.text, msg.options) postMessage({id: id, data: audioData...
/* * based on speakWorker.js from: * * speak.js * https://github.com/logue/speak.js * License: GPL-3.0 */ importScripts('speakGenerator.js'); onmessage = function(event) { var msg = event.data; var id = msg.id; try { var audioData = generateSpeech(msg.text, msg.options) postMessage({id: id, data: a...
FIX catch and notify about errors
FIX catch and notify about errors
JavaScript
mit
mmig/mmir-plugins-media
68fe5843ccf28c9fed9870ce7de54f103648425e
src/util/brush/getCircle.js
src/util/brush/getCircle.js
/** * Gets the pixels within the circle. * @export @public @method * @name getCircle * * @param {number} radius The radius of the circle. * @param {number} rows The number of rows. * @param {number} columns The number of columns. * @param {number} [xCoord = 0] The x-location of the center of th...
/** * Gets the pixels within the circle. * @export @public @method * @name getCircle * * @param {number} radius The radius of the circle. * @param {number} rows The number of rows. * @param {number} columns The number of columns. * @param {number} [xCoord = 0] The x-location of the center of th...
Use floor instead of round for determining brush's selected pixels
fix(Brush): Use floor instead of round for determining brush's selected pixels
JavaScript
mit
cornerstonejs/cornerstoneTools,cornerstonejs/cornerstoneTools,chafey/cornerstoneTools,cornerstonejs/cornerstoneTools
2bdfb9c7c5c51c86c46fcf724ffe0ce08ea0ebed
server/routes/index.js
server/routes/index.js
var _ = require('underscore'); var routes = [ 'users', 'building', 'units' ]; module.exports.mount = function(app) { _(routes).each(function(route){ require('./'+route+'_routes').mount(app); }); };
var _ = require('underscore'); var routes = [ 'users', 'building' ]; module.exports.mount = function(app) { _(routes).each(function(route){ require('./'+route+'_routes').mount(app); }); };
Fix server fatal error (loading non existant route)
Fix server fatal error (loading non existant route)
JavaScript
mit
romain-grelet/HackersWars,romain-grelet/HackersWars
e43c291da3d14ac64a36254b8055ab4c750d790e
gulpfile.js
gulpfile.js
var gulp = require("gulp"), plugins = require("gulp-load-plugins")(), pkg = require("./package.json"), paths = { src: { css: "./src/main/resources/static/sass" }, dist: { css: "./src/main/resources/static/css" } }, config = { ...
var gulp = require("gulp"), plugins = require("gulp-load-plugins")(), pkg = require("./package.json"), paths = { src: { css: "./src/main/resources/static/sass" }, dist: { css: "./src/main/resources/static/css" } }, config = { ...
Fix sourcemaps so they write to separate .map file
Fix sourcemaps so they write to separate .map file
JavaScript
mit
MTUHIDE/CoCoTemp,MTUHIDE/CoCoTemp,MTUHIDE/CoCoTemp,MTUHIDE/CoCoTemp,MTUHIDE/CoCoTemp
ed290020fef0bd0708b3ca2f73b847927f9a4090
js/components/developer/payment-info-screen/index.js
js/components/developer/payment-info-screen/index.js
import React, { Component } from 'react'; import { View, Alert } from 'react-native'; import { Text, ListItem, Thumbnail, Body, Left, Form, Content, Button } from 'native-base'; import paymentInfoScreenStyle from './paymentInfoScreenStyle'; const alertMessage1 = 'För Kortet .... .... .... 4499\n'; const alertMessage2 ...
import React, { Component } from 'react'; import { View, Alert } from 'react-native'; import { Text, ListItem, Thumbnail, Body, Left, Form, Content, Button } from 'native-base'; import paymentInfoScreenStyle from './paymentInfoScreenStyle'; const alertMessage1 = 'För Kortet .... .... .... 4499\n'; const alertMessage2 ...
Add missing title to navigation options in payment info screen
Add missing title to navigation options in payment info screen
JavaScript
mit
justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client
94e5e9279953a4098ef01695586c4bea155cb1a2
Library/Application-Support/Firefox/Profiles/robgant.default/gm_scripts/Remove_Position_Fixed/Remove_Position_Fixed.user.js
Library/Application-Support/Firefox/Profiles/robgant.default/gm_scripts/Remove_Position_Fixed/Remove_Position_Fixed.user.js
// ==UserScript== // @name Remove Position Fixed // @namespace name.robgant // @description Makes anything on the page with position fixed become static // @include * // @version 1 // @grant GM_registerMenuCommand // @grant GM_getValue // @grant GM_setValue // ==/UserScript== functio...
// ==UserScript== // @name Remove Position Fixed // @namespace name.robgant // @description Makes some things on the page with position fixed become static. Adds a menu command to run the script. // @include * // @grant GM_registerMenuCommand // @grant GM_getValue // @grant GM_setValue //...
Use a timeout to handle position fixed only on scroll
Use a timeout to handle position fixed only on scroll
JavaScript
mit
rgant/homedir,rgant/homedir,rgant/homedir
68c44fd31849d23e3576f2e115db94fcffe2af3d
tests/bin/scheduler.spec.js
tests/bin/scheduler.spec.js
/* eslint-env node, mocha */ const expect = require('chai').expect const scheduler = require('../../src/bin/scheduler.js') describe('bin > scheduler', () => { it('can run the scheduler server', () => { expect(scheduler).to.exist }) })
/* eslint-env node, mocha */ const expect = require('chai').expect const proxyquire = require('proxyquire').noCallThru() const scheduler = proxyquire('../../src/bin/scheduler.js', { '../config/jobs.js': [] }) describe('bin > scheduler', () => { it('can run the scheduler server', () => { expect(scheduler).to.ex...
Make sure workers are not getting executed for tests
Make sure workers are not getting executed for tests
JavaScript
agpl-3.0
gw2efficiency/gw2-api.com
fc5bdfad980dc5c47512ba81f5ecf087db7e467b
lib/models.js
lib/models.js
'use strict'; const Path = require('path'); const Glob = require('glob'); async function getFiles(paths, ignored) { const opts = { nodir: true, dot: false, }; if (!Array.isArray(paths)) paths = [paths]; if (ignored) opts.ignore = ignored; return paths.reduce((acc, pattern) => { ...
'use strict'; const Path = require('path'); const Glob = require('glob'); async function getFiles(paths, ignored) { const opts = { nodir: true, dot: false, }; if (!Array.isArray(paths)) paths = [paths]; if (ignored) opts.ignore = ignored; return paths.reduce((acc, pattern) => { ...
Remove unnecessary use of Promise.resolve
Remove unnecessary use of Promise.resolve
JavaScript
mit
valtlfelipe/hapi-sequelizejs,valtlfelipe/hapi-sequelizejs
33c372227420154621ed4c187d5f9d479857b51a
src/_includes/scripts/in-page-nav.js
src/_includes/scripts/in-page-nav.js
const observer = new IntersectionObserver(entries => { const intersectingEntries = entries.filter(e => e.isIntersecting); for (const entry of intersectingEntries) { const previouslyActive = document.querySelector('.pageNav a.is-active'); if (previouslyActive) { previouslyActive.class...
const observer = new IntersectionObserver(entries => { const intersectingEntries = entries.filter(e => e.isIntersecting); for (const entry of intersectingEntries) { const previouslyActive = document.querySelector('.pageNav a.is-active'); if (previouslyActive) { previouslyActive.class...
Remove scrollIntoView() to fix scroll jank preventing users from scrolling
Remove scrollIntoView() to fix scroll jank preventing users from scrolling
JavaScript
apache-2.0
WPO-Foundation/webpagetest-docs,WPO-Foundation/webpagetest-docs
2a2b6a6d421855b20ee40f71695d897433eb41d2
javascripts/hints/hints.js
javascripts/hints/hints.js
// Model BustinBash.Hints.Model = function() {} // View BustinBash.Hints.View = function() {} BustinBash.Hints.View.prototype = { render: function(hint) { var source = $("#hints-template").html(); var template = Handlebars.compile(source); var context = {hint: hint} var text = template(context)...
// View BustinBash.Hints.View = function() {} BustinBash.Hints.View.prototype = { render: function(hint) { var source = $("#hints-template").html(); var template = Handlebars.compile(source); var context = {hint: hint} var text = template(context); $('.hints').html(text) }, hideHint: fu...
Hide hint button on click
Hide hint button on click
JavaScript
mit
BustinBash/BustinBash,BustinBash/bustinbash.github.io
5caaf488fe4d156dda95c99773e5d969a79a99de
sample/WebHook-GitHub/index.js
sample/WebHook-GitHub/index.js
module.exports = function (context) { context.log('GitHub WebHook triggered!'); context.done(null, 'New GitHub comment: ' + context.req.body.comment.body); }
module.exports = function (context) { context.log('GitHub WebHook triggered! ' + context.req.body.comment.body); context.done(null, 'New GitHub comment: ' + context.req.body.comment.body); }
Add more logging to GitHub sample
Add more logging to GitHub sample
JavaScript
mit
fabiocav/azure-webjobs-sdk-script,fabiocav/azure-webjobs-sdk-script,Azure/azure-webjobs-sdk-script,Azure/azure-webjobs-sdk-script,fabiocav/azure-webjobs-sdk-script,fabiocav/azure-webjobs-sdk-script,Azure/azure-webjobs-sdk-script,Azure/azure-webjobs-sdk-script
af94e5976370f46979e31e8d9254ff2bca873ad7
loopback/server/server.js
loopback/server/server.js
var loopback = require('loopback'); var boot = require('loopback-boot'); var app = module.exports = loopback(); app.start = function() { // start the web server return app.listen(function() { app.emit('started'); var baseUrl = app.get('url').replace(/\/$/, ''); console.log('Web server listening at: %s...
var loopback = require('loopback'); var boot = require('loopback-boot'); var explorer = require('loopback-component-explorer'); var path = require('path'); var app = module.exports = loopback(); //app.use(customBaseUrl+'/explorer', loopback.rest()); app.start = function() { // start the web server var customBa...
Add support for custom explorer URL
Add support for custom explorer URL
JavaScript
mit
EdinburghCityScope/cityscope-loopback-docker,EdinburghCityScope/cityscope-loopback-docker
12c7502e43e97be742540e8214a47d29761ff3df
app/scripts/views/detail.js
app/scripts/views/detail.js
define( ["backbone", "backbone.marionette", "communicator", "medium.editor", "jquery", "erfgeoviewer.common", "tpl!template/detail.html"], function( Backbone, Marionette, Communicator, MediumEditor, $, App, Template ) { return Marionette.ItemView.extend( { template: Template, layout:...
define( ["backbone", "backbone.marionette", "communicator", "medium.editor", "jquery", "erfgeoviewer.common", "tpl!template/detail.html"], function( Backbone, Marionette, Communicator, MediumEditor, $, App, Template ) { return Marionette.ItemView.extend( { template: Template, layout:...
Fix browser hanging because of fast typing in editor.
Fix browser hanging because of fast typing in editor.
JavaScript
mit
TotalActiveMedia/erfgeoviewer,TotalActiveMedia/erfgeoviewer,TotalActiveMedia/erfgeoviewer
8caa0c9514dfeb6b6a7f79d870aebd6bc3a1acb1
app/src/js/utils/ApiUtil.js
app/src/js/utils/ApiUtil.js
var xhr = require('../lib/xhr'); var { API, ActionTypes } = require('../Constants'); var ServerActionCreators = require('../actions/ServerActionCreators'); var ApiUtils = { loadVisitors () { // xhr.getJSON(`${API}/visitors`, (err, res) => { ServerActionCreators.loadedVisitors(["Brian", "Jeremy", "Kendal"])...
var xhr = require('../lib/xhr'); var { API, ActionTypes } = require('../Constants'); var ServerActionCreators = require('../actions/ServerActionCreators'); var ApiUtils = { loadVisitors () { // xhr.getJSON(`${API}/visitors`, (err, res) => { ServerActionCreators.loadedVisitors(["Brian", "Jeremy", "Kendal"])...
Increase number of seed activities to make demo more realistic for typical use case
Increase number of seed activities to make demo more realistic for typical use case
JavaScript
mit
jeremymcintyre/vetted,jeremymcintyre/vetted
55f010c72438fcc227fd1bd967467ca13f9ea64e
specs/services/people_spec.js
specs/services/people_spec.js
/** * @author Hamza Waqas <hamzawaqas@live.com> * @since 2/9/14 */ var linkedin = require('../../')('75gyccfxufrozz', 'HKwSAPg0z7oGYfh5') token = process.env.IN_TOKEN; jasmine.getEnv().defaultTimeoutInterval = 20000; linkedin = linkedin.init(token); describe('API: People Test Suite', function() { it('sho...
/** * @author Hamza Waqas <hamzawaqas@live.com> * @since 2/9/14 */ var linkedin = require('../../')('75gyccfxufrozz', 'HKwSAPg0z7oGYfh5') token = process.env.IN_TOKEN; jasmine.getEnv().defaultTimeoutInterval = 20000; linkedin = linkedin.init(token); describe('API: People Test Suite', function() { it('sho...
Remove console.log and add in done() for people spec.
Remove console.log and add in done() for people spec.
JavaScript
mit
ArkeologeN/node-linkedin
c4463eb8130561cfdfeb2114d87ca1e10a1857a9
gatsby-node.js
gatsby-node.js
exports.modifyWebpackConfig = function (config) { config.loader('jpg', { test: /\.jpg$/, loader: 'url?limit=10000', }) config.loader('png', { test: /\.png$/, loader: 'url?limit=10000', }) config.loader('pug', { test: /\.pug$/, loader: 'pug', }) return config }
exports.modifyWebpackConfig = function (config) { config.merge({ output: { publicPath: '/', }, }) config.loader('jpg', { test: /\.jpg$/, loader: 'url?limit=10000', }) config.loader('png', { test: /\.png$/, loader: 'url?limit=10000', }) config.loader('pug', { test: /\....
Fix public path in production build
Fix public path in production build
JavaScript
mit
jsis/jsconf.is,jsis/jsconf.is
9f361436f851a6006930cb3b2cd92b39a0500ef5
src/components/Posts/index.js
src/components/Posts/index.js
import _ from 'underscore'; import React from 'react'; import equip from './equip'; import PostsGrid from '../StaticResponsiveGrid'; import Post from './Post'; const Posts = ({ style, posts, added }) => { const postCards = _.mapObject(posts, (post, id) => { const props = { post, sty...
import _ from 'underscore'; import React from 'react'; import equip from './equip'; import PostsGrid from '../StaticResponsiveGrid'; import Post from './Post'; const Posts = ({ style, posts, added }) => { let i = -1; const postCards = _.mapObject(posts, (post) => { const props = { post, ...
Put in a temporary fix for the layout system.
Put in a temporary fix for the layout system.
JavaScript
mit
RayBenefield/halo-forge,RayBenefield/halo-forge,RayBenefield/halo-forge
63cd6edade8821c647f1a1f488d84c9fd5186f96
js/module.js
js/module.js
$(function() { var readme = $('.readme'); var converter = new Showdown.converter(); for(var i=0;i<readme.length;i++) { var readmeElm = $(readme[i]); var module = readmeElm.data('module'); var path = 'hands-on-exercises/M' + module; $.ajax({ url: '/' + path + '/readme.md' }).success(funct...
$(function() { var readme = $('.readme'); var converter = new Showdown.converter(); for(var i=0;i<readme.length;i++) { var readmeElm = $(readme[i]); var module = readmeElm.data('module'); var path = 'hands-on-exercises/M' + module; $.ajax({ url: '/' + path + '/README.md' }).success(funct...
Fix Ajax request not looking for the good lowercase README.md while they are all named in uppercace 'hands-on-exercises'
Fix Ajax request not looking for the good lowercase README.md while they are all named in uppercace 'hands-on-exercises'
JavaScript
mit
nishant8BITS/video-exercises,angularjs-foundation/video-exercises,nishant8BITS/video-exercises,angularjs-foundation/video-exercises,angularjs-foundation/video-exercises,nishant8BITS/video-exercises
bc980ffd82cc591a4fc1658ae12f3685cef0f7bf
lib/generators/half_pipe/templates/tasks/options/sass.js
lib/generators/half_pipe/templates/tasks/options/sass.js
module.exports = { options: { require: ['sass-css-importer'], loadPath: ['<%%= bowerOpts.directory || "bower_components" %>'], bundleExec: true }, debug: { src: '<%%= dirs.tmp %>/prepare/assets/styles/main.scss', dest: '<%%= dirs.tmp %>/public/assets/styles/main.css', options: { styl...
module.exports = { options: { require: ['sass-css-importer'], loadPath: ['<%%= bowerOpts.directory || "bower_components" %>'], bundleExec: true }, debug: { src: '<%%= dirs.tmp %>/prepare/assets/styles/main.scss', dest: '<%%= dirs.tmp %>/public/assets/styles/main.css', options: { styl...
Fix typo in sourcemap option
Fix typo in sourcemap option
JavaScript
mit
half-pipe/half-pipe,half-pipe/half-pipe
ccb997fa2ce75b5574b11b0631d52e8528bd5a15
extension/background.js
extension/background.js
var tabs = {}; chrome.extension.onRequest.addListener(function(request, sender, callback) { var tabId = request.tabId; if (!(tabId in tabs)) { chrome.tabs.executeScript(tabId, { file: 'generated_accessibility.js' }, function() { if (chrome.extension.lastError) { callback({ ...
var tabs = {}; chrome.extension.onRequest.addListener(function(request, sender, callback) { var tabId = request.tabId; if (!(tabId in tabs)) { chrome.tabs.executeScript(tabId, { file: 'generated_accessibility.js' }, function() { if (chrome.extension.lastError) { callback({ ...
Fix bug where audit wouldn't show up after closing and re-opening devtools.
Fix bug where audit wouldn't show up after closing and re-opening devtools.
JavaScript
apache-2.0
modulexcite/accessibility-developer-tools,ckundo/accessibility-developer-tools,japacible/accessibility-developer-tools,Khan/accessibility-developer-tools,seksanman/accessibility-developer-tools,dylanb/accessibility-developer-tools-extension,GabrielDuque/accessibility-developer-tools,ricksbrown/accessibility-developer-t...
25872df03668db7b36488776dbfd5de630a357f8
src/protocols/handlers/http/args.js
src/protocols/handlers/http/args.js
'use strict'; const { parse: parseContentType } = require('content-type'); const { findFormat } = require('../../../formats'); const { parsePreferHeader } = require('./headers'); // Using `Prefer: return=minimal` request header results in `args.silent` true. const silent = function ({ specific: { req: { headers: re...
'use strict'; const { parse: parseContentType } = require('content-type'); const { findFormat } = require('../../../formats'); const { parsePreferHeader } = require('./headers'); // Using `Prefer: return=minimal` request header results in `args.silent` true. const silent = function ({ specific: { req: { headers: re...
Add Content-Type handling for charset
Add Content-Type handling for charset
JavaScript
apache-2.0
autoserver-org/autoserver,autoserver-org/autoserver
d167d0339c25ad4c8c34646b26d7fe041421eba0
client-vendor/after-body/jquery.clickFeedback/jquery.clickFeedback.js
client-vendor/after-body/jquery.clickFeedback/jquery.clickFeedback.js
/* * Author: CM * Dependencies: jquery.transit.js */ (function($) { document.addEventListener('mousedown', function(event) { var $elem = $(event.target).closest('.clickFeedback'); if ($elem.length) { var buttonOffset = $elem.offset(); var feedbackSize = 2 * Math.sqrt(Math.pow($elem.outerWidth...
/* * Author: CM * Dependencies: jquery.transit.js */ (function($) { document.addEventListener('mousedown', function(event) { var $elem = $(event.target).closest('.clickFeedback:not(:disabled)'); if ($elem.length) { var buttonOffset = $elem.offset(); var feedbackSize = 2 * Math.sqrt(Math.pow($...
Exclude disabled buttons from click feedback
Exclude disabled buttons from click feedback
JavaScript
mit
fauvel/CM,njam/CM,njam/CM,vogdb/cm,cargomedia/CM,cargomedia/CM,cargomedia/CM,vogdb/cm,njam/CM,fauvel/CM,fauvel/CM,vogdb/cm,cargomedia/CM,fauvel/CM,njam/CM,njam/CM,vogdb/cm,fauvel/CM,vogdb/cm
147bf69d1932156e8e0cf97ef5485bed48e21ace
src/start/heyneighbor-server-base.js
src/start/heyneighbor-server-base.js
// Socket import '../modules/socket/socket-server'; // Auth modules import '../modules/facebook/facebook'; import '../modules/google/google'; import '../modules/session/session'; import '../modules/signin/signin'; import '../modules/signup/signup'; import '../modules/resource/resource'; import '../modules/belong/belo...
// Socket import '../modules/socket/socket-server'; // Auth modules import '../modules/facebook/facebook'; import '../modules/google/google'; import '../modules/session/session'; import '../modules/signin/signin'; import '../modules/signup/signup'; import '../modules/resource/resource'; import '../modules/belong/belo...
Remove the old upload module
Remove the old upload module
JavaScript
agpl-3.0
belng/pure,scrollback/pure,Anup-Allamsetty/pure,scrollback/pure,belng/pure,scrollback/pure,belng/pure,Anup-Allamsetty/pure,Anup-Allamsetty/pure,belng/pure,Anup-Allamsetty/pure,scrollback/pure
38e659a1724561be7bb9ffc1608db1b7a35d1ee4
js/Protocol.js
js/Protocol.js
function verifyStructure(template, struct) { for (key in template) { if (!keyExists(key, struct)) { console.log("Could not find expected key:", key, "in provided structure"); return false; } else { if (!compareType(template[key], struct[key])) { co...
function verifyStructure(template, struct) { for (key in template) { if (!keyExists(key, struct)) { console.log("Could not find expected key:", key, "in provided structure"); return false; } else { if (!compareType(template[key], struct[key])) { co...
Add type checking to array elements
Add type checking to array elements
JavaScript
mit
Tactique/jswars
82bc5a9e7432ac3f53166c10cad96bdade178644
src/shared/containers/User-Pic-Page/User-Pic-Page.js
src/shared/containers/User-Pic-Page/User-Pic-Page.js
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import * as profileActions from '../../modules/profile'; class UserPicPage extends Component { static needs = [profileActions.fetchProfile] render() { const { ...
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import * as profileActions from '../../modules/profile'; class UserPicPage extends Component { componentDidMount() { this.props.fetchProfile(); } static needs = [p...
Add client initial request through component did mount
Add client initial request through component did mount
JavaScript
mit
Rhadow/isomorphic-react-example,Rhadow/isomorphic-react-example
cb546b2d0e3bd800d44656fbd664a74f2176a31e
lib/scrapper/exceptionScrapper.js
lib/scrapper/exceptionScrapper.js
/*global $*/ module.exports = function(page) { return page.evaluate(function() { const exception = $(".strong.title")[0].childNodes[1].textContent; const info = $(".info.normal")[0].textContent; return { exception: exception, info: info ...
/*global $*/ module.exports = function(page) { return page.evaluate(function() { var exception; const info = document.querySelector(".info.normal").textContent; const exceptionChildNodes = document.querySelector(".strong.title").childNodes; for (var i = 0; i < exceptionChildNodes.le...
Use vanilla JS in exception scrapper
Use vanilla JS in exception scrapper
JavaScript
mit
ninjaprox/github-webhooks,ninjaprox/github-webhooks
e07aab5d97c4e78085f02a0b34948815e41ea23a
client/src/common/Drawer.js
client/src/common/Drawer.js
import Drawer from 'antd/lib/drawer'; import React, { useEffect } from 'react'; function DrawerWrapper({ title, visible, onClose, width, placement, children }) { useEffect(() => { if (visible) { function handler(event) { if (event.code === 'Escape') { onClose(); retu...
import Drawer from 'antd/lib/drawer'; import React, { useEffect } from 'react'; function DrawerWrapper({ title, visible, onClose, width, placement, children }) { useEffect(() => { if (visible) { function handler(event) { if (event.code === 'Escape') { onClose(); retu...
Fix drawer height (use full vertical height)
Fix drawer height (use full vertical height)
JavaScript
mit
rickbergfalk/sqlpad,rickbergfalk/sqlpad,rickbergfalk/sqlpad
2f5b9831eab4add95356322950a7e21748def386
test/fixtures/if-statement/source.js
test/fixtures/if-statement/source.js
console.log('Do something always'); if (module.hot) { console.log('Do something, when hot reload available'); } if (module.hot) { console.log('Do something, when hot reload available'); } else { console.log('Do something, when hot reload unavailable'); }
console.log('Do something always'); if (module.hot) { console.log('Do something, when hot reload available'); } if (module.hot) console.log('Do something, when hot reload available'); if (module.hot) { console.log('Do something, when hot reload available'); } else { console.log('Do something, when hot reload u...
Add additional example for tests
Add additional example for tests
JavaScript
mit
demiazz/babel-plugin-remove-module-hot
e50b256c4b90bc1056e0436d1848ac4ebc1d7843
console.meta.js
console.meta.js
// ==UserScript== // @id iitc-plugin-console@hansolo669 // @name IITC plugin: console // @category Debug // @version 0.0.1 // @namespace https://github.com/hansolo669/iitc-tweaks // @updateURL https://iitc.reallyawesomedomain.com/console.meta.js // @downloadURL https://ii...
// ==UserScript== // @id iitc-plugin-console@hansolo669 // @name IITC plugin: console // @category Debug // @version 0.0.2 // @namespace https://github.com/hansolo669/iitc-tweaks // @updateURL https://iitc.reallyawesomedomain.com/console.meta.js // @downloadURL https://ii...
Fix for intel routing changes
Fix for intel routing changes
JavaScript
mit
hansolo669/iitc-tweaks,hansolo669/iitc-tweaks
81c29fc446cc63c830e7f9ee7e452f6dc5a721c5
server/zanata-frontend/src/frontend/app/containers/TestModal/index.js
server/zanata-frontend/src/frontend/app/containers/TestModal/index.js
import React, { Component } from 'react' import { Modal } from '../../components' import { Button } from 'react-bootstrap' class TestModal extends Component { constructor () { super() this.state = { show: false } } hideModal () { console.info('test') this.setState({show: false}) } ...
import React, { Component } from 'react' import { Modal } from '../../components' import { Button } from 'react-bootstrap' class TestModal extends Component { constructor () { super() this.state = { show: false } } hideModal () { this.setState({show: false}) } showModal () { this....
Fix hide model on clicking
Fix hide model on clicking
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
b949257b76fb278bf5badc36ce0d4dc9b75b5c7a
lib/fetcher.js
lib/fetcher.js
var feedRead = require('feed-read'); var readabilitySax = require('readabilitySAX'); var _url = require('url'); function fetchFeed(url, cb) { console.log('[.] Fetching feed: ' + url); feedRead(url, function(err, articles) { if (err) { console.error('[x] Unable to fetch feed: ' + url, err...
var feedRead = require('feed-read'); var readabilitySax = require('readabilitySAX'); var _url = require('url'); function fetchFeed(url, cb) { console.log('[.] Fetching feed: ' + url); feedRead(url, function(err, articles) { if (err) { console.error('[x] Unable to fetch feed: ' + url, err...
Fix error propagation on feed fetching.
Fix error propagation on feed fetching.
JavaScript
mit
cliffano/feedpaper,cliffano/feedpaper,cliffano/feedpaper
00802027b63b94cf196f7bb1b4e54c463a0e551f
lib/heights.js
lib/heights.js
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-heights/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-heights/tachyons-heights.min.css', 'utf8') var moduleObj = ...
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-heights/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-heights/tachyons-heights.min.css', 'utf8') var moduleObj = ...
Update with reference to global nav partial
Update with reference to global nav partial
JavaScript
mit
topherauyeung/portfolio,pietgeursen/pietgeursen.github.io,matyikriszta/moonlit-landing-page,topherauyeung/portfolio,fenderdigital/css-utilities,cwonrails/tachyons,fenderdigital/css-utilities,tachyons-css/tachyons,getfrank/tachyons,topherauyeung/portfolio
a9267b8ff1039700abe7bb0aed88de8d5bbdd44d
src/test/ed/lang/python/date1_test.js
src/test/ed/lang/python/date1_test.js
/** * Copyright (C) 2008 10gen Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, *...
/** * Copyright (C) 2008 10gen Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, *...
Make sure time zone doesn't change too much.
Make sure time zone doesn't change too much.
JavaScript
apache-2.0
babble/babble,babble/babble,babble/babble,babble/babble,babble/babble,babble/babble
036d0100f56f90d4a0d83d360ff8455006055aa2
create/javascript/inject.js
create/javascript/inject.js
var createEditor; var author; function injectCreate(id) { $("#" + id).load("create/html/createHTML", function() { injectCreateEditor(); // Generate a random number from 1 to 10000 author = Math.floor((Math.random() * 10000) + 1); }); } function injectCreateEditor() { Range...
var createEditor; var author; function injectCreate(id) { $("#" + id).load("create/html/createHTML", function() { injectCreateEditor(); // Check to see if we already have an author ID if (localStorage.getItem('author')) { // Reuse the same author ID author = localStorage.getItem('tod...
Store the author id in the local storage
Store the author id in the local storage
JavaScript
bsd-3-clause
ClemsonRSRG/bydesign,ClemsonRSRG/beginToReason,ClemsonRSRG/beginToReason,ClemsonRSRG/bydesign,ClemsonRSRG/beginToReason
8554ba7671c41302ef47c0cfa4d1ed18b9c5f9f0
tests/spec/SpecHelper.js
tests/spec/SpecHelper.js
var pager; var items = 100; var itemsOnPage = 10; var pageCount = items/itemsOnPage; beforeEach(function() { $('<div id="pager"></div>').appendTo('body').pagination({ items: items, itemsOnPage: itemsOnPage }); pager = $('#pager'); this.addMatchers({ toBePaged: function() { ...
var pager; var items = 100; var itemsOnPage = 10; var pageCount = items/itemsOnPage; beforeEach(function() { $('<div id="pager" class="pager"></div>').appendTo('body').pagination({ items: items, itemsOnPage: itemsOnPage }); pager = $('#pager'); this.addMatchers({ toBePaged: f...
Remove all .pager instances after each test
Remove all .pager instances after each test
JavaScript
mit
jochouen/simplePagination.js,mapgears/simplePagination.js,mapgears/simplePagination.js,drafter911/simplePagination.js,jochouen/simplePagination.js,drafter911/simplePagination.js,flaviusmatis/simplePagination.js,flaviusmatis/simplePagination.js
75c605206b2de49eaee95eeb345c14edc33bae4c
eMission/www/listview-js/app.js
eMission/www/listview-js/app.js
// Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' // 'starter.controllers' is found in controllers.js ang...
// Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' // 'starter.controllers' is found in controllers.js ang...
Comment out the second read to the database for debug purposes
Comment out the second read to the database for debug purposes I retain it just in case weird stuff happens to the database again, but we certainly don't need to read it again.
JavaScript
bsd-3-clause
e-mission/e-mission-phone-cordova-plugins,shankari/e-mission-phone-cordova-plugins,e-mission/e-mission-phone-cordova-plugins,shankari/e-mission-phone-cordova-plugins,e-mission/e-mission-phone-cordova-plugins
6db19163c19a629edacdc90e066821c7db32cacf
modules/telegram/telegramTypes.js
modules/telegram/telegramTypes.js
'use strict' var tgTypes = {}; tgTypes.InlineKeyboardMarkup = function (rowWidth) { this['inline_keyboard'] = [[]]; var rowWidth = (rowWidth > 8 ? 8 : rowWidth) || 8; //Currently maximum supported in one row //Closure to make this property private this._rowWidth = function () { return rowWidt...
'use strict' var tgTypes = {}; tgTypes.InlineKeyboardMarkup = function (rowWidth) { this['inline_keyboard'] = [[]]; var rowWidth = (rowWidth > 8 ? 8 : rowWidth) || 8; //Currently maximum supported in one row //Closure to make this property private this._rowWidth = function () { return rowWidt...
Fix logic error in inlineKeyboard
Fix logic error in inlineKeyboard
JavaScript
mit
TheBeastOfCaerbannog/last-fm-bot
72cf0eef7e9600c806ae22325bb545938fbda4c7
test-projects/multi-embed-test-project/gulpfile.babel.js
test-projects/multi-embed-test-project/gulpfile.babel.js
var gulp = require('gulp'); var embedDefs = [ { componentPath: 'src/js/components/hello-world.jsx', webPath: 'hello-world/' }, { componentPath: 'src/js/components/hello-world-two.jsx', webPath: 'hello-world-two' } ]; var opts = { embedDefs: embedDefs, paths: ['node_modules/lucify-commons'...
var gulp = require('gulp'); var embedDefs = [ { componentPath: 'src/js/components/hello-world.jsx', path: '/hello-world' }, { componentPath: 'src/js/components/hello-world-two.jsx', path: '/hello-world-two' } ]; var opts = { embedDefs: embedDefs, paths: ['node_modules/lucify-commons', 'te...
Modify embedDefs path attribute naming
Modify embedDefs path attribute naming
JavaScript
mit
lucified/lucify-component-builder,lucified/lucify-component-builder,lucified/lucify-component-builder
50314c21bf0fe1a4fa7aa3349b3d952af2540a25
chrome/test/data/extensions/samples/subscribe/feed_finder.js
chrome/test/data/extensions/samples/subscribe/feed_finder.js
find(); window.addEventListener("focus", find); function find() { if (window == top) { // Find all the RSS link elements. var result = document.evaluate( '//link[@rel="alternate"][contains(@type, "rss") or ' + 'contains(@type, "atom") or contains(@type, "rdf")]', document, nu...
find(); window.addEventListener("focus", find); function find() { if (window == top) { // Find all the RSS link elements. var result = document.evaluate( '//link[@rel="alternate"][contains(@type, "rss") or ' + 'contains(@type, "atom") or contains(@type, "rdf")]', document, nu...
Fix an occurence of 'chromium' that didn't get changed to 'chrome'
Fix an occurence of 'chromium' that didn't get changed to 'chrome' Review URL: http://codereview.chromium.org/115049 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@15486 0039d316-1c4b-4281-b951-d872f2087c98
JavaScript
bsd-3-clause
ropik/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-li...
28de90037a64dcb7ff9bdfb32557090c49c53e3c
website/static/js/pages/resetpassword-page.js
website/static/js/pages/resetpassword-page.js
/** * Reset Password page */ 'use strict'; var $ = require('jquery'); var SetPassword = require('js/setPassword'); var verificationKey = window.contextVars.verification_key; var resetUrl = '/api/v1/resetpassword/' + verificationKey + '/'; var redirectrUrl = '/login/'; $(document).ready(function() { new SetPass...
/** * Reset Password page */ 'use strict'; var $ = require('jquery'); var SetPassword = require('js/setPassword'); var verificationKey = window.contextVars.verification_key; var resetUrl = '/resetpassword/' + verificationKey + '/'; $(document).ready(function() { new SetPassword('#resetPasswordForm', 'reset', r...
Update post URL and viewModel params
Update post URL and viewModel params
JavaScript
apache-2.0
cwisecarver/osf.io,acshi/osf.io,Johnetordoff/osf.io,rdhyee/osf.io,aaxelb/osf.io,TomBaxter/osf.io,HalcyonChimera/osf.io,cwisecarver/osf.io,cslzchen/osf.io,felliott/osf.io,mfraezz/osf.io,aaxelb/osf.io,emetsger/osf.io,crcresearch/osf.io,brianjgeiger/osf.io,Nesiehr/osf.io,DanielSBrown/osf.io,CenterForOpenScience/osf.io,slo...
5d850a80e5d335d57bc321e827aade916c0b7f66
js/custom/pet-search.js
js/custom/pet-search.js
$(function(){ var $form = $('#pet-search-form'), $container = $('.homepage-box-list'); $form.on('submit', function(e) { e.preventDefault(); var action = $(this).attr('action'), params = $(this).serialize(); $.get(action, params).then(function(output){ $container.fadeOut('fast', function(){ $(t...
$(function(){ var $form = $('#pet-search-form'), $inputs = $form.find(':input'), $container = $('.homepage-box-list'); $form.on('submit', function(e) { e.preventDefault(); var action = $(this).attr('action'), params = $(this).serialize(); $inputs.attr('disabled', true); $.get(action, params).th...
Disable search form while loading
Disable search form while loading
JavaScript
mit
aviaron/touzik,aviaron/touzik
bebb1b0f8e2a26b4026baa1a697aef709d6231d8
app/feeds/new/index/route.js
app/feeds/new/index/route.js
import Ember from 'ember'; export default Ember.Route.extend({ beforeModel: function(){ this.store.unloadAll(); }, createFeedFromGtfsService: Ember.inject.service('create-feed-from-gtfs'), model: function() { this.get('createFeedFromGtfsService').createFeedModel(); return this.get('createFeedFromGtfsService...
import Ember from 'ember'; export default Ember.Route.extend({ beforeModel: function(){ // this.store.unloadAll(); }, createFeedFromGtfsService: Ember.inject.service('create-feed-from-gtfs'), model: function() { console.log('feeds.new.index model'); var oldModel = this.get('createFeedFromGtfsService...
Copy over errors from bad response
Copy over errors from bad response
JavaScript
mit
transitland/feed-registry,transitland/feed-registry
370676fbefb12fc56280f6e19d9a747802df7feb
app/scripts/contentscript.js
app/scripts/contentscript.js
'use strict'; (function($){ $('#js-discussion-header').text('foo bar'); })(jQuery);
'use strict'; (function($){ var $container = $('#js-repo-pjax-container'); var issueTitle = $container.find('#js-discussion-header .js-issue-title').text(); if (/(\[wip\]|\[do\s*not\s*merge\])/i.test(issueTitle)) { var $buttonMerge = $container.find('#js-pull-merging button.merge-branch-action.js-details-tar...
Add You can't merge! logic
Add You can't merge! logic
JavaScript
mit
togusafish/sanemat-_-do-not-merge-wip-for-github,sanemat/do-not-merge-wip-for-github,togusafish/sanemat-_-do-not-merge-wip-for-github,sanemat/do-not-merge-wip-for-github,Fryguy/do-not-merge-wip-for-github,togusafish/sanemat-_-do-not-merge-wip-for-github,Fryguy/do-not-merge-wip-for-github,sanemat/do-not-merge-wip-for-gi...
68a8107c4b61aa68b0c8cf75396a780a1598c232
app/scripts/scenes/loader.js
app/scripts/scenes/loader.js
import files from '@/constants/assets'; import fontConfig from '@/constants/bitmap-fonts'; export default class Loader extends Phaser.Scene { /** * Takes care of loading the main game assets. * * @extends Phaser.Scene */ constructor() { super({key: 'Loader', files}); } /** * Called when ...
import files from '@/constants/assets'; import fontConfig from '@/constants/bitmap-fonts'; export default class Loader extends Phaser.Scene { /** * Takes care of loading the main game assets. * * @extends Phaser.Scene */ constructor() { super({key: 'Loader', pack: {files}}); } /** * Call...
Load files using the new `pack` scene configuration.
Load files using the new `pack` scene configuration.
JavaScript
mit
rblopes/phaser-3-snake-game,rblopes/phaser-3-snake-game
3a438493f2a36ceba3edb25eacfeea13da3db2fc
app/components/settings/area-detail/styles.js
app/components/settings/area-detail/styles.js
import Theme from 'config/theme'; import { StyleSheet } from 'react-native'; export default StyleSheet.create({ container: { flex: 1, backgroundColor: Theme.background.main, paddingTop: 10 }, containerContent: { paddingBottom: 20 }, content: { paddingTop: 0, paddingBottom: 30 }, b...
import Theme from 'config/theme'; import { StyleSheet } from 'react-native'; export default StyleSheet.create({ container: { flex: 1, backgroundColor: Theme.background.main, paddingTop: 10 }, containerContent: { paddingBottom: 20 }, content: { paddingTop: 0, paddingBottom: 30 }, b...
Align images to center for bigger screens
Align images to center for bigger screens
JavaScript
mit
Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher
aa34d647542b6a7a4e4f4d15f32776cb7f975eb1
lib/laravel/download.js
lib/laravel/download.js
(function(exports) { "use strict"; var request = require('request'); var Sink = require('pipette').Sink; var unzipper = require('../process-zip'); var fs = require('fs'); exports.downloadLaravel = function(grunt, init, done) { unzipper.processZip(request('https://github.com/laravel/laravel/archive/mast...
(function(exports) { "use strict"; var request = require('request'); var Sink = require('pipette').Sink; var unzipper = require('../process-zip'); var fs = require('fs'); exports.downloadLaravel = function(grunt, init, done) { unzipper.processZip(request('https://github.com/laravel/laravel/archive/mast...
Update Laravel .htaccess to fix redirect loop on DirectoryIndex pages such as /tests/
Update Laravel .htaccess to fix redirect loop on DirectoryIndex pages such as /tests/
JavaScript
mit
TheMonkeys/monkeybones,TheMonkeys/monkeybones,TheMonkeys/monkeybones
0bf372d7da96953f07f0bcd1db3ff86f7c68612d
app/actions/session.js
app/actions/session.js
import axios from 'axios' import { API } from '../constants' export const LOGIN = 'LOGIN' export const LOGIN_SUCCESS = 'LOGIN_SUCCESS' export const LOGIN_FAILURE = 'LOGIN_FAILURE' export const login = () => async (dispatch, state) => { dispatch({ type: LOGIN }) try { const response = await axios.post(`http://loca...
import axios from 'axios' import { API } from '../constants' export const LOGIN = 'LOGIN' export const LOGIN_SUCCESS = 'LOGIN_SUCCESS' export const LOGIN_FAILURE = 'LOGIN_FAILURE' export const login = creds => async dispatch => { dispatch({ type: LOGIN }) try { const response = await axios.post(`http://localhost:...
Refactor for redux-form data and better error checking
Refactor for redux-form data and better error checking
JavaScript
mit
danielzy95/oaa-chat,danielzy95/oaa-chat
333a26104f1d0bb6e8b756d57c1e0be496b95fe2
lib/util/apiResponse.js
lib/util/apiResponse.js
'use strict'; function ApiResponse () { }; ApiResponse.error = function (err) { var result = {}; result = { ok: false }; if (err instanceof Error) { result.error = err.toString(); } else { result.error = err; } return result; }; ApiResponse.success = function (data) { var result = data...
'use strict'; function ApiResponse () { }; ApiResponse.error = function (err, info = {}) { var result = { ok: false, info }; if (err instanceof Error) { result.error = err.toString(); } else { result.error = err; } return result; }; ApiResponse.success = function (data) { var result =...
Change a method to receiving additional information
Change a method to receiving additional information
JavaScript
mit
crowi/crowi,crowi/crowi,crowi/crowi
9ab1175c02d935e38a6a3a411b40b31cf5bc9f19
scripts/global.webpack.js
scripts/global.webpack.js
var $ = require('npm-zepto'); var Cookies = require('js-cookie'); $(function () { var cookiesElement = $('#cookies'); if (Cookies.get('cookies_closed')) { cookiesElement.hide(); } else { var marginElement = cookiesElement.prev(); var closeButton = $('<button class="btn">Close</button>').on('click', f...
var $ = require('npm-zepto'); var Cookies = require('js-cookie'); $(function () { var cookiesElement = $('#cookies'); if (Cookies.get('cookies_closed')) { cookiesElement.hide(); } else { var marginElement = cookiesElement.prev(); var closeButton = $('<button class="btn">Close</button>').on('click', f...
Set cookies to expire in ten years
Set cookies to expire in ten years
JavaScript
mit
megoth/icanhasweb,megoth/icanhasweb
4098c1bda28e2fb4e22b8ce3e14a391c46f8eafb
server/game/cards/07-WotW/IuchiDaiyu.js
server/game/cards/07-WotW/IuchiDaiyu.js
const DrawCard = require('../../drawcard.js'); class IuchiDaiyu extends DrawCard { setupCardAbilities(ability) { this.action({ title: '+1 military for each faceup province', condition: () => this.game.isDuringConflict(), target: { gameAction: ability.acti...
const DrawCard = require('../../drawcard.js'); const AbilityDsl = require('../../abilitydsl'); class IuchiDaiyu extends DrawCard { setupCardAbilities() { this.action({ title: '+1 military for each faceup province', condition: () => this.game.isDuringConflict(), target: {...
Update Iuchi Daiyu to use AbilityDsl
Update Iuchi Daiyu to use AbilityDsl
JavaScript
mit
jeremylarner/ringteki,jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,gryffon/ringteki
f091824ece25a6384951e215065fa7e2de5c8e97
src/store/create-api-server.js
src/store/create-api-server.js
import Firebase from 'firebase' import LRU from 'lru-cache' let api if (process.__API__) { api = process.__API__ } else { api = process.__API__ = new Firebase('https://hacker-news.firebaseio.com/v0') // fetched item cache api.cachedItems = LRU({ max: 1000, maxAge: 1000 * 60 * 15 // 15 min cache }) ...
import Firebase from 'firebase' import LRU from 'lru-cache' let api const config = { databaseURL: 'https://hacker-news.firebaseio.com' } const version = '/v0' if (process.__API__) { api = process.__API__ } else { Firebase.initializeApp(config) api = process.__API__ = Firebase.database().ref(version) // fet...
Update server to latest Firebase
Update server to latest Firebase
JavaScript
mit
IRlyDontKnow/sylius-shop,keisei77/vue-hackernews-2.0,IRlyDontKnow/sylius-shop,valentinvieriu/visual-hacker-news,Ryan-PEK/tbz-mock,Ryan-PEK/tbz-mock,keisei77/vue-hackernews-2.0,valentinvieriu/visual-hacker-news
babeb444b2d2bff649d9100ffef3de89d6ca7247
reconfigure/coordinator.js
reconfigure/coordinator.js
function Coordinator (consensus) { this._listeners = [] this._consensus = consensus } Coordinator.prototype.listen = function (url, callback) { // <- listen, POST, -> get them started if (this._listeners.indexOf(url) < 0) { this._listeners.push(url) this._consensus.addListener(url, function...
function Coordinator (consensus) { this._consensus = consensus } Coordinator.prototype.listen = function (url, callback) { // <- listen, POST, -> get them started this._consensus.addListener(url, function (error, act) { if (!act) { callback(null, false) } else { callback...
Remove local index of listeners.
Remove local index of listeners.
JavaScript
mit
demarius/reconfigure,bigeasy/reconfigure,bigeasy/reconfigure,demarius/reconfigure
8ef11ed11f09b9f4ce7d53234fdb6100c7fe8451
test/fixtures/index.js
test/fixtures/index.js
module.exports = function() { return []; };
var sample_xform = require('./sample_xform'); module.exports = function() { return [ { request: { method: "GET", url: "http://www.example.org/xform00", params: {}, }, response: { code: "200", ...
Add fixture for getting an xform from an external server
Add fixture for getting an xform from an external server
JavaScript
bsd-3-clause
praekelt/go-jsbox-xform,praekelt/go-jsbox-xform
0ff9feb094a91e29fb2aacc6655ac5d1cb83cc94
test/helpers/get-tmp-dir.js
test/helpers/get-tmp-dir.js
/* * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, O...
/* * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, O...
Remove a tmp directory unless told not to
Remove a tmp directory unless told not to
JavaScript
artistic-2.0
nearform/nscale-kernel,nearform/nscale-kernel
57fe26161d7af3f85d6bf3a009d8a915cdae6690
tools/tests/apps/once/once.js
tools/tests/apps/once/once.js
process.stdout.write("once test\n"); if (process.env.RUN_ONCE_OUTCOME === "exit") process.exit(123); if (process.env.RUN_ONCE_OUTCOME === "kill") { process.kill(process.pid, 'SIGKILL'); } if (process.env.RUN_ONCE_OUTCOME === "hang") { // The outstanding timeout will prevent node from exiting setTimeout(funct...
process.stdout.write("once test\n"); if (process.env.RUN_ONCE_OUTCOME === "exit") process.exit(123); if (process.env.RUN_ONCE_OUTCOME === "kill") { process.kill(process.pid, 'SIGKILL'); } if (process.env.RUN_ONCE_OUTCOME === "hang") { // The outstanding timeout will prevent node from exiting setTimeout(funct...
Use Meteor.setTimeout to re-run tryInsert function.
Use Meteor.setTimeout to re-run tryInsert function.
JavaScript
mit
Hansoft/meteor,mjmasn/meteor,mjmasn/meteor,mjmasn/meteor,Hansoft/meteor,Hansoft/meteor,mjmasn/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,mjmasn/meteor,Hansoft/meteor,mjmasn/meteor,mjmasn/meteor
c765aab5a03cdf25bdc6ce5043aa0d8748695fc6
src/authentication/authenticator/get.js
src/authentication/authenticator/get.js
/** * This file is reserved for future development * * Not ready for use */ 'use strict'; /** * Module dependencies. */ import { Router } from 'express'; import { clone } from 'lodash'; module.exports = class CoreGETAuthenticator { /** * Do not override the constructor * * @param {string} name *...
/** * This file is reserved for future development * * Not ready for use */ 'use strict'; /** * Module dependencies. */ import { Router } from 'express'; import { clone } from 'lodash'; module.exports = class CoreGETAuthenticator { /** * Do not override the constructor * * @param {string} name *...
Use proper method name in `CoreGETAuthenticator`
Use proper method name in `CoreGETAuthenticator`
JavaScript
mit
HiFaraz/identity-desk
0c76938a634617427c715b9f36a0a14e58576b1a
src/client/components/TabNav/reducer.js
src/client/components/TabNav/reducer.js
import { TAB_NAV__SELECT } from '../../actions' export default (state = {}, { type, ...action }) => type === 'TAB_NAV__SELECT' ? action : state
import { TAB_NAV__SELECT } from '../../actions' export default (state = {}, { type, ...action }) => type === TAB_NAV__SELECT ? action : state
Fix the string literal action type
Fix the string literal action type
JavaScript
mit
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
6a5a2cb92b9c2614fd9df1e79657fa4c1191a094
server/boot/mercadopago.js
server/boot/mercadopago.js
'use strict'; var MP = require('mercadopago'); module.exports = function(app) { app.mp = new MP(process.env.MP_ID, process.env.MP_SECRET); if(process.env.MP_SANDBOX) { app.mp.sandboxMode(true); } var at = app.mp.getAccessToken() .then(function(accessToken) { app.mp.accessToken = accessToken; ...
'use strict'; var MP = require('mercadopago'); module.exports = function(app) { app.mp = new MP(process.env.MP_ID, process.env.MP_SECRET); if(process.env.MP_SANDBOX) { app.mp.sandboxMode(true); } var at = app.mp.getAccessToken() .then(function(accessToken) { app.mp.accessToken = accessToken; ...
Add sandbox route for payment testing
Add sandbox route for payment testing
JavaScript
mit
rtroncoso/node-payments,rtroncoso/node-payments
a5a03944ab4454aa3fac8acdf8d10e2a0ad2db3e
src/modules/Datasets/components/LinksSection/LinksSection.js
src/modules/Datasets/components/LinksSection/LinksSection.js
import React from 'react' import { linkList } from './LinksSection.css' const LinksSection = ({links, style}) => { return ( <div> <h3>Liens</h3> {links.length ? ( <ul className={linkList}> {links.map( (link, idx) => <li key={idx}><a style={style} href={link.href}>{link.name}</a></li...
import React from 'react' import { linkList } from './LinksSection.css' const LinksSection = ({links, style}) => { // Some links have no name, use href as fallback const getName = (link) => link.name ? link.name : link.href; return ( <div> <h3>Liens</h3> {links.length ? ( <ul className={...
Use href if there is no name
Use href if there is no name
JavaScript
mit
sgmap/inspire,sgmap/inspire
7c023921755c3781dffecea0fcb886580271d5be
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 toolSearch keyup textacular functionality to app.js. Require jquery star rating to app.js
Add toolSearch keyup textacular functionality to app.js. Require jquery star rating to app.js
JavaScript
mit
epicoding/epicoding,epicoding/epicoding,dunphyben/epicoding,dunphyben/epicoding
c659dbeda8895bcf852b4870b34d5bee444e5e40
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically // be included in the compiled file accessible from http://example.com/assets/application.js // It's not advisable to add code directl...
// This is a manifest file that'll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically // be included in the compiled file accessible from http://example.com/assets/application.js // It's not advisable to add code directl...
Add all JavaScript dependencies from govuk_publishing_components
Add all JavaScript dependencies from govuk_publishing_components
JavaScript
mit
alphagov/whitehall,alphagov/whitehall,alphagov/whitehall,alphagov/whitehall
02e3bbf6941d7f39755c7ed9780074d6ec30fda1
app/assets/javascripts/outpost/outpost.js
app/assets/javascripts/outpost/outpost.js
//= require jquery //= require underscore //= require backbone //= require moment //= require jquery_ujs //= require spin //= require jquery-ui-1.10.0.custom.min //= require date.min //= require select2 //= require bootstrap-transition //= require bootstrap-dropdown //= require bootstrap-modal //= require bootstrap-t...
//= require jquery //= require underscore //= require backbone //= require moment //= require jquery_ujs //= require spin //= require jquery-ui-1.10.0.custom.min //= require date.min //= require select2 //= require bootstrap-transition //= require bootstrap-dropdown //= require bootstrap-modal //= require bootstrap-t...
Add preview to default JS
Add preview to default JS
JavaScript
mit
SCPR/outpost,Ravenstine/outpost,SCPR/outpost,SCPR/outpost,bricker/outpost,Ravenstine/outpost,Ravenstine/outpost,bricker/outpost
49d5a5e1cceea7e7e76a8d2968cc1922cbdc1b84
client/network/server-url.js
client/network/server-url.js
const baseUrl = process.env.SB_SERVER ? process.env.SB_SERVER : process.webpackEnv.SB_SERVER // Returns an absolute server URL for a path, if necessary (if running in Electron). If it's not // necessary (in the browser), the path will be returned unmodified export function makeServerUrl(path) { if (!IS_ELECTRON) { ...
const baseUrl = process?.env?.SB_SERVER ? process.env.SB_SERVER : process.webpackEnv.SB_SERVER // Returns an absolute server URL for a path, if necessary (if running in Electron). If it's not // necessary (in the browser), the path will be returned unmodified export function makeServerUrl(path) { if (!IS_ELECTRON) {...
Use process.env more safely with Webpack 5.
Use process.env more safely with Webpack 5.
JavaScript
mit
ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery
8ae19d5a47aecdfed43a6cb90f4c2a00f81ff401
app/assets/javascripts/filter/cite.js
app/assets/javascripts/filter/cite.js
module.filter('cite', [ 'pageService', function (page) { return function (volume) { if (!angular.isObject(volume) || angular.isUndefined(volume.access) || angular.isUndefined(volume.name) || angular.isUndefined(volume.id)) { return ''; } var names = []; angular.forEach(volume.access, function (acce...
module.filter('cite', [ 'pageService', function (page) { return function (volume) { if (!angular.isObject(volume) || angular.isUndefined(volume.access) || angular.isUndefined(volume.name) || angular.isUndefined(volume.id)) { return ''; } var names = []; angular.forEach(volume.access, function (acce...
Fix authors in databrary citation
Fix authors in databrary citation
JavaScript
agpl-3.0
databrary/databrary,databrary/databrary,databrary/databrary,databrary/databrary
2cdf5a49e4f9716c8f2ced2d6a2d01a53392cb0d
app/routes/meetings/MeetingCreateRoute.js
app/routes/meetings/MeetingCreateRoute.js
// @flow import { compose } from 'redux'; import { connect } from 'react-redux'; import { push } from 'connected-react-router'; import MeetingEditor from './components/MeetingEditor'; import { createMeeting, inviteUsersAndGroups, } from 'app/actions/MeetingActions'; import moment from 'moment-timezone'; import { Lo...
// @flow import { compose } from 'redux'; import { connect } from 'react-redux'; import { push } from 'connected-react-router'; import MeetingEditor from './components/MeetingEditor'; import { createMeeting, inviteUsersAndGroups, } from 'app/actions/MeetingActions'; import moment from 'moment-timezone'; import { Lo...
Use correct timezone for meeting initial values
Use correct timezone for meeting initial values
JavaScript
mit
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
30d78335dd4c62cb8841e790a570330c65d7a9ec
MAB.DotIgnore/gulpfile.js
MAB.DotIgnore/gulpfile.js
/// <binding AfterBuild='nuget-pack' /> "use strict"; var gulp = require('gulp'), path = require('path'), exec = require('child_process').exec, fs = require('fs'); var solutionFolder = path.resolve(__dirname, '..'); var projectFolder = path.join(solutionFolder, 'MAB.DotIgnore'); var distFolder = path.joi...
/// <binding AfterBuild='nuget-pack' /> "use strict"; var gulp = require('gulp'), path = require('path'), exec = require('child_process').exec, fs = require('fs'); var solutionFolder = path.resolve(__dirname, '..'); var projectFolder = path.join(solutionFolder, 'MAB.DotIgnore'); var distFolder = path.joi...
Add clean task to gulp config
Add clean task to gulp config
JavaScript
mit
markashleybell/MAB.DotIgnore,markashleybell/MAB.DotIgnore
c1115f64d64726a1d3e0e96d24166c53b2425a85
js/data_structures.js
js/data_structures.js
var colors = ["red", "blue", "magenta", "yellow"] var names = ["Dan", "Dave", "Eleanor", "Rupert"] colors.push("green") names.push("Nathaniel") happyHorses = {} for (i = 0; i < names.length; i++) { happyHorses[names[i]] = colors[i] } console.log(happyHorses)
var colors = ["red", "blue", "magenta", "yellow"] var names = ["Dan", "Dave", "Eleanor", "Rupert"] colors.push("green") names.push("Nathaniel") happyHorses = {} for (i = 0; i < names.length; i++) { happyHorses[names[i]] = colors[i] } console.log(happyHorses) // ———————————————————————————————————————————————————...
Add constructor function for Cars
Add constructor function for Cars
JavaScript
mit
elliedori/phase-0-tracks,elliedori/phase-0-tracks,elliedori/phase-0-tracks