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
001259b0263e6b2534b0efdc9a3b6936965bf9b8
config/nconf.js
config/nconf.js
var nconf = require('nconf'); nconf .env() .file({ file: './gateway.json' }); nconf.defaults({ 'RIPPLE_REST_API': 'http://localhost:5990', 'DATABASE_URL': 'postgres://username:password@localhost/ripple_gateway' }); module.exports = nconf;
var nconf = require('nconf'); nconf .env() .file({ file: './config/config.json' }); nconf.defaults({ 'RIPPLE_REST_API': 'http://localhost:5990', 'DATABASE_URL': 'postgres://username:password@localhost/ripple_gateway' }); module.exports = nconf;
Move config file from gateway to config/config
[FEATURE] Move config file from gateway to config/config
JavaScript
isc
whotooktwarden/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd,zealord/gatewayd,xdv/gatewayd
b9ef8725552b57061865e73ca54b901bdf773465
app/js/app.js
app/js/app.js
//onReady $(function() { //temporary testing functionality $('#refreshBtn').on('click', function() { updateStreams(); }); }); function updateStreams() { // Clear out the stale data $('#mainContainer').html(""); // And fetch the fresh var streamList = $('#streamList').val().split('\n'); for (var i ...
//onReady $(function() { //temporary testing functionality $('#refreshBtn').on('click', function() { updateStreams(); }); }); function updateStreams() { // Clear out the stale data $('#mainContainer').html(""); // And fetch the fresh var streamList = $('#streamList').val().split('\n'); for (var i ...
Refactor displayStream. Add background-image and onClick
Refactor displayStream. Add background-image and onClick
JavaScript
mit
xipxoom/fcc-twitch_status,xipxoom/fcc-twitch_status
bf80fe88a9966d70d94bd567f60805be396fb375
examples/app/main.js
examples/app/main.js
/** * Created by leojin on 3/20/16. */ import ReactDom from 'react-dom'; import React from 'react'; import App from './App'; ReactDom.render(<App/>, document.getElementById("examples"));
/** * Created by leojin on 3/20/16. */ import ReactDom from 'react-dom'; import React from 'react'; import App from './app'; ReactDom.render(<App/>, document.getElementById("examples"));
Fix file name case on example import
Fix file name case on example import
JavaScript
mit
dougcalobrisi/react-jointjs
00211245eafbd799b7feda2076d6a84a981e41ad
index.js
index.js
'use strict'; var assign = require('object-assign'); var Filter = require('broccoli-filter'); var Rework = require('rework'); /** * Initialize `ReworkFilter` with options * * @param {Object} inputTree * @param {Object} opts * @api public */ function ReworkFilter(inputTree, opts) { if (!(this instanceof Rew...
'use strict'; var assign = require('object-assign'); var Filter = require('broccoli-filter'); var Rework = require('rework'); /** * Initialize `ReworkFilter` with options * * @param {Object} inputTree * @param {Object} opts * @api public */ function ReworkFilter(inputTree, opts) { if (!(this instanceof Rew...
Set rework `source` from `relativePath`
Set rework `source` from `relativePath` This will enable sourcemaps generated from rework to refer to the source by its name, versus the generic `source.css`.
JavaScript
mit
kevva/broccoli-rework
828aba16dfb4273329392c369bf637897b80ec87
index.js
index.js
'use strict' var document = require('global/document') var Loop = require('main-loop') var virtualDom = require('virtual-dom') var assert = require('assert') var partial = require('ap').partial var Delegator = require('dom-delegator') // Instantiate a DOM delegator once, since it caches itself Delegator() exports.cr...
'use strict' var document = require('global/document') var Loop = require('main-loop') var virtualDom = require('virtual-dom') var assert = require('assert') var partial = require('ap').partial var Delegator = require('dom-delegator') // Instantiate a DOM delegator once, since it caches itself Delegator() exports.cr...
Set component div to 100% height
Set component div to 100% height
JavaScript
mit
bendrucker/thermometer
db8e102e618ef8b49a4887523da6563146a3ea91
index.js
index.js
export class DecoratorUtils { static declarationType = [ "CLASS", "CLASS_METHOD", "CLASS_ACCESSOR", "OBJECT_LITERAL_METHOD", "OBJECT_LITERAL_ACCESSOR" ].reduce((obj, name) => { return Object.defineProperty(obj, name, { value: Symbol(name) }); }, {}) static getDeclarationType(args) { ...
export class DecoratorUtils { static declarationType = [ "CLASS", "CLASS_METHOD", "CLASS_ACCESSOR", "OBJECT_LITERAL_METHOD", "OBJECT_LITERAL_ACCESSOR" ].reduce((obj, name) => { return Object.defineProperty(obj, name, { value: Symbol(name) }); }, {}) static getDeclarationType(args) { ...
Throw an error for invalid declaration types
Throw an error for invalid declaration types
JavaScript
mit
lukehorvat/decorator-utils
5c4f313e3aff67e71dca344ef46a7cb25851b525
jujugui/static/gui/src/app/components/dropdown-menu/test-dropdown-menu.js
jujugui/static/gui/src/app/components/dropdown-menu/test-dropdown-menu.js
/* Copyright (C) 2017 Canonical Ltd. */ 'use strict'; const React = require('react'); const DropdownMenu = require('./dropdown-menu'); const Panel = require('../panel/panel'); const jsTestUtils = require('../../utils/component-test-utils'); describe('Dropdown Menu', function() { function renderComponent(options...
/* Copyright (C) 2017 Canonical Ltd. */ 'use strict'; const React = require('react'); const enzyme = require('enzyme'); const DropdownMenu = require('./dropdown-menu'); describe('Dropdown Menu', function() { const renderComponent = (options = {}) => enzyme.shallow( <DropdownMenu.WrappedComponent handle...
Update dropdown menu tests to use enzyme.
Update dropdown menu tests to use enzyme.
JavaScript
agpl-3.0
mitechie/juju-gui,mitechie/juju-gui,mitechie/juju-gui,mitechie/juju-gui
02601074d529577222d594a01be4d82fc936622b
lib/client.js
lib/client.js
var needle = require('needle'); function Client(base_url, token) { this.base_url = base_url this.token = token || {} } Client.prototype.get = function (path, body, callback) { this.__send('get', path, body, callback); } Client.prototype.post = function (path, body, callback) { this.__send('post', path, body, ...
var needle = require('needle'); function Client(base_url, token) { this.base_url = base_url this.token = token || null } Client.prototype.get = function (path, body, callback) { this.__send('get', path, body, callback); } Client.prototype.post = function (path, body, callback) { this.__send('post', path, body...
Use null instead of empty object as {} != false but null == false
Use null instead of empty object as {} != false but null == false
JavaScript
mit
tresni/node-networkedhelpdesk
afe60f1030ac7cdff1e0acca3229f9b1ba19fc00
Kinect2Scratch.js
Kinect2Scratch.js
(function(ext) { // Cleanup function when the extension is unloaded ext._shutdown = function() {}; // Status reporting code // Use this to report missing hardware, plugin or unsupported browser ext._getStatus = function() { // Check for the various File API support. if (window....
(function(ext) { // Cleanup function when the extension is unloaded ext._shutdown = function() {}; // Status reporting code // Use this to report missing hardware, plugin or unsupported browser ext._getStatus = function() { // Check for the various File API support. if (window....
Put statuses back to correct, adjust unsupported status
Put statuses back to correct, adjust unsupported status
JavaScript
bsd-3-clause
visor841/SkelScratch,Calvin-CS/SkelScratch
c826899a6c86e1ac96505965ca7ae7a8781328d6
js/TimeFilter.js
js/TimeFilter.js
(function(app){ "use strict" /** * Creates a filter to convert a time in milliseconds to * an hours:minutes:seconds format. * * e.g. * {{60000 | millisecondsToTime}} // 01:00 * {{3600000 | millisecondsToTime}} // 01:00:00 */ app.filter("millisecondsToTime", MillisecondsToTime); function...
(function(app){ "use strict" /** * Creates a filter to convert a time in milliseconds to * an hours:minutes:seconds format. * * e.g. * {{60000 | millisecondsToTime}} // 01:00 * {{3600000 | millisecondsToTime}} // 01:00:00 */ app.filter("millisecondsToTime", MillisecondsToTime); function...
Add security on time filter to be sure this is an integer and not a float
Add security on time filter to be sure this is an integer and not a float
JavaScript
agpl-3.0
veo-labs/openveo-player,veo-labs/openveo-player,veo-labs/openveo-player
4df51733774fdbde4e23020127a3084f403d1179
src/assets/drizzle/scripts/navigation/mobileNav.js
src/assets/drizzle/scripts/navigation/mobileNav.js
/* global document window */ import { focusFirstEl } from '../../../../../packages/spark-core/utilities/elementState'; const hideMobileNav = (nav) => { document.body.classList.remove('sprk-u-OverflowHidden'); nav.classList.remove('is-active'); }; const focusTrap = (nav, mainNav) => { if (nav.classList.contains(...
/* global document window */ import { focusFirstEl } from '../../../../../packages/spark-core/utilities/elementState'; const hideMobileNav = (nav) => { document.body.classList.remove('sprk-u-OverflowHidden'); nav.classList.remove('is-active'); }; const focusTrap = (nav, mainNav) => { if (nav.classList.contains(...
Add check for if mobilenav exists
Add check for if mobilenav exists
JavaScript
mit
sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system
696343cd90c8aa3b21a289b363441e005a7413da
system.config.js
system.config.js
'use strict'; const externalDeps = [ '@angular/*', 'angular', 'angular-mocks', 'rxjs/*', 'lodash', 'moment', 'moment-timezone', ]; const map = { '@angular': 'node_modules/@angular', 'angular': 'node_modules/angular/angular', 'angular-mocks': 'node_modules/angular-mocks/angular-mocks', 'rxjs': 'node_modules...
'use strict'; const externalDeps = [ '@angular/*', 'angular', 'angular-mocks', 'rxjs/*', 'lodash', 'moment', 'moment-timezone', ]; const map = { '@angular': 'node_modules/@angular', 'angular': 'node_modules/angular/angular', 'angular-mocks': 'node_modules/angular-mocks/angular-mocks', 'rxjs': 'node_modules...
Use reduce to avoid mutating the object unneededly.
Use reduce to avoid mutating the object unneededly.
JavaScript
mit
RenovoSolutions/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities
39bb5e7acfde32763f1f8c228f0335db84f9cae7
karma.conf.js
karma.conf.js
// Karma configuration // http://karma-runner.github.io/0.10/config/configuration-file.html module.exports = function(config) { config.set({ // base path, that will be used to resolve files and exclude basePath: '', // testing framework to use (jasmine/mocha/qunit/...) frameworks: ['mocha', 'chai'],...
// Karma configuration // http://karma-runner.github.io/0.10/config/configuration-file.html module.exports = function(config) { config.set({ // base path, that will be used to resolve files and exclude basePath: '', // testing framework to use (jasmine/mocha/qunit/...) frameworks: ['mocha', 'chai'],...
Change reporter style in Karma.
Change reporter style in Karma.
JavaScript
mit
seriema/angular-apimock,MartinSandstrom/angular-apimock,seriema/angular-apimock,MartinSandstrom/angular-apimock
afdf07a331ed5f7dad218f9f23e7466ffcf75597
scripts/components/Header.js
scripts/components/Header.js
import React from 'react'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import AppBar from 'material-ui/AppBar'; import IconButton from 'material-ui/IconButton'; import IconMenu from 'material-ui/IconMenu'; import MenuItem from 'material-ui/MenuItem'; import MoreVertIcon from 'material-ui/svg-ico...
import React from 'react'; import { Link } from 'react-router'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import AppBar from 'material-ui/AppBar'; import IconButton from 'material-ui/IconButton'; import IconMenu from 'material-ui/IconMenu'; import MenuItem from 'material-ui/MenuItem'; import...
Add my account to header
Add my account to header
JavaScript
mit
ahoarfrost/metaseek,ahoarfrost/metaseek,ahoarfrost/metaseek
0c59eb01b242e7591bc1a9218f1eb330ec9ec9f4
app/components/organization-profile.js
app/components/organization-profile.js
import Ember from 'ember'; export default Ember.Component.extend({ classNames: ['organization-profile'], credentials: Ember.inject.service(), organizationMembers: Ember.computed.mapBy('organization.organizationMemberships', 'organization'), didReceiveAttrs() { this._super(...arguments); this.get('cr...
import Ember from 'ember'; export default Ember.Component.extend({ classNames: ['organization-profile'], credentials: Ember.inject.service(), organizationMembers: Ember.computed.mapBy('organization.organizationMemberships', 'member'), didReceiveAttrs() { this._super(...arguments); this.get('credenti...
Fix organization profile by changing computed property
Fix organization profile by changing computed property
JavaScript
mit
jderr-mx/code-corps-ember,code-corps/code-corps-ember,jderr-mx/code-corps-ember,code-corps/code-corps-ember
b557cbb6c8e98fc5ed0183a8c902561389e4e013
EduChainApp/js/common/GlobalStyles.js
EduChainApp/js/common/GlobalStyles.js
/** * * @flow */ 'use strict'; import {StyleSheet} from 'react-native'; const GlobalStyles = { contentWrapper: { paddingLeft: 5, paddingRight: 5, }, sectionHeader: { fontSize: 20, marginTop: 10, }, thumbnail: { height: 45, width: 45, ...
/** * * @flow */ 'use strict'; import {StyleSheet} from 'react-native'; const GlobalStyles = { contentWrapper: { paddingLeft: 5, paddingRight: 5, }, sectionHeader: { fontSize: 20, marginTop: 10, }, thumbnail: { height: 45, width: 45, bord...
Add backBtn styling, fix indentation
Add backBtn styling, fix indentation
JavaScript
mit
bkrem/educhain,bkrem/educhain,bkrem/educhain,bkrem/educhain
a81e5611622ac50a1c82a26df88e63c87d888e88
lib/converter.js
lib/converter.js
const puppeteer = require("puppeteer") const defaults = require("../configurations/defaults") const puppeteerArgs = [ "--no-sandbox", "--disable-setuid-sandbox", "--disable-gpu" ] const allowedOptions = [ "scale", "printBackground", "margin" ] const formatOptions = options => allowedOptions.reduce((filte...
const puppeteer = require("puppeteer") const defaults = require("../configurations/defaults") const puppeteerArgs = [ "--no-sandbox", "--disable-setuid-sandbox", "--disable-gpu" ] const allowedOptions = [ "scale", "displayHeaderFooter", "printBackground", "format", "landscape", "pageRanges", "wid...
Allow almost all puppeteer pdf configurations
Allow almost all puppeteer pdf configurations
JavaScript
mit
tecnospeed/pastor
447902934914f8a803a705044252eb71beb7cc62
lib/logger.js
lib/logger.js
'use strict'; const Winston = require('winston'); function Logger(level) { const logLevel = level.toLowerCase() || 'info'; const logger = new Winston.Logger({ level: logLevel, transports: [ new Winston.transports.Console({ colorize: false, timestamp: true, json: true, ...
'use strict'; const Winston = require('winston'); function Logger(level) { const logLevel = (level || 'info').toLowerCase(); const logger = new Winston.Logger({ level: logLevel, transports: [ new Winston.transports.Console({ colorize: false, timestamp: true, json: true, ...
Handle null and undefined log levels properly
Handle null and undefined log levels properly
JavaScript
mit
rapid7/acs,rapid7/acs,rapid7/acs
5b3686c9a28feaeda7e51526f8cdc9e27793b95c
bin/config.js
bin/config.js
'use strict' var fs = require('fs') var path = require('path') var existFile = require('exists-file') var minimistPath = path.join(__dirname, '..', 'node_modules', 'meow', 'node_modules', 'minimist') var minimist = require(minimistPath) var trimNewlinesPath = path.join(__dirname, '..', 'node_modules', 'meow', 'node_...
'use strict' var fs = require('fs') var path = require('path') var existFile = require('exists-file') var minimistPath = path.join(__dirname, '..', 'node_modules', 'meow', 'node_modules', 'minimist') var minimist = require(minimistPath) var trimNewlinesPath = path.join(__dirname, '..', 'node_modules', 'meow', 'node_...
Load file if params are not present
Load file if params are not present
JavaScript
mit
Kikobeats/farm-cli,Kikobeats/worker-farm-cli
b183de1dbadae83d82c6573ba61dc7b5fa386856
app/containers/gif/sagas.js
app/containers/gif/sagas.js
import { remote } from 'electron'; import { call, select, put, takeLatest } from 'redux-saga/effects'; import GIF from './constants'; import { result, error, clear } from './actions'; import request from '../../utils/request'; export function* requestGif(action) { const requestURL = `http://api.giphy.com/v1/gifs/ran...
import { remote } from 'electron'; import { call, select, put, takeLatest } from 'redux-saga/effects'; import GIF from './constants'; import { result, error, clear } from './actions'; import request from '../../utils/request'; export function* requestGif(action) { // If there is no query given, grab the latest one f...
Fix down button to dp the same tag search
Fix down button to dp the same tag search
JavaScript
mit
astrogif/astrogif,astrogif/astrogif
7f5f5482fc30ab8f6fd1470f15569023f95d4920
app/src/containers/ContactUs.js
app/src/containers/ContactUs.js
import { connect } from 'react-redux'; import ContactUs from '../components/ContactUs'; import { submitForm } from '../actions/contact'; const mapStateToProps = (state) => ({ contactStatus: state.contactStatus, defaultUserName: state.user.loggedUser && state.user.loggedUser.displayName, defaultUserEmail: state.u...
import { connect } from 'react-redux'; import ContactUs from '../components/ContactUs'; import { submitForm } from '../actions/contact'; const mapStateToProps = (state) => ({ contactStatus: state.contactStatus, defaultUserName: state.user.loggedUser ? state.user.loggedUser.displayName : '', defaultUserEmail: sta...
Fix issue when logging out on contact page
Fix issue when logging out on contact page
JavaScript
mit
Vizzuality/GlobalFishingWatch,Vizzuality/GlobalFishingWatch,Vizzuality/GlobalFishingWatch
88d7a14c2640c8ee7eddd6044fe84970a0f724c8
Resources/public/scripts/globals.js
Resources/public/scripts/globals.js
var AJAX_LOADER = '<span class="ajax_loader"></span>'; $(document).bind('ajaxComplete', function () { $('.ajax_loader').remove(); });
var AJAX_LOADER = '<span class="ajax_loader"></span>'; $(document).bind('ajaxComplete', function () { $('.ajax_loader').remove(); $('form').removeData('submitted'); });
Mark forms as not submitted after AJAX complete.
Mark forms as not submitted after AJAX complete.
JavaScript
mit
DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle
6c355830dcf91e90e3fce6f2ff9d59654716c8b7
bin/source.js
bin/source.js
var fs = require('fs'), path = require('path'), util = require('../lib/util'); var Source = util.inherit(Object, { _initialize: function (root) { this._root = root; }, travel: function (callback, pathname) { pathname = pathname || ''; var root = this._root, node = path.join(root, pathname), ...
var fs = require('fs'), path = require('path'), util = require('../lib/util'); var Source = util.inherit(Object, { _initialize: function (root) { this._root = root; }, travel: function (callback, pathname) { pathname = pathname || ''; var root = this._root, node = path.join(root, pathname), ...
Fix read hidden directory error.
Fix read hidden directory error.
JavaScript
mit
nqdeng/ucc
147b15ee4b14c2a69fb12b17d7742f0760eb63f1
server/routes/session.js
server/routes/session.js
var router = require('express').Router(); var jwt = require('jsonwebtoken'); var jwtSecret = require('../config/jwt_secret'); var User = require('../models/user'); router.post('/', function(req, res) { User.findOne({ username: req.body.user.username }).then(function(user) { if (user) { user.authenticate(re...
var router = require('express').Router(); var jwt = require('jsonwebtoken'); var jwtSecret = require('../config/jwt_secret'); var User = require('../models/user'); router.post('/', function(req, res) { User.findOne({ username: req.body.user.username }).then(function(user) { if (user) { user.authenticate(re...
Use expiresIn instead of expiresInMinutes.
Use expiresIn instead of expiresInMinutes. expiresInMinutes and expiresInSeconds is deprecated.
JavaScript
mit
unixmonkey/caedence.net-2015,unixmonkey/caedence.net-2015
386bd63f8d21fde74018815d410179758f5241cf
server/store/requests.js
server/store/requests.js
const redis = require('./redis'); const config = require('./config'); const getRequest = async (requestId) => { // Set TTL for request redis.expire(`requests:${requestId}`, config('requests_ttl')); return await redis.hgetallAsync(`requests:${requestId}`); }; const createRequest = async (requestDetails) => { /...
const redis = require('./redis'); const config = require('../config/index.js'); const getRequest = async (requestId) => { // Set TTL for request redis.expire(`requests:${requestId}`, config('requests_ttl')); return await redis.hgetallAsync(`requests:${requestId}`); }; const createRequest = async (requestDetails...
Fix dependency inclusion for require statement
Fix dependency inclusion for require statement
JavaScript
mit
DAVFoundation/missioncontrol,DAVFoundation/missioncontrol,DAVFoundation/missioncontrol
0ab40cc1769b66a7e72891a79a204b8c0455933f
lib/loadLists.js
lib/loadLists.js
var fs = require("fs"); var path = require("path"); var _ = require("lodash"); var animals; var adjectives; module.exports = function () { if (animals && adjectives) { return { animals : animals, adjectives : adjectives }; } adjectives = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "lists", "adjec...
var fs = require("fs"); var path = require("path"); var _ = require("lodash"); var animals; var adjectives; module.exports = function () { if (animals && adjectives) { return { animals : animals, adjectives : adjectives }; } adjectives = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "lists", "adjec...
Fix adjective and number count to match the updated lists.
Fix adjective and number count to match the updated lists.
JavaScript
mit
a-type/adjective-adjective-animal,a-type/adjective-adjective-animal,gswalden/adjective-adjective-animal
3d48ad17557a322f23ac9e1d8a1587507f351bea
app/templates/karma.conf.js
app/templates/karma.conf.js
'use strict'; module.exports = function (config) { config.set({ autowatch: false, basePath: __dirname, browsers: ['PhantomJS'], files: [ 'app/assets/bower_components/jquery/dist/jquery.js', 'app/assets/bower_components/jasmine-jquery/lib/jasmine-jquery.js', 'spec/javascripts/helpers...
'use strict'; module.exports = function (config) { config.set({ autowatch: false, basePath: __dirname, browsers: ['PhantomJS'], files: [ 'app/assets/bower_components/jquery/dist/jquery.js', 'app/assets/bower_components/jasmine-jquery/lib/jasmine-jquery.js', 'spec/javascripts/helpers...
Comment out fixtures until needed
Comment out fixtures until needed
JavaScript
mit
jbnicolai/generator-gulp-rk,jbnicolai/generator-gulp-rk,jbnicolai/generator-gulp-rk
4ca82da87e04c8b0b2d9a73ae67c7af99e7888da
src/store.js
src/store.js
import { createStore } from 'redux'; import reducer from 'reducers'; import initialState from 'initialState'; const store = createStore(reducer, initialState, window.devToolsExtension ? window.devToolsExtension() : undefined ); export default store;
import { createStore } from 'redux'; import reducer from 'reducers'; import initialState from 'initialState'; const devToolExtension = (() => { if ('production' !== process.env.NODE_ENV) { return window.devToolsExtension ? window.devToolsExtension() : undefined; } else { return undefined; } })(); expor...
Remove Redux devtools from production build
Remove Redux devtools from production build
JavaScript
mit
vincentriemer/io-808,vincentriemer/io-808,vincentriemer/io-808
a172dc9a3ee1343933140b97f8a2bca48c43cff6
js.js
js.js
var through = require('through') , falafel = require('falafel') , unparse = require('escodegen').generate , util = require('util') , minimist = require('minimist') var argv = minimist(process.argv.slice(2)) var defaultLang = argv['jedify-lang'] || process.env['JEDIFY_LANG'] || 'en' var re = /\.js$/ module.e...
var through = require('through') , falafel = require('falafel') , unparse = require('escodegen').generate , util = require('util') , minimist = require('minimist') var defaultLang = process.env['JEDIFY_LANG'] || 'en' var re = /\.js$/ module.exports = function (file, options) { if (!re.test(file)) return th...
Remove `--jedify-lang` command line option
Remove `--jedify-lang` command line option
JavaScript
mit
tellnes/jedify
25e44bb5e37df64916cd4d249bbf7d10115e2d49
src/utils.js
src/utils.js
export function checkStatus(response) { if (response.status >= 200 && response.status < 300) { return response.json(); } throw new Error(response.statusText); } export function getShortDate(dateString) { const d = new Date(dateString); return `${d.getMonth() + 1}/${d.getDate()}/${d.getFullYear() % 100}`;...
import moment from 'moment'; export function checkStatus(response) { if (response.status >= 200 && response.status < 300) { return response.json(); } throw new Error(response.statusText); } export function getShortDate(dateString) { return moment(dateString).format('MM/DD/YY'); }
Fix getShortDate to return leading zeros
Fix getShortDate to return leading zeros
JavaScript
mit
ZachGawlik/print-to-resist,ZachGawlik/print-to-resist
a8e690949e1ae14faa228a9df9f5dce32183d6fa
lib/apis/fetch.js
lib/apis/fetch.js
import { defaults } from 'lodash'; import request from 'request'; import config from '../../config'; export default (url, options = {}) => { return new Promise((resolve, reject) => { const opts = defaults(options, { method: 'GET', timeout: config.REQUEST_TIMEOUT_MS, }); request(url, opts, (e...
import { get, defaults, compact } from 'lodash'; import request from 'request'; import config from '../../config'; export default (url, options = {}) => { return new Promise((resolve, reject) => { const opts = defaults(options, { method: 'GET', timeout: config.REQUEST_TIMEOUT_MS, }); request...
Improve error handling by returning the `statusCode` and including the failed URL in the rejected Error
Improve error handling by returning the `statusCode` and including the failed URL in the rejected Error
JavaScript
mit
artsy/metaphysics,broskoski/metaphysics,mzikherman/metaphysics-1,1aurabrown/metaphysics,artsy/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1,craigspaeth/metaphysics,craigspaeth/metaphysics,artsy/metaphysics,mzikherman/metaphysics-1
8a09e658300e825bbbcbb8ab42999bf3d9ce8958
extensions/roc-plugin-dredd/src/dredd/index.js
extensions/roc-plugin-dredd/src/dredd/index.js
import UpstreamDredd from 'dredd'; import Reporter from './reporter'; export default class Dredd extends UpstreamDredd { constructor(config, logger) { super(config); this.canceled = false; this.reporter = new Reporter(this.configuration.emitter, this.stats, logger, config.opt...
import UpstreamDredd from 'dredd'; import Reporter from './reporter'; export default class Dredd extends UpstreamDredd { constructor(config, logger) { super(config); this.canceled = false; this.reporter = new Reporter(this.configuration.emitter, this.stats, logger, config.opt...
Exit with status 0 when not running in watch mode
Exit with status 0 when not running in watch mode
JavaScript
mit
voldern/roc-plugin-dredd
1f1f94c22e0e1d6132dfb813e467c8f642df56db
src/screens/rename/views/configure/containers/files/actions.js
src/screens/rename/views/configure/containers/files/actions.js
export function load(files) { return { type: 'FILES_DATA_LOAD', payload: files.map(file => { return { id: file.Id, newName: file.NewName, originalName: file.OriginalName, size: file.Size, type: file.Type, isSelected: file.Filtered, }; }), }; } export function sort(type, direction,...
export function load(files) { return { type: 'FILES_DATA_LOAD', payload: files.map(file => { return { id: file.Id, newName: file.NewName, originalName: file.OriginalName, size: file.Size, type: file.Type, isSelected: file.Selected, }; }), }; } export function sort(type, direction,...
Update Filtered to Selected object key
Update Filtered to Selected object key
JavaScript
mit
radencode/reflow-client,radencode/reflow-client,radencode/reflow,radencode/reflow
fbc505bfc58d825d5440a260293ea3dcae04d56d
addon/services/google-charts.js
addon/services/google-charts.js
import RSVP from 'rsvp'; import Service from '@ember/service'; export default Service.extend({ language: 'en', init() { this._super(...arguments); this.googlePackages = this.googlePackages || ['corechart', 'bar', 'line', 'scatter']; this.defaultOptions = this.defaultOptions || { animation: { ...
import RSVP from 'rsvp'; import Service from '@ember/service'; export default Service.extend({ language: 'en', init() { this._super(...arguments); this.googlePackages = this.googlePackages || ['corechart', 'bar', 'line', 'scatter']; this.defaultOptions = this.defaultOptions || { animation: { ...
Fix google visualization undefined error
Fix google visualization undefined error similar to https://github.com/sir-dunxalot/ember-google-charts/pull/56 (with failing tests), see also the comment in https://github.com/sir-dunxalot/ember-google-charts/issues/57
JavaScript
mit
sir-dunxalot/ember-google-charts,sir-dunxalot/ember-google-charts
d267a3b7deb8d478ee2e17a64921b44cf3f29b17
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...
Remove unused foundation JS components.
Remove unused foundation JS components.
JavaScript
agpl-3.0
teikei/teikei,sjockers/teikei,sjockers/teikei,sjockers/teikei,teikei/teikei,teikei/teikei
1944548e8ea77174d0929230e07a78220d3fe2ff
app/assets/javascripts/url-helpers.js
app/assets/javascripts/url-helpers.js
var getUrlVar = function(key) { var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search); return result && unescape(result[1]) || ""; }; var getIDFromURL = function(key) { var result = new RegExp(key + "/([0-9a-zA-Z\-]*)", "i").exec(window.location.pathname); if (result === 'new') { ...
var getUrlVar = function(key) { var result = new RegExp(key + '=([^&]*)', 'i').exec(window.location.search); return result && decodeURIComponent(result[1]) || ''; }; var getIDFromURL = function(key) { var result = new RegExp(key + '/([0-9a-zA-Z\-]*)', 'i').exec(window.location.pathname); if (result ===...
Fix mixture of quotes and deprecated unescape method usage
Fix mixture of quotes and deprecated unescape method usage
JavaScript
mit
openfarmcc/OpenFarm,RickCarlino/OpenFarm,CloCkWeRX/OpenFarm,openfarmcc/OpenFarm,RickCarlino/OpenFarm,openfarmcc/OpenFarm,RickCarlino/OpenFarm,CloCkWeRX/OpenFarm,CloCkWeRX/OpenFarm,CloCkWeRX/OpenFarm,openfarmcc/OpenFarm,RickCarlino/OpenFarm
7fe3fdf119d99e40b9917696a90244f05a0205ee
paths.js
paths.js
var src = exports.src = {}; src.app = [ 'src/index.js', 'src/api.js', 'src/app.js' ]; src.dummy = [ 'src/dummy.js', 'src/fixtures.js' ]; src.lib = [].concat( src.app, src.dummy); src.demo = [].concat(src.lib, [ 'src/demo.js' ]); src.prd = [].concat(src.app, [ 'src/init.js' ]); ...
var src = exports.src = {}; src.app = [ 'src/index.js', 'src/api.js', 'src/app.js' ]; src.dummy = [ 'src/fixtures.js', 'src/dummy.js' ]; src.lib = [].concat( src.app, src.dummy); src.demo = [].concat(src.lib, [ 'src/demo.js' ]); src.prd = [].concat(src.app, [ 'src/init.js' ]); ...
Switch around fixtures.js and dummy.js in path config
Switch around fixtures.js and dummy.js in path config
JavaScript
bsd-3-clause
praekelt/vumi-ureport,praekelt/vumi-ureport
fd474b753aa3fc34c8a494f578b8ab50bffadcc1
server/api/attachments/dal.js
server/api/attachments/dal.js
var db = require('tresdb-db'); exports.count = function (callback) { // Count non-deleted attachments // // Parameters: // callback // function (err, number) // db.collection('attachments').countDocuments({ deleted: false, }) .then(function (number) { return callback(null, number); ...
var db = require('tresdb-db'); var keygen = require('tresdb-key'); exports.count = function (callback) { // Count non-deleted attachments // // Parameters: // callback // function (err, number) // db.collection('attachments').countDocuments({ deleted: false, }) .then(function (number) { ...
Use tresdb-key in attachment generation
Use tresdb-key in attachment generation
JavaScript
mit
axelpale/tresdb,axelpale/tresdb
2cba580ff50b0f5f60933f4165973726a4f47073
app/assets/javascripts/users.js
app/assets/javascripts/users.js
$(() => { if (location.pathname === '/users/sign_up' || location.pathname === '/users/sign_in' && !navigator.cookieEnabled) { $('input[type="submit"]').attr('disabled', true).addClass('is-muted is-outlined'); $('.js-errors').text('Cookies must be enabled in your browser for you to be able to sign up or sign i...
$(() => { if ((location.pathname === '/users/sign_up' || location.pathname === '/users/sign_in') && !navigator.cookieEnabled) { $('input[type="submit"]').attr('disabled', true).addClass('is-muted is-outlined'); $('.js-errors').text('Cookies must be enabled in your browser for you to be able to sign up or sign...
Fix bug where Signup form is incorrectyl disabled
Fix bug where Signup form is incorrectyl disabled The signup form is being disabled in all cases because of an operator precedence problem.
JavaScript
agpl-3.0
ArtOfCode-/qpixel,ArtOfCode-/qpixel,ArtOfCode-/qpixel,ArtOfCode-/qpixel
e9c8040befea76e0462f845822d136f39bdfb17a
app/components/child-comment.js
app/components/child-comment.js
import Ember from 'ember'; export default Ember.Component.extend({ classNameBindings: ['offset:col-md-offset-1'], offset: false, timestamp: function() { return moment.unix(this.get('comment.time')).fromNow(); }.property('time'), actions: { followUser: function(userId) { var sessionData = sessi...
import Ember from 'ember'; export default Ember.Component.extend({ classNameBindings: ['offset:col-md-offset-1'], offset: false, timestamp: function() { return moment.unix(this.get('comment.time')).fromNow(); }.property('time'), actions: { followUser: function(userId) { var sessionData = sessi...
Save favorite comments to account
Save favorite comments to account
JavaScript
mit
stevenwu/hacker-news
3436424d9d945c3132fa196f219fe08fd6887dcd
lib/optionlist.js
lib/optionlist.js
import PropTypes from "prop-types"; import React, { Component } from "react"; import { StyleSheet, ScrollView, View, TouchableWithoutFeedback, ViewPropTypes } from "react-native"; export default class OptionList extends Component { static defaultProps = { onSelect: () => {} }; static propTypes = { ...
import PropTypes from "prop-types"; import React, { Component } from "react"; import { StyleSheet, ScrollView, View, TouchableWithoutFeedback, ViewPropTypes } from "react-native"; export default class OptionList extends Component { static defaultProps = { onSelect: () => {} }; static propTypes = { ...
Make OptionList return gracefully when iterating over falsy values
Make OptionList return gracefully when iterating over falsy values
JavaScript
mit
gs-akhan/react-native-chooser
c0204e51c9077f8771f495bb1ffa224e25655322
website/app/components/project/processes/mc-project-processes.component.js
website/app/components/project/processes/mc-project-processes.component.js
(function (module) { module.component('mcProjectProcesses', { templateUrl: 'components/project/processes/mc-project-processes.html', controller: 'MCProjectProcessesComponentController' }); module.controller('MCProjectProcessesComponentController', MCProjectProcessesComponentController); ...
(function (module) { module.component('mcProjectProcesses', { templateUrl: 'components/project/processes/mc-project-processes.html', controller: 'MCProjectProcessesComponentController' }); module.controller('MCProjectProcessesComponentController', MCProjectProcessesComponentController); ...
Sort processes and if there is no process id go to the first one.
Sort processes and if there is no process id go to the first one.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
f24f75fc51c6bf508ec122bc5f25bcaaf1988219
index.js
index.js
#!/usr/bin/env node const express = require('express'); const fileExists = require('file-exists'); const bodyParser = require('body-parser'); const fs = require('fs'); const { port = 8123 } = require('minimist')(process.argv.slice(2)); const app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.us...
#!/usr/bin/env node const express = require('express'); const fileExists = require('file-exists'); const bodyParser = require('body-parser'); const fs = require('fs'); const { port = 8123 } = require('minimist')(process.argv.slice(2)); const app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.us...
Handle all requests, not only GET
feat: Handle all requests, not only GET
JavaScript
mit
finom/node-direct,finom/node-direct
2db58a7024cade6d205a55afcfa40cf12bd43c69
index.js
index.js
'use strict'; var deepFind = function(obj, path) { if ((typeof obj !== "object") | obj === null) { return undefined; } if (typeof path === 'string') { path = path.split('.'); } if (!Array.isArray(path)) { path = path.concat(); } return path.reduce(function (o, part) { var keys = part.ma...
'use strict'; var deepFind = function(obj, path) { if (((typeof obj !== "object") && (typeof obj !== "function")) | obj === null) { return undefined; } if (typeof path === 'string') { path = path.split('.'); } if (!Array.isArray(path)) { path = path.concat(); } return path.reduce(function (...
Add capability to retrieve properties of functions
Add capability to retrieve properties of functions
JavaScript
mit
yashprit/deep-find
c9a7cc0dd50e934bb214c7988081b2bbe5bfa397
lib/stringutil.js
lib/stringutil.js
/*jshint node: true */ "use strict"; module.exports = { /** * Returns true if and only if the string value of the first argument * ends with the given suffix. Otherwise, returns false. Does NOT support * the length argument. * * Normally, one would just use String.prototype.endsWith, but ...
/*jshint node: true */ "use strict"; module.exports = { /** * Returns true if and only if the string value of the first argument * ends with the given suffix. Otherwise, returns false. Does NOT support * the length argument. * * Normally, one would just use String.prototype.endsWith, but ...
Fix TypeError for endsWith() with `null` suffix
Fix TypeError for endsWith() with `null` suffix
JavaScript
mit
JangoBrick/teval,JangoBrick/teval
d4a1349279c3218f75db94e3243cd272bf05e5e4
app.js
app.js
/*jshint esversion: 6 */ const primed = angular.module('primed', ['ngRoute', 'ngResource']);
/*jshint esversion: 6 */ const primed = angular.module('primed', ['ngRoute', 'ngResource']); primed.controller('homeController', ['$scope', function($scope) { }]); primed.controller('forecastController', ['$scope', function($scope) { }]);
Set up controllers for home and forecast
Set up controllers for home and forecast
JavaScript
mit
adam-rice/Primed,adam-rice/Primed
4bdcfd07a97de370aead0cbb8a9707568c9e4138
test/page.js
test/page.js
var fs = require('fs'); var path = require('path'); var assert = require('assert'); var page = require('../').parse.page; var CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/PAGE.md'), 'utf8'); var LEXED = page(CONTENT); describe('Page parsing', function() { it('should detection sections', function()...
var fs = require('fs'); var path = require('path'); var assert = require('assert'); var page = require('../').parse.page; var CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/PAGE.md'), 'utf8'); var LEXED = page(CONTENT); var HR_CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/HR_PAGE.md'), 'utf...
Add tests for section merging
Add tests for section merging
JavaScript
apache-2.0
svenkatreddy/gitbook,intfrr/gitbook,guiquanz/gitbook,minghe/gitbook,GitbookIO/gitbook,qingying5810/gitbook,ferrior30/gitbook,haamop/documentation,palerdot/gitbook,gaearon/gitbook,ShaguptaS/gitbook,escopecz/documentation,rohan07/gitbook,bjlxj2008/gitbook,gaearon/gitbook,ferrior30/gitbook,jocr1627/gitbook,bjlxj2008/gitbo...
ae10cb3c2b3dd964c6d1f0bd670410b1833db1a5
index.js
index.js
require('./lib/boot/logger'); var defaultConfig = { amqpUrl: process.env.AMQP_URL || 'amqp://localhost', amqpPrefetch: process.env.AMQP_PREFETCH || 10, amqpRequeue: true }; module.exports = function(config) { for (var key in config) { if (config.hasOwnProperty(key) && defaultConfig.hasOwnProperty(key)) { ...
require('./lib/boot/logger'); var defaultConfig = { amqpUrl: process.env.AMQP_URL || 'amqp://localhost', amqpPrefetch: process.env.AMQP_PREFETCH || 0, amqpRequeue: true }; module.exports = function(config) { for (var key in config) { if (config.hasOwnProperty(key) && defaultConfig.hasOwnProperty(key)) { ...
Set default prefetech to unlimited value
Set default prefetech to unlimited value
JavaScript
mit
dial-once/node-bunnymq
9bb668b1066497413f8abd0fff79e835ff781662
index.js
index.js
var path = require('path'); var findParentDir = require('find-parent-dir'); var fs = require('fs'); function resolve(targetUrl, source) { var packageRoot = findParentDir.sync(source, 'node_modules'); if (!packageRoot) { return null; } var filePath = path.resolve(packageRoot, 'node_modules', targetUrl); ...
var path = require('path'); var findParentDir = require('find-parent-dir'); var fs = require('fs'); function resolve(targetUrl, source) { var packageRoot = findParentDir.sync(source, 'node_modules'); if (!packageRoot) { return null; } var filePath = path.resolve(packageRoot, 'node_modules', targetUrl); ...
Fix path on .scss file detected
Fix path on .scss file detected
JavaScript
apache-2.0
matthewdavidson/node-sass-tilde-importer
d21950affe91ead5be06c1197441577053464dcc
index.js
index.js
'use strict'; var throttle = require('throttleit'); function requestProgress(request, options) { var reporter; var delayTimer; var delayCompleted; var totalSize; var previousReceivedSize; var receivedSize = 0; var state = {}; options = options || {}; options.throttle = options.thr...
'use strict'; var throttle = require('throttleit'); function requestProgress(request, options) { var reporter; var delayTimer; var delayCompleted; var totalSize; var previousReceivedSize; var receivedSize = 0; var state = {}; options = options || {}; options.throttle = options.thr...
Reset size also on 'request'.
Reset size also on 'request'.
JavaScript
mit
IndigoUnited/node-request-progress
8aef4999d40fa0cedd3deb56daadbcd09eeece09
index.js
index.js
'use strict'; import { NativeAppEventEmitter, NativeModules } from 'react-native'; const ReactNativeBluetooth = NativeModules.ReactNativeBluetooth; const didChangeState = (callback) => { var subscription = NativeAppEventEmitter.addListener( ReactNativeBluetooth.StateChanged, callback ); ReactNativeBlue...
'use strict'; import { NativeAppEventEmitter, NativeModules } from 'react-native'; const ReactNativeBluetooth = NativeModules.ReactNativeBluetooth; const didChangeState = (callback) => { var subscription = NativeAppEventEmitter.addListener( ReactNativeBluetooth.StateChanged, callback ); ReactNativeBlue...
Implement startScan(), stopScan() and didDiscoverDevice()
js: Implement startScan(), stopScan() and didDiscoverDevice()
JavaScript
apache-2.0
sogilis/react-native-bluetooth,sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth,sogilis/react-native-bluetooth,sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth
49dfc1e0d40375461c49699bf4285e17ab725e35
index.js
index.js
module.exports = function(options) { var cb = (options && options.variable) || 'cb'; var regexp = new RegExp('(?:\\b|&)' + cb + '=([a-zA-Z$_][a-zA-Z0-9$_]*)(?:&|$)'); return { reshook: function(server, tile, req, res, result, callback) { if (result.headers['Content-Type'] !== 'application/json') return callback...
module.exports = function(options) { var cb = (options && options.variable) || 'cb'; var regexp = new RegExp('(?:\\b|&)' + cb + '=([a-zA-Z$_][\.a-zA-Z0-9$_]*)(?:&|$)'); return { reshook: function(server, tile, req, res, result, callback) { if (result.headers['Content-Type'] !== 'application/json') return callba...
Allow dots in callback names.
Allow dots in callback names.
JavaScript
apache-2.0
naturalatlas/tilestrata-jsonp
1a88800d7b13b65206818de6e472ceef30054892
index.js
index.js
const ghost = require('ghost'); ghost().then(function (ghostServer) { ghostServer.start(); });
const ghost = require('ghost'); ghost({ config: path.join(__dirname, 'config.js') }).then(function (ghostServer) { ghostServer.start(); });
Add explicit config.js to ghost constructor
Add explicit config.js to ghost constructor
JavaScript
mit
jtanguy/clevercloud-ghost
a6542ba90043060ae4a878688a7913497913695d
index.js
index.js
"use strict"; var express = require("express"); module.exports = function () { var app = express(); // 404 everything app.all("*", function (req, res) { res.status(404); res.jsonp({ error: "404 - page not found" }); }); return app; };
"use strict"; var express = require("express"); module.exports = function () { var app = express(); // fake handler for the books endpoints app.get("/books/:isbn", function (req, res) { var isbn = req.param("isbn"); res.jsonp({ isbn: isbn, title: "Title of " + isbn, author: "Aut...
Add handler to return faked book results
Add handler to return faked book results
JavaScript
agpl-3.0
OpenBookPrices/openbookprices-api
a326ba30f5781c1a1297bb20636023021ed4baab
tests/unit/components/tooltip-on-parent-test.js
tests/unit/components/tooltip-on-parent-test.js
import Ember from 'ember'; import { moduleForComponent, test } from 'ember-qunit'; let component; moduleForComponent('tooltip-on-parent', 'Unit | Component | tooltip on parent', { unit: true, setup() { component = this.subject(); }, }); test('The component registers itself', function(assert) { const par...
import Ember from 'ember'; import { moduleForComponent, test } from 'ember-qunit'; let component; moduleForComponent('tooltip-on-parent', 'Unit | Component | tooltip on parent', { unit: true, setup() { component = this.subject(); }, }); test('The component registers itself', function(assert) { const par...
Fix for tooltip on parent element being removed
Fix for tooltip on parent element being removed
JavaScript
mit
sir-dunxalot/ember-tooltips,cdl/ember-tooltips,cdl/ember-tooltips,zenefits/ember-tooltips,zenefits/ember-tooltips,kmiyashiro/ember-tooltips,maxhungry/ember-tooltips,sir-dunxalot/ember-tooltips,maxhungry/ember-tooltips,kmiyashiro/ember-tooltips
0ad5c3272b7e63337c4196b2ebc08eac07dfadc1
app/assets/javascripts/responses.js
app/assets/javascripts/responses.js
$(document).ready( function () { $("button.upvote").click( function() { var commentId = $(".upvote").data("id"); event.preventDefault(); $.ajax({ url: '/response/up_vote', method: 'POST', data: { id: commentId }, dataType: 'JSON' }).done( function (response) { }).fail( func...
$(document).ready( function () { $("button.upvote").click( function() { var commentId = $(".upvote").data("id"); event.preventDefault(); $.ajax({ url: '/response/up_vote', method: 'POST', data: { id: commentId }, dataType: 'JSON' }).done( function (response) { $("button.u...
Add ajax to upvote a response.
Add ajax to upvote a response.
JavaScript
mit
great-horned-owls-2014/dbc-what-is-this,great-horned-owls-2014/dbc-what-is-this
cdaf0617ab59f81b251ab92cb7f797e3b626dbc1
cli.js
cli.js
#!/usr/bin/env node 'use strict'; var meow = require('meow'); var zipGot = require('./'); var objectAssign = require('object-assign'); var cli = meow({ help: [ 'Usage', ' zip-got <url> <exclude-patterns>... --cleanup --extract', '', 'Example', ' zip-got http://unicorns.com/unicorns.zip \'__MACOSX/**\' ...
#!/usr/bin/env node 'use strict'; var meow = require('meow'); var zipGot = require('./'); var objectAssign = require('object-assign'); var cli = meow({ help: [ 'Usage', ' zip-got <url> <exclude-patterns>... --cleanup --extract', '', 'Example', ' zip-got http://unicorns.com/unicorns.zip \'__MACOSX/**\' ...
Fix code style of assign
Fix code style of assign
JavaScript
mit
ragingwind/zip-got,ragingwind/node-got-zip
7af0c2ae8b4b051f380c11bef21cc4f3ef5ee2b8
config/protractor.config.js
config/protractor.config.js
require('ts-node/register'); exports.config = { baseUrl: 'http://127.0.0.1:8100/', seleniumAddress: 'http://127.0.0.1:4723/wd/hub', specs: [ '../src/**/*.e2e.ts' ], exclude: [], framework: 'mocha', allScriptsTimeout: 110000, directConnect: true, capabilities: { 'browserName': 'chrome', ...
require('ts-node/register'); exports.config = { baseUrl: 'http://127.0.0.1:8100/', seleniumAddress: 'http://127.0.0.1:4723/wd/hub', specs: [ '../src/**/*.e2e.ts' ], exclude: [], framework: 'mocha', allScriptsTimeout: 110000, directConnect: true, capabilities: { 'browserName': 'chrome', ...
Modify to wait until angular is loaded on protractor
Modify to wait until angular is loaded on protractor
JavaScript
mit
takeo-asai/typescript-starter,takeo-asai/typescript-starter,takeo-asai/typescript-starter,takeo-asai/typescript-starter
75ef865f8867e45cfe60b8222de85ea20ac50670
server/controllers/userFiles.js
server/controllers/userFiles.js
// // Copyright 2014 Ilkka Oksanen <iao@iki.fi> // // 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 required by app...
// // Copyright 2014 Ilkka Oksanen <iao@iki.fi> // // 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 required by app...
Fix serving of user uploaded files
Fix serving of user uploaded files
JavaScript
apache-2.0
ilkkao/mas,ilkkao/mas,ilkkao/mas,ilkkao/mas
81702fccfd16cae2feb1d083cfc782c1fb9ecc3c
src/js/utils/ScrollbarUtil.js
src/js/utils/ScrollbarUtil.js
import GeminiScrollbar from 'react-gemini-scrollbar'; let scrollbarWidth = null; const ScrollbarUtil = { /** * Taken from Gemini's source code with some edits * https://github.com/noeldelgado/gemini-scrollbar/blob/master/index.js#L22 * @param {Object} options * @return {Number} The width of the native ...
import GeminiScrollbar from 'react-gemini-scrollbar'; let scrollbarWidth = null; const ScrollbarUtil = { /** * Taken from Gemini's source code with some edits * https://github.com/noeldelgado/gemini-scrollbar/blob/master/index.js#L22 * @param {Object} options * @return {Number} The width of the native ...
Add null check for containerRef
Add null check for containerRef
JavaScript
apache-2.0
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
ec25aaaa53dcfa271f73a8f45fe65fd6e15f7973
src/utils/is-plain-object.js
src/utils/is-plain-object.js
// Adapted from https://github.com/jonschlinkert/is-plain-object function isObject(val) { return val != null && typeof val === 'object' && Array.isArray(val) === false; } function isObjectObject(o) { return isObject(o) === true && Object.prototype.toString.call(o) === '[object Object]'; } export default funct...
// Adapted from https://github.com/jonschlinkert/is-plain-object function isObject(val) { return val != null && typeof val === 'object' && Array.isArray(val) === false; } function isObjectObject(o) { return isObject(o) === true && Object.prototype.toString.call(o) === '[object Object]'; } export default funct...
Disable the lint error about using hasOwnProperty. That call should be fine in this context.
Disable the lint error about using hasOwnProperty. That call should be fine in this context.
JavaScript
mit
chentsulin/react-redux-sweetalert
99f1680999747da59ef4b90bafddb467a92c5e19
assets/js/modules/optimize/index.js
assets/js/modules/optimize/index.js
/** * Optimize module initialization. * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENS...
/** * Optimize module initialization. * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENS...
Refactor Optimize with registered components.
Refactor Optimize with registered components.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
d4b9fd4ab129d3e5f8eefcdc368f951e8fd51bee
src/js/posts/components/search-posts-well.js
src/js/posts/components/search-posts-well.js
import React from 'react'; import PropTypes from 'prop-types'; import { Well, InputGroup, FormControl, Button, Glyphicon } from 'react-bootstrap'; class SearchPostsWell extends React.Component { constructor(props) { super(props); this.handleSubmit = this.handleSubmit.bind(this); } han...
import React from 'react'; import PropTypes from 'prop-types'; import { Well, InputGroup, FormControl, Button, Glyphicon } from 'react-bootstrap'; class SearchPostsWell extends React.Component { constructor(props) { super(props); this.handleSubmit = this.handleSubmit.bind(this); } han...
Use submit button type in search posts well.
Use submit button type in search posts well.
JavaScript
mit
akornatskyy/sample-blog-react-redux,akornatskyy/sample-blog-react-redux
507b31b8ec5b3234db3a32e2c0a0359c9ac2cccb
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/app/src/components/Counter/Counter.js
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/app/src/components/Counter/Counter.js
import React, {useState} from 'react'; import PropTypes from 'prop-types'; const Counter = ({initialCount}) => { const [count, setCount] = useState(initialCount); const increment = () => setCount(count + 1); return ( <div> <h2>Count: {count}</h2> <button typ...
import React, {useState} from 'react'; import PropTypes from 'prop-types'; const Counter = ({initialCount}) => { const [count, setCount] = useState(initialCount); const increment = useCallback(() => setCount(count + 1), [count]); return ( <div> <h2>Count: {count}</h2> <butt...
Use useCallback so that `increment` is memoized
Use useCallback so that `increment` is memoized
JavaScript
isc
thorgate/django-project-template,thorgate/django-project-template,thorgate/django-project-template,thorgate/django-project-template,thorgate/django-project-template
f24990cf94729e2aa25ea6e8cf4a32e0e38b150f
lib/control-panel.js
lib/control-panel.js
"use strict"; var messages = require("./messages"); var config = require("./config"); var snippetUtils = require("./snippet").utils; var connect = require("connect"); var http = require("http"); /** * Launch the server for serving the client JS plus static files * @param {String} scriptTags ...
"use strict"; var messages = require("./messages"); var config = require("./config"); var snippetUtils = require("./snippet").utils; var connect = require("connect"); var http = require("http"); /** * Launch the server for serving the client JS plus static files * @param {String} scriptTags ...
Make un-versioned client script return the latest
Make un-versioned client script return the latest
JavaScript
apache-2.0
EdwonLim/browser-sync,stevemao/browser-sync,stevemao/browser-sync,zhelezko/browser-sync,EdwonLim/browser-sync,syarul/browser-sync,BrowserSync/browser-sync,Plou/browser-sync,nitinsurana/browser-sync,schmod/browser-sync,chengky/browser-sync,BrowserSync/browser-sync,schmod/browser-sync,Teino1978-Corp/Teino1978-Corp-browse...
57a15a5194bc95b77110150d06d05a7b870804ce
lib/graceful-exit.js
lib/graceful-exit.js
var utils = require("radiodan-client").utils, logger = utils.logger(__filename); module.exports = function(radiodan){ return function() { clearPlayers(radiodan.cache.players).then( function() { process.exit(1); } ); function clearPlayers(players) { var playerIds = Object.ke...
var utils = require("radiodan-client").utils, logger = utils.logger(__filename); module.exports = function(radiodan){ return function() { clearPlayers(radiodan.cache.players).then( function() { process.exit(0); }, function() { process.exit(1); } ); function cl...
Add exit(1) if any promises fail during exit
Add exit(1) if any promises fail during exit
JavaScript
apache-2.0
radiodan/magic-button,radiodan/magic-button
8baf5366ca919593fe2f00dc245cba9eac984139
bot.js
bot.js
var Twit = require('twit'); var twitInfo = [consumer_key, consumer_secret, access_token, access_token_secret]; //use when testing locally // var twitInfo = require('./config.js') var twitter = new Twit(twitInfo); var useUpperCase = function(wordList) { var tempList = Object.keys(wordList).filter(function(word) { ...
var Twit = require('twit'); var twitInfo = [CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET]; //use when testing locally // var twitInfo = require('./config.js') var twitter = new Twit(twitInfo); var useUpperCase = function(wordList) { var tempList = Object.keys(wordList).filter(function(word) { ...
Change API keys to uppercase
Change API keys to uppercase
JavaScript
mit
almightyboz/RabelaisMarkov
cb7990566b9ac406946d57a0c4f00fb625d21efd
cli.js
cli.js
#!/usr/bin/env node var browserslist = require('./'); var pkg = require('./package.json'); var args = process.argv.slice(2); if ( args.length <= 0 || args.indexOf('--help') >= 0 ) { console.log([ '', pkg.name + ' - ' + pkg.description, '', 'Usage:', '', ...
#!/usr/bin/env node var browserslist = require('./'); var pkg = require('./package.json'); var args = process.argv.slice(2); function isArg(arg) { return args.indexOf(arg) >= 0; } if ( args.length === 0 || isArg('--help') >= 0 || isArg('-h') >= 0 ) { console.log([ '', pkg.nam...
Add -h option to CLI
Add -h option to CLI
JavaScript
mit
mdix/browserslist,ai/browserslist
7cd66b92b824262a898bf539b0faba5ace6eaa0c
raf.js
raf.js
/* * raf.js * https://github.com/ngryman/raf.js * * original requestAnimationFrame polyfill by Erik Möller * inspired from paul_irish gist and post * * Copyright (c) 2013 ngryman * Licensed under the MIT license. */ (function(window) { var lastTime = 0, vendors = ['webkit', 'moz'], requestAnimationFrame ...
/* * raf.js * https://github.com/ngryman/raf.js * * original requestAnimationFrame polyfill by Erik Möller * inspired from paul_irish gist and post * * Copyright (c) 2013 ngryman * Licensed under the MIT license. */ (function(window) { var lastTime = 0, vendors = ['webkit', 'moz'], requestAnimationFrame ...
Fix IE 8 by using compatible date methods
Fix IE 8 by using compatible date methods `Date.now()` is not supported in IE8
JavaScript
mit
ngryman/raf.js
315f321d0c0d55669519cee39d0218cc4b71323f
src/js/actions/NotificationsActions.js
src/js/actions/NotificationsActions.js
import AppDispatcher from '../dispatcher/AppDispatcher'; import AppConstants from '../constants/AppConstants'; export default { add: function(type, content) { var id = Date.now(); var notification = { _id: id, type: type, content: content }; AppDispatcher.dispatch({ actionTy...
import AppDispatcher from '../dispatcher/AppDispatcher'; import AppConstants from '../constants/AppConstants'; export default { add: function(type, content, duration) { if(duration === undefined) duration = 3000; var id = Date.now(); var notification = { _id: id, type: type, content: c...
Add duration to notifications API
Add duration to notifications API
JavaScript
mit
KeitIG/museeks,KeitIG/museeks,MrBlenny/museeks,KeitIG/museeks,MrBlenny/museeks
33904221107d2f521b743ad06162b7b274f2d9ca
html/js/code.js
html/js/code.js
$(document).ready(function(){ var latlng = new google.maps.LatLng(45.5374054, -122.65028); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.TERRAIN }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); function correctHeight() { var window_heigh...
var makeMap = function() { var latlng = new google.maps.LatLng(45.5374054, -122.65028); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.TERRAIN }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); function correctHeight() { var window_height ...
Create makeMap function (helps for testing later)
Create makeMap function (helps for testing later)
JavaScript
mit
jlavallee/HotGator,jlavallee/HotGator
3e4c82c5571f056be85fed1ae0fe3349ecfbb3d9
config/webpack-config-legacy-build.js
config/webpack-config-legacy-build.js
const path = require('path'); module.exports = { entry: './build/index.js', devtool: 'source-map', mode: 'production', resolve: { alias: { ol: path.resolve('./src/ol'), }, }, output: { path: path.resolve('./build/legacy'), filename: 'ol.js', library: 'ol', libraryTarget: 'umd',...
const path = require('path'); module.exports = { entry: './build/index.js', devtool: 'source-map', mode: 'production', resolve: { alias: { ol: path.resolve('./build/ol'), }, }, output: { path: path.resolve('./build/legacy'), filename: 'ol.js', library: 'ol', libraryTarget: 'umd...
Use transpiled modules for legacy build
Use transpiled modules for legacy build
JavaScript
bsd-2-clause
oterral/ol3,stweil/ol3,stweil/openlayers,adube/ol3,ahocevar/ol3,adube/ol3,ahocevar/openlayers,stweil/openlayers,ahocevar/openlayers,ahocevar/ol3,ahocevar/ol3,ahocevar/openlayers,oterral/ol3,stweil/ol3,adube/ol3,openlayers/openlayers,stweil/openlayers,ahocevar/ol3,stweil/ol3,oterral/ol3,stweil/ol3,openlayers/openlayers,...
da7a5d7b717df6312bba26de5cf83fab651c37d8
src/validation-strategies/one-valid-issue.js
src/validation-strategies/one-valid-issue.js
import issueStrats from '../issue-strategies/index.js'; import * as promiseUtils from '../promise-utils.js'; function validateStrategies(issueKey, jiraClientAPI) { return jiraClientAPI.findIssue(issueKey) .then(content => issueStrats[content.fields.issuetype.name].apply(content, jiraClientAPI) ) .c...
import issueStrats from '../issue-strategies/index.js'; import * as promiseUtils from '../promise-utils.js'; function validateStrategies(issueKey, jiraClientAPI) { return jiraClientAPI.findIssue(issueKey) .then(content => { if (!issueStrats[content.fields.issuetype.name]) { return Promise.reject(new Erro...
Fix bug in no issue validation logic
Fix bug in no issue validation logic
JavaScript
mit
TWExchangeSolutions/jira-precommit-hook,DarriusWrightGD/jira-precommit-hook
761be726ceecbbd6857e1d229729ad78d327a685
src/utils/packetCodes.js
src/utils/packetCodes.js
module.exports = { // Packet constants PLAYER_START: "1", PLAYER_ADD: "2", PLAYER_ANGLE: "2", PLAYER_UPDATE: "3", PLAYER_ATTACK :"4", LEADERBOAD: "5", PLAYER_MOVE: "3", PLAYER_REMOVE: "4", LEADERS_UPDATE: "5", LOAD_GAME_OBJ: "6", GATHER_ANIM: "7", AUTO_ATK: "7", W...
module.exports = { // Packet constants PLAYER_START: "1", PLAYER_ADD: "2", PLAYER_ANGLE: "2", PLAYER_UPDATE: "3", PLAYER_ATTACK :"4", LEADERBOAD: "5", PLAYER_MOVE: "3", PLAYER_REMOVE: "4", LEADERS_UPDATE: "5", LOAD_GAME_OBJ: "6", PLAYER_UPGRADE: "6", GATHER_ANIM: "7",...
Add player upgrade packet code
Add player upgrade packet code
JavaScript
mit
wwwwwwwwwwwwwwwwwwwwwwwwwwwwww/m.io
c8de21c9a250922a26741e98d79df683ccdcaa65
www/src/app/pages/admin/organizations/list/organizations.page.controller.js
www/src/app/pages/admin/organizations/list/organizations.page.controller.js
'use strict'; import _ from 'lodash/core'; export default class OrganizationsPageController { constructor($log, OrganizationService) { 'ngInject'; this.$log = $log; this.OrganizationService = OrganizationService; } $onInit() { this.state = { showForm: false, formData: {} }; }...
'use strict'; import _ from 'lodash/core'; export default class OrganizationsPageController { constructor($log, OrganizationService, NotificationService, ModalService) { 'ngInject'; this.$log = $log; this.OrganizationService = OrganizationService; this.NotificationService = NotificationService; ...
Add confirmation dialog when enabling/disabling an organization
Add confirmation dialog when enabling/disabling an organization
JavaScript
agpl-3.0
CERT-BDF/Cortex,CERT-BDF/Cortex,CERT-BDF/Cortex,CERT-BDF/Cortex
d7070f4e55ba327ccce81de398d8a4ae66e38d06
blueprints/ember-cli-react/index.js
blueprints/ember-cli-react/index.js
/*jshint node:true*/ var pkg = require('../../package.json'); function getPeerDependencyVersion(packageJson, name) { var peerDependencies = packageJson.peerDependencies; return peerDependencies[name]; } module.exports = { description: 'Install ember-cli-react dependencies into your app.', normalizeEntityNa...
/*jshint node:true*/ var pkg = require('../../package.json'); function getDependencyVersion(packageJson, name) { var dependencies = packageJson.dependencies; var devDependencies = packageJson.devDependencies; return dependencies[name] || devDependencies[name]; } function getPeerDependencyVersion(packageJson, ...
Install `ember-auto-import` to Ember App during `ember install`
Install `ember-auto-import` to Ember App during `ember install`
JavaScript
mit
pswai/ember-cli-react,pswai/ember-cli-react
e2367d78b76e73a56ca7e1d04c87d6727a169397
lib/build/source-map-support.js
lib/build/source-map-support.js
/** * See https://github.com/evanw/node-source-map-support#browser-support * This is expected to be included in a browserify-module to give proper stack traces, based on browserify's source maps. */ require('source-map-support').install();
/** * See https://github.com/evanw/node-source-map-support#browser-support * This is expected to be included in a browserify-module to give proper stack traces, based on browserify's source maps. */ if (window.location.search.indexOf('disablesourcemaps') === -1) { require('source-map-support').install(); }
Add querystring flag to disable sourcemaps
Add querystring flag to disable sourcemaps
JavaScript
bsd-3-clause
splashblot/dronedb,codeandtheory/cartodb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,splashblot/dronedb,codeandtheory/cartodb,codeandtheory/cartodb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,codeandtheory/cartodb,codeandtheory/cartodb,CartoDB/cartodb
eed6ca7654f6b794eb2d8731838a8998fdd8d9ba
tests/config/karma.browserstack.conf.js
tests/config/karma.browserstack.conf.js
const base = require('./karma.base.conf'); module.exports = function(config) { config.set(Object.assign(base, { browserStack: { username: process.env.BROWSERSTACK_USERNAME, accessKey: process.env.BROWSERSTACK_ACCESS_KEY }, customLaunchers: { bs_safari_mac: { base: 'BrowserStack', browser: 'saf...
const base = require('./karma.base.conf'); module.exports = function(config) { config.set(Object.assign(base, { browserStack: { username: process.env.BROWSERSTACK_USERNAME, accessKey: process.env.BROWSERSTACK_ACCESS_KEY }, customLaunchers: { bs_safari_mac: { base: 'BrowserStack', browser: 'saf...
Add coverage reporter to browserstack build
Add coverage reporter to browserstack build
JavaScript
apache-2.0
weepower/wee-core
652f9ddc899d89f98c7f45a85ad81e90428cf922
packages/whosmysanta-backend/src/data/index.js
packages/whosmysanta-backend/src/data/index.js
import mongoose from 'mongoose'; const host = process.env.MONGO_HOST; const database = encodeURIComponent(process.env.MONGO_DATABASE); const user = encodeURIComponent(process.env.MONGO_USER); const password = encodeURIComponent(process.env.MONGO_PASS); export default function connectDatabase() { // Use node version...
import mongoose from 'mongoose'; const host = process.env.MONGO_HOST; const database = encodeURIComponent(process.env.MONGO_DATABASE); const user = encodeURIComponent(process.env.MONGO_USER); const password = encodeURIComponent(process.env.MONGO_PASS); // Use node version of Promise for mongoose mongoose.Promise = gl...
Move mongoose.Promise reassignment out of function
Move mongoose.Promise reassignment out of function
JavaScript
mit
WhosMySanta/app,WhosMySanta/app,WhosMySanta/whosmysanta
84220dd29e94cd40daf4d04c227a8e4c0d02cb93
lib/protobuf/imports/message.js
lib/protobuf/imports/message.js
'use strict'; Qt.include('call.js'); var createMessageType = (function() { var MessageBase = (function() { var constructor = function(descriptor) { this._descriptor = descriptor; this.serializeTo = function(output, cb) { try { output.descriptor = this._descriptor; var cal...
'use strict'; Qt.include('call.js'); var createMessageType = (function() { var MessageBase = (function() { var constructor = function(descriptor) { this._descriptor = descriptor; this.serializeTo = function(output, cb) { try { output.descriptor = this._descriptor; var cal...
Allow ommiting callback argument for serialize method
Allow ommiting callback argument for serialize method
JavaScript
mit
nsuke/protobuf-qml,nsuke/protobuf-qml,nsuke/protobuf-qml,nsuke/protobuf-qml
3c23af1029c081be78aed07725495eaf2d8506f5
src/App.js
src/App.js
import React, { Component } from 'react'; import Button from './components/Button.jsx'; export default class App extends Component { constructor() { super(); this.state = { selectedRange: 'bar', ranges: [] }; } handleClick = (foo) => { this.setState({selectedRange: foo}); }; render() ...
import React, { Component } from 'react'; import Button from './components/Button'; export default class App extends Component { constructor() { super(); this.state = { selectedRange: 'bar', ranges: [] }; } handleClick = (foo) => { this.setState({selectedRange: foo}); }; render() { ...
Remove unneeded component import extension
Remove unneeded component import extension
JavaScript
mit
monners/date-range-list,monners/date-range-list
01c0bc1440fb4c14a8ae49b667fba0ab09accbc8
src/components/Navbar/Navbar.js
src/components/Navbar/Navbar.js
import React from 'react'; import { Link } from 'react-router'; import './Navbar.scss'; export default class Navbar extends React.Component { render () { return ( <div className='navigation-items'> <Link className='links' to='/about'>About me</Link> <Link className='links' to='http://terak...
import React from 'react'; import { Link } from 'react-router'; import './Navbar.scss'; export default class Navbar extends React.Component { render () { return ( <div className='navigation-items'> <Link className='links' to='/about'>About me</Link> <a className='links' to='http://terakilo...
Change external Links to a tags
Change external Links to a tags
JavaScript
mit
terakilobyte/terakilobyte.github.io,terakilobyte/terakilobyte.github.io
dfc02887804e7c5b2ce1555677cff4cd4910391c
templates/base/environment.js
templates/base/environment.js
var config = { /* metrics: { port: 4001 } */ /* // For Passport auth via geddy-passport , passport: { twitter: { consumerKey: 'XXXXX' , consumerSecret: 'XXXXX' } , facebook: { clientID: 'XXXXX' , clientSecret: 'XXXXX' } } */ }; module.exports = config;
var config = { /* metrics: { port: 4001 } */ /* // For Passport auth via geddy-passport , passport: { successRedirect: '/' , failureRedirect: '/login' , twitter: { consumerKey: 'XXXXX' , consumerSecret: 'XXXXX' } , facebook: { clientID: 'XXXXX' , clientSecret: 'XXXXX' }...
Add success/failure redirects to Passport config
Add success/failure redirects to Passport config
JavaScript
apache-2.0
kolonse/ejs,mmis1000/ejs-promise,rpaterson/ejs,cnwhy/ejs,xanxiver/ejs,cnwhy/ejs,mde/ejs,TimothyGu/ejs-tj,TimothyGu/ejs-tj,jtsay362/solveforall-ejs2,operatino/ejs,tyduptyler13/ejs,insidewarehouse/ejs,zensh/ejs,kolonse/ejs,zensh/ejs,insidewarehouse/ejs
a5747b9e826d79342b54d08857b57cb523e9225f
javascripts/ai.js
javascripts/ai.js
var AI; AI = function(baseSpeed) { this.baseSpeed = baseSpeed; }; // Simply follows the ball at all times AI.prototype.easy = function(player, ball) { 'use strict'; var newY; newY = ball.y - (player.paddle.y + player.paddle.height / 2); if (newY < 0 && newY < -4) { newY = -this.baseSpeed; } else if (n...
var AI; AI = function(baseSpeed) { this.baseSpeed = baseSpeed; }; // Simply follows the ball at all times AI.prototype.easy = function(player, ball) { 'use strict'; var newY; newY = ball.y - (player.paddle.y + player.paddle.height / 2); if (newY < -4) { newY = -this.baseSpeed; } else if (newY > 4) { ...
Remove unnecessary ball speed checks
Remove unnecessary ball speed checks
JavaScript
mit
msanatan/pong,msanatan/pong,msanatan/pong
17d1c09accef6235dd29b4fd7f7bc25392092944
app/assets/javascripts/ng-app/app.js
app/assets/javascripts/ng-app/app.js
angular.module('myApp', [ 'ngAnimate', 'ui.router', 'templates' ]) .config(function($stateProvider, $urlRouterProvider, $locationProvider) { /** * Routes and States */ $stateProvider .state('home', { url: '/', templateUrl: 'home.html', controller: 'HomeCtrl' ...
angular.module('myApp', [ 'ngAnimate', 'ui.router', 'templates' ]) .config(function ($stateProvider, $urlRouterProvider, $locationProvider) { /** * Routes and States */ $stateProvider .state('home', { url: '/', templateUrl: 'home.html', controller: 'HomeCtrl' ...
Remove html5mode since it was causing an error and looking for a base tag
Remove html5mode since it was causing an error and looking for a base tag
JavaScript
mit
jeremymcintyre/rails-angular-sandbox,jeremymcintyre/rails-angular-sandbox,jeremymcintyre/rails-angular-sandbox
4ee7bc82b1282e718f88ba36ca2f7236f0019273
server/db/schemas/User.js
server/db/schemas/User.js
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const userSchema = new Schema({ _id: { type: Number }, profileImageName: { type: String, default: 'default.png' }, email: { type: String, unique: true }, phoneNumber: { type: String }, name: { first: { type: String, trim:...
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const userSchema = new Schema({ _id: { type: Number }, profileImageName: { type: String, default: 'default.png' }, email: { type: String, unique: true }, age: { type: Number, min: 10, max: 100 }, grade: { type: Number, min: 8, ma...
Update user schema for application merge
Update user schema for application merge
JavaScript
mit
KidsTales/kt-web,KidsTales/kt-web
d45df4a5745c2bb3f5301f7a0ef587a3c5a73594
assets/js/util/is-site-kit-screen.js
assets/js/util/is-site-kit-screen.js
/** * Utility function to check whether or not a view-context is a site kit view. * * Site Kit by Google, Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
/** * Utility function to check whether or not a view-context is a site kit view. * * Site Kit by Google, Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
Use vanilla includes function. Correct capitalisation.
Use vanilla includes function. Correct capitalisation.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
4bbc355d992c2998f93058770d9f29faf3d9bc11
generators/project/templates/config/_eslintrc_webapp.js
generators/project/templates/config/_eslintrc_webapp.js
module.exports = { env: { amd: <%= (moduleFormat === 'amd') %>, commonjs: <%= (moduleFormat === 'commonjs') %>, es6: true, browser: true, jquery: true, mocha: <%= !useJest %>, jest: <%= useJest %> }, globals: { sinon: true }, extends: '...
module.exports = { env: { amd: <%= (moduleFormat === 'amd') %>, commonjs: <%= (moduleFormat === 'commonjs') %>, es6: true, browser: true, jquery: true, mocha: <%= !useJest %>, jest: <%= !!useJest %> }, globals: { sinon: true }, extends:...
Fix jest env template value
Fix jest env template value
JavaScript
mit
jhwohlgemuth/generator-techtonic,jhwohlgemuth/generator-techtonic,omahajs/generator-omaha,omahajs/generator-omaha,omahajs/generator-omaha,jhwohlgemuth/generator-techtonic,omahajs/generator-omaha
d7cbc2ec2c2e73d9f885ee0de8f395c0fdcbd24b
ui/features/lti_collaborations/index.js
ui/features/lti_collaborations/index.js
/* * Copyright (C) 2014 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
/* * Copyright (C) 2014 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
Fix lti collaborations page unresponsive on load in chrome
Fix lti collaborations page unresponsive on load in chrome fixes VICE-2440 flag=none Test Plan: - follow repro steps in linked ticket Change-Id: I9b682719ea1e258f98caf90a197167a031995f7b Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284881 Reviewed-by: Jeffrey Johnson <7a0f98bfe168bc29d5611ba0275e88567...
JavaScript
agpl-3.0
instructure/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,sfu/canvas-lms
b25d54624f98726483c25a4f5f25419b1ae42660
timeout.js
timeout.js
'use strict'; /*jslint node: true, es5: true, indent: 2 */ var util = require('util'); var stream = require('stream'); var TimeoutDetector = module.exports = function(opts) { if (opts === undefined) opts = {}; // opts = {[timeout: 60 (seconds)]} stream.Transform.call(this, opts); if (opts.timeout !== undefine...
'use strict'; /*jslint node: true, es5: true, indent: 2 */ var util = require('util'); var stream = require('stream'); var TimeoutDetector = module.exports = function(opts) { if (!opts || !opts.timeout) throw new Error('TimeoutDetector({timeout: ...}) is a required parameter.'); stream.Transform.call(this, opts); ...
Trim down defaults out of TimeoutDetector.
Trim down defaults out of TimeoutDetector.
JavaScript
mit
chbrown/twilight,chbrown/twilight,chbrown/tweetjobs
17e1e14851112344b59b366676b3378ae09e798a
src/actions/action-creators.js
src/actions/action-creators.js
import dispatcher from '../dispatcher/dispatcher'; import actionTypes from '../constants/action-types'; import axios from 'axios'; import { apiConstants } from '../constants/api-constants'; const { baseURL, apiKey, userName } = apiConstants; export function fetchUser() { let getUserInfo = axios.create({ ...
import dispatcher from '../dispatcher/dispatcher'; import actionTypes from '../constants/action-types'; import axios from 'axios'; import { apiConstants } from '../constants/api-constants'; const { baseURL, apiKey, userName } = apiConstants; export function fetchUser() { let getUserInfo = axios.create({ ...
Add ‘limit’ parameter to the fetchRecentTracks action to set the number of recent tracks to be retrieved
Add ‘limit’ parameter to the fetchRecentTracks action to set the number of recent tracks to be retrieved
JavaScript
bsd-3-clause
jeromelachaud/Last.fm-Activities-React,jeromelachaud/Last.fm-Activities-React
0104841e84a3cdd1019f416678621e7bd9606802
src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/editor/select-cell-radio-editor.js
src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/editor/select-cell-radio-editor.js
/*global define*/ define([ 'underscore', 'backgrid' ], function (_, Backgrid) { 'use strict'; var SelectCellRadioEditor; SelectCellRadioEditor = Backgrid.SelectCellEditor.extend({ /** * @inheritDoc */ tagName: "div", /** * @inheritDoc */...
/*global define*/ define([ 'underscore', 'backgrid' ], function (_, Backgrid) { 'use strict'; var SelectCellRadioEditor; SelectCellRadioEditor = Backgrid.SelectCellEditor.extend({ /** * @inheritDoc */ tagName: "ul class='icons-ul'", /** * @inheri...
Create editor for input=radio, apply it in select-cell - fix radio buttons
BB-701: Create editor for input=radio, apply it in select-cell - fix radio buttons
JavaScript
mit
2ndkauboy/platform,trustify/oroplatform,geoffroycochard/platform,northdakota/platform,ramunasd/platform,Djamy/platform,2ndkauboy/platform,trustify/oroplatform,orocrm/platform,geoffroycochard/platform,hugeval/platform,geoffroycochard/platform,Djamy/platform,hugeval/platform,orocrm/platform,Djamy/platform,northdakota/pla...
752b6fa627271582c8facb56c80d65ae5cd246f9
lib/parse-args.js
lib/parse-args.js
var minimist = require('minimist') var xtend = require('xtend') module.exports = parseArgs function parseArgs (args, opt) { var argv = minimist(args, { boolean: [ 'stream', 'debug', 'errorHandler', 'forceDefaultIndex', 'open', 'portfind', 'ndjson', 'verbose', ...
var minimist = require('minimist') var xtend = require('xtend') module.exports = parseArgs function parseArgs (args, opt) { var argv = minimist(args, { boolean: [ 'stream', 'debug', 'errorHandler', 'forceDefaultIndex', 'open', 'portfind', 'pushstate', 'ndjson', ...
Add pushstate flags to booleans
Add pushstate flags to booleans
JavaScript
mit
msfeldstein/budo,mattdesl/budo,msfeldstein/budo,mattdesl/budo
bacca2639a4f76be79fff09a4442b3be9ecf861c
app/components/session-verify.js
app/components/session-verify.js
import Component from '@ember/component'; import { inject as service } from '@ember/service'; import { task } from 'ember-concurrency'; export default Component.extend({ router: service(), currentUser: service(), store: service(), flashMessages: service(), verifySessionModal: false, verifySessionModalError...
import Component from '@ember/component'; import { inject as service } from '@ember/service'; import { task } from 'ember-concurrency'; export default Component.extend({ router: service(), currentUser: service(), store: service(), flashMessages: service(), verifySessionModal: false, verifySessionModalError...
Move to reports on Session verification
Move to reports on Session verification
JavaScript
bsd-2-clause
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
ddd9683976e6c41e6e6e2bd9de58232fabc2197b
portal/js/app.js
portal/js/app.js
var App = Ember.Application.create({ LOG_TRANSITIONS: true, LOG_TRANSITIONS_INTERNAL: true }); App.ApplicationAdapter = DS.RESTAdapter.extend({ host: 'https://website-api.withregard.io', namespace: 'v1' }); App.ApplicationSerializer = DS.RESTSerializer.extend({ primaryKey: '_id', serializeHasMany: functio...
var App = Ember.Application.create({ LOG_TRANSITIONS: true, LOG_TRANSITIONS_INTERNAL: true }); App.ApplicationAdapter = DS.RESTAdapter.extend({ host: 'https://website-api.withregard.io', namespace: 'v1', ajax: function(url, method, hash) { hash.xhrFields = {withCredentials: true}; return this._super(...
Send cookies with AJAX requests
Send cookies with AJAX requests
JavaScript
apache-2.0
with-regard/regard-website
f147f649aaad040522d93becb2a7bc845494fc76
gemini/index.js
gemini/index.js
gemini.suite('CSS component', (suite) => { suite.setUrl('/?selectedKind=CSS%20component&selectedStory=default') .setCaptureElements('#storybook-preview-iframe') .capture('plain'); }); gemini.suite('Stateless functional component', (suite) => { suite.setUrl('/?selectedKind=Stateless%20functional%20component...
gemini.suite('CSS component', (suite) => { suite.setUrl('/iframe.html?selectedKind=CSS%20component&selectedStory=default') .setCaptureElements('body') .before((actions) => { actions.setWindowSize(1024, 768); }) .capture('plain'); }); gemini.suite('Stateless functional component', (suite) => { ...
Test the frame contents directly
Test the frame contents directly
JavaScript
mit
z-kit/component,z-kit/z-hello,z-kit/component,z-kit/z-hello
c623338be8d8ffe4771d670dc63d3ecaa8c1e43d
test/resources/queue/handler.js
test/resources/queue/handler.js
import test from 'ava' import { assert } from '../../utils/chai' import { normalizeHandler } from '../../utils/normalizer' import * as queue from '../../../src/resources/queue/handler' const create = normalizeHandler(queue.create) const show = normalizeHandler(queue.show) const queueMock = { name: 'test-queue', u...
import test from 'ava' import { assert } from '../../utils/chai' import { normalizeHandler } from '../../utils/normalizer' import * as queue from '../../../src/resources/queue/handler' const create = normalizeHandler(queue.create) const show = normalizeHandler(queue.show) const queueMock = { name: 'test-queue', u...
Remove unwanted only from tests
Remove unwanted only from tests
JavaScript
mit
vcapretz/superbowleto,vcapretz/superbowleto
c94b627360ff4801d64e676e3714faa9a3490c40
app/scripts/services/webservice.js
app/scripts/services/webservice.js
'use strict'; /** * @ngdoc service * @name dockstore.ui.WebService * @description * # WebService * Constant in the dockstore.ui. */ angular.module('dockstore.ui') .constant('WebService', { API_URI: 'http://www.dockstore.org:8080', API_URI_DEBUG: 'http://www.dockstore.org/tests/dummy-data', GITHUB_...
'use strict'; /** * @ngdoc service * @name dockstore.ui.WebService * @description * # WebService * Constant in the dockstore.ui. */ angular.module('dockstore.ui') .constant('WebService', { API_URI: 'http://www.dockstore.org:8080', API_URI_DEBUG: 'http://www.dockstore.org/tests/dummy-data', GITHUB_...
Add Dockstore CLI Release URL config.
Add Dockstore CLI Release URL config.
JavaScript
apache-2.0
ga4gh/dockstore-ui,ga4gh/dockstore-ui,ga4gh/dockstore-ui
530467c4840fcd528cd836d1e25fa3174c6b3b9e
extension/keysocket-yandex-music.js
extension/keysocket-yandex-music.js
var playTarget = '.b-jambox__play'; var nextTarget = '.b-jambox__next'; var prevTarget = '.b-jambox__prev'; function onKeyPress(key) { if (key === PREV) { simulateClick(document.querySelector(prevTarget)); } else if (key === NEXT) { simulateClick(document.querySelector(nextTarget)); } else ...
var playTarget = '.player-controls__btn_play'; var nextTarget = '.player-controls__btn_next'; var prevTarget = '.player-controls__btn_prev'; function onKeyPress(key) { if (key === PREV) { simulateClick(document.querySelector(prevTarget)); } else if (key === NEXT) { simulateClick(document.queryS...
Update locators for redesigned Yandex Music
Update locators for redesigned Yandex Music
JavaScript
apache-2.0
borismus/keysocket,iver56/keysocket,feedbee/keysocket,vinyldarkscratch/keysocket,feedbee/keysocket,borismus/keysocket,noelmansour/keysocket,kristianj/keysocket,ALiangLiang/keysocket,kristianj/keysocket,chrisdeely/keysocket,legionaryu/keysocket,vladikoff/keysocket,vinyldarkscratch/keysocket,Whoaa512/keysocket
b94a452d4030829731047014cefa4f178591f891
src/scripts/plugins/Storage.js
src/scripts/plugins/Storage.js
class Storage extends Phaser.Plugin { constructor (game, parent) { super(game, parent); } init (name) { localforage.config({ name }); } // -------------------------------------------------------------------------- fetch (key, callback = () => {}, context = null) { localforage.getItem(key, th...
class Storage extends Phaser.Plugin { constructor (game, parent) { super(game, parent); } init (name, version = '1.0') { localforage.config({ name, version }); } // -------------------------------------------------------------------------- fetch (key, callback = () => {}, context = null) { l...
Allow an extra argument to be passed, identifying the storage version in use.
Allow an extra argument to be passed, identifying the storage version in use.
JavaScript
mit
rblopes/heart-star,rblopes/heart-star