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
197ddda395067b87d02b976b03037f47af606b80
src/app/api/page_utils.js
src/app/api/page_utils.js
var _ = require('lodash'); module.exports = { fillLogin: function(form, data) { var formData = _.merge(form, data); return formData; }, headers: function() { return { 'User-Agent': 'Chrome/' + process.versions['chrome'] + ' Electron/' + process.versions['electron'] ...
var _ = require('lodash'); module.exports = { fillLogin: function(form, data) { var formData = _.merge(form, data); return formData; }, headers: function() { return { 'User-Agent': 'Chrome/' + process.versions['chrome'] + ' Electron/' + process.versions['electron'] ...
Check for actual not logged in message
Check for actual not logged in message
JavaScript
mit
kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop
add64845db369da0b842f91d052324530e11287a
lib/index.js
lib/index.js
module.exports = { options: { auth: require('./options/auth'), body: require('./options/body'), callback: require('./options/callback'), cookie: require('./options/cookie'), encoding: require('./options/encoding'), end: require('./options/end'), form: require('./options/form'), gzip: ...
module.exports = { options: { auth: require('./options/auth'), body: require('./options/body'), callback: require('./options/callback'), cookie: require('./options/cookie'), encoding: require('./options/encoding'), end: require('./options/end'), form: require('./options/form'), gzip: ...
Update the list of internal modules
Update the list of internal modules
JavaScript
apache-2.0
request/core
c8ebc8e9e7f8559ef627491193ec55d2ec4d3b03
jquery.ziptastic.js
jquery.ziptastic.js
(function( $ ) { var requests = {}; var zipValid = { us: /[0-9]{5}(-[0-9]{4})?/ }; $.ziptastic = function(zip, callback){ // Only make unique requests if(!requests[zip]) { requests[zip] = $.getJSON('http://zip.elevenbasetwo.com/v2/US/' + zip); } // Bind to the finished request requests[zip].done(fu...
(function( $ ) { var requests = {}; var zipValid = { us: /[0-9]{5}(-[0-9]{4})?/ }; $.ziptastic = function(country, zip, callback){ country = country.toUpperCase(); // Only make unique requests if(!requests[country]) { requests[country] = {}; } if(!requests[country][zip]) { requests[country][zip] ...
Add support for other countries
Add support for other countries
JavaScript
mit
Ziptastic/ziptastic-jquery-plugin,Ziptastic/ziptastic-jquery-plugin,daspecster/ziptastic-jquery-plugin,daspecster/ziptastic-jquery-plugin
02dab375a6e1c06b84170f3a038ea6db8e5c342a
src/components/nav.js
src/components/nav.js
import React from 'react' import { Link } from 'gatsby' import MeImg from '../images/me.jpg' import { MenuIcon } from './icons/Menu' const Nav = ({ onClick }) => { return ( <div className="flex items-center justify-between py-8 text-gray-800"> <Link to="/" aria-label="link to home page"> <div clas...
import React from 'react' import { Link } from 'gatsby' import MeImg from '../images/me.jpg' import { MenuIcon } from './icons/Menu' import { GitHubIcon } from './icons/GitHub' const Nav = ({ onClick }) => { return ( <div className="flex items-center border-b justify-between py-8 text-gray-800"> <Link to=...
Add GitHub icon. Remove articles link
Add GitHub icon. Remove articles link
JavaScript
mit
dtjv/dtjv.github.io
a693a0a7eee07995d79033baef8fe182143f2789
blueprints/server/index.js
blueprints/server/index.js
var isPackageMissing = require('ember-cli-is-package-missing'); module.exports = { description: 'Generates a server directory for mocks and proxies.', normalizeEntityName: function() {}, afterInstall: function(options) { var isMorganMissing = isPackageMissing(this, 'morgan'); var isGlobMissing = isPac...
var isPackageMissing = require('ember-cli-is-package-missing'); module.exports = { description: 'Generates a server directory for mocks and proxies.', normalizeEntityName: function() {}, afterInstall: function(options) { var isMorganMissing = isPackageMissing(this, 'morgan'); var isGlobMissing = isPack...
Create .jshintrc only if "ember-cli-jshint" is a dependency
blueprints/server: Create .jshintrc only if "ember-cli-jshint" is a dependency
JavaScript
mit
rtablada/ember-cli,trentmwillis/ember-cli,givanse/ember-cli,scalus/ember-cli,nathanhammond/ember-cli,kanongil/ember-cli,Turbo87/ember-cli,ef4/ember-cli,xtian/ember-cli,sivakumar-kailasam/ember-cli,givanse/ember-cli,buschtoens/ember-cli,calderas/ember-cli,cibernox/ember-cli,johanneswuerbach/ember-cli,pzuraq/ember-cli,ba...
5373afb242a06091db3dcd0f8473b641b8d3767d
demo/script.js
demo/script.js
var base_layer = new L.tileLayer( 'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',{ attribution: '&copy <a href=" http://www.openstreetmap.org/" title="OpenStreetMap">OpenStreetMap</a> and contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/" title="CC-BY-SA">CC-BY-SA</a>'...
var base_layer = new L.tileLayer( 'http://{s}.tile.cloudmade.com/63250e2ef1c24cc18761c70e76253f75/997/256/{z}/{x}/{y}.png',{ attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a ...
Use cloud made map style
Use cloud made map style
JavaScript
mit
withtwoemms/leaflet-locatecontrol,Drooids/leaflet-locatecontrol,nikolauskrismer/leaflet-locatecontrol,jblarsen/leaflet-locatecontrol,cederache/leaflet-locatecontrol,domoritz/leaflet-locatecontrol,cederache/leaflet-locatecontrol,nikolauskrismer/leaflet-locatecontrol,vivek8943/leaflet-locatecontrol,rick-frantz/leaflet-lo...
a1a15bda062d3e51e4c8fcfc00ab78cd27bd4fc9
packager/webSocketProxy.js
packager/webSocketProxy.js
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ 'use strict...
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ 'use strict...
Fix reloading in debug mode sometimes crashes packager
[ReactNative] Fix reloading in debug mode sometimes crashes packager
JavaScript
bsd-3-clause
zhangwei001/react-native,barakcoh/react-native,rebeccahughes/react-native,maskkid/react-native,dylanchann/react-native,roy0914/react-native,sunblaze/react-native,jonesgithub/react-native,Guardiannw/react-native,chsj1/react-native,mjetek/react-native,Intellicode/react-native,gabrielbellamy/react-native,wangziqiang/react...
5b02710c63cb4bf86af8bbc61c0c18113a8ef5ec
config/protractor.conf.js
config/protractor.conf.js
/** * @author: @AngularClass */ require('ts-node/register'); var helpers = require('./helpers'); exports.config = { baseUrl: 'http://localhost:3000/', // use `npm run e2e` specs: [ helpers.root('src/**/**.e2e.ts'), helpers.root('src/**/*.e2e.ts') ], exclude: [], framework: 'jasmine2', allSc...
/** * @author: @AngularClass */ require('ts-node/register'); var helpers = require('./helpers'); exports.config = { baseUrl: 'http://localhost:8080/', // use `npm run e2e` specs: [ helpers.root('src/**/**.e2e.ts'), helpers.root('src/**/*.e2e.ts') ], exclude: [], framework: 'jasmine2', allSc...
Set protractor host to 8080 instead of 3000.
Set protractor host to 8080 instead of 3000.
JavaScript
mit
sebastianhaas/medical-appointment-scheduling,sebastianhaas/medical-appointment-scheduling,sebastianhaas/medical-appointment-scheduling,sebastianhaas/medical-appointment-scheduling
e95ac0b22ab7ea7e9911d79587869112465467f4
lib/bowerPackageURL.js
lib/bowerPackageURL.js
/** * @module bowerPackageURL * @author Matthew Hasbach * @copyright Matthew Hasbach 2015 * @license MIT */ /** * The bowerPackageURL callback * @callback bowerPackageURLCallback * @param {Object} err - An error object if an error occurred * @param {string} url - The repository URL associated with the provide...
/** * @module bowerPackageURL * @author Matthew Hasbach * @copyright Matthew Hasbach 2015 * @license MIT */ /** * The bowerPackageURL callback * @callback bowerPackageURLCallback * @param {Object} err - An error object if an error occurred * @param {string} url - The repository URL associated with the provide...
Call back a simpler Error object if a package was not found on Bower
Call back a simpler Error object if a package was not found on Bower
JavaScript
mit
mjhasbach/bower-package-url
ce0083e48b19bb661637999ae2596897f80fa719
lib/capture.js
lib/capture.js
var page = require('webpage').create(); var system = require('system'); var args = system.args; var url = args[1]; var imagePath = args[2]; var attempt = 0; function widgetsReady() { return document.querySelector('.widget') !== null && document.querySelectorAll('.widget.loading').length === 0; } function loop() { ...
var page = require('webpage').create(); var system = require('system'); var args = system.args; var url = args[1]; var imagePath = args[2]; var attempt = 0; function widgetsReady() { return document.querySelector('.widget') !== null && document.querySelectorAll('.widget.loading').length === 0; } function loop() { ...
Increase the grace period after load, because highcharts is a complete bastard
Increase the grace period after load, because highcharts is a complete bastard
JavaScript
mit
geckoboard/diffy
5269d3c08d97c03c37f83617daba3eaf238e96b4
react-client/src/components/Bookmarks.js
react-client/src/components/Bookmarks.js
import React from 'react'; import ReactDOM from 'react-dom'; import { Link, withRouter } from 'react-router'; import $ from 'jquery'; class Bookmarks extends React.Component { constructor(props) { super(props); this.state = { bookmarks: [] } } getBookmarks() { let self = this; $.get({ ...
import React from 'react'; import ReactDOM from 'react-dom'; import { Link, withRouter } from 'react-router'; import $ from 'jquery'; class Bookmarks extends React.Component { constructor(props) { super(props); this.state = { bookmarks: [] } } getUserBookmarks() { let self = this; $.ge...
Fix function name for clarity
Fix function name for clarity
JavaScript
mit
francoabaroa/escape-reality,lowtalkers/escape-reality,francoabaroa/escape-reality,lowtalkers/escape-reality
c74d6cc74e697493f1c71552f9ef143ac6e5f96c
server/s3_client.js
server/s3_client.js
var fs = require('fs'); var AWS = require('aws-sdk'); module.exports = function createS3Client() { const awsConfig = (process.env.NODE_ENV === 'development') ? JSON.parse(fs.readFileSync('./tmp/aws_message_popup.json')) : { accessKeyId: process.env.MESSAGE_POPUP_S3_ACCESS_KEY_ID, secretAccess...
var fs = require('fs'); var AWS = require('aws-sdk'); module.exports = function createS3Client() { const awsConfig = (process.env.NODE_ENV === 'development') ? JSON.parse(fs.readFileSync('./tmp/aws_message_popup.json')) : JSON.parse(process.env.MESSAGE_POPUP_S3_CONFIG_JSON); return new AWS.S3(awsConfig); ...
Read AWS credentials for audio as single env var
Read AWS credentials for audio as single env var
JavaScript
mit
kesiena115/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows,kesiena115/threeflows,kesiena115/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows
2089937b11199521f112ce196e498e87db3474d5
components/taglib/TransformHelper/getComponentFiles.js
components/taglib/TransformHelper/getComponentFiles.js
var fs = require('fs'); var path = require('path'); function getComponentFiles(filename) { var ext = path.extname(filename); if (ext === '.js') { return null; } var nameNoExt = path.basename(filename, ext); var isEntry = 'index' === nameNoExt; var fileMatch = '('+nameNoExt.replace(/\...
'use strict'; var fs = require('fs'); var path = require('path'); function getComponentFiles(filename) { var ext = path.extname(filename); if (ext === '.js') { return null; } var nameNoExt = path.basename(filename, ext); var isEntry = 'index' === nameNoExt; var fileMatch = '('+nameN...
Add use-strict to fix old versions of node.
Add use-strict to fix old versions of node.
JavaScript
mit
marko-js/marko,marko-js/marko
56125a7c8375404d2ff355c11d70ab5146c291f4
lib/packages.js
lib/packages.js
var Q = require("q"); var _ = require("lodash"); var path = require("path"); var Packager = require("pkgm"); var pkg = require("../package.json"); var logger = require("./utils/logger")("packages"); var manager = new Packager({ 'engine': "codebox", 'version': pkg.version, 'folder': path.resolve(__dirname,...
var Q = require("q"); var _ = require("lodash"); var path = require("path"); var Packager = require("pkgm"); var pkg = require("../package.json"); var logger = require("./utils/logger")("packages"); var manager = new Packager({ 'engine': "codebox", 'version': pkg.version, 'folder': path.resolve(__dirname,...
Add workspace to codebox context
Add workspace to codebox context
JavaScript
apache-2.0
code-box/codebox,rodrigues-daniel/codebox,ronoaldo/codebox,Ckai1991/codebox,CodeboxIDE/codebox,indykish/codebox,nobutakaoshiro/codebox,fly19890211/codebox,LogeshEswar/codebox,blubrackets/codebox,blubrackets/codebox,kustomzone/codebox,quietdog/codebox,etopian/codebox,lcamilo15/codebox,listepo/codebox,quietdog/codebox,no...
f1e243422f90de3f75a4acab06fc41423e8c6b06
lib/reporter.js
lib/reporter.js
const table = require('text-table') const chalk = require('chalk') class Reporter { report (results) { let output = '\n' let totalErrors = 0 let totalWarnings = 0 results.forEach((result) => { totalErrors += result.errorCount totalWarnings += result.warningCount output += chalk.un...
const table = require('text-table') const chalk = require('chalk') class Reporter { report (results) { let output = '\n' let totalErrors = 0 let totalWarnings = 0 results.forEach((result) => { totalErrors += result.errorCount totalWarnings += result.warningCount output += chalk.un...
Exit with code 0 if only warnings are present
Exit with code 0 if only warnings are present
JavaScript
mit
sourceboat/sass-lint-vue
c4335f69294c6ca940e80ca32050b096426b577a
src/index.js
src/index.js
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; ReactDOM.render(<App />, document.getElementById('root')); registerServiceWorker();
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import { Provider } from 'react-redux' import store from './redux/store' import registerServiceWorker from './registerServiceWorker'; ReactDOM.render( <Provider store={store}> <App /> </Provider>, document.get...
Set up Provider component for redux
Set up Provider component for redux
JavaScript
mit
cernanb/personal-chef-react-app,cernanb/personal-chef-react-app
8bdfbdbd885a435d1d659ee83134fc22a6742688
src/index.js
src/index.js
'use strict'; var EXPORTABLE_RESOURCES; EXPORTABLE_RESOURCES = { Request: './Request', APIError: './APIError', JWTSecuredRequest: './JWTSecuredRequest', Responsebuilder: './ResponseBuilder', SilvermineResponseBuilder: './SilvermineResponseBuilder', responseBuilderHandler: './responseBuilderHandler',...
'use strict'; var EXPORTABLE_RESOURCES; EXPORTABLE_RESOURCES = { Request: './Request', APIError: './APIError', JWTSecuredRequest: './JWTSecuredRequest', ResponseBuilder: './ResponseBuilder', SilvermineResponseBuilder: './SilvermineResponseBuilder', responseBuilderHandler: './responseBuilderHandler',...
Correct the capitalization on ResponseBuilder export
BREAKING: Correct the capitalization on ResponseBuilder export If you have been including `ResponseBuilder` using the export `Responsebuilder`, with this commit you will now need to include it using `ResponseBuilder`.
JavaScript
mit
silvermine/apigateway-utils
052e14ad23fae1bead4565ee3adb103bb03b3832
src/index.js
src/index.js
import CardIOView from './CardIO.ios'; import * as constants from './constants'; export default CardIOView; export const CardIOConstants = constants;
import { NativeModules } from 'react-native'; const { BBBCardIO: { preload, } } = NativeModules; import CardIOView from './CardIO.ios'; import * as constants from './constants'; export default CardIOView; export const CardIOConstants = constants; export { preload, };
Add preload to js api
Add preload to js api
JavaScript
mit
BBB/react-native-card.io
18809ce25afa59e318ecf5ccab7e0d102fa982c9
chrome_extension/client.js
chrome_extension/client.js
(function($){ $.appendSolveButton = function () { var $solve = $(document.createElement('div')).text('solve').css({ cursor: 'pointer', position: 'fixed', left: 0, bottom: 0, padding: '1em 2em', color: 'white', backgroundColor: 'rgba(0, 0, 255, .4)', zIndex: 21474836...
(function($){ $.appendSolveButton = function () { var $solve = $(document.createElement('div')).text('solve').css({ cursor: 'pointer', position: 'fixed', left: 0, bottom: 0, padding: '1em 2em', color: 'white', backgroundColor: 'rgba(0, 0, 255, .4)', zIndex: 21474836...
Add handler for extension's request error
Add handler for extension's request error
JavaScript
mit
en30/online-judge-helper,en30/online-judge-helper,en30/online-judge-helper
5d0a6b1591cf9fae6f182176d563bb284b9e493d
native/calendar/calendar-input-bar.react.js
native/calendar/calendar-input-bar.react.js
// @flow import * as React from 'react'; import { View, Text } from 'react-native'; import { connect } from 'lib/utils/redux-utils'; import Button from '../components/button.react'; import type { AppState } from '../redux/redux-setup'; import { styleSelector } from '../themes/colors'; type Props = {| onSave: () =...
// @flow import * as React from 'react'; import { View, Text } from 'react-native'; import Button from '../components/button.react'; import { useStyles } from '../themes/colors'; type Props = {| +onSave: () => void, +disabled: boolean, |}; function CalendarInputBar(props: Props) { const styles = useStyles(unbo...
Use hook instead of connect functions and HOC in CalendarInputBar
[native] Use hook instead of connect functions and HOC in CalendarInputBar Test Plan: Flow Reviewers: ashoat, palys-swm Reviewed By: ashoat Subscribers: zrebcu411, Adrian Differential Revision: https://phabricator.ashoat.com/D518
JavaScript
bsd-3-clause
Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal
e5de493971c3290e037c16141332d3c487cf756c
js/chai-unindent.js
js/chai-unindent.js
"use strict"; const Chai = require("chai"); const {util} = Chai; let overwritten, unindentPattern; /** * Strip leading tabulation from string blocks when running "equal" method. * * Enables use of ES6 template strings like triple-quoted strings (Python/CoffeeScript). * * @param {Number} columns - Number of lea...
"use strict"; const Chai = global.chai || require("chai"); const {util} = Chai; let overwritten; let unindentPattern; /** Unindent a value if it's a string, and Chai.unindent has been called */ function trimIfNeeded(input){ if(unindentPattern && "[object String]" === Object.prototype.toString.call(input)){ unin...
Trim leading/trailing blank lines when unindenting
Trim leading/trailing blank lines when unindenting Refs: b3926be9112766181a6427c3d94bead82c07d9d0@2db0c90
JavaScript
isc
Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets
e53c716e76bf3ed9180b9b34b4efefb2b484819d
lib/strategy.js
lib/strategy.js
var OpenIDConnectStrategy = require('passport-openidconnect').Strategy; var passportAuthenticateWithCUstomClaims = require('PassportAuthenticateWithCustomClaims').PassportAuthenticateWithCustomClaims; function Strategy(options, verify) { var strategy = new OpenIDConnectStrategy(options, verify); var alternateA...
var OpenIDConnectStrategy = require('passport-openidconnect').Strategy; var passportAuthenticateWithCUstomClaims = require('./PassportAuthenticateWithCustomClaims').PassportAuthenticateWithCustomClaims; function Strategy(options, verify) { var strategy = new OpenIDConnectStrategy(options, verify); var alternat...
Fix broken reference to local module and missing export of the Strategy constructor.
Fix broken reference to local module and missing export of the Strategy constructor.
JavaScript
mit
promethe42/passport-franceconnect
469475059353e62e85218d9f43d1ee65913aea5c
src/shared/components/nav/navItem/navItem.js
src/shared/components/nav/navItem/navItem.js
import React, { PureComponent } from 'react'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import styles from './navItem.css'; class NavItem extends PureComponent { constructor() { super(); // TODO: remove this if .eslintrc updated to parser:"babel-eslint", // allowing c...
import React, { PureComponent } from 'react'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import styles from './navItem.css'; class NavItem extends PureComponent { constructor() { super(); // TODO: remove this if .eslintrc updated to parser:"babel-eslint", // allowing c...
Edit TODO to reflect edited file
Edit TODO to reflect edited file
JavaScript
mit
alexspence/operationcode_frontend,hollomancer/operationcode_frontend,OperationCode/operationcode_frontend,tal87/operationcode_frontend,miaket/operationcode_frontend,tskuse/operationcode_frontend,sethbergman/operationcode_frontend,NestorSegura/operationcode_frontend,tal87/operationcode_frontend,sethbergman/operationcode...
f7c515b7c716b0a1fb75a2bb9a87d83c773b5f2f
pipeline/app/assets/javascripts/controllers/PathwayController.js
pipeline/app/assets/javascripts/controllers/PathwayController.js
'use strict' angular.module('pathwayApp') .controller('PathwayController', function ($scope, $http, $stateParams, $cookieStore, $state) { $http({method: 'GET', url: '/api/pathways/' + $stateParams.id }).success(function(data, status){ $scope.pathway = data }) $scope.user = $cookieStore.get('pathwa...
'use strict' angular.module('pathwayApp') .controller('PathwayController', function ($scope, $http, $stateParams, $cookieStore, $state) { $scope.user = $cookieStore.get('pathway_user') $http({method: 'GET', url: '/api/pathways/' + $stateParams.id }).success(function(data, status){ $scope.pathway = d...
Move global variable to the top
Move global variable to the top
JavaScript
mit
aattsai/Pathway,aattsai/Pathway,aattsai/Pathway
4e5a0e6fdb7d424f082205acf8f18b8edde278b1
environments/nodejs/optional.js
environments/nodejs/optional.js
'use strict' module.exports = { extends: 'javascript/standard/optional.js' }
'use strict' module.exports = { extends: 'javascript/standard/optional' }
Remove extension from extends path
Remove extension from extends path
JavaScript
bsd-3-clause
strvcom/eslint-config-javascript,strvcom/js-coding-standards,strvcom/eslint-config-javascript
2c943d20dae87bfb9aed666644815bbb759c39fb
packages/wct-sauce/scripts/postinstall.js
packages/wct-sauce/scripts/postinstall.js
// People frequently sudo install web-component-tester, and we have to be a // little careful about file permissions. // // sauce-connect-launcher downloads and caches the sc binary into its package // directory the first time you try to connect. If WCT is installed via sudo, // sauce-connect-launcher will be unable to...
// People frequently sudo install web-component-tester, and we have to be a // little careful about file permissions. // // sauce-connect-launcher downloads and caches the sc binary into its package // directory the first time you try to connect. If WCT is installed via sudo, // sauce-connect-launcher will be unable to...
Handle the npm bug with exponential backoff for the require
Handle the npm bug with exponential backoff for the require
JavaScript
bsd-3-clause
Polymer/tools,Polymer/tools,Polymer/tools,Polymer/tools
e2670701f4bc717d28e59285ca9057728786259a
lib/index.js
lib/index.js
/* @flow */ import LinterUI from './main' import type Intentions from './intentions' const linterUiDefault = { instances: new Set(), signalRegistry: null, statusBarRegistry: null, activate() { if (!atom.inSpecMode()) { // eslint-disable-next-line global-require require('atom-package-deps').ins...
/* @flow */ import LinterUI from './main' import type Intentions from './intentions' const linterUiDefault = { instances: new Set(), signalRegistry: null, statusBarRegistry: null, activate() { if (!atom.inSpecMode()) { // eslint-disable-next-line global-require require('atom-package-deps').ins...
Enable the new confirmation dialog in latest package-deps
:new: Enable the new confirmation dialog in latest package-deps
JavaScript
mit
AtomLinter/linter-ui-default,steelbrain/linter-ui-default,steelbrain/linter-ui-default
84e07a26ca69f84916ca5d8cd60316d336ad268d
lib/index.js
lib/index.js
var Line = require('./line'); var simplifyGeometry = function(points, tolerance){ var dmax = 0; var index = 0; for (var i = 1; i <= points.length - 2; i++){ d = new Line(points[0], points[points.length - 1]).perpendicularDistance(points[i]); if (d > dmax){ index = i; dmax = d; } } ...
var Line = require('./line'); var simplifyGeometry = function(points, tolerance){ var dmax = 0; var index = 0; for (var i = 1; i <= points.length - 2; i++){ var d = new Line(points[0], points[points.length - 1]).perpendicularDistance(points[i]); if (d > dmax){ index = i; dmax = d; } }...
Fix 'Uncaught ReferenceError: d is not defined'
Fix 'Uncaught ReferenceError: d is not defined'
JavaScript
mit
seabre/simplify-geometry,gronke/simplify-geometry
c98232fc7b50db1cd4e62ac8991678572376211f
app/assets/javascripts/tax-disc-ab-test.js
app/assets/javascripts/tax-disc-ab-test.js
//= require govuk/multivariate-test /*jslint browser: true, * indent: 2, * white: true */ /*global $, GOVUK */ $(function () { GOVUK.taxDiscBetaPrimary = function () { $('.primary-apply').html($('#beta-primary').html()); $('.secondary-apply').html($('#dvla-secondary').html()); }; if(window.locatio...
//= require govuk/multivariate-test /*jslint browser: true, * indent: 2, * white: true */ /*global $, GOVUK */ $(function () { GOVUK.taxDiscBetaPrimary = function () { $('.primary-apply').html($('#beta-primary').html()); $('.secondary-apply').html($('#dvla-secondary').html()); }; if(window.locatio...
Increase tax disc beta AB to ~100%
Increase tax disc beta AB to ~100% This should mean most users are presented with the beta as the primary option during the August tax disc peak.
JavaScript
mit
alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend
fe266d13835b0ec76648608cab9004324c5aded4
api/utils/promise-utils.js
api/utils/promise-utils.js
'use strict'; exports.delayed = function delayed(ms, value) { return new Promise(resolve => setTimeout(() => resolve(value), ms)); }; exports.timeoutError = 'timeoutError'; /** * Waits a promise for specified timeout. * * @param {Promise} promiseToWait - promise to wait. * @param {number} ms - timeout in milli...
'use strict'; exports.delayed = function delayed(ms, value) { return new Promise(resolve => setTimeout(() => resolve(value), ms)); }; exports.timeoutError = 'timeoutError'; /** * Waits a promise for specified timeout. * * @param {Promise} promiseToWait - promise to wait. * @param {number} ms - timeout in milli...
Fix for timeout after finish.
Fix for timeout after finish.
JavaScript
mit
Dzenly/tia,Dzenly/tia,Dzenly/tia,Dzenly/tia
adf32503c11c443423d861c9c9c7835f3de18631
lib/techs/mock-lang-js.js
lib/techs/mock-lang-js.js
var vfs = require('enb/lib/fs/async-fs'); module.exports = require('enb/lib/build-flow').create() .name('mock-lang-js.js') .target('target', '?.js') .useSourceFilename('source', '?.lang.js') .builder(function (source) { return vfs.read(source, 'utf8') .then(function (content) { ...
var vfs = require('enb/lib/fs/async-fs'); module.exports = require('enb/lib/build-flow').create() .name('mock-lang-js.js') .target('target', '?.js') .useSourceFilename('source', '?.lang.js') .builder(function (source) { return vfs.read(source, 'utf8') .then(function (content) { ...
Append lang mock to the end of file to not make source map being invalid.
Append lang mock to the end of file to not make source map being invalid.
JavaScript
mpl-2.0
enb-bem/enb-bem-tmpl-specs,rndD/enb-bem-tmpl-specs,rndD/enb-bem-tmpl-specs,enb-bem/enb-bem-tmpl-specs
e8a103ff739c4daa6b90efd52dea9630cd3f491b
app/assets/javascripts/welcome.js
app/assets/javascripts/welcome.js
// # Place all the behaviors and hooks related to the matching controller here. // # All this logic will automatically be available in application.js. // # You can use CoffeeScript in this file: http://coffeescript.org/ $(document).ready(function(){ bindSearchBySubmit(); bindSearchByButton(); }) var bindSearchByS...
// # Place all the behaviors and hooks related to the matching controller here. // # All this logic will automatically be available in application.js. // # You can use CoffeeScript in this file: http://coffeescript.org/ $(document).ready(function(){ bindSearchBySubmit(); bindSearchByButton(); }) var bindSearchByS...
Implement search listener on search button
Implement search listener on search button
JavaScript
mit
robertbaker13/write-in-mvp,robertbaker13/write-in-mvp,robertbaker13/write-in-mvp,user512/write-in-mvp,user512/write-in-mvp,user512/write-in-mvp
368e4a68f473259f0b59c9164ff7815868641cdc
app/components/ConceptDropTarget/index.js
app/components/ConceptDropTarget/index.js
import './index.css'; import React from 'react'; import { DropTarget } from 'react-dnd'; const ConceptDropTarget = ({ connectDropTarget, isOver, canDrop, children }) => connectDropTarget( <div className="ConceptDropTarget"> {isOver ? <div className={['ConceptDropTarget-overlay', !canDrop ? 'ConceptDropTarg...
import './index.css'; import React from 'react'; import { DropTarget } from 'react-dnd'; const ConceptDropTarget = ({ connectDropTarget, isOver, canDrop, children }) => connectDropTarget( <div className="ConceptDropTarget"> {isOver ? <div className={['ConceptDropTarget-overlay', !canDrop ? 'ConceptDropTarg...
Disable creating relations between persons and organizations
Disable creating relations between persons and organizations
JavaScript
mit
transparantnederland/browser,transparantnederland/browser,waagsociety/tnl-relationizer,transparantnederland/relationizer,transparantnederland/relationizer,waagsociety/tnl-relationizer
2f1c22e3c150c57c759d15da40239aec27b16c6e
models/Show.js
models/Show.js
class Show { static get INTERMISSION() { return new Show('Sendepause'); } constructor(title) { this.title = title; } isRunningNow() { return this.startTime.isBefore() && this.endTime.isAfter(); } fixMidnightTime() { if (this.startTime.isAfter(this.endTime)) { // show runs at midnight if (moment...
const moment = require('moment-timezone'); class Show { static get INTERMISSION() { return new Show('Sendepause'); } constructor(title) { this.title = title; } isRunningNow() { return this.startTime.isBefore() && this.endTime.isAfter(); } fixMidnightTime() { if (this.startTime.isAfter(this.endTime))...
Fix "moment is not defined" bug for ard channels
Fix "moment is not defined" bug for ard channels
JavaScript
mit
cemrich/zapp-backend
5dc37ed9c2c20fa8759a69647302feacb674d12f
addon/components/file-renderer/component.js
addon/components/file-renderer/component.js
import Ember from 'ember'; import layout from './template'; import config from 'ember-get-config'; /** * @module ember-osf * @submodule components */ /** * Render the provided url in an iframe via MFR * * Sample usage: * ```handlebars * {{file-renderer * download=model.links.download * width="800" hei...
import Ember from 'ember'; import layout from './template'; import config from 'ember-get-config'; /** * @module ember-osf * @submodule components */ /** * Render the provided url in an iframe via MFR * * Sample usage: * ```handlebars * {{file-renderer * download=model.links.download * width="800" hei...
Add detail to sample usage
Add detail to sample usage
JavaScript
apache-2.0
crcresearch/ember-osf,baylee-d/ember-osf,CenterForOpenScience/ember-osf,chrisseto/ember-osf,jamescdavis/ember-osf,hmoco/ember-osf,binoculars/ember-osf,cwilli34/ember-osf,pattisdr/ember-osf,hmoco/ember-osf,chrisseto/ember-osf,pattisdr/ember-osf,baylee-d/ember-osf,binoculars/ember-osf,crcresearch/ember-osf,CenterForOpenS...
6f2d1ebec42aaa1ed9edf32e33018b89840bb7f5
modules/hn/index.js
modules/hn/index.js
var hn = require('hacker-news-api'); var ent = require('ent'); var qs = require('querystring'); var S = require('string'); var hnRegex = /^https?:\/\/news\.ycombinator\.com\/(.*)/; module.exports.url = function(url, reply) { var m; if((m = hnRegex.exec(url))) { if(m[1].indexOf('?') == -1) { return; /...
var hn = require('hacker-news-api'); var ent = require('ent'); var qs = require('querystring'); var S = require('string'); var hnRegex = /^https?:\/\/news\.ycombinator\.com\/(.*)/; module.exports.url = function(url, reply) { var m; if((m = hnRegex.exec(url))) { if(m[1].indexOf('?') == -1) { return; /...
Replace HN newlines similar to t_t
Replace HN newlines similar to t_t
JavaScript
mit
brhoades/EuIrcBot,LinuxMercedes/EuIrcBot,brhoades/EuIrcBot,gmackie/EuIrcBot,gmackie/EuIrcBot,euank/EuIrcBot,LinuxMercedes/EuIrcBot,euank/EuIrcBot
14ac3febd59136b5309f6b170c4a64f42df4529e
models/user.js
models/user.js
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var bcrypt = require('bcrypt-nodejs'); var UserSchema = new Schema({ email: String, password: String, firstName: String, lastName: String }); UserSchema.methods.isValidPassword = function(password){ return bcrypt.compareSync(passwor...
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var bcrypt = require('bcrypt-nodejs'); var UserSchema = new Schema({ email: String, password: String, firstName: String, lastName: String }); UserSchema.methods.isValidPassword = function(password){ return bcrypt.compareSync(passwor...
Fix broken API usage of the new bcrypt-nodejs lib
Fix broken API usage of the new bcrypt-nodejs lib
JavaScript
mit
revov/uci-gui,revov/uci-gui
0314d4a3cbbee5f69deea275497a0bfb9343e78f
lib/hijack/async.js
lib/hijack/async.js
var Fibers = Npm.require('fibers'); var originalYield = Fibers.yield; Fibers.yield = function() { var kadiraInfo = Kadira._getInfo(); if(kadiraInfo) { var eventId = Kadira.tracer.event(kadiraInfo.trace, 'async');; if(eventId) { Fibers.current._apmEventId = eventId; } } originalYield(); }; v...
var Fibers = Npm.require('fibers'); var originalYield = Fibers.yield; Fibers.yield = function() { var kadiraInfo = Kadira._getInfo(); if(kadiraInfo) { var eventId = Kadira.tracer.event(kadiraInfo.trace, 'async');; if(eventId) { Fibers.current._apmEventId = eventId; } } return originalYield()...
Add support for Meteor 1.2
Add support for Meteor 1.2
JavaScript
mit
chatr/kadira,meteorhacks/kadira
dcea9b4539ba2b16b3d2a7ee8ecebb86d2f30122
lib/utils.js
lib/utils.js
"use strict" module.exports = (function(obj) { var cli = require("cli"), json = require("jsonfile"); function returnUnicArrays(arr) { try { var filteredArray = arr.filter(function(item, pos) { return arr.indexOf(item) == pos; }); } catch (e) { showError(e); } return...
"use strict" module.exports = (function(obj) { var cli = require("cli"), json = require("jsonfile"); function returnUnicArrays(arr) { try { var filteredArray = arr.filter(function(item, pos) { return arr.indexOf(item) == pos; }); } catch (e) { showError(e); } return...
Add color to feedback msg
Add color to feedback msg
JavaScript
mit
klaytonfaria/zweepr
f2779249c0cffb3f54b26437c35fdc5b206014d5
lib/oxide_client.js
lib/oxide_client.js
var _ = require('lodash'), dgram = require('dgram'); function Client (opts) { opts = _.defaults(_.pick(opts, Object.keys(Client.defaults)), Client.defaults); for (var key in opts) { Object.defineProperty(this, key, { value: opts[key] }) } } Client.prototype.connect = function () { return this.socket = ...
var _ = require('lodash'), dgram = require('dgram'); function Client (opts) { this.queue = []; opts = _.defaults(_.pick(opts, Object.keys(Client.defaults)), Client.defaults); for (var key in opts) { Object.defineProperty(this, key, { value: opts[key] }) } Object.defineProperty(this, 'connected', func...
Implement the _writeToSocket and send methods on client
Implement the _writeToSocket and send methods on client
JavaScript
mit
MCProHosting/oxide
b34f5b45348dcd6b9f7853825ab982f99c55888f
lib/src/getStats.js
lib/src/getStats.js
'use strict'; var through2 = require('through2'); var fs = require('graceful-fs'); function getStats() { return through2.obj(fetchStats); } function fetchStats(file, enc, cb) { fs.stat(file.path, function (err, stat) { if (stat) { file.stat = stat; } cb(err, file); }); } module.exports = get...
'use strict'; var through2 = require('through2'); var fs = require('graceful-fs'); function getStats() { return through2.obj(fetchStats); } function fetchStats(file, enc, cb) { fs.lstat(file.path, function (err, stat) { if (stat) { file.stat = stat; } cb(err, file); }); } module.exports = ge...
Replace `fs.stat` call with `fs.lstat`
Update: Replace `fs.stat` call with `fs.lstat`
JavaScript
mit
erikkemperman/vinyl-fs,wearefractal/vinyl-fs,gulpjs/vinyl-fs
d2906d68cd6a075d92fa6582918c8497e19c7133
app/assets/javascripts/comics_collection.js
app/assets/javascripts/comics_collection.js
(function() { window.collections.comics = Backbone.Collection.extend({ url: '/comics' }); })();
(function() { window.collections.comics = Backbone.Collection.extend({ url: '/' }); })();
Fix url to the root
Fix url to the root
JavaScript
mit
jboyens/comics,jboyens/comics
169824100f88f017d1793b70a69198a8f9047fe3
katas/es6/language/destructuring/string.js
katas/es6/language/destructuring/string.js
// 11: destructuring - string // To do: make all tests pass, leave the assert lines unchanged! describe('destructuring also works on strings', () => { it('destructure every character', () => { const [a, b, c] = 'abc'; assert.deepEqual([a, b, c], ['a', 'b', 'c']); }); it('missing characters are und...
// 11: destructuring - string // To do: make all tests pass, leave the assert lines unchanged! describe('destructuring also works on strings', () => { it('destructure every character', () => { let a, b, c = 'abc'; assert.deepEqual([a, b, c], ['a', 'b', 'c']); }); it('missing characters are undefin...
Make it worth a kata, make it fail :).
Make it worth a kata, make it fail :).
JavaScript
mit
Semigradsky/katas,cmisenas/katas,JonathanPrince/katas,JonathanPrince/katas,JonathanPrince/katas,cmisenas/katas,tddbin/katas,ehpc/katas,Semigradsky/katas,ehpc/katas,rafaelrocha/katas,Semigradsky/katas,tddbin/katas,tddbin/katas,rafaelrocha/katas,cmisenas/katas,rafaelrocha/katas,ehpc/katas
433f26766615c97744acda90d6007bb776d9c88c
assets/js/modules/index.js
assets/js/modules/index.js
/** * All modules. * * 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/LICENSE-2.0 * * Unless ...
/** * All modules. * * 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/LICENSE-2.0 * * Unless ...
Fix incorrect inclusion (old modules asset should only load legacy files after migration).
Fix incorrect inclusion (old modules asset should only load legacy files after migration).
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
d3614fd4f03f22657171ffcd494a4a83df663cdb
atmessager/lib/telegram.js
atmessager/lib/telegram.js
var logger = require('log4js').getLogger('APP_LOG'); var request = require('request'); function sendMessage(config, receiver, message, botname, callback) { var chat_id = config.receivers[receiver].chat_id; var token = config.bots[botname].token; request.post({ url: 'https://api.telegram.org/bot' + token + '/se...
var logger = require('log4js').getLogger('APP_LOG'); var request = require('request'); function sendMessage(config, receiver, message, botname, callback) { var chat_id = config.receivers[receiver].chat_id; var token = config.bots[botname].token; request.post({ url: 'https://api.telegram.org/bot' + token + '/se...
Change "error" to "error_code" in error object
Change "error" to "error_code" in error object
JavaScript
apache-2.0
dollars0427/ATMessager,dollars0427/ATMessager
46af09e348b688341a2b08a35448df536cbedfac
app/assets/javascripts/foundation_extras.js
app/assets/javascripts/foundation_extras.js
(function() { "use strict"; App.FoundationExtras = { initialize: function() { $(document).foundation(); } }; }).call(this);
(function() { "use strict"; App.FoundationExtras = { initialize: function() { $(document).foundation(); }, destroy: function() { if ($(".sticky").length > 0) { $(".sticky").foundation("_destroy"); } } }; $(document).on("turbolinks:before-visit", App.FoundationExtras.de...
Destroy Sticky elements before leaving the page
Destroy Sticky elements before leaving the page When Foundation initializes a page that has any sticky element, it loads a window scroll listener into window object to handle the sticky element positioning when scrolling. This works great until user moves to a page without sticky elements and the window listeners rema...
JavaScript
agpl-3.0
consul/consul,consul/consul,consul/consul,consul/consul,consul/consul
413595ce25477495c7891288eca5c1c249ec83f5
src/Libraries/ReactNative/I18nManager.js
src/Libraries/ReactNative/I18nManager.js
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule I18nManager * @flow * @format */ 'use strict'; type I18nManagerStatus = { isRTL: boolean, doLeftAndRightSwapInR...
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ 'use strict'; type I18nManagerStatus = { isRTL: boolean, doLeftAndRightSwapInRTL: boolean, allowRTL: (allow...
Remove providesModule that can lead to Haste dups.
Remove providesModule that can lead to Haste dups.
JavaScript
mit
Root-App/react-native-mock-render
292c0376e79156ab1db3cc4417715aa18f8e26ad
src/state/initialState.js
src/state/initialState.js
import Immutable from 'immutable'; import { parseGrounds, parseEntities } from 'state/utils/parseLevel'; import * as level1 from 'state/levels/level-01'; export const initialState = Immutable.fromJS({ time: 120, player: { row: 49, col: 22 }, tapes: [], grounds: parseGrounds(level1.grounds), e...
import Immutable from 'immutable'; import { parseGrounds, parseEntities } from 'state/utils/parseLevel'; import * as level1 from 'state/levels/level-01'; export const initialState = Immutable.fromJS({ time: 120, player: { row: 49, col: 22, direction: 'left' }, tapes: [], grounds: parseGroun...
Add player direction to initial state
Add player direction to initial state
JavaScript
mit
mattesja/mygame,mattesja/mygame,stevenhauser/i-have-to-return-some-videotapes,stevenhauser/i-have-to-return-some-videotapes
4f751563c76bcea37fdf3e0623a037670476077b
plugins/InfiniteScroll/infinitescroll.js
plugins/InfiniteScroll/infinitescroll.js
jQuery(document).ready(function($){ $('notices_primary').infinitescroll({ nextSelector : "li.nav_next a", loadingImg : $('address .url')[0].href+'plugins/InfiniteScroll/ajax-loader.gif', text : "<em>Loading the next set of posts...</em>", donetext : "<em>Congratulations, you\...
jQuery(document).ready(function($){ $('notices_primary').infinitescroll({ nextSelector : "li.nav_next a", loadingImg : $('address .url')[0].href+'plugins/InfiniteScroll/ajax-loader.gif', text : "<em>Loading the next set of posts...</em>", donetext : "<em>Congratulations, you\...
Make notice attachment lightbox work after an infinite scroll happens
Make notice attachment lightbox work after an infinite scroll happens
JavaScript
agpl-3.0
bankonme/gnu-social,zh/statusnet,UngPirat/freesocial,foocorp/gnu-social,brion/StatusNet,faulteh/gnu-social,furtherfield/gnu-social,xebia/statusnet-oauth2,bankonme/gnu-social,csarven/statusnet,charnimda/lgbtpzn-social,xebia/statusnet-oauth2,faulteh/gnu-social,xebia/statusnet-oauth2,zcopley/zcopleys-statusnet-clone,charl...
6fb985cb7a1e1f6edeaf91829eb2e7b77de9806f
controller.js
controller.js
var Controller = function(shape) { this.gameBoard = new tetrisBoard(); this.gameView = new browserView({gameBoard: this.gameBoard}); } Controller.prototype.startGame = function() { this.gameBoard.blit(); this.gameView.animate(); this.gameBoard.cycleDropBlock(); }
var Controller = function(shape) { this.gameBoard = new TetrisBoard(); this.gameView = new BrowserView({gameBoard: this.gameBoard}); } Controller.prototype.startGame = function() { this.gameBoard.blit(); this.gameView.animate(); this.gameBoard.cycleDropBlock(); }
Correct class constructor calls to be capitalized
Correct class constructor calls to be capitalized
JavaScript
mit
RoyTuesday/tetrelementis,peternatewood/tetrelementis,peternatewood/tetrelementis,RoyTuesday/tetrelementis
dcb19ef5aaa9cecb689bae83f7a2923d7e61c4d8
src/typeStrategies/url.js
src/typeStrategies/url.js
const url = { _regex: { default: /^(?:https?:\/\/)?[^\s\/\.]+(?:\.[a-z]{2,})+(?:\/\S*)?$/i }, default: context => { if (context.value === null || context.value && !context.value.toString().match(url._regex.default)) { context.fail('Value must be a valid URL') } } } export default url
const url = { _regex: { default: /^(?:https?:\/\/)?[^\s\/\.]+(?:\.[a-z0-9]{2,})+(?:\/\S*)?$/i }, default: context => { if (context.value === null || context.value && !context.value.toString().match(url._regex.default)) { context.fail('Value must be a valid URL') } } } export default url
Fix regex to allow numbers in domains
Fix regex to allow numbers in domains
JavaScript
mit
TechnologyAdvice/obey
007eff6d9b3fba33af9910ad66c1692e70b99d75
test/rdfa.js
test/rdfa.js
var jQuery = require('jquery'); var VIE = require('../vie.js'); // Until https://github.com/tmpvar/jsdom/issues/issue/81 is fixed VIE.RDFa.predicateSelector = '[property]'; exports['test inheriting subject'] = function(test) { var html = jQuery('<div about="http://dbpedia.org/resource/Albert_Einstein"><span prope...
var jQuery = require('jquery'); var VIE = require('../vie.js'); // Until https://github.com/tmpvar/jsdom/issues/issue/81 is fixed VIE.RDFa.predicateSelector = '[property]'; exports['test inheriting subject'] = function(test) { var html = jQuery('<div about="http://dbpedia.org/resource/Albert_Einstein"><span prope...
Test getting properties as well
Test getting properties as well
JavaScript
mit
bergie/VIE,bergie/VIE
bfb84e6a4d4cf8e710d3e54075e2f3da0651d63d
server/methods/templates/deleteTemplate.js
server/methods/templates/deleteTemplate.js
Meteor.methods({ 'deleteTemplate'(templateId) { console.log("### DELETING TEMPLATE ###"); check(templateId, Match.Any); Template.remove(templateId); console.log(JSON.stringify({ resource: "template", action: "delete", details: { id: templateId, }, ...
Meteor.methods({ 'deleteTemplate'(templateId) { console.log("### DELETING TEMPLATE ###"); check(templateId, Match.Any); const templateObject = Template.findOne(templateId); if (templateObject.owner != Meteor.userId()) { throw new Meteor.Error(401, "This user is not authorized to complete this ...
Support for Shared Templates (Beta) - Only allow deletion if current user is Owner
Support for Shared Templates (Beta) - Only allow deletion if current user is Owner
JavaScript
mit
kmcroft13/cloud-templates,kmcroft13/box-templates,kmcroft13/cloud-templates,kmcroft13/box-templates
9f0fa5056dcf0ea3d3f9db3f1afeb58caa340d77
src/components/Members/MembersPreview.js
src/components/Members/MembersPreview.js
import React, { Component, PropTypes } from 'react'; import { Link } from 'react-router'; class MembersPreview extends Component { render() { const {displayName, searchImg, intro, slug} = this.props; return ( <div className="col-xs-12 col-sm-4 col-md-3"> <div className="thumbnail" style={{ ...
import React, { Component, PropTypes } from 'react'; import { Link } from 'react-router'; class MembersPreview extends Component { render() { const {displayName, searchImg, intro, slug} = this.props; return ( <div className="col-xs-12 col-sm-4 col-md-3"> <div className="thumbnail" style={{ ...
Make images clickable on members search
Make images clickable on members search
JavaScript
cc0-1.0
cape-io/acf-client,cape-io/acf-client
ffc5324d21065acff2cff65277d208c86ffa6809
media/lib/routes.js
media/lib/routes.js
Router.route('/media', {name: 'mediaMenu'}); Router.route('/media/static/:filepath*', function () { if (settings.findOne({key: 'mediainternalserver'}).value) { // var mime = Npm.require('mime'); var fs = Npm.require('fs'); var filepath = settings.findOne({key: 'mediadir'}).value + '/' +...
Router.route('/media', {name: 'mediaMenu'}); Router.route('/media/static/:filepath*', function () { if (settings.findOne({key: 'mediainternalserver'}).value) { var fs = Npm.require('fs'); var filepath = settings.findOne({key: 'mediadir'}).value + '/' + this.params.filepath; try { ...
Set static file Content-Length header
Set static file Content-Length header
JavaScript
mit
cedarsuite/cedarserver,monty5811/cedarserver,monty5811/cedarserver,cedarsuite/cedarserver
58bd59fa0829a48bf07f6a39d106514de1d43aad
grunt/karma.js
grunt/karma.js
module.exports = { options: { configFile: 'karma-unit.conf.js' }, // Sinle run unit: { singleRun: true, preprocessors: { 'src/**/*.js': ['coverage'] }, reporters: ['dots', 'coverage'], coverageReporter: { type : 'text-summary' }, }, // Create coverage report coverage: { singleRun: true, ...
module.exports = { options: { configFile: 'karma-unit.conf.js' }, // Sinle run unit: { singleRun: true, preprocessors: { 'src/**/*.js': ['coverage'] }, reporters: ['dots', 'coverage'], coverageReporter: { type : 'text-summary' }, }, // Create coverage report coverage: { singleRun: true, ...
Use dir set bei grunt.config.
refactor(grunt): Use dir set bei grunt.config.
JavaScript
mit
sebald/ed,mps-gmbh/ed,mps-gmbh/ed,sebald/ed,sebald/ed,mps-gmbh/ed
77d27e84389b43548b32053ab08efc79bdfe2484
node/serveAssets.js
node/serveAssets.js
const {readFileSync} = require('fs') const {resolve} = require('path') function createRequestDecorator (stats) { return (req, res, next) => { res.locals = res.locals || Object.create(null) res.locals.webpackClientStats = stats next && next() } } function serveAssets (router, options = {}) { if (typ...
const {readFileSync} = require('fs') const {resolve} = require('path') function createRequestDecorator (stats) { return (req, res, next) => { res.locals = res.locals || Object.create(null) res.locals.webpackClientStats = stats next && next() } } function serveAssets (router, options = {}) { if (typ...
Add option hideSourceMaps to hide source maps
Add option hideSourceMaps to hide source maps
JavaScript
mit
enten/udk,enten/udk
6366bdb1eb597098bf48a9722413391cb3e48be4
client/js/directives/fancy-box-directive.js
client/js/directives/fancy-box-directive.js
"use strict"; angular.module("hikeio"). directive("fancybox", function() { return { link: function (scope, element, attrs) { scope.$on("$routeChangeStart", function () { $.fancybox.close(); }); $(element).find(attrs.fancybox).fancybox({ padding: 10, nextEffect : "none", prevEffect...
"use strict"; angular.module("hikeio"). directive("fancybox", function() { return { link: function (scope, element, attrs) { scope.$on("$routeChangeStart", function () { $.fancybox.close(); }); $(element).find(attrs.fancybox).fancybox({ padding: 2, nextEffect : "none", prevEffect ...
Reduce padding on fancybox images.
Reduce padding on fancybox images.
JavaScript
mit
zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io
8405b28f9fa1d2383fdd8d74f84e50465e212253
coroutine.js
coroutine.js
// Coroutine function that returns a promise that resolves when the coroutine // is finished. Accepts a generator function, and assumes that everything // yielded from the generator function is a promise. module.exports = function coroutine(generatorFunction) { let gen = generatorFunction() return new Promise(reso...
// Coroutine function that returns a promise that resolves when the coroutine // is finished. Accepts a generator function, and assumes that everything // yielded from the generator function is a promise. module.exports = function coroutine(generatorFunction) { let gen = generatorFunction() return new Promise(res...
Refactor so that next() takes the return value of gen.next()
Refactor so that next() takes the return value of gen.next()
JavaScript
apache-2.0
feihong/node-examples,feihong/node-examples
c28ff2df33608af767cc8056540fd153c5ef2c63
jest.config.js
jest.config.js
module.exports = { testURL: 'http://localhost/', moduleFileExtensions: ['js', 'jsx', 'json', 'styl'], setupFiles: ['<rootDir>/test/jestLib/setup.js'], moduleDirectories: ['src', 'node_modules'], moduleNameMapper: { '^redux-cozy-client$': '<rootDir>/src/lib/redux-cozy-client', '^cozy-doctypes$': 'cozy-...
module.exports = { testURL: 'http://localhost/', moduleFileExtensions: ['js', 'jsx', 'json', 'styl'], setupFiles: ['<rootDir>/test/jestLib/setup.js'], moduleDirectories: ['src', 'node_modules'], moduleNameMapper: { '^redux-cozy-client$': '<rootDir>/src/lib/redux-cozy-client', '^cozy-doctypes$': 'cozy-...
Add the alias for jest
fix(tests): Add the alias for jest
JavaScript
agpl-3.0
cozy/cozy-home,cozy/cozy-home,cozy/cozy-home
828b9def79d0a5c39a925051b0b958c2b452c228
Test.js
Test.js
// For conditions of distribution and use, see copyright notice in LICENSE var client = new WebSocketClient(); var scene = new Scene(); var syncManager = new SyncManager(client, scene); var loginData = {"name": "Test User"}; syncManager.logDebug = true; client.connect("localhost", 2345, loginData); /* setTimeout(pri...
// For conditions of distribution and use, see copyright notice in LICENSE var client = new WebSocketClient(); var scene = new Scene(); var syncManager = new SyncManager(client, scene); var loginData = {"username": "Test User"}; syncManager.logDebug = true; client.connect("localhost", 2345, loginData); /* setTimeout...
Fix login property name used in the test login.
Fix login property name used in the test login.
JavaScript
apache-2.0
playsign/WebTundra,playsign/WebTundra,AlphaStaxLLC/WebTundra,AlphaStaxLLC/WebTundra,realXtend/WebTundra,AlphaStaxLLC/WebTundra,realXtend/WebTundra
02029c252511edfa3090111bc700944869fa55a3
test/steps/pages/board.js
test/steps/pages/board.js
var massahHelper = require('massah/helper') , helper = massahHelper.application.helper module.exports = (function() { var library = massahHelper.getLibrary() .then('the user has the access level (.*)', function(level) { var driver = this.driver driver.element('a[title="Settings"]...
var massahHelper = require('massah/helper') , helper = massahHelper.application.helper module.exports = (function() { var library = massahHelper.getLibrary() .then('the user has the access level (.*)', function(level) { var driver = this.driver driver.element('a[title="Settings"]...
Fix label checking for access level
Fix label checking for access level
JavaScript
apache-2.0
pinittome/pinitto.me,pinittome/pinitto.me,pinittome/pinitto.me
575d14749b4eabcd7463c0f6c13acfa4fd681d94
multitest.js
multitest.js
#!/usr/bin/env node 'use strict' const main = require('./lib/main') if (require.main === module) { main() }
#!/usr/bin/env node 'use strict' const main = require('./lib/main') if (require.main === module) { process.exit(main()) }
Use main return value as process exit code
Use main return value as process exit code
JavaScript
isc
jcollado/multitest
8d63b47a04d3841e89a359928f9ad27c214822ed
module/tests/automated.js
module/tests/automated.js
/* global module, asyncTest, ok, start */ module("forge.httpd"); asyncTest("Test that content is being served via https", 1, function () { if (window.location.protocol == "https:") { ok(true, "Expected 'https:'"); start(); } else { ok(false, "Expected 'https:', got: " + window.location...
/* global module, asyncTest, ok, start, $, forge */ module("forge.httpd"); asyncTest("Test that content is being served via https", 1, function () { if (window.location.protocol == "https:") { ok(true, "Expected 'https:'"); start(); } else { ok(false, "Expected 'https:', got: " + windo...
Add a simple stress test to the unit tests
Add a simple stress test to the unit tests
JavaScript
bsd-2-clause
trigger-corp/trigger.io-httpd,trigger-corp/trigger.io-httpd
22f147c995a48cb1a0a592060a712e727aaac92e
core/client/views/posts.js
core/client/views/posts.js
import {mobileQuery, responsiveAction} from 'ghost/utils/mobile'; var PostsView = Ember.View.extend({ target: Ember.computed.alias('controller'), classNames: ['content-view-container'], tagName: 'section', mobileInteractions: function () { Ember.run.scheduleOnce('afterRender', this, function (...
import {mobileQuery, responsiveAction} from 'ghost/utils/mobile'; var PostsView = Ember.View.extend({ target: Ember.computed.alias('controller'), classNames: ['content-view-container'], tagName: 'section', mobileInteractions: function () { Ember.run.scheduleOnce('afterRender', this, function (...
Fix Ghost icon is not clickable
Fix Ghost icon is not clickable closes #3623 - Initialization of the link was done on login page where the ‚burger‘ did not exist. - initialization in application needs to be done to make it work on refresh
JavaScript
mit
developer-prosenjit/Ghost,cicorias/Ghost,Klaudit/Ghost,obsoleted/Ghost,kolorahl/Ghost,sergeylukin/Ghost,imjerrybao/Ghost,BayPhillips/Ghost,phillipalexander/Ghost,bastianbin/Ghost,ignasbernotas/nullifer,Elektro1776/javaPress,Romdeau/Ghost,augbog/Ghost,kortemy/Ghost,schneidmaster/theventriloquist.us,dggr/Ghost-sr,optikal...
e2a3192f9ad1cc3ecd19001038bb7883c5f252eb
step.js
step.js
export class Step { constructor(name, from, to, pos, param = null) { this.name = name this.from = from this.to = to this.pos = pos this.param = param } } const steps = Object.create(null) export function defineStep(name, impl) { steps[name] = impl } export function applyStep(doc, step) { if...
import {Pos, Node} from "../model" export class Step { constructor(name, from, to, pos, param = null) { this.name = name this.from = from this.to = to this.pos = pos this.param = param } toJSON() { return { name: this.name, from: this.from, to: this.to, pos: this....
Move Step jsonification into Step class, collab code into index.js file
Move Step jsonification into Step class, collab code into index.js file
JavaScript
mit
ProseMirror/prosemirror-transform
696605c6aeb63181371bd747e6db0109a9a3376e
test.js
test.js
'use strict'; const expect = require('chai').expect; const sinon = require('sinon'); const proxyquire = require('proxyquire'); const Plugin = require('.'); describe('rsvg-brunch', function () { // Brunch will automatically supply the default public directory path if it is // not explicitly overridden by the user...
'use strict'; const expect = require('chai').expect; const sinon = require('sinon'); const proxyquire = require('proxyquire'); const Plugin = require('.'); describe('rsvg-brunch', function () { // Brunch will automatically supply the default public directory path if it is // not explicitly overridden by the user...
Remove unnecessary librsvg proxy comment
Remove unnecessary librsvg proxy comment
JavaScript
mit
caleb531/rsvg-brunch
c031c1b7e14a97812f12f0ec02800a9285d954c7
client/app/controllers/new-portion-order.js
client/app/controllers/new-portion-order.js
import Ember from 'ember'; export default Ember.Controller.extend({ session: Ember.inject.service(), notifications: Ember.inject.service(), actions: { addToOrder(order, account, attrs) { const isManager = (this.get('session.account.id') === order.get('manager.id')); const portion = this.store.cr...
import Ember from 'ember'; export default Ember.Controller.extend({ session: Ember.inject.service(), notifications: Ember.inject.service(), actions: { addToOrder(order, account, attrs) { const isManager = (this.get('session.account.id') === order.get('manager.id')); const portion = this.store.cr...
Change transition route to exact order
Change transition route to exact order
JavaScript
mit
yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time
22d71c6921e11eed3491867318427e97ddb30770
server/code/serverSetup.js
server/code/serverSetup.js
const config = require('config'), _ = require('lodash'), fs = require('fs'), path = require('path'); const SETUPSTATUSFILE = 'setup-status.json'; function isSetupNecessary() { let result = true; const cfgPath = path.join(process.env.NODE_CONFIG_DIR_HOST, SETUPSTATUSFILE); // Does file exist? ...
const config = require('config'), _ = require('lodash'), fs = require('fs'), path = require('path'), util = require('util'), push = require('couchdb-push'); const SETUPSTATUSFILE = 'setup-status.json'; const SETUPSTATUSPATH = path.join(process.env.NODE_CONFIG_DIR_HOST, SETUPSTATUSFILE); function i...
Add setup process, use Promises
Add setup process, use Promises WIP: need to use credentials when updating the db, so this module is probably not the right way to do it *automatically*.
JavaScript
agpl-3.0
tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf
d394c7e4dc8d9286034d08c5445e95d2a0cf6891
util.js
util.js
function quote(s) { return "\"" + s.replace(/([\\\"])/, "\\$1") + "\""; } function maybe_quote(s) { if (/[\\\"]/.test(s)) return quote(s); else return s; } function repr(x, max_depth) { if (max_depth == undefined) max_depth = 1; if (x === null) { return "null"; } else if (x instanceof java.lang.Iterabl...
function quote(s) { return "\"" + s.replace(/([\\\"])/, "\\$1") + "\""; } function maybe_quote(s) { if (/^[_A-Za-z][_A-Za-z0-9]*$/.test(s)) return s; else return quote(s); } function repr(x, max_depth) { if (max_depth == undefined) max_depth = 1; if (x === null) { return "null"; } else if (x instanceof...
Fix the identifier-ness test in maybe_quote.
Fix the identifier-ness test in maybe_quote.
JavaScript
mit
arlolra/flashproxy,infinity0/flashproxy,infinity0/flashproxy,glamrock/flashproxy,infinity0/flashproxy,arlolra/flashproxy,arlolra/flashproxy,infinity0/flashproxy,glamrock/flashproxy,arlolra/flashproxy,glamrock/flashproxy,arlolra/flashproxy,glamrock/flashproxy,glamrock/flashproxy,infinity0/flashproxy,glamrock/flashproxy,...
88fe77b133eb5e9b09acc80d41e3b2f2b12097b2
src/js/wallet/wallet.deposit.controller.js
src/js/wallet/wallet.deposit.controller.js
(function () { 'use strict'; function WavesWalletDepositController ($scope, events, coinomatService, dialogService, notificationService, applicationContext, bitcoinUriService) { var deposit = this; deposit.bitcoinAddress = ''; deposit.bitcoinAm...
(function () { 'use strict'; function WavesWalletDepositController ($scope, events, coinomatService, dialogService, notificationService, applicationContext, bitcoinUriService) { var deposit = this; deposit.bitcoinAddress = ''; deposit.bitcoinAm...
Set minimal deposit amount in accordance with description
Set minimal deposit amount in accordance with description
JavaScript
mit
wavesplatform/WavesGUI,beregovoy68/WavesGUI,wavesplatform/WavesGUI,beregovoy68/WavesGUI,wavesplatform/WavesGUI,beregovoy68/WavesGUI,wavesplatform/WavesGUI,beregovoy68/WavesGUI
bcd6742b0cc7a2e17da8c7e727573e99c30c4f45
variables.js
variables.js
'use strict'; export const buyIn = 20; export const startingSeconds = 15 * 60; export const smallBlinds = [ 100, 200, 300, 400, 500, 800, 1000, 1500, 2000, 3000, 5000]; export function payouts( pot ) { if ( pot <= 80 ) { return [ pot, 0, 0 ]; } else if ( pot <= 140 ) { return [ pot - 30, 30, 0...
'use strict'; export const buyIn = 20; export const startingSeconds = 15 * 60; export const smallBlinds = [ 100, 200, 300, 400, 500, 800, 1000, 1500, 2000, 3000, 5000]; export function payouts( pot ) { return [ pot * 0.5, pot * 0.3, pot * 0.2 ]; }
Update payout structure to 50-30-20
Update payout structure to 50-30-20
JavaScript
mit
pattern/react-poker,pattern/react-poker
a26b63a37cc3027bb37cb1a381b0e89fea231ca0
spec/fixtures/test-data/test-performance.js
spec/fixtures/test-data/test-performance.js
const moment = require('moment'); const formatString = 'YYYY-MM-DD HH:mm:ss'; module.exports = { current: true, id: 1, name: 'Bowling Green Game', openAt: moment().format(formatString), closeAt: moment().format(formatString), performDate: moment().startOf('day').add({ days: 5, hours: 12 }).format(formatStr...
const moment = require('moment'); module.exports = { current: true, id: 1, name: 'Bowling Green Game', openAt: new Date().toISOString(), closeAt: moment().add({ minutes: 1 }).format(), performDate: moment().startOf('day').add({ days: 5, hours: 12 }).format() };
Make test performance challenge window 1 minute long
Make test performance challenge window 1 minute long
JavaScript
mit
osumb/challenges,osumb/challenges,osumb/challenges,osumb/challenges
938211a21bd73c73cdc9e877a93cee732c628dd0
mailman-discard-and-ban.user.js
mailman-discard-and-ban.user.js
// ==UserScript== // @name Mailman discard // @namespace http://bd808.com/userscripts/ // @description Automatically selects "Discard" and ticks the "Add" and "Discards" checkboxes on Mailman admin requests for pending messages // @match *://*/mailman/admindb/* // @match *://*/lists/admindb/* // @version 0.1 // @author...
// ==UserScript== // @name Mailman discard // @namespace http://bd808.com/userscripts/ // @description Automatically selects "Discard" and ticks the "Add" and "Discards" checkboxes on Mailman admin requests for pending messages // @match https?://*/mailman/admindb/* // @match https?://*/lists/admindb/* // @version 0.2 ...
Make @match work with newer greasemonkey
mailman: Make @match work with newer greasemonkey Using a wildcard for the protocol no longer works.
JavaScript
mit
bd808/userscripts,bd808/userscripts
7224ef8129d87b2b2fe80e604d0f9bdf739d4ed4
module/eCampWeb/vue/src/main.js
module/eCampWeb/vue/src/main.js
import Vue from 'vue' import CampDetails from './components/camp-details' new Vue({ el: '#camp-details', render(h) { return h(CampDetails, { props: this.$el.dataset } ); }, });
import Vue from 'vue' import CampDetails from './components/camp-details' const vueApps = { 'camp-details': CampDetails, }; for (let id in vueApps) { if (!vueApps.hasOwnProperty(id)) continue; if (document.getElementById(id)) { new Vue({ el: '#' + id, render(h) { ...
Make root component handling more generic
Make root component handling more generic
JavaScript
agpl-3.0
pmattmann/ecamp3,ecamp/ecamp3,pmattmann/ecamp3,pmattmann/ecamp3,usu/ecamp3,usu/ecamp3,usu/ecamp3,pmattmann/ecamp3,ecamp/ecamp3,usu/ecamp3,ecamp/ecamp3,ecamp/ecamp3
b9b6b177d5ff43a393c152fd8b0ed518002e67f9
modules/finders/index.js
modules/finders/index.js
/* eslint-disable global-require */ module.exports = { 'Bungie.net': require( './Bungie.net.js' ), MiggyRSS: require( './MiggyRSS.js' ), Reddit: require( './Reddit.js' ), rsi: require( './rsi.js' ), Steam: require( './Steam.js' ), Discourse: require( './Discourse.js' ), };
/* eslint-disable global-require */ module.exports = { 'Bungie.net': require( './Bungie.net.js' ), MiggyRSS: require( './MiggyRSS.js' ), Reddit: require( './Reddit.js' ), rsi: require( './rsi.js' ), Steam: require( './Steam.js' ), // Discourse: require( './Discourse.js' ), };
Disable Discourse The endpoints we use are not generic
Disable Discourse The endpoints we use are not generic
JavaScript
mit
post-tracker/finder
9638172ebf656409613df191590559f4e2adce5e
npm-build/development.js
npm-build/development.js
var Lanes = ( global.Lanes || (global.Lanes = {}) ); Lanes.Vendor = ( Lanes.Vendor || {} ); Lanes.Vendor.ReactProxy = require("react-proxy"); Lanes.Vendor.ReactTestUtils = require('react-addons-test-utils'); Lanes.Vendor.deepForceUpdate = require('react-deep-force-update');
var Lanes = ( global.Lanes || (global.Lanes = {}) ); Lanes.Vendor = ( Lanes.Vendor || {} ); Lanes.Vendor.ReactProxy = require("react-proxy").default; Lanes.Vendor.ReactTestUtils = require('react-addons-test-utils'); Lanes.Vendor.deepForceUpdate = require('react-deep-force-update');
Work around es7 exprots from new version
Work around es7 exprots from new version
JavaScript
mit
argosity/lanes,argosity/hippo,argosity/hippo,argosity/lanes,argosity/lanes,argosity/hippo
9c7c632269afff96fc41f6c3663fd20fde3b795e
indico/htdocs/js/indico/angular/filters.js
indico/htdocs/js/indico/angular/filters.js
/* This file is part of Indico. * Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). * * Indico is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 3 of the * License...
/* This file is part of Indico. * Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). * * Indico is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 3 of the * License...
Change i18n angular filter to interpolate strings
Change i18n angular filter to interpolate strings
JavaScript
mit
DirkHoffmann/indico,mic4ael/indico,indico/indico,OmeGak/indico,indico/indico,DirkHoffmann/indico,ThiefMaster/indico,mic4ael/indico,pferreir/indico,ThiefMaster/indico,OmeGak/indico,pferreir/indico,OmeGak/indico,mvidalgarcia/indico,pferreir/indico,DirkHoffmann/indico,mic4ael/indico,mvidalgarcia/indico,DirkHoffmann/indico...
74a45aa89391182f432b19b1b3c25338e189c9c9
app/assets/javascripts/tax-disc-ab-test.js
app/assets/javascripts/tax-disc-ab-test.js
//= require govuk/multivariate-test /*jslint browser: true, * indent: 2, * white: true */ /*global $, GOVUK */ $(function () { GOVUK.taxDiscBetaPrimary = function () { $('.primary-apply').html($('#beta-primary').html()); $('.secondary-apply').html($('#dvla-secondary').html()); }; if(window.locatio...
//= require govuk/multivariate-test /*jslint browser: true, * indent: 2, * white: true */ /*global $, GOVUK */ $(function () { GOVUK.taxDiscBetaPrimary = function () { $('.primary-apply').html($('#beta-primary').html()); $('.secondary-apply').html($('#dvla-secondary').html()); }; if(window.locatio...
Set the weights for each cohort
Set the weights for each cohort
JavaScript
mit
alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend
2d473bc2aa873f71cafdd04e147d5b541a0e164f
src/api/extensions/auth.js
src/api/extensions/auth.js
import config from 'config'; import hapiAuthCookie from 'hapi-auth-cookie'; export default (server, projectConfig) => { server.register(hapiAuthCookie, (err) => { if (err) { throw err; } server.auth.strategy('session', 'cookie', 'optional', { password: config.get('hapi.authCookie.password'),...
import config from 'config'; import hapiAuthCookie from 'hapi-auth-cookie'; export default (server, projectConfig) => { server.register(hapiAuthCookie, (err) => { if (err) { throw err; } server.auth.strategy('session', 'cookie', 'optional', { password: config.get('hapi.authCookie.password'),...
Make sid cookie secure in production
Make sid cookie secure in production
JavaScript
mit
apazzolini/rsapp
65a4352846bb570c33bd918584977f084e147d54
src/components/RouterHistoryContainer.js
src/components/RouterHistoryContainer.js
/** * RouterHistoryContainer is already connected to the router state, so you only * have to pass in `routes`. It also responds to history/click events and * dispatches routeTo actions appropriately. */ import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'...
/** * RouterHistoryContainer is already connected to the router state, so you only * have to pass in `routes`. It also responds to history/click events and * dispatches routeTo actions appropriately. */ import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'...
Send the minimal amount of DOM to the client
Send the minimal amount of DOM to the client
JavaScript
mit
zapier/redux-router-kit
b4e695d3fafccdfaba2b97b685383aa69ebc0a4e
src/protocol/message/compression/index.js
src/protocol/message/compression/index.js
const { KafkaJSNotImplemented } = require('../../../errors') const MESSAGE_CODEC_MASK = 0x3 const RECORD_BATCH_CODEC_MASK = 0x07 const Types = { None: 0, GZIP: 1, Snappy: 2, LZ4: 3, } const Codecs = { [Types.GZIP]: () => require('./gzip'), [Types.Snappy]: () => { throw new KafkaJSNotImplemented('Snap...
const { KafkaJSNotImplemented } = require('../../../errors') const MESSAGE_CODEC_MASK = 0x3 const RECORD_BATCH_CODEC_MASK = 0x07 const Types = { None: 0, GZIP: 1, Snappy: 2, LZ4: 3, ZSTD: 4, } const Codecs = { [Types.GZIP]: () => require('./gzip'), [Types.Snappy]: () => { throw new KafkaJSNotImplem...
Add support for ZStandard compression.
Add support for ZStandard compression. This is landing in Kafka 2.1.0, due for release 29th October, 2018. References - 1. https://cwiki.apache.org/confluence/display/KAFKA/KIP-110%3A+Add+Codec+for+ZStandard+Compression 2. https://issues.apache.org/jira/browse/KAFKA-4514 3. https://github.com/apache/kafka/pull/2267 ...
JavaScript
mit
tulios/kafkajs,tulios/kafkajs,tulios/kafkajs,tulios/kafkajs
c29b6f6da351534deccb5cd7c62f7eceee140fc9
lib/uat_director/javascript/uat_director.js
lib/uat_director/javascript/uat_director.js
$("body").prepend("<div id='uat-bar'><a class='go' href='#'>Show me what to test</a><div class='pop-over hide'><a class='close' href='#'>close</a></div></div>"); $("head").append("<link href='http://github.com/plus2/uat_director/raw/master/lib/uat_director/stylesheets/uat_director.css' media='screen' rel='styleshee...
(function($) { $("body").prepend("<div id='uat-bar'><a class='go' href='#'>Show me what to test</a><div class='pop-over hide'></div></div>"); $("head").append("<link href='http://github.com/plus2/uat_director/raw/master/lib/uat_director/stylesheets/uat_director.css' media='screen' rel='stylesheet' type='text/css'>"...
Use a closure and remove the close link.
Use a closure and remove the close link.
JavaScript
mit
plus2/whereuat,plus2/whereuat
8b0b45b41bc26db0771ebd58d521540ac7c490e6
recipes/conversation/config.default.js
recipes/conversation/config.default.js
// User-specific configuration exports.conversationWorkspaceId = ''; // replace with the workspace identifier of your conversation // Create the credentials object for export exports.credentials = {}; // Watson Conversation // https://www.ibm.com/watson/developercloud/conversation.html exports.credentials.conversatio...
/* User-specific configuration ** IMPORTANT NOTE ******************** * Please ensure you do not interchange your username and password. * Hint: Your username is the lengthy value ~ 36 digits including a hyphen * Hint: Your password is the smaller value ~ 12 characters */ exports.conversationWorkspace...
Add note regarding username/password interchange.
Add note regarding username/password interchange.
JavaScript
apache-2.0
ibmtjbot/tjbot,zhix/tjbot,zhix/tjbot,Hachimaki/TJBot,Hachimaki/TJBot,ibmtjbot/tjbot
5a1818fd71502a6c325387d1f5f61c76cadc0512
routes/auth.js
routes/auth.js
var User = require('../models/user'); var express = require('express'); var router = express.Router(); router.route('/auth').get(getAuth); router.route('/auth').post(login); router.route('/auth').delete(logout); module.exports = router; function getAuth(req, res) { if(req.session.userId == null) res.json(...
var User = require('../models/user'); var Response = require('../modules/response'); var express = require('express'); var router = express.Router(); router.route('/auth').get(getAuth); router.route('/auth').post(login); router.route('/auth').delete(logout); module.exports = router; function getAuth(req, res) { ...
Use Response module to send JSON return messages
Use Response module to send JSON return messages
JavaScript
mit
asso-labeli/labeli-api,asso-labeli/labeli-api,asso-labeli/labeli-api
4bdb309eacb34b27cd4f6df4979d823754cb3562
lib/APNPushNotification.js
lib/APNPushNotification.js
var apn = require('apn'); var util = require('util'); var BasePushNotification = require('./BasePushNotification'); connection = new apn.Connection({ cert: '', key: '' }).on('error', console.log.bind(console.log)).on('transmissionError', console.log.bind(console.log)); util.inherits(APNPushNotification, BasePushNo...
var apn = require('apn'); var util = require('util'); var BasePushNotification = require('./BasePushNotification'); util.inherits(APNPushNotification, BasePushNotification); /** * Create new APN Push Notification * @param {Object} options * @returns {APNPushNotification} * @constructor */ function APNPushNotific...
Rewrite apn push a little bit
Rewrite apn push a little bit
JavaScript
mit
ghaiklor/sails-service-pusher
3024f5a600747068ae5de791e35294ba7580cc16
lib/browsers-definition.js
lib/browsers-definition.js
module.exports = [ 'ie/7..latest', 'chrome/latest', 'firefox/latest', 'safari/5..latest', 'android/4.4..latest', 'iphone/latest', 'ipad/latest' ]
module.exports = [ 'ie/8..latest', 'chrome/latest', 'firefox/latest', 'safari/6..latest', 'android/4.4..latest', 'iphone/latest', 'ipad/latest' ]
Drop support for IE7 and Safari 5
Drop support for IE7 and Safari 5
JavaScript
bsd-3-clause
PolicyStat/policystat-sauce-browsers
2085fe00e06bdbe55884d14b01c837ff32495dbe
tasks/lib/replacements/@include_nested.js
tasks/lib/replacements/@include_nested.js
/* NESTED INCLUDING MIXINS #gradient > @include vertical($primaryColor, $secondaryColor); #grid > @include gu($rtl); TO =====> @include gradient-vertical($primaryColor, $secondaryColor); @include grid-gu($rtl); */ module.exports = { pattern: /(\s*)\#([\w\-]*)\s*>\s*\@include\s+(.*);/gi, replacem...
/* NESTED INCLUDING MIXINS #gradient > @include vertical($primaryColor, $secondaryColor); #grid > @include gu($rtl); TO =====> @include gradient-vertical($primaryColor, $secondaryColor); @include grid-gu($rtl); */ module.exports = { pattern: /(\s*)\#([\w\-]*)\s*>\s*\@include\s+(.*);/gi, replacem...
Change order of include_nested to remove sort race.
Change order of include_nested to remove sort race.
JavaScript
mit
duvillierA/grunt-less-to-sass
877c0dd3828633563de3ad96064765b3e9d47115
bin/gonzales.js
bin/gonzales.js
#!/usr/bin/env node /** * ./bin/gonzales.js filename * ./bin/gonzales.js filename -s */ var gonzales = require('..'), fs = require('fs'), filename = process.argv[2], silent = process.argv[3] === '-s'; if (!filename) { console.log('Please supply a filename. Usage "gonzales file"'); process.exit(); }...
#!/usr/bin/env node /** * ./bin/gonzales.js filename * ./bin/gonzales.js filename -s */ var gonzales = require('..'), fs = require('fs'), path = require('path'), filename = process.argv[2], silent = process.argv[3] === '-s'; if (!filename) { console.log('Please supply a filename. Usage "gonzales ...
Use file extension as a syntax name
[cli] Use file extension as a syntax name
JavaScript
mit
brendanlacroix/gonzales-pe,tonyganch/gonzales-pe,brendanlacroix/gonzales-pe,tonyganch/gonzales-pe
c1b608a4001d5893cc1e48b608dcbab197aa6aea
lib/about-status-bar.js
lib/about-status-bar.js
/** @babel */ /** @jsx etch.dom */ import {CompositeDisposable} from 'atom' import etch from 'etch' import EtchComponent from './etch-component' class AboutStatusBar extends EtchComponent { constructor () { super() this.subscriptions = new CompositeDisposable() this.subscriptions.add(atom.tooltips.add(...
/** @babel */ /** @jsx etch.dom */ import {CompositeDisposable} from 'atom' import etch from 'etch' import EtchComponent from './etch-component' class AboutStatusBar extends EtchComponent { constructor () { super() this.subscriptions = new CompositeDisposable() this.subscriptions.add(atom.tooltips.add(...
Remove unnecessary method overrides from AboutStatusBar
:fire: Remove unnecessary method overrides from AboutStatusBar
JavaScript
mit
mnquintana/atom-about,atom/about
90d6425ba5ad311223915c85cb5ded8f4bf82db0
src/characteristicWrite.js
src/characteristicWrite.js
import { makeCharacteristicEventListener, ReactNativeBluetooth, } from './lib'; const writeCharacteristicValue = (characteristic, buffer, withResponse) => { return new Promise((resolve, reject) => { if (!withResponse) { ReactNativeBluetooth.writeCharacteristicValue(characteristic, buffer.toString('base...
import { makeCharacteristicEventListener, ReactNativeBluetooth, } from './lib'; const writeCharacteristicValue = (characteristic, buffer, withResponse) => { return new Promise((resolve, reject) => { if (!withResponse) { ReactNativeBluetooth.writeCharacteristicValue(characteristic, buffer.toString('base...
Fix error introduced in refactoring of characteristic write.
Fix error introduced in refactoring of characteristic write.
JavaScript
apache-2.0
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,sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth
6948ab430cd6dc8fa5112b637d12a83cb0c8d27a
src/sprites/character/Player/update/move.js
src/sprites/character/Player/update/move.js
import { nextCoord } from '../../../../utils'; import checkCollide from '../../../../collisions'; import { pixelToTile } from '../../../../tiles'; import interfaceWithObjects from '../../Common/interface-objects'; export default function tryMove(direction) { if (this.moving) return; this.face(direction); cons...
import { nextCoord } from '../../../../utils'; import checkCollide from '../../../../collisions'; import { pixelToTile } from '../../../../tiles'; import devtools from '../../../../devtools'; import interfaceWithObjects from '../../Common/interface-objects'; export default function tryMove(direction) { if (this.mo...
Add noclip and fast player speed to devtools
Add noclip and fast player speed to devtools
JavaScript
mit
ThomasMays/incremental-forest,ThomasMays/incremental-forest
7875d5954e2562d11a64d84ef69a2c874bf27231
build-darwin.js
build-darwin.js
var fs = require('fs') var exec = require('child_process').exec var pack = JSON.parse(fs.readFileSync('package.json', 'utf-8')) var version = pack.version console.log('Building version ' + version + ' in Brave-darwin-x64') var cmd = 'rm -rf Brave-darwin-x64 && NODE_ENV=production ./node_modules/webpack/bin/webpack.j...
var fs = require('fs') var exec = require('child_process').exec // get our version var pack = JSON.parse(fs.readFileSync('package.json', 'utf-8')) var version = pack.version // get the electron version var electronPrebuiltPack = JSON.parse(fs.readFileSync('./node_modules/electron-prebuilt/package.json', 'utf-8')) var...
Use Electron Prebuilt version from package.json
Use Electron Prebuilt version from package.json
JavaScript
mpl-2.0
willy-b/browser-laptop,luixxiul/browser-laptop,darkdh/browser-laptop,Sh1d0w/browser-laptop,timborden/browser-laptop,Sh1d0w/browser-laptop,timborden/browser-laptop,PFCKrutonium/browser-laptop,pmkary/braver,Sh1d0w/browser-laptop,diasdavid/browser-laptop,luixxiul/browser-laptop,MKuenzi/browser-laptop,MKuenzi/browser-lapto...
c74fa468a78f99c3dc305ed9c535a95e0079dcb8
src/components/Headings.js
src/components/Headings.js
import React from 'react' export const H1 = ({ classes, children }) => ( <h1 className={`${classes} text-3xl font-extrabold tracking-tight text-gray-800 leading-9 sm:leading-10 sm:text-4xl md:text-5xl md:leading-14`} > {children} </h1> ) export const H2 = ({ classes, children }) => ( <h2 className...
import React from 'react' export const H1 = ({ classes, children }) => ( <h1 className={`${ classes ?? '' } text-3xl font-extrabold tracking-tight text-gray-800 leading-9 sm:leading-10 sm:text-4xl md:text-5xl md:leading-14`} > {children} </h1> ) export const H2 = ({ classes, children }) => ( ...
Fix undefined style corner case
Fix undefined style corner case
JavaScript
mit
dtjv/dtjv.github.io
83f4844364f200cae38066d7feca7c932bcc88e7
plugins/vega/web_client/views/VegaWidget.js
plugins/vega/web_client/views/VegaWidget.js
import View from 'girder/views/View'; import { AccessType } from 'girder/constants'; import VegaWidgetTemplate from '../templates/vegaWidget.pug'; import '../stylesheets/vegaWidget.styl'; import vg from 'vega'; var VegaWidget = View.extend({ initialize: function (settings) { this.item = settings.item; ...
import View from 'girder/views/View'; import { AccessType } from 'girder/constants'; import { restRequest } from 'girder/rest'; import VegaWidgetTemplate from '../templates/vegaWidget.pug'; import '../stylesheets/vegaWidget.styl'; import vg from 'vega'; var VegaWidget = View.extend({ initialize: function (settin...
Use restRequest for Ajax requests to Girder servers
Use restRequest for Ajax requests to Girder servers
JavaScript
apache-2.0
adsorensen/girder,sutartmelson/girder,data-exp-lab/girder,sutartmelson/girder,sutartmelson/girder,RafaelPalomar/girder,manthey/girder,jbeezley/girder,Xarthisius/girder,manthey/girder,jbeezley/girder,kotfic/girder,sutartmelson/girder,Xarthisius/girder,RafaelPalomar/girder,adsorensen/girder,girder/girder,Kitware/girder,g...
4df5338c87542f6dbf56ba3013bc012b599e333c
js/controllers/specific-tweets.js
js/controllers/specific-tweets.js
const Tweet = require('../models/tweet') const config = require('../config') const mongoose = require('mongoose') const specificTweetsController = function (req, res) { res.set('Access-Control-Allow-Origin', '*') if (!req.params.name) { res.status(400).send('Invalid trend name') return } let query ...
const Tweet = require('../models/tweet') const config = require('../config') const mongoose = require('mongoose') const specificTweetsController = function (req, res) { res.set('Access-Control-Allow-Origin', '*') if (!req.params.name) { res.status(400).send('Invalid trend name') return } let query ...
Make specific tweet endpoint adhere to API schema
Make specific tweet endpoint adhere to API schema
JavaScript
mit
SentiSocial/sentisocial-backend,SentiSocial/backend
3611b33fde572d11101c790b2c2d0d9933b379b9
frontend/src/core/Store.js
frontend/src/core/Store.js
import {createStore, applyMiddleware} from 'redux'; import thunkMiddleware from 'redux-thunk'; import travelApp from 'reducers/Reducers.js'; const createStoreWithMiddleware = applyMiddleware( thunkMiddleware )(createStore); export default createStoreWithMiddleware(travelApp);
import {createStore, compose, applyMiddleware} from 'redux'; import {devTools, persistState} from 'redux-devtools'; import thunkMiddleware from 'redux-thunk'; import travelApp from 'reducers/Reducers.js'; const enhancedCreateStore = compose( applyMiddleware( thunkMiddleware), devTools(), persistState(window....
Apply devtools as a enhanced create store
Apply devtools as a enhanced create store
JavaScript
agpl-3.0
jilljenn/voyageavecmoi,jilljenn/voyageavecmoi,jilljenn/voyageavecmoi
fc976d49f97fbd5d827edc8190abd1e6b3890b2c
app/directives/validatedInputDirective.js
app/directives/validatedInputDirective.js
core.directive("validatedinput", function() { return { template: '<span ng-include src="view"></span>', restrict: 'E', scope: { "type": "@", "model": "=", "property": "@", "label": "@", "placeholder": "@", "truevalue": "@", "falsevalue": "@", "blur": "&", "results": "=" }, link: fu...
core.directive("validatedinput", function() { return { template: '<span ng-include src="view"></span>', restrict: 'E', scope: { "type": "@", "model": "=", "property": "@", "label": "@", "placeholder": "@", "truevalue": "@", "falsevalue": "@", "blur": "&", "results": "=" }, link: fu...
Refresh model when pressing escape within validated input.
Refresh model when pressing escape within validated input.
JavaScript
mit
TAMULib/Weaver-UI-Core,TAMULib/Weaver-UI-Core
84ab9b7b949235d840fbf19e394fc009b3a06e1b
parse/cloud/main.js
parse/cloud/main.js
require('cloud/app.js'); require('cloud/fuse.min.js'); /* * Provides Cloud Functions for Rice Maps. */ Parse.Cloud.define("placesSearch", function(request, response) { console.log("Search Query: " + request.params.query); // Define Parse cloud query that retrieves all Place objects and matches them to a search ...
require('cloud/app.js'); var Fuse = require('cloud/fuse.min.js'); /* * Provides Cloud Functions for Rice Maps. */ Parse.Cloud.define("placesSearch", function(request, response) { console.log("Search Query: " + request.params.query); // Define Parse cloud query that retrieves all Place objects and matches them t...
Modify Fuse require statement to hopefully fit with exporting logic
Modify Fuse require statement to hopefully fit with exporting logic
JavaScript
mit
rice-apps/atlas,rice-apps/atlas,rice-apps/atlas
3c2cf102602e5e203f83c8535a2601f4876dcff9
kit/index.js
kit/index.js
const app = require('muffin') const router = app.router router.get('/', function *(next) { console.log('Requested home') yield next }) app.run(router)
const app = require('muffin') const router = app.router router.get('/', function *(next) { console.log('Requested home') yield next }) app.run(router, { render: { defaultLayout: 'default' } })
Set some sample rendering options
Set some sample rendering options
JavaScript
mit
muffinjs/cli,muffin/cli