commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
2a6d98dd0f760c658f85c1895c6897459e163d34
server/operations.js
server/operations.js
// Dependencies var CaptchaPng = require("captchapng"); // Sessions var sessions = {}; // Captcha configuration var serverConfig = { width: 100, height: 30 }; // Get configuration M.emit("captcha.getConfig", function (c) { serverConfig = c; }); // Verify captcha M.on("captcha.verify", function (link, an...
// Dependencies var CaptchaPng = require("captchapng"); // Sessions var sessions = {}; // Captcha configuration var serverConfig = { width: 100, height: 30 }; // Get configuration M.emit("captcha.getConfig", function (c) { serverConfig = c; }); // Verify captcha M.on("captcha.verify", function (link, an...
Set the number in sessions and correclty compare the values
Set the number in sessions and correclty compare the values
JavaScript
mit
jillix/captcha
5b30b5ffb799634af6b5b2157b5035169cea0ab3
src/components/Nav.js
src/components/Nav.js
import React from 'react'; import { Link } from 'react-router-dom'; import { Navbar, Nav, NavItem } from 'react-bootstrap'; const Navigation = (props) => { return ( <Navbar fixedTop={true}> <Navbar.Header> <Navbar.Brand> <Link to="/"> Recipeas </Link> </Navba...
import React from 'react'; import { Link } from 'react-router-dom'; import { Navbar, Nav, NavItem } from 'react-bootstrap'; const Navigation = (props) => { return ( <Navbar> <Navbar.Header> <Navbar.Brand> <Link to="/"> Recipeas </Link> </Navbar.Brand> ...
Change navbar to be static at top of app.
Change navbar to be static at top of app.
JavaScript
mit
phuchle/recipeas,phuchle/recipeas
0258270487af31b8d334dfa86fc1f630296f3ad0
examples/basic/http.js
examples/basic/http.js
var ntf = require('../../lib/ntf') , test = ntf.http.test(exports, 'https://github.com') test.get('ntf project page', '/silas/ntf', function(test, res) { test.statusCode(res, 200) test.body(res, /<title>.*ntf.*<\/title>/) test.done() })
var ntf = require('../../lib/ntf') , test = ntf.http.test(exports, 'https://github.com') test.get('ntf project page', '/silas/ntf', function(test, res) { test.statusCode(res, 200) test.header(res, 'Server', /nginx\/[\d.]+/) test.body(res, 'ntf') test.done() })
Add header check to example
Add header check to example
JavaScript
mit
shutterstock/ntf
a83514a899ec021144dd1c5f1c207eb4a05e46b4
src/text/TextItem.js
src/text/TextItem.js
/* * Paper.js * * This file is part of Paper.js, a JavaScript Vector Graphics Library, * based on Scriptographer.org and designed to be largely API compatible. * http://paperjs.org/ * http://scriptographer.org/ * * Distributed under the MIT license. See LICENSE file for details. * * Copyright (c) 2011, Juerg ...
/* * Paper.js * * This file is part of Paper.js, a JavaScript Vector Graphics Library, * based on Scriptographer.org and designed to be largely API compatible. * http://paperjs.org/ * http://scriptographer.org/ * * Distributed under the MIT license. See LICENSE file for details. * * Copyright (c) 2011, Juerg ...
Remove unused code that seems to stem from PointText.
Remove unused code that seems to stem from PointText.
JavaScript
mit
0/paper.js,NHQ/paper,NHQ/paper,0/paper.js
23a8e6c590b9757477423bd4945197761bde3885
packages/rockthatclub/lib/callbacks.js
packages/rockthatclub/lib/callbacks.js
/* Let's add a callback to the new post method that appends a random emoji to the newly submitted post's title. */ import { addCallback } from 'meteor/vulcan:core'; function PostsNewAddRandomEmoji (post, user) { post.title = post.title + " " +_.sample(["🎉", "💎", "☠", "⏱", "🎈", "⛱"]) return post; } // addCallba...
/* Let's add a callback to the new post method that appends a random emoji to the newly submitted post's title. */ import { addCallback } from 'meteor/vulcan:core'; function PostsNewAddRandomEmoji (post, user) { post.title = post.title + " " +_.sample(["🎉", "💎", "☠", "⏱", "🎈", "⛱"]) return post; } // addCallba...
Sort posts by descending postedAt
:guitar: Sort posts by descending postedAt
JavaScript
mit
willclarktech/rockthat.club,willclarktech/rockthat.club,willclarktech/rockthat.club
7cc2f81866b168379317f6cf9821efdbc0407eac
app/lib/draw-obstacles.js
app/lib/draw-obstacles.js
var drawObstacles = function(obstacles, skier, obstaclesImg, increasedSpeed, speedBoost) { for (var i = 0; i < obstacles.length; i++) { if (skier.jumping === true) { speedBoost = 2; } else { speedBoost = 0; } if (skier.crashed === false) { obstacles[i].go(obstaclesImg, increasedSpeed...
var drawObstacles = function(obstacles, skier, obstaclesImg, increasedSpeed, speedBoost) { for (var i = 0; i < obstacles.length; i++) { if (skier.jumping === true) { speedBoost = 2; } else { speedBoost = 0; } obstacleCreation(skier, obstacles, i, obstaclesImg, increasedSpeed, speedBoost); ...
Add minor refactoring to the drawing of objects.
Add minor refactoring to the drawing of objects.
JavaScript
mit
jbrr/ski-free-test,jbrr/ski-free,jbrr/ski-free-test,jbrr/ski-free
cfa162b83303ed359c04977d602b03c79102f5fc
acg/acg-disp.js
acg/acg-disp.js
var acg = acg || {}; var cc = cc || {}; acg.bootstrap = function (elem, callback) { 'use strict'; cc.game.onStart = function () { cc.view.adjustViewPort(true); if (cc.sys.isMobile) { cc.view.setDesignResolutionSize(480, 320, cc.ResolutionPolicy.FIXED_WIDTH); } else { ...
var acg = acg || {}; var cc = cc || {}; acg.bootstrap = function (elem, aspect_ratio, callback) { 'use strict'; cc.game.onStart = function () { cc.view.adjustViewPort(true); cc.view.setDesignResolutionSize(320 * aspect_ratio, 320, cc.ResolutionPolicy.SHOW_ALL); cc.view.resizeWithBrowser...
Fix aspect ratio and add an option to change it
Fix aspect ratio and add an option to change it Fixed: The canvas fills the whole browser on mobile phones.
JavaScript
mit
hhjvi/acg.js,hhjvi/acg.js
f75e24bf62586a045cbbd02840df40a5f9937d6a
test/karma.config.js
test/karma.config.js
const serverEndpoints = require('./server') module.exports = function(config) { config.set({ basePath: '..', frameworks: ['mocha', 'chai'], client: { mocha: { ui: 'tdd' } }, files: ['dist/fetch.umd.js', 'test/test.js'], reporters: ['progress'], port: 9876, colors: ...
const serverEndpoints = require('./server') module.exports = function(config) { config.set({ basePath: '..', frameworks: ['mocha', 'chai'], client: { mocha: { ui: 'tdd' } }, files: [ 'node_modules/promise-polyfill/promise.js', 'node_modules/abortcontroller-polyfill...
Load polyfills for testing older browsers
Load polyfills for testing older browsers
JavaScript
mit
github/fetch,aleclarson/fetch
27d6db442b351f35bbed04ffac8e6c894b6b5a4f
app/containers/settings/GpsLongitude.js
app/containers/settings/GpsLongitude.js
import SimpleSettings from './SimpleSettings'; import { bindStateForComponent } from '../../utils/parameters'; class GPSLongitude extends SimpleSettings { name = 'simple settings'; } export default bindStateForComponent('gpsLongitude', GPSLongitude);
import SimpleSettings from './SimpleSettings'; import { bindStateForComponent } from '../../utils/parameters'; class GPSLongitude extends SimpleSettings { name = 'gps longitude'; } export default bindStateForComponent('gpsLongitude', GPSLongitude);
Fix label of gps longitude
Fix label of gps longitude
JavaScript
mit
TobiasBales/PlayuavOSDConfigurator,TobiasBales/PlayuavOSDConfigurator
5289f4ae6d101e66ce911b70b98c402e17f5d4c0
lib/broccoli-yuidoc.js
lib/broccoli-yuidoc.js
'use strict'; var Y = require('yuidocjs'); var rsvp = require('rsvp'); var CachingWriter = require('broccoli-caching-writer'); BroccoliYuidoc.prototype = Object.create(CachingWriter.prototype); BroccoliYuidoc.prototype.constructor = BroccoliYuidoc; function BroccoliYuidoc(inputNodes, options) { this.option...
'use strict'; var Y = require('yuidocjs'); var rsvp = require('rsvp'); var path = require('path'); var CachingWriter = require('broccoli-caching-writer'); BroccoliYuidoc.prototype = Object.create(CachingWriter.prototype); BroccoliYuidoc.prototype.constructor = BroccoliYuidoc; function BroccoliYuidoc(input...
Allow absolute paths as destDir
Allow absolute paths as destDir
JavaScript
mit
cibernox/ember-cli-yuidoc,VladimirTyrin/ember-cli-yuidoc,cibernox/ember-cli-yuidoc,VladimirTyrin/ember-cli-yuidoc
26c9dd93bd8e9bd8c2cdc43eb46a2fb060bad743
api-stub/routes.js
api-stub/routes.js
module.exports = function(server) { // Create an API namespace, so that the root does not // have to be repeated for each end point. server.namespace('/api', function() { server.get('/contests', function(req, res) { var contests = { "contest": [ {id: 1, name: "Goodbye 2013", starts: "4pm, 31st...
module.exports = function(server) { // Create an API namespace, so that the root does not // have to be repeated for each end point. server.namespace('/api', function() { var contests = { "contests": [ {id: 1, name: "Goodbye 2013", starts: "4pm, 31st January 2014", duration: "75 minutes", already_regi...
Fix bug with stub-api. Add /contests/:id
Fix bug with stub-api. Add /contests/:id
JavaScript
mit
fayimora/brutehack-frontend,fayimora/brutehack-frontend
a1491a7f1bcd6f5a45b57f1dc8060cba75f52fcd
assets/javascripts/lib.js
assets/javascripts/lib.js
//= require vendor/powertip/jquery.powertip //= require vendor/bootstrap/bootstrap //= require babelfish-runtime //= require pointer //= require vendor/history/history.adapter.jquery //= require vendor/history/history //= require vendor/jade/runtime //= require_tree ./lib //= require ./n
//= require vendor/jquery/jquery //= require vendor/powertip/jquery.powertip //= require vendor/lodash //= require vendor/bootstrap/bootstrap //= require babelfish-runtime //= require pointer //= require vendor/history/history.adapter.jquery //= require vendor/history/history //= require vendor/jade/runtime //= requ...
Bring back `jquery` and `lodash`.
Bring back `jquery` and `lodash`.
JavaScript
mit
nodeca/nodeca.core,nodeca/nodeca.core
1635dd589266ac3c3b9a90d28567dc9d8f9fa385
app/routes/user.js
app/routes/user.js
import Ember from 'ember'; export default Ember.Route.extend({ queryParams: { page: { refreshModel: true }, sort: { refreshModel: true }, }, data: {}, setupController(controller, model) { this._super(controller, model); controller.set('fetchingFeed', true); con...
import Ember from 'ember'; export default Ember.Route.extend({ queryParams: { page: { refreshModel: true }, sort: { refreshModel: true }, }, data: {}, model(params) { const { user_id } = params; return this.store.find('user', user_id).then( (user) => { ...
Reorder setupController and model for consistency
Reorder setupController and model for consistency
JavaScript
apache-2.0
rust-lang/crates.io,steveklabnik/crates.io,rust-lang/crates.io,rust-lang/crates.io,steveklabnik/crates.io,steveklabnik/crates.io,rust-lang/crates.io,steveklabnik/crates.io
628dcf456e93b3f3a5223eb41f254385522a1110
demo/scripts/index.js
demo/scripts/index.js
(function init() { var input1 = document.getElementById("input1"); var input2 = document.getElementById("input2"); var searchParams = new URLSearchParams(window.location.search); if (input1.value === "") { input1.value = searchParams.get("startDate"); } if (input2.value === "") { ...
(function init() { var input1 = document.getElementById("input1"); var input2 = document.getElementById("input2"); var searchParams = new URLSearchParams(window.location.search); if (input1.value === "") { input1.value = searchParams.get("startDate"); } if (input2.value === "") { ...
Fix a display bug when two dates are the same day.
Fix a display bug when two dates are the same day.
JavaScript
mit
zzpxyx/date-calc,zzpxyx/date-calc,zzpxyx/date-calc,zzpxyx/date-calc
01e36002f26d245142883cc1ae89e119d5068ccd
src/scripts/feature/weather/owm/owmWeatherIconService.js
src/scripts/feature/weather/owm/owmWeatherIconService.js
(function() { 'use strict'; angular.module('app.feature.weather').service('_owmWeatherIconService', [ '$log', function($log) { var isNight = function(dateTime) { return false; }; this.fromIconId = function(iconId, dateTime) { if (!angular.isDefined(dateTime) || dateTime =...
(function() { 'use strict'; angular.module('app.feature.weather').service('_owmWeatherIconService', [ '$log', function($log) { var isNight = function(dateTime) { return false; }; this.fromIconId = function(iconId, dateTime) { if (!angular.isDefined(dateTime) || dateTime =...
Use wind direction icon from weather-icons based on the value directly
Use wind direction icon from weather-icons based on the value directly - It is not necessary to add our own calculation since weather-icons pro- vides CSS classes for all wind directions between 0° and 360°.
JavaScript
mit
molehillrocker/mm-website,molehillrocker/mm-website
b8f926cf05f213679523a8cdfbff0c281dd0bd09
bird_spotter.js
bird_spotter.js
if( document.location.host != 'twitter.com' && document.links.length >= 1 ) { for( var l in document.links ) { var link = document.links[l] if( link.href ) { link.href.replace( /^https?:\/\/twitter\.com\/(#!\/)?([a-z0-9_]+)$/, function( str, hash, user ) { chrome.extension.sendRequest({ action: 'twitte...
if( document.location.host != 'twitter.com' && document.links.length >= 1 ) { for( var l in document.links ) { var link = document.links[l] if( link.href ) { link.href.replace( /^https?:\/\/(www\.)?twitter\.com\/(#!\/)?([a-z0-9_]+)\/?$/i, function( str, www, hash, username ) { foundUser( username, link ) ...
Support upper & lowercase, www. prefix, trailing slash, intent links
Support upper & lowercase, www. prefix, trailing slash, intent links
JavaScript
unlicense
fvdm/chrome-birdspotter,fvdm/chrome-birdspotter
152f3dab526e2eaecf87bb279c3c821018b13dd5
scripts/collections/migration_games.js
scripts/collections/migration_games.js
define([ 'collections/json_collection_base', 'models/migration_game' ], function(JsonCollection, MigrationGame) { return JsonCollection.extend({ model: MigrationGame, amfphp_url: "migrate.v1GamesForV2User" }); });
define([ 'collections/json_collection_base', 'models/migration_game' ], function(JsonCollection, MigrationGame) { return JsonCollection.extend({ model: MigrationGame, amfphp_url_root: config.migration_api_url, amfphp_url: "migrate.v1GamesForV2User" }); });
Update migration game collection url
Update migration game collection url
JavaScript
mit
ARISGames/jsEditor,ARISGames/jsEditor,ARISGames/jsEditor,ARISGames/jsEditor
6e32cb8cfd76f35dc59b35c46b5536a038fd26c7
audio-player/src/js/common/typedef/Node.js
audio-player/src/js/common/typedef/Node.js
/** * Many objects in Node.js emit events. * * @see https://nodejs.org/api/events.html * * @typedef {Object} EventEmitter */
/** * Many objects in Node.js emit events. * * @see https://nodejs.org/api/events.html * * @typedef {Object} EventEmitter */ /** * Pure JavaScript is Unicode friendly but not nice to binary data. * When dealing with TCP streams or the file system, it's necessary to handle octet streams. * Node.js has several ...
Add the definition of the Buffer
Add the definition of the Buffer
JavaScript
mit
akabekobeko/examples-electron,akabekobeko/examples-electron,akabekobeko/examples-electron
447843a909e62962f3be6bb0dfb1e37e580d6f30
client/react-babylonjs.js
client/react-babylonjs.js
import React from 'react'; import BABYLON from 'babylonjs'; export class BabylonJS extends React.Component { get defaultProps() { return { antialias: true, onEngineCreated: () => {}, onEngineAbandoned: () => {}, }; } componentDidMount() { this.engine = new BABYLON.Engi...
import React from 'react'; import BABYLON from 'babylonjs'; export class BabylonJS extends React.Component { get defaultProps() { return { antialias: true, onEngineCreated: () => {}, onEngineAbandoned: () => {}, }; } componentDidMount() { this.engine = new BABYLON.Engi...
Call engine.resize() after stylesheets load.
Call engine.resize() after stylesheets load. Otherwise engine would look pixely sometimes.
JavaScript
mit
sekainogenkai/faito
2b3ab5a948bb579240f57f0bda391c3c79c707fe
client/src/features/lastVotes/reducer.js
client/src/features/lastVotes/reducer.js
import { RECEIVE_VOTE } from 'common/actionTypes/voting'; const lastVotes = (state = [], action) => { switch (action.type) { case RECEIVE_VOTE: { return [...state.slice(-5), action.data.id]; } default: return state; } }; export default lastVotes;
import { OPEN_ISSUE } from 'common/actionTypes/issues'; import { RECEIVE_VOTE } from 'common/actionTypes/voting'; const lastVotes = (state = [], action) => { switch (action.type) { case OPEN_ISSUE: { return []; } case RECEIVE_VOTE: { return [...state.slice(-5), action.data.id]; } def...
Reset lastVotes state when new issue is opened
Reset lastVotes state when new issue is opened
JavaScript
mit
dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta
72290313c6d519e0fcf44169cd90b7e1f4a919d3
assets/javascripts/components/Carousel.js
assets/javascripts/components/Carousel.js
'use strict'; module.exports = Carousel; import Flickity from 'flickity' /** * Initializes Carousel components * @param {string} selector as a string * @returns {Object} Flickity object */ function Carousel(selector='.Carousel__cells') { console.log("-- Carousel initialized") // Init flickity for all carous...
'use strict'; module.exports = Carousel; import Flickity from 'flickity' /** * Initializes Carousel components * @param {string} selector as a string * @returns {Object} Flickity object */ function Carousel(selector='.Carousel__cells') { console.log("-- Carousel initialized") if ($(selector).length > 0) { ...
Check if there’s actually a carousel to init
Check if there’s actually a carousel to init
JavaScript
agpl-3.0
fablabbcn/SCOPESdf,fablabbcn/SCOPESdf,fablabbcn/SCOPESdf,fablabbcn/SCOPESdf
e7faf616b9e9118bddfd46e873ea789752e06f01
script/check-version.js
script/check-version.js
#!/usr/bin/env node var path = require('path'); var getBundledNodeVersion = require('./bundled-node-version') var bundledNodePath = path.join(__dirname, '..', 'bin', 'node') if (process.platform === 'win32') { bundledNodePath += '.exe' } getBundledNodeVersion(bundledNodePath, function(err, bundledVersion) { if ...
#!/usr/bin/env node var path = require('path'); var getBundledNodeVersion = require('./bundled-node-version') var bundledNodePath = path.join(__dirname, '..', 'bin', 'node') if (process.platform === 'win32') { bundledNodePath += '.exe' } getBundledNodeVersion(bundledNodePath, function(err, bundledVersion) { if ...
Fix version check output for Windows
Fix version check output for Windows
JavaScript
mit
atom/apm,bronson/apm,atom/apm,bronson/apm,atom/apm,bronson/apm,atom/apm,bronson/apm
324819add7005416549f91fdb2f9a13b6d636ccf
NavigationReactMobile/sample/twitter/Tweet.js
NavigationReactMobile/sample/twitter/Tweet.js
import React from 'react'; import {NavigationLink} from 'navigation-react'; import Banner from './Banner'; import Tweets from './Tweets'; export default ({tweet: {account: {id: accountId, name, username, logo}, id, text, photo, time, retweets, likes, replies}}) => ( <div> <Banner title="Tweet" /> <div cla...
import React from 'react'; import {NavigationLink} from 'navigation-react'; import Banner from './Banner'; import Tweets from './Tweets'; export default ({tweet: {account: {id: accountId, name, username, logo}, id, text, photo, time, retweets, likes, replies}}) => ( <div> <Banner title="Tweet" /> <div cla...
Hide link if no photo
Hide link if no photo
JavaScript
apache-2.0
grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation
59fa7253420b2041d4dee47448f06c4337716cb8
core/collision_manager.js
core/collision_manager.js
"use strict"; function CollisionManager() { var objects = []; this.intersect = function(object1, object2) { var pos1 = object1.getLocation(); var pos2 = object2.getLocation(); return (((pos1.x >= pos2.x && pos1.x <= pos2.x + pos2.width) && (pos1.y >= pos2.y && pos1.y...
"use strict"; function CollisionManager() { var objects = []; this.intersect = function(object1, object2) { var pos1 = object1.getLocation(); var pos2 = object2.getLocation(); return (((pos1.x >= pos2.x && pos1.x <= pos2.x + pos2.width) && (pos1.y >= pos2.y && pos1.y...
Fix minor issues in CollisionManager
Fix minor issues in CollisionManager
JavaScript
mit
sirjeppe/WebGameMaker,sirjeppe/WebGameMaker,sirjeppe/WebGameMaker
0b389d6b66eff49aa481314125bf1962e519bc17
src/components/es6-katas-navigation.js
src/components/es6-katas-navigation.js
import React from 'react'; export default class KatasNavigation extends React.Component { render() { if (!this.props.katas) { return null; } const selectedKataId = null; const katas = this.props.katas.items; return ( <div id="katas-navigation" className="flex-columns-full-width"> ...
import React from 'react'; export default class KatasNavigation extends React.Component { render() { if (!this.props.katas) { return null; } const selectedKataId = null; const katas = this.props.katas.items; return ( <div id="katas-navigation" className="flex-columns-full-width"> ...
Use a better unique strings.
Use a better unique strings.
JavaScript
mit
tddbin/tddbin-frontend,tddbin/tddbin-frontend,tddbin/tddbin-frontend
4eb1a850deadca2949641f129169ce36c0846f50
cordova-core.js
cordova-core.js
/*globals Polymer */ 'use strict'; Polymer( { is: 'cordova-core', properties: { /** * Return if cordova deviceready event has been fired. */ ready: { notify: true, readOnly: true, type: Boolean, value: false }, /** * Return if cor...
/*globals Polymer */ 'use strict'; Polymer( { is: 'cordova-core', properties: { /** * Return if cordova deviceready event has been fired. */ ready: { notify: true, readOnly: true, type: Boolean, value: false }, /** * Return if cor...
Update source of loader cordova script
Update source of loader cordova script
JavaScript
mit
adelarosab/cordova-core
ff3c9f79a0a494dc2ead3a63d2f6a74f0116d70c
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ // Various Grunt tasks... buildcontrol: { options: { dir: '_site', commit: true, push: true, message: 'Built %sourceName% from ...
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ // Various Grunt tasks... buildcontrol: { options: { dir: '_site', commit: true, push: true, message: 'Built %sourceName% from ...
Define 'deploy' task. Much nicer than doing 'grunt buildcontrol' all the time.
Define 'deploy' task. Much nicer than doing 'grunt buildcontrol' all the time.
JavaScript
mit
orestes/blog.orestes.io,orestes/blog.orestes.io,orestes/blog.orestes.io
a4b483a8b0dcc0645c245aed54625ffe6c5a7492
Gruntfile.js
Gruntfile.js
'use strict'; // # Globbing // for performance reasons we're only matching one level down: // 'test/spec/{,*/}*.js' // use this if you want to match all subfolders: // 'test/spec/**/*.js' module.exports = function (grunt) { // Load grunt tasks automatically require('load-grunt-tasks')(grunt); // configu...
'use strict'; // # Globbing // for performance reasons we're only matching one level down: // 'test/spec/{,*/}*.js' // use this if you want to match all subfolders: // 'test/spec/**/*.js' module.exports = function (grunt) { // Load grunt tasks automatically require('load-grunt-tasks')(grunt); // configu...
Fix grunt not copying files correctly when syncing sometimes
Fix grunt not copying files correctly when syncing sometimes
JavaScript
bsd-2-clause
StolenSheepDesign/3ps_cmfu,StolenSheepDesign/3ps_cmfu
83bb29f91056ad844f5e79973ac1b0293391f63b
sqlParser/js/preMain.js
sqlParser/js/preMain.js
/** * Copyright (C) 2016 Joshua Auerbach * * 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 agre...
/** * Copyright (C) 2016 Joshua Auerbach * * 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 agre...
Allow flip between local remote server. Improved error report.
Allow flip between local remote server. Improved error report.
JavaScript
apache-2.0
querycert/qcert,querycert/qcert,querycert/qcert,querycert/qcert,querycert/qcert
341bb154d3779f1629e1e634040667af69447185
src/ast_constructors.js
src/ast_constructors.js
function KIFNode(kifExpressions) { this.type = 'KIFNode'; this.expressions = this.expressions || []; this.expressions = this.expressions.concat(kifExpressions); } function WordNode(identifier) { this.type = 'WordNode'; this.word = identifier; } function VariableNode(identifier, variableType) { this.type =...
function KIFNode(kifExpressions) { this.type = 'KIFNode'; this.expressions = this.expressions || []; this.expressions = this.expressions.concat(kifExpressions); } function WordNode(identifier) { this.type = 'WordNode'; this.word = identifier; } function VariableNode(identifier, variableType) { this.type =...
Add StringLiteralNode to ast constructors
Add StringLiteralNode to ast constructors
JavaScript
mit
sdtsui/jkif
c20c91c1db20d0877721d0168cf668e61ebabc45
base.js
base.js
var SCREEN_WIDTH = 0; var SCREEN_HEIGHT = 0; var PLAYER_RADIUS = 12; var PLAYER_SPEED = 4; var FRICTION = 0.8; var LEVELS = [ { l: 48, t: 24, r: 752, b: 576 }, { l: 0, t: 0, r: 2000, b: 2000 } ]; var gInput = {} var gPlayer = {} var gScene = {} var gAudio = {} var gRenderer = {} var Target = funct...
var SCREEN_WIDTH = 0; var SCREEN_HEIGHT = 0; var PLAYER_RADIUS = 12; var PLAYER_SPEED = 4; var FRICTION = 0.8; var LEVELS = [ { l: 48, t: 24, r: 752, b: 576 }, { l: 0, t: 0, r: 2000, b: 2000 } ]; var round = function(num, place) { if (isNaN(num)) return num; var place = place ? place : 2; var mo...
Add round function to round numbers by specified decimal place or 2 places
Add round function to round numbers by specified decimal place or 2 places
JavaScript
mit
peternatewood/shmup,peternatewood/shmup,peternatewood/shmup
e65525a563d93089515289359d5ad5a858528105
helper_functions/price_discount.js
helper_functions/price_discount.js
// priceDiscount function // Discounts sale price by 15% is price is > $8,000 module.exports.priceDiscount = (price) => { if (price > 8000) { return price / 1.15 } return price; };
// priceDiscount function // Discounts sale price by 15% is price is > $8,000 module.exports.priceDiscount = (price) => { if (price > 8000) { let discountedPrice = price / 1.15 return Math.floor(discountedPrice); } return price; };
Add script to truncate discounted prices in 'priceDiscount()' function
Add script to truncate discounted prices in 'priceDiscount()' function
JavaScript
mit
dshaps10/full-stack-demo-site,dshaps10/full-stack-demo-site
f8c9639a42415adb27d97175937eb90f987ddfb9
packages/bpk-component-button/index.js
packages/bpk-component-button/index.js
/* * Backpack - Skyscanner's Design System * * Copyright 2017 Skyscanner Ltd * * 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 * * Un...
/* * Backpack - Skyscanner's Design System * * Copyright 2017 Skyscanner Ltd * * 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 * * Un...
Fix unused import / export
[BPK-978] Fix unused import / export
JavaScript
apache-2.0
Skyscanner/backpack,Skyscanner/backpack,Skyscanner/backpack
158d04537ad2c0d1646be3337e4f7b7a92331fc9
src/ui/common_components/ErrorBoundary.js
src/ui/common_components/ErrorBoundary.js
import {resetSettingsUI} from "../UIActions"; import {connect} from "react-redux"; import React from "react"; class ErrorBoundary extends React.Component { state = { hasError: false }; componentDidCatch(error, info) { // Display fallback UI if (error !== "state is undefined") { this.s...
import {resetSettingsUI} from "../UIActions"; import {connect} from "react-redux"; import React from "react"; class ErrorBoundary extends React.Component { state = { hasError: false }; componentDidCatch(error, info) { // Display fallback UI if (error !== "state is undefined") { this.setState({ hasErro...
Fix mixed tabs and spaces error
Fix mixed tabs and spaces error
JavaScript
mit
mrdokenny/Cookie-AutoDelete,Cookie-AutoDelete/Cookie-AutoDelete,Cookie-AutoDelete/Cookie-AutoDelete,mrdokenny/Cookie-AutoDelete,Cookie-AutoDelete/Cookie-AutoDelete
cbce5229897e3fb27840ba176768cd9d083bb738
src/sagas/DevNullApi.js
src/sagas/DevNullApi.js
import config from '../config' export const feedback: (feedback) => any = (feedback) => { const options = { method: 'POST', headers: { 'Content-Type': "application/json", "Voter-ID": feedback.uuid }, body: JSON.stringify(feedback.feedback) } return fetch(`${config...
import config from '../config' export const feedback: (feedback) => any = (feedback) => { const options = { method: 'POST', headers: { 'Content-Type': "application/json", "Voter-ID": feedback.uuid }, body: JSON.stringify(feedback.feedback) } return fetch(`${config...
Add feedback for unidentified errors
Add feedback for unidentified errors
JavaScript
mit
javaBin/appZone,javaBin/appZone,javaBin/appZone,javaBin/appZone,javaBin/appZone,javaBin/appZone,javaBin/appZone
71d8eda6eaf2bf0b5c9f413f31be6388ac6646eb
test/expresison.spec.js
test/expresison.spec.js
'use strict'; var expect = require('chai').expect; var Expression = require('../app/scripts/expression'); describe('expression', function () { it('should initialize expression with unmodified input string', function () { var expression = new Expression({ string: ' p and q ' }); expect(expression)...
'use strict'; var expect = require('chai').expect; var Expression = require('../app/scripts/expression'); describe('expression', function () { it('should initialize expression with unmodified input string', function () { var expression = new Expression({ string: ' p and q ' }); expect(expression)...
Add tests for AND operation
Add tests for AND operation
JavaScript
mit
caleb531/truthy,caleb531/truthy
ec35facec740dd12b93ddd898be7fe56c8e072c8
test/helpers/helpers.js
test/helpers/helpers.js
var request = require( 'request' ); var config = require( '../../config' ); exports.postManifest = function ( manifest, callback ) { var options = { uri: 'http://localhost:' + config.port + '/packages', timeout: 8000, form: require( '../manifests/' + manifest + '.json' ), json: true }; request.po...
var request = require( 'request' ); var config = require( '../../config' ); exports.postManifest = function ( manifest, callback ) { var options = { uri: 'http://localhost:' + config.port + '/packages', timeout: 8000, form: require( '../manifests/' + manifest + '.json' ), json: true }; request.po...
Add getScript helper to test
Add getScript helper to test
JavaScript
mit
web-audio-components/web-audio-components-service
f166a0bb6674449de3272c85a2d38c4e08e7f99a
app/account/views/cards-list.js
app/account/views/cards-list.js
module.exports = Zeppelin.CollectionView.extend({ tagName: 'ol', className: 'cards-list list-unstyled clearfix', subscriptions: { 'cardsList:layout': 'triggerLayout' }, addMethod: 'prepend', wall: null, layoutTimer: null, itemView: function(model) { return require('account/views/' + model....
module.exports = Zeppelin.CollectionView.extend({ tagName: 'ol', className: 'cards-list list-unstyled clearfix', subscriptions: { 'cardsList:layout': 'triggerLayout' }, addMethod: 'prepend', wall: null, layoutTimer: null, itemView: function(model) { return require('account/views/' + model....
Remove old masonry plugin code.
Remove old masonry plugin code.
JavaScript
agpl-3.0
jessamynsmith/boards-web,jessamynsmith/boards-web,GetBlimp/boards-web
f20e2a8906d509815c0334f1779b05ccda70b2f4
app/assets/javascripts/alert.js
app/assets/javascripts/alert.js
(function(){ "use strict"; var POLLING_INTERVAL = 3 * 1000; var POLLING_URL = "/polling/alerts"; $(function(){ var alert = new Vue({ el: "#alert", data: { "alerts": [] }, created: function(){ var self = this; var fetch = function(){ self.fetchAlert...
(function(){ "use strict"; var POLLING_INTERVAL = 3 * 1000; var POLLING_URL = "/polling/alerts"; $(function(){ var alert = new Vue({ el: "#alert", data: { "alerts": [] }, created: function(){ var self = this; var fetch = function(){ self.fetchAlert...
Stop polling if fluentd-ui server is unreachable
Stop polling if fluentd-ui server is unreachable
JavaScript
apache-2.0
fluent/fluentd-ui,mt0803/fluentd-ui,fluent/fluentd-ui,fluent/fluentd-ui,mt0803/fluentd-ui,mt0803/fluentd-ui
e4b0615c757af05440ac7b1bbf7b99322595d482
assets/js/controller/profile.js
assets/js/controller/profile.js
app.controller('settingsProfile' , function ($scope, $document, $sessionStorage, api) { $scope.$storage = $sessionStorage; $scope.imgSrc = 'assets/img/jobs.png'; $scope.showName = 'Visningsnamn'; $scope.userName = 'Username'; $scope.yourEmail = 'namn.efternamn@exempel.com'; $scope.yourInfo = 'Lo...
app.controller('settingsProfile' , function ($scope, $document, $sessionStorage, api) { $scope.$storage = $sessionStorage; $scope.resetSettings = function() { api.users.get($scope.$storage.user._id).then(function(response){ $scope.$storage.user = response.data; }); } $scope...
Reset settings form when not saving
Reset settings form when not saving
JavaScript
mit
isak16/Users-chat,isak16/Users-chat
62c0aaff6f65aab006cb63b6a977b16bb9f400db
client/templates/minutesList.js
client/templates/minutesList.js
import { MeetingSeries } from '/imports/meetingseries' Template.minutesList.helpers({ buttonBackground: function () { return (this.isFinalized) ? "default" : "info"; }, addMinutesPath: function () { let ms = new MeetingSeries(this.meetingSeriesId); return (ms.addNewMinutesAllowed(...
import { MeetingSeries } from '/imports/meetingseries' Template.minutesList.helpers({ buttonBackground: function () { return (this.isFinalized) ? "default" : "info"; }, addMinutesPath: function () { let ms = new MeetingSeries(this.meetingSeriesId); return (ms.addNewMinutesAllowed(...
Delete Minutes: Popup dialog shows concerning minutes date.
Delete Minutes: Popup dialog shows concerning minutes date.
JavaScript
mit
4minitz/4minitz,RobNeXX/4minitz,Huggle77/4minitz,Huggle77/4minitz,4minitz/4minitz,4minitz/4minitz,RobNeXX/4minitz,RobNeXX/4minitz,Huggle77/4minitz
f06e0aed7519369956334af955e068a6b6541432
models/ArticlePage.js
models/ArticlePage.js
import { flow, types } from 'mobx-state-tree' import { optionalArrayOfStrings } from './commonModels' import { GET } from './fetch' const ChildArticle = types.model('ChildArticle', { slug: '', title: '', }) export default types.model('ArticlePage', { aliases: optionalArrayOfStrings, children: types.optional(t...
import { flow, types } from 'mobx-state-tree' import titleCase from '@utils/titleCase' import { optionalArrayOfStrings } from './commonModels' import { GET, POST } from './fetch' const ChildArticle = types.model('ChildArticle', { slug: '', title: '', }).views(self => ({ get displayName() { return self.title || t...
Add better defaults, plus load function
Add better defaults, plus load function
JavaScript
mit
TroyAlford/axis-wiki,TroyAlford/axis-wiki
dc0d75674972433a7e0d8fc9a7df6d6949af1e61
src/helpers/getLocaleFromRequest/index.js
src/helpers/getLocaleFromRequest/index.js
var get = require('lodash.get') function getAcceptedLanguage (request) { if (!request || typeof request.get !== 'function') { return } var header = request.get('accept-language') || '' var acceptedLanguages = header.split(';') return acceptedLanguages[0] } function getQueryFromRequest (request) { re...
var get = require('lodash.get') function getAcceptedLanguage (request) { if (!request || typeof request.get !== 'function') { return } var header = request.get('accept-language') || '' var acceptedLanguages = header.split(';') return acceptedLanguages[0] } function getQueryFromRequest (request) { re...
Remove default value. Use a thing straight, don't stuff it to var
Remove default value. Use a thing straight, don't stuff it to var
JavaScript
mit
n26/express-simple-locale
f87b82c1ea3cf6db1580a5742a8dc4c5c99831d6
lib/loadLayouts.js
lib/loadLayouts.js
var fs = require('fs'); var glob = require('glob'); var path = require('path'); module.exports = function(dir) { var layouts = glob.sync(path.join(dir, '**/*.html')); for (var i in layouts) { var name = path.basename(layouts[i], '.html'); var file = fs.readFileSync(layouts[i]); this.layouts[name] = ...
var fs = require('fs'); var glob = require('glob'); var path = require('path'); module.exports = function(dir) { var layouts = glob.sync(path.join(dir, '**/*.{html,hbs,handlebars}')); for (var i in layouts) { var ext = path.extname(layouts[i]); var name = path.basename(layouts[i], ext); var file = f...
Load html, hbs, or handlebars files when looking for layouts
Load html, hbs, or handlebars files when looking for layouts
JavaScript
mit
ppowalowski/panini
4ee9ac2c023b7ebcfbaafcc97d77ec058df864ff
lib/partitioner.js
lib/partitioner.js
var _ = require('lodash'); 'use strict'; function DefaultPartitioner() { this.getPartition = function (partitions) { if (partitions && _.isArray(partitions) && partitions.length > 0) { return partitions[0]; } else { return 0; } } } function RandomPartitioner()...
var util = require('util'); var _ = require('lodash'); 'use strict'; var Partitioner = function () { } var DefaultPartitioner = function () { } util.inherits(DefaultPartitioner, Partitioner); DefaultPartitioner.prototype.getPartition = function (partitions) { if (partitions && _.isArray(partitions) && partitio...
Refactor Partitioner class: add class hierarchy.
Refactor Partitioner class: add class hierarchy.
JavaScript
mit
uber/kafka-node
9a0508fe2cbdb4ddd5bf6d1a4c7c8e2a5cef4c15
lib/side-effect.js
lib/side-effect.js
import React, { Component } from 'react' import { getDisplayName } from './utils' export default function withSideEffect (reduceComponentsToState, handleStateChangeOnClient) { return function wrap (WrappedComponent) { let mountedInstances = [] let state function emitChange (component) { state = re...
import React, { Component } from 'react' import { getDisplayName } from './utils' const canUseDOM = typeof window !== 'undefined' export default function withSideEffect (reduceComponentsToState, handleStateChangeOnClient) { return function wrap (WrappedComponent) { let mountedInstances = [] let state f...
Remove static var from side effect
Remove static var from side effect
JavaScript
mit
kpdecker/next.js
50a1e5bc0fa047493b971b46ec66e3f126cfa61b
controllers/users/collection.js
controllers/users/collection.js
module.exports = (function(){ // GET /users/:id/media?lat=<LAT>&lng=<LNG>&time=<TIME> return function* collection(id) { var Q = require('q'); var TwitterManager = require('../media/twitter'); var InstagramManager = require('../media/instagram'); // Twitter Requests var twitterDef = Q.defer()...
module.exports = (function(){ // GET /users/:id/media?lat=<LAT>&lng=<LNG>&time=<TIME> return function* collection(id) { var Q = require('q'); var TwitterManager = require('../media/twitter'); var InstagramManager = require('../media/instagram'); // Twitter Requests var twitterDef = Q.defer()...
Create two promises per social media request. Heroku deployment.
Create two promises per social media request. Heroku deployment.
JavaScript
mit
capsul/capsul-api
ba80f67d03326c05802c8c24fdf5f8d3497f711c
adapter.js
adapter.js
(function(window) { window.chai.should(); window.expect = window.chai.expect; window.assert = window.chai.assert; })(window);
(function(window) { window.should = window.chai.should(); window.expect = window.chai.expect; window.assert = window.chai.assert; })(window);
Add should global as well.
Add should global as well.
JavaScript
mit
webdev1001/karma-sinon-chai,wombatsecurity/karma-lolex-sinon-chai,janmonschke/karma-sinon-chai,xdissent/karma-chai,FireVolkhov/karma-sinon-chai,kmees/karma-sinon-chai,lucassus/karma-sinon-chai,jrrbru/karma-chai-sinon,tubalmartin/karma-chai-sinon,joemcbride/karma-sinon-chai,keithamus/karma-chai
47bfc6a56bab032bb9304161acf3de6cc6d52ac6
mods/tiershift/scripts.js
mods/tiershift/scripts.js
exports.BattleScripts = { init: function() { for (var i in this.data.Pokedex) { var tier = ''; var adjustment = 0; // mega evolutions get the same stat boost as their base forme if (this.data.FormatsData[i]) tier = this.data.FormatsData[i].tier || this.data.FormatsData[toId(this.getTemplate(i).baseSpecie...
exports.BattleScripts = { init: function() { for (var i in this.data.Pokedex) { var tier = ''; var adjustment = 0; // mega evolutions get the same stat boost as their base forme if (this.data.FormatsData[i]) tier = this.data.FormatsData[i].tier || this.data.FormatsData[toId(this.getTemplate(i).baseSpecie...
Fix 'LC Uber' Pokemon being unchanged
Tiershift: Fix 'LC Uber' Pokemon being unchanged Add a case for 'LC Uber', fixing a bug where Pokemon in the LC Uber tier did not receive any stat adjustments.
JavaScript
mit
Firestatics/Omega-Alpha,BasedGod7/PH,aakashrajput/Pokemon-Showdown,TheManwithskills/Server,KewlStatics/Shit,Zipzapadam/Server,HoeenCoder/SpacialGaze,urkerab/Pokemon-Showdown,CreaturePhil/Pokemon-Showdown,Syurra/Pokemon-Showdown,Ridukuo/Test,kuroscafe/Showdown-Boilerplate,MayukhKundu/Pokemon-Domain,Ridukuo/Test2,Darksha...
e8cb3019f7b25587d017826ccb0b9d9e3228958d
generators/app/templates/api/policies/isAuthenticated.js
generators/app/templates/api/policies/isAuthenticated.js
/** * isAuthenticated * @description :: Policy that inject user in `req` via JSON Web Token */ var passport = require('passport'); module.exports = function (req, res, next) { passport.authenticate('jwt', function (error, user, info) { if (error) return res.serverError(error); if (!user) return res.unaut...
/** * isAuthenticated * @description :: Policy that inject user in `req` via JSON Web Token */ var passport = require('passport'); module.exports = function (req, res, next) { passport.authenticate('jwt', function (error, user, info) { if (error) return res.serverError(error); if (!user) return res.unaut...
Add checking for info is exists
Add checking for info is exists
JavaScript
mit
ghaiklor/generator-sails-rest-api,IncoCode/generator-sails-rest-api,jaumard/generator-trails,italoag/generator-sails-rest-api,tnunes/generator-trails,mhipo1364/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,italoag/generator-sails-rest-api,eithewliter5518/generator-sails-rest-api,konstantinzolotarev/generat...
22af500077c0d31d6168a96469d116a4bbc0d9fc
models/throttle.js
models/throttle.js
/** * A rate-limiting Throttle model, by IP address * */ var mongoose = require('mongoose') var ipRegex = require('ip-regex') var Schema = mongoose.Schema mongoose.Promise = global.Promise /** * Register the Throttle model * * @access public * @param {object} defaults * @return {object} Mongoose Model */ modul...
/** * A rate-limiting Throttle model, by IP address * */ var mongoose = require('mongoose') var Schema = mongoose.Schema mongoose.Promise = global.Promise /** * Register the Throttle model * * @access public * @param {object} defaults * @return {object} Mongoose Model */ module.exports = function createThrottl...
Remove Regex validation on Throttle
Remove Regex validation on Throttle
JavaScript
mit
andjosh/mongo-throttle
0e0c48ce91d6ecd1e5d2e72ed1994a7a48d1e890
protocols/Password.js
protocols/Password.js
/** * Module dependencies */ var util = require('util') , LocalStrategy = require('passport-local').Strategy , User = require('../models/User') , mailer = require('../boot/mailer') ; /** * Verifier */ function verifier (req, email, password, done) { User.authenticate(email, pa...
/** * Module dependencies */ var util = require('util') , LocalStrategy = require('passport-local').Strategy , User = require('../models/User') ; /** * Verifier */ function verifier (req, email, password, done) { User.authenticate(email, password, function (err, user, info) { if (u...
Remove dated configuration property check
fix(password): Remove dated configuration property check
JavaScript
mit
tonyevans/connect,anvilresearch/connect,EternalDeiwos/connect,henrjk/connect,tonyevans/connect,tonyevans/connect,msamblanet/connect,EternalDeiwos/connect,henrjk/connect,msamblanet/connect,anvilresearch/connect,anvilresearch/connect,henrjk/connect,jawaid/connect,EternalDeiwos/connect,jawaid/connect
62754aa12efb09f1b6bc9fb706d10f749b82203a
app/app.js
app/app.js
'use strict'; angular.module('chatApp', []) .controller('ChatCtrl', function($scope, $http) { $scope.chatChannel = "chatApp"; $scope.messageLimit = 50; $scope.defaultUsername = "Guest"; $scope.currentConnectionStatus = 0; $scope.errorMessage; $scope.loggedIn = false; PUBNUB.subscribe({ c...
'use strict'; angular.module('chatApp', []) .controller('ChatCtrl', function($scope, $http) { $scope.chatChannel = "chatApp"; $scope.messageLimit = 50; $scope.defaultUsername = "Guest"; $scope.currentConnectionStatus = 0; $scope.errorMessage; $scope.loggedIn = false; PUBNUB.subscribe({ c...
Add function to post a message to the channel
Add function to post a message to the channel
JavaScript
mit
nickjoegray/chat-room
da5399d8be0c396510d400d8d64dbab2f2532f7c
plugin/compiler.js
plugin/compiler.js
var traceur = Npm.require('traceur'); var os = Npm.require('os'); Plugin.registerSourceHandler("next.js", function (compileStep) { var oldPath = compileStep.inputPath; var newPath = oldPath.replace(/\.next\.js$/, '.now.js'); var options = { filename: oldPath, sourceMap: true }; var content = compile...
var traceur = Npm.require('traceur'); Plugin.registerSourceHandler("next.js", function (compileStep) { var oldPath = compileStep.inputPath; var newPath = oldPath.replace(/\.next\.js$/, '.now.js'); var options = { filename: oldPath, sourceMap: true }; var content = compileStep.read().toString('utf8')...
Use preferred error handling from Traceur docs
Use preferred error handling from Traceur docs As per https://github.com/google/traceur-compiler/wiki/CompilingOffline#nodejs-api
JavaScript
mit
mquandalle/meteor-harmony
be32d523cdc0c81ee4bba69fd674a0de74ea555b
protractor.conf.js
protractor.conf.js
'use strict' var proxy = { proxyType: 'autodetect' } if (process.env.http_proxy !== undefined && process.env.http_proxy !== null) { proxy = { proxyType: 'manual', httpProxy: process.env.http_proxy } } exports.config = { directConnect: true, allScriptsTimeout: 80000, specs: [ 'test/e2e/*.js'...
'use strict' var proxy = { proxyType: 'autodetect' } if (process.env.HTTP_PROXY !== undefined && process.env.HTTP_PROXY !== null) { proxy = { proxyType: 'manual', httpProxy: process.env.HTTP_PROXY } } exports.config = { directConnect: true, allScriptsTimeout: 80000, specs: [ 'test/e2e/*.js'...
Use all-caps env var name
Use all-caps env var name Makes HTTP_PROXY consistent with PORT or TRAVIS_BUILD_NUMBER elsewhere in the application. Are parsed case insensitive by Node anyway.
JavaScript
mit
bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop
c421e43017fe094c494fd22915a755c93eb65915
js/script.js
js/script.js
/*global WebWorker:false */ (function () { 'use strict'; var worker = null, $output = null; $output = $('#worker-output'); /** worker = new Worker('/js/example-worker.js'); worker.addEventListener('message', function (event) { $output.text(event.data); return; })...
/*global WebWorker:false */ (function () { 'use strict'; var worker = null, $output = null; $output = $('#worker-output'); /** worker = new Worker('/js/example-worker.js'); worker.addEventListener('message', function (event) { $output.text(event.data); return; })...
Add some event listeners on example page to track progress of worker.
Add some event listeners on example page to track progress of worker.
JavaScript
mit
tanzeelkazi/web-worker,tanzeelkazi/web-worker,tanzeelkazi/web-worker,tanzeelkazi/webworker,tanzeelkazi/webworker,tanzeelkazi/webworker
fba1d71e583e3a539839c28f5613569da0722e3d
lib/Grunt.js
lib/Grunt.js
'use strict' const grunt = require('gruntfile-api') const fs = require('fs') const path = require('path') const spawn = require('child_process').spawn global.processes = {} exports.getTasks = function () { return new Promise(function (resolve, reject) { const gruntfile = fs.readFileSync(path.join(window.localSt...
'use strict' const grunt = require('gruntfile-api') const fs = require('fs') const path = require('path') const spawn = require('child_process').spawn global.processes = {} exports.getTasks = function () { return new Promise(function (resolve, reject) { fs.readFile(path.join(window.localStorage.getItem('current...
Use callback instead of sync
Use callback instead of sync
JavaScript
mit
jenslind/piglet,jenslind/piglet
66ec368495fcbb42a4961239824681ae7e8df28a
lib/index.js
lib/index.js
/** * Module dependencies */ var defaults = require('./helpers'); var template = require('./template'); module.exports = createInstance; /** * Create an instance of JSONt * * @return {JSONt} */ function createInstance() { function JSONt(tmpl, options){ return JSONt.compile(tmpl, options); }; JSONt.helpers...
/** * Module dependencies */ var defaults = require('./helpers'); var template = require('./template'); module.exports = createInstance; /** * Create an instance of JSONt * * @return {JSONt} */ function createInstance() { function JSONt(tmpl, options){ return JSONt.compile(tmpl, options); }; JSONt.helpers...
Add render and renderFile methods
Add render and renderFile methods
JavaScript
mit
UptownFound/jsont,camshaft/jsont
8a1cbc95779a7b0d498b9efa2cf0ade0c9b6cee1
cookielaw/static/cookielaw/js/cookielaw.js
cookielaw/static/cookielaw/js/cookielaw.js
var Cookielaw = { ACCEPTED: '1', REJECTED: '0', createCookie: function (name, value, days) { var date = new Date(), expires = ''; if (days) { date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toGMTString(); ...
var Cookielaw = { ACCEPTED: '1', REJECTED: '0', createCookie: function (name, value, days, secure=true) { var date = new Date(), expires = ''; if (days) { date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toGMTStri...
Add option to use "Secure" attribute on cookies
Add option to use "Secure" attribute on cookies This addresses #68 where some (most?) browsers default to `SameSite: None` and don't like cookies without the `Secure` attribute set
JavaScript
bsd-2-clause
TyMaszWeb/django-cookie-law,TyMaszWeb/django-cookie-law,TyMaszWeb/django-cookie-law
0d709874c4d1e2a67211c1935c88d0c52f01b21b
src/background.js
src/background.js
var activeIcons = { path: { '19': 'icons/active-19.png', '38': 'icons/active-38.png' } }; var inactiveIcons = { path: { '19': 'icons/inactive-19.png', '38': 'icons/inactive-38.png' } }; var active = false; function toggleIcon() { chrome.browserAction.setIcon(active ? inactiveIcons : activeI...
var manifest = chrome.runtime.getManifest(); var inactiveIcons = manifest.browser_action.default_icon; var activeIcons = { '19': 'icons/active-19.png', '38': 'icons/active-38.png' }; var inactiveTitle = manifest.browser_action.default_title; var activeTitle = 'Stop showing line lengths'; var active = false; fu...
Reduce redundancy be inspecting manifest
Reduce redundancy be inspecting manifest
JavaScript
mit
jbrudvik/character-count,jbrudvik/character-count
59759bc9def99a0e663c60e13df742bae1893797
src/app/Home.js
src/app/Home.js
import React, {Component} from 'react'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import ApartmentUpdates from '../apartments/ApartmentUpdates'; import TenantUpdates from '../tenants/TenantUpdates'; import Apartment from '../apartments/Apartment'; import Tenant from '../tenants/Tenant'; const...
import React, {Component} from 'react'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import ApartmentUpdates from '../apartments/ApartmentUpdates'; import TenantUpdates from '../tenants/TenantUpdates'; import Apartment from '../apartments/Apartment'; import Tenant from '../tenants/Tenant'; const...
Fix bug on home page
fix(): Fix bug on home page Apartment and Tenant components were rendering on home page when it shouldn't be
JavaScript
mit
jearjujaroen/propertymanagement,jearjujaroen/propertymanagement
32eb33cbf802337847d11b682039c64dff88ed99
el.spec.js
el.spec.js
var el = require('./el'); var outputEl = document.querySelector('#el-js'); function assertDomContent(elTree, expected) { el(outputEl, elTree); var actual = outputEl.innerHTML.replace(/\s+/g, ' ').trim(); if (actual === expected) return; throw new Error('Unexpected element output; to debug this, break o...
var el = require('./el'); var outputEl = document.querySelector('#el-js'); function assertDomContent(elTree, expected) { el(outputEl, elTree); var actual = outputEl.innerHTML.replace(/\s+/g, ' ').trim(); if (actual === expected) return; throw new Error('\n\nExpected: ' + expected + '\n Actual: ' + act...
Add a more involved test case.
Add a more involved test case.
JavaScript
mit
jareware/el-js,jareware/el-js
5f60d993ec79f7bfb228bf21d80ef7734f49a1c6
assets/star-ratings.js
assets/star-ratings.js
jQuery(function() { jQuery('[data-star-rating]').each(function(index, element) { element = $(element); var data = element.data('star-rating'), globalOptions = window.StarRatingsOptions ? window.StarRatingsOptions : {}, options = jQuery.extend(data.options, globalOptions, { ...
jQuery(function() { jQuery('[data-star-rating]').each(function(index, element) { element = $(element); var data = element.data('star-rating'), globalOptions = window.StarRatingsOptions ? window.StarRatingsOptions : {}, options = jQuery.extend(data.options, globalOptions, { ...
Disable voting if already voted
Disable voting if already voted
JavaScript
mit
getgrav/grav-plugin-star-ratings,getgrav/grav-plugin-star-ratings
3d890bed0ade1b37d11ca064f7effaf52cddd6d5
tasks/ie-css.js
tasks/ie-css.js
'use strict'; var paths = require('./_paths'); var gulp = require('gulp'); var filter = require('gulp-filter'); var sass = require('gulp-ruby-sass'); var browserSync = require('browser-sync'); var reload = browserSync.reload; gulp.task('ie-css', ['clean-iecss'], function() { return gulp .src(paths.ie_styles) ...
'use strict'; var paths = require('./_paths'); var gulp = require('gulp'); var filter = require('gulp-filter'); var sass = require('gulp-ruby-sass'); var browserSync = require('browser-sync'); var reload = browserSync.reload; gulp.task('ie-css', ['clean-iecss'], function() { return gulp .src(paths.ie_styles) ...
Fix Guild IE CSS loadPath
Fix Guild IE CSS loadPath
JavaScript
mit
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
ac53eae4bf2b16bc0ced80dd266cac69dec4091c
tasks/rename.js
tasks/rename.js
/* * grunt-contrib-rename (unofficial) * https://github.com/jasonlam604/grunt-contrib-rename * * Copyright (c) 2013 Jason Lam * Licensed under the MIT license. * https://github.com/jasonlam604/grunt-contrib-rename/blob/master/LICENSE-MIT */ 'use strict'; var fs = require('fs'); module.exports = function(grunt)...
/* * grunt-rename-util * https://github.com/jasonlam604/grunt-rename-util * * Copyright (c) 2013 Jason Lam * Licensed under the MIT license. * https://github.com/jasonlam604/grunt-rename-util/blob/master/LICENSE-MIT */ 'use strict'; var fs = require('fs'); module.exports = function(grunt) { grunt.registerMu...
Update comment to reflect new package name
Update comment to reflect new package name
JavaScript
mit
jasonlam604/grunt-rename-util
52e10c2b6e7e934e6d4dccf762f99490d04ec0b9
src/sorter/Code.js
src/sorter/Code.js
Ext.define('Slate.sorter.Code', { extend: 'Ext.util.Sorter', config: { numberRe: /^\d+$/, numberDelim: '.', sorterFn: function(a, b) { var codeA = a.get('Code').toLowerCase(), codeB = b.get('Code').toLowerCase(), numberRe = this._numberRe, /...
Ext.define('Slate.sorter.Code', { extend: 'Ext.util.Sorter', config: { numberRe: /^\d+$/, numberDelim: '.', codeFn: function(item) { return item.get('Code'); }, sorterFn: function(a, b) { var me = this, codeFn = me._codeFn, // e...
Add support for configurable function to extract code from item for sorting
Add support for configurable function to extract code from item for sorting
JavaScript
mit
SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-core-data
337d2a3caf472418f830c5e8b2a017d3f28d2639
scripts/check-deps.js
scripts/check-deps.js
if (process.platform != 'win32') { var commandExists = require('command-exists'); var colors = require('colors'); var depedencies = [ 'automake', 'autoconf', 'pkg-config', 'wget', 'libtool', 'python2' ]; depedencies.forEach(function(dep) { commandExists(dep, function(err, commandE...
if (process.platform != 'win32') { var commandExists = require('command-exists'); var colors = require('colors'); var depedencies = [ 'make', 'gcc', 'automake', 'autoconf', 'pkg-config', 'wget', 'libtool', 'python2' ]; depedencies.forEach(function(dep) { commandExists(dep,...
Add make and gcc to dependencies
chore(install): Add make and gcc to dependencies
JavaScript
bsd-3-clause
rgbkrk/nteract,0u812/nteract,nteract/composition,captainsafia/nteract,0u812/nteract,0u812/nteract,rgbkrk/nteract,captainsafia/nteract,jdfreder/nteract,temogen/nteract,rgbkrk/nteract,nteract/nteract,jdfreder/nteract,jdetle/nteract,temogen/nteract,jdfreder/nteract,rgbkrk/nteract,nteract/nteract,jdetle/nteract,captainsafi...
bc32a1093640bc3698d6007ac6c12916464c7d0b
test/base/tests/events.js
test/base/tests/events.js
var assert = require('assert'); var equal = assert.equal; var path = require('path'); var basePath = process.cwd(); module.exports = function() { var Events = require(path.resolve(basePath + '/lib/base/events')); describe('Events', function() { var events; var handlersRun; beforeEach(function() { ...
var path = require('path'); module.exports = function() { var Events = require(path.resolve(process.cwd(), 'lib/base/events')); describe('Events', function() { var events; beforeEach(function() { events = new Events(); }); describe('#off()', function() { it('should deregister multipl...
Refactor and add new Events unit tests
Refactor and add new Events unit tests
JavaScript
mit
bookshelf/bookshelf,tgriesser/bookshelf,bookshelf/bookshelf,tgriesser/bookshelf
154a920fa09010149be4fdb8e5ca5727ac8f460a
src/ns_ua/connectors/ConnectorWebSocket.js
src/ns_ua/connectors/ConnectorWebSocket.js
/* jshint node:true */ /** * PUSH Notification server * (c) Telefonica Digital, 2012 - All rights reserved * License: GNU Affero V3 (see LICENSE file) * Fernando Rodríguez Sela <frsela@tid.es> * Guillermo Lopez Leal <gll@tid.es> */ 'use strict'; function ConnectorWebSocket(data, connection) { this.data = d...
/* jshint node:true */ /** * PUSH Notification server * (c) Telefonica Digital, 2012 - All rights reserved * License: GNU Affero V3 (see LICENSE file) * Fernando Rodríguez Sela <frsela@tid.es> * Guillermo Lopez Leal <gll@tid.es> */ 'use strict'; function ConnectorWebSocket(data, connection) { this.data = d...
Save mcc-mnc data to WS connector, so monitor is able to print logs for Deployment KPIs
Save mcc-mnc data to WS connector, so monitor is able to print logs for Deployment KPIs
JavaScript
agpl-3.0
telefonicaid/notification_server,frsela/notification_server,frsela/notification_server,frsela/notification_server,telefonicaid/notification_server,telefonicaid/notification_server,frsela/notification_server,telefonicaid/notification_server,frsela/notification_server,telefonicaid/notification_server
a4249a8023d8bad5d259d7dbd026a78cef378574
tasks/js-vendor.js
tasks/js-vendor.js
module.exports = function(gulp, speck) { return gulp.task('js:vendor', function() { var uglify = require('gulp-uglify'), gulpif = require('gulp-if'), insert = require('gulp-insert'), concat = require('gulp-concat'); return gulp.src(speck.config.vendorJS) .pipe(gulpif(speck.build.env.o...
module.exports = function(gulp, speck) { return gulp.task('js:vendor', function() { var uglify = require('gulp-uglify'), gulpif = require('gulp-if'), insert = require('gulp-insert'), size = require('gulp-size'), concat = require('gulp-concat'); return gulp.src(speck.config.vendorJS) ...
Add size loging for vendor.js file
Add size loging for vendor.js file
JavaScript
mit
graincreative/speck-build
61a982dd82fcd6c67d4bd65c548b5afbd66170df
server/simulatency.js
server/simulatency.js
global.simulatency = {} global.simulatency.timeout = 0 inject(Meteor.server.stream_server.server._events, 'connection', function (args, done) { inject(args[0], 'write', function (args, done) { setTimeout(done, global.simulatency.timeout) }) done() }) function httpDelay (args, done) { global.simulatency.t...
global.simulatency = {} global.simulatency.timeout = 0 inject(Meteor.server.stream_server.server._events, 'connection', function (args, done) { inject(args[0], 'write', function (args, done) { setTimeout(done, global.simulatency.timeout) }) inject(args[0], 'data', function (args, done) { setTimeout(done...
Add a lag to incomming messages
Add a lag to incomming messages
JavaScript
mit
Kriegslustig/meteor-simulatency
a92b96355bf7596c76b3fc7d751beb9fb6f7d2d6
styleguide/docs/react/copy-to-clipboard.js
styleguide/docs/react/copy-to-clipboard.js
/*doc --- title: Copy To Clipboard name: copy_to_clipboard_react categories: - react_components_copy-to-clipboard - react_all --- <code class="pam"> <i class="fa fa-download" alt="Install the Component"></i> npm install pui-react-copy-to-clipboard --save </code> Require the subcomponents: ``` var CopyTo...
/*doc --- title: Copy To Clipboard name: copy_to_clipboard_react categories: - react_components_copy-to-clipboard - react_all --- <code class="pam"> <i class="fa fa-download" alt="Install the Component"></i> npm install pui-react-copy-to-clipboard --save </code> Require the subcomponents: ``` var CopyTo...
Add a note to the copy to clipboard example on styleguide
chore(styleguide): Add a note to the copy to clipboard example on styleguide
JavaScript
mit
sjolicoeur/pivotal-ui,sjolicoeur/pivotal-ui,pivotal-cf/pivotal-ui,sjolicoeur/pivotal-ui,sjolicoeur/pivotal-ui,pivotal-cf/pivotal-ui,pivotal-cf/pivotal-ui
ce427afb7926118dc417ed6c8b6e4155aa1663a3
test/browser/tests/script_proxy_dynamic.js
test/browser/tests/script_proxy_dynamic.js
test('script_proxy_dynamic.php', function (assert, document) { var h1s = document.getElementsByTagName('h1'); assert.equal(h1s.length, 1, "There should be one <H1> element on the page"); assert.equal(h1s[0].textContent, 'Hello, World!', "The <H1> should say 'Hello, World!'"); var scripts = document.get...
test('script_proxy_dynamic.php', function (assert, document) { wait(assert, function () { return document.getElementsByTagName('h1').length > 0; }, function () { var h1s = document.getElementsByTagName('h1'); assert.equal(h1s.length, 1, "There should be one <H1> element on the page"); ...
Fix timing issue with browser test
Fix timing issue with browser test
JavaScript
agpl-3.0
kiboit/phast,kiboit/phast,kiboit/phast
787caca737327d851aa1c8af315124a2c1297e78
js/i18n.js
js/i18n.js
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; import Jed from "jed"; import locales from "./locales"; export function init(lang) { if (!lang...
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; import Jed from "jed"; import locales from "./locales"; // Convert a language tag to a dash-separa...
Fix for variations in language tags
Fix for variations in language tags
JavaScript
mpl-2.0
senshu/Sozi,senshu/Sozi,senshu/Sozi,senshu/Sozi
0545caf197575df54953682d6f949f0fa361e5e6
src/index.js
src/index.js
import React from 'react' import { render } from 'react-dom' import './stylesheets/ui.scss' import { SkiDayList } from './components/SkiDayList' window.React = React render( <SkiDayList days="plenty of days"/>, document.getElementById('react-container') )
import React from 'react' import { render } from 'react-dom' import './stylesheets/ui.scss' import { SkiDayList } from './components/SkiDayList' window.React = React render( <SkiDayList days={[]}/>, document.getElementById('react-container') )
Check for error message when an empty array is passed.
Check for error message when an empty array is passed.
JavaScript
mit
shawfire/ReactReduxActivityCounter
7235177460f4471015234e0c71500b208cdd45da
src/index.js
src/index.js
import configureUrlQuery from './configureUrlQuery'; import * as Serialize from './serialize'; import { replaceInUrlQuery, replaceUrlQuery, pushInUrlQuery, pushUrlQuery, } from './updateUrlQuery'; import UrlQueryParamTypes from './UrlQueryParamTypes'; import UrlUpdateTypes from './UrlUpdateTypes'; /** React *...
export configureUrlQuery from './configureUrlQuery'; export * as Serialize, { encode, decode } from './serialize'; export { replaceInUrlQuery, replaceUrlQuery, pushInUrlQuery, pushUrlQuery, } from './updateUrlQuery'; export UrlQueryParamTypes from './UrlQueryParamTypes'; export UrlUpdateTypes from './UrlUpdate...
Switch to using export statements
Switch to using export statements
JavaScript
mit
pbeshai/react-url-query
3f38126c03c50211b5434e5276208f0c7c2e9a9b
src/assets/js/main.js
src/assets/js/main.js
var scene = require('./Utils/Scene').create(); var camera = require('./Utils/Camera').create(); var renderer = require('./Utils/Renderer').create(); var terrain = require('./Terrain').create(scene, camera, renderer); var sounds = require('./Sounds'); var controls = require('./Controls').create(camera); var UI = requir...
var scene = require('./Utils/Scene').create(); var camera = require('./Utils/Camera').create(); var renderer = require('./Utils/Renderer').create(); var terrain = require('./Terrain').create(scene, camera, renderer); var sounds = require('./Sounds'); var controls = require('./Controls').create(camera); var UI = requir...
Update controls behavior on update
Update controls behavior on update
JavaScript
mit
Thomeuxe/LUMA-VR-experiment,Thomeuxe/LUMA-VR-experiment
dc6f65915e0b146042e598a4642e42b4d983f383
ui/karma-appveyor.conf.js
ui/karma-appveyor.conf.js
module.exports = function (config) { 'use strict' config.set({ frameworks: ['jspm', 'mocha', 'chai', 'sinon'], jspm: { config: 'src/jspm.conf.js', loadFiles: [ 'node_modules/es6-shim/es6-shim.js', 'test/**/*.spec.js' ], serveFiles: [ 'node_modules/es6-shim/e...
module.exports = function (config) { 'use strict' config.set({ frameworks: ['jspm', 'mocha', 'chai', 'sinon'], jspm: { config: 'src/jspm.conf.js', loadFiles: [ 'node_modules/es6-shim/es6-shim.js', 'test/**/*.spec.js' ], serveFiles: [ 'node_modules/es6-shim/e...
Increase some timeouts. Hopefully that resolves some "Disconnected" issues on AppVeyor.
Increase some timeouts. Hopefully that resolves some "Disconnected" issues on AppVeyor.
JavaScript
mit
jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr
b6b70eeb85cb0ed9729d13e2fb52aa2dcb9c3d87
lib/cli.js
lib/cli.js
var Clairvoyance = require('./clairvoyance'); module.exports = new CLI(); function CLI() {} CLI.prototype.start = function(options) { this.parser = new Clairvoyance(options); this.parser.run(function(result) { console.log(result); }); }
var Clairvoyance = require('./clairvoyance'), fs = require('fs'); module.exports = new CLI(); function CLI() {} CLI.prototype.start = function(options) { this.parser = new Clairvoyance(options); this.parser.run(function(result) { fs.mkdir('coverage', function(err) { var data = JSON.stringify(result...
Use a json file instead of console
Use a json file instead of console
JavaScript
mit
sinsoku/clairvoyance,sinsoku/clairvoyance
aeae26fe4ffdb6537b37ce48bef87b988fe412af
lib/run.js
lib/run.js
'use strict'; var hasArgument = require('./hasArgument'); var isCommand = require('./isCommand'); var replaceArgument = require('./replaceArgument'); var replaceCommand = require('./replaceCommand'); var spawnMeteor = require('./spawnMeteor'); var spawnTestPackagesMeteor = require('./spawnTestPackagesMeteor'); module...
'use strict'; var hasArgument = require('./hasArgument'); var isCommand = require('./isCommand'); var replaceArgument = require('./replaceArgument'); var replaceCommand = require('./replaceCommand'); var spawnMeteor = require('./spawnMeteor'); var spawnTestPackagesMeteor = require('./spawnTestPackagesMeteor'); module...
Add test-app command to help output
Add test-app command to help output
JavaScript
mit
kmills006/velocity-cli,meteor-velocity/velocity-cli
8235e2e93031c51a7d66330346ce3408734e2154
app/sessionManager.js
app/sessionManager.js
'use strict'; var React = require('react-native'); var Constants = require('./constants'); var { AsyncStorage } = React; var SessionManager = { login: function(user) { return new Promise(function(resolve, reject) { var url = Constants.APP_SERVER_HOST + '/users/register'; fetch(url, { method...
'use strict'; var React = require('react-native'); var Constants = require('./constants'); var { AsyncStorage } = React; const CURRENT_USER_STORAGE_KEY = 'currentUser'; var SessionManager = { login: function(user) { return new Promise(function(resolve, reject) { var url = Constants.APP_SERVER_HOST + '/u...
Move the CURRENT_USER_STORAGE_KEY constant to SessionManager
Move the CURRENT_USER_STORAGE_KEY constant to SessionManager
JavaScript
mit
multunus/moveit-mobile,multunus/moveit-mobile,multunus/moveit-mobile
ef755bc3ff15a5df4852b18e8833bf9dd37c3332
sw.js
sw.js
/** * Created by Alvaro on 18/03/2017. */ // use a cacheName for cache versioning var CACHE_NAME = 'static-v1'; var urlsToCache = [ './', './js/main.js' ]; // during the install phase you usually want to cache static assets self.addEventListener('install', function(event) { // once the SW is installed, go ahe...
/** * Created by Alvaro on 18/03/2017. */ // use a cacheName for cache versioning var CACHE_NAME = 'static-v0.0.1'; var urlsToCache = [ './', './js/main.js', './js/build/ObjectivesList.js', './js/vendor/react.min.js', './js/vendor/react-com.min.js' ]; // during the install phase you usually want to cache ...
Add more objects to cache in the service worker.
Add more objects to cache in the service worker.
JavaScript
apache-2.0
varomorf/gallu,varomorf/gallu
fb5826a7ee4df0f21e1fbe19a8f6c599cae85b62
apps/jsdoc/actions.js
apps/jsdoc/actions.js
include('helma/webapp/response'); include('helma/jsdoc'); require('core/array'); var log = require('helma/logging').getLogger(module.id); exports.index = function index(req, module) { var repo = new ScriptRepository(require.paths.peek()); if (module && module != "/") { var res = repo.getScriptResource...
include('helma/webapp/response'); include('helma/jsdoc'); require('core/array'); var log = require('helma/logging').getLogger(module.id); exports.index = function index(req, module) { var repo = new ScriptRepository(require.paths.peek()); if (module && module != "/") { var res = repo.getScriptResource...
Exclude test suite from jsdoc
Exclude test suite from jsdoc
JavaScript
apache-2.0
ashwinrayaprolu1984/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,ringo/ringojs,oberhamsi/ringojs,oberhamsi/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,oberhamsi/ringojs,Transcordia/ringojs
0ed14bb802725a4e40930e9ff1fb44f7ab8cf302
app.js
app.js
var express = require('express'); var routes = require('./routes'); var http = require('http'); var path = require('path'); var app = express(); // all environments app.set('port', process.env.PORT || 3000); app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'hjs'); app.use(express.f...
var express = require('express'); var routes = require('./routes'); var http = require('http'); var path = require('path'); var app = express(); // all environments app.set('port', process.env.PORT || 3000); app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'hjs'); // app.use(expres...
Comment out favicon. No icon added to project
Comment out favicon. No icon added to project
JavaScript
mit
tmn/Bybussen-API
e7ce9debb95aa036687ea9b215ff279b3daf6503
cli.js
cli.js
#!/usr/bin/env node var replace = require('stream-replace') var path = require('path') var name = require(path.join(process.cwd(), 'package.json')).name process.stdin .pipe( replace( new RegExp('require\\(\s*[\'"]' + name + '[\'"]\s*\\)', 'g'), 'require(\'./\')')) .pipe(process.stdout)
#!/usr/bin/env node var replace = require('stream-replace') var path = require('path') var name = require(path.join(process.cwd(), 'package.json')).name process.stdin .pipe( replace( new RegExp('require\\(\s*[\'"]' + name, 'g'), 'require(\'./')) .pipe(process.stdout)
Replace only the first part of the require call
Replace only the first part of the require call This permits replacement of submodule require statements like `require('this-package/some-submodule')`.
JavaScript
mit
kemitchell/replace-require-self.js
35217df984785bf2b1348b3633de8fdae4158395
esm.js
esm.js
let base = require('./ts') module.exports = { ...base, plugins: [...base.plugins], rules: { ...base.rules, 'unicorn/prefer-module': 'error', 'import/extensions': [ 'error', 'always', { ignorePackages: true } ] }, overrides: [ ...base.overrides, { ...
let base = require('./ts') module.exports = { ...base, plugins: [...base.plugins], rules: { ...base.rules, // 'unicorn/prefer-node-protocol': 'error', 'unicorn/prefer-module': 'error', 'import/extensions': [ 'error', 'always', { ignorePackages: true } ] }, ...
Add note to enable unicorn/prefer-node-protocol on ESLint 8 release
Add note to enable unicorn/prefer-node-protocol on ESLint 8 release
JavaScript
mit
logux/eslint-config-logux
2ca121226675a63f46331365399a013ebb062293
src/components/radio/radio.stories.js
src/components/radio/radio.stories.js
import React from 'react'; import { addStoryInGroup, LOW_LEVEL_BLOCKS } from '../../../.storybook/utils'; import { Store, State } from '@sambego/storybook-state'; import { RadioGroup, RadioButton } from '../../index'; const values = ['Option one', 'Option two', 'Option three']; const store = new Store({ value: 'Opt...
import React, { useState } from 'react'; import { addStoryInGroup, LOW_LEVEL_BLOCKS } from '../../../.storybook/utils'; import { RadioGroup, RadioButton } from '../../index'; const values = ['Option one', 'Option two', 'Option three']; export default { component: RadioButton, title: addStoryInGroup(LOW_LEVEL_BLOC...
Replace storybook-state usage from radio story with useState
Replace storybook-state usage from radio story with useState
JavaScript
mit
teamleadercrm/teamleader-ui
2a70eb70034da3dd661935034c838ef064515679
src/app/routes/popularNamesPerState.js
src/app/routes/popularNamesPerState.js
/*global exports */ (function () { "use strict"; var popularNamesPerState = function(req, res) { var body = JSON.stringify([ {name: 'Smith', geo: {lat: -37.716, lon: 144.891}}, {name: 'Jones', geo: {lat: -41.218, lon: 1446.188}}, {name: 'Nyuan', geo: {lat: -25.173, ...
/*global exports */ (function () { "use strict"; var popularNamesPerState = function(req, res) { var body = JSON.stringify([ {name: 'Smith', geo: {lat: -36.64, lon: 144.11}}, {name: 'Smith', geo: {lat: -31.0, lon: 146.4}}, {name: 'Smith', geo: {lat: -24.9, lon: 145....
Add all of the states
Add all of the states
JavaScript
mit
davidbkemp/namecloud,davidbkemp/namecloud
49e7f5687dd4376465f242498ad89687db6d8e8b
client/common/init.js
client/common/init.js
'use strict'; /** * client **/ /** * client.common **/ /*global $, _, nodeca, window, document*/ /** * client.common.init() * * Assigns all necessary event listeners and handlers. * * * ##### Example * * nodeca.client.common.init(); **/ module.exports = function () { nodeca.io.init(); ...
'use strict'; /** * client **/ /** * client.common **/ /*global $, _, nodeca, window, document*/ /** * client.common.init() * * Assigns all necessary event listeners and handlers. * * * ##### Example * * nodeca.client.common.init(); **/ module.exports = function () { nodeca.io.init(); ...
Revert "Prevent link processing for dropdowns"
Revert "Prevent link processing for dropdowns" This reverts commit 2cb937a4405627c94c05c391dd610b85ba7e1cad.
JavaScript
mit
nodeca/nodeca.core,nodeca/nodeca.core
5874c5ec875c86e8fdb7fc36d130e4bd7d65ecfd
corehq/apps/reports/static/reports/js/base.js
corehq/apps/reports/static/reports/js/base.js
hqDefine("reports/js/base", function() { $(function() { hqImport("reports/js/filters/main").init(); var initial_page_data = hqImport("hqwebapp/js/initial_page_data").get; var defaultConfig = initial_page_data('default_config') || {}; if (initial_page_data('has_datespan')) { ...
hqDefine("reports/js/base", function() { $(function() { hqImport("reports/js/filters/main").init(); var initial_page_data = hqImport("hqwebapp/js/initial_page_data").get; var defaultConfig = initial_page_data('default_config') || {}; if (initial_page_data('has_datespan')) { ...
Remove .export-action-download now that reports.download_export.js is gone
Remove .export-action-download now that reports.download_export.js is gone
JavaScript
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
aded5c6d0c859d34cd5af3cf4d15f28a924b6072
resources/frontend/app/pods/tournament/team/route.js
resources/frontend/app/pods/tournament/team/route.js
import Ember from 'ember'; const { Route, RSVP } = Ember; export default Route.extend({ deactivate() { this.store.peekAll('team-member').forEach((team) => { if (team.get('isNew')) { this.store.deleteRecord(team); } }); }, actions: { assignMember(member) { const flash...
import Ember from 'ember'; const { Route, RSVP } = Ember; export default Route.extend({ deactivate() { this.store.peekAll('team-member').forEach((team) => { if (team.get('isNew')) { this.store.deleteRecord(team); } }); }, actions: { assignMember(member) { const flash...
Fix assign member to the team
Fix assign member to the team
JavaScript
mit
nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf
deb10144063783d164a79880a3fe8b6b9b4ada09
cors-anywhere.js
cors-anywhere.js
// Heroku defines the environment variable PORT, and requires the binding address to be 0.0.0.0 var host = process.env.PORT ? '0.0.0.0' : '127.0.0.1'; var port = process.env.PORT || 9199; var cors_proxy = require('cors-anywhere'); cors_proxy.createServer({ //requireHeader: ['origin', 'x-requested-with'], remov...
// Heroku defines the environment variable PORT, and requires the binding address to be 0.0.0.0 var host = '0.0.0.0'; //'127.0.0.1'; //process.env.PORT ? '0.0.0.0' : '127.0.0.1'; var port = process.env.PORT || 9199; var cors_proxy = require('cors-anywhere'); cors_proxy.createServer({ //requireHeader: ['origin', 'x...
Update cors port to bind to default addr
Update cors port to bind to default addr
JavaScript
apache-2.0
rkuzsma/inverted-kanban
d6d02302aeaf362bd39478946f9313b7b2dd3103
js/services/locationStorage.js
js/services/locationStorage.js
'use strict'; app.factory('locationStorageService', function() { var STORAGE_ID = 'locations-angularjs'; // local storage if (!window.localStorage) { return { get: function() { return JSON.parse(localStorage.getItem(STORAGE_ID) || '[]'); }, set: function(locations) { localStorage.setItem(STOR...
'use strict'; app.factory('locationStorageService', function() { var STORAGE_ID = 'locations-angularjs'; return { get: function() { return JSON.parse(localStorage.getItem(STORAGE_ID) || '[]'); }, set: function(locations) { localStorage.setItem(STORAGE_ID, JSON.stringify(locations)); } }; });
Revert "rough demo of multiple storage service solution"
Revert "rough demo of multiple storage service solution" This reverts commit b48f0ad1777790b931dbec1ae5c0e448fa8f1fc5.
JavaScript
mit
patrickng/weatherapp-angular
bb6ebacf00f5fd8a30bce9e44e5649e641ceccd1
web.js
web.js
var express = require('express'); var app = express(); app.get('/', function(request, response) { response.sendfile(__dirname + '/index.html'); }); app.configure(function() { app.use('/css', express.static(__dirname + '/css')); app.use('/flash', express.static(__dirname + '/flash')); app.use('/img', ...
var express = require('express'); var app = express(); app.get('/', function(request, response) { response.sendfile(__dirname + '/index.html'); }); app.configure(function() { app.use('/css', express.static(__dirname + '/css')); app.use('/flash', express.static(__dirname + '/flash')); app.use('/img', ...
Fix for plugins directory not being available
Fix for plugins directory not being available
JavaScript
mit
poshaughnessy/edtechdevs-awesome-mobile-animations
5eaa3b5c48b521e1aae1cd6568850d9cc36f4f33
examples/client/app.js
examples/client/app.js
angular.module('MyApp', ['ngResource', 'ngMessages', 'ngRoute', 'ngAuth', 'mgcrea.ngStrap']) .config(function($routeProvider, AuthProvider) { $routeProvider .when('/', { templateUrl: 'views/home.html', controller: 'HomeCtrl' }) .when('/login', { templateUrl: 'views/login....
angular.module('MyApp', ['ngResource', 'ngMessages', 'ngRoute', 'ngAuth', 'mgcrea.ngStrap']) .config(function($routeProvider, AuthProvider) { $routeProvider .when('/', { templateUrl: 'views/home.html', controller: 'HomeCtrl' }) .when('/login', { templateUrl: 'views/login....
Add api example usage inside configure method
Add api example usage inside configure method
JavaScript
mit
maciekrb/satellizer,TechyTimo/carbon,sahat/satellizer,peterkim-ijet/satellizer,gshireesh/satellizer,hsr-ba-fs15-dat/satellizer,NikolayGalkin/satellizer,maciekrb/satellizer,gshireesh/satellizer,jskrzypek/satellizer,shikhardb/satellizer,burasu/satellizer,gregoriusxu/satellizer,dgoguerra/satellizer,amitport/satellizer,Nik...
2ac8051cea70d2023f866e22524445903103085a
extension.js
extension.js
// The module 'vscode' contains the VS Code extensibility API // Import the module and reference it with the alias vscode in your code below var vscode = require('vscode'); // this method is called when your extension is activated // your extension is activated the very first time the command is executed function acti...
const vscode = require('vscode'); function quickOpen() { const { fileName } = vscode.window.activeTextEditor.document; const fileNameParts = fileName.split('/'); const prefilledText = fileNameParts[fileNameParts.length - 1]; vscode.commands.executeCommand('workbench.action.quickOpen', prefilledText); } functi...
Create basic proof of concept
Create basic proof of concept
JavaScript
mit
schreifels/vscode-quick-open-related-files,schreifels/vscode-quick-open-related-files
f854d864bab0a844c640b1423a5129bd2fa4412d
app/errors.js
app/errors.js
export class UnknownCharError extends Error { constructor(unknownChar) { super(`Character '${unknownChar}' is not a part of the alphabet.`) } } export class UnknownStateError extends Error { constructor(stateName) { super(`State '${stateName}' doesn't exist in the automata.`) } } expor...
export class UnknownCharError extends Error { constructor(unknownChar) { super(`Character '${unknownChar}' is not a part of the alphabet.`) } } export class UnknownStateError extends Error { constructor(stateName) { super(`State '${stateName}' doesn't exist in the automata.`) } } expor...
Add error for invalid pda transitions
Add error for invalid pda transitions
JavaScript
mit
danielzy95/automaton-visualizer,danielzy95/automaton-visualizer
5c875d9125aa71f16e1d9cc0653baa8e2bc2596d
app/assets/javascripts/modules/track-brexit-qa-choices.js
app/assets/javascripts/modules/track-brexit-qa-choices.js
window.GOVUK = window.GOVUK || {} window.GOVUK.Modules = window.GOVUK.Modules || {}; (function (global, GOVUK) { 'use strict' var $ = global.jQuery GOVUK.Modules.TrackBrexitQaChoices = function () { this.start = function (element) { track(element) } function track (element) { element.o...
window.GOVUK = window.GOVUK || {} window.GOVUK.Modules = window.GOVUK.Modules || {}; (function (global, GOVUK) { 'use strict' GOVUK.Modules.TrackBrexitQaChoices = function () { this.start = function (element) { track(element) } function track (element) { element.on('submit', function (eve...
Change jquery `find` to `querySelectorAll`
Change jquery `find` to `querySelectorAll` Using `querySelectorAll` rather than `querySelector` as input is a list of radio buttons or checkboxes Remove global JQuery object as we're no longer using it.
JavaScript
mit
alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend
5f8380e95098801b392ac102381a76212352415c
grunt/css.js
grunt/css.js
module.exports = function(grunt) { //grunt-sass grunt.config('sass', { options: { outputStyle: 'expanded', //includePaths: ['<%= config.scss.includePaths %>'], imagePath: '../<%= config.image.dir %>' }, dist: { files: { '...
module.exports = function(grunt) { //grunt-sass grunt.config('sass', { options: { outputStyle: 'expanded', //includePaths: ['<%= config.scss.includePaths %>'], imagePath: '../<%= config.image.dir %>', sourceComments: true }, dist: { ...
Enable debug comments in grunt-sass output file
Enable debug comments in grunt-sass output file
JavaScript
mit
SnceGroup/grunt-config-for-websites,SnceGroup/grunt-config-for-websites
7b00cb9900a4286b6dc4204660a1f16f59bae321
dropbox-fetch.js
dropbox-fetch.js
/** * The authorization token with which calls to the API are made. * @type {String} */ let token = ''; /** * Authorize via OAuth 2.0 for Dropbox API calls. * * @parameter {string} clientId your app's key * @parameter {string} redirectUri the uri where the user should be redirected * to, after authorization ha...
/** * The authorization token with which calls to the API are made. * @type {String} */ let token = ''; const AUTHORIZE_ENDPOINT = 'https://www.dropbox.com/oauth2/authorize'; const getAuthorizationUrl = (clientId) => { return AUTHORIZE_ENDPOINT + '?' + 'response_type=token' + 'client_id=' + clientId; }; ...
Return the authorization url when `authorize` fails
Return the authorization url when `authorize` fails s.t. the user can manually authorize and set the token in `config.js`
JavaScript
mit
janis-kra/dropbox-fetch