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
217b9501b2b3e371e8c4c7fdbd534f9c1f6ca440
build/build.js
build/build.js
var extend = require('extend'); var path = require('path'); var cleanDist = require('./tasks/clean_dist'); var copy = require('./tasks/copy'); var sass = require('./tasks/sass'); var javascript = require('./tasks/javascript'); var polyfillJS = require('./tasks/polyfillJS'); module.exports = function(options) { /** ...
var extend = require('extend'); var path = require('path'); var cleanDist = require('./tasks/clean_dist'); var copy = require('./tasks/copy'); var sass = require('./tasks/sass'); var javascript = require('./tasks/javascript'); module.exports = function(options) { /** * Default options for the build * * `co...
Fix JS bug caused by previous commit
Fix JS bug caused by previous commit
JavaScript
mit
LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements
9393b0303d6b991ef27758ebadaed670a290d7fc
generators/app/templates/_app/_app.js
generators/app/templates/_app/_app.js
var express = require('express'), path = require('path'), cookieParser = require('cookie-parser'), bodyParser = require('body-parser'); var routes = require('./routes'); var app = express(); // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'ejs'); app.use(bodyParser...
var express = require('express'), path = require('path'), cookieParser = require('cookie-parser'), bodyParser = require('body-parser'); var routes = require('./routes'); var app = express(); // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'ejs'); app.use(bodyParser...
Fix 'body-parser deprecated urlencoded' warning
Fix 'body-parser deprecated urlencoded' warning
JavaScript
mit
christiannwamba/generator-wean,christiannwamba/generator-wean
72aa328e3dcd2118c03a45781d9674976fc447dc
src/utils/convertJsToSass.js
src/utils/convertJsToSass.js
function convertJsToSass(obj, syntax) { const suffix = syntax === 'sass' ? '' : ';' const keys = Object.keys(obj) const lines = keys.map(key => `$${key}: ${formatValue(obj[key], syntax)}${suffix}`) return lines.join('\n') } function formatNestedObject(obj, syntax) { const keys = Object.keys(obj) return key...
function convertJsToSass(obj, syntax) { const suffix = syntax === 'sass' ? '' : ';' const keys = Object.keys(obj) const lines = keys.map(key => `$${key}: ${formatValue(obj[key], syntax)}${suffix}`) return lines.join('\n') } function formatNestedObject(obj, syntax) { const keys = Object.keys(obj) return key...
Remove quotes from string because they break e.g. box shadows
Remove quotes from string because they break e.g. box shadows
JavaScript
mit
epegzz/sass-vars-loader,epegzz/sass-vars-loader,epegzz/sass-vars-loader
6951e92d15472187976538ed98cb9d572ce426bc
build/start.js
build/start.js
const childProcess = require("child_process"); const electron = require("electron"); const webpack = require("webpack"); const config = require("./webpack.app.config"); const compiler = webpack(config({ development: true })); let electronStarted = false; const watching = compiler.watch({}, (err, stats) => { if (err...
const childProcess = require("child_process"); const readline = require("readline"); const electron = require("electron"); const webpack = require("webpack"); const config = require("./webpack.app.config"); const compiler = webpack(config({ development: true })); let electronStarted = false; const clearTerminal = () ...
Clear terminal with each webpack rebuild
Clear terminal with each webpack rebuild
JavaScript
mit
szwacz/electron-boilerplate,szwacz/electron-boilerplate
c2e2b863bb2f18f3825a1c1ae19983c345a8db30
frontend/src/components/App.js
frontend/src/components/App.js
import React, { PropTypes } from 'react'; import { Link, IndexLink } from 'react-router'; // This is a class-based component because the current // version of hot reloading won't hot reload a stateless // component at the top-level. class App extends React.Component { render() { return ( <div> <div...
import React, { PropTypes } from 'react'; import { Link, IndexLink } from 'react-router'; // This is a class-based component because the current // version of hot reloading won't hot reload a stateless // component at the top-level. class App extends React.Component { render() { return ( <div> <div...
Break gutters only on large devices
Break gutters only on large devices
JavaScript
mit
user01/PresidentialDebates,user01/PresidentialDebates,user01/PresidentialDebates
a57628e33816f3740ccb39dd295310f34583b85d
guides/place-my-order/steps/add-data/list.js
guides/place-my-order/steps/add-data/list.js
import { Component } from 'can'; import './list.less'; import view from './list.stache'; import Restaurant from '~/models/restaurant'; const RestaurantList = Component.extend({ tag: 'pmo-restaurant-list', view, ViewModel: { // EXTERNAL STATEFUL PROPERTIES // These properties are passed from another compo...
import { Component } from 'can'; import './list.less'; import view from './list.stache'; import Restaurant from '~/models/restaurant'; const RestaurantList = Component.extend({ tag: 'pmo-restaurant-list', view, ViewModel: { // EXTERNAL STATEFUL PROPERTIES // These properties are passed from another compo...
Remove redundant source from PMO
Remove redundant source from PMO This removes the redundant source that was left over from the DoneJS 2 guide. Fixes #1156
JavaScript
mit
donejs/donejs,donejs/donejs
ffbd3bf025e9f8f72f8b4cb42e9be653ecdb08b3
js/FeaturedExperiences.ios.js
js/FeaturedExperiences.ios.js
/** * Copyright 2015-present 650 Industries. All rights reserved. * * @providesModule FeaturedExperiences */ 'use strict'; function setReferrer(newReferrer) { // NOOP. Shouldn't get here. } function getFeatured() { return [ { url: 'exp://exp.host/@exponent/floatyplane', manifest: { nam...
/** * Copyright 2015-present 650 Industries. All rights reserved. * * @providesModule FeaturedExperiences */ 'use strict'; function setReferrer(newReferrer) { // NOOP. Shouldn't get here. } function getFeatured() { return [ { url: 'exp://exp.host/@exponent/floatyplane', manifest: { nam...
Add native component list to featured experiences
Add native component list to featured experiences fbshipit-source-id: 7a6210a
JavaScript
bsd-3-clause
jolicloud/exponent,jolicloud/exponent,exponent/exponent,exponentjs/exponent,jolicloud/exponent,exponentjs/exponent,jolicloud/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exp...
ae0031e09a40434d24bfa344bf099aa4c8cbaad5
src/components/Board.js
src/components/Board.js
import React, {Component, PropTypes} from 'react' import BoardContainer from './BoardContainer' import {Provider} from 'react-redux' import {createStore} from 'redux' import boardReducer from '../reducers/BoardReducer' let store = createStore(boardReducer, window && window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDU...
import React, {Component, PropTypes} from 'react' import BoardContainer from './BoardContainer' import {Provider} from 'react-redux' import {createStore} from 'redux' import boardReducer from '../reducers/BoardReducer' let store = createStore(boardReducer, typeof(window) !== 'undefined' && window.__REDUX_DEVTOOLS_EXTE...
Use typeof(window) to check if being used in non browser environments
fix(): Use typeof(window) to check if being used in non browser environments https://github.com/rcdexta/react-trello/issues/15
JavaScript
mit
rcdexta/react-trello,rcdexta/react-trello
01c5311c3027c893ddd76cfbec42d88baece1564
lib/daab-run.js
lib/daab-run.js
#!/usr/bin/env node // daab run var fs = require('fs'); var spawn = require('child_process').spawn; var program = require('commander'); var auth = require('./auth'); program .allowUnknownOption() .parse(process.argv); if (! auth.hasToken()) { console.log('At first, try "daab login"'); process.exit(); } var ...
#!/usr/bin/env node // daab run var fs = require('fs'); var spawn = require('child_process').spawn; var program = require('commander'); var auth = require('./auth'); program .allowUnknownOption() .parse(process.argv); if (! auth.hasToken()) { console.log('At first, try "daab login"'); process.exit(); } var ...
Fix launch command on windows platform.
Fix launch command on windows platform.
JavaScript
mit
lisb/daab,lisb/daab,lisb/daab
cb7ab80f26922a025297d20fe791e8c0b0a01ca7
settings.js
settings.js
//app-specific sentence module.exports = { serverPort : 8080, pingInteralInMilliseconds : 1000*5, // server main loop interval. 6 hours postBeforeTheMatch : true, postAfterTheMatch : true, preMatchWindowInMinutes: "in 5 minutes", // moment.js humanize expression postMatchWindowInHours: "2 hours ago" // mom...
//app-specific sentence module.exports = { serverPort : 8080, pingInteralInMilliseconds : 1000*60, // server main loop interval. 6 hours postBeforeTheMatch : true, postAfterTheMatch : true, preMatchWindowInMinutes: "in 5 minutes", // moment.js humanize expression postMatchWindowInHours: "2 hours ago" // mo...
Set default loop interval to 1 minute
Set default loop interval to 1 minute
JavaScript
mit
matijaabicic/Moubot,d48/Moubot,matijaabicic/Moubot,matijaabicic/Moubot,dougmolineux/Moubot
b569d9e348d345f6c6b1135c5fbb49a189e21f42
src/components/Menu.js
src/components/Menu.js
import * as React from 'react' import { Link } from 'gatsby' import { Container } from './Container' import { CloseIcon } from './icons/Close' export const Menu = ({ showMenu, onClick }) => { return ( <div className={`${ showMenu ? 'fixed' : 'hidden' } inset-0 z-40 h-screen bg-black w-full b...
import * as React from 'react' import { Link } from 'gatsby' import { Container } from './Container' import { CloseIcon } from './icons/Close' export const Menu = ({ showMenu, onClick }) => { return ( <div className={`${ showMenu ? 'fixed' : 'hidden' } inset-0 z-40 h-full bg-black w-full bg-...
Fix menu close btn position
Fix menu close btn position
JavaScript
mit
dtjv/dtjv.github.io
210c0478bd061571f62bb0a841400bd24e325acb
lib/check.js
lib/check.js
var check = { isNaN : function(value) { "use strict"; return isNaN(value); }, isZero : function(value) { "use strict"; return value === 0; }, isPositiveZero : function(value) { "use strict"; return value === 0 && 1 / value === Infinity; }, isNegativeZero : function(value) { "use strict"; retu...
var check = { isNaN : isNaN, isZero : function(value) { "use strict"; return value === 0; }, isPositiveZero : function(value) { "use strict"; return value === 0 && 1 / value === Infinity; }, isNegativeZero : function(value) { "use strict"; return value === 0 && 1 / value === -Infinity; }, isFinit...
Make isFinite() and isNaN() direct ref copy of the builtin functions
Make isFinite() and isNaN() direct ref copy of the builtin functions
JavaScript
mit
kchapelier/node-mathp
b4b33ec346e1f6e6fb7f5eea1c9674d33a6d2831
client/hide.js
client/hide.js
/* Hide posts you don't like */ let main = require('./main'); // Remember hidden posts for 7 days only, to perevent the cookie from // eclipsing the Sun let hidden = new main.Memory('hide', 7, true); main.reply('hide', function(model) { // Hiding your own posts would open up the gates for a ton of bugs. Fuck // ...
/* Hide posts you don't like */ let main = require('./main'); // Remember hidden posts for 7 days only, to perevent the cookie from // eclipsing the Sun let hidden = new main.Memory('hide', 7, true); main.reply('hide', function(model) { // Hiding your own posts would open up the gates for a ton of bugs. Fuck // ...
Fix purging hidden post list
Fix purging hidden post list
JavaScript
mit
theGaggle/sleepingpizza,KoinoAoi/meguca,KoinoAoi/meguca,theGaggle/sleepingpizza,reiclone/doushio,reiclone/doushio,reiclone/doushio,theGaggle/sleepingpizza,reiclone/doushio,theGaggle/sleepingpizza,KoinoAoi/meguca,KoinoAoi/meguca,KoinoAoi/meguca,theGaggle/sleepingpizza,theGaggle/sleepingpizza,reiclone/doushio
38733fd891f6d3022a5c0bd7aef98c4ee7ad5b55
packages/ember-engines/lib/utils/deeply-non-duplicated-addon.js
packages/ember-engines/lib/utils/deeply-non-duplicated-addon.js
'use strict'; /** * Deduplicate one addon's children addons recursively from hostAddons. * * @private * @param {Object} hostAddons * @param {EmberAddon} dedupedAddon * @param {String} treeName */ module.exports = function deeplyNonDuplicatedAddon(hostAddons, dedupedAddon, treeName) { if (dedupedAddon.addons.l...
'use strict'; // Array of addon names that should not be deduped. const ADDONS_TO_EXCLUDE_FROM_DEDUPE = [ 'ember-cli-babel', ]; /** * Deduplicate one addon's children addons recursively from hostAddons. * * @private * @param {Object} hostAddons * @param {EmberAddon} dedupedAddon * @param {String} treeName */...
Add exclude list to addon dedupe logic
Add exclude list to addon dedupe logic
JavaScript
mit
ember-engines/ember-engines,ember-engines/ember-engines
5ecc6a9de257eb6872946a01f5929a2bfa94bf79
lib/macgyver.js
lib/macgyver.js
var pristineEnv = require('./pristine-env'); function macgyver(thing) { if (Object.prototype.toString.call(thing) === '[object Array]') { return (new pristineEnv().Array(0)).concat(thing); } else { return thing; } } module.exports = macgyver;
var pristineEnv = require('./pristine-env'); var pristineObject = pristineEnv().Object; var pristineArray = pristineEnv().Array; function macgyver(thing) { if (pristineObject.prototype.toString.call(thing) === '[object Array]') { return (new pristineArray()).concat(thing); } else { return thin...
Use pristine Object to work out if a thing is an array
Use pristine Object to work out if a thing is an array
JavaScript
mit
customcommander/macgyver
8d62ce5afa50ccbe21b516f3cc39d0c7ca20b922
lib/index.js
lib/index.js
require('./db/connection'); const Koa = require('koa'); const bodyParser = require('koa-bodyparser'); const logger = require('koa-logger'); const json = require('koa-json'); const onerror = require('koa-onerror'); const router = require('./routes'); const cors = require('./helpers/cors'); const auth = require('./helpe...
require('./db/connection'); const Koa = require('koa'); const bodyParser = require('koa-bodyparser'); const logger = require('koa-logger'); const json = require('koa-json'); const onerror = require('koa-onerror'); const router = require('./routes'); const cors = require('./helpers/cors'); (() => { const app = new K...
ADD - PORT env var
ADD - PORT env var
JavaScript
apache-2.0
fkanout/NotifyDrive-API
30b859c827ed450fbf7a52a18aa92af79c11e5e4
lib/index.js
lib/index.js
'use strict'; var bunyan = require('bunyan'); var config = require('coyno-config'); function createLogger() { var log; if (!!config.log.pretty) { var PrettyStream = require('bunyan-prettystream'); var prettyStdOut = new PrettyStream(); prettyStdOut.pipe(process.stdout); log = bunyan.createLogge...
'use strict'; var bunyan = require('bunyan'); var config = require('coyno-config'); function createLogger() { var log; if (!!config.log.pretty) { var PrettyStream = require('bunyan-prettystream'); var prettyStdOut = new PrettyStream(); prettyStdOut.pipe(process.stdout); log = bunyan.createLogge...
Handle log level correctly for raw logs
Handle log level correctly for raw logs
JavaScript
apache-2.0
blooks/log
fe4d6b89e779c357d6bdc00c46c6c28bc549ecc5
Source/Scene/Pass.js
Source/Scene/Pass.js
/*global define*/ define([ '../Core/freezeObject' ], function( freezeObject) { "use strict"; /** * The render pass for a command. * * @private */ var Pass = { GLOBE : 0, OPAQUE : 1, TRANSLUCENT : 2, OVERLAY : 3, NUMBER_OF_PASSE...
/*global define*/ define([ '../Core/freezeObject' ], function( freezeObject) { "use strict"; /** * The render pass for a command. * * @private */ var Pass = { GLOBE : 0, OPAQUE : 1, // Commands are executed in order by pass up to the transluce...
Add comment about the order of passes.
Add comment about the order of passes.
JavaScript
apache-2.0
CesiumGS/cesium,AnimatedRNG/cesium,likangning93/cesium,denverpierce/cesium,jason-crow/cesium,ggetz/cesium,kiselev-dv/cesium,esraerik/cesium,esraerik/cesium,emackey/cesium,omh1280/cesium,soceur/cesium,jason-crow/cesium,emackey/cesium,YonatanKra/cesium,YonatanKra/cesium,omh1280/cesium,AnimatedRNG/cesium,kiselev-dv/cesium...
f315636aec6965e0fe1394775bc4e97a67ad11aa
CodeWars/js/death-by-coffee.js
CodeWars/js/death-by-coffee.js
// https://www.codewars.com/kata/death-by-coffee/javascript const coffeeLimits = function(y,m,d) { let healthNumber = y * 10000 + m * 100 + d; let currentHex; let current; let i; let result = [0,0]; for(i=1;i<=5000;i++){ current = healthNumber + i * 0xcafe; currentHex = current.toSt...
// https://www.codewars.com/kata/death-by-coffee/javascript const coffeeLimits = function(y,m,d) { let healthNumber = y * 10000 + m * 100 + d; let currentHex; let current; let i; let result = [0,0]; for(i=1;i<=5000;i++){ current = healthNumber + i * 0xcafe; currentHex = current.toSt...
Add export to use as module
Add export to use as module
JavaScript
mit
sunnysetia93/competitive-coding-problems,sunnysetia93/competitive-coding-problems,sunnysetia93/competitive-coding-problems,sunnysetia93/competitive-coding-problems,sunnysetia93/competitive-coding-problems,sunnysetia93/competitive-coding-problems
fcf4357086a308bf9a9164f496c167e02e01ba17
lib/template.js
lib/template.js
const Handlebars = require('handlebars'); Handlebars.registerHelper('removeBreak', (text) => { text = Handlebars.Utils.escapeExpression(text); text = text.replace(/(\r\n|\n|\r)/gm, ' '); return new Handlebars.SafeString(text); }); const Template = class { constructor(templateString, data) { this.template ...
const Handlebars = require('handlebars'); Handlebars.registerHelper('removeBreak', (text) => { text = Handlebars.Utils.escapeExpression(text); text = text.replace(/(\r\n|\n|\r)/gm, ' '); return new Handlebars.SafeString(text); }); const Template = class { constructor(templateString, data) { this.template ...
Remove class method of Template
Remove class method of Template
JavaScript
mit
t32k/stylestats
ffdfc42c910a9d09d4cddc9c5df46d44d1e10ca8
grunt/contrib-jshint.js
grunt/contrib-jshint.js
// Check JS assets for code quality module.exports = function(grunt) { grunt.config('jshint', { all: ['Gruntfile.js', 'scripts/main.js'], }); grunt.loadNpmTasks('grunt-contrib-jshint'); };
// Check JS assets for code quality module.exports = function(grunt) { grunt.config('jshint', { all: ['Gruntfile.js', 'grunt/*.js', 'scripts/main.js'], }); grunt.loadNpmTasks('grunt-contrib-jshint'); };
Include Grunt partials in jshint task.
Include Grunt partials in jshint task.
JavaScript
mit
yellowled/yl-bp,yellowled/yl-bp
db31f1d00912d3720c8b2af5257d8727347e4d94
lib/redis.js
lib/redis.js
const redis = require('redis') const config = require('config') const url = require('url') const logger = require('./logger.js')() const initRedisClient = function () { let client, redisInfo if (config.redis.url) { redisInfo = url.parse(config.redis.url) client = redis.createClient(redisInfo.port, redisInf...
const redis = require('redis') const config = require('config') const logger = require('./logger.js')() const initRedisClient = function () { let client, redisInfo if (config.redis.url) { redisInfo = new URL(config.redis.url) client = redis.createClient(redisInfo.port, redisInfo.hostname) } else { c...
Replace deprecated url.parse() with WHATWG URL API
Replace deprecated url.parse() with WHATWG URL API
JavaScript
bsd-3-clause
codeforamerica/streetmix,codeforamerica/streetmix,codeforamerica/streetmix
030d0f7d611c4b99819564f984354a659b2fa35a
core/src/main/public/static/js/find/app/page/search/results/state-token-strategy.js
core/src/main/public/static/js/find/app/page/search/results/state-token-strategy.js
/* * Copyright 2016 Hewlett-Packard Development Company, L.P. * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. */ define(['underscore'], function(_) { return { waitForIndexes: _.constant(false), promotions: _.constant(true), ...
/* * Copyright 2016 Hewlett-Packard Development Company, L.P. * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. */ define(['underscore'], function(_) { return { waitForIndexes: _.constant(false), promotions: _.constant(false), ...
Stop saved snapshots querying for promotions [rev: jon.soul]
[FIND-57] Stop saved snapshots querying for promotions [rev: jon.soul]
JavaScript
mit
hpautonomy/find,hpautonomy/find,LinkPowerHK/find,hpe-idol/java-powerpoint-report,hpautonomy/find,hpe-idol/find,hpautonomy/find,LinkPowerHK/find,hpe-idol/find,hpe-idol/find,hpe-idol/find,hpe-idol/java-powerpoint-report,LinkPowerHK/find,hpe-idol/find,LinkPowerHK/find,LinkPowerHK/find,hpautonomy/find
5c0a550bc9c68f0281bd1b61e93985cbaed962c0
src/lib/render-image.js
src/lib/render-image.js
// Utility for rendering html images to files 'use strict'; const webshot = require('webshot'); const Jimp = require('jimp'); const fs = require(`fs`); const webshotOptions = { windowSize: { width: 1024, height: 768 } , shotSize: { width: 1024, height: 'all' } , phantomPath: 'phantomjs' , siteType: 'html' , streamT...
// Utility for rendering html images to files 'use strict'; const webshot = require('webshot'); const Jimp = require('jimp'); const fs = require(`fs`); const webshotOptions = { windowSize: { width: 1024, height: 768 } , shotSize: { width: 1024, height: 'all' } , phantomPath: 'phantomjs' , siteType: 'html' , streamT...
Increase delay before considering file written
Increase delay before considering file written
JavaScript
mit
GoodGamery/mtgnewsbot,GoodGamery/mtgnewsbot
8e279cc54dcc083bf49940a572b0574881bbeea8
www/lib/collections/photos.js
www/lib/collections/photos.js
Photo = function (doc) { _.extend(this, doc); }; _.extend(Photo.prototype, { getImgTag: function (dimension) { return { 'class': 'lazy', 'data-src': _.str.sprintf( '%s/photos/%s/%s', Meteor.settings.public.uri.cdn, dimension, this.filename ), 'data-src-retina': _.str.sprintf( '%s/p...
Photo = function (doc) { _.extend(this, doc); }; _.extend(Photo.prototype, { getImgTag: function (dimension) { return { 'class': 'lazy', src: 'data:image/gif;base64,' + 'R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==', 'data-src': _.str.sprintf( '%s/photos/%s/%s', Meteor.settings.public...
Use a placeholder png to hold the image size
Use a placeholder png to hold the image size
JavaScript
mit
nburka/black-white
54306bafd423daff49272d4605bf84ae7a7471c8
js/metronome.js
js/metronome.js
function Metronome(tempo, beatsPerMeasure){ this.tempo = Number(tempo); this.beatsPerMeasure = Number(beatsPerMeasure); this.interval = null; } Metronome.prototype.start = function(){ var millisecondsToWait = this.tempoToMilliseconds(this.tempo); this.interval = window.setInterval(this.updateCounterView, mil...
function Metronome(tempo, beatsPerMeasure){ this.tempo = Number(tempo); this.beatsPerMeasure = Number(beatsPerMeasure); this.interval = null; } Metronome.prototype.start = function(){ var millisecondsToWait = this.tempoToMilliseconds(this.tempo); this.interval = window.setInterval(this.updateCounterView, mil...
Clear counter when Metronome is stopped
Clear counter when Metronome is stopped
JavaScript
mit
dmilburn/beatrice,dmilburn/beatrice
dba8dc2f41ffdf023bbfb8dbf92826c6c799a0b0
js/nbpreview.js
js/nbpreview.js
(function () { var root = this; var $file_input = document.querySelector("input#file"); var $holder = document.querySelector("#notebook-holder"); var render_notebook = function (ipynb) { var notebook = root.notebook = nb.parse(ipynb); while ($holder.hasChildNodes()) { $holde...
(function () { var root = this; var $file_input = document.querySelector("input#file"); var $holder = document.querySelector("#notebook-holder"); var render_notebook = function (ipynb) { var notebook = root.notebook = nb.parse(ipynb); while ($holder.hasChildNodes()) { $holde...
Add support for dropping files into window.
Add support for dropping files into window.
JavaScript
mit
jsvine/nbpreview,jsvine/nbpreview
c3f9e5eff4b8b7e7de0e4a6f7da1faad077b23ee
templates/system/modules/ph7cms-donation/themes/base/js/donationbox.js
templates/system/modules/ph7cms-donation/themes/base/js/donationbox.js
/* * Author: Pierre-Henry Soria <hello@ph7cms.com> * Copyright: (c) 2015-2017, Pierre-Henry Soria. All Rights Reserved. * License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. */ var $validationBox = (function () { $.get(pH7Url.base + 'ph7cms-don...
/* * Author: Pierre-Henry Soria <hello@ph7cms.com> * Copyright: (c) 2015-2017, Pierre-Henry Soria. All Rights Reserved. * License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. */ var $validationBox = (function () { $.get(pH7Url.base + 'ph7cms-don...
Change size of donation popup
Change size of donation popup
JavaScript
mit
pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS
7044032b4ace71eda06a99a5389edf0289179602
src/list.js
src/list.js
import { debuglog } from 'util'; import AbstractCache from './abstract'; export default class ListCache extends AbstractCache { constructor() { super(); this._log = debuglog('cache'); this._date = null; this.touch(); } touch() { this._date = Date.now(); return this; } get(key, cal...
import { debuglog } from 'util'; import AbstractCache from './abstract'; export default class ListCache extends AbstractCache { constructor() { super(); this._log = debuglog('cache'); this._date = Date.now(); } date(value = null) { if (value === null) { return this._date; } this....
Replace touch with date get/setter
Replace touch with date get/setter
JavaScript
mit
scola84/node-api-cache
d4660759d672c90a23fe0944082cff0083d691a0
src/main.js
src/main.js
import Vue from 'vue'; import VueResource from 'vue-resource'; import VueRouter from 'vue-router'; import App from './App.vue'; import About from './components/About.vue'; import store from './store'; import routes from './router'; import components from './components'; import filters from './filters' Vue.use(VueRes...
import Vue from 'vue'; import VueResource from 'vue-resource'; import VueRouter from 'vue-router'; import App from './App.vue'; import About from './components/About.vue'; import store from './store'; import routes from './router'; import components from './components'; import filters from './filters' Vue.use(VueRes...
Switch router to history mode
Switch router to history mode
JavaScript
mit
dmurtari/mbu-frontend,dmurtari/mbu-frontend
a1694721011727b4570e21d444e6b23835d42a1c
src/main.js
src/main.js
'use strict'; var resourcify = angular.module('resourcify', []); function resourcificator ($http, $q) { var $resourcifyError = angular.$$minErr('resourcify'), requestOptions = ['query', 'get', '$get', '$save', '$update', '$delete'], requestMethods = { 'query': 'GET', 'get': 'GET', ...
'use strict'; var resourcify = angular.module('resourcify', []); function resourcificator ($http, $q) { var $resourcifyError = angular.$$minErr('resourcify'), requestOptions = ['query', 'get', '$get', '$save', '$update', '$delete'], requestMethods = { 'query': 'GET', 'get': 'GET', ...
Add regex for finding path params
Add regex for finding path params
JavaScript
mit
erikdonohoo/resourcify,erikdonohoo/resourcify
b3827c12d2092ec93813470ec0b9a81d4d554d08
lib/client/satisfactionratings.js
lib/client/satisfactionratings.js
//SatisfactionRatings.js: Client for the zendesk API. var util = require('util'), Client = require('./client').Client, defaultgroups = require('./helpers').defaultgroups; var SatisfactionRatings = exports.SatisfactionRatings = function (options) { this.jsonAPIName = 'satisfaction_ratings'; C...
//SatisfactionRatings.js: Client for the zendesk API. var util = require('util'), Client = require('./client').Client, defaultgroups = require('./helpers').defaultgroups; var SatisfactionRatings = exports.SatisfactionRatings = function (options) { this.jsonAPIName = 'satisfaction_ratings'; C...
Add support for creating Satisfaction Ratings
Add support for creating Satisfaction Ratings As documented at https://developer.zendesk.com/rest_api/docs/core/satisfaction_ratings#create-a-satisfaction-rating
JavaScript
mit
blakmatrix/node-zendesk,blakmatrix/node-zendesk
30100c0d4d320abbe3004f795b7121d3dfebdaf5
logger.js
logger.js
const chalk = require('chalk'); LOG_TYPES = { NONE: 0, ERROR: 1, NORMAL: 2, DEBUG: 3 }; let logType = LOG_TYPES.NORMAL; const setLogType = (type) => { if (!(type in Object.values(LOG_TYPES))) return; logType = type; }; const logTime = () => { let nowDate = new Date(); return nowDate...
const chalk = require('chalk'); LOG_TYPES = { NONE: 0, ERROR: 1, NORMAL: 2, DEBUG: 3 }; let logType = LOG_TYPES.NORMAL; const setLogType = (type) => { if (typeof type !== 'number') return; logType = type; }; const logTime = () => { let nowDate = new Date(); return nowDate.toLocaleDa...
Fix nodejs v6 'TypeError: Object.values is not a function'
Fix nodejs v6 'TypeError: Object.values is not a function'
JavaScript
mit
illuspas/Node-Media-Server,illuspas/Node-Media-Server
789eb9cc78ecaf8e7e04dc8ca1dc8ac7b48f86de
src/node.js
src/node.js
import fs from 'fs'; import { pdf, View, Text, Link, Page, Font, Note, Image, version, Document, StyleSheet, PDFRenderer, createInstance, } from './index'; export const renderToStream = function(element) { return pdf(element).toBuffer(); }; export const renderToFile = function(element, fil...
import fs from 'fs'; import { pdf, View, Text, Link, Page, Font, Note, Image, version, Document, StyleSheet, PDFRenderer, createInstance, } from './index'; export const renderToStream = function(element) { return pdf(element).toBuffer(); }; export const renderToFile = function(element, fil...
Throw error when trying to use web specific APIs on Node
Throw error when trying to use web specific APIs on Node
JavaScript
mit
diegomura/react-pdf,diegomura/react-pdf
caf9ce480560406d0354cf20a93323e2e08ca7c1
src/app/rules/references.service.js
src/app/rules/references.service.js
define(['rules/rules.module' ], function() { angular.module('rules').factory('references', [ function() { function generateReference(query) { var url = ('#/rules/explain?inference=' + encodeURIComponent(angular.toJson(query, false))); var referen...
define(['rules/rules.module' ], function() { angular.module('rules').factory('references', [ function() { function generateReference(query) { var bindings = []; angular.forEach(query.bindings, function(binding) { if ('id' in binding) { ...
Reduce amount of information in reference links
Reduce amount of information in reference links
JavaScript
apache-2.0
Wikidata/SQID,Wikidata/WikidataClassBrowser,Wikidata/WikidataClassBrowser,Wikidata/SQID,Wikidata/SQID,Wikidata/WikidataClassBrowser,Wikidata/SQID,Wikidata/SQID,Wikidata/SQID,Wikidata/SQID
af9403793eefb5b3ee0217b077cb41a480251667
test/helpers.js
test/helpers.js
const Bluebird = require('bluebird'); const mongoose = require('mongoose'); const Alternative = require('../app/models/alternative'); const Election = require('../app/models/election'); const Vote = require('../app/models/vote'); const User = require('../app/models/user'); exports.dropDatabase = () => mongoose.conne...
const Bluebird = require('bluebird'); const mongoose = require('mongoose'); const Alternative = require('../app/models/alternative'); const Election = require('../app/models/election'); const Vote = require('../app/models/vote'); const User = require('../app/models/user'); exports.dropDatabase = () => mongoose.conne...
Make new code pass all new tests
Make new code pass all new tests This was done by setting the moderator flag in the helper function that creates admin users.
JavaScript
mit
webkom/vote,webkom/vote,webkom/vote,webkom/vote
35ba2674051ab6201382af6dda76e1531e8ef612
test/es5.js
test/es5.js
import test from 'tape-catch'; var Symbol = require('es6-symbol'); var { curry, _ } = require('../module/index')({ Symbol }); test('The API is in good shape.', (is) => { is.equal( typeof curry, 'function', '`curry_` is a function' ); is.end(); }); test('basic usage', (is) => { const sum = (a, b, ...
Add ES5 test by @stoeffel
Add ES5 test by @stoeffel
JavaScript
mit
thisables/curry,togusafish/stoeffel-_-curry-this,stoeffel/curry-this
9fd8b1cd47f6c9f03879427abf471f3d9be49738
tools/tests/cordova-platforms.js
tools/tests/cordova-platforms.js
var selftest = require('../selftest.js'); var Sandbox = selftest.Sandbox; var files = require('../files.js'); // Add plugins to an app. Change the contents of the plugins and their // dependencies, make sure that the app still refreshes. selftest.define("add cordova platforms", function () { var s = new Sandbox(); ...
var selftest = require('../selftest.js'); var Sandbox = selftest.Sandbox; var files = require('../files.js'); // Add plugins to an app. Change the contents of the plugins and their // dependencies, make sure that the app still refreshes. selftest.define("add cordova platforms", function () { var s = new Sandbox(); ...
Update 'add cordova platforms' to match latest command output
Update 'add cordova platforms' to match latest command output
JavaScript
mit
benstoltz/meteor,dandv/meteor,allanalexandre/meteor,brdtrpp/meteor,neotim/meteor,tdamsma/meteor,newswim/meteor,PatrickMcGuinness/meteor,4commerce-technologies-AG/meteor,DCKT/meteor,fashionsun/meteor,DAB0mB/meteor,emmerge/meteor,dfischer/meteor,ljack/meteor,servel333/meteor,lpinto93/meteor,deanius/meteor,benjamn/meteor,...
1657a56ec025e6670d72c20f1cf87f80ab9c7de6
lib/throttle.js
lib/throttle.js
'use strict'; module.exports = (api) => { api.metasync.throttle = ( // Function throttling timeout, // time interval fn, // function to be executed once per timeout args // arguments array for fn (optional) ) => { let timer = null; let wait = false; return function throttled() { ...
'use strict'; module.exports = (api) => { api.metasync.throttle = ( // Function throttling timeout, // time interval fn, // function to be executed once per timeout args // arguments array for fn (optional) ) => { let timer = null; let wait = false; return function throttled() { ...
Add null as error argument for callback
Add null as error argument for callback Refs: #13 PR-URL: https://github.com/metarhia/metasync/pull/152 Reviewed-By: Timur Shemsedinov <6dc7cb6a9fcface2186172df883b5c9ab417ae33@gmail.com>
JavaScript
mit
metarhia/MetaSync,DzyubSpirit/MetaSync,DzyubSpirit/MetaSync
204918caff2feeff82f10300364edd43b8e1f4ea
lib/versions.js
lib/versions.js
var semver = require('semver'); var versions = module.exports; /** Returns a number representation of the version number that can be compared with other such representations e.g. compareable('0.6.12') > compareable('0.6.10') */ versions.compareable = function compareable(ver) { var parts = ver.split('.'); return ...
var semver = require('semver'); var versions = module.exports; /** Returns a number representation of the version number that can be compared with other such representations e.g. compareable('0.6.12') > compareable('0.6.10') */ versions.compareable = function compareable(ver) { var parts = ver.split('.'); return ...
Write out version spec that's being used, to make version errors more intuitive.
Write out version spec that's being used, to make version errors more intuitive.
JavaScript
mit
marcelklehr/nodist,marcelklehr/nodist,marcelklehr/nodist,nullivex/nodist,nullivex/nodist,nullivex/nodist
b933f6e2ba5915d248a954c4c322b91d452d5182
lib/errors/mfarequirederror.js
lib/errors/mfarequirederror.js
/** * Module dependencies. */ var TokenError = require('./tokenerror'); /** * `TokenError` error. * * @api public */ function MFARequiredError(message, uri, user) { TokenError.call(this, message, 'mfa_required', uri); Error.captureStackTrace(this, arguments.callee); this.name = 'MFARequiredError'; this.u...
/** * Module dependencies. */ var TokenError = require('./tokenerror'); /** * `TokenError` error. * * @api public */ function MFARequiredError(message, uri, user, areq) { TokenError.call(this, message, 'mfa_required', uri); Error.captureStackTrace(this, arguments.callee); this.name = 'MFARequiredError'; ...
Add request to MFA error for keeping session context.
Add request to MFA error for keeping session context.
JavaScript
mit
jaredhanson/oauth2orize-2fa
adaa54ca513706ad15f858d318dd02895b3a6445
src/register-element.js
src/register-element.js
import * as privateMethods from './elements/private-methods.js'; const callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback']; export default function registerElement(tagName, Constructor) { // The WebIDL bindings generated this, thinking that they were in an ES6 world ...
import * as privateMethods from './elements/private-methods.js'; const callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback']; export default function registerElement(tagName, Constructor) { // The WebIDL bindings generated this, thinking that they were in an ES6 world ...
Fix logic for removing the custom element callbacks
Fix logic for removing the custom element callbacks
JavaScript
apache-2.0
domenic/html-as-custom-elements,domenic/html-as-custom-elements,zenorocha/html-as-custom-elements,valmzetvn/html-as-custom-elements,valmzetvn/html-as-custom-elements,valmzetvn/html-as-custom-elements,domenic/html-as-custom-elements,zenorocha/html-as-custom-elements
6e08a454f936d58fc5fc1720e7a74d94b3bc9c9e
demo/simple.js
demo/simple.js
'use strict'; var sandboxFactory = require('..'), MemoryFS = require('memory-fs'), memoryFS = new MemoryFS(), sandbox = sandboxFactory.create(memoryFS); memoryFS.mkdirpSync('/my/dir'); memoryFS.writeFileSync( '/my/dir/file1.js', 'console.log("File1"); require("./file2.js"); console.log("Then"); re...
'use strict'; var sandboxFactory = require('..'), mockFS = require('mock-fs').fs(), sandbox = sandboxFactory.create(mockFS); mockFS.mkdirSync('/my'); mockFS.mkdirSync('/my/dir'); mockFS.writeFileSync( '/my/dir/file1.js', 'console.log("File1"); require("./file2.js"); console.log("Then"); require("/my/d...
Switch demo to use mock-fs rather than memory-fs
Switch demo to use mock-fs rather than memory-fs
JavaScript
mit
asmblah/playpit
f9069b0f601cfa508da172be105f1d0be35acd4c
js/views/ViewManager.js
js/views/ViewManager.js
import HomeView from './HomeView'; import JoinView from './JoinView'; export default class ViewManager { constructor(target) { this.target = target; this.home = new HomeView(); this.join = new JoinView(); this.load('home'); } load(viewName) { this[viewName].init().then(view => { // First remove all...
import HomeView from './HomeView'; import JoinView from './JoinView'; export default class ViewManager { constructor(target) { this.target = target; // Register all known views this.home = new HomeView(); this.join = new JoinView(); // Define default view this.DEFAULT_VIEW = 'home'; // Init URL bar a...
Add URL support with history.pushState
Add URL support with history.pushState
JavaScript
mit
richterdennis/CastleCrush,richterdennis/CastleCrush
e0fcee4687d0d97fefcef72bc828fcfb0a197da1
src/validations/html.js
src/validations/html.js
var Promise = require('es6-promise').Promise; var lodash = require('lodash'); var validateWithHtmllint = require('./html/htmllint.js'); var validateWithSlowparse = require('./html/slowparse.js'); function filterErrors(errors) { var indexedErrors = lodash(errors).indexBy('reason'); var suppressedTypes = indexedErr...
var Promise = require('es6-promise').Promise; var lodash = require('lodash'); var validateWithHtmllint = require('./html/htmllint.js'); var validateWithSlowparse = require('./html/slowparse.js'); function filterErrors(errors) { var groupedErrors = lodash(errors).groupBy('reason'); var suppressedTypes = groupedErr...
Allow the same error on different lines
Allow the same error on different lines
JavaScript
mit
jwang1919/popcode,jwang1919/popcode,jwang1919/popcode,jwang1919/popcode,popcodeorg/popcode,outoftime/learnpad,outoftime/learnpad,popcodeorg/popcode,popcodeorg/popcode,popcodeorg/popcode
87f7091e84b9cad0589160584f85d979b21df4e8
lib/rules_inline/backticks.js
lib/rules_inline/backticks.js
// Parse backticks 'use strict'; module.exports = function backtick(state, silent) { var start, max, marker, matchStart, matchEnd, token, pos = state.pos, ch = state.src.charCodeAt(pos); if (ch !== 0x60/* ` */) { return false; } start = pos; pos++; max = state.posMax; while (pos < max && st...
// Parse backticks 'use strict'; module.exports = function backtick(state, silent) { var start, max, marker, matchStart, matchEnd, token, pos = state.pos, ch = state.src.charCodeAt(pos); if (ch !== 0x60/* ` */) { return false; } start = pos; pos++; max = state.posMax; while (pos < max && st...
Add position and size to code_inline
Add position and size to code_inline
JavaScript
mit
GerHobbelt/markdown-it,GerHobbelt/markdown-it
9b6c06ddb62f358a73e3d243c9533c068a5b0bda
app/assets/javascripts/directives/validation/reset_validation_status.js
app/assets/javascripts/directives/validation/reset_validation_status.js
ManageIQ.angular.app.directive('resetValidationStatus', ['$rootScope', function($rootScope) { return { require: 'ngModel', link: function (scope, elem, attrs, ctrl) { scope.$watch(attrs.ngModel, function() { adjustValidationStatus(ctrl.$modelValue, scope, ctrl, attrs, $rootScope); }); ...
ManageIQ.angular.app.directive('resetValidationStatus', ['$rootScope', function($rootScope) { return { require: 'ngModel', link: function (scope, elem, attrs, ctrl) { scope.$watch(attrs.ngModel, function() { adjustValidationStatus(ctrl.$modelValue, scope, ctrl, attrs, $rootScope); }); ...
Check if postValidationModel is defined for the tab in question
Check if postValidationModel is defined for the tab in question
JavaScript
apache-2.0
fbladilo/manageiq,agrare/manageiq,durandom/manageiq,mkanoor/manageiq,borod108/manageiq,matobet/manageiq,NickLaMuro/manageiq,josejulio/manageiq,aufi/manageiq,maas-ufcg/manageiq,maas-ufcg/manageiq,d-m-u/manageiq,tinaafitz/manageiq,matobet/manageiq,mzazrivec/manageiq,kbrock/manageiq,ilackarms/manageiq,jvlcek/manageiq,roma...
93f2591b913d31cf6521812f1fed6969efe0401e
app/routes/course-materials.js
app/routes/course-materials.js
import Ember from 'ember'; import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; const { Route, RSVP } = Ember; const { Promise, all, map } = RSVP; export default Route.extend(AuthenticatedRouteMixin, { afterModel(course){ return all([ this.loadCourseLearhingMaterials(c...
import Ember from 'ember'; import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; const { Route, RSVP } = Ember; const { Promise, all, map } = RSVP; export default Route.extend(AuthenticatedRouteMixin, { afterModel(course){ return all([ this.loadCourseLearningMaterials(c...
Fix typo/miss spell in method names
Fix typo/miss spell in method names
JavaScript
mit
gboushey/frontend,ilios/frontend,jrjohnson/frontend,stopfstedt/frontend,dartajax/frontend,jrjohnson/frontend,dartajax/frontend,stopfstedt/frontend,ilios/frontend,djvoa12/frontend,gabycampagna/frontend,thecoolestguy/frontend,thecoolestguy/frontend,gboushey/frontend,djvoa12/frontend,gabycampagna/frontend
9a5eede1ae59e712eb17aec182af1468fd409a15
render.js
render.js
gRenderer = { frame: 0, render: function() { this.context.fillStyle = '#000'; this.context.fillRect(0, 0, this.context.canvas.width, this.context.canvas.height); switch (gScene.scene) { case 'title': gScene.renderTitle(); break; case 'hangar': case 'game': ...
gRenderer = { frame: 0, render: function() { this.context.fillStyle = '#000'; this.context.fillRect(0, 0, this.context.canvas.width, this.context.canvas.height); switch (gScene.scene) { case 'title': gScene.renderTitle(); break; case 'hangar': case 'game': ...
Increase gRenderer frame max to 240
Increase gRenderer frame max to 240
JavaScript
mit
peternatewood/shmup,peternatewood/shmup,peternatewood/shmup
cdf0bab5f02a914e51be806680e5c7252b873d76
plugins/meta.js
plugins/meta.js
const LifeforcePlugin = require("../utils/LifeforcePlugin.js"); const serverhostname = "http://localhost:16001"; //const serverhostname = "https://api.repkam09.com"; class MetaEndpoints extends LifeforcePlugin { constructor(restifyserver, logger, name) { super(restifyserver, logger, name); this.ap...
const LifeforcePlugin = require("../utils/LifeforcePlugin.js"); //const serverhostname = "http://localhost:16001"; const serverhostname = "https://api.repkam09.com"; class MetaEndpoints extends LifeforcePlugin { constructor(restifyserver, logger, name) { super(restifyserver, logger, name); this.ap...
Fix url to real production url
Fix url to real production url
JavaScript
mit
repkam09/repka-lifeforce,repkam09/repka-lifeforce,repkam09/repka-lifeforce
d9ff1a08d3c89cc88b7436ca97ffda589d322f82
test/retrieve.js
test/retrieve.js
'use strict'; var should = require('should'); var config = require('../config/configuration.js'); var retrieve = require('../lib/provider-google-drive/helpers/retrieve.js'); describe("Retrieve files", function () { it("should list files when no id passed and return the id of the last document", function(done) { ...
'use strict'; var should = require('should'); var config = require('../config/configuration.js'); var retrieve = require('../lib/provider-google-drive/helpers/retrieve.js'); describe("Retrieve files", function () { it("should list files when no id passed and return the id of the last document", function(done) { ...
Update to the new drive state
Update to the new drive state
JavaScript
mit
AnyFetch/gdrive-provider.anyfetch.com
9dd0b0983b9ae8cf45d9505494e0e0afad9094f7
oui.js
oui.js
#!/usr/bin/env node "use strict"; process.title = "oui"; var arg = process.argv[2], oui = require("./"), spin = require("char-spinner"); if (arg === "--update") { var interval = spin(); oui.update(true, function (err) { clearInterval(interval); if (err) process.stdout.write(err + "\...
#!/usr/bin/env node "use strict"; process.title = "oui"; var arg = process.argv[2], oui = require("./"), spin = require("char-spinner"); if (arg === "--update") { var interval = spin(); oui.update(true, function (err) { clearInterval(interval); if (err) process.stdout.write(err + "\...
Correct exit code on help
Correct exit code on help
JavaScript
bsd-2-clause
silverwind/oui
dd2ac1fb52cb9c154d0b9bf354fd22d250413d94
date.polyfill.js
date.polyfill.js
/** * Date.prototype.toISOString() * version 0.0.0 * Feature Chrome Firefox Internet Explorer Opera Safari Edge * Basic support 3 1 9 10.5 5 12 * ------------------------------------------------------------------------------- */ if (!Date.prototype.toISOString) { ...
/** * Date.prototype.toISOString() * version 0.0.0 * Feature Chrome Firefox Internet Explorer Opera Safari Edge * Basic support 3 1 9 10.5 5 12 * ------------------------------------------------------------------------------- */ if (!Date.prototype.toISOString) { ...
Define all Date toISOString properties with Object.defineProperty, using the descriptors configurable, writable and non-enumerable.
Define all Date toISOString properties with Object.defineProperty, using the descriptors configurable, writable and non-enumerable.
JavaScript
mit
uxitten/polyfill
df3f7f36a5dce3e85660106e79953facfd0c7555
assets/javascripts/p_slides.js
assets/javascripts/p_slides.js
$(".presentation").each(function() { var md = new Remarkable('full', { html: true }); var markup = md.render($(this).html()); var slides = markup.split('<hr>'); var new_document = []; for (var j = 0; j < slides.length; j++) new_document.push('<div class=slide>' + slides[j] + '</div>'); d...
$(".presentation").each(function() { var md = new Remarkable('full', { html: true//, // Here goes a real syntax highlighter //highlight: function (str, lang) { // return str; ...
Add workaround to introduce slightly better syntax highlighting.
Add workaround to introduce slightly better syntax highlighting.
JavaScript
agpl-3.0
munen/p_slides,munen/p_slides
7556ac4105736e6414933cc6bc928c696a625083
readFile.js
readFile.js
/** * Created by Kanthanarasimhaiah on 14/11/13. */ fs = require('fs'); var num_of_tasks; var total_time; var fileName = process.argv[2]; fs.readFile(fileName, 'utf8', function (err,data) { if (err) { return console.log(err); } //console.log(data); var input=data.split('\n'); var line1 ...
/** * Created by Kanthanarasimhaiah on 14/11/13. */ fs = require('fs'); function readTasks (file) { var data = fs.readFileSync(file, 'utf8'); var input=data.split('\n'); var line1 = input[0].split(' '); var num_of_tasks=parseInt(line1[0], 10); var total_time=parseInt(line1[1], 10); // read ...
Move task reading into a standalone function.
Move task reading into a standalone function. - Also, use readFileSync (synchronous).
JavaScript
mpl-2.0
kanaka/rbt_cfs
b6bc9e62d615242ef0eaa438d961d08a3ea9c72a
server/controllers/usersController.js
server/controllers/usersController.js
let UserRecipes = require(`${__dirname}/../schemas.js`).UserRecipes; module.exports = { signup: (req, res) => { }, login: (req, res) => { }, logout: (req, res) => { }, //Gets all the recipes that belong to that user getProfile: (req, res) => { UserRecipes.findOne({ username: req.params....
let UserRecipe = require(`${__dirname}/../schemas.js`).UserRecipe; module.exports = { signup: (req, res) => { }, login: (req, res) => { }, logout: (req, res) => { }, //Gets all the recipes that belong to that user getProfile: (req, res) => { UserRecipe.findOne({ username: req.params.use...
Remove 's' from UserRecipe(s) in user controller
Remove 's' from UserRecipe(s) in user controller
JavaScript
mit
JAC-Labs/SkilletHub,JAC-Labs/SkilletHub
8abac9363de638edb93bfd3e9744ccb78930aace
Honeybee/EventHandler.js
Honeybee/EventHandler.js
'use strict'; //Import events const events = require('events'); //Create EventHandler function class EventHandler extends events.EventEmitter { constructor() { super() } registered() { this.emit('registered') } request(callback) { this.emit('request', callback) } submit(data, callbac...
'use strict'; //Import events const events = require('events'); //Create EventHandler function class EventHandler extends events.EventEmitter { constructor() { super(); } registered() { this.emit('registered'); } request(callback) { this.emit('request', callback); } submit(data, call...
Fix conventional errors from previos commit
Fix conventional errors from previos commit
JavaScript
isc
Kurimizumi/Honeybee-Hive
76a4a74053b07d7fe6a1d98ee0271173dbc58cf8
App/data/CaretakerRolesGateway/index.js
App/data/CaretakerRolesGateway/index.js
/* Makes API calls to fetch caretaker roles. However, until there is an API to call, it returns canned data. */ export default class CaretakerRolesGateway { static allRoles = null; static getAll() { if(this.allRoles === null) { //api call to get roles this.allRoles = [ ...
/* Makes API calls to fetch caretaker roles. However, until there is an API to call, it returns canned data. */ const createCaretakerRolesGateway = () => { let allRoles = null; return { getAll: () => { if(allRoles === null) { //api call to get roles al...
Refactor CaretakerRolesGateway to use factory pattern
Refactor CaretakerRolesGateway to use factory pattern
JavaScript
mit
araneforseti/caretaker-app,araneforseti/caretaker-app,araneforseti/caretaker-app,araneforseti/caretaker-app
5fccae541140aa7d96be0566c97165cc84a6fd5f
to-title-case.js
to-title-case.js
/* * To Title Case 2.0 – http://individed.com/code/to-title-case/ * Copyright © 2008–2012 David Gouch. Licensed under the MIT License. */ String.prototype.toTitleCase = function() { var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|vs?\.?|via)$/i; return this.replace(/([^\W_]+[^\s-]*) *...
/* * To Title Case 2.0 – http://individed.com/code/to-title-case/ * Copyright © 2008–2012 David Gouch. Licensed under the MIT License. */ String.prototype.toTitleCase = function () { var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|vs?\.?|via)$/i; return this.replace(/([^\W_]+[^\s-]*) ...
Add space between anon function and parens.
Add space between anon function and parens.
JavaScript
mit
rvagg/titlecase,fiatjaf/titulo,gouch/to-title-case,rvagg/titlecase,SaintPeter/titlecase,SaintPeter/titlecase,gouch/to-title-case
d8867d259040ce0eb240ede3edf9fc15415b299e
.eslintrc.js
.eslintrc.js
module.exports = { "extends": "airbnb", "parser": "babel-eslint", "plugins": [ "react" ], "rules": { "react/prop-types": 0, "space-before-function-paren": [2, { "anonymous": "never", "named": "always" }] } };
module.exports = { "extends": "airbnb", "parser": "babel-eslint", "plugins": [ "react" ], "rules": { "react/prop-types": 0, "react/jsx-boolean-value": 0, "consistent-return": 0, "space-before-function-paren": [2, { "anonymous": "never", "named": "always" }] } };
Add react rules to eslint file
Add react rules to eslint file
JavaScript
mit
mersocarlin/react-webpack-template,mersocarlin/react-webpack-template
8f3ea6b47eb1f4d0265676527652c333c36a21ca
app/latexCommands.js
app/latexCommands.js
module.exports = [ { action: '\\sqrt', label: '\\sqrt{X}' }, { action: '^', label: 'x^{X}' }, { action: '\\frac', label: '\\frac{X}{X}' }, { action: '\\int', label: '\\int_{X}^{X}' }, { action: '\\lim_', label: '\\lim_{X}' }, { action: '\\overrightarrow', label: '\\overrightarrow{X}' }, { ac...
module.exports = [ { action: '\\sqrt', label: '\\sqrt{X}' }, { action: '^', label: 'x^{X}' }, { action: '\\frac', label: '\\frac{X}{X}' }, { action: '\\int', label: '\\int_{X}^{X}' }, { action: '\\lim_', label: '\\lim_{X}' }, { action: '\\overrightarrow', label: '\\overrightarrow{X}' }, { ac...
Remove problematic not tool from the equation toolbar;
Remove problematic not tool from the equation toolbar; \not is used in conjunction with other commands such as \equiv or \infty. Mathquill however does not support this and changes \not to \neg.
JavaScript
mit
digabi/rich-text-editor,digabi/math-editor,digabi/math-editor,digabi/rich-text-editor,digabi/rich-text-editor
2030607c7012d78233deb3882f94bdac1fb6aff2
routes/index.js
routes/index.js
const UserController = require('../src/Http/Controllers/User'); const { define, wrap, post, get } = require('spirit-router'); const { json } = require('body-parser'); const express = require('spirit-express'); module.exports = define('/api', [ get('/users', UserController.index), get('/users/:user_id', ['user_id...
const UserController = require('../src/Http/Controllers/User'); const { define, wrap, post, get, any, notFound } = require('spirit-router'); const { json } = require('body-parser'); const express = require('spirit-express'); const api = define('/api', [ get('/users', UserController.index), get('/users/:user_id',...
Add default not found route
feat: Add default not found route
JavaScript
mit
diogoazevedos/corpus,diogoazevedos/corpus
b69ee85c892ef3ff7a0542e3ce4a799051a1ea8a
services/web/src/main/ember/app/components/draggable-dropzone.js
services/web/src/main/ember/app/components/draggable-dropzone.js
import Ember from 'ember'; export default Ember.Component.extend({ classNames: ['draggable-dropzone'], classNameBindings: ['dragClass'], dragClass: 'deactivated', dragLeave: function(event) { event.preventDefault(); this.set('dragClass', 'deactivated'); }, dragOver: function(e...
import Ember from 'ember'; export default Ember.Component.extend({ classNames: ['draggable-dropzone'], classNameBindings: ['dragClass'], dragClass: 'deactivated', dragLeave: function(event) { event.preventDefault(); this.set('dragClass', 'deactivated'); }, dragOver: function(e...
Fix small issue with ember dropzone
Fix small issue with ember dropzone
JavaScript
agpl-3.0
MarSik/shelves,MarSik/shelves,MarSik/shelves,MarSik/shelves
212b6c3a0ffb9eb7595b3987fa77040cadd92054
.eslintrc.js
.eslintrc.js
module.exports = { extends: ["matrix-org"], plugins: [ "babel", ], env: { browser: true, node: true, }, rules: { "no-var": ["warn"], "prefer-rest-params": ["warn"], "prefer-spread": ["warn"], "one-var": ["warn"], "padded-blocks": [...
module.exports = { extends: ["matrix-org"], plugins: [ "babel", ], env: { browser: true, node: true, }, rules: { "no-var": ["warn"], "prefer-rest-params": ["warn"], "prefer-spread": ["warn"], "one-var": ["warn"], "padded-blocks": [...
Resolve linting errors after upgrades
Resolve linting errors after upgrades
JavaScript
apache-2.0
matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk
8a22be70adca8bd7dd632f07451b878515dcfd58
.eslintrc.js
.eslintrc.js
module.exports = { root: true, parser: 'babel-eslint', parserOptions: { sourceType: 'module' }, // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style extends: 'standard', plugins: [ 'html' // required to lint *.vue files ], // add your custom rules here 'rules...
module.exports = { root: true, parser: 'babel-eslint', parserOptions: { sourceType: 'module' }, // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style extends: 'standard', plugins: [ 'html' // required to lint *.vue files ], // add your custom rules here 'rules...
Update eslint rules to allow no-spaces between function name and argument parenthesis
Update eslint rules to allow no-spaces between function name and argument parenthesis
JavaScript
mit
cngu/vue-typer,cngu/vue-typer
f3ab92fb8626916d7824409c9b514854d28ab51e
www/js/Controllers/nearby.js
www/js/Controllers/nearby.js
angular.module('gitphaser') .controller('NearbyCtrl', NearbyCtrl); // @controller NearbyCtrl // @params: $scope, $reactive // @route: /tab/nearby // // Exposes Meteor mongo 'connections' to DOM, filtered against current user as 'transmitter' // Subscription to 'connections' is handled in the route resolve. Also /...
angular.module('gitphaser').controller('NearbyCtrl', NearbyCtrl); /** * Exposes Meteor mongo 'connections' to DOM, filtered against current user as 'transmitter' * Subscription to 'connections' is handled in the route resolve. Also * exposes GeoLocate service (for the maps view) and Notify service (to trigger not...
Test push after changing local remote
Test push after changing local remote
JavaScript
mit
git-phaser/git-phaser,git-phaser/git-phaser,git-phaser/git-phaser,git-phaser/git-phaser
d6b8f2f017d2f28854d51ff3210c734352b8ca6a
VotingApplication/VotingApplication.Web/Scripts/Controllers/CreateBasicPageController.js
VotingApplication/VotingApplication.Web/Scripts/Controllers/CreateBasicPageController.js
(function () { angular .module('GVA.Creation') .controller('CreateBasicPageController', ['$scope', 'AccountService', 'PollService', function ($scope, AccountService, PollService) { $scope.openLoginDialog = function () { AccountService.openLoginDialog($scope); ...
(function () { angular .module('GVA.Creation') .controller('CreateBasicPageController', ['$scope', 'AccountService', 'PollService', function ($scope, AccountService, PollService) { $scope.openLoginDialog = function () { AccountService.openLoginDialog($scope); ...
Fix redirect after poll creation
Fix redirect after poll creation Redirect to /#/Manage/<ManageId> rather than /Manage/<ManageId>
JavaScript
apache-2.0
Generic-Voting-Application/voting-application,stevenhillcox/voting-application,JDawes-ScottLogic/voting-application,JDawes-ScottLogic/voting-application,tpkelly/voting-application,JDawes-ScottLogic/voting-application,tpkelly/voting-application,Generic-Voting-Application/voting-application,stevenhillcox/voting-applicati...
1883460122f4690d84f673ef083d23b95f3abcd5
app/student.front.js
app/student.front.js
const $answer = $('.answer') const {makeRichText} = require('./math-editor') const save = ($elem, async = true) => $.post({ url: '/save', data: {text: $elem.html(), answerId: $elem.attr('id')}, async }) function saveScreenshot(questionId) { return ({data, type, id}) => { return $.post({ ...
const $answer = $('.answer') const {makeRichText} = require('./math-editor') const save = ($elem, async = true) => $.post({ url: '/save', data: {text: $elem.html(), answerId: $elem.attr('id')}, async }) function saveScreenshot(questionId) { return ({data, type, id}) => { return $.post({ ...
Set focus automatically to first field
Set focus automatically to first field
JavaScript
mit
digabi/rich-text-editor,digabi/rich-text-editor,digabi/rich-text-editor,digabi/math-editor,digabi/math-editor
7dfbb87add262139525d9981f6024a46bbc52190
src/jupyter_contrib_nbextensions/nbextensions/export_embedded/main.js
src/jupyter_contrib_nbextensions/nbextensions/export_embedded/main.js
// toggle display of all code cells' inputs define([ 'jquery', 'base/js/namespace', 'base/js/events' ], function( $, Jupyter, events ) { "use strict"; function initialize () { console.log("Embedded HTML Exporter loaded!"); } var load_ipython_extension = function() { ...
// toggle display of all code cells' inputs define([ 'jquery', 'base/js/namespace', 'base/js/events' ], function( $, Jupyter, events ) { "use strict"; function initialize () { } var load_ipython_extension = function() { /* Add an entry in the download menu */ ...
Remove Button, only in Download Menu
Remove Button, only in Download Menu
JavaScript
bsd-3-clause
ipython-contrib/IPython-notebook-extensions,jcb91/IPython-notebook-extensions,juhasch/IPython-notebook-extensions,ipython-contrib/IPython-notebook-extensions,jcb91/IPython-notebook-extensions,jcb91/IPython-notebook-extensions,ipython-contrib/IPython-notebook-extensions,ipython-contrib/IPython-notebook-extensions,juhasc...
86de60799199c39949c6f862997752c688572c91
src/apps/contacts/middleware/interactions.js
src/apps/contacts/middleware/interactions.js
const { getContact } = require('../../contacts/repos') function setInteractionsDetails (req, res, next) { res.locals.interactions = { returnLink: `/contacts/${req.params.contactId}/interactions/`, entityName: `${res.locals.contact.first_name} ${res.locals.contact.last_name}`, query: { contacts_id: req.pa...
const { getContact } = require('../../contacts/repos') function setInteractionsDetails (req, res, next) { res.locals.interactions = { returnLink: `/contacts/${req.params.contactId}/interactions/`, entityName: `${res.locals.contact.first_name} ${res.locals.contact.last_name}`, query: { contacts__id: req.p...
Add missing underscore on query param to contacts
Add missing underscore on query param to contacts
JavaScript
mit
uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend
ca0425c4149e8a3dd736abef6a13967d8d656f20
src/audits/UnfocusableElementsWithOnClick.js
src/audits/UnfocusableElementsWithOnClick.js
// Copyright 2012 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
// Copyright 2012 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
Check all elements, not just [span, div, img], for unfocusableElementsWithOnClick
Check all elements, not just [span, div, img], for unfocusableElementsWithOnClick
JavaScript
apache-2.0
japacible/accessibility-developer-tools-extension,modulexcite/accessibility-developer-tools,alice/accessibility-developer-tools,modulexcite/accessibility-developer-tools-extension,ckundo/accessibility-developer-tools,modulexcite/accessibility-developer-tools-extension,kublaj/accessibility-developer-tools,GoogleChrome/a...
8f5dda30829b7439f0fc49d8e1fe86623980dc3b
dev/grunt/postcss.js
dev/grunt/postcss.js
module.exports = { options: { map: true, // inline sourcemaps processors: [ require('pixrem')(), // add fallbacks for rem units require('autoprefixer-core')({ // add vendor prefixes browsers: [ 'last 3 version', 'ie 8', 'ff 3.6', ...
module.exports = { options: { map: true, // inline sourcemaps processors: [ require('pixrem')(), // add fallbacks for rem units require('autoprefixer-core')({ // add vendor prefixes browsers: [ 'last 3 version', 'ie 8', 'ff 3.6', ...
Disable not-safe PostCSS value conversions
Disable not-safe PostCSS value conversions
JavaScript
mit
ideus-team/html-framework,ideus-team/html-framework
6cdb0bf0cb4872dae918175851b1fec4341bfb97
violet/violet.js
violet/violet.js
#!/usr/bin/env node var ncp = require('ncp').ncp; var path = require('path'); require('yargs') .usage('$0 <cmd> [args]') .option('directory', { alias: 'd', describe: 'Provide the directory to install Violet to' }) .command('install', 'Install violet', {}, function (argv) { var ...
#!/usr/bin/env node var ncp = require('ncp').ncp; var path = require('path'); var fs = require('fs'); require('yargs') .usage('$0 <cmd> [args]') .option('directory', { alias: 'd', describe: 'Provide the directory to install Violet to' }) .command('install', 'Install Violet', {}, functi...
Add update fucntion to CLI
Add update fucntion to CLI
JavaScript
mit
Lexteam/lexteam.github.io,Lexteam/lexteam.github.io,Lexteam/lexteam.github.io
482508f2927d05f2be0c58b20d7f9acd35606bc4
scripts/docs.js
scripts/docs.js
#!/usr/bin/env node var _ = require('lodash'); var docdown = require('docdown'); var fs = require('fs'); var path = require('path'); var srcPath = path.join(__dirname, '../src'); var outPath = path.join(__dirname, '../docs'); // Define which files to scan var sourceFiles = [ 'tree.js', 'treenode.js', 'tre...
#!/usr/bin/env node var _ = require('lodash'); var docdown = require('docdown'); var fs = require('fs'); var path = require('path'); var srcPath = path.join(__dirname, '../src'); var outPath = path.join(__dirname, '../docs'); // Define which files to scan var sourceFiles = [ 'tree.js', 'treenode.js', 'tre...
Set docdown style to github.
Set docdown style to github. [ci skip]
JavaScript
mit
helion3/inspire-tree,helion3/inspire-tree
70fab2cf5426def9114bdd40727f4a72593df9e4
src/core.js
src/core.js
(function(global) { 'use strict'; define([ ], function() { // $HEADER$ /** * This will be the <code>warmsea</code> namespace. * @namespace * @alias warmsea */ var w = _.extend({}, _); /** * The unmodified underlying underscore object. */ w._ = w.underscore = _; ...
(function(global) { 'use strict'; define([ ], function() { // $HEADER$ /** * This will be the <code>warmsea</code> namespace. * @namespace * @alias warmsea */ var w = _.extend({}, _); /** * The unmodified underlying underscore object. */ w._ = w.underscore = _; ...
Format support for w.error() if possible.
Format support for w.error() if possible.
JavaScript
mit
warmsea/WarmseaJS
a0bd12dab161141e958e5d437694a7b22283fe8f
routes/index.js
routes/index.js
/* * Module dependencies */ var app = module.parent.exports, Joiner = require('../libs/joiner').Joiner; /* * Middlewares */ function isAnotherFile (req, res, next) { var folder = req.params.version; if (folder === 'assets' || folder === 'vendor' || folder === 'test' || folder === 'libs') { next('route'); }...
/* * Module dependencies */ var app = module.parent.exports, Joiner = require('../libs/joiner').Joiner; /* * Middlewares */ function isAnotherFile (req, res, next) { var folder = req.params.version; if (folder === 'assets' || folder === 'vendor' || folder === 'test' || folder === 'libs') { next('route'); }...
Change the min feature to a parameter as ?min=true to get data form joiner.
Change the min feature to a parameter as ?min=true to get data form joiner.
JavaScript
mit
amireynoso/uxtest,vrleonel/ml-test,atma/chico,mercadolibre/chico,amireynoso/uxtest,vrleonel/chico,vrleonel/chico,vrleonel/ml-test,mercadolibre/chico,atma/chico
70f456cc5409b296cfe481c16614c6444f88b69b
lib/actions/clean-cache.js
lib/actions/clean-cache.js
'use babel'; import yarnExec from '../yarn/exec'; import reportError from '../report-error'; const cleanCache = async () => { const success = await yarnExec(null, 'cache', ['clean']); if (!success) { atom.notifications.addError( 'An error occurred whilst cleaning cache. See output for more information....
'use babel'; import yarnExec from '../yarn/exec'; import reportError from '../report-error'; import addProgressNotification from '../add-progress-notification'; const cleanCache = async () => { let progress; const options = { onStart: () => { progress = addProgressNotification('Cleaning global package ...
Add progress notification to clean cache command
Add progress notification to clean cache command
JavaScript
mit
cbovis/atom-yarn
1c7c0d1635747f12b82c202155045958907ec0c6
tests/unit/src/defur.js
tests/unit/src/defur.js
(function() { var defur = require('../../../src/defur'); var assert = require('chai').assert; suite('defur:', function() { var services = null; setup(function() { services = {}; }); test('`defur` is a function', function() { assert.isFunction(defur...
(function() { var defur = require('../../../src/defur'); var assert = require('chai').assert; suite('defur:', function() { var services = null; setup(function() { services = {}; }); test('`defur` is a function', function() { assert.isFunction(defur...
Add test to cover container collisions
Add test to cover container collisions
JavaScript
mit
adlawson/js-defur,adlawson/js-defur
c4e58fda577b4f7f9165a788df9204d2646d26a3
lib/ext/patch-ember-app.js
lib/ext/patch-ember-app.js
/** * Monkeypatches the EmberApp instance from Ember CLI to contain the hooks we * need to filter environment-specific initializers. Hopefully we can upstream * similar hooks to Ember CLI and eventually remove these patches. */ function patchEmberApp(emberApp) { // App was already patched if (emberApp.addonPrec...
/** * Monkeypatches the EmberApp instance from Ember CLI to contain the hooks we * need to filter environment-specific initializers. Hopefully we can upstream * similar hooks to Ember CLI and eventually remove these patches. */ function patchEmberApp(emberApp) { // App was already patched if (emberApp.addonPrec...
Fix deprecation warning in for using EmberApp.concatFiles
Fix deprecation warning in for using EmberApp.concatFiles
JavaScript
mit
tildeio/ember-cli-fastboot,rwjblue/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot,kratiahuja/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot,kratiahuja/ember-cli-fastboot,josemarluedke/ember-cli-fastboot,tildeio/ember-cli-fastboot,rwjblue/ember-cli-fastboot,josemarluedke/ember-cli-fastboot
520b14ea01edc333dff77bf0822729be2ae14d1d
step-capstone/src/Components/TravelObject.js
step-capstone/src/Components/TravelObject.js
import React from 'react' export default function TravelObject(props) { let content = null; switch(props.type) { case 'event': content = <div>Event!</div>; break; case 'flight': content = <div>Flight!</div> break; case 'hotel': ...
import React from 'react' import Flight from './Flight' export default function TravelObject(props) { let content = null; switch(props.type) { case 'event': content = <div>Event!</div>; break; case 'flight': content = <Flight /> break; cas...
Replace dummy code for flight case with flight component
Replace dummy code for flight case with flight component
JavaScript
apache-2.0
googleinterns/step98-2020,googleinterns/step98-2020
fd1791e92808b2e5b8cf69fc4af7c2a780c76a0d
gulp/config.js
gulp/config.js
var historyApiFallback = require("connect-history-api-fallback"); var dest = "./build"; var src = './src'; module.exports = { browserSync: { server: { // Serve up our build folder baseDir: dest, middleware: [historyApiFallback()] } }, js: { src...
var historyApiFallback = require("connect-history-api-fallback"); var dest = "./build"; var src = './src'; module.exports = { browserSync: { server: { // Serve up our build folder baseDir: dest, middleware: [historyApiFallback()] } }, js: { src...
Add debug.html to build script
Add debug.html to build script
JavaScript
apache-2.0
coolcrowd/worker-ui,coolcrowd/worker-ui
304b03a879b0b427214b90e7ae9f0d576876e954
app/javascript/app/utils/redux.js
app/javascript/app/utils/redux.js
import isFunction from 'lodash/isFunction'; import { createAction as CA, handleActions as handle } from 'redux-actions'; // matches action names with reducers and returns an object to // be used with handleActions // passes all state as a third argument export const bindActionsToReducers = (actions, reducerList, appSt...
import isFunction from 'lodash/isFunction'; import { createAction as CA, handleActions as handle } from 'redux-actions'; // matches action names with reducers and returns an object to // be used with handleActions // passes all state as a third argument export const bindActionsToReducers = (actions, reducerList) => ...
Stop passing all store in each action
Stop passing all store in each action
JavaScript
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
e3b80778bf188ac19ab4d698621864d52819085f
app/js/util/arethusa_generator.js
app/js/util/arethusa_generator.js
"use strict"; // Generators for Arethusa code for things such as // - useful directives function ArethusaGenerator() { this.panelTrigger = function panelTrigger(service, trsl, trslKey, template) { return { restrict: 'A', link: function(scope, element, attrs) { function toggle() { s...
"use strict"; // Generators for Arethusa code for things such as // - useful directives function ArethusaGenerator() { this.panelTrigger = function panelTrigger(service, trsl, trslKey, template) { return { restrict: 'A', compile: function(element) { var parent = element.parent(); fu...
Refactor panel triggers for speed
Refactor panel triggers for speed
JavaScript
mit
latin-language-toolkit/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,Masoumeh/arethusa
d2f251b8a375ab011688d740113b8c09c79c5612
src/ex.js
src/ex.js
import _ from "lodash"; import jQuery from "jquery"; import moment from "moment"; import Config from "./config.js"; import DText from "./dtext.js"; import Tag from "./tag.js"; import UI from "./ui.js"; import "./danbooru-ex.css"; export default class EX { static get Config() { return Config; } static get DTe...
import _ from "lodash"; import jQuery from "jquery"; import moment from "moment"; import Config from "./config.js"; import DText from "./dtext.js"; import Tag from "./tag.js"; import UI from "./ui.js"; import "./danbooru-ex.css"; export default class EX { static get Config() { return Config; } static get DTe...
Make moment global for debugging.
[fix] Make moment global for debugging.
JavaScript
mit
evazion/danbooru-ex,evazion/danbooru-ex
0ae0be0b2a0124d19c73f3d1814d92470b1f4960
src/send.js
src/send.js
import { busy, scheduleRetry } from './actions'; import { JS_ERROR } from './constants'; import type { Config, OfflineAction, ResultAction } from './types'; const complete = ( action: ResultAction, success: boolean, payload: {} ): ResultAction => ({ ...action, payload, meta: { ...action.meta, success, comp...
import { busy, scheduleRetry } from './actions'; import { JS_ERROR } from './constants'; import type { Config, OfflineAction, ResultAction } from './types'; const complete = ( action: ResultAction, success: boolean, payload: {} ): ResultAction => ({ ...action, payload, meta: { ...action.meta, success, comp...
Add offline action to default commit and rollback actions
Add offline action to default commit and rollback actions
JavaScript
mit
redux-offline/redux-offline,jevakallio/redux-offline
7f68b7980f1af0e5e2ac8f19022bb3b2e71675cb
src/api/link.js
src/api/link.js
import props from './props'; function getValue (elem) { const type = elem.type; if (type === 'checkbox' || type === 'radio') { return elem.checked ? elem.value || true : false; } return elem.value; } export default function (elem, target) { return (e) => { // We fallback to checking the composed pat...
import props from './props'; function getValue (elem) { const type = elem.type; if (type === 'checkbox' || type === 'radio') { return elem.checked ? elem.value || true : false; } return elem.value; } export default function (elem, target) { return (e) => { // We fallback to checking the composed pat...
Fix issue only exposed by certain situations with the shadydom polyfill.
fix: Fix issue only exposed by certain situations with the shadydom polyfill.
JavaScript
mit
chrisdarroch/skatejs,skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs
7de0c1782ac690461693aa308364ac3aa996712a
tests/e2e/utils/activate-amp-and-set-mode.js
tests/e2e/utils/activate-amp-and-set-mode.js
/** * WordPress dependencies */ import { activatePlugin, visitAdminPage } from '@wordpress/e2e-test-utils'; /** * The allow list of AMP modes. * */ export const allowedAmpModes = { standard: 'standard', transitional: 'transitional', reader: 'disabled', }; /** * Activate AMP and set it to the correct mode. ...
/** * WordPress dependencies */ import { activatePlugin, visitAdminPage } from '@wordpress/e2e-test-utils'; /** * The allow list of AMP modes. * */ export const allowedAmpModes = { standard: 'standard', transitional: 'transitional', reader: 'disabled', }; /** * Activate AMP and set it to the correct mode. ...
Add helper to change AMP mode.
Add helper to change AMP mode.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
41460b6e776e8d3b6cac28c63a4ce4b73541fb27
require-best.js
require-best.js
module.exports = function(moduleName) { var majorVersion = parseInt(process.version.match(/^v(\d+)/) || [])[1] if (majorVersion >= 8) { return require('./src/' + moduleName) } else { return require('./node6/' + moduleName) } }
module.exports = function(moduleName) { var majorVersion = parseInt((process.version.match(/^v(\d+)/) || [])[1]) if (majorVersion >= 8) { return require('./src/' + moduleName) } else { return require('./node6/' + moduleName) } }
Fix using "native" code on node 8+
Fix using "native" code on node 8+
JavaScript
mit
BaronaGroup/migsi,BaronaGroup/migsi
dc390d2733adb5c57866626125a04f1a6e9b5da3
js/cooldown.js
js/cooldown.js
var seconds_match = /^(\d)*s$/; function Cooldown(frames) { frames = frames || 10 if ($.type(frames) == "string") { var seconds = frames.match(seconds_match) if (seconds) { frames = seconds[1] * runtime.fps } else { frames = parseInt(frames) } ...
var seconds_match = /^(\d)*s$/; function Cooldown(frames, inital_result) { frames = frames || 10 if ($.type(frames) == "string") { var seconds = frames.match(seconds_match) if (seconds) { frames = seconds[1] * runtime.fps } else { frames = parseInt(f...
Add a shortcut to set the result function in Cooldown
Add a shortcut to set the result function in Cooldown
JavaScript
artistic-2.0
atrodo/fission_engine,atrodo/fission_engine
1d6be34ff63350aa3e3c0cdeb163d653bec307dc
js/services.js
js/services.js
angular.module('services', []) .filter('file', function () { return function (input) { return input.split(' ').join('_').toLowerCase() } }) .factory('responsive', function () { var resizeTimer return { run: function (apply, main, input, output) { main(input, output) $(window).on('re...
angular.module('services', []) .directive('done', ['$parse', function($parse) { return { restrict: 'A', link: function(scope, element, attrs) { var fn = $parse(attrs.done) if (scope.$last){ scope.done() } } } }]) .filter('file', function () { return function (input) { ...
Add filter/directives for about page
Add filter/directives for about page
JavaScript
mit
Cwejman/martina,Cwejman/martina
6594bafa373173d987271d51833bcbb45ea4cda1
js/settings.js
js/settings.js
var possibleStates = [ 'P,Pipeline', 'R,Request Evaluation', 'Rm,Requirements', 'C,Concept', 'D,Development', 'Dy,Deployment', 'L,Live' ]; var possible_colors = 4;
var possibleStates = [ 'B,Backlog', 'P,Pending ', 'Cs,Current Sprint', 'D,Doing', 'Bl,Blocked', 'Q,QA', 'L,Live' ]; var possible_colors = 4;
Set up more common Kanban columns
Set up more common Kanban columns
JavaScript
mit
rapsli/simple-kanban,rapsli/simple-kanban
5de4f9dde7d1100e4db600c55748278c003df004
lib/profile.js
lib/profile.js
/** * Parse profile. * * @param {Object|String} json * @return {Object} * @api private */ exports.parse = function(json) { if ('string' == typeof json) { json = JSON.parse(json); } var profile = {}; profile.id = json.iupi; profile.email = json.email; return profile; };
/** * Parse profile. * * @param {Object|String} json * @return {Object} * @api private */ exports.parse = function(json) { if ('string' === typeof json) { json = JSON.parse(json); } var profile = {}; profile.id = json.iupi; profile.email = json.email; return profile; };
Improve code quality by change '==' into '==='
Improve code quality by change '==' into '==='
JavaScript
mit
poliveira89/passport-identityua,poliveira89/passport-identityua
a3aff6a41a08614ba68fb590aefbc6e2cb5067a4
routers/download/constants.js
routers/download/constants.js
const ALLOWED_CSV_FIELD_PATHS = [ 'ids.GB-CHC', 'ids.charityId', 'name', 'contact.email', 'contact.person', 'contact.postcode', 'contact.address', 'contact.geo.longitude', 'contact.geo.latitude', 'people.volunteers', 'people.employees', 'people.trustees', 'activities', 'website', 'income.a...
const ALLOWED_CSV_FIELD_PATHS = [ 'ids.GB-CHC', 'ids.charityId', 'name', 'contact.address', 'contact.email', 'contact.geo.latitude', 'contact.geo.longitude', 'contact.person', 'contact.phone', 'contact.postcode', 'people.volunteers', 'people.employees', 'people.trustees', 'activities', 'we...
Allow downloading objectives & phone
Allow downloading objectives & phone
JavaScript
mit
tithebarn/charity-base,tithebarn/open-charities,tythe-org/charity-base-api
3cd2d32ca72775777962a912fe539cbb540274b0
delay.safariextension/start.js
delay.safariextension/start.js
(function () { "use strict"; var settings, display; if (window !== window.top) { return; } safari.self.tab.dispatchMessage('getSettings'); safari.self.addEventListener('message', function (event) { if (event.name === 'settings') { settings = event.message; ...
(function () { "use strict"; var settings, visibility; if (window !== window.top) { return; } safari.self.tab.dispatchMessage('getSettings'); safari.self.addEventListener('message', function (event) { if (event.name === 'settings') { settings = event.message; ...
Switch from "display:none" to "visibility:hidden".
Switch from "display:none" to "visibility:hidden". That way the page layout won't be affected but it will still be hidden.
JavaScript
mit
tfausak/delay
1200f59759531802d41cf1674d0a22ccaec21ca8
examples/src/examples/YearCalendar.js
examples/src/examples/YearCalendar.js
import React from 'react'; import DayPicker from '../../../src'; import '../../../src/style.css'; import '../styles/year.css'; export default class YearCalendar extends React.Component { constructor(props) { super(props); this.showPrevious = this.showPrevious.bind(this); this.showNext = this.showNext.b...
import React from 'react'; import DayPicker from '../../../src'; import '../../../src/style.css'; import '../styles/year.css'; export default class YearCalendar extends React.Component { constructor(props) { super(props); this.showPrevious = this.showPrevious.bind(this); this.showNext = this.showNext.b...
Use month instead of initialMonth
Use month instead of initialMonth
JavaScript
mit
saenglert/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker
cbd505bf2749c62d6baba3e9278a92143b1fc255
example/build.js
example/build.js
var thumbsup = require('../src/index'); thumbsup.build({ // the input folder // with all photos/videos input: 'example/media', // the output folder // for the thumbnails and static pages output: 'example/website', // website title // the first word will be in color title: 'Photo gallery', // m...
var thumbsup = require('../src/index'); thumbsup.build({ // the input folder // with all photos/videos input: 'example/media', // the output folder // for the thumbnails and static pages output: '_site', // website title // the first word will be in color title: 'Photo gallery', // main site c...
Build the example site into _site (published as Github pages)
Build the example site into _site (published as Github pages)
JavaScript
mit
kremlinkev/thumbsup,thumbsup/node-thumbsup,dravenst/thumbsup,rprieto/thumbsup,dravenst/thumbsup,thumbsup/thumbsup,kremlinkev/thumbsup,thumbsup/thumbsup,thumbsup/node-thumbsup,rprieto/thumbsup,thumbsup/node-thumbsup
c5b6ac00c1d05bc69f4dcbd9f999baf43421f0fe
tasks/styles.js
tasks/styles.js
'use strict'; var sass = require('gulp-sass'); var bourbon = require('node-bourbon'); var rev = require('gulp-rev'); var minify = require('gulp-minify-css'); /* compile sass with bourbon */ module.exports = function (stream) { return stream .pipe(sass({ includePaths: bourbon.includePaths })) ...
'use strict'; var sass = require('gulp-sass'); var bourbon = require('node-bourbon'); var rev = require('gulp-rev'); var minify = require('gulp-minify-css'); var env = require('../utils/env'); var manifest = require('../utils/manifest'); /* compile sass with bourbon */ module.exports = function (str...
Add CSS to asset manifest
Add CSS to asset manifest
JavaScript
mit
bendrucker/gulp-tasks
4a92a6850aa2827cf3d7adf6be530c5329582018
app/assets/javascripts/icons.js
app/assets/javascripts/icons.js
$(document).ready(function() { // Bind both change() and keyup() in the icon keyword dropdown because Firefox doesn't // respect up/down key selections in a dropdown as a valid change() trigger $("#icon_dropdown").change(function() { setIconFromId($(this).val()); }); $("#icon_dropdown").keyup(function() { setIc...
$(document).ready(function() { // Bind both change() and keyup() in the icon keyword dropdown because Firefox doesn't // respect up/down key selections in a dropdown as a valid change() trigger $("#icon_dropdown").change(function() { setIconFromId($(this).val()); }); $("#icon_dropdown").keyup(function() { setIc...
Make sure to reset alias when switching between characters if the new one has no alias
Make sure to reset alias when switching between characters if the new one has no alias
JavaScript
mit
Marri/glowfic,Marri/glowfic,Marri/glowfic,Marri/glowfic
18264d202fb2a48c3f8952246708af1b5e941fbf
app/assets/javascripts/icons.js
app/assets/javascripts/icons.js
/* global gon */ $(document).ready(function() { // Bind both change() and keyup() in the icon keyword dropdown because Firefox doesn't // respect up/down key selections in a dropdown as a valid change() trigger $("#icon_dropdown").change(function() { setIconFromId($(this).val()); }); $("#icon_dropdown").keyup(f...
/* global gon */ $(document).ready(function() { // Bind both change() and keyup() in the icon keyword dropdown because Firefox doesn't // respect up/down key selections in a dropdown as a valid change() trigger $("#icon_dropdown").change(function() { setIconFromId($(this).val()); }); $("#icon_dropdown").keyup(f...
Remove dead duplicate code for gallery minmax
Remove dead duplicate code for gallery minmax
JavaScript
mit
Marri/glowfic,Marri/glowfic,Marri/glowfic,Marri/glowfic
bd223902c3d3f4bc07257ec4c49a540cfd654a95
test/feature.js
test/feature.js
var assert = require('assert'); var Feature = require('../feature'); describe('Feature', function () { describe('schema', function () { it('successfully creates a valid document'); it('fails at creating an invalid document'); }); describe('.search()', function () { it('performs an empty search, retu...
var assert = require('assert'); var seeds = require('../seeds'); var Feature = require('../feature'); describe('Feature', function () { before(function (done) { seeds(done); }); describe('schema', function () { it('successfully creates a valid document'); it('fails at creating an invalid document');...
Use the database seeds from the Feature spec
Use the database seeds from the Feature spec
JavaScript
mit
nickmccurdy/rose,nicolasmccurdy/rose,nicolasmccurdy/rose,nickmccurdy/rose