commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
ff95f103ac755324d36b4d3a60a61ad8014e9ce9
src/web3.js
src/web3.js
import Web3 from 'web3'; const web3 = new Web3(); export default web3; export const initWeb3 = (web3) => { if (window.web3) { web3.setProvider(window.web3.currentProvider); } else { web3.setProvider(new Web3.providers.HttpProvider('https://mainnet.infura.io/')); } window.web3 = web3; }
import Web3 from 'web3'; const web3 = new Web3(); export default web3; export const initWeb3 = (web3) => { if (window.web3) { web3.setProvider(window.web3.currentProvider); } else { web3.setProvider(new Web3.providers.HttpProvider('https://mainnet.infura.io/Tl5m5gSA2IY0XJe9BWrS')); } window.web3 = we...
Add api key... will have to remove eventually
Add api key... will have to remove eventually
JavaScript
mit
nanexcool/feeds,nanexcool/feeds
d3296125920a838a56c68ca2da1e9f9b4216bc03
preTest.js
preTest.js
//makes the bdd interface available (describe, it before, after, etc if(Meteor.settings.public.mocha_setup_args) { mocha.setup(Meteor.settings.public.mocha_setup_args); } else { mocha.setup("bdd"); }
//makes the bdd interface available (describe, it before, after, etc if(Meteor.settings && Meteor.settings.public.mocha_setup_args) { mocha.setup(Meteor.settings.public.mocha_setup_args); } else { mocha.setup("bdd"); }
Fix for when Mocha.settings are not available
Fix for when Mocha.settings are not available
JavaScript
mit
kelbongoo/meteor-mocha-web,abernix/meteor-mocha-web,mad-eye/meteor-mocha-web,mad-eye/meteor-mocha-web,kelbongoo/meteor-mocha-web,abernix/meteor-mocha-web
ba64925e6c6b07b42f8a28b9a141e1ada42c3550
src/components/MainNav/Breadcrumbs/Breadcrumbs.js
src/components/MainNav/Breadcrumbs/Breadcrumbs.js
import React from 'react'; import css from './Breadcrumbs.css'; const propTypes = { links: React.PropTypes.array, }; function Breadcrumbs(props) { const links = props.links.map((link, i) => { const linkElem = <li key={`breadcrumb_${i}`}><a href={link.path}>{link.label}</a></li>; const dividerElem = <li ke...
import React from 'react'; import css from './Breadcrumbs.css'; const propTypes = { links: React.PropTypes.array, }; function Breadcrumbs(props) { const links = props.links.map((link, i) => { // eslint-disable-next-line react/no-array-index-key const linkElem = <li key={`breadcrumb_${i}`}><a href={link.pa...
Add eslint-disable-next-line comments to get rid of excessively pedantic react/no-array-index-key errors.
Add eslint-disable-next-line comments to get rid of excessively pedantic react/no-array-index-key errors.
JavaScript
apache-2.0
folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core
470c616cf598fb14842d8326d6fe416952b79d8a
test/common.js
test/common.js
'use strict'; const hookModule = require("../src/"); class TallyHook extends hookModule.Hook { preProcess(thing) { thing.preTally = thing.preTally + 1; return true; } postProcess(thing) { thing.postTally = thing.postTally + 1; } } module.exports = { TallyHook };
'use strict'; const hookModule = require("../src/"); class TallyHook extends hookModule.Hook { preProcess(thing) { thing.preTally = thing.preTally + 1; return true; } postProcess(thing) { thing.postTally = thing.postTally + 1; } } class DelayableHook extends hookModule.Hook { constructor(optio...
Add a DelayedHook test class.
Add a DelayedHook test class.
JavaScript
mit
StevenBlack/hooks-and-anchors
e49fd692e1281f91164d216708befd81a1a3c102
test/simple.js
test/simple.js
var test = require("tape") var crypto = require('crypto') var cryptoB = require('../') var assert = require('assert') function assertSame (fn) { test(fn.name, function (t) { fn(crypto, function (err, expected) { fn(cryptoB, function (err, actual) { t.equal(actual, expected) t.end() }...
var test = require("tape") var crypto = require('crypto') var cryptoB = require('../') function assertSame (fn) { test(fn.name, function (t) { t.plan(1) fn(crypto, function (err, expected) { fn(cryptoB, function (err, actual) { t.equal(actual, expected) t.end() }) }) }) } ...
Use tape for asserts to better detect callbacks not being fired
Use tape for asserts to better detect callbacks not being fired
JavaScript
mit
crypto-browserify/crypto-browserify,crypto-browserify/crypto-browserify
4da17d2e30b07b73de2a5d7b548ca8ed4b9bc4f2
src/utils/hex-generator.js
src/utils/hex-generator.js
const hexWidth = 50; const hexPadding = 2; export default ({ width, height, columns, rows, renderSector }) => { const hexWidthUnit = hexWidth / 4; const hexHeight = (Math.sqrt(3) / 2) * hexWidth; const hexHeightUnit = hexHeight / 2; const hexArray = []; let isWithinHeight = true; let isWithinWidth = true; ...
const defaultHexWidth = 50; const hexPadding = 2; export default ({ width, height, columns, rows, renderSector }) => { const scaledWidth = Math.min(height / (rows + 4), width / (columns + 4)); const horizHexOffset = Math.ceil((((width / scaledWidth) / (Math.sqrt(3) / 2)) - columns) / 2); const vertHexOffset = Ma...
Put the sector in the middle of the hex grid (very crude)
Put the sector in the middle of the hex grid (very crude)
JavaScript
mit
mpigsley/sectors-without-number,mpigsley/sectors-without-number
31663486624635748d6f2202504b0a187a102fcd
RcmBrightCoveLib/public/keep-aspect-ratio.js
RcmBrightCoveLib/public/keep-aspect-ratio.js
/** * This script keeps the height set on elements with regard to their * width for a given aspect ratio. Great for "display:block" elements * * Example usage: * * <div data-keep-aspect-ratio="16:9"> * * Author: Rod McNew * License: BSD */ new function () { var setHeights = function () { $.each($(...
/** * This script keeps the height set on elements with regard to their * width for a given aspect ratio. Great for "display:block" elements * * Example usage: * * <div data-keep-aspect-ratio="16:9"> * * Author: Rod McNew * License: BSD */ new function () { var setHeights = function () { $.each($(...
Fix for brightcove player when orintation is changed
Fix for brightcove player when orintation is changed
JavaScript
bsd-3-clause
jerv13/RcmPlugins,jerv13/RcmPlugins,bjanish/RcmPlugins,jerv13/RcmPlugins,innaDa/RcmPlugins,innaDa/RcmPlugins,innaDa/RcmPlugins,bjanish/RcmPlugins,bjanish/RcmPlugins
c57a584a3bc781db629ae15dd2912f62992f98f3
Resources/private/js/sylius-auto-complete.js
Resources/private/js/sylius-auto-complete.js
/* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ (function ( $ ) { 'use strict'; $.fn.extend({ autoComplete: function () { var el...
/* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ (function ( $ ) { 'use strict'; $.fn.extend({ autoComplete: function () { var el...
Use collection instead of array in all transformers, also use map method
[Resource][Core] Use collection instead of array in all transformers, also use map method
JavaScript
mit
Sylius/SyliusUiBundle,Sylius/SyliusUiBundle
62b292ddf6a6fb71097c5cfa527b625366c46a3f
src/components/slide/index.js
src/components/slide/index.js
import React, { Component, PropTypes } from 'react'; require('./slide.scss'); class Slide extends Component { render() { return ( <div className="slide"> <header className="slide__header"> <h1 className="slide__title">{this.props.title}</h1> ...
import React, { Component, PropTypes } from 'react'; require('./slide.scss'); class Slide extends Component { constructor(props) { super(props); this.isViewable = this.isViewable.bind(this); } isViewable() { return this.props.current === +this.props.order; } render() { ...
Make slide viewable based on current and order
feature: Make slide viewable based on current and order A slide will be viewable only if the current property matches the order property.
JavaScript
mit
leadiv/react-slides,leadiv/react-slides
daed42ff845baa2abf1e0fd180d7fb0eb2a13b3d
lib/cli/file-set-pipeline/log.js
lib/cli/file-set-pipeline/log.js
/** * @author Titus Wormer * @copyright 2015 Titus Wormer * @license MIT * @module mdast:cli:log * @fileoverview Log a file context on successful completion. */ 'use strict'; /* * Dependencies. */ var report = require('vfile-reporter'); /** * Output diagnostics to stdout(4) or stderr(4). * * @param {CLI}...
/** * @author Titus Wormer * @copyright 2015 Titus Wormer * @license MIT * @module mdast:cli:log * @fileoverview Log a file context on successful completion. */ 'use strict'; /* * Dependencies. */ var report = require('vfile-reporter'); /** * Output diagnostics to stdout(4) or stderr(4). * * @param {CLI}...
Move all info output of mdast(1) to stderr(4)
Move all info output of mdast(1) to stderr(4) This changes moves all reporting output, even when not including failure messages, from stout(4) to stderr(4). Thus, when piping only stdout(4) from mdast(1) into a file, only the markdown is written. Closes GH-47.
JavaScript
mit
ulrikaugustsson/mdast,eush77/remark,chcokr/mdast,ulrikaugustsson/mdast,yukkurisinai/mdast,tanzania82/remarks,yukkurisinai/mdast,wooorm/remark,chcokr/mdast,eush77/remark
38c8a46baee9cd61571cf26ba9c3942a98f3ce92
src/js/stores/ArrangeStore.js
src/js/stores/ArrangeStore.js
import { action, computed } from 'mobx' import { moveTabs, tabComparator } from '../libs' export default class ArrangeStore { constructor (store) { this.store = store } @computed get urlTabMap () { return this.store.windowStore.tabs.reduce((acc, tab) => { const { url } = tab acc[url] = acc...
import { action, computed } from 'mobx' import { moveTabs, tabComparator } from '../libs' const urlPattern = /.*:\/\/[^/]*/ const getDomain = (url) => { const matches = url.match(urlPattern) if (matches) { return matches[0] } return url } export default class ArrangeStore { constructor (store) { thi...
Update sortTabs to group tabs by domain then sort in window
Update sortTabs to group tabs by domain then sort in window
JavaScript
mit
xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2
bdca4d4b6b04ad011a25fd913ec4c7ed2ed04b1d
react/components/Onboarding/components/UI/CTAButton/index.js
react/components/Onboarding/components/UI/CTAButton/index.js
import theme from 'react/styles/theme'; import GenericButton from 'react/components/UI/GenericButton'; import styled from 'styled-components'; const CTAButton = styled(GenericButton).attrs({ f: 6, })` margin-top: ${theme.space[6]} `; export default CTAButton;
import GenericButton from 'react/components/UI/GenericButton'; import styled from 'styled-components'; const CTAButton = styled(GenericButton).attrs({ f: 6 })` margin-top: ${x => x.theme.space[6]} `; export default CTAButton;
Use theme propeties in CTAButton styled component
Use theme propeties in CTAButton styled component
JavaScript
mit
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
06b9ff1d0759d289ae70fbd9717cf8129e3485bc
pages/home/index.js
pages/home/index.js
/** * React Static Boilerplate * https://github.com/kriasoft/react-static-boilerplate * * Copyright © 2015-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React, { PropTypes }...
/** * React Static Boilerplate * https://github.com/kriasoft/react-static-boilerplate * * Copyright © 2015-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React, { PropTypes }...
Fix React warning on the home page (add key attribute to list items)
Fix React warning on the home page (add key attribute to list items)
JavaScript
mit
raffidil/garnanain,koistya/react-static-boilerplate,jamesrf/weddingwebsite,kyoyadmoon/fuzzy-hw1,gadflying/profileSite,RyanGosden/react-poll,srossross-tableau/hackathon,kyoyadmoon/fuzzy-hw1,leo60228/HouseRuler,jamesrf/weddingwebsite,gadflying/profileSite,leo60228/HouseRuler,RyanGosden/react-poll,kriasoft/react-static-bo...
5afa1a697da48fb473d0e19fe6e5dbfc6913ca75
src/common/analytics/index.js
src/common/analytics/index.js
/** * Dependencies. */ let NullAnalytics = require('./NullAnalytics'); let Tracker = require('./Tracker'); /** * Constants. */ const ANALYTICS_KEY = process.env.ANALYTICS_KEY; /** * Locals. */ let enableAnalytics = window.ProductHuntAnalytics && ANALYTICS_KEY; let ProductHuntAnalytics = enableAnalytics ? win...
/** * Dependencies. */ let NullAnalytics = require('./NullAnalytics'); let Tracker = require('./Tracker'); /** * Constants. */ const ANALYTICS_KEY = process.env.ANALYTICS_KEY; /** * Locals. * * Note(andreasklinger): window.ProductHuntAnalytics gets set by a custom built of the analytics.js * To recreate t...
Add note to explain where the custom name comes from
Add note to explain where the custom name comes from
JavaScript
isc
producthunt/producthunt-chrome-extension,producthunt/producthunt-chrome-extension
998601c34ba9537fa6230232379c1efad84e17bb
routes/new.js
routes/new.js
// This route will save the given url into the database // returning its "shorter" version var router = require('express').Router(); var isValid = require('valid-url').isWebUri; router.get('/http://:url', function(req, res) { var json = {}; json.original = 'http://' + req.params.url; json.shorter = getShor...
// This route will save the given url into the database // returning its "shorter" version var router = require('express').Router(); var isValid = require('valid-url').isWebUri; // Using GET parameters in place of something like "/:url", because // with this last solution the server is fooled by the "http" in the // m...
Reduce code duplication using GET params
Reduce code duplication using GET params Replaced the two routes, one for http and another one for https, using GET parameter ?url=
JavaScript
mit
clobrano/fcc-url-shortener-microservice,clobrano/fcc-url-shortener-microservice
ede5962c9926c8a852ccbc307e3a970ede4d6954
build/server.js
build/server.js
console.time('Starting server'); require('promise-helpers'); var fs = require('fs'); var path = require('path'); var express = require('express'); var app = express(); /** * Serve static files such as css, js, images */ app.use('/images', express.static('dist/assets/images')); app.use('/javascripts', express.static...
console.time('Starting server'); require('promise-helpers'); var fs = require('fs'); var path = require('path'); var express = require('express'); var app = express(); /** * Serve static files such as css, js, images */ app.use('/images', express.static('dist/assets/images')); app.use('/javascripts', express.static...
Fix broken path to css caused by previous commit
Fix broken path to css caused by previous commit
JavaScript
mit
LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements
8712432a2c9d555ecdbae0b9c549f6554dd9be6d
assets/materialize/js/init.js
assets/materialize/js/init.js
(function($){ $(function(){ $('.button-collapse').sideNav(); }); // end of document ready })(jQuery); // end of jQuery name space // Keep one tab expanded while editing profile $('li div.collapsible-header').on('click',function(e){ if($(this).parents('li').hasClass('active')){ e.stopPropagation(); } ...
(function($){ $(function(){ $('.button-collapse').sideNav(); }); // end of document ready })(jQuery); // end of jQuery name space // Keep one tab expanded while editing profile /*$('li div.collapsible-header').on('click',function(e){ if($(this).parents('li').hasClass('active')){ e.stopPropagation(); ...
Allow collapse all accordion tabs in profileeditor
Allow collapse all accordion tabs in profileeditor
JavaScript
mit
VoodooWorks/profile-cms,VoodooWorks/profile-cms,VoodooWorks/profile-cms
4e7eaa000c897c36ed6cdbea6e5e53d49b2b2a76
src/components/pages/PatientsSummary/header/PTCustomCheckbox.js
src/components/pages/PatientsSummary/header/PTCustomCheckbox.js
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { Col } from 'react-bootstrap'; const PTCustomCheckbox = ({ title, name, isChecked, disabled = false, onChange }) => { const toggleCheckbox = () => !disabled && onChange(name); return <Col xs={6} sm={4}> ...
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { Col } from 'react-bootstrap'; const PTCustomCheckbox = ({ title, name, isChecked, disabled = false, onChange }) => { const toggleCheckbox = () => !disabled && onChange(name); return <Col xs={6} sm={4}> ...
Fix checkboxes for Patient Summary.
Fix checkboxes for Patient Summary.
JavaScript
apache-2.0
PulseTile/PulseTile-React,PulseTile/PulseTile-React,PulseTile/PulseTile-React
f0e7098f88d7ceeae02ba60bb484f4cfa266bce7
src/plugins.js
src/plugins.js
/* @flow */ export const inMemory = (data : Object, transition : Function) => { let rootState = data; const read = () => rootState; const write = (fn : Function) => { const oldState = read(); const newState = fn(oldState); transition(oldState, newState); rootState = newState; return read(); ...
/* @flow */ export const inMemory = (initial : Object, transition : Function) => { let rootState = initial; const read = () => rootState; const write = (fn : Function) => { const oldState = read(); const newState = fn(oldState); transition(oldState, newState); rootState = newState; return rea...
Rename data prop to initial
Rename data prop to initial
JavaScript
mit
jameshopkins/atom-store,jameshopkins/atom-store
6505b754bc31ce4062d1a4c2eecc172636dbba64
src/components/Node.js
src/components/Node.js
import React, { PropTypes } from 'react'; import { StyleSheet, css } from 'aphrodite'; const styles = StyleSheet.create({ node: { cursor: 'move', }, }); const renderState = (state, index) => ( <text key={state} x="5" y={37 + (18 * index)}> <tspan>{state}</tspan> <tspan x="155" textAnchor="end">99.9<...
import React, { PropTypes } from 'react'; import { StyleSheet, css } from 'aphrodite'; const styles = StyleSheet.create({ node: { cursor: 'move', userSelect: 'none', }, }); const renderState = (state, index) => ( <text key={state} x="5" y={37 + (18 * index)}> <tspan>{state}</tspan> <tspan x="155...
Fix selecting node text when moving
Fix selecting node text when moving
JavaScript
mit
fhelwanger/bayesjs-editor,fhelwanger/bayesjs-editor
bbf64c4d45fc83b5143951f79f2a9c25d757cd65
addon/components/outside-click/component.js
addon/components/outside-click/component.js
import Ember from 'ember' import layout from './template' import PropTypeMixin, { PropTypes } from 'ember-prop-types' const { K } = Ember export default Ember.Component.extend(PropTypeMixin, { layout, propTypes: { onOutsideClick: PropTypes.func }, getDefaultProps() { return { onOutsideClick: K } ...
import Ember from 'ember' import layout from './template' import PropTypeMixin, { PropTypes } from 'ember-prop-types' const { K } = Ember export default Ember.Component.extend(PropTypeMixin, { layout, propTypes: { onOutsideClick: PropTypes.func }, getDefaultProps() { return { onOutsideClick: K } ...
Move destroy checks just before set
Move destroy checks just before set
JavaScript
mit
nucleartide/ember-outside-click,nucleartide/ember-outside-click
ec5e284f43cd890a2d24f775f77f0fc5f3810dfc
src/App.js
src/App.js
import React from 'react'; import './App.css'; import logo from './logo.png'; export default function App() { return ( <div> <h1> Welcome to <img src={logo} className="App--logo" alt="React logo" /> React </h1> <p> To get started, edit <code>src/App.js</code> and...
import React from 'react'; import './App.css'; import logo from './logo.png'; export default function App() { return ( <div> <h1> Welcome to <img src={logo} className="App--logo" alt="logo" /> React </h1> <p> To get started, edit <code>src/App.js</code> and save to reload. ...
Make it fit in one line
Make it fit in one line
JavaScript
bsd-3-clause
emvu/create-react-app,HelpfulHuman/helpful-react-scripts,Timer/create-react-app,christiantinauer/create-react-app,yosharepoint/react-scripts-ts-sp,powerreviews/create-react-app,CodingZeal/create-react-app,lolaent/create-react-app,xiaohu-developer/create-react-app,HelpfulHuman/helpful-react-scripts,andyeskridge/create-r...
e96df96e13e47ab983fbdbcf58bd00ebd0ff9e5b
public/js/layout.js
public/js/layout.js
var fixedWidth = 220; var minWidth = 660; var fixedPadding = 100; function layoutWidth() { var wWidth = $(window).width(); var bodyPadding = Math.max(Math.floor(wWidth / fixedWidth)-3, 1) * 100; if ($(".container").length) { var width = wWidth - bodyPadding; var newWidth = Math.floor(w...
var fixedWidth = 220; var minWidth = 660; var fixedPadding = 100; var delayResize = null; function layoutWidth() { var wWidth = $(window).width(); var bodyPadding = Math.max(Math.floor(wWidth / fixedWidth)-3, 1) * 100; if ($(".container").length) { var width = wWidth - bodyPadding; var...
Add timeout when resizing container (prevent close multicall that can cause performance issue)
Add timeout when resizing container (prevent close multicall that can cause performance issue)
JavaScript
mit
hernantas/MangaReader,hernantas/MangaReader,hernantas/MangaReader
3fd410806d1f9cc2f922efde78539671306bd739
server/app.js
server/app.js
Meteor.startup(function () { Tiqs._ensureIndex({text: 1}); }); Meteor.methods({ associateTags: function(text, tags) { Tiqs.upsert({text: text}, {$addToSet: {tags: {$each: tags}}}); _.each(tags, function(tag) { Tiqs.upsert({text: tag}, {$addToSet: {tags: text}}); }); } });
Meteor.startup(function () { Tiqs._ensureIndex({text: 1}); }); Meteor.methods({ associateTags: function(text, tags) { Tiqs.upsert({text: text}, {$addToSet: {tags: {$each: tags}}, $setOnInsert: {createdAt: Date.now()} } ); _.each(tags, function(tag) { Tiqs.upsert({text: tag}, ...
Add createdAt field to Tiqs collection
Add createdAt field to Tiqs collection
JavaScript
mit
imiric/tiq-web,imiric/tiq-web
f0a2fefc7eced759ad5c639c85df44194c3a89f8
rules/temporary-hrdata.js
rules/temporary-hrdata.js
function (user, context, callback) { // This is a rule to specifically allow access to _HRData for specific ClientIDs // _HRData comes from WorkDay, through LDAP Connector // Ideally the RPs who need this data should request it directly from WorkDay, so this is a work-around. // Applications that are ALLOWED t...
function (user, context, callback) { // This is a rule to specifically allow access to _HRData for specific ClientIDs // _HRData comes from WorkDay, through LDAP Connector // Ideally the RPs who need this data should request it directly from WorkDay, so this is a work-around. // Applications that are ALLOWED t...
Add pto app to hrdata rule
Add pto app to hrdata rule this will allow the pto app to get manager info and no longer need an LDAP connection
JavaScript
mpl-2.0
mozilla-iam/auth0-deploy,jdow/auth0-deploy,jdow/auth0-deploy,mozilla-iam/auth0-deploy
2f61e76a50034cd06611bf0086d57deeaf61a2dd
schema/me/save_artwork.js
schema/me/save_artwork.js
import gravity from '../../lib/loaders/gravity'; import { GraphQLString, GraphQLBoolean } from 'graphql'; import { mutationWithClientMutationId } from 'graphql-relay'; import { artworkFields } from '../artwork/index'; export default mutationWithClientMutationId({ name: 'SaveArtwork', decription: 'Save (or remove) ...
import gravity from '../../lib/loaders/gravity'; import { GraphQLString, GraphQLBoolean } from 'graphql'; import { mutationWithClientMutationId } from 'graphql-relay'; import { ArtworkType } from '../artwork/index'; export default mutationWithClientMutationId({ name: 'SaveArtwork', decription: 'Save (or remove) an...
Return artwork node instead of fields
Return artwork node instead of fields
JavaScript
mit
mzikherman/metaphysics-1,craigspaeth/metaphysics,artsy/metaphysics,craigspaeth/metaphysics,artsy/metaphysics,mzikherman/metaphysics-1,artsy/metaphysics,mzikherman/metaphysics-1,broskoski/metaphysics,mzikherman/metaphysics-1
27e1d21c375b16697c4ca4eef0f6c14193262797
test/DropdownAlert-test.js
test/DropdownAlert-test.js
const React = require('react') const should = require('should') const { shallow } = require('enzyme') const { expect } = require('chai') import DropdownAlert from '../DropdownAlert' import { View, Text, StyleSheet, TouchableHighlight, Animated, Modal, StatusBar, Image } from "react-native" describe('D...
const React = require('react') const should = require('should') const { shallow } = require('enzyme') const { expect } = require('chai') import DropdownAlert from '../DropdownAlert' import { View, Text, StyleSheet, TouchableHighlight, Animated, Modal, StatusBar, Image } from "react-native" describe('D...
Add sub components test; Add dismiss test
Add sub components test; Add dismiss test
JavaScript
mit
testshallpass/react-native-dropdownalert,testshallpass/react-native-dropdownalert,shotozuro/react-native-dropdownalert,devBrian/react-native-dropdownalert,devBrian/react-native-dropdownalert,shotozuro/react-native-dropdownalert,shotozuro/react-native-dropdownalert,devBrian/react-native-dropdownalert,testshallpass/react...
9f26f41123b6fcda8ade34325161d8d433f4ec61
test/unit/api/component.js
test/unit/api/component.js
import { Component } from '../../../src'; describe('api/Component', () => { if (!classStaticsInheritance()) { return; } describe('property getters', () => { it('observedAttributes', () => { class Test extends Component { static get observedAttributes() { return ['test']; ...
import { Component } from '../../../src'; import { classStaticsInheritance } from '../lib/support'; describe('api/Component', () => { if (!classStaticsInheritance()) { return; } describe('property getters', () => { it('observedAttributes', () => { class Test extends Component { static get ...
Fix test by adding a missing import.
test: Fix test by adding a missing import.
JavaScript
mit
skatejs/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs,chrisdarroch/skatejs
ea22ee1596e2f9d93ce01349f06a3c99143f21bb
test/absUrl.js
test/absUrl.js
var should = require('chai').should(); var LocationUtil = require('../src/location-util.js').LocationUtil; describe('#absUrl', function () { it('should get full URL', function () { var l = new LocationUtil('http://example.com:8080/foo?bar=buz#frag'); l.absUrl().should.equal('http://example.com:80...
var should = require('chai').should(); var LocationUtil = require('../src/location-util.js').LocationUtil; describe('#absUrl', function () { it('should get full URL', function () { var l = new LocationUtil('http://example.com:8080/foo?bar=buz#frag'); l.absUrl().should.equal('http://example.com:80...
Add some test cases that are in doc
Add some test cases that are in doc
JavaScript
mit
moznion/location-util
56efaa7f095ffef29decbb0942f37f24851b4847
js/DataObjectPreviewer.js
js/DataObjectPreviewer.js
(function($) { $.entwine('ss', function($){ $('.ss-gridfield-orderable tbody .handle').entwine({ onmousedown: function () { this.closest('tbody').addClass('ss-gridfield-sorting'); }, onmouseup: function () { this.closest('tbody').removeClass('ss-gridfield-sorting'); } }); $('.dataobjectprevi...
(function($) { function getDocumentHeight(doc) { return Math.max( doc.documentElement.clientHeight, doc.body.scrollHeight, doc.documentElement.scrollHeight, doc.body.offsetHeight, doc.documentElement.offsetHeight); } $.entwine('ss', function($){ $('.ss-gridfield-orderable tbody .handle').entwine({ ...
Use a cross-browser compatible method of determining document height
Use a cross-browser compatible method of determining document height The automatic setting of height for the preview iframe stopped working in Chrome. This change fixes this.
JavaScript
mit
heyday/silverstripe-dataobjectpreview,heyday/silverstripe-dataobjectpreview
cadc76aaac836b8a13fd0c6da5b36b70d8c54ad7
example/examples/HLSSource.js
example/examples/HLSSource.js
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Hls from 'hls.js'; const propTypes = { src: PropTypes.string.isRequired, type: PropTypes.string, video: PropTypes.object, }; export default class HLSSource extends Component { constructor(props, context) { super(props, co...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Hls from 'hls.js'; const propTypes = { src: PropTypes.string.isRequired, type: PropTypes.string, video: PropTypes.object, }; export default class HLSSource extends Component { constructor(props, context) { super(props, co...
Destroy HLS source before component unmount
Destroy HLS source before component unmount
JavaScript
mit
video-react/video-react,video-react/video-react
a60b407bf182c852b9d6e841e1f0511fb770411b
client/templates/course/sidebar/section/add-lesson/add-lesson.js
client/templates/course/sidebar/section/add-lesson/add-lesson.js
Template.sectionAddLesson.events({ 'click .add-lesson-button': function (event, template) { // Get lesson name var lessonName = template.find(".lesson-name").value; // Create temporary lesson object var lessonObject = {'name': lessonName}; // Add lesson to database, ...
Template.sectionAddLesson.events({ 'click .add-lesson-button': function (event, template) { // Get lesson name var lessonName = template.find(".lesson-name").value; // Create temporary lesson object var lessonObject = {'name': lessonName}; // Add lesson to database, ...
Clear lesson field on add.
Clear lesson field on add.
JavaScript
agpl-3.0
Crowducate/crowducate-platform,Crowducate/crowducate-platform,Crowducate/crowducate-next,Crowducate/crowducate-next,KshirsagarNaidu/bodhiprocessor,KshirsagarNaidu/bodhiprocessor
ef773f16dbaf0d2ef922f061d50fb1462c98036b
tests/index.js
tests/index.js
/** * Check If Image Path Exists */ var http = require('http'), url = 'http://sirocco.accuweather.com/adc_images2/english/feature/400x300/worstwx.jpg' ; http.get(url, function(response) { if (response.statusCode == '200') return; throw new Error(response.statusCode); }).on('error', function(error) { throw error;...
/** * Check If Image Path Exists */ var http = require('http'), url = 'http://sirocco.accuweather.com/adc_images2/english/feature/400x300/worstwx.jpg' ; http.get(url, function(response) { if (response.statusCode == '200') process.exit(0); throw new Error(response.statusCode); }).on('error', function(error) { thr...
Use process.exit to make test faster
Use process.exit to make test faster
JavaScript
apache-2.0
matthewspencer/worstweather
995d2be6e56ba2b2f1b44e1e0f05c56d842da448
src/components/candidatethumbnail/CandidateThumbnail.js
src/components/candidatethumbnail/CandidateThumbnail.js
import React from 'react'; import { Image } from 'react-bootstrap' import CandidateCounter from './CandidateCounter' import styles from './candidatethumbnail.css' export default class CandidateThumbnail extends React.Component { render() { return ( <div className="col-lg-4 col-md-4 col-sm-12 col-xs-1...
import React from 'react'; import { Image } from 'react-bootstrap' import { Route } from 'react-router-dom' import CandidateCounter from './CandidateCounter' import styles from './candidatethumbnail.css' export default class CandidateThumbnail extends React.Component { render() { return ( <Route render=...
Add link from candidate thumbnail to candidate detail page
Add link from candidate thumbnail to candidate detail page
JavaScript
mit
imrenagi/rojak-web-frontend,imrenagi/rojak-web-frontend
ed0df4c15952d3b00ca0de3b01cc4697ee6e9570
app/react/data/exclude_images.js
app/react/data/exclude_images.js
module.exports = [ 'https://upload.wikimedia.org/wikipedia/en/e/e7/Cscr-featured.svg', '.webm', 'https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg', 'https://upload.wikimedia.org/wikipedia/en/f/fd/Portal-puzzle.svg', 'https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg', '...
module.exports = [ 'https://upload.wikimedia.org/wikipedia/en/e/e7/Cscr-featured.svg', '.webm', 'https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg', 'https://upload.wikimedia.org/wikipedia/en/f/fd/Portal-puzzle.svg', 'https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg', '...
Revert "Added new exclude image"
Revert "Added new exclude image" This reverts commit cbc4520fcc0b6744113bee40ee21571eb787ea25.
JavaScript
mit
WikiEducationFoundation/Wiki-Playlist,WikiEducationFoundation/Wiki-Playlist,WikiEducationFoundation/Wiki-Playlist
317f7ca114f80cf2c4d995938b9f262b50fa02fb
app/scenes/SearchScreen/index.js
app/scenes/SearchScreen/index.js
import React, { Component } from 'react'; import { View } from 'react-native'; import RepoSearchBar from './components/RepoSearchBar'; import RepoSearchButton from './components/RepoSearchButton'; import RepoList from './components/RepoList'; export default class SearchScreen extends Component { constructor(props) {...
import React, { Component } from 'react'; import { View } from 'react-native'; import RepoSearchBar from './components/RepoSearchBar'; import RepoSearchButton from './components/RepoSearchButton'; import RepoList from './components/RepoList'; export default class SearchScreen extends Component { constructor(props) {...
Add helper functions to change screen states
Add helper functions to change screen states
JavaScript
mit
msanatan/GitHubProjects,msanatan/GitHubProjects,msanatan/GitHubProjects
4036b9f7009c65aa1889b80ddbb81f2ad95dc873
src/handler_adaptor.js
src/handler_adaptor.js
define(['lib/def', 'handler'], function(Def, Handler) { var HandlerAdaptor = Def.type(Handler, function(handler) { Handler.call(this); this.def_prop('handler', handler); }); HandlerAdaptor.def_method(function on_message(msg, cont) { if (this.handler.match(msg)) return msg.respond(this.handler....
define(['lib/def', 'handler'], function(Def, Handler) { var HandlerAdaptor = Def.type(Handler, function(handler) { this.constructor.__super__.call(this); this.def_prop('handler', handler); }); HandlerAdaptor.def_method(function on_message(msg, cont) { if (this.handler.match(msg)) return msg.re...
Refactor constructor to take advantage of __super__ member.
Refactor constructor to take advantage of __super__ member.
JavaScript
mit
bassettmb/slack-bot-dev
2b82c65e398a66d3dc23f0fdf366549e5565219f
src/main/webapp/resources/js/utilities/url-utilities.js
src/main/webapp/resources/js/utilities/url-utilities.js
/** * Since IRIDA can be served within a container, all requests need to have * the correct base url. This will add, if required, the base url. * * NOTE: THIS ONLY NEEDS TO BE CALLED FOR LINKS, ASYNCHRONOUS REQUESTS WILL * BE AUTOMATICALLY HANDLED. * * @param {string} url * @return {string|*} */ export functi...
/** * Since IRIDA can be served within a container, all requests need to have * the correct base url. This will add, if required, the base url. * * NOTE: THIS ONLY NEEDS TO BE CALLED FOR LINKS, ASYNCHRONOUS REQUESTS WILL * BE AUTOMATICALLY HANDLED. * * @param {string} url * @return {string|*} */ export functi...
Check to see if the url has the context path first.
Check to see if the url has the context path first.
JavaScript
apache-2.0
phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida
ff2bb7a079a88eb9a60061de9f4481cee1141889
spec/specs.js
spec/specs.js
describe('pingPong', function() { it("is true for a number that is divisible by 3", function() { expect(pingPong(6)).to.equal(true); }); it("is true for a number that is divisible by 5", function() { expect(pingPong(10)).to.equal(true); }); });
describe('pingPong', function() { it("is true for a number that is divisible by 3", function() { expect(pingPong(6)).to.equal(true); }); it("is true for a number that is divisible by 5", function() { expect(pingPong(10)).to.equal(true); }); it("is true for a number that is divisible by 15", function...
Add an additional spec test for userNumbers divisible by 15
Add an additional spec test for userNumbers divisible by 15
JavaScript
mit
kcmdouglas/pingpong,kcmdouglas/pingpong
1dde5df3c6fdfe555f7258d1a697735bc6f3b7a8
src/App.js
src/App.js
import React from 'react'; import { HashRouter as Router, Switch, Route, Link } from "react-router-dom"; import ComponentsPage from './pages/Components'; import ContentPage from './pages/Content'; import UtilsPage from './pages/Utils'; function App() { return ( <Router> <div className=...
import React from 'react'; import { HashRouter as Router, Switch, Route, Link } from "react-router-dom"; import ComponentsPage from './pages/Components'; import ContentPage from './pages/Content'; import UtilsPage from './pages/Utils'; function App() { return ( <Router> <div className=...
Add link to GH repo
Add link to GH repo
JavaScript
mit
FindawayWorld/gateway,FindawayWorld/gateway
1ebfc2f9d228811b45955e1d7ddd1f61407a3809
src/App.js
src/App.js
import React from 'react'; import { BrowserRouter as Router, Route } from 'react-router-dom'; import Home from './Home'; const App = () => ( <React.Fragment> <Router> <Route exact path="/" component={Home} /> </Router> </React.Fragment> ); export default App;
import React from 'react'; import CssBaseline from '@material-ui/core/CssBaseline'; import { BrowserRouter as Router, Route } from 'react-router-dom'; import Home from './Home'; const App = () => ( <React.Fragment> <CssBaseline /> <Router> <Route exact path="/" component={Home} /> </Router> </Rea...
Use CssNormalize to normalize padding/margin for entire app
Use CssNormalize to normalize padding/margin for entire app
JavaScript
mit
jasongforbes/jforbes.io,jasongforbes/jforbes.io,jasongforbes/jforbes.io
22d63bf978e351a22515248600a8cd7a1d56a07d
src/pages/home/page.js
src/pages/home/page.js
import React from 'react'; import ReactDom from 'react-dom'; import { Link } from 'react-router'; import _ from 'lodash'; import client from '../../common/store/Contentful'; import marked from 'marked'; import styles from "./style.css"; export default class HomePage extends React.Component { constructor(props) { ...
import React from 'react'; import ReactDom from 'react-dom'; import { Link } from 'react-router'; import _ from 'lodash'; import client from '../../common/store/Contentful'; import marked from 'marked'; import styles from "./style.css"; export default class HomePage extends React.Component { constructor(props) { ...
Remove my dumb logging statement
Remove my dumb logging statement
JavaScript
mit
mhgbrown/typography-karaoke,mhgbrown/typography-karaoke
5d3474ab83dcf9931ee480fbe7d1119642e7355f
test/conf/karma-sauce.conf.js
test/conf/karma-sauce.conf.js
module.exports = function(config) { var commonConfig = (require("./karma-common.conf"))(config); var customLaunchers = { sl_chrome: { base: "SauceLabs", browserName: "chrome", platform: "Windows 8.1" }, sl_firefox: { base: "SauceLabs", ...
module.exports = function(config) { var commonConfig = (require("./karma-common.conf"))(config); var customLaunchers = { sl_chrome: { base: "SauceLabs", browserName: "chrome", platform: "Windows 8.1" }, sl_firefox: { base: "SauceLabs", ...
Use beta version of Firefox (supports vertical writing-mode) in tests on Sauce Labs
Use beta version of Firefox (supports vertical writing-mode) in tests on Sauce Labs
JavaScript
apache-2.0
kuad9/vivliostyle.js_study,vivliostyle/vivliostyle.js,nulltask/vivliostyle.js,vivliostyle/vivliostyle.js,kuad9/vivliostyle.js_study,vivliostyle/vivliostyle.js,nulltask/vivliostyle.js,kuad9/vivliostyle.js_study,nulltask/vivliostyle.js,vivliostyle/vivliostyle.js,kuad9/vivliostyle.js_study,nulltask/vivliostyle.js
f4c10acf35c802049cb59fec2af813766821c83f
src/String.js
src/String.js
/** * Has Vowels * * hasVowel tests if the String calling the function has a vowels * * @param {void} * @return {Boolean} returns true or false indicating if the string * has a vowel or not */ String.prototype.hasVowels = function() { var inputString = this; return /[aeiou]/gi.test(inputString); }; /...
/** * Has Vowels * * hasVowel tests if the String calling the function has a vowels * * @param {void} * @return {Boolean} returns true or false indicating if the string * has a vowel or not */ String.prototype.hasVowels = function() { var inputString = this; return /[aeiou]/gi.test(inputString); }; /...
Implement ucFirst() to pass test
Implement ucFirst() to pass test
JavaScript
mit
andela-oolutola/string-class,andela-oolutola/string-class
242dff01801b14ea10df218d0d967e9afef2b144
app/assets/javascripts/displayMap.js
app/assets/javascripts/displayMap.js
function initMap() { var map; var $business_object; var biz_loc_collection; var i; $business_object = $('#businesses').data('url'); biz_loc_collection = []; for (i = 0; i < $business_object.length; ++i) { biz_loc_collection.push({ lat: $business_object[i].latitude, lng: $business_object[i].longitude}...
function initMap() { var map; var $business_object; var biz_loc_collection; var i; $business_object = $('#businesses').data('url'); biz_loc_collection = []; for (i = 0; i < $business_object.length; ++i) { biz_loc_collection.push({ lat: $business_object[i].latitude, lng: $business_object[i].longitude}...
Fix the marker bouncing function.
Fix the marker bouncing function.
JavaScript
mit
DBC-Huskies/flight-app,DBC-Huskies/flight-app,DBC-Huskies/flight-app
a59413dc688077d0f1c4d8ae26fce464b837faa6
src/scripts/scripts.js
src/scripts/scripts.js
$(document).foundation(); $('a.disabled').click(function(e) { e.preventDefault(); }); // Show shadow when content slides under the page header $(document).ready(function() { var $content = $('#site-body .content'); var $header = $('#page-head .inner'); if ($header.length > 0) { $content.css('margin-top'...
$(document).foundation(); $('a.disabled').click(function(e) { e.preventDefault(); e.stopPropagation(); e.stopImmediatePropagation(); }); // Show shadow when content slides under the page header $(document).ready(function() { var $content = $('#site-body .content'); var $header = $('#page-head .inner'); ...
Implement fake form submits and confirmation buttons
Implement fake form submits and confirmation buttons
JavaScript
bsd-3-clause
flipside-org/aw-datacollection,flipside-org/aw-datacollection,flipside-org/aw-datacollection
ba8371191ca468d1648e83324455d24a314725f8
src/portal.js
src/portal.js
import { Component } from 'react'; import PropTypes from 'prop-types'; import ReactDom from 'react-dom'; class Portal extends Component { componentWillMount() { this.popup = document.createElement('div'); document.body.appendChild(this.popup); this.renderLayer(); } componentDidUpdate() { this.re...
import { Component } from 'react'; import PropTypes from 'prop-types'; import ReactDom from 'react-dom'; const useCreatePortal = typeof ReactDom.unstable_createPortal === 'function'; class Portal extends Component { componentWillMount() { this.popup = document.createElement('div'); document.body.appendChild...
Add support for new React Core (v16)
Add support for new React Core (v16) Old react (v15) still working
JavaScript
mit
pradel/react-minimalist-portal
9cadbca18e044b0b20b7a3316c7007eb1540711b
test/builder/graphql/query.js
test/builder/graphql/query.js
import {parse, Source} from 'graphql'; import {createSpecBuilderClass} from './base'; import {RepositoryBuilder} from './repository'; import {PullRequestBuilder} from './pr'; class SearchResultItemBuilder { static resolve() { return this; } constructor(...args) { this.args = args; this._value = null; ...
import {parse, Source} from 'graphql'; import {createSpecBuilderClass} from './base'; import {RepositoryBuilder} from './repository'; import {PullRequestBuilder} from './pr'; class SearchResultItemBuilder { static resolve() { return this; } constructor(...args) { this.args = args; this._value = null; ...
Build a GraphQL response with errors reported
Build a GraphQL response with errors reported
JavaScript
mit
atom/github,atom/github,atom/github
2561471eea20a9d1ca762d402ba538661cfd2f64
module/Connector.js
module/Connector.js
const mysql = require('mysql') const qBuilder = require('./QueryBuilder') let query = '' let params = [] module.exports = (dbSetting) => { let connection = mysql.createConnection({ host: dbSetting.hostname, user: dbSetting.username, password: dbSetting.password, database: dbSetting.database }) ...
const mysql = require('mysql') const qBuilder = require('./QueryBuilder') let _query = '' let _params = [] module.exports = (dbSetting) => { let connection = mysql.createConnection({ host: dbSetting.hostname, user: dbSetting.username, password: dbSetting.password, database: dbSetting.database }) ...
Add few functions and connect to query builder
Add few functions and connect to query builder
JavaScript
mit
evelikov92/mysql-qbuilder
0f3c7f95b03b5e6b3b731158185ae12078c9b606
web/test/bootstrap.test.js
web/test/bootstrap.test.js
var Sails = require('sails'); before(function (done) { Sails.lift({ //config }, function (err, sails) { if (err) return done(err); // load fixtures, etc done (err, sails); }); }); after(function (done) { Sails.lower(done); });
var Sails = require('sails'); before(function (done) { this.timeout(5 * 1000); Sails.lift({ //config }, function (err, sails) { if (err) return done(err); // load fixtures, etc done (err, sails); }); }); after(function (done) { Sails.lower(done); });
Allow sails lift to take longer than 2 seconds
Allow sails lift to take longer than 2 seconds
JavaScript
apache-2.0
section-io-gists/vclfiddle,vclfiddle/vclfiddle,vclfiddle/vclfiddle,vclfiddle/vclfiddle,vclfiddle/vclfiddle,section-io-gists/vclfiddle,section-io-gists/vclfiddle,section-io-gists/vclfiddle
d2d68cb5ff8982f897b2805f57b73724def65208
feder/main/static/init_map.js
feder/main/static/init_map.js
(function($) { $("#pl_map path").on("click", function() { document.location.pathname = $(this).data("href") }); $('[data-toggle="tooltip"]').tooltip({'container': 'body'}); })(jQuery);
(function($) { $("#pl_map path").on("click", function() { document.location.pathname = $(this).data("href") }); })(jQuery);
Remove unused tooltip initialization code
Remove unused tooltip initialization code
JavaScript
mit
watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder
63d2829207a9968412fb332371774f3c1ca00601
src/config.js
src/config.js
var _ = require('underscore'); var fs = require('fs'); function Config(filePath) { var data = this.parse(filePath); this.validate(data); return Object.freeze(data); } Config.prototype.parse = function(filePath) { var content = fs.readFileSync(filePath, { encoding: 'utf8' }); return JSON.parse(content)...
var _ = require('underscore'); var fs = require('fs'); /** * @param {String|Object} filePath. If param is a String then it is treated as a file path to a config file. * If param is an Object then it is treated as a parsed config file. * @constructor */ function Config(filePath) { var data; if (_.isObject(fileP...
Allow to pass hash instead of filepath to Config.
Allow to pass hash instead of filepath to Config.
JavaScript
mit
vogdb/pulsar-rest-api-client-node,cargomedia/pulsar-rest-api-client-node
5609d591ab892348b17f0bccef800dcd46ca431f
test/index.js
test/index.js
GLOBAL.projRequire = function (module) { return require('../' + module); };
GLOBAL.projRequire = function (module) { return require('../' + module); }; const log = projRequire('lib'); const tc = require('test-console'); const test = require('tape');
Add imports to test suite
Add imports to test suite
JavaScript
mit
cuvva/cuvva-log-sentry-node,TheTree/branch,TheTree/branch,TheTree/branch
c50035bb85a86aa7adb292ef74385388c391912c
test/index.js
test/index.js
require('./unit/index'); require('./test_multiple_payloads'); require('./test_misc'); require('./test_loop'); require('./test_capture'); require('./test_arrivals'); require('./test_reuse'); require('./test_loop'); require('./test_probability'); require('./test_if'); //require('./test_worker_http'); //require('./test_e...
require('./unit/index'); require('./test_multiple_payloads'); require('./test_misc'); require('./test_loop'); require('./test_capture'); require('./test_arrivals'); require('./test_reuse'); require('./test_loop'); require('./test_probability'); require('./test_if'); require('./ws/test_options'); //require('./test_wor...
Include WS TLS test in the test suite
Include WS TLS test in the test suite
JavaScript
mpl-2.0
hassy/artillery,erikerikson/artillery-core,shoreditch-ops/artillery-core,shoreditch-ops/artillery,hassy/artillery-core,erikerikson/artillery-core,shoreditch-ops/artillery-core,shoreditch-ops/artillery,hassy/artillery,shoreditch-ops/artillery,hassy/artillery-core,hassy/artillery
58b4a325f06e178c398d96513f5ac7bd69ad0b1e
src/export.js
src/export.js
'use strict' /** * @class Elastic */ var Elastic = { klass : klass, domain: { Layout : LayoutDomain, View : ViewDomain, Compontnt: ComponentDomain }, exception: { Runtime : RuntimeException, Logic : LogicException }, util: { History : History, Router : Router, ...
'use strict' /** * @class Elastic */ var Elastic = { // like OOP klass : klass, // shorthand Layout : LayoutDomain, View : ViewDomain, Component: ComponentDomain, // classes domain: { Layout : LayoutDomain, View : ViewDomain, Compontnt: ComponentDomain }, exception: { ...
Add Domain class's shorthand name
Add Domain class's shorthand name
JavaScript
mit
ahomu/Elastic
8b6b89e438c963ed0f3cb563cdfd60b6c0d0a7e0
shared/util/set-notifications.js
shared/util/set-notifications.js
/* @flow */ import engine from '../engine' import {notifyCtlSetNotificationsRpc} from '../constants/types/flow-types' type NotificationChannels = { session?: true, users?: true, kbfs?: true, tracking?: true, favorites?: true, paperkeys?: true, keyfamily?: true, service?: true, chat?: true, } let ch...
/* @flow */ import engine from '../engine' import {notifyCtlSetNotificationsRpc} from '../constants/types/flow-types' type NotificationChannels = { chat?: true, favorites?: true, kbfs?: true, keyfamily?: true, paperkeys?: true, pgp?: true, service?: true, session?: true, tracking?: true, users?: t...
Add pgp to notification channels
Add pgp to notification channels
JavaScript
bsd-3-clause
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
66b31b6659968968d3354fb5d114c77b72aac6af
test/mouse.js
test/mouse.js
var test = require('tape'); var robot = require('..'); var lastKnownPos, currentPos; test('Get the initial mouse position.', function(t) { t.plan(3); t.ok(lastKnownPos = robot.getMousePos(), 'successfully retrieved mouse position.'); t.ok(lastKnownPos.x !== undefined, 'mousepos.x is a valid value.'); t.ok(lastKno...
var test = require('tape'); var robot = require('..'); var lastKnownPos, currentPos; //Increase delay to help test reliability. robot.setMouseDelay(100); test('Get the initial mouse position.', function(t) { t.plan(3); t.ok(lastKnownPos = robot.getMousePos(), 'successfully retrieved mouse position.'); t.ok(lastKn...
Increase delay to help test reliability.
Increase delay to help test reliability.
JavaScript
mit
hristoterezov/robotjs,BHamrick1/robotjs,BHamrick1/robotjs,hristoterezov/robotjs,hristoterezov/robotjs,hristoterezov/robotjs,octalmage/robotjs,BHamrick1/robotjs,octalmage/robotjs,BHamrick1/robotjs,octalmage/robotjs,octalmage/robotjs
932c3d27364eb4cfb09189f90afb92c8bfeaa07c
src/server.js
src/server.js
/* * Initialize the Restify server. */ var restify = require('restify'); var config = require('./config'); var routes = require('./routes'); var log = require('./logging').getLogger(); exports.create = function () { var server = restify.createServer(); server.pre(restify.pre.sanitizePath()); server.name = c...
/* * Initialize the Restify server. */ var restify = require('restify'); var config = require('./config'); var routes = require('./routes'); var log = require('./logging').getLogger(); exports.create = function () { var server = restify.createServer(); server.server.setTimeout(600000); server.pre(restify.pr...
Set a nice, generous timeout on requests.
Set a nice, generous timeout on requests.
JavaScript
mit
deconst/content-service,deconst/content-service
86f7ec4efb24be276590df7c2304065a1b81027a
lib/response.js
lib/response.js
"use strict"; var Response = function(error, res) { res = res || {}; this.raw = res.body; this.headers = res.headers; this.status = res.statusCode || 500; if (error) { this._error = { error: (res.body || "Unknown error: empty response") }; } else { if (res.headers["content-type...
"use strict"; var Response = function(error, res) { res = res || {}; this.raw = res.body; this.headers = res.headers; this.status = res.statusCode || 500; if (error) { this._error = { error: (res.body || "Unknown error: empty response") }; } else { if (res.headers["content-type...
Use String.prototype.startsWith() instead of includes() for checking the content type
Use String.prototype.startsWith() instead of includes() for checking the content type
JavaScript
mit
skazska/m2x-nodejs,attm2x/m2x-nodejs
578355c255e533622462c49d2a10b5e2fb5dc029
fetch-browser.js
fetch-browser.js
(function () { 'use strict'; function fetchPonyfill(options) { var Promise = options && options.Promise || self.Promise; var XMLHttpRequest = options && options.XMLHttpRequest || self.XMLHttpRequest; var global = self; return (function () { var self = Object.create(global, { fetch: {...
(function (self) { 'use strict'; function fetchPonyfill(options) { var Promise = options && options.Promise || self.Promise; var XMLHttpRequest = options && options.XMLHttpRequest || self.XMLHttpRequest; var global = self; return (function () { var self = Object.create(global, { fetc...
Allow passing of self rather than just globally uses it
Allow passing of self rather than just globally uses it
JavaScript
mit
qubyte/fetch-ponyfill,qubyte/fetch-ponyfill
f36b511e9b9fc339a11c8c8acc758dc05009622c
lib/database.js
lib/database.js
var log4js = require('log4js'); var logger = log4js.getLogger('BOT-LOG'); function updateUserList(dyDb, userId){ } module.exports = { updateUserList:updateUserList }
var log4js = require('log4js'); var logger = log4js.getLogger('BOT-LOG'); function updateUserList(dyDb, userId, cb){ dydb.listTables({}, function(err, result){ if(err){ logger.error(err); cb(err, null); return; } }); } module.exports = { updateUserList:updateUserList }
Add listTables part into updateUserList
Add listTables part into updateUserList
JavaScript
mit
dollars0427/mtrupdate-bot
ce7d42edbf76e334eccc0897ed2283fbd0feb2d5
client/templates/posts/posts_list.js
client/templates/posts/posts_list.js
Template.postsList.helpers({ posts: function() { return Posts.find(); } });
Template.postsList.helpers({ posts: function() { return Posts.find({}, {sort: {submitted: -1}}); } });
Sort posts by submitted timestamp.
Sort posts by submitted timestamp.
JavaScript
mit
mtchllbrrn/microscope,mtchllbrrn/microscope
5fd1908efa1add699d7a5169c8f05a64ec43f27b
src/global-components/info.js
src/global-components/info.js
let Vue = require('../../node_modules/vue/dist/vue.min'); let template = '<div style="border-radius: 4px; margin:5px; color: #31708f;background-color: #d9edf7; border: 1px solid #bce8f1;text-align: center">' + '<p>{{ message }}</p>' + '</div>'; Vue.component('info', { template: template, props: ['messa...
let Vue = require('../../node_modules/vue/dist/vue.min'); let style = 'border-radius: 4px; margin:5px; color: #31708f;background-color: #d9edf7; border: 1px solid #bce8f1;text-align: center'; let template = ` <div style="${style}"> <p>{{ message }}</p> </div>`; Vue.component('info', { template: temp...
Make use of ecma 6 template
Make use of ecma 6 template
JavaScript
mit
funcoding/vuetron-mail,funcoding/vuetron-mail
9a3be57d1ea6a2cd88a6e0f029405be65bb305e1
src/jsturbo-date.js
src/jsturbo-date.js
import str from '../src/jsturbo-string' function toStringDMY (date) { return [ str.pad(date.getDate().toString(), 2), str.pad((date.getMonth() + 1).toString(), 2), str.pad(date.getFullYear().toString(), 4) ].join('/') }; function isToday (date) { return toStringDMY(date) === toStringDMY(new Date()) ...
import str from '../src/jsturbo-string' /** * Converts a date to string in the format 'dd/MM/yyyy' * @param {Date} Date object * @return {string} */ function toStringDMY (date) { return [ str.pad(date.getDate().toString(), 2), str.pad((date.getMonth() + 1).toString(), 2), str.pad(date.getFullYear()....
Add documentation to the date module
docs(date): Add documentation to the date module
JavaScript
mit
eduardoportilho/jsturbo
cf0542fe9895207d9ce9f68b458aba49fabfd9f0
app/assets/javascripts/application/codemirror-builder.js
app/assets/javascripts/application/codemirror-builder.js
var mumuki = mumuki || {}; (function (mumuki) { function CodeMirrorBuilder(textarea) { this.textarea = textarea; this.$textarea = $(textarea); } CodeMirrorBuilder.prototype = { setupEditor: function () { this.editor = CodeMirror.fromTextArea(this.textarea); }, setupLanguage: function ...
var mumuki = mumuki || {}; (function (mumuki) { function CodeMirrorBuilder(textarea) { this.textarea = textarea; this.$textarea = $(textarea); } CodeMirrorBuilder.prototype = { setupEditor: function () { this.editor = CodeMirror.fromTextArea(this.textarea); }, setupLanguage: function ...
Remove indent with spaces option
Remove indent with spaces option
JavaScript
agpl-3.0
mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory
3061897a2508c1226dcd1a153542539cdf17fdaa
src/routes/index.js
src/routes/index.js
import App from '../containers/App' function createRedirect(from, to) { return { path: from, onEnter(nextState, replaceState) { replaceState(nextState, to) }, } } const routes = [ createRedirect('/', '/explore'), { path: '/', component: App, // order matters, so less specific rou...
import App from '../containers/App' function createRedirect(from, to) { return { path: from, onEnter(nextState, replaceState) { replaceState(nextState, to) }, } } const routes = [ createRedirect('/', '/explore'), { path: '/', component: App, // order matters, so less specific rou...
Remove settings from the routes for the moment
Remove settings from the routes for the moment
JavaScript
mit
ello/webapp,ello/webapp,ello/webapp
3b850511df407a35f803118ca14c78b7e240cb8f
src/routes/index.js
src/routes/index.js
var express = require('express'); var os = require('os'); var router = express.Router(); var ifaces = os.networkInterfaces(); var localAddress = ''; var environment = process.env.NODE_ENV === 'production' ? 'production' : 'development'; var environmentNotice = environment === 'production' ? '' : environment + ' enviro...
var express = require('express'); var os = require('os'); var router = express.Router(); var ifaces = os.networkInterfaces(); var localAddress = ''; var environment = process.env.NODE_ENV === 'production' ? 'production' : 'development'; var environmentNotice = environment === 'production' ? '' : environment + ' enviro...
Select first network interface IP for localAddress display
Select first network interface IP for localAddress display
JavaScript
mit
lrakai/docker-software-delivery,lrakai/docker-software-delivery,lrakai/docker-software-delivery
daa5604ff4397caf02158634803d9a50e3b179a9
public/themes/lightweight/controllers/cart/checkout.as.guest.controller.js
public/themes/lightweight/controllers/cart/checkout.as.guest.controller.js
'use strict'; angular.module('lightweight').controller('CheckoutAsGuestController', ['$scope', '$rootScope', '$location', '$state', '$timeout', '$stateParams', '$window', 'Global', 'UserService','CartService', function($scope, $rootScope, $location, $state, $timeout, $stateParams, $window, Global, UserService,...
'use strict'; angular.module('lightweight').controller('CheckoutAsGuestController', ['$scope', '$rootScope', '$location', '$state', '$timeout', '$stateParams', '$window', 'Global', 'UserService','CartService', function($scope, $rootScope, $location, $state, $timeout, $stateParams, $window, Global, UserService,...
Update to set register user after logged in
Update to set register user after logged in
JavaScript
mit
shaishab/BS-Commerce,shaishab/BS-Commerce,shaishab/BS-Commerce
0c9680bfad90854bc47409466afd77c3f28f62d5
tests/docs.js
tests/docs.js
'use strict'; require('../examples/demo-only-stuff/docs'); var expect = require('chai').expect; var sinon = require('sinon'); var stub = sinon.stub; var utils = require('./helpers/utils'); var each = utils.each; var any = utils.any; var getContextStub = require('./helpers/get-context-stub'); var Canvas = require('../l...
'use strict'; require('../examples/demo-only-stuff/docs'); var expect = require('chai').expect; var sinon = require('sinon'); var stub = sinon.stub; var utils = require('./helpers/utils'); var each = utils.each; var any = utils.any; var getContextStub = require('./helpers/get-context-stub'); var Canvas = require('../l...
Test that all methods have a name and description
Test that all methods have a name and description
JavaScript
mit
JakeSidSmith/canvasimo,JakeSidSmith/sensible-canvas-interface,JakeSidSmith/canvasimo
86d78236569bda8954e157576be7cbdd3078ded2
src/server/index.js
src/server/index.js
const DB = require('./Persistence/database'); require('dotenv').config(); const App = require('./app'); DB.init().then((db) => { App(db).listen(3000); });
const DB = require('./Persistence/database'); require('dotenv').config(); const App = require('./app'); const port = process.env.PORT || 3000; DB.init().then((db) => { App(db).listen(port, () => { console.log(`Secure Drop running on port ${port}`); }); });
Add support for port changing
Add support for port changing
JavaScript
mit
RossCasey/SecureDrop,RossCasey/SecureDrop
4a937b4779f1f8357a0da777846ce5e406222721
tasks/grunt-sass.js
tasks/grunt-sass.js
const path = require('path'); const fs = require('fs'); const sass = require('node-sass'); const { promisify } = require('util'); const mkdirp = require('mkdirp'); const renderAsPromised = promisify(sass.render); const writeFileAsPromised = promisify(fs.writeFile); const mkdirpAsPromised = promisify(mkdirp); module.ex...
const path = require('path'); const fs = require('fs'); const sass = require('node-sass'); const { promisify } = require('util'); const mkdirp = require('mkdirp'); const renderAsPromised = promisify(sass.render); const writeFileAsPromised = promisify(fs.writeFile); const mkdirpAsPromised = promisify(mkdirp); module.ex...
Fix grunt task on watch
Fix grunt task on watch
JavaScript
apache-2.0
stryker-mutator/stryker-mutator.github.io,stryker-mutator/stryker-mutator.github.io,stryker-mutator/stryker-mutator.github.io,stryker-mutator/stryker-mutator.github.io
a942a1e476879f298cb06b4fd14a213f212aa081
public/designs/templates/lefttopright/javascripts/template.js
public/designs/templates/lefttopright/javascripts/template.js
$(document).ready(function() { alert("Yup, i'm here !"); });
$(document).ready(function() { var box_4_height = $(".box-4").height(); // Make box-2(the most left one) stay align with box-4 $(".box-2").css("margin-top", "-"+box_4_height+"px"); });
Make box-2 stay align with box-4
Make box-2 stay align with box-4 Signed-off-by: Fabio Teixeira <a90b0aa793b4509973a022e6fee8cf8a263dd84e@gmail.com> Signed-off-by: Thiago Ribeiro <25630c3dd4509f5915a846461794b51273be2039@hotmail.com>
JavaScript
agpl-3.0
larissa/noosfero,coletivoEITA/noosfero,hebertdougl/noosfero,coletivoEITA/noosfero,arthurmde/noosfero,coletivoEITA/noosfero-ecosol,AlessandroCaetano/noosfero,evandrojr/noosferogov,abner/noosfero,uniteddiversity/noosfero,tallysmartins/noosfero,uniteddiversity/noosfero,samasti/noosfero,CIRANDAS/noosfero-ecosol,vfcosta/noo...
03a1b9af8f4fcaa85534e3889a61ea395e5aa19d
test/src/doors.spec.js
test/src/doors.spec.js
const expect = require('chai').expect; const Room = require('../../src/rooms').Room; const Doors = require('../../src/doors').Doors; const Mocks = require('../mocks/mocks.js'); const testRoom = new Room(Mocks.Room); describe('Doors & Locks', () => { it('Should find an exit given a direction', () => { const fou...
'use strict'; const expect = require('chai').expect; const Room = require('../../src/rooms').Room; const Doors = require('../../src/doors').Doors; const Mocks = require('../mocks/mocks.js'); const testRoom = new Room(Mocks.Room); describe('Doors & Locks', () => { describe('findExit', () => { it('Should find...
Set up dests for helper funcs in doors.js
Set up dests for helper funcs in doors.js
JavaScript
mit
seanohue/ranviermud,shawncplus/ranviermud,seanohue/ranviermud
6a359323b5a4b3a4630f65bfb62e1ed531ac01c7
defaults/preferences/prefs.js
defaults/preferences/prefs.js
pref("extensions.torbirdy.protected", false); pref("extensions.torbirdy.proxy", 0); pref("extensions.torbirdy.first_run", true); pref("extensions.torbirdy.warn", true);
pref("extensions.torbirdy.protected", false); pref("extensions.torbirdy.proxy", 0); pref("extensions.torbirdy.first_run", true); pref("extensions.torbirdy.warn", true); pref("extensions.torbirdy.startup_folder", false);
Update the preferences to reflect the folder select state
Update the preferences to reflect the folder select state
JavaScript
bsd-2-clause
ioerror/torbirdy,viggyprabhu/torbirdy,kartikm/torbirdy,DigiThinkIT/TorBirdy,kartikm/torbirdy,u451f/torbirdy,infertux/torbirdy,u451f/torbirdy,ioerror/torbirdy,viggyprabhu/torbirdy,infertux/torbirdy,DigiThinkIT/TorBirdy
5b9936a84f03a49585d8a5570936b15ed2cff387
tests/dummy/config/environment.js
tests/dummy/config/environment.js
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, baseURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-contr...
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, baseURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-contr...
Set the base url of the dummy app
Set the base url of the dummy app
JavaScript
mit
gloit/gloit-component,gloit/gloit-component
ed6107f6bcf6dd0bbf917947d67d35a0a58e85c0
models/Users.js
models/Users.js
var mongoose = require('mongoose'); var UserSchema = new mongoose.Schema({ fname: String, lname: String, username: String, password: String, salt: String }); mongoose.model('User', UserSchema);
var mongoose = require('mongoose'); var crypto = require('crypto'); var jwt = require('jsonwebtoken'); var UserSchema = new mongoose.Schema({ fname: String, lname: String, username: String, password: String, salt: String }); UserSchema.methods.setPassword = function(password) { this.salt = crypto.randomBytes(16...
Create setPassword validPassword and generateJWT methods on User model
Create setPassword validPassword and generateJWT methods on User model
JavaScript
mit
zachloubier/stocks,zachloubier/stocks
9ccff0afcc20c515804a38e8828317451b15e1bd
lib/controllers/geo-tagging.js
lib/controllers/geo-tagging.js
'use strict'; var request = require('request'); var Q = require('q'); var config = require('../config'); const plugins = require('../../plugins'); const geoTagController = plugins.getFirst('geo-tag-controller'); if(!geoTagController) { throw new Error('Missing a geo-tag-controller plugin!'); } function deg(w) { ...
'use strict'; var request = require('request'); var Q = require('q'); var config = require('../config'); const plugins = require('../../plugins'); const geoTagController = plugins.getFirst('geo-tag-controller'); if(!geoTagController) { throw new Error('Missing a geo-tag-controller plugin!'); } function deg(w) { ...
Add userid to geotagging callback
Add userid to geotagging callback
JavaScript
mit
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
8fe68b5a70a10d742d39992714f3b80ca620f88e
tests/requests/home.js
tests/requests/home.js
'use strict'; var app = require('../../app'); var should = require('should'); var request = require('supertest')(app); describe('No controller home', function() { it('Must return status 200 when doing GET', function(done) { request.get('/') .end(function(err, res) { res.status.should.eql(200); }); }...
'use strict'; var server = require('../../server'); var should = require('should'); var request = require('supertest')(server); describe('The home controller', function() { it('Must return status 200 when doing GET', function(done) { request.get('/') .end(function(err, res) { res.status.should.eql(200); ...
Add other test: Must to go for route / when doing GET /exit
Add other test: Must to go for route / when doing GET /exit
JavaScript
mit
brenopolanski/coffee-club,brenopolanski/coffee-club
7f076bd1b43cc53b172c353cf24ee274ea7b5db3
lib/helpers/metadata.js
lib/helpers/metadata.js
'use strict'; var WM = require('es6-weak-map'); var hasNativeWeakMap = require('es6-weak-map/is-native-implemented'); // WeakMap for storing metadata var metadata = hasNativeWeakMap ? new WeakMap() : new WM(); module.exports = metadata;
'use strict'; // WeakMap for storing metadata var WM = require('es6-weak-map'); var metadata = new WM(); module.exports = metadata;
Remove conditional use of es6-weak-map
Fix: Remove conditional use of es6-weak-map
JavaScript
mit
phated/undertaker,gulpjs/undertaker
d962869bf6059568f39d4c8b5af801cfdcf30d0b
js/templates.js
js/templates.js
var Templates = {}; Templates.ItemListingTemplate = _.template('\ <div class="item media">\ <img class="pull-left" src="<%= imageUrl %>" />\ <div class="media-body">\ <h3 class="media-heading"><%= name %></h3>\ <div class="item-location"><span class="glyphicon glyphicon-globe"></span> <%= location %></div>\...
var Templates = {}; Templates.ItemListingTemplate = _.template('\ <div class="item media">\ <img class="pull-left" src="<%= imageUrl %>" />\ <div class="media-body">\ <h3 class="media-heading"><%= name %></h3>\ <div class="item-location"><span class="glyphicon glyphicon-globe"></span> <%= location %></div>\...
Add icon for amount of buyers.
Add icon for amount of buyers.
JavaScript
mit
burnflare/CrowdBuy,burnflare/CrowdBuy
9d7b781e57e885233eb5a16e6809ed528d0abe87
examples/blog/thinky.js
examples/blog/thinky.js
//var thinky = require('thinky'); var thinky = require('/home/michel/projects/thinky/lib/index.js'); var config = require('./config'); // Initialize thinky // The most important thing is to initialize the pool of connection thinky.init({ host: config.host, port: config.port, db: config.db }); exports.thin...
var thinky = require('thinky'); var config = require('./config'); // Initialize thinky // The most important thing is to initialize the pool of connection thinky.init({ host: config.host, port: config.port, db: config.db }); exports.thinky = thinky;
Switch to the npm library
Switch to the npm library
JavaScript
mit
gutenye/thinky-websocket,JohnyDays/thinky,soplakanets/thinky,rasapetter/thinky,mbroadst/thinky,bprymicz/thinky,JohnyDays/thinky,gutenye/thinky-websocket,davewasmer/thinky,gjuchault/thinky,soplakanets/thinky,davewasmer/thinky,gutenye/thinky-websocket,rasapetter/thinky
157f5524db00970c99cb91e5e1f65e0be31fb245
website/app/js/controllers.js
website/app/js/controllers.js
function HomeController($scope) { } function ProjectsController($scope, Restangular) { var allProjects = Restangular.all('projects'); allProjects.getList().then(function(projects) { $scope.projects = projects; }); Restangular.one("projects", "a").customGET("tree").then(function(tree) { ...
function HomeController($scope) { } function ProjectsController($scope, Restangular, $http) { var allProjects = Restangular.all('projects'); allProjects.getList().then(function(projects) { $scope.projects = projects; }); Restangular.one("projects", "a").customGET("tree").then(function(tree) ...
Remove testing code for going to materials commons.
Remove testing code for going to materials commons.
JavaScript
mit
materials-commons/materials,materials-commons/materials
224c56ed7da455e9ec8105e6efd088a4cd8eade2
portal/js/controllers/ChartEditController.js
portal/js/controllers/ChartEditController.js
App.ChartEditController = App.AuthenticationController.extend({ actions: { registerQuery: function() { console.log('registering a query'); var chart = this.get('model'); chart.save(); } } });
App.ChartEditController = App.AuthenticationController.extend({ actions: { registerQuery: function() { console.log('registering a query'); var chart = this.get('model'); // Put a dummy chartdata in the chart to trigger the async loading of the chart data // Since the request will be fulfi...
Create a dummy chart data object so the chart data loads async
Create a dummy chart data object so the chart data loads async
JavaScript
apache-2.0
with-regard/regard-website
6caba9f16599101ddf710aa4f322865341582c11
lib/foodlogiq-client/users.js
lib/foodlogiq-client/users.js
module.exports = function(conn) { return { list: function(businessId, callback) { conn.get('/users?businessId=' + businessId, callback); } } };
module.exports = function(conn) { return { show: function(callback) {conn.get('/user', callback);}, list: function(businessId, callback) { conn.get('/users?businessId=' + businessId, callback); } } };
Add a wrapper method for retrieving the current API user
Add a wrapper method for retrieving the current API user The API route for this already existed, but there was no wrapper method.
JavaScript
mit
ventres/foodlogiq-node,FoodLogiQ/foodlogiq-node
3a136a01d0e66bf5a0697fe031c0eb9eab0b81c9
app/server/methods/permissions.js
app/server/methods/permissions.js
Meteor.methods({ addSingleUserPermissions(userId, groupIds) { if (groupIds.length > 0) { groupIds.forEach(groupId => { Permissions.insert({ userId, groupId }); }); } return true; } });
Meteor.methods({ addSingleUserPermissions(userId, groupIds) { // Remove existing user permissions Permissions.remove({ userId }); // add new permissions, if any group IDs provided if (groupIds.length > 0) { groupIds.forEach(groupId => { Permissions.insert({ userId, groupId }); });...
Delete existing permission prior to inserting new set
Delete existing permission prior to inserting new set
JavaScript
agpl-3.0
brylie/juhani-wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing
28415ab520751159162e15d42b205352c6ce1e73
src/js/components/form.js
src/js/components/form.js
import React from 'react' import ReactDOM from 'react-dom' import DefaultProps from '../default_props.js' export default class Form extends React.Component { static displayName = 'FriggingBootstrap.Form' static defaultProps = { layout: DefaultProps.layout, } static propTypes = { formHtml: React.PropT...
import React from 'react' import ReactDOM from 'react-dom' export default class Form extends React.Component { static displayName = 'FriggingBootstrap.Form' static defaultProps = { layout: 'vertical', } static propTypes = { formHtml: React.PropTypes.shape({ className: React.PropTypes.string, ...
Remove DefaultProps.js From Form Component
Remove DefaultProps.js From Form Component Remove defaultProps.js from Form component layout prop as it is no longer in defaultProps.js
JavaScript
mit
frig-js/frigging-bootstrap,frig-js/frigging-bootstrap
13752fc80af365ae8c80effd323c8ea2e9bb637f
assets/javascripts/application.js
assets/javascripts/application.js
//= require "lib/moment.min" //= require "lib/jquery-2.0.3" //= require "lib/handlebars-v1.1.2" //= require "lib/ember" //= require "lib/ember-data" //= require_self //= require "models" //= require "views" //= require "helpers" //= require "./routes/authenticated_route" //= require_tree "./controllers" //= require_tre...
//= require "lib/moment.min" //= require "lib/jquery-2.0.3" //= require "lib/handlebars-v1.1.2" //= require "lib/ember" //= require "lib/ember-data" //= require_self //= require "models" //= require "views" //= require "helpers" //= require "./routes/authenticated_route" //= require_tree "./controllers" //= require_tre...
Use ActiveModelAdapter instead of RESTAdapter
Use ActiveModelAdapter instead of RESTAdapter
JavaScript
mit
louishawkins/mogo-chat,HashNuke/mogo-chat,sashafklein/bloc-mogo,di-stars/mogo-chat,louishawkins/mogo-chat,sashafklein/bloc-mogo,di-stars/mogo-chat,HashNuke/mogo-chat,HashNuke/mogo-chat,sashafklein/bloc-mogo,di-stars/mogo-chat,louishawkins/mogo-chat
ad76d7022d388e7b7a0e4f24c224dc29e4fa03ee
webpack/webpack-dev-server.js
webpack/webpack-dev-server.js
var Express = require('express'); var webpack = require('webpack'); var config = require('../src/config'); var webpackConfig = require('./dev.config'); var compiler = webpack(webpackConfig); var host = process.env.HOST || 'localhost'; var port = parseInt(config.port, 10) + 1 || 3001; var serverOptions = { contentBa...
var Express = require('express'); var webpack = require('webpack'); var config = require('../src/config'); var webpackConfig = require('./dev.config'); var compiler = webpack(webpackConfig); var host = config.host || 'localhost'; var port = (config.port + 1) || 3001; var serverOptions = { contentBase: 'http://' + h...
Use host + port from config
Use host + port from config
JavaScript
mit
hitripod/react-redux-universal-hot-example,thomastanhb/ericras,user512/teacher_dashboard,erikras/react-redux-universal-hot-example,mscienski/stpauls,ThatCheck/AutoLib,mull/require_hacker_error_reproduction,ames89/keystone-react-redux,hldzlk/wuhao,bertho-zero/react-redux-universal-hot-example,huangc28/palestine-2,tonyku...
97e271d4db24cbc89d367d19c6a65ae402972c8e
lib/commands/search.js
lib/commands/search.js
'use strict'; var _ = require('lodash'); var fs = require('fs'); var path = require('path'); var api = require('../api'); function arrayToQueryString(args) { var searchString = '?q=' + args._.join('+'); if (args.user) { searchString = searchString.concat('+user:' + args.user); } if (args.language) { s...
'use strict'; var _ = require('lodash'); var fs = require('fs'); var path = require('path'); var api = require('../api'); function queryStringFromArgs(args) { var searchString = '?q=' + args._.join('+'); if (args.user) { searchString = searchString.concat('+user:' + args.user); } if (args.language) { ...
Rename function for generating query string.
Rename function for generating query string.
JavaScript
mit
stillesjo/buh
843c48748261d44331f81ac915621766ce5ca0b6
test/index.js
test/index.js
'use strict'; var angular = require('angular'); var expect = require('chai').use(require('sinon-chai')).expect; var sinon = require('sinon'); var sap = require('sinon-as-promised'); describe('animate-change', function () { var $scope, $animate, element; beforeEach(angular.mock.module(require('../'))); b...
'use strict'; var angular = require('angular'); var expect = require('chai').use(require('sinon-chai')).expect; var sinon = require('sinon'); var sap = require('sinon-as-promised'); describe('animate-change', function () { var $scope, $animate, element; beforeEach(angular.mock.module(require('../'))); b...
Update tests for using element.removeClass instead of $animate
Update tests for using element.removeClass instead of $animate
JavaScript
mit
bendrucker/angular-animate-change,bendrucker/angular-animate-change
56d7dc2661360d21325ac94338556036c774eb1a
test/model.js
test/model.js
var async = require("async"); var bay6 = require("../lib/"); var expect = require("chai").expect; var mongoose = require("mongoose"); var request = require("supertest"); describe("Model", function() { var app; var model; beforeEach(function() { app = bay6(); app.options.prefix = ""; model = app.mode...
var async = require("async"); var bay6 = require("../lib/"); var expect = require("chai").expect; var mongoose = require("mongoose"); var request = require("supertest"); describe("Model", function() { var app; var model; beforeEach(function() { app = bay6(); app.options.prefix = ""; model = app.mode...
Remove mongoose debug mode from test
Remove mongoose debug mode from test Signed-off-by: Ian Macalinao <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@ian.pw>
JavaScript
mit
simplyianm/bay6
ce8df49212f484ef04b03225b02db5f519b12113
lib/display-message.js
lib/display-message.js
const $ = require('jquery'); function DisplayMessage(){ } DisplayMessage.prototype.showWinMessage = function(){ var div = $('#post-game'); div.empty() .show() .append(`<h1>You Win!</h1> <p>Click to play the next level.</p>` ); div.on('click', function(){ div.hide(); })...
const $ = require('jquery'); function DisplayMessage(){ } DisplayMessage.prototype.showWinMessage = function(){ var div = $('#post-game'); div.empty() .show() .append(`<h1>You Win!</h1> <p>Click to play the next level.</p>` ); div.on('click', function(){ div.hide(); })...
Remove event listener in game win to avoid multiplication
Remove event listener in game win to avoid multiplication
JavaScript
mit
plato721/lights-out,plato721/lights-out
3916cb06b6c1d8694eceb25534e67bcd2830ebb2
app.js
app.js
var express = require('express'), schedule = require('node-schedule'), cacheService = require('./cache-service.js')(), app = express(), dataCache = { news: null, weather: null }; setUpSchedule(); app.get('/', function (req, res) { res.send('Welcome to Scraper API\n'); }); //n...
var express = require('express'), schedule = require('node-schedule'), cacheService = require('./cache-service.js')(), app = express(), dataCache = { news: null, weather: null }; setUpSchedule(); app.get('/', function (req, res) { res.send('Welcome to Scraper API\n' + 'Server ...
Add log of server time
Add log of server time
JavaScript
mit
AlexanderAntov/scraper-js,AlexanderAntov/scraper-js
78826dbdb3e81b084918f550c34527652f8d5de7
examples/cli.js
examples/cli.js
#!/usr/bin/node var convert = require('../'), fs = require('fs'), geojson = JSON.parse(fs.readFileSync(process.argv[2])), mtl = process.argv[3], mtllibs = process.argv.slice(4), options = { coordToPoint: convert.findLocalProj(geojson), mtllib: mtllibs }; if (mtl) { options....
#!/usr/bin/node var convert = require('../'), localProj = require('local-proj'), fs = require('fs'), geojson = JSON.parse(fs.readFileSync(process.argv[2])), mtl = process.argv[3], mtllibs = process.argv.slice(4), options = { coordToPoint: localProj.find(geojson).forward, mtllib:...
Update to async; fix problem with missing findLocalProj
Update to async; fix problem with missing findLocalProj
JavaScript
isc
perliedman/geojson2obj
18957b36ddcd96b41c8897542609c53c166052c3
config/initializers/middleware.js
config/initializers/middleware.js
express = require('express') expressValidator = require('express-validator') module.exports = (function(){ function configure(app) { app.set('port', process.env.PORT || 3000); app.set('host', process.env.HOST || '127.0.0.1') app.use(express.static(__dirname + '/public')); app.use(express.bodyParser()...
express = require('express') expressValidator = require('express-validator') module.exports = (function(){ function configure(app) { app.set('port', process.env.PORT || 3000); app.set('host', process.env.HOST || '127.0.0.1') app.use(express.static(__dirname + '/public')); app.use(function(req,res,nex...
Add access control allow origin middlewar
[FEATURE] Add access control allow origin middlewar
JavaScript
isc
zealord/gatewayd,crazyquark/gatewayd,xdv/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,whotooktwarden/gatewayd,zealord/gatewayd
5762d478a22bb76807e3b92a3b881c42686b3b69
lib/replace-prelude.js
lib/replace-prelude.js
'use strict'; var bpack = require('browser-pack'); var fs = require('fs'); var path = require('path'); var xtend = require('xtend'); var preludePath = path.join(__dirname, 'prelude.js'); var prelude = fs.readFileSync(preludePath, 'utf8'); // This plugin replaces the prelude and adds a transform var plugin = exports....
'use strict'; var bpack = require('browser-pack'); var fs = require('fs'); var path = require('path'); var xtend = require('xtend'); var preludePath = path.join(__dirname, 'prelude.js'); var prelude = fs.readFileSync(preludePath, 'utf8'); // This plugin replaces the prelude and adds a transform var plugin = exports....
Copy `hasExports` setting from bpack when bundle is reset
Copy `hasExports` setting from bpack when bundle is reset Browserify copies this setting manually in b.reset: https://github.com/substack/node-browserify/blob/a18657c6f363272ce3c7722528c8ec5f325d0eaf/index.js#L732 Since we replace the bpack instance the `hasExports` value has to be manually copied from the default b...
JavaScript
mit
royriojas/browsyquire,royriojas/proxyquireify,royriojas/browsyquire,royriojas/proxyquireify,thlorenz/proxyquireify
b1aaf8485740f65770acb7b9a20ca9e35c37b9ad
lib/htmlfile.js
lib/htmlfile.js
module.exports = HtmlFile; function HtmlFile(path) { this.path = path; } HtmlFile.prototype.querySelectorAll = function(ph, style, cb) { var _this = this; return new Promise(function(resolve) { ph.createPage(function(page) { page.open(_this.path, function() { page.evaluate((function() { ...
module.exports = HtmlFile; function HtmlFile(path) { this.path = path; } HtmlFile.prototype.querySelectorAll = function(ph, style, cb) { var _this = this; return new Promise(function(resolve) { ph.createPage(function(page) { page.open(_this.path, function() { var func = 'function() { return do...
Fix "Wrap only the function expression in parens"
Fix "Wrap only the function expression in parens"
JavaScript
mit
sinsoku/clairvoyance,sinsoku/clairvoyance
41de713c677477bae0548bd9b17c5edb100bc53b
aura-components/src/main/components/ui/abstractList/abstractListRenderer.js
aura-components/src/main/components/ui/abstractList/abstractListRenderer.js
/* * Copyright (C) 2013 salesforce.com, inc. * * 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 applicable ...
/* * Copyright (C) 2013 salesforce.com, inc. * * 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 applicable ...
Revert "Make renderer polymorphically call updateEmptyListContent"
Revert "Make renderer polymorphically call updateEmptyListContent" This reverts commit ff82e198ca173fdbb5837982c3795af1dec3a15d.
JavaScript
apache-2.0
forcedotcom/aura,madmax983/aura,forcedotcom/aura,madmax983/aura,forcedotcom/aura,madmax983/aura,madmax983/aura,forcedotcom/aura,forcedotcom/aura,madmax983/aura,madmax983/aura
ce52b37873c55045b97c4288e9d6b8dfdd3a03f8
test/testCacheAllTheThings.js
test/testCacheAllTheThings.js
var Assert = require('assert'); var CacheAllTheThings = require('../'); describe('CacheAllTheThings', function() { it('When asked to boot a Redis instance, it should do so', function() { var inst = new CacheAllTheThings('redis'); Assert(inst.name, 'RedisCache'); }); });
var Assert = require('assert'); var CacheAllTheThings = require('../'); describe('CacheAllTheThings', function() { it('When asked to boot a Redis instance, it should do so', function() { var inst = new CacheAllTheThings('redis'); Assert(inst.name, 'RedisCache'); }); describe('Redis', functio...
Add more tests to set and get values from Redis
Add more tests to set and get values from Redis
JavaScript
mit
andrewhathaway/CacheAllTheThings,andrewhathaway/CacheAllTheThings
687b8066a908dc6a9bbd4c184e143981dec5493a
src/features/header/header-main/styled-components/Wrapper.js
src/features/header/header-main/styled-components/Wrapper.js
//@flow import styled, { css } from "styled-components"; export const Wrapper = styled.div` ${({ theme }: { theme: Theme }) => css` box-sizing: border-box; position: relative; width: 100%; background-color: ${theme.color.background}; padding-top: ${theme.scale.s4(-1)}; @media (min-width: ...
//@flow import styled, { css } from "styled-components"; export const Wrapper = styled.div` ${({ theme }: { theme: Theme }) => css` box-sizing: border-box; position: relative; width: 100%; background-color: ${theme.color.background}; `} `;
Remove media query that accounds for status bar
Remove media query that accounds for status bar Testing if the necessary space will be added by the mobile browser automatically TODO: verify no additional padding required.
JavaScript
mit
slightly-askew/portfolio-2017,slightly-askew/portfolio-2017