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
9e6a07436e5680c76f71d9f4a974d4aeb119d512
module/index.js
module/index.js
/** * BBB `module` generator for Yeoman * Initialize a single module file and related test. */ "use strict"; var util = require("util"); var path = require("path"); var _ = require("lodash"); var BBBGenerator = require("../base/bbb-generator"); /** * Module exports */ module.exports = Generator; Generator._name...
/** * BBB `module` generator for Yeoman * Initialize a single module file and related test. */ "use strict"; var util = require("util"); var _ = require("lodash"); var grunt = require("grunt"); var BBBGenerator = require("../base/bbb-generator"); /** * Module exports */ module.exports = Generator; Generator._na...
Use grunt log utility for errors logging
Use grunt log utility for errors logging
JavaScript
mit
backbone-boilerplate/generator-bbb
760b01908aaca73e02005789baa21fb8e7fc6efe
addon/index.js
addon/index.js
/* global define, module */ import Ember from 'ember'; import { Inflector, defaultRules, pluralize, singularize } from "./lib/system"; Inflector.defaultRules = defaultRules; Ember.Inflector = Inflector; Ember.String.pluralize = pluralize; Ember.String.singularize = singularize; import "./lib/ext/st...
import Ember from 'ember'; import { Inflector, defaultRules, pluralize, singularize } from "./lib/system"; Inflector.defaultRules = defaultRules; Ember.Inflector = Inflector; Ember.String.pluralize = pluralize; Ember.String.singularize = singularize; import "./lib/ext/string"; export default Inflec...
Remove broken AMD and CJS exports
Remove broken AMD and CJS exports
JavaScript
mit
stefanpenner/ember-inflector,stefanpenner/ember-inflector
993c6fbe144db88455d69ac219d7926a2c694a3e
addon/components/multiselect-checkbox-option.js
addon/components/multiselect-checkbox-option.js
import Ember from 'ember'; export default Ember.Component.extend({ classNames: ['multiselect-checkbox-option'], tagName: 'li', value: null, selection: [], labelProperty: null, isSelected: function () { return this.get('selection').contains(this.get('value')); }.property('value', 'selection'), ...
import Ember from 'ember'; export default Ember.Component.extend({ classNames: ['multiselect-checkbox-option'], classNameBindings: ['isSelected:checked'], tagName: 'li', value: null, selection: [], labelProperty: null, isSelected: function () { return this.get('selection').contains(this.get('val...
Add checked class to checkbox option
Add checked class to checkbox option
JavaScript
mit
miguelcobain/ember-multiselect-checkboxes,RSSchermer/ember-multiselect-checkboxes,miguelcobain/ember-multiselect-checkboxes,RSSchermer/ember-multiselect-checkboxes
95d9c46c43baa810d679425953a3eac6a0253e08
script.js
script.js
// create a function that stores added title and body, function that makes dynamic element ('li' li's need to have a h1, p , [delete, uipvote, downvote] buttons, quality) var titleInput = $('.title-input-js'); var descriptionInput = $('.description-input-js'); var saveButton = $('.save-button'); saveButton.on('click'...
// create a function that stores added title and body, function that makes dynamic element ('li' li's need to have a h1, p , [delete, uipvote, downvote] buttons, quality) var titleInput = $('.title-input-js'); var descriptionInput = $('.description-input-js'); var saveButton = $('.save-button'); saveButton.on('click'...
Add buttons to li's and add functionality for delte button.
Add buttons to li's and add functionality for delte button.
JavaScript
mit
ab255/idea-fiesta,ab255/idea-fiesta
165bfbd637e02cd4f3e5224b9a180426eb4a3085
server.js
server.js
var artsyEigenWebAssociation = require('artsy-eigen-web-association'); var express = require('express'); var https = require('https'); var http = require('http'); var morgan = require('morgan'); var path = require('path'); var fs = require('fs'); var app = express(); app.use(morgan('combined')); app.use('/apple-app-sit...
var artsyEigenWebAssociation = require('artsy-eigen-web-association'); var express = require('express'); var https = require('https'); var http = require('http'); var morgan = require('morgan'); var path = require('path'); var fs = require('fs'); var app = express(); app.use(morgan('combined')); app.use('/(.well-known/...
Add alternative site assocation path.
[Eigen] Add alternative site assocation path.
JavaScript
mit
artsy/artsy-wwwify
f9e292e77a09e78d48750a286c023ceabd6f1ff4
server.js
server.js
var express = require('express'); var compression = require('compression'); var app = express(); app.use(compression()); app.use(express.static(__dirname + '/public')); function wwwRedirect(req, res, next) { if (req.headers.host.slice(0, 4) === 'www.') { var newHost = req.headers.host.slice(4); ret...
var express = require('express'); var compression = require('compression'); var app = express(); app.use(compression()); app.use(express.static(__dirname + '/public')); app.all('/*', function(req, res, next) { if (req.headers.host.match(/^www/) !== null ) { res.redirect('http://' + req.headers.host.replace(/^www...
Change method of www redirect
Change method of www redirect
JavaScript
mit
doppio/EtherWheel,doppio/EtherWheel
a1a662201b9f7aa1908965767f10314bb6155cc0
testem.js
testem.js
module.exports = { test_page: 'tests/index.html?hidepassed', disable_watching: true, launch_in_ci: [ 'Chrome' ], launch_in_dev: [ 'Chrome' ], browser_args: { Chrome: { ci: [ // --no-sandbox is needed when running Chrome inside a container process.env.CI ? '--no-sandbox' :...
module.exports = { test_page: 'tests/index.html?hidepassed', disable_watching: true, launch_in_ci: [ 'Chrome' ], launch_in_dev: [ 'Chrome' ], browser_args: { Chrome: { ci: [ // --no-sandbox is needed when running Chrome inside a container process.env.CI ? '--no-sandbox' :...
Fix chrome args breaking tests.
Fix chrome args breaking tests.
JavaScript
mit
LucasHill/ember-print-this,LucasHill/ember-print-this,LucasHill/ember-print-this
98f67e0a11eae2485a9b8c36532d64f21c884e5f
draft-js-mention-plugin/src/defaultRegExp.js
draft-js-mention-plugin/src/defaultRegExp.js
// common chinese symbols: \u4e00-\u9eff - http://stackoverflow.com/a/1366113/837709 // hiragana (japanese): \u3040-\u309F - https://gist.github.com/ryanmcgrath/982242#file-japaneseregex-js // katakana (japanese): \u30A0-\u30FF - https://gist.github.com/ryanmcgrath/982242#file-japaneseregex-js // For an advanced explai...
// common chinese symbols: \u4e00-\u9eff - http://stackoverflow.com/a/1366113/837709 // hiragana (japanese): \u3040-\u309F - https://gist.github.com/ryanmcgrath/982242#file-japaneseregex-js // katakana (japanese): \u30A0-\u30FF - https://gist.github.com/ryanmcgrath/982242#file-japaneseregex-js // For an advanced explai...
Add cyrillic symbols support in mention regexp
Add cyrillic symbols support in mention regexp
JavaScript
mit
draft-js-plugins/draft-js-plugins,draft-js-plugins/draft-js-plugins,nikgraf/draft-js-plugin-editor,nikgraf/draft-js-plugin-editor,dagopert/draft-js-plugins,nikgraf/draft-js-plugin-editor,dagopert/draft-js-plugins,draft-js-plugins/draft-js-plugins,draft-js-plugins/draft-js-plugins,dagopert/draft-js-plugins
c8f53ccdbb220fff9881a5470e84fa67da03edac
functions/src/insert-pages.js
functions/src/insert-pages.js
import hummus from 'hummus' export default function (path, res) { // create a PDF parser const parser = hummus.createReader(path) // create array to hold dimensions const boxes = [] // save dimensions for each page for (let i = 0; i < parser.getPagesCount(); i++) { boxes.push(parser.parsePage(i).getMe...
import hummus from 'hummus' export default function (path, res) { // create a PDF parser const parser = hummus.createReader(path) // create array to hold dimensions const boxes = [] // save dimensions for each page for (let i = 0; i < parser.getPagesCount(); i++) { boxes.push(parser.parsePage(i).getMe...
Add blank page following last page
Add blank page following last page
JavaScript
mit
nickbreaton/spare-page,nickbreaton/spare-page
72d23a982845cf2c2924fd3f2e2ee65efc852a72
server.js
server.js
import express from 'express'; import graphQLHTTP from 'express-graphql'; import path from 'path'; import webpack from 'webpack'; import WebpackDevServer from 'webpack-dev-server'; import {Schema} from './data/schema'; const APP_PORT = 3000; const GRAPHQL_PORT = 8080; // Expose a GraphQL endpoint var graphQLServer = ...
import express from 'express'; import graphQLHTTP from 'express-graphql'; import path from 'path'; import webpack from 'webpack'; import WebpackDevServer from 'webpack-dev-server'; import {Schema} from './data/schema'; const APP_PORT = 3000; const GRAPHQL_PORT = 8080; // Expose a GraphQL endpoint var graphQLServer = ...
Speed up webpack bundle builds
Speed up webpack bundle builds This is the equivalent of: https://github.com/facebook/relay/commit/f7f6c100b98450b9587a2bbf3fdaf21c78b024cc Speeds up the first-build from 12s to 4s on my machine.
JavaScript
bsd-3-clause
clairefritz/todo,iamchenxin/relay-starter-kit,stefanRitter/relay-tutorial,ranjithnori/lemons-list,chenwei0104/starwars,iamchenxin/relay-starter-kit,blendersfun/seattle-theatre-site2,chenwei0104/starwars,roshane/relay-starter-kit-03012016,Aweary/relay-starter-kit,roshane/relay-starter-kit-03012016,relayjs/relay-starter-...
b535b85b859920bbe6edbe726579083d88ba9c98
server.js
server.js
"use strict"; var config = require('./config'), express = require('express'), thunkify = require('co-express'), engine = require('express-hbs'), app = thunkify(express()), mongo = require('co-easymongo')({ dbname: config.get('dbname') }), routes = require('./routes'); app.response.yamb = require('yamb')({ sto...
"use strict"; var config = require('./config'), express = require('express'), thunkify = require('co-express'), engine = require('express-hbs'), app = thunkify(express()), mongo = require('co-easymongo')({ dbname: config.get('dbname') }), routes = require('./routes'); app.response.yamb = require('yamb')({ sto...
Add development config for express
Add development config for express
JavaScript
mit
yamb/yamb-express
790951f75a0cd012afeaae03fe59c2fd7572e5bf
server.js
server.js
var express = require('express'), pages = require('./routes/pages.js'), signup = require('./routes/signup.js'), flash = require('connect-flash'), auth = require('./modules/auth.js'); var app = express(); // Configuration var secret = process.env.COOKIE_SECRET || 'secret'; app.set('views', __dirname + '/views...
"use strict"; var express = require('express'), pages = require('./routes/pages.js'), signup = require('./routes/signup.js'), flash = require('connect-flash'), auth = require('./modules/auth.js'), api = require('./modules/api.js'), mongoose = require('mongoose'); mongoose.connect(process.env.MONGODB_CONNE...
Connect to mongo here so we only do it once
Connect to mongo here so we only do it once
JavaScript
apache-2.0
with-regard/regard-website
dd5fe031c4e114373617fae0e8d19ef0ae6b4718
server.js
server.js
const express = require('express') const next = require('next') const { join } = require('path') const dev = process.env.NODE_ENV !== 'production' const app = next({ dev }) const handle = app.getRequestHandler() const redirects = [ '/slack_invite', '/cloud9_setup', '/redeem_tech_domain', '/hackbot/teams/new',...
const express = require('express') const next = require('next') const { join } = require('path') const dev = process.env.NODE_ENV !== 'production' const app = next({ dev }) const handle = app.getRequestHandler() const port = process.env.PORT || 3000 const host = process.env.HOST || 'localhost' const redirects = [ ...
Allow setting PORT and HOST from environment
Allow setting PORT and HOST from environment
JavaScript
mit
hackclub/website,hackclub/website,hackclub/website
6fa20a63cc5f6af994595ebfc683981cc4198834
src/encoded/static/components/objectutils.js
src/encoded/static/components/objectutils.js
'use strict'; var SingleTreatment = module.exports.SingleTreatment = function(treatment) { var treatmentText = ''; if (treatment.concentration) { treatmentText += treatment.concentration + (treatment.concentration_units ? ' ' + treatment.concentration_units : '') + ' '; } treatmentText += trea...
'use strict'; var SingleTreatment = module.exports.SingleTreatment = function(treatment) { var treatmentText = ''; if (treatment.amount) { treatmentText += treatment.amount + (treatment.amount_units ? ' ' + treatment.amount_units : '') + ' '; } treatmentText += treatment.treatment_term_name + ...
Update js display of treatment text
Update js display of treatment text
JavaScript
mit
T2DREAM/t2dream-portal,ENCODE-DCC/encoded,ENCODE-DCC/encoded,ENCODE-DCC/encoded,T2DREAM/t2dream-portal,T2DREAM/t2dream-portal,T2DREAM/t2dream-portal,ENCODE-DCC/encoded
709c7efecfbef79479b306a3dddec388149d4f2c
guides/src/pages/api/v2.js
guides/src/pages/api/v2.js
import * as React from 'react' import { RedocStandalone } from 'redoc' import Layout from '../../components/Layout' const IndexPage = () => ( <Layout activeRootSection="api/v2"> <RedocStandalone specUrl="https://raw.githubusercontent.com/spark-solutions/spree/master/api/docs/v2/storefront/index.yaml" ...
import * as React from 'react' import { RedocStandalone } from 'redoc' import Layout from '../../components/Layout' const IndexPage = () => ( <Layout activeRootSection="api/v2"> <RedocStandalone specUrl="https://raw.githubusercontent.com/spree/spree/master/api/docs/v2/storefront/index.yaml" options=...
Use spree/spree source for spec
Use spree/spree source for spec
JavaScript
bsd-3-clause
ayb/spree,ayb/spree,imella/spree,ayb/spree,imella/spree,ayb/spree,imella/spree
7dc5b1361c16b18aee20171fc6dab1fd7d2d18fc
source/templates/run.js
source/templates/run.js
var escape = require('escape-latex'); var quotes = require('../replace-quotes'); var preprocess = function(input) { return escape(quotes(input)); }; var blankLine = ( '{\\leavevmode \\kern.06em \\vbox{\\hrule width5\\parindent}}' ); module.exports = function run(element, numberStyle, conspicuous) { if (typeof ...
var escape = require('escape-latex'); var quotes = require('../replace-quotes'); var preprocess = function(input) { return escape(quotes(input)); }; var blankLine = ( '{\\leavevmode \\vbox{\\hrule width5\\parindent}}' ); module.exports = function run(element, numberStyle, conspicuous) { if (typeof element === ...
Remove kerning adjustment from blank lines
Remove kerning adjustment from blank lines
JavaScript
apache-2.0
commonform/commonform-tex
f812a0f642712f549eecc6444d421b376d3c02b0
shared/config/env/development.js
shared/config/env/development.js
'use strict'; var _ = require('lodash'); var base = require('./base'); const development = _.merge({}, base, { env: 'development', auth0: { callbackURL: process.env.AUTH0_CALLBACK_URL || 'http://localhost:9000/auth/callback', clientID: process.env.AUTH0_CLIENT_ID || 'uyTltKDRg1BKu3nzDu6sLpHS44sInwOu', }...
'use strict'; var _ = require('lodash'); var base = require('./base'); const development = _.merge({}, base, { auth0: { callbackURL: process.env.AUTH0_CALLBACK_URL || 'http://localhost:9000/auth/callback', clientID: process.env.AUTH0_CLIENT_ID || 'uyTltKDRg1BKu3nzDu6sLpHS44sInwOu', }, env: 'development'...
Align ordering of config vars between files
Align ordering of config vars between files
JavaScript
mit
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
3730efd350d0875b7bbfcd58b614ca2ab025de4f
beforeBuild.js
beforeBuild.js
'use strict' const cp = require('child_process'); const rimraf = require('rimraf'); const process = require('process'); // Rebuild native modules for ia32 and run webpack again for the ia32 part of windows packages exports.default = function(context) { if (['windows', 'mac'].includes(context.platform.name)) { cons...
'use strict' const cp = require('child_process'); const rimraf = require('rimraf'); const process = require('process'); // Rebuild native modules for ia32 and run webpack again for the ia32 part of windows packages exports.default = function(context) { if (['windows', 'mac'].includes(context.platform.name)) { cons...
Set msvs_version to 2019 when rebuilding
Set msvs_version to 2019 when rebuilding Change-type: patch
JavaScript
apache-2.0
resin-io/herostratus,resin-io/etcher,resin-io/herostratus,resin-io/etcher,resin-io/etcher,resin-io/resin-etcher,resin-io/etcher,resin-io/resin-etcher,resin-io/etcher
1254f076de5091128fc1861be41e30ab0e0dbdc5
server/routes.js
server/routes.js
function calcWidth(name) { return 250 + name.length * 6.305555555555555; } WebApp.connectHandlers.use("/package", function(request, response) { var url = `https://atmospherejs.com/a/packages/findByNames\ ?names=${request.url.split('/')[1]}`; var opts = {headers: {'Accept': 'application/json'}}; HTTP.get(url, o...
function calcWidth(name) { return 250 + name.length * 6.305555555555555; } WebApp.connectHandlers.use("/package", function(request, response) { var url = `https://atmospherejs.com/a/packages/findByNames\ ?names=${request.url.split('/')[1]}`; var opts = {headers: {'Accept': 'application/json'}}; HTTP.get(url, o...
Check if installs or starcount is undefined
Check if installs or starcount is undefined
JavaScript
mit
sungwoncho/meteor-icon,sungwoncho/meteor-icon
e3625f647467133d6017fa31ded281d43f667911
github-back-button.user.js
github-back-button.user.js
// ==UserScript== // @name Github: Back button's back, all right! // @namespace http://github.com/carols10cents/github-back-button // @description Restores the functionality of the back button on github pull requests when navigating to the commits/files tabs. // @include http://github.com/* // @include ...
// ==UserScript== // @name Github: Back button's back, all right! // @namespace http://github.com/carols10cents/github-back-button // @description Restores the functionality of the back button on github pull requests when navigating to the commits/files tabs. // @include http://github.com/* // @include ...
Support arriving from other pages, fix from @noahm!
Support arriving from other pages, fix from @noahm!
JavaScript
mit
carols10cents/github-back-button
834a8b2506c239b60bff2b77780582de24d979ab
src/main/webapp/scripts/place-suggestions.js
src/main/webapp/scripts/place-suggestions.js
let map; let service; const MTV = new google.maps.LatLng(37.3861,122.0839); /** * Inits map and calls a nearby search of prominent restaurants in 5000m * radius of MTV */ function findNearbyPlaces() { map = new google.maps.Map(document.getElementById('map'), { center: MTV, zoom: 15 }); let re...
let map; let service; const MTV = new google.maps.LatLng(37.3861,122.0839); /** * Inits map and calls a nearby search of prominent restaurants in 5000m * radius of MTV */ function findNearbyPlaces() { map = new google.maps.Map(document.getElementById('map'), { center: MTV, zoom: 15 }); let re...
Change == to === to suit best practices
Change == to === to suit best practices
JavaScript
apache-2.0
googleinterns/step27-2020,googleinterns/step27-2020,googleinterns/step27-2020
f9523532b264983a79510c45cc657b2b1fa7701d
parser-aliss.js
parser-aliss.js
const parse = json => { if(!json.results){ return []; } return json.results.map(item => { return { title: item.title, } }); }; module.exports={ parse: parse };
const parse = json => { if(!json.results){ return []; } return json.results.map(item => { return { _service: 'aliss', title: item.title, description: item.description, } }); }; module.exports={ parse: parse };
Add service and description to detailed parsed by aliss
Add service and description to detailed parsed by aliss
JavaScript
mpl-2.0
CodeTheCity/ALISS-API,CodeTheCity/ALISS-API
3dff6237355a744593f7f6b73a8d847fe215285f
src/effects/VolumeEffect.js
src/effects/VolumeEffect.js
const Effect = require('./Effect'); /** * Affect the volume of an effect chain. */ class VolumeEffect extends Effect { /** * Default value to set the Effect to when constructed and when clear'ed. * @const {number} */ get DEFAULT_VALUE () { return 100; } /** * Return the n...
const Effect = require('./Effect'); /** * Affect the volume of an effect chain. */ class VolumeEffect extends Effect { /** * Default value to set the Effect to when constructed and when clear'ed. * @const {number} */ get DEFAULT_VALUE () { return 100; } /** * Return the n...
Remove extra wait time in set volume
Remove extra wait time in set volume
JavaScript
bsd-3-clause
LLK/scratch-audio
8a541e6cd484a632069acfe9c3b7ced6818f1344
src/pages/Settings/components/InfoButton.js
src/pages/Settings/components/InfoButton.js
// @flow import React, { Component } from 'react'; import { StyleSheet, TouchableOpacity } from 'react-native'; import type { NavigationScreenProp } from 'react-navigation'; import appStyle from '../../../appStyle'; import { Icon } from '../../../components'; export default class extends Component { props: PropsType...
// @flow import React, { Component } from 'react'; import { StyleSheet, TouchableOpacity } from 'react-native'; import type { NavigationScreenProp } from 'react-navigation'; import appStyle from '../../../appStyle'; import { Icon } from '../../../components'; export default class extends Component { props: PropsType...
Fix info button on Android
Fix info button on Android
JavaScript
mit
Minishlink/DailyScrum,Minishlink/DailyScrum,Minishlink/DailyScrum,Minishlink/DailyScrum,Minishlink/DailyScrum
f5b6c9013f776a8306d36710269736906d09ff25
src/test/e2e/support/TestEndpointsHelpers.js
src/test/e2e/support/TestEndpointsHelpers.js
var request = require('request') var TestEndpointsHelper = function() { var TestServerBaseURL = 'http://localhost:8081' function resetTestDB(done) { request.post(TestServerBaseURL + '/test/resetTestDB', function() { done() }) } return { resetTestDB: resetTestDB } } module.exports...
var request = require('request') var TestEndpointsHelper = function() { function resetTestDB(done) { request.post(browser.baseUrl + '/test/resetTestDB', done) } return { resetTestDB: resetTestDB } } module.exports = new TestEndpointsHelper()
Use baseUrl from protractor config
Use baseUrl from protractor config - Remove duplicate definition of test base url in e2e tests by using the one defined in the protractor config
JavaScript
mit
Jgreub/treeline,Jgreub/treeline,Jgreub/treeline,Jgreub/treeline
925706f9e892eb1fbdf4e08a954acb193886bb70
tasks/browser_extension.js
tasks/browser_extension.js
/* * grunt-browser-extension * https://github.com/addmitriev/grunt-browser-extension * * Copyright (c) 2015 Aleksey Dmitriev * Licensed under the MIT license. */ 'use strict'; var util = require('util'); var path = require('path'); var fs = require('fs-extra'); module.exports = function (grunt) { var Brows...
/* * grunt-browser-extension * https://github.com/addmitriev/grunt-browser-extension * * Copyright (c) 2015 Aleksey Dmitriev * Licensed under the MIT license. */ 'use strict'; var util = require('util'); var path = require('path'); var fs = require('fs-extra'); module.exports = function (grunt) { var Brows...
Check config and show what required options not exists
Check config and show what required options not exists
JavaScript
mit
Tuguusl/grunt-browser-extension,Tuguusl/grunt-browser-extension
cb24bc33408c07199e3907dba3d260777ebe52d7
examples/scribuntoRemoteDebug.js
examples/scribuntoRemoteDebug.js
var bot = require( 'nodemw' ), readline = require( 'readline' ), fs = require( 'fs' ), rl = readline.createInterface( { input: process.stdin, output: process.stdout } ), client = new Bot( { protocol: 'https', server: 'dev.fandom.com', path: '' } ), params = { action: 'scribunto-console', title: 'Mo...
var Bot = require( 'nodemw' ), readline = require( 'readline' ), fs = require( 'fs' ), rl = readline.createInterface( { input: process.stdin, output: process.stdout } ), client = new Bot( { protocol: 'https', server: 'dev.fandom.com', path: '' } ), params = { action: 'scribunto-console', title: 'Mo...
Fix unused and undefined vars
Fix unused and undefined vars
JavaScript
bsd-2-clause
macbre/nodemw
afa60ffa30d497be5ece6dce6bee957e4f18e1f2
src/main/webapp/gulpfile.js
src/main/webapp/gulpfile.js
'use strict'; var gulp = require('gulp'); var jshint = require('gulp-jshint'); var csslint = require('gulp-csslint'); gulp.task('lint', ['jshint', 'csslint']); gulp.task('jshint', function() { return gulp.src('./js/*.js') .pipe(jshint()) .pipe(jshint.reporter('jshint-stylish')); }); gulp.task('csslint', f...
// jshint ignore:start 'use strict'; var gulp = require('gulp'); var jshint = require('gulp-jshint'); var csslint = require('gulp-csslint'); gulp.task('lint', ['jshint', 'csslint']); gulp.task('jshint', function() { return gulp.src('./js/*.js') .pipe(jshint()) .pipe(jshint.reporter('checkstyle')); }); gul...
Use checkstyle output from jshint reporter
[TECG-125] Use checkstyle output from jshint reporter
JavaScript
apache-2.0
sidharta/sales-gallery,sidharta/sales-gallery,sidharta/sales-gallery
99ce5054b3e4441c8ddca0670a7aaabbfc14815d
src/output_lib/components/RespondToForm/widgets/Checkboxes.js
src/output_lib/components/RespondToForm/widgets/Checkboxes.js
// @flow import React from "react"; import { List } from "immutable"; import { ChoiceType } from "../../../types"; type Props = { choices: List<ChoiceType> }; export default function Checkboxes(props: Props) { const { choices } = props; const checkboxes = choices.map((choice, i) => { return ( <span k...
// @flow import React from "react"; import { List } from "immutable"; import { ChoiceType } from "../../../types"; type Props = { choices: List<ChoiceType> }; export default function Checkboxes(props: Props) { const { choices } = props; const checkboxes = choices.map((choice, i) => { return ( <span k...
Fix label clickability on checkboxes
Fix label clickability on checkboxes
JavaScript
mit
dailydrip/formulae_react,dailydrip/formulae_react,dailydrip/formulae_react
2055955d2d3aa35f2ffbb3d824b184e58ce6efbf
src/common/errorLogger.js
src/common/errorLogger.js
import Raven from 'raven-js'; export function install() { if (process.env.NODE_ENV === 'production') { if (process.env.REACT_APP_RAVEN_DSN) { Raven.config(process.env.REACT_APP_RAVEN_DSN).install(); } else { console.warn('Unable to install Raven, missing DSN.'); } } } export function captu...
import Raven from 'raven-js'; export function install() { if (process.env.NODE_ENV === 'production') { if (process.env.REACT_APP_RAVEN_DSN) { Raven.config(process.env.REACT_APP_RAVEN_DSN).install(); } else { console.warn('Unable to install Raven, missing DSN.'); } } } export function captu...
Throw exceptions in dev again
Throw exceptions in dev again
JavaScript
agpl-3.0
WoWAnalyzer/WoWAnalyzer,fyruna/WoWAnalyzer,anom0ly/WoWAnalyzer,ronaldpereira/WoWAnalyzer,sMteX/WoWAnalyzer,yajinni/WoWAnalyzer,sMteX/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,Juko8/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,anom0ly/WoWAnalyzer,Juko8/WoWAnalyzer,ronaldpereira/WoWAnalyzer,sMteX/WoWAnalyzer,anom0ly/WoWAnalyzer,fyruna/...
5e6c1721525283e892e6495846cc983a6dca0f17
app/components/personal-team-form/component.js
app/components/personal-team-form/component.js
import Ember from 'ember'; import { task } from 'ember-concurrency'; const { computed } = Ember; export default Ember.Component.extend({ teamDomain: computed('team.domain', function() { const domain = this.get('team.domain'); if (domain === null) return null; if (domain.startsWith('~')) return domain.sl...
import Ember from 'ember'; import { task } from 'ember-concurrency'; const { computed } = Ember; export default Ember.Component.extend({ teamDomain: computed('team.domain', function() { const domain = this.get('team.domain'); if (domain === null) return null; if (domain.startsWith('~')) return domain.sl...
Reset team domain on failure
Reset team domain on failure
JavaScript
apache-2.0
usecanvas/web-v2,usecanvas/web-v2,usecanvas/web-v2
6dfec5dd9b74fbe79a33155f26f8bed205acb96f
app/components/resource-quota-row/component.js
app/components/resource-quota-row/component.js
import { get, set } from '@ember/object'; import { inject as service } from '@ember/service'; import Component from '@ember/component'; import layout from './template'; export default Component.extend({ globalStore: service(), layout, tagName: 'TR', classNames: 'main-row', resourceChoices: null, in...
import { get, set } from '@ember/object'; import { inject as service } from '@ember/service'; import Component from '@ember/component'; import layout from './template'; const IGNORED = ['requestsStorage', 'persistentVolumeClaims']; export default Component.extend({ globalStore: service(), layout, tagName: ...
Hide storage reservation and persistent volume claims
Hide storage reservation and persistent volume claims https://github.com/rancher/rancher/issues/14859
JavaScript
apache-2.0
rancher/ui,lvuch/ui,rancher/ui,rancher/ui,lvuch/ui,vincent99/ui,rancherio/ui,rancherio/ui,rancherio/ui,westlywright/ui,westlywright/ui,vincent99/ui,lvuch/ui,westlywright/ui,vincent99/ui
8cc1a255ad0809a71953789ca1c0704c252bb42b
js/models/profile/FixedFee.js
js/models/profile/FixedFee.js
import BaseModel from '../BaseModel'; import app from '../../app'; import { getCurrencyByCode } from '../../data/currencies'; import is from 'is_js'; export default class extends BaseModel { defaults() { return { currencyCode: '', amount: 0, }; } validate(attrs) { const errObj = {}; ...
import BaseModel from '../BaseModel'; import app from '../../app'; import { getCurrencyByCode } from '../../data/currencies'; import is from 'is_js'; export default class extends BaseModel { defaults() { return { currencyCode: 'USD', amount: 0, }; } validate(attrs) { const errObj = {}; ...
Add a default fixed fee currency
Add a default fixed fee currency This prevents an unhandled error when mobile nodes are returned as moderators without a fixedFee object.
JavaScript
mit
OpenBazaar/openbazaar-desktop,OpenBazaar/openbazaar-desktop,OpenBazaar/openbazaar-desktop
66558d71f4601f698c361838e62eb99fd943d227
js/app/filters/playTime.js
js/app/filters/playTime.js
/** * ownCloud - Music app * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Morris Jobke <morris.jobke@gmail.com> * @author Pauli Järvinen <pauli.jarvinen@gmail.com> * @copyright 2013 Morris Jobke * @copyright 2020 Pauli Järvinen * */ ...
/** * ownCloud - Music app * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Morris Jobke <morris.jobke@gmail.com> * @author Pauli Järvinen <pauli.jarvinen@gmail.com> * @copyright 2013 Morris Jobke * @copyright 2020, 2021 Pauli Järvinen *...
Fix seconds part of play time showing incorrectly in range [59.5, 60.0)
Fix seconds part of play time showing incorrectly in range [59.5, 60.0) This effectively rolls back the commit 989d5fb3. Using `round` instead of `floor` for the seconds of the playtime wasn't such a great idea after all, because it made the time stamp to show up like "0:60" for a half a second before it changed to "1...
JavaScript
agpl-3.0
owncloud/music,paulijar/music,paulijar/music,owncloud/music,paulijar/music,owncloud/music,paulijar/music,owncloud/music,paulijar/music,owncloud/music
77e93d163cbd97cb9f3b63154dce3ee3d550458a
app/assets/javascripts/pageflow/editor/collections/themes_collection.js
app/assets/javascripts/pageflow/editor/collections/themes_collection.js
pageflow.ThemesCollection = Backbone.Collection.extend({ model: pageflow.Theme, findByName: function(name) { return this.findWhere({name: name}); } });
pageflow.ThemesCollection = Backbone.Collection.extend({ model: pageflow.Theme, findByName: function(name) { var theme = this.findWhere({name: name}); if (!theme) { throw new Error('Found no theme by name ' + name); } return theme; } });
Throw error when ThemeCollection does not have theme by that name
Throw error when ThemeCollection does not have theme by that name
JavaScript
mit
codevise/pageflow,Modularfield/pageflow,codevise/pageflow,tf/pageflow,Modularfield/pageflow,Modularfield/pageflow,tf/pageflow-dependabot-test,tf/pageflow,tf/pageflow,tf/pageflow-dependabot-test,Modularfield/pageflow,codevise/pageflow,tf/pageflow,codevise/pageflow,tf/pageflow-dependabot-test,tf/pageflow-dependabot-test
cb0c64af73d5b4902b84aecb9a27416429ec1d7a
app/import.js
app/import.js
#!/usr/bin/env node /** * Parse and insert all log lines in a path. */ 'use strict'; var program = require('commander'); // Support all attributes normally defined by config.js. program .option('-p, --parser <name>', 'Ex. nginx_access') .option('-P, --path <file>', 'Ex. /var/log/nginx/access.log') .option('...
#!/usr/bin/env node /** * Parse and insert all log lines in a path. */ 'use strict'; var program = require('commander'); var splitCsv = function(list) { return list.split(','); } // Support all attributes normally defined by config.js. program .option('-p, --parser <name>', 'Ex. nginx_access') .option('-P,...
Allow comma-separated values for --previewAttr.
Allow comma-separated values for --previewAttr.
JavaScript
mit
codeactual/mainevent
e8e00d643a4c124e87887dfdeb2596ac88285a07
src/helpers/buildProps.js
src/helpers/buildProps.js
import {Map} from 'immutable'; export default function buildProps(propsDefinition, allProps = false) { const props = {} Map(propsDefinition).map((data, prop) => { if (data.defaultValue) props[prop] = data.defaultValue.computed ? data.defaultValue.value : eval(`(${data.defaultValue.value}...
import {Map} from 'immutable'; export default function buildProps(propsDefinition, allProps = false) { const props = {} Map(propsDefinition).map((data, prop) => { if (data.defaultValue) props[prop] = data.defaultValue.computed ? data.defaultValue.value : eval(`(${data.defaultValue.value}...
Add some defaults for prop types
Add some defaults for prop types
JavaScript
mit
blueberryapps/react-bluekit,blueberryapps/react-bluekit,blueberryapps/react-bluekit,kjg531/react-bluekit,kjg531/react-bluekit
2c7c6eb77676ce869d788cba91147ba40af45745
WebApp/controllers/index.js
WebApp/controllers/index.js
'use strict'; var passport = require('passport'); module.exports = function (router) { router.get('/', function (req, res) { res.render('index'); }); router.post('/signup', passport.authenticate('local', { successRedirect : '/home', // redirect to the secure profile se...
'use strict'; var passport = require('passport'); module.exports = function (router) { router.get('/', function (req, res) { res.render('index'); }); router.post('/signup', passport.authenticate('local', { successRedirect : '/home', // redirect to the secure home section ...
Add logout rout logic and 404 catch route.
Add logout rout logic and 404 catch route.
JavaScript
mit
uahengojr/NCA-Web-App,uahengojr/NCA-Web-App
4eff36df241f9de8abca1bf5bc5871625b204d48
src/forwarded.js
src/forwarded.js
import { Namespace as NS } from 'xmpp-constants'; export default function (JXT) { let Forwarded = JXT.define({ name: 'forwarded', namespace: NS.FORWARD_0, element: 'forwarded' }); JXT.extendIQ(Forwarded); JXT.extendPresence(Forwarded); JXT.withMessage(function (Message)...
import { Namespace as NS } from 'xmpp-constants'; export default function (JXT) { let Forwarded = JXT.define({ name: 'forwarded', namespace: NS.FORWARD_0, element: 'forwarded' }); JXT.withMessage(function (Message) { JXT.extend(Message, Forwarded); JXT.extend(Fo...
Allow presence and iq stanzas in forwards
Allow presence and iq stanzas in forwards
JavaScript
mit
otalk/jxt-xmpp
ed4aee982efbe639586bb894a7a2a0b06f221c20
routes/login.js
routes/login.js
var express = require('express'); var router = express.Router(); const passport = require('passport') const FacebookStrategy = require('passport-facebook').Strategy passport.use(new FacebookStrategy({ clientID: 'fsddf', clientSecret: 'FACEBOOK_APP_SECRET', callbackURL: "https://age-guess-api.herokuapp.co...
var express = require('express'); var router = express.Router(); require('dotenv').config() const passport = require('passport') const FacebookStrategy = require('passport-facebook').Strategy passport.use(new FacebookStrategy({ clientID: process.env.APP_ID, clientSecret: process.env.APP_SECRET, callbackU...
Add routing for facebook auth
Add routing for facebook auth
JavaScript
mit
michael-lowe-nz/ageGuessAPI,michael-lowe-nz/ageGuessAPI
8523b2a9d123b77d5003434e42fa877b718a9b3c
api/policies/isGuacamole.js
api/policies/isGuacamole.js
/** * Nanocloud turns any traditional software into a cloud solution, without * changing or redeveloping existing source code. * * Copyright (C) 2016 Nanocloud Software * * This file is part of Nanocloud. * * Nanocloud is free software; you can redistribute it and/or modify * it under the terms of the GNU Affe...
/** * Nanocloud turns any traditional software into a cloud solution, without * changing or redeveloping existing source code. * * Copyright (C) 2016 Nanocloud Software * * This file is part of Nanocloud. * * Nanocloud is free software; you can redistribute it and/or modify * it under the terms of the GNU Affe...
Fix history and scale down not working in production mode
Fix history and scale down not working in production mode In dev mode guacamole-client targets localhost:1337 for the backend In production mode guacamole-client targets backend:1337 for the backend Update isGuacamole policy to take the production setup into account
JavaScript
agpl-3.0
romain-ortega/nanocloud,Gentux/nanocloud,corentindrouet/nanocloud,corentindrouet/nanocloud,dynamiccast/nanocloud,Leblantoine/nanocloud,dynamiccast/nanocloud,romain-ortega/nanocloud,Nanocloud/nanocloud,Nanocloud/nanocloud,romain-ortega/nanocloud,Leblantoine/nanocloud,Nanocloud/nanocloud,Leblantoine/nanocloud,Gentux/nano...
67b587bd6fd5d91c6bb3930cdcdb288a2c4fd073
packages/core/strapi/lib/commands/routes/list.js
packages/core/strapi/lib/commands/routes/list.js
'use strict'; const CLITable = require('cli-table3'); const chalk = require('chalk'); const { toUpper } = require('lodash/fp'); const strapi = require('../../index'); module.exports = async function() { const app = await strapi().load(); const list = app.server.listRoutes(); const infoTable = new CLITable({ ...
'use strict'; const CLITable = require('cli-table3'); const chalk = require('chalk'); const { toUpper } = require('lodash/fp'); const strapi = require('../../index'); module.exports = async function() { const app = await strapi().load(); const list = app.server.listRoutes(); const infoTable = new CLITable({ ...
Make right column width flexible
Make right column width flexible
JavaScript
mit
wistityhq/strapi,wistityhq/strapi
8a9ea980ca9e18c2b7760f7927836dd265a3a07f
lib/collections/checkID.js
lib/collections/checkID.js
Meteor.methods({ checkHKID: function (hkid) { var hkidPat = /^([A-Z]{1,2})([0-9]{6})([A0-9])$/; // HKID format = 1 or 2 letters followed by 6 numbers and 1 checksum digit. var matchArray = hkid.match(hkidPat); if(matchArray == null){idError()} var checkSum = 0; var charPart =...
Meteor.methods({ checkHKID: function (hkid) { var hkidPat = /^([A-Z]{1,2})([0-9]{6})([A0-9])$/; // HKID format = 1 or 2 letters followed by 6 numbers and 1 checksum digit. var matchArray = hkid.match(hkidPat); if(matchArray == null){idError()} var checkSum = 0; var charPart =...
Fix minor error with HKID verification
Fix minor error with HKID verification
JavaScript
agpl-3.0
gazhayes/Popvote-HK,gazhayes/Popvote-HK
959840f4da79f68cc67b4a994c1b0fed5e5fc217
spec/gateway-spec.js
spec/gateway-spec.js
"use babel"; import gateway from "../lib/gateway"; describe("Gateway", () => { describe("packagePath", () => { it("returns path of package installation", () => { expect(gateway.packagePath()).toContain("exfmt-atom"); }); }); describe("shouldUseLocalExfmt", () => { it("returns true when exfmtD...
"use babel"; import gateway from "../lib/gateway"; import path from "path"; import process from "child_process"; describe("Gateway", () => { describe("packagePath", () => { it("returns path of package installation", () => { expect(gateway.packagePath()).toContain("exfmt-atom"); }); }); describe("...
Add spec tests for gateway run functions
Add spec tests for gateway run functions
JavaScript
mit
rgreenjr/exfmt-atom
32dd109b7df05ee3b687baed65381fe1c64da1c2
js/home-nav.js
js/home-nav.js
var navOffset = function () { $('#content.container').css('margin-top', $('#nav').height() * 0.25); }; var collapsedMenus = function() { $('#nav button.navbar-toggle').on('click', function() { if ($(this).hasClass('collapsed')) { var collapsedMenuHeight = 323.5; collapseOffset('#nav', collapsedMenuHei...
var navOffset = function () { $('#content.container').css('margin-top', $('#nav').height() * 0.25); }; var collapsedMenus = function() { $('#nav button.navbar-toggle').on('click', function() { if ($(this).hasClass('collapsed') && !$($(this).data('target')).hasClass('collapsing')) { var collapsedMenuHe...
Fix wrong auto-scrolling when opening the menu.
Fix wrong auto-scrolling when opening the menu. Fixed page scrolling down when main menu is closing. Fixed incorrect logic for scrolling on submenu ("More") scrolling. JQuery.not() is a filter/selector, not a class detector.
JavaScript
mit
HackNC/fall2015,newmane/PearlHacks17,HackNC/fall2015,newmane/PearlHacks17,madipfaff/PearlHacks16,madipfaff/PearlHacks16
2dc52dbbc4f0e01c6f6cd898b2f57f09430675c8
js/sideshow.js
js/sideshow.js
var sideshow = function () { function hasClass (elem, cls) { var names = elem.className.split(" "); for (var i = 0; i < names; i++) { if (cls == names[i]) return true; } return false; } function addClass (elem, cls) { if (!hasClass(elem, c...
var sideshow = function () { function hasClass (elem, cls) { var names = elem.className.split(" "); for (var i = 0; i < names; i++) { if (cls == names[i]) return true; } return false; } function addClass (elem, cls) { var names = elem.clas...
Make addClass implementation symmetric with removeClass.
Make addClass implementation symmetric with removeClass.
JavaScript
isc
whilp/sideshow
057829f108dc1fe04369feeb95deb794adbf154a
Cloudy/cloudy.js
Cloudy/cloudy.js
var Cloudy = { isPlayerPage: function() { return $("#audioplayer").length == 1; }, sendEpisodeToCloudy: function() { var episodeTitle = $(".titlestack .title").text(); var showTitle = $(".titlestack .caption2").text(); var details = { "show_title": showTitle, ...
var Cloudy = { isPlayerPage: function() { return $("#audioplayer").length == 1; }, sendEpisodeToCloudy: function() { var episodeTitle = $(".titlestack .title").text(); var showTitle = $(".titlestack .caption2").text(); var details = { "show_title": showTitle, ...
Use JavaScript to intercept space bar event.
Use JavaScript to intercept space bar event.
JavaScript
mit
calebd/cloudy,calebd/cloudy
e009e13d0175d933542f2230c220067e2f29f093
lib/handlers/tar-stream.js
lib/handlers/tar-stream.js
/* * tar-stream.js: Checkout adapter for a tar stream. * * (C) 2012 Bradley Meck. * MIT LICENSE * */ var tar = require('tar'); // // ### function download (source, callback) // #### @source {Object} Source checkout options // #### @callback {function} Continuation to respond to. // Downloads the tar stream to t...
/* * tar-stream.js: Checkout adapter for a tar stream. * * (C) 2012 Bradley Meck. * MIT LICENSE * */ var zlib = require('zlib'), tar = require('tar'); // // ### function download (source, callback) // #### @source {Object} Source checkout options // #### @callback {function} Continuation to respond to. // D...
Allow for optional gzip encoding.
[api] Allow for optional gzip encoding.
JavaScript
mit
indexzero/node-checkout
cb27231417aac868e459ed8bc4792ac69f51220f
lib/helpers/prepareView.js
lib/helpers/prepareView.js
/*jslint node: true, nomen: true, white: true, unparam: true, todo: true*/ /*! * Sitegear3 * Copyright(c) 2014 Ben New, Sitegear.org * MIT Licensed */ (function (_, path, fs) { "use strict"; module.exports = function (app, dirname) { dirname = dirname || path.join(__dirname, '..', 'viewHelpers'); return fun...
/*jslint node: true, nomen: true, white: true, unparam: true, todo: true*/ /*! * Sitegear3 * Copyright(c) 2014 Ben New, Sitegear.org * MIT Licensed */ (function (_, path, fs) { "use strict"; module.exports = function (app, dirname) { dirname = dirname || path.join(__dirname, '..', 'viewHelpers'); return fun...
Handle error in readdir() callback.
Handle error in readdir() callback.
JavaScript
mit
sitegear/sitegear3
6289c7bf271efb6f418904de6fbd46a646e7d86e
vendor/ember-cli-qunit/qunit-configuration.js
vendor/ember-cli-qunit/qunit-configuration.js
/* globals jQuery,QUnit */ QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container'}); QUnit.config.urlConfig.push({ id: 'nojshint', label: 'Disable JSHint'}); QUnit.config.urlConfig.push({ id: 'doccontainer', label: 'Doc test pane'}); QUnit.config.testTimeout = 60000; //Default Test Timeout 60 Seconds...
/* globals jQuery,QUnit */ QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container'}); QUnit.config.urlConfig.push({ id: 'nojshint', label: 'Disable JSHint'}); QUnit.config.urlConfig.push({ id: 'doccontainer', label: 'Dock test pane'}); QUnit.config.testTimeout = 60000; //Default Test Timeout 60 Second...
Correct "Doc test pane" to "Dock test pane"
Correct "Doc test pane" to "Dock test pane" This PR so far only changes the string displayed in the UI. The rest of the code still refers to this option as `doccontainer`. Should all these instances also be changed to `dockcontainer`? As an aside, it seems to be called a container in one option ("Hide container") b...
JavaScript
mit
blimmer/ember-cli-qunit,nathanhammond/ember-cli-qunit,ember-cli/ember-cli-qunit,ember-cli/ember-cli-qunit,nathanhammond/ember-cli-qunit,zenefits/ember-cli-qunit,blimmer/ember-cli-qunit,zenefits/ember-cli-qunit
fbbf41efcba79d61feadb9307f1a4a35c65c405b
ecplurkbot.js
ecplurkbot.js
var log4js = require('log4js'); var PlurkClient = require('plurk').PlurkClient; var nconf = require('nconf'); nconf.file('config', __dirname + '/config/config.json') .file('keywords', __dirname + '/config/keywords.json'); var logging = nconf.get('log').logging; var log_path = nconf.get('log').log_path; if (logging)...
var log4js = require('log4js'); var PlurkClient = require('plurk').PlurkClient; var nconf = require('nconf'); nconf.file('config', __dirname + '/config/config.json') .file('keywords', __dirname + '/config/keywords.json'); var logging = nconf.get('log').logging; var log_path = nconf.get('log').log_path; if (logging) ...
Rewrite with using startComet function of plurk modules
Rewrite with using startComet function of plurk modules
JavaScript
apache-2.0
dollars0427/ecplurkbot
021d3d985bb6a9965bd69a81897b0bc712578f36
src/app/api/utils.js
src/app/api/utils.js
import notp from 'notp' import b32 from 'thirty-two' export function cleanKey (key) { return key.replace(/[^a-z2-7]+/g, '').slice(0, 32) } export function isValidKey (key) { return /^[a-z2-7]{32}$/.test(cleanKey(key)) } export function getCode (key) { return notp.totp.gen(b32.decode(cleanKey(key)), {}) }
import notp from 'notp' import b32 from 'thirty-two' export function cleanKey (key) { return key.replace(/[^a-z2-7]+/ig, '').toLowerCase() } export function isValidKey (key) { return /^[a-z2-7]+$/.test(cleanKey(key)) } export function getCode (key) { return notp.totp.gen(b32.decode(cleanKey(key)), {}) }
Support for larger kind of key
fix: Support for larger kind of key
JavaScript
mit
nodys/basicotp,nodys/basicotp,nodys/basicotp
ae4e515cffdb87ca856a50f15c7a01b5605b93e4
migrations/20200422122956_multi_homefeeds.js
migrations/20200422122956_multi_homefeeds.js
export async function up(knex) { await knex.schema .raw('alter table feeds add column title text') .raw('alter table feeds add column ord integer') .raw(`alter table feeds drop constraint feeds_unique_feed_names`) // Only RiverOfNews feeds can have non-NULL ord or title .raw(`alter table feeds add...
export const up = (knex) => knex.schema.raw(`do $$begin -- FEEDS TABLE alter table feeds add column title text; alter table feeds add column ord integer; alter table feeds drop constraint feeds_unique_feed_names; -- Only RiverOfNews feeds can have non-NULL ord or title alter table feeds add constraint feed...
Add a homefeed_subscriptions database table
Add a homefeed_subscriptions database table
JavaScript
mit
FreeFeed/freefeed-server,FreeFeed/freefeed-server
e4912f3076fda14ebfe50250e2061447db1b6281
lib/bggCollectionParser.js
lib/bggCollectionParser.js
module.exports = { "parseResults": function(result) { var xmlItems = result.items && result.items.item; var items = []; if (xmlItems) { for (var i = 0; i < xmlItems.length; i++) { var game = xmlItems[i]; items.push({ "subtype": game.$.subtype, "objectid": game.$....
module.exports = { "parseResults": function(result) { var xmlItems = result.items && result.items.item; var items = []; if (xmlItems) { for (var i = 0; i < xmlItems.length; i++) { var game = xmlItems[i]; items.push({ "subtype": game.$.subtype, "objectid": game.$....
Fix bad error checking - caused name/image/thumbnail to be arrays
Fix bad error checking - caused name/image/thumbnail to be arrays
JavaScript
apache-2.0
thealah/bgg,thealah/bgg
895a59456addea4b43cf283ab9668747a615e392
test/data-structures/testDoublyLinkedList.js
test/data-structures/testDoublyLinkedList.js
/* eslint-env mocha */ const DoublyLinkedList = require('../../src').DataStructures.DoublyLinkedList; const assert = require('assert'); describe('DoublyLinkedList', () => { it('should be empty when initialized', () => { const inst = new DoublyLinkedList(); assert(inst.isEmpty()); assert.equal(inst.length...
/* eslint-env mocha */ const DoublyLinkedList = require('../../src').DataStructures.DoublyLinkedList; const assert = require('assert'); describe('DoublyLinkedList', () => { it('should be empty when initialized', () => { const inst = new DoublyLinkedList(); assert(inst.isEmpty()); assert.equal(inst.length...
Test push to the front of the list
DoublyLinkedList: Test push to the front of the list
JavaScript
mit
ManrajGrover/algorithms-js
7aa46cae7e352fb1bfb6b2453a66e2f58c4f93aa
assets/page/___page___/js/script.___page___.js
assets/page/___page___/js/script.___page___.js
'use strict'; /* * Use for Async operations before displaying page * module.exports.prepare = function() { this.done({}); }; */ /* * Compute Vue parameters * module.exports.vue = function() { return {}; }; */ /* * Use as page starting point * module.exports.start = function() { }; */
'use strict'; /* * Use for Async operations before displaying page * module.exports.prepare = function() { this.done({}); }; */ /* * Compute Vue parameters * module.exports.vue = function() { return {}; }; * or module.exports.vue = { }; */ /* * Use as page starting point * module.exports.start = function...
Update Layout assets to latest specifications
feat: Update Layout assets to latest specifications
JavaScript
mit
quasarframework/quasar-cli,rstoenescu/quasar-cli
7a13ef409b8251619771bd1f61a941da522d8830
assets/js/components/SpinnerButton.stories.js
assets/js/components/SpinnerButton.stories.js
/** * Site Kit by Google, Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
/** * Site Kit by Google, Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
Fix vrt scenario script issue.
Fix vrt scenario script issue.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
f55caf4ed86b4c23e4cb4b5c1f789ac6db28ab64
rollup/rollup.umd.config.js
rollup/rollup.umd.config.js
import babel from 'rollup-plugin-babel'; import mergeBaseConfig from './rollup.merge-base-config.js'; const cjsConfig = { format: 'umd', moduleName: 'knockoutStore', plugins: [ babel({ exclude: 'node_modules/**' }) ], dest: 'dist/knockout-store.js' }; const finalConfig ...
import babel from 'rollup-plugin-babel'; import mergeBaseConfig from './rollup.merge-base-config.js'; const cjsConfig = { format: 'umd', moduleName: 'ko.store', plugins: [ babel({ exclude: 'node_modules/**' }) ], dest: 'dist/knockout-store.js' }; const finalConfig = mer...
Change umd module name to ko.store.
Change umd module name to ko.store.
JavaScript
mit
Spreetail/knockout-store
86ce4f25d552c9b3538339c53b61abaf1faf860f
test/specs/elements/Segment/Segments-test.js
test/specs/elements/Segment/Segments-test.js
import React from 'react'; import {Segment, Segments} from 'stardust'; describe('Segments', () => { it('should render children', () => { const [segmentOne, segmentTwo] = render( <Segments> <Segment>Top</Segment> <Segment>Bottom</Segment> </Segments> ).scryClass('sd-segment'); ...
import React from 'react'; import {Segment, Segments} from 'stardust'; describe('Segments', () => { it('should render children', () => { const [segmentOne, segmentTwo] = render( <Segments> <Segment>Top</Segment> <Segment>Bottom</Segment> </Segments> ).scryClass('sd-segment'); ...
Make use of chai's lengthOf assertion and simplify test
Make use of chai's lengthOf assertion and simplify test
JavaScript
mit
Semantic-Org/Semantic-UI-React,jamiehill/stardust,vageeshb/Semantic-UI-React,Semantic-Org/Semantic-UI-React,jcarbo/stardust,ben174/Semantic-UI-React,mohammed88/Semantic-UI-React,clemensw/stardust,koenvg/Semantic-UI-React,aabustamante/Semantic-UI-React,ben174/Semantic-UI-React,Rohanhacker/Semantic-UI-React,koenvg/Semant...
da023a20791530444e6475e905349881c2267972
app/js/arethusa.context_menu/directives/plugin_context_menu.js
app/js/arethusa.context_menu/directives/plugin_context_menu.js
'use strict'; angular.module('arethusa.contextMenu').directive('pluginContextMenu', function () { return { restrict: 'E', scope: true, replace: true, link: function (scope, element, attrs) { scope.plugin = scope.$eval(attrs.name); }, template: ' <div id="{{ plugin.name }}-context-me...
'use strict'; angular.module('arethusa.contextMenu').directive('pluginContextMenu', function () { return { restrict: 'E', scope: true, replace: true, link: function (scope, element, attrs) { scope.plugin = scope.$eval(attrs.name); }, template: '\ <div id="{{ plugin.name }}-context-...
Fix multiline string in pluginContextMenu template
Fix multiline string in pluginContextMenu template
JavaScript
mit
PonteIneptique/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa
3fcff5769179d8b784f10206d8de1c7184843a11
background.js
background.js
(function() { 'use strict'; chrome.app.runtime.onLaunched.addListener(function() { chrome.app.window.create('index.html', { innerBounds: { width: 960, height: 600 }, state: 'maximized' }); }); }());
(function() { 'use strict'; chrome.app.runtime.onLaunched.addListener(function() { chrome.app.window.create('index.html', { innerBounds: { width: 960, height: 600, minWidth: 960, minHeight: 600 }, state: 'maximized' }); }); }());
Add minWidth/Height to Chrome app
Add minWidth/Height to Chrome app
JavaScript
mit
nathan/pixie,nathan/pixie,videophonegeek/pixie,videophonegeek/pixie
113b5c54802d572ed6d72d7380f5c28dc58760b3
background.js
background.js
(function(window){ window.ITCheck = window.ITCheck || {}; // Get things rolling chrome.alarms.onAlarm.addListener(ITCheck.getUnreadThreadCount); chrome.runtime.onStartup.addListener(function () { chrome.alarms.create("updater", { "periodInMinutes": 1 }); }); chrome.runtime.onInstalled.addListener(function(deta...
(function(window){ window.ITCheck = window.ITCheck || {}; // Get things rolling chrome.alarms.onAlarm.addListener(ITCheck.getUnreadThreadCount); chrome.runtime.onStartup.addListener(function () { chrome.alarms.create("updater", { "periodInMinutes": 1 }); }); chrome.runtime.onInstalled.addListener(function(deta...
Fix error with navigating to new page
Fix error with navigating to new page
JavaScript
mit
CodyJung/itcheck,CodyJung/itcheck
36313a2f3350a8af341ca8b427b851b7697d1657
models/core/AbuseReport.js
models/core/AbuseReport.js
// Abuse reports // 'use strict'; const Mongoose = require('mongoose'); const Schema = Mongoose.Schema; module.exports = function (N, collectionName) { let AbuseReport = new Schema({ // _id of reported content src_id: Schema.ObjectId, // Content type (FORUM_POST, BLOG_ENTRY, ...) type...
// Abuse reports // 'use strict'; const Mongoose = require('mongoose'); const Schema = Mongoose.Schema; module.exports = function (N, collectionName) { let AbuseReport = new Schema({ // _id of reported content src_id: Schema.ObjectId, // Content type (FORUM_POST, BLOG_ENTRY, ...) type...
Add parser options to abuse reports
Add parser options to abuse reports
JavaScript
mit
nodeca/nodeca.core,nodeca/nodeca.core
b14b5c49a76a81fc92c36ba3e2ca0c7c59274cb3
modules/components/View.js
modules/components/View.js
import { createComponent } from 'react-fela' const View = props => ({ display: props.hidden && 'none', zIndex: props.zIndex, position: 'fixed', top: 0, left: 0, bottom: 0, right: 0 }) export default createComponent(View)
import { createComponent } from 'react-fela' const View = props => ({ display: props.hidden ? 'none' : 'flex', zIndex: props.zIndex, position: 'fixed', top: 0, left: 0, bottom: 0, right: 0 }) export default createComponent(View)
Add flex display to view by default
Add flex display to view by default
JavaScript
mit
rofrischmann/kilvin
98070f6292954c7190f7aaa52c3f5c86a88fe039
src/constants.es6.js
src/constants.es6.js
export default { TOGGLE_OVER_18: 'toggleOver18', SIDE_NAV_TOGGLE: 'sideNavToggle', TOP_NAV_HAMBURGER_CLICK: 'topNavHamburgerClick', VOTE: 'vote', DROPDOWN_OPEN: 'dropdownOpen', COMPACT_TOGGLE: 'compactToggle', TOP_NAV_HEIGHT: 45, RESIZE: 'resize', SCROLL: 'scroll', ICON_SHRUNK_SIZE: 16, CACHEABLE_...
export default { TOGGLE_OVER_18: 'toggleOver18', SIDE_NAV_TOGGLE: 'sideNavToggle', TOP_NAV_HAMBURGER_CLICK: 'topNavHamburgerClick', VOTE: 'vote', DROPDOWN_OPEN: 'dropdownOpen', COMPACT_TOGGLE: 'compactToggle', TOP_NAV_HEIGHT: 45, RESIZE: 'resize', SCROLL: 'scroll', ICON_SHRUNK_SIZE: 16, CACHEABLE_...
Increase API timeout to 10s
Increase API timeout to 10s Accomodate slow/whoalaned requests, like the google crawler. It was set to 5s previously when we thought that api requests were causing the request queue to back up, which does not appear to be the case.
JavaScript
mit
uzi/reddit-mobile,madbook/reddit-mobile,uzi/reddit-mobile,DogPawHat/reddit-mobile,DogPawHat/reddit-mobile,curioussavage/reddit-mobile,curioussavage/reddit-mobile,madbook/reddit-mobile,madbook/reddit-mobile,uzi/reddit-mobile
55d795f8fbb1d51c9b91c9d56a352fd56becf529
index.js
index.js
module.exports = function stringReplaceAsync( string, searchValue, replaceValue ) { try { if (typeof replaceValue === "function") { // Step 1: Call native `replace` one time to acquire arguments for // `replaceValue` function // Step 2: Collect all return values in an array // Step 3...
module.exports = function stringReplaceAsync( string, searchValue, replaceValue ) { try { if (typeof replaceValue === "function") { // 1. Run fake pass of `replace`, collect values from `replaceValue` calls // 2. Resolve them with `Promise.all` // 3. Run `replace` with resolved values ...
Clarify the code a bit
Clarify the code a bit
JavaScript
mit
dsblv/string-replace-async
b634cda9d411859bcce4d15b9c9a55143ecc7265
src/Reporter.js
src/Reporter.js
// cavy-cli reporter class. export default class CavyReporter { // Internal: Creates a websocket connection to the cavy-cli server. onStart() { const url = 'ws://127.0.0.1:8082/'; this.ws = new WebSocket(url); } // Internal: Send report to cavy-cli over the websocket connection. onFinish(report) { ...
// Internal: CavyReporter is responsible for sending the test results to // the CLI. export default class CavyReporter { // Internal: Creates a websocket connection to the cavy-cli server. onStart() { const url = 'ws://127.0.0.1:8082/'; this.ws = new WebSocket(url); } // Internal: Send report to cavy-c...
Improve top level class description
Improve top level class description
JavaScript
mit
pixielabs/cavy
71083a50a6cc900edb272dded2c3578ee5065d2d
index.js
index.js
require('./lib/metro-transit') // Create the handler that responds to the Alexa Request. exports.handler = function (event, context) { // Create an instance of the MetroTransit skill. var dcMetro = new MetroTransit(); dcMetro.execute(event, context); };
var MetroTransit = require('./lib/metro-transit'); // Create the handler that responds to the Alexa Request. exports.handler = function (event, context) { MetroTransit.execute(event, context); };
Update driver file for new module interfaces
Update driver file for new module interfaces
JavaScript
mit
pmyers88/dc-metro-echo
27e8daf7bf9ab4363314a5af41d9eb5ea4de9fdb
src/atoms/TextComponent/index.js
src/atoms/TextComponent/index.js
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import styles from './text_component.module.scss'; function setWeight( { semibold, light } ) { if ( semibold ) return styles.semibold; if ( light ) return styles.light; return styles.regular; } function TextComp...
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import styles from './text_component.module.scss'; function setWeight( { semibold, light } ) { if ( semibold ) return styles.semibold; if ( light ) return styles.light; return styles.regular; } function TextComp...
Update Text Component to allow React components to render as child
Update Text Component to allow React components to render as child
JavaScript
mit
policygenius/athenaeum,policygenius/athenaeum,policygenius/athenaeum
4077314ce800a011121a04828df4da2163604a81
index.js
index.js
'use strict'; var R = require('ramda'); var isEmptyObj = R.pipe(R.keys, R.isEmpty); function ModelRenderer(model) { this.modelName = model.modelName; this.attrs = model.attrs; } function attrToString(key, value) { var output = '- ' + key; if (R.has('primaryKey', value)) { output += ' (primaryKey)'; } ...
'use strict'; var R = require('ramda'); var isEmptyObj = R.pipe(R.keys, R.isEmpty); function ModelRenderer(model) { this.modelName = model.modelName; this.attrs = model.attrs; } function attrToString(key, value) { var output = '- ' + key; if (R.has('primaryKey', value)) { output += ' (primaryKey)'; } ...
Create plain object in toJSON method
Create plain object in toJSON method Standard deep equality doesn't seem to fail because it doesn't check for types (i.e. constructor). However, the deep equality that chai uses takes that into account and seems like a good idea to remove the prototype in the object to be used for JSON output.
JavaScript
mit
jcollado/modella-render-docs
c1a83e68a97eb797d81e900271262840631b5467
index.js
index.js
var app = require('./server/routes'); var server = app.listen(3000, function() { console.log('Listening on port %d', server.address().port); });
process.title = 'Feedback-App'; var app = require('./server/routes'); var server = app.listen(3000, function() { console.log('Listening on port %d', server.address().port); }); /** * Shutdown the server process * * @param {String} signal Signal to send, such as 'SIGINT' or 'SIGHUP' */ var close = function(...
Add shutdown notification and process title
Add shutdown notification and process title
JavaScript
mit
maskedcoder/feedback-app,maskedcoder/feedback-app
eeb6e25ba97d0dae3fb1c8ab6a8aec892da25ad3
js/util.js
js/util.js
/** * Searches the first loaded style sheet for an @keyframes animation by name. * FYI: If you use "to" or "from" they'll get converted to percentage values, so use them for manipulating rules. * Source (Optimized for flapper): http://jsfiddle.net/russelluresti/RHhBz/3/. **/ function findKeyframesRule(name) { var...
/** * Searches the first loaded style sheet for an @keyframes animation by name. * FYI: If you use "to" or "from" they'll get converted to percentage values, so use them for manipulating rules. * Source (Optimized for flapper): http://jsfiddle.net/russelluresti/RHhBz/3/. **/ function findKeyframesRule(name) { for...
Fix uBlock Origin breaking flapper by injecting CSS stylesheet
Fix uBlock Origin breaking flapper by injecting CSS stylesheet
JavaScript
mpl-2.0
ryanwarsaw/flapper,ryanwarsaw/flapper
b91384ff9e6adb7d00afb166bb18e1a55e4d7286
index.js
index.js
'use strict'; const semver = require('semver'); const fetch = require('node-fetch'); const url = require('url'); module.exports = pkg => { if (typeof pkg === 'string') { pkg = { name: pkg } } if (!pkg || !pkg.name) { throw new Error('You must provide a package name'); } pkg.version = p...
'use strict'; const semver = require('semver'); const fetch = require('node-fetch'); const url = require('url'); module.exports = pkg => { if (typeof pkg === 'string') { pkg = { name: pkg } } if (!pkg || !pkg.name) { throw new Error('You must provide a package name'); } pkg.version = pkg...
Add 'full' option to get all package details not just version number.
Add 'full' option to get all package details not just version number.
JavaScript
mit
sillero/registry-resolve
9fe321c8a3f4da36196ac115987c4e7db6642f75
index.js
index.js
var _ = require('underscore'); var utils = require('./lib/utils'); var middleware = require('./lib/middleware'); var fixture = require('./lib/fixture'); var service = require('./lib/service'); var transform = require('./lib/transform'); var view = require('./lib/view'); /** * Reads in route and service definitions fro...
require('es6-promise').polyfill(); var _ = require('lodash'); var utils = require('./lib/utils'); /** * Reads in route and service definitions from JSON and configures * express routes with the appropriate middleware for each. * @module router * @param {object} app - an Express instance * @param {object} routes ...
Update reducto module to work with new config schema.
Update reducto module to work with new config schema.
JavaScript
mit
michaelleeallen/reducto
f0c62f3c90f96a29736d5715dc4fdb8f15549ed6
lib/react/loading-progress.js
lib/react/loading-progress.js
'use babel' import {React} from 'react-for-atom' export default React.createClass({ propTypes: { readyCount: React.PropTypes.number, totalCount: React.PropTypes.number }, render () { if (isNaN(this.props.readyCount) || isNaN(this.props.totalCount)) { return <span /> } else { return...
'use babel' import {React} from 'react-for-atom' export default React.createClass({ propTypes: { readyCount: React.PropTypes.number, totalCount: React.PropTypes.number }, render () { if (isNaN(this.props.readyCount) || isNaN(this.props.totalCount)) { return <span /> } else { return...
Move tooltip to only show on hovering info-icon
:art: Move tooltip to only show on hovering info-icon
JavaScript
mit
viddo/atom-textual-velocity,viddo/atom-textual-velocity,onezoomin/atom-textual-velocity
69a4e2ba1022b3215255d13b15d5b35063f46386
index.js
index.js
const request = require('request'); const fs = require('fs'); const thenify = require('thenify').withCallback; const download = (url, file, callback) => { const stream = fs.createWriteStream(file); stream.on('finish', () => { callback(null, file); }); stream.on('error', error => { callback(error); })...
const request = require('request'); const fs = require('fs'); const thenify = require('thenify').withCallback; const download = (url, file, callback) => { const stream = fs.createWriteStream(file); stream.on('finish', () => { callback(null, file); }); stream.on('error', error => { callback(error); })...
Handle errors that occure during request
Handle errors that occure during request
JavaScript
mit
demohi/co-download
1e55d5399e6c6a34f49fa992982fb3b79ad3f9e7
index.js
index.js
module.exports = function (protocol) { protocol = protocol || 'http'; var url = 'http://vicopo.selfbuild.fr/search/'; switch (protocol) { case 'https': url = 'https://www.selfbuild.fr/vicopo/search/'; break; case 'http': break; default: throw new Error(protocol + ' protocol not supported'); } var...
module.exports = function (protocol) { protocol = protocol || 'http'; var url = 'http://vicopo.selfbuild.fr/search/'; switch (protocol) { case 'https': url = 'https://www.selfbuild.fr/vicopo/search/'; break; case 'http': break; default: throw new Error(protocol + ' protocol not supported'); } var...
Make it compatible with older node.js
Make it compatible with older node.js
JavaScript
mit
kylekatarnls/vicopo,kylekatarnls/vicopo,kylekatarnls/vicopo,kylekatarnls/vicopo,kylekatarnls/vicopo
60689993d75db32701e99f7eb9110ce8eff54610
index.js
index.js
"use strict"; // modified from https://github.com/es-shims/es6-shim var keys = require('object-keys'); var isObject = function (obj) { return typeof obj !== 'undefined' && obj !== null; }; var assignShim = function assign(target, source) { var s, i, props; if (!isObject(target)) { throw new TypeError('target must ...
"use strict"; // modified from https://github.com/es-shims/es6-shim var keys = Object.keys || require('object-keys'); var isObject = function (obj) { return typeof obj !== 'undefined' && obj !== null; }; var assignShim = function assign(target, source) { var s, i, props; if (!isObject(target)) { throw new TypeErro...
Use the native Object.keys if it's available.
Use the native Object.keys if it's available.
JavaScript
mit
ljharb/object.assign,es-shims/object.assign,reggi/object.assign
45bd22346dbd3cfeaedea1a3061ff5cc50b3e9a0
index.js
index.js
"use strict"; module.exports = { rules: { "sort-object-props": function(context) { var ignoreCase = context.options[0].ignoreCase; var ignoreMethods = context.options[0].ignoreMethods; var MSG = "Property names in object literals should be sorted"; return { ...
"use strict"; module.exports = { rules: { "sort-object-props": function(context) { var caseSensitive = context.options[0].caseSensitive; var ignoreMethods = context.options[0].ignoreMethods; var MSG = "Property names in object literals should be sorted"; retu...
Rename option to caseSensitive to avoid double negation
Rename option to caseSensitive to avoid double negation
JavaScript
mit
shane-tomlinson/eslint-plugin-sorting,jacobrask/eslint-plugin-sorting
b99f91a8f9259cf867cd522f4164aed4a83c2e72
index.js
index.js
'use strict'; var Q = require('q'); var request = Q.denodeify(require('request')); var chromecastHomeURL = 'https://clients3.google.com/cast/chromecast/home/v/c9541b08'; var initJSONStateRegex = /(JSON\.parse\(.+'\))/; var parseChromecastHome = function(htmlString) { var JSONParse = htmlString.match(initJSONStat...
'use strict'; var Q = require('q'); var request = Q.denodeify(require('request')); var chromecastHomeURL = 'https://clients3.google.com/cast/chromecast/home/v/c9541b08'; var initJSONStateRegex = /(JSON\.parse\(.+'\))/; var parseChromecastHome = function(htmlString) { var JSONParse = htmlString.match(initJSONStat...
Fix parsing of initState JSON as noticed by @aawc
Fix parsing of initState JSON as noticed by @aawc
JavaScript
mit
apeddinti/chromecast-backgrounds,dconnolly/chromecast-backgrounds,DKbyo/chromecast-windows-theme,adz/chromecast-backgrounds,Wiseup/chromecast-backgrounds
b2414317832618de90a46fa0115e0903a749b4de
index.js
index.js
// Enable promise error logging require('promise/lib/rejection-tracking').enable(); var express = require('express'); var app = express(); var certificate = require('./src/certificate') app.set('port', (process.env.PORT || 5000)); app.use(express.static(__dirname + '/public')); app.set('views', __dirname + '/views'...
// Enable promise error logging require('promise/lib/rejection-tracking').enable(); var express = require('express'); var app = express(); var certificate = require('./src/certificate') app.set('port', (process.env.PORT || 5000)); app.use(express.static(__dirname + '/public')); app.set('views', __dirname + '/views'...
Remove redundant call to getCertificationData()
Remove redundant call to getCertificationData() This was fetching certificate info from every site twice.
JavaScript
mit
JensDebergh/certificate-dashboard,JensDebergh/certificate-dashboard,JensDebergh/certificate-dashboard
9260ae76dba730555f71ea839d4c42cfe9d5393e
index.js
index.js
var express = require("express"), mongoose = require("mongoose"), app = express(); mongoose.connect("mongodb://localhost/test", function (err) { if (!err) { console.log("Connected to MongoDB"); } else { console.error(err); } }); app.get("/", function (req, res) { res.send("Hey buddy!"); }); v...
var express = require("express"), mongoose = require("mongoose"), app = express(); mongoose.connect("mongodb://localhost/test", function (err) { if (!err) { console.log("Connected to MongoDB"); } else { console.error(err); } }); app.get("/", function (req, res) { res.send("Hey buddy!"); }); v...
Use callbacks to ensure save is completed before returning a result
Use callbacks to ensure save is completed before returning a result
JavaScript
mit
shippableSamples/sample_node_mongo,pranaypareek/sample_node_mongo,samples-org-read/sample_node_mongo,a-murphy/sample_node_mongo,navneetjo/sample_node_mongo,buildsample/sample_node_mongo,a-murphy/sample_node_mongo,vidyar/sample_node_mongo
5203a7c14acab3253aff2494f4bbacaa945ff3c3
src/controllers/post-controller.js
src/controllers/post-controller.js
import BlogPost from '../database/models/blog-post'; import log from '../log'; const PUBLIC_API_ATTRIBUTES = [ 'id', 'title', 'link', 'description', 'date_updated', 'date_published' ]; const DEFAULT_ORDER = [ ['date_published', 'DESC'] ]; export function getAll() { return new Promise((resolve, reject...
import BlogPost from '../database/models/blog-post'; import log from '../log'; const PUBLIC_API_ATTRIBUTES = [ 'id', 'title', 'link', 'description', 'date_updated', 'date_published', 'author_id' ]; const DEFAULT_ORDER = [ ['date_published', 'DESC'] ]; export function getAll() { return new Promise((...
Allow author_id on public API
Allow author_id on public API
JavaScript
mit
csblogs/api-server,csblogs/api-server
244745bf47320a759e403beea0ecb71f178509c6
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) }); });
Fix syntax error on previous commit
Fix syntax error on previous commit
JavaScript
mit
kcmdouglas/pingpong,kcmdouglas/pingpong
24792e355734a207bd1c51a43b557867da459cce
src/js/directives/participate.js
src/js/directives/participate.js
'use strict'; angular.module('Teem') .directive('participate', function() { return { controller: [ '$scope', '$element', '$attrs', 'SessionSvc', '$timeout', 'CommunitiesSvc', function($scope, $element, $attrs, SessionSvc, $timeout, CommunitiesSvc) { $scope.participateCopyOn = $attrs.pa...
'use strict'; angular.module('Teem') .directive('participate', function() { return { controller: [ '$scope', '$element', '$attrs', 'SessionSvc', '$timeout', 'CommunitiesSvc', function($scope, $element, $attrs, SessionSvc, $timeout, CommunitiesSvc) { $scope.participateCopyOn = $attrs.pa...
Copy only the participants list instead of using .extend()
Copy only the participants list instead of using .extend()
JavaScript
agpl-3.0
P2Pvalue/teem,P2Pvalue/teem,Grasia/teem,Grasia/teem,Grasia/teem,P2Pvalue/pear2pear,P2Pvalue/pear2pear,P2Pvalue/teem
ad7a8ebb6994ad425c8429a052ef0abc91365ada
index.js
index.js
var path = require('path'); var fs = require('fs'); var mime = require('mime'); var pattern = function (file, included) { return {pattern: file, included: included, served: true, watched: false}; }; var framework = function (files) { files.push(pattern(path.join(__dirname, 'framework.js'), false)); files....
var path = require('path'); var fs = require('fs'); var mime = require('mime'); var pattern = function (file, included) { return {pattern: file, included: included, served: true, watched: false}; }; var framework = function (files) { files.push(pattern(path.join(__dirname, 'framework.js'), false)); files....
Fix proxy incorrectly proxying requests for files a level deeper than intended
Fix proxy incorrectly proxying requests for files a level deeper than intended
JavaScript
mit
jimsimon/karma-web-components,jimsimon/karma-web-components
e5ffafb53bdce4fdfca12680175adb6858dacd75
index.js
index.js
var Xray = require('x-ray'), fs = require('fs') var x = Xray() var baseURLPrefix = "http://www.thaischool.in.th/sitemap.php?school_area=&province_id=", baseURLSuffix = "&schooltype_id=&txtsearch=", provinces = require('./provinces.json') function appendObject(obj){ var resultFile = fs.readFileSync('./r...
var Xray = require('x-ray'), fs = require('fs') var x = Xray() var baseURLPrefix = "http://www.thaischool.in.th/sitemap.php?school_area=&province_id=", baseURLSuffix = "&schooltype_id=&txtsearch=", provinces = require('./provinces.json') function appendObject(obj){ var resultFile = fs.readFileSync('./r...
Save result as array of school name only
Save result as array of school name only
JavaScript
isc
lukyth/thailand-school-collector
b4f454f3701fd304e9775affc51234847d376918
src/Plugin.js
src/Plugin.js
/** * Initialize Pattern builder plugin. */ ;(function ($) { var pluginName = 'patternMaker', pluginDefaults = { palette: [] }; /** * Constructor. * * @param {dom} element Drawing board * @param {object} options Plugin options */ function...
/** * Initialize Pattern builder plugin. */ ;(function () { var pluginName = 'patternMaker', pluginDefaults = { palette: [] }; /** * Constructor. * * @param {dom} element Drawing board * @param {object} options Plugin options */ function ...
Use jQuery directly instead of $ in plugin
Use jQuery directly instead of $ in plugin
JavaScript
mit
ivannpaz/PatternMaker
f9bb15454fe3d0ec86893fbda7f08d0860cffe6b
gulp/watch.js
gulp/watch.js
'use strict'; var gulp = require('gulp'); var browserSync = require('browser-sync'); gulp.task('browser-sync', function () { browserSync({ server: { baseDir: './dist' } }); }); gulp.task('watch', ['build', 'browser-sync'], function () { gulp.watch('./app/**/*.html', ['html']); gulp.watch('./app...
'use strict'; var gulp = require('gulp'); var browserSync = require('browser-sync'); gulp.task('watch', ['build', 'serve'], function () { gulp.watch('./app/**/*.html', ['html']); gulp.watch('./app/**/*.js', ['js']); gulp.watch('./dist/**/*').on('change', function () { browserSync.reload(); }); }); gulp....
Rename browser-sync task to serve.
Rename browser-sync task to serve.
JavaScript
mpl-2.0
learnfwd/learnfwd.com,learnfwd/learnfwd.com,learnfwd/learnfwd.com
bc6673cefccf4db6b83742eaafe338d22b2d7310
cla_frontend/assets-src/javascripts/modules/moj.Conditional.js
cla_frontend/assets-src/javascripts/modules/moj.Conditional.js
(function () { 'use strict'; moj.Modules.Conditional = { el: '.js-Conditional', init: function () { var _this = this; this.cacheEls(); this.bindEvents(); this.$conditionals.each(function () { _this.toggleEl($(this)); }); }, bindEvents: function () { v...
/* globals _ */ (function () { 'use strict'; moj.Modules.Conditional = { el: '.js-Conditional', init: function () { _.bindAll(this, 'render'); this.cacheEls(); this.bindEvents(); }, bindEvents: function () { this.$conditionals.on('change deselect', this.toggle); moj...
Add module for conditional content
Add module for conditional content
JavaScript
mit
ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend
3c357c4c8043c7867e1abc0a2397735e6a8e6089
src/reducers/general.js
src/reducers/general.js
import * as types from "../actions/types"; import { chooseDisplayComponentFromURL } from "../actions/navigation"; import { hasExtension, getExtension } from "../util/extensions"; /* the store for cross-cutting state -- that is, state not limited to <App> */ const getFirstPageToDisplay = () => { if (hasExtension("en...
import * as types from "../actions/types"; import { chooseDisplayComponentFromURL } from "../actions/navigation"; import { hasExtension, getExtension } from "../util/extensions"; /* the store for cross-cutting state -- that is, state not limited to <App> */ const getFirstPageToDisplay = () => { if (hasExtension("en...
Fix bugs in redux state of pathname
Fix bugs in redux state of pathname We were getting bugs due to the redux state of `general.pathname` set to `undefined` when it shouldn't be as a result of `PAGE_CHANGE` actions with no `action.path` data. This resulted in incorrect API requests and the display of results which didn't match the URL.
JavaScript
agpl-3.0
nextstrain/auspice,nextstrain/auspice,nextstrain/auspice
5d4ce6182c59c0c15aed5646809c39e4d67c839e
enums.spec.js
enums.spec.js
var enums = require("./enum.js"); describe("Enum", function() { it("can have symbols with custom properties", function() { var color = new enums.Enum({ red: { de: "rot" }, green: { de: "grün" }, blue: { de: "blau" }, }); function translate(c) { ...
var enums = require("./enums.js"); describe("Enum", function() { it("can have symbols with custom properties", function() { var color = new enums.Enum({ red: { de: "rot" }, green: { de: "grün" }, blue: { de: "blau" }, }); function translate(c) { ...
Use correct file name to require enums.js
Use correct file name to require enums.js
JavaScript
mit
rauschma/enums
80cfc47a1c60e66836fdd7660c944f64c5d4c0c4
src/time-segments.js
src/time-segments.js
var TimeSegments = { // Segment an array of events by scale segment(events, scale, options) { scale = scale || 'weeks'; options = options || {}; _.defaults(options, { startAttribute: 'start', endAttribute: 'end' }); events = _.chain(events).clone().sortBy(options.startAttribute).val...
var TimeSegments = { // Segment an array of events by scale segment(events, scale, options) { scale = scale || 'weeks'; options = options || {}; _.defaults(options, { startAttribute: 'start', endAttribute: 'end' }); events = _.chain(events).clone().sortBy(options.startAttribute).val...
Refactor source to use more ES6 syntax.
Refactor source to use more ES6 syntax.
JavaScript
mit
jmeas/time-segments.js
6ee08bdbccec11791f9946d692174739176ffa8e
src/common.js
src/common.js
export const formatURL = (url) => ( url.length ? url.replace(/^https?:\/\//, '') : '' ) export const getTitle = (data) => ( data.about && data.about.name ? data.about.name : data.totalItems + " Entries" ) export default { getTitle, formatURL }
export const formatURL = (url) => ( url.length ? url.replace(/^https?:\/\//, '') : '' ) export const getTitle = (data) => ( data.about && (data.about.name || data.about['@id']) ? data.about.name || data.about['@id'] : data.totalItems + " Entries" ) export default { getTitle, formatURL }
Fix title of resources without name
Fix title of resources without name
JavaScript
apache-2.0
literarymachine/crg-ui
089247c62a36e4a2e0c149001bd06ccf562ebc4e
src/config.js
src/config.js
export let baseUrl = 'http://rosettastack.com'; export let sites = [{ name: 'Programmers', slug: 'programmers', seUrl: 'http://programmers.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/programmers', }, { name: 'Coffee', slug: 'coffee', seUrl: 'http://coffee.stackexchange.com/', langs: ['en'...
export let baseUrl = 'http://rosettastack.com'; export let sites = [{ name: 'Programmers', slug: 'programmers', seUrl: 'http://programmers.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/programmers', }, { name: 'Coffee', slug: 'coffee', seUrl: 'http://coffee.stackexchange.com/', langs: ['en'...
Fix db ref for SO
Fix db ref for SO
JavaScript
mpl-2.0
bbondy/stack-view,bbondy/stack-view,bbondy/stack-view
34f2f7d42346f564e4846435fb35ba19d3b5f8f8
src/Native/Spruce.js
src/Native/Spruce.js
// make is a function that takes an instance of the // elm runtime // returns an object where: // keys are names to be accessed in pure Elm // values are either functions or values function make(elm) { // If Native isn't already bound on elm, bind it! elm.Native = elm.Native || {} // then ...
var _binary_koan$elm_spruce$Native_Spruce = function() { function listen(address, program) { console.log(address) return program } return { toHtml: F2(listen) } }()
Update native module to 0.18 style
Update native module to 0.18 style
JavaScript
mit
binary-koan/elm-spruce
3769ce9f09658a3748209193b6dc29e68c9160dd
src/getter.js
src/getter.js
"use strict"; var // redis = require("redis"), // client = redis.createClient(), _ = require("underscore"), Fetcher = require("l2b-price-fetchers"); module.exports.getBookDetails = function (isbn, cb) { var f = new Fetcher(); f.fetch( {vendor: "foyles", isbn: isbn }, function (e...
"use strict"; var // redis = require("redis"), // client = redis.createClient(), _ = require("underscore"), Fetcher = require("l2b-price-fetchers"); function getBookDetails (isbn, cb) { fetchFromScrapers( {vendor: "foyles", isbn: isbn }, function (err, results) { if (err) { r...
Split up the book detail fetching into smaller chunks
Split up the book detail fetching into smaller chunks
JavaScript
agpl-3.0
OpenBookPrices/openbookprices-api
1daccbf90de27ae2b3a6ac29d448cd78664a0f87
src/server.js
src/server.js
'use strict' let fs = require('fs') let dotenv = require('dotenv') let express = require('express') let session = require('express-session') let cookieParser = require('cookie-parser') let bodyParser = require('body-parser') let morgan = require('morgan') let routes = require('./api/routes') dotenv.config({silent: tr...
'use strict' let fs = require('fs') let dotenv = require('dotenv') let express = require('express') let session = require('express-session') let cookieParser = require('cookie-parser') let bodyParser = require('body-parser') let morgan = require('morgan') let routes = require('./api/routes') let extensions = require('...
Load extensions into express app
Load extensions into express app
JavaScript
mit
shrunyan/mc-core,shrunyan/mc-core,andyfleming/mc-core,andyfleming/mc-core
a0f35993688c09fdb7fa49ec67070384e4a79ee2
test/brushModes-test.js
test/brushModes-test.js
var vows = require('vows'), assert = require('assert'), events = require('events'), load = require('./load'), suite = vows.describe('brushModes'); function d3Parcoords() { var promise = new(events.EventEmitter); load(function(d3) { promise.emit('success', d3.parcoords()); }); return promise...
var vows = require('vows'), assert = require('assert'), events = require('events'), load = require('./load'), suite = vows.describe('brushModes'); function d3Parcoords() { var promise = new(events.EventEmitter); load(function(d3) { promise.emit('success', d3.parcoords()); }); return promise...
Add angular brush mode to test
Add angular brush mode to test
JavaScript
bsd-3-clause
bbroeksema/parallel-coordinates,julianheinrich/parallel-coordinates,julianheinrich/parallel-coordinates,bbroeksema/parallel-coordinates
4ec97ddac5fcc131705e5047f4e6057c2abc5cdc
package.js
package.js
Package.describe({ summary: "Login service for VKontakte accounts (https://vk.com)", version: "0.1.4", git: "https://github.com/alexpods/meteor-accounts-vk", name: "mrt:accounts-vk" }); Package.on_use(function(api) { api.versionsFrom('METEOR@0.9.0'); api.use('accounts-base', ['client', 'server'...
Package.describe({ summary: "Login service for VKontakte accounts (https://vk.com)", version: "0.2.0", git: "https://github.com/alexpods/meteor-accounts-vk", name: "mrt:accounts-vk" }); Package.on_use(function(api) { api.versionsFrom('METEOR@0.9.0'); api.use('accounts-base', ['client', 'server'...
Add 'imply' service-configuration. Increment version number to 0.2.0
UPD: Add 'imply' service-configuration. Increment version number to 0.2.0
JavaScript
mit
newsiberian/meteor-accounts-vk,newsiberian/meteor-accounts-vk,alexpods/meteor-accounts-vk,alexpods/meteor-accounts-vk