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
e8cc571d6a0f12934b7909b4fe6c7250758b5a7b
src/Voice/VolumeTransformer.js
src/Voice/VolumeTransformer.js
const Transform = require('stream').Transform; /** * @see https://github.com/reneraab/pcm-volume/blob/master/index.js Inspired by this script */ class Volume extends Transform { constructor(volume) { super(); this.set(volume); } get volume() { return this._volume === undefined ? 1 : this._volume; } set ...
const Transform = require('stream').Transform; /** * @see https://github.com/reneraab/pcm-volume/blob/master/index.js Inspired by this script */ class Volume extends Transform { constructor(volume) { super(); this.set(volume); } get volume() { return this._volume === undefined ? 1 : this._volume; } set ...
Make the multiplier return the current volume without doing any math to it, so we can have different ways to set the multiplier in logarithmic ways.
Make the multiplier return the current volume without doing any math to it, so we can have different ways to set the multiplier in logarithmic ways.
JavaScript
apache-2.0
robflop/discord.js,Lewdcario/discord.js,CodeMan99/discord.js,CodeMan99/discord.js,SpaceEEC/discord.js,robflop/discord.js,appellation/discord.js,devsnek/discord.js,Lewdcario/discord.js,Drahcirius/discord.js,zajrik/discord.js,hydrabolt/discord.js,meew0/discord.js,SpaceEEC/discord.js,CodeMan99/discord.js,Drahcirius/discor...
31d5895a2a6fc0b9b2aeb05e79cc5bf0bb33cceb
lib/EventEmitter.js
lib/EventEmitter.js
/* coveraje - a simple javascript code coverage tool. EventEmitter wrapper Copyright (c) 2011 Wolfgang Kluge (klugesoftware.de, gehirnwindung.de) */ (function () { "use strict"; var EventEmitter = require("events").EventEmitter; function CoverajeEvent(wait) { var ev = ne...
/* coveraje - a simple javascript code coverage tool. EventEmitter wrapper Copyright (c) 2011 Wolfgang Kluge (klugesoftware.de, gehirnwindung.de) */ (function () { "use strict"; var EventEmitter = require("events").EventEmitter; function CoverajeEvent(wait) { var ev = ne...
Remove try/catch from event execution
Remove try/catch from event execution
JavaScript
mit
goatslacker/coveraje,coveraje/coveraje
5aa720bff42a99594d5d5984d6500b338dd99fef
web_app/routes/spotifyAPI.js
web_app/routes/spotifyAPI.js
var http = require( 'http' ); var errorHandler = function ( err, res ) { console.log( err ); res.send( 500 ); }; exports.trackSearch = function ( req, res ) { var apiOptions = { hostname: "ws.spotify.com", path: "/search/1/track.json?q=" + req.query.q }; var output = ""; va...
var SpotifySearch = require( 'spotify-search' ); var errorHandler = function ( err, res ) { console.log( err ); res.send( 500 ); }; exports.trackSearch = function ( req, res ) { var q = req.query.q; var page = req.query.page; SpotifySearch.track( q, page, function ( err, data ) { if ( ...
Refactor search into node module
Refactor search into node module
JavaScript
mit
projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox
c74719e698113e926d6dd8d529aaa56f7981c690
lib/util/archive.js
lib/util/archive.js
'use strict' const path = require('path') const execa = require('execa') async function unarchive(location) { const temp = path.join(path.dirname(location), '_unarchived') await execa('unar', ['-no-directory', '-output-directory', temp, location]) return temp } const archiveExtensions = [ 'zip', 'tar', ...
'use strict' const path = require('path') const execa = require('execa') async function unarchive(location) { const temp = path.join(path.dirname(location), '_unarchived') try { await execa('unar', ['-no-directory', '-output-directory', temp, location]) } catch (err) { throw new Error('Could not extrac...
Return readable message for unar errors
Return readable message for unar errors
JavaScript
mit
inspireteam/plunger,inspireteam/plunger
54522d1a072cc76c10b4953c62d7eca04af10152
packages/truffle-core/lib/deferredchain.js
packages/truffle-core/lib/deferredchain.js
function DeferredChain() { var self = this; this.chain = new Promise(function(accept, reject) { self._accept = accept; self._reject = reject; }); this.await = new Promise(function() { self._done = arguments[0]; }); this.started = false; }; DeferredChain.prototype.then = function(fn) { var se...
function DeferredChain() { var self = this; this.chain = new Promise(function(accept, reject) { self._accept = accept; self._reject = reject; }); this.await = new Promise(function() { self._done = arguments[0]; self._error = arguments[1]; }); this.started = false; }; DeferredChain.prototyp...
Fix issue where errors aren't being propagated.
Fix issue where errors aren't being propagated.
JavaScript
mit
ConsenSys/truffle
ce67bea1cad38d799ac20aba5643cdc338dab0f6
commands/run.js
commands/run.js
/* global __dirname */ (function() { 'use strict'; var gruntPath = __dirname + '/../Gruntfile.js', grunt = require('grunt'), build = require(gruntPath); module.exports = function(config) { var options = { b: __dirname, gruntfile: gruntPath }, task = config.options.length ? config.options[0...
/* global __dirname */ (function() { 'use strict'; var gruntPath = __dirname + '/../Gruntfile.js', grunt = require('grunt'), build = require(gruntPath); module.exports = function(config) { var options = { b: __dirname, gruntfile: gruntPath }, task = config.options.length ? config.options[0...
Set key-only command line arguments to true
Set key-only command line arguments to true
JavaScript
apache-2.0
weepower/wee-core
e11baceb5daa6f7cf21dfba0fa15172667515032
assets/scripts/index.js
assets/scripts/index.js
var path = require('path'); // ///////////////////////////////////////////////////////////////////////////// // ------------------------ Available modules --------------------------------// // ---------------------------------------------------------------------------// module.exports.hello = require('./hello'); // /...
var path = require('path'); // ///////////////////////////////////////////////////////////////////////////// // ------------------------ Available modules --------------------------------// // ---------------------------------------------------------------------------// module.exports.hello = require('./hello'); // /...
Fix missing svg bug on chrome
Fix missing svg bug on chrome
JavaScript
bsd-3-clause
hotosm/oam-docs,hotosm/oam-docs,hotosm/oam-docs
04e8730ad33e76fb63010a5e09eb66b538360471
app/assets/javascripts/controllers/buttons/button_group_controller.js
app/assets/javascripts/controllers/buttons/button_group_controller.js
ManageIQ.angular.app.controller('buttonGroupController', ['$scope', 'miqService', function($scope, miqService) { var init = function() { $scope.saveable = miqService.saveable; $scope.disabledClick = miqService.disabledClick; $scope.addText = __("Add"); $scope.saveText = __("Save"); $scope.resetTex...
ManageIQ.angular.app.controller('buttonGroupController', ['$scope', 'miqService', function($scope, miqService) { var init = function() { $scope.saveable = miqService.saveable; }; init(); }]);
Remove unused code in buttonGroupController
Remove unused code in buttonGroupController
JavaScript
apache-2.0
ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic
75fa139a6f2d3e5ac16597efadee714e1442e521
src/components/Footer.js
src/components/Footer.js
import React, {Component} from 'react'; // Footer Component const Footer = () => { return( <footer> <h5>&copy; {new Date().getFullYear()} Austin Lauritsen | Built in Nashville. Powered by <img src={require('../images/react_color.svg')}/> React + <img src={require('../images/redux_color.svg')}/> Redux...
import React, {Component} from 'react'; import styled from 'styled-components'; import Wrapper from './Wrapper'; import {Link} from 'react-router'; // Main Footer Component Styles const MainFooter = styled.footer` padding: 0 0 1em 0; border-top: 1px solid #C5C5C5; width: 100% ; font-weight: 500; `; // Footer ...
Implement very basic styles using styled-components
Implement very basic styles using styled-components
JavaScript
mit
veryaustin/veryaustin-2017-frontend,veryaustin/veryaustin-2017-frontend
ee177f6cbaed9a8c1ba43d4e4f725ec7bada6fc3
packages/react-native-codegen/src/generators/components/__tests__/GenerateViewConfigJs-test.js
packages/react-native-codegen/src/generators/components/__tests__/GenerateViewConfigJs-test.js
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+react_native * @flow strict-local * @format */ 'use strict'; const fixtures = require('../__test_fixtures__/f...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+react_native * @flow strict-local * @format */ 'use strict'; const fixtures = require('../__test_fixtures__/f...
Update ViewConfig generator test to follow new ComponentSchema
Update ViewConfig generator test to follow new ComponentSchema Summary: NOTE: Flow and Jest won't pass on this diff. Sandcastle, should, however, be green on D24236405 (i.e: the tip of this stack). Changelog: [Internal] (Note: this ignores all push blocking failures!) Reviewed By: PeteTheHeat Differential Revision...
JavaScript
mit
arthuralee/react-native,facebook/react-native,pandiaraj44/react-native,facebook/react-native,javache/react-native,pandiaraj44/react-native,javache/react-native,janicduplessis/react-native,facebook/react-native,arthuralee/react-native,facebook/react-native,javache/react-native,janicduplessis/react-native,myntra/react-na...
8db6d39ea1f7b73c0691815006dbef0fdb167ee0
client/app/landing/landing.js
client/app/landing/landing.js
angular.module('zeus.landing', []) .controller('LandingController', function($scope, Landing) { $scope.popularmovies = {}; $scope.latestmovies = {}; $scope.upcomingmovies = {}; $scope.fetchPopularMovies = function() { Landing.getPopularMovies() .then(function(data) { $scope.po...
angular.module('zeus.landing', []) .controller('LandingController', function($scope, Landing) { $scope.popularmovies = {}; $scope.latestmovies = {}; $scope.upcomingmovies = {}; $scope.popularshows = {}; $scope.latestshows = {}; $scope.fetchPopularMovies = function() { Landing.getPopular...
Add fetch methods for popular and airing today tv shows and data stores to hold results
Add fetch methods for popular and airing today tv shows and data stores to hold results
JavaScript
mit
Zeus-HatersGonaHate/Zeus-HatersGonaHate,Zeus-HatersGonaHate/Zeus-HatersGonaHate,ALeo23/Zeus-HatersGonaHate,ALeo23/Zeus-HatersGonaHate,ALeo23/Zeus-HatersGonaHate,Zeus-HatersGonaHate/Zeus-HatersGonaHate
2c2dd075bb84d63f59a64989e2f3be4fa73e031b
src/DifmBundle/Resources/public/js/playlist.js
src/DifmBundle/Resources/public/js/playlist.js
(function () { Playlist = function () { this.key = $("#key"); this.station = $("#station"); this.format = $(":input[name='optionsRadios']:checked"); this.download = $("#download"); this.quality = $("#quality"); this.registerHandlers(); }; Playlist.prototype.r...
(function () { Playlist = function () { this.key = "#key"; this.station = "#station"; this.format = ":input[name='optionsRadios']:checked"; this.download = "#download"; this.quality = "#quality"; this.registerHandlers(); }; Playlist.prototype.registerHandlers...
Fix js bug with checked option
Fix js bug with checked option
JavaScript
mit
janvernieuwe/difm-playlist,janvernieuwe/difm-playlist,janvernieuwe/difm-playlist
33f806a8dffb67dd1769699952a64e23683d3267
example/test.js
example/test.js
#import "SnapshotHelper.js" var target = UIATarget.localTarget(); var app = target.frontMostApp(); var window = app.mainWindow(); target.delay(3) captureLocalizedScreenshot("LandingScreen")
#import "SnapshotHelper.js" var target = UIATarget.localTarget(); var app = target.frontMostApp(); var window = app.mainWindow(); target.delay(3) captureLocalizedScreenshot("0-LandingScreen") target.frontMostApp().tabBar().buttons()[1].tap(); target.delay(1) captureLocalizedScreenshot("1-SecondScreen") target.setD...
Extend example script to show orientation and taps
Extend example script to show orientation and taps
JavaScript
mit
lmirosevic/fastlane,tcurdt/fastlane,NicholasFFox/fastlane,tpalmer/fastlane,mathiasAichinger/fastlane,rimarsh/fastlane,joshrlesch/fastlane,RishabhTayal/fastlane,keatongreve/fastlane,jeeftor/fastlane,lmirosevic/fastlane,revile/fastlane,KrauseFx/fastlane,iMokhles/fastlane,futuretap/fastlane,bgannin/fastlane,soxjke/fastlan...
09e766c0170699cb6f23c86f9b59a58ddb5c1444
client/app/i18n/containers.directive.js
client/app/i18n/containers.directive.js
'use strict'; angular.module('arethusaTranslateGuiApp').directive('containers', [ '$timeout', function($timeout) { return { restrict: 'A', scope: true, link: function(scope, element) { scope.$on('dataLoaded', function() { // When new data is loaded the DOM will take a while to upd...
'use strict'; angular.module('arethusaTranslateGuiApp').directive('containers', [ '$timeout', function($timeout) { return { restrict: 'A', scope: true, link: function(scope, element) { scope.$on('dataLoaded', function() { // When new data is loaded the DOM will take a while to upd...
Add easing function to auto-scroll
Add easing function to auto-scroll
JavaScript
mit
LFDM/angular-translate-gui
8e5303bb1f6188e3f929b9e6b47795aaee2838c0
src/components/search_results/SearchResults.js
src/components/search_results/SearchResults.js
import React from 'react' import ImdbResultsContainer from './ImdbResultsContainer' const SearchResults = ({searchResults}) => { if (searchResults.searchMovies.error) { return ( <h2>{searchResults.searchMovies.error.data}</h2> ) } else { return ( <div className="row"> <div className="...
import React from 'react' import ImdbResultsContainer from './ImdbResultsContainer' const SearchResults = ({searchResults}) => { if (searchResults.searchMovies.error) { return ( <h2>{searchResults.searchMovies.error.data}</h2> ) } else { return ( <div> <div className="bs-callout bs-ca...
Remove unused comments, fix component width
Remove unused comments, fix component width
JavaScript
mit
landrysoules/mmdb_front_react,landrysoules/mmdb_front_react
938f244199e0edcab8f565e9543782c136d79404
addon/components/radio-button.js
addon/components/radio-button.js
import Ember from 'ember'; import layout from '../templates/components/radio-button'; const { Component, computed } = Ember; export default Component.extend({ tagName: '', layout, // value - passed in, required, the value for this radio button // groupValue - passed in, required, the currently selected v...
import Ember from 'ember'; import layout from '../templates/components/radio-button'; const { Component, computed } = Ember; export default Component.extend({ tagName: '', layout, // value - passed in, required, the value for this radio button // groupValue - passed in, required, the currently selected v...
Use Ember.isEqual to set checked status
Use Ember.isEqual to set checked status
JavaScript
mit
yapplabs/ember-radio-button,yapplabs/ember-radio-button
b71270e34418e300f24f07339c1ab388e06a3d93
app.js
app.js
var express = require('express'); var path = require('path'); var index = require('./routes/index'); var app = express(); if(!process.env.API_KEY){ console.log('Set the Openweather API key as an environment variable named API_KEY'); process.exit(-1); } app.set('view engine', 'jade'); app.use('/', index); // c...
var express = require('express'); var path = require('path'); var index = require('./routes/index'); var app = express(); if(!process.env.API_KEY){ console.log('Set the Openweather API key as an environment variable named API_KEY'); process.exit(-1); } if(!process.env.CLIENT_KEYS){ console.log('Set the clien...
Add check for client keys in environment variable
Add check for client keys in environment variable
JavaScript
mit
umasudhan/weather
08bf14c389f856aa3cbef8cdd58c5e45856e7a11
bot.js
bot.js
import Mixpanel from 'mixpanel'; import path from 'path'; import fs from 'fs'; const mixpanel = Mixpanel.init(process.env.MIXPANEL_TOKEN); const commands = []; { const prefix = path.join(__dirname, 'commands'); fs.readdir(prefix, (err, files) => { files.forEach((file) => { const entry = require(path.joi...
import Mixpanel from 'mixpanel'; import path from 'path'; import fs from 'fs'; const mixpanel = Mixpanel.init(process.env.MIXPANEL_TOKEN); const commands = []; { const prefix = path.join(__dirname, 'commands'); fs.readdir(prefix, (err, files) => { files.forEach((file) => { const entry = require(path.joi...
Fix bug that send 'unknown' as command name every time
Fix bug that send 'unknown' as command name every time
JavaScript
mit
esoui/lexicon,esoui/lexicon
04c025774d9e974bf2f4d4ec2422867c7c239b40
lib/utils/links.js
lib/utils/links.js
var url = require('url'); var path = require('path'); // Is the link an external link var isExternal = function(href) { return Boolean(url.parse(href).protocol); }; // Return true if the link is relative var isRelative = function(href) { var parsed = url.parse(href); return !parsed.protocol && parsed.pat...
var url = require('url'); var path = require('path'); // Is the link an external link var isExternal = function(href) { try { return Boolean(url.parse(href).protocol); } catch(err) { } return false; }; // Return true if the link is relative var isRelative = function(href) { try { var ...
Improve robustness of link utility functions
Improve robustness of link utility functions Fixes #321, fixes #323
JavaScript
apache-2.0
vehar/gitbook,tzq668766/gitbook,Abhikos/gitbook,xxxhycl2010/gitbook,npracht/documentation,anrim/gitbook,npracht/documentation,jasonslyvia/gitbook,rohan07/gitbook,haamop/documentation,JohnTroony/gitbook,kamyu104/gitbook,iamchenxin/gitbook,thelastmile/gitbook,xcv58/gitbook,gencer/gitbook,megumiteam/documentation,iflyup/g...
d7b4f0c6f11174250215e952a38df9f3a7e9f5be
gpx.js
gpx.js
define(['jquery'], function($) { function Gpx(data) { this.points = []; var trkpts = data.documentElement.getElementsByTagName("trkpt"); for (var i = 0; i < trkpts.length; i++) { var trkpt = trkpts[i]; var lat = parseFloat(trkpt.getAttribute("lat")); var lon = parseFloat(trkpt.getAttribute("lon")); ...
define(['jquery'], function($) { function Gpx($gpx) { var tracks = []; $gpx.find("trk").each(function() { tracks.push(new Track($(this))); }); this.tracks = tracks; } function Track($trk) { this.name = $trk.find("name").text(); var trackSegments = []; $trk.find("trkseg").each(function() { track...
Restructure GPX according to GPX schema
Restructure GPX according to GPX schema
JavaScript
mit
alimfeld/gpxvis.js
580114f0e0be0b5142547217f52b76701f2e66cc
wunderline-week.js
wunderline-week.js
#!/usr/bin/env node var app = require('commander') var moment = require('moment') var getLists = require('./lib/get-lists') var printList = require('./lib/print-list') var auth = require('./lib/auth') app .description('View tasks due this week') .parse(process.argv) function main () { getLists(function (err, d...
#!/usr/bin/env node var app = require('commander') var moment = require('moment') var getLists = require('./lib/get-lists') var printList = require('./lib/print-list') var auth = require('./lib/auth') app .description('View tasks due this week') .parse(process.argv) function main () { getLists(function (err, d...
Use only this years week for the 'week' listing
Use only this years week for the 'week' listing
JavaScript
mit
wayneashleyberry/wunderline,Thor77/wunderline,we-are-next/wunderline
44a23f40bca1339a7e596a80dd286e5701d99054
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var gutil = require('gulp-util'); var notify = require('gulp-notify'); var less = require('gulp-less'); var autoprefix = require('gulp-autoprefixer'); var minifyCSS = require('gulp-minify-css') //Pre-compiled directory var lessDir = 'src/less'; //Compiled directory var targetCSSDir = 'css/...
var gulp = require('gulp'); var gutil = require('gulp-util'); var notify = require('gulp-notify'); var less = require('gulp-less'); var autoprefix = require('gulp-autoprefixer'); var minifyCSS = require('gulp-minify-css'); var connect = require('gulp-connect'); //Pre-compiled directory var lessDir = 'src/less'; //Com...
Add gulp-connect to serve project
Add gulp-connect to serve project
JavaScript
mpl-2.0
co60ca/moz-codecover-ui,co60ca/moz-codecover-ui,co60ca/moz-codecover-ui
37fea7584f4287ceca18287ba858e30066e84945
build/tasks/configs/requirejs.js
build/tasks/configs/requirejs.js
module.exports = { options: { baseUrl : "src/app", mainConfigFile: "src/app/config.js", name: "", out : "build/tmp/app/main.js", include: [ "main" ], findNestedDependencies: true, generateSourceMaps : false, optimize : "none", skipModuleInsertion: false, wrap ...
module.exports = { options: { baseUrl : "src/app", mainConfigFile: "src/app/config.js", name: "", out : "build/tmp/app/main.js", include: [ "main" ], findNestedDependencies: true, generateSourceMaps : false, optimize : "none", skipModuleInsertion: false, wrap ...
Fix old production library names... 4a9833c
Fix old production library names... 4a9833c
JavaScript
mit
arclupin/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,arclupin/livestreamer-twitch-gui,arclupin/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,Klaudit/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui,Rekapper/livestreamer-twitch-gui...
3b76f7e829fb8b9ecc59ed1a5b43661c8d73b77e
vendor/assets/javascripts/picktastic/onload.js
vendor/assets/javascripts/picktastic/onload.js
$(picktastic_init); picktasticProperties = ['dateFormat', 'minDate', 'maxDate', 'firstDay']; function picktastic_init() { var addProperty = function(object, input, key) { // haml lowercases all attribute-names so we need to look up the data attributes lowercased var value = input.data(key.toLowerCase()); ...
$(picktastic_init); picktasticProperties = ['dateFormat', 'minDate', 'maxDate', 'firstDay', 'monthNames', 'dayNames', 'dayNamesMin']; function picktastic_init() { var addProperty = function(object, input, key) { // haml lowercases all attribute-names so we need to look up the data attributes lowercased var ...
Add monthNames, dayNames and dayNamesShort to picktastic properties
Add monthNames, dayNames and dayNamesShort to picktastic properties
JavaScript
mit
fortytools/picktastic
bbcd7f30f231982357a24e9bbe12f13d4125f9f0
js/marcuswestin/views/TweetView.js
js/marcuswestin/views/TweetView.js
module('from lib.javascript import Class'); module('import class .View'); module('import lib.dom as dom'); exports.TweetView = Class(View, function(supr) { this.init = function(factory, data) { supr(this, 'init', arguments); this._tweet = data; } this.createContent = function() { supr(this, 'createConte...
module('from lib.javascript import Class'); module('import class .View'); module('import lib.dom as dom'); exports.TweetView = Class(View, function(supr) { this.init = function(factory, data) { supr(this, 'init', arguments); this._tweet = data; } this.createContent = function() { supr(this, 'createConte...
Use my photo in the twitter view if the tweet does not have one
Use my photo in the twitter view if the tweet does not have one
JavaScript
mit
marcuswestin/marcuswestin.com,marcuswestin/marcuswestin.com
442315448223da0464982de8f1709db002c747c8
app/scripts/main.js
app/scripts/main.js
/* global displayer */ var calculation = []; var operation = ""; var result function display() { operation = calculation.join(""); $('#displayer').html(operation) } $(document).ready(function () { $('#one').click(function () { calculation.push(1); display() }); $('#plus').clic...
/* global displayer */ var calculation = []; var operation = ""; var result function display() { operation = calculation.join(""); $('#displayer').html(operation) } $(document).ready(function () { $('#one').click(function () { calculation.push(1); display() }); $('#two').click...
Add JS function for all numbers & operators
Add JS function for all numbers & operators
JavaScript
mit
thomas-duval/FCC-JavaScript-Calculator,thomas-duval/Calculator,thomas-duval/Calculator,thomas-duval/FCC-JavaScript-Calculator
860e611f03d124217e7a020c67f8f5685f105400
src/interface/report/Results/Character/PlayerInfo/PlayerGearHeader.js
src/interface/report/Results/Character/PlayerInfo/PlayerGearHeader.js
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { makeCharacterUrl } from 'interface/common/makeAnalyzerUrl'; const PlayerGearHeader = ({ player, averageIlvl }) => ( <div className="player-gear-header"> <div className={`${player.spec.className.repla...
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { makeCharacterUrl } from 'interface/common/makeAnalyzerUrl'; const PlayerGearHeader = ({ player, averageIlvl }) => ( <div className="player-gear-header"> <div className={`${player.spec.className.repla...
Fix crash in character tab when race is unknown
Fix crash in character tab when race is unknown
JavaScript
agpl-3.0
WoWAnalyzer/WoWAnalyzer,yajinni/WoWAnalyzer,anom0ly/WoWAnalyzer,Juko8/WoWAnalyzer,fyruna/WoWAnalyzer,sMteX/WoWAnalyzer,ronaldpereira/WoWAnalyzer,ronaldpereira/WoWAnalyzer,sMteX/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,anom0ly/WoWAnalyzer,fyruna/WoWAnalyzer,ronaldpereira/WoWAnalyzer,Juko8/WoWAnalyzer,WoWA...
c1e184654557c38e6724734d352b9ba4481abade
lib/download.js
lib/download.js
'use strict'; var fs = require('fs'); var request = require('request'); var USER_AGENT_STRING = 'SubDB/1.0 (subfil/1.1; ' + 'https://github.com/divijbindlish/subfil)'; var download = function (hash, language, destination, callback) { request({ url: 'http://api.thesubdb.com', qs: { action: 'download'...
'use strict'; var fs = require('fs'); var request = require('request'); var USER_AGENT_STRING = 'SubDB/1.0 (subfil/1.1; ' + 'https://github.com/divijbindlish/subfil)'; var download = function (hash, language, destination, callback) { callback = arguments[arguments.length - 1]; if (typeof callback !== 'function'...
Check for callback before execution
Check for callback before execution
JavaScript
mit
divijbindlish/subfil
ca5d78816bb31454de28480dec5c6384ed259eef
app/javascript/flavours/glitch/features/hashtag_timeline/containers/column_settings_container.js
app/javascript/flavours/glitch/features/hashtag_timeline/containers/column_settings_container.js
import { connect } from 'react-redux'; import ColumnSettings from '../components/column_settings'; import { changeColumnParams } from 'flavours/glitch/actions/columns'; import api from 'flavours/glitch/util/api'; const mapStateToProps = (state, { columnId }) => { const columns = state.getIn(['settings', 'columns']);...
import { connect } from 'react-redux'; import ColumnSettings from '../components/column_settings'; import { changeColumnParams } from 'flavours/glitch/actions/columns'; import api from 'flavours/glitch/util/api'; const mapStateToProps = (state, { columnId }) => { const columns = state.getIn(['settings', 'columns']);...
Fix searching for additional hashtags in hashtag column
[Glitch] Fix searching for additional hashtags in hashtag column Port 3f382e337d5c40db18995a88c0bf6b1b34f031b7 to glitch-soc Signed-off-by: Claire <82b964c50e9d1d222e48cf5046e6484a966a7b07@sitedethib.com>
JavaScript
agpl-3.0
im-in-space/mastodon,Kirishima21/mastodon,Kirishima21/mastodon,Kirishima21/mastodon,glitch-soc/mastodon,glitch-soc/mastodon,Kirishima21/mastodon,im-in-space/mastodon,glitch-soc/mastodon,im-in-space/mastodon,im-in-space/mastodon,glitch-soc/mastodon
d09e04f9fd5efab1810e6c3c399781353ea88620
lib/keyslice.js
lib/keyslice.js
'use strict'; let juri = require('juri')(), pattern = /(^|[+\-:!])(\w+|\([^(]+\))/g; exports.sliceToKey = (s) => s.type + (s.join ? '+' + juri.encode(s.join) : '') + (s.link ? '-' + juri.encode(s.link) : '') + (s.order ? ':' + s.order : '') + (s.filter ? '!' + juri.encode(s.filter) : ''); exports.keyToSlice = (k...
'use strict'; let juri = require('juri')(), pattern = /(^|[+\-:])(\w+|\([^(]+\))/g; exports.sliceToKey = (s) => s.type + (s.join ? '+' + juri.encode(s.join) : '') + (s.link ? '-' + juri.encode(s.link) : '') + (s.order ? ':' + s.order : '') + (s.filter ? '!' + juri.encode(s.filter) : ''); exports.keyToSlice = (k)...
Fix keyToSlice for array/object filter values
Fix keyToSlice for array/object filter values
JavaScript
mit
scrollback/sbcache,belng/know,scrollback/know
870a57af6bd1aa1555a01ac6fa7029883244bf48
lib/messages.js
lib/messages.js
const config = require('./config'); module.exports = { emptyCache() { return `Local cache is empty Please run tldr --update`; }, notFound() { return `Page not found Try updating with "tldr --update", or submit a pull request to: https://github.com/` + config.get().pagesRepository; } };
const config = require('./config'); module.exports = { emptyCache() { return `Local cache is empty Please run tldr --update`; }, notFound() { return `Page not found. Feel free to send a pull request to: https://github.com/` + config.get().pagesRepository; } };
Improve page not found message.
Improve page not found message. Removing the redundant mention to tldr --update because now the tool automatically runs a tldr --update when a page does not exist
JavaScript
mit
tldr-pages/tldr-node-client,tldr-pages/tldr-node-client
a7f80f0f379b979c514d82b2acc2531cb736d86d
lib/messages.js
lib/messages.js
const config = require('./config'); module.exports = { emptyCache() { return `Local cache is empty Please run tldr --update`; }, notFound() { return `Page not found. Feel free to send a pull request to: ` + config.get().pagesRepository; } };
const config = require('./config'); module.exports = { emptyCache() { return `Local cache is empty Please run tldr --update`; }, notFound() { return `Page not found. If you want to contribute it, feel free to send a pull request to: ` + config.get().pagesRepository; } };
Make contribution prompt more explicit
Make contribution prompt more explicit
JavaScript
mit
tldr-pages/tldr-node-client,tldr-pages/tldr-node-client
4d9a0a933410632dc838f12b3da7d7f76f86cbce
lib/portfile.js
lib/portfile.js
/*eslint no-sync: 0*/ 'use strict'; var fs = require('fs'); var portFile = process.env.HOME + '/.eslint_d_port'; exports.write = function (port) { fs.writeFileSync(portFile, String(port)); }; exports.read = function () { if (fs.existsSync(portFile)) { var data = fs.readFileSync(portFile, 'utf8'); return...
/*eslint no-sync: 0*/ 'use strict'; var fs = require('fs'); var homeEnv = process.platform === 'win32' ? 'USERPROFILE' : 'HOME'; var portFile = process.env[homeEnv] + '/.eslint_d_port'; exports.write = function (port) { fs.writeFileSync(portFile, String(port)); }; exports.read = function () { if (fs.existsSync(...
Use correct home directory on windows
Use correct home directory on windows
JavaScript
mit
mantoni/eslint_d.js,mantoni/eslint_d.js,ruanyl/eslint_d.js
76e5e79bee875eab30b8d40a5c6436e6184d586d
hjlog/assets/js/hjlog.js
hjlog/assets/js/hjlog.js
require('../css/hjlog.scss'); require('script!jquery'); require('script!semantic-ui/dist/semantic.js'); require('script!./highlight'); require('script!./showdown'); require('script!./figure'); require('script!./photoAjax'); // Markdown rendering const md = $(".markdown").text(); const converter = new showdown.Converte...
require('../css/hjlog.scss'); require('script!jquery'); require('script!semantic-ui/dist/semantic.js'); require('script!./highlight'); require('script!./showdown'); require('script!./figure'); require('script!./photoAjax'); // Markdown rendering const postBody = document.getElementsByClassName("markdown")[0]; if (post...
Check if markdown rendering is needed or not
Check if markdown rendering is needed or not
JavaScript
mit
heejongahn/hjlog,heejongahn/hjlog,heejongahn/hjlog,heejongahn/hjlog
31078690463f2a2a8f6a2863ce529e092833e01a
app/soc/content/js.min/templates/modules/gsoc/profile_readonly.js
app/soc/content/js.min/templates/modules/gsoc/profile_readonly.js
melange.templates.inherit(function(){function k(){c=jQuery(d).text();e=jQuery(f).text()}function l(){var a={mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:true,panControl:true,zoomControl:true},g=m,h=false;b=new google.maps.Map(jQuery("#"+i)[0],a);if(jQuery(d).text()!==""&&jQuery(f).text()!==""){k();g=n;h=true}...
melange.templates.inherit(function(){function f(){var a={mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:true,panControl:true,zoomControl:true};a=new google.maps.Map(jQuery("#"+d)[0],a);var e=new google.maps.LatLng(b,c);a.setZoom(g);a.setCenter(e);marker=new google.maps.Marker({position:e,draggable:false});marke...
Add minimized version of updated script.
Add minimized version of updated script.
JavaScript
apache-2.0
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
ef1708577828b54b7727e2408b7a16b6fec61ed3
subclass-error.js
subclass-error.js
/*global define*/ (function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define([], factory) } else if (typeof exports === 'object') { // Node. Does not work with strict CommonJS, but // only CommonJS-like environments that support modu...
/*global define*/ (function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define([], factory) } else if (typeof exports === 'object') { // Node. Does not work with strict CommonJS, but // only CommonJS-like environments that support modu...
Add workaround for IE < 10 which doesn't support `Error.prototype.stack`
Add workaround for IE < 10 which doesn't support `Error.prototype.stack`
JavaScript
mit
dasilvacontin/subclass-error
09766b089991cc62ec4881f53677202a711b89d0
actions/organizationDelete.js
actions/organizationDelete.js
exports.action = { name: 'organizationDelete', description: 'Deletes an Organization', version: 1, inputs: { required: [ 'organizationId' ], optional: [] }, outputExample: {}, run: function (api, connection, next) { var id = api.mongoose.Types.ObjectId(connection.para...
exports.action = { name: 'organizationDelete', description: 'Deletes an Organization and all associated Printers', version: 1, inputs: { required: [ 'organizationId' ], optional: [] }, outputExample: {}, run: function (api, connection, next) { var id = api.mongoose.T...
Delete all associated printers when an organization is deleted
Delete all associated printers when an organization is deleted
JavaScript
mit
printerSystemCSI210/api-server
e47fd537253f283a61aef37d771e82d3f5a8ca49
src/components/TableHeadingCellEnhancer.js
src/components/TableHeadingCellEnhancer.js
import React from 'react'; import PropTypes from 'prop-types'; import compose from 'recompose/compose'; import mapProps from 'recompose/mapProps'; import getContext from 'recompose/getContext'; import { combineHandlers } from '../utils/compositionUtils'; const EnhancedHeadingCell = OriginalComponent => compose( getC...
import React from 'react'; import PropTypes from 'prop-types'; import compose from 'recompose/compose'; import mapProps from 'recompose/mapProps'; import getContext from 'recompose/getContext'; import { combineHandlers } from '../utils/compositionUtils'; const EnhancedHeadingCell = OriginalComponent => compose( getC...
Send full sortProperty to events.onSort
Send full sortProperty to events.onSort
JavaScript
mit
joellanciaux/Griddle,joellanciaux/Griddle,ttrentham/Griddle,GriddleGriddle/Griddle,GriddleGriddle/Griddle
38acb130cfed7b1b458baf071fe689f29f9d3298
app/assets/javascripts/tagger/functions/setupDisplayFieldsEducation.js
app/assets/javascripts/tagger/functions/setupDisplayFieldsEducation.js
// Take the comma separated list for {field} from {item}.{field} and populate the select#{field} box // Any of the values in the comma separated list for {field} that doesn't have an option in select#{field} // Get stuffed into {field}Other as it's own comma separated list. function setupDisplayFieldsEducationTab(item,...
// Take the comma separated list for {field} from {item}.{field} and populate the select#{field} box // Any of the values in the comma separated list for {field} that doesn't have an option in select#{field} // Get stuffed into {field}Other as it's own comma separated list. function setupDisplayFieldsEducationTab(item,...
Make sure its defined before using it.
Make sure its defined before using it.
JavaScript
apache-2.0
inbloom/APP-tagger,inbloom/APP-tagger
31c0a1c9a5090727a20d4942f9c1fb3189b190d1
lib/pkgcloud/amazon/storage/client/index.js
lib/pkgcloud/amazon/storage/client/index.js
/* * client.js: Storage client for AWS S3 * * (C) 2011 Nodejitsu Inc. * */ var utile = require('utile'), urlJoin = require('url-join'), xml2js = require('xml2js'), auth = require('../../../common/auth'), amazon = require('../../client'); var Client = exports.Client = function (options) { this.s...
/* * client.js: Storage client for AWS S3 * * (C) 2011 Nodejitsu Inc. * */ var utile = require('utile'), urlJoin = require('url-join'), xml2js = require('xml2js'), auth = require('../../../common/auth'), amazon = require('../../client'); var Client = exports.Client = function (options) { this.s...
Allow AWS client against non-https servers
Allow AWS client against non-https servers I want to test my application against a "fake" local S3. It is not running HTTPS. This change allows me to specify a non-HTTPS connection by passing { protocol: 'http://' } to the client creation as an option.
JavaScript
mit
bunglestink/pkgcloud,songanbui/pkgcloud,mcanthony/pkgcloud,Phanatic/pkgcloud,dionjwa/pkgcloud,apla/pkgcloud,DonSchenck/pkgcloud,hacor/pkgcloud,pkgcloud/pkgcloud,Hopebaytech/pkgcloud,andrewsomething/pkgcloud,temka1234/pkgcloud,mdsummers/pkgcloud,Phanatic/pkgcloud
782425905f37cb8bb6ab5152abbfd3e499050c9c
test/front-utils.unit.js
test/front-utils.unit.js
'use strict'; var expect = require('chai').expect; var utils = require('../public/javascripts/utils.js'); console.log(expect, utils);
'use strict'; var expect = require('chai').expect; var utils = require('../public/javascripts/utils.js'); describe('utils', function() { describe('#humanFileSize', function() { it('check 1000 bytes', function() { expect(utils.humanFileSize(1000, true)).to.equal("1.0 kB"); }); it('check 1024 byte...
Increase Coverage on Front Utils
Increase Coverage on Front Utils
JavaScript
agpl-3.0
super3/image-uploader,super3/image-uploader
c9ea1250b507ec7f32e76d14d7461ffc271cc5db
test/src/lib/app.spec.js
test/src/lib/app.spec.js
/* global request, describe, it, before */ import '../../setup' import { app } from '../../../src/lib/app' const url = 'http://localhost:8181/api/' describe('app', () => { before(() => { // Start app app({ port: 8181, lambdas: './test/lambdas' }) }) it('responds with the correct operat...
/* global request, describe, it, before */ import '../../setup' import { app } from '../../../src/lib/app' const url = 'http://localhost:8181/api/' describe('app', () => { before(() => { // Start app app({ port: 8181, lambdas: './test/lambdas' }) }) it('responds with the correct operat...
Add forgotten prop check on test
Add forgotten prop check on test
JavaScript
mit
TechnologyAdvice/glambda
b69d1c3d79e26d8ee1511d2da7596818a951c503
test/winston-sqs-test.js
test/winston-sqs-test.js
var vows = require('vows'); var assert = require('assert'); var winston = require('winston'); var helpers = require('winston/test/helpers'); var SQS = require('../lib/winston-sqs').SQS; var transport = new (SQS)({ aws_queueurl: "queueurl", aws_accesskeyid: "publickey", aws_secretaccesskey: "secretkey" }); ...
var vows = require('vows'); var assert = require('assert'); var winston = require('winston'); var helpers = require('winston/test/helpers'); var SQS = require('../lib/winston-sqs').SQS; var transport = new (SQS)({ aws_queueurl: "queueurl", aws_accesskeyid: "publickey", aws_secretaccesskey: "secretkey" }); ...
Fix tests so they complete without auth info.
Fix tests so they complete without auth info.
JavaScript
mit
karlatkinson/winston-sqs
38d4233dcea2257aa2ec1b39fddb730f60257f63
app/assets/config/manifest.js
app/assets/config/manifest.js
//= link_tree ../images //= link_directory ../javascripts .js //= link_directory ../stylesheets .css
//= link_tree ../images //= link_directory ../javascripts .js //= link_directory ../stylesheets .css //= link administrate/application.css //= link administrate/application.js
Add assets of administrate gem
Add assets of administrate gem
JavaScript
mit
kenchan/tdnm,kenchan/tdnm,kenchan/tdnm,kenchan/tdnm
a720b4e45882039a62fcd67450e271e041978a07
test/app/index.js
test/app/index.js
var app = require("app"); var BrowserWindow = require("browser-window"); var mainWindow = null; app.on("ready", function() { mainWindow = new BrowserWindow({width: 800, height: 600}); mainWindow.loadUrl("file://" + __dirname + "/index.html"); mainWindow.openDevTools(); mainWindow.on("closed", function() { mai...
var app = require("electron").app; var BrowserWindow = require("electron").BrowserWindow; var mainWindow = null; app.on("ready", function() { mainWindow = new BrowserWindow({width: 800, height: 600}); mainWindow.loadURL("file://" + __dirname + "/index.html"); mainWindow.openDevTools(); mainWindow.on("closed", fu...
Update test to run on latest electron
Update test to run on latest electron
JavaScript
apache-2.0
thesbros/gulp-run-electron,thesbros/gulp-run-electron
8c5d2a734d5eed5b5901dfbb936b35ad783e488e
bw.js
bw.js
'use strict'; var request = require('request'); request('http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1', function (error, response, body) { if (error || response.statusCode !== 200) { throw new Error('Error while accessing the Bing API'); } try { var res = JSON.parse(body);...
'use strict'; var request = require('request'); var fs = require('fs'); /** * Download a file and store it on the filesystem. */ var download = function (uri, filename, callback){ request.head(uri, function(err, res, body){ request(uri).pipe(fs.createWriteStream(filename)).on('close', callback); });...
Save the day's wallpaper in wallpapers directory
Save the day's wallpaper in wallpapers directory
JavaScript
mit
dorian-marchal/bing-daily-wallpaper,dorian-marchal/daily-wallpaper
05d83589c256c6b82daf05bbc90874ca67c0a534
app.js
app.js
var connect = require('connect'); var PORT = process.env.PORT || 5000; var diffy = require('./diffy'); var http = require('http'); var postMessage = require('./lib/post_message'); var app = connect() .use(require('body-parser').urlencoded({ extended: true })) .use(function(req, res){ if (req.body.token && req.body.t...
var connect = require('connect'); var PORT = process.env.PORT || 5000; var diffy = require('./diffy'); var http = require('http'); var postMessage = require('./lib/post_message'); var isWorking = false; var app = connect() .use(require('body-parser').urlencoded({ extended: true })) .use(function(req, res){ if (isWork...
Add flood protection and a fire and forget parameter for when we dont want to wait on a response
Add flood protection and a fire and forget parameter for when we dont want to wait on a response
JavaScript
mit
geckoboard/diffy
88970249e87a1fcc0244c3e1b1c8260ec1c87a7f
app.js
app.js
var express = require('express'); var path = require('path'); var logger = require('morgan'); var bodyParser = require('body-parser'); var sites = require('./routes/sites'); var articles = require('./routes/articles'); var writers = require('./routes/writers'); var app = express(); app.use(logger('dev')); app.use(bo...
var express = require('express'); var path = require('path'); var logger = require('morgan'); var bodyParser = require('body-parser'); var sites = require('./routes/sites'); var articles = require('./routes/articles'); var writers = require('./routes/writers'); var app = express(); app.use(logger('dev')); app.use(bo...
Fix error responses to don't have a need of a view engine
Fix error responses to don't have a need of a view engine
JavaScript
mit
DiogoDoreto/NodeScrapper,DiogoDoreto/NodeScrapper
ed0f3cbbae3c9796e76a4ffb4a958f1fb7702fb5
routes/index.js
routes/index.js
var express = require('express'); var kue = require('kue'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index'); }); router.post('/destroy_jobs', function(req, res, next) { kue.Job.rangeByState('delayed', 0, 10000, 'asc', function( err, jobs ) { ...
var express = require('express'); var kue = require('kue'); var Bot = require('../models/bot'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index'); }); router.post('/destroy_jobs', function(req, res, next) { kue.Job.rangeByState('delayed', 0, 10000,...
Add endpoint to DESTROY ALL THE THINGS
Add endpoint to DESTROY ALL THE THINGS
JavaScript
mit
Ecotaco/bumblebee-bot,Ecotaco/bumblebee-bot
5c87d72b25e79e6a671a45c97edfbf99af43a15b
server/db/userModel.js
server/db/userModel.js
/* eslint new-cap: 0 */ const mongoose = require('mongoose'); const bcrypt = require('bcrypt-nodejs'); const Q = require('q'); const SALT_WORK_FACTOR = 10; const UserSchema = new mongoose.Schema({ username: { type: String, required: true, unique: true, }, password: { type: String, required: ...
/* eslint new-cap: 0 */ const mongoose = require('mongoose'); const bcrypt = require('bcrypt-nodejs'); const Q = require('q'); const SALT_WORK_FACTOR = 10; const UserSchema = new mongoose.Schema({ username: { type: String, required: true, unique: true, }, password: { type: String, required:...
Clean up formatting. Assign function name to comparePasswords
Clean up formatting. Assign function name to comparePasswords
JavaScript
mit
nonchalantkettle/SpeechDoctor,alexxisroxxanne/SpeechDoctor,alexxisroxxanne/SpeechDoctor,nonchalantkettle/SpeechDoctor
61dbaafb4c24ab8f43e2b79c1a5142a9ab9227fb
server/index.js
server/index.js
"use strict"; const dotenv = require("dotenv"); const service = require("./service"); const throng = require("throng"); dotenv.config(); const options = { log: console, name: "Origami Polyfill Service", workers: process.env.WEB_CONCURRENCY || 1 }; throng({ workers: options.workers, start: startWorker }); func...
"use strict"; const dotenv = require("dotenv"); const service = require("./service"); const throng = require("throng"); dotenv.config(); const options = { log: console, name: "Origami Polyfill Service", requestLogFormat: process.env.NODE_ENV === "production" ? null : undefined, workers: process.env.WEB_CONCURREN...
Disable logging when NODE_ENV set to production
Disable logging when NODE_ENV set to production
JavaScript
mit
JakeChampion/polyfill-service,JakeChampion/polyfill-service
0a70853a4d753b52e91a2e6efb06c94f8e07040c
server/index.js
server/index.js
const express = require('express'); const cors = require('cors'); const bodyParser = require('body-parser'); const app = express(); app.use(cors()); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); require('dotenv').config(); app.use(express.static(`${__dirname}/public`)); const PORT =...
const express = require('express'); const cors = require('cors'); const bodyParser = require('body-parser'); const app = express(); app.use(cors()); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); require('dotenv').config(); app.use(express.static(`${__dirname}/public`)); app.get('/fl...
Add skeleton GET /flight route
Add skeleton GET /flight route
JavaScript
mit
jaredscheib/flighthop,jaredscheib/flighthop
47bd8d121ea1076fc6c5a59fd7d5cb16aa538692
quickaction/app.js
quickaction/app.js
require.config({ paths: { 'jquery': 'lib/jquery', 'underscore': 'lib/underscore', 'backbone': 'lib/backbone', 'doTCompiler': "lib/doTCompiler", 'text': 'lib/text', 'doT': 'lib/doT' }, shim: { 'underscore': { exports: '_' }, 'backbone': { deps: ["underscore", "jquer...
require.config({ baseUrl: "/js", paths: { 'jquery': 'lib/jquery', 'underscore': 'lib/underscore', 'backbone': 'lib/backbone', 'doTCompiler': "lib/doTCompiler", 'text': 'lib/text', 'doT': 'lib/doT' }, shim: { 'underscore': { exports: '_' }, 'backbone': { deps: ["u...
Add baseUrl to require config
Add baseUrl to require config
JavaScript
mit
dskaram/quickactions,dskaram/quickactions
e8ffe689e6513efe28ac0e917e612f4b9eae796b
generate_list.js
generate_list.js
var fs = require('fs'); var jobs = []; fs.readdirSync('runs').forEach(function(run_id) { var job = {} job.run_id = run_id; job.tasks = fs.readdirSync('runs/'+run_id); var stat = fs.statSync('runs/'+run_id); var info = {}; try { var infoFile = fs.readFileSync('runs/'+run_id+'/info.json'); info = JS...
var fs = require('fs'); var jobs = []; fs.readdirSync('runs').forEach(function(run_id) { var job = {} job.run_id = run_id; job.tasks = fs.readdirSync('runs/'+run_id); var stat = fs.statSync('runs/'+run_id); var info = {}; try { var infoFile = fs.readFileSync('runs/'+run_id+'/info.json'); info = JS...
Exclude broken runs from the list
Exclude broken runs from the list
JavaScript
mit
mdinger/awcy,mdinger/awcy,mdinger/awcy,tdaede/awcy,tdaede/awcy,mdinger/awcy,mdinger/awcy,tdaede/awcy,tdaede/awcy,tdaede/awcy,tdaede/awcy
eec3a4e10bda946679c333e601268efc6dc5e1d4
source/Tabs.js
source/Tabs.js
enyo.kind({ name: "bootstrap.TabHolder", handlers: { onNavItemClicked: "showTabContent" }, showTabContent: function(inSender, inEvent){ this.waterfall("showTabContent", inEvent); } }); enyo.kind({ name: "bootstrap.TabContent", classes: "tab-content", published: { active: false }, handle...
enyo.kind({ name: "bootstrap.TabHolder", handlers: { onNavItemClicked: "showTabContent" }, showTabContent: function(inSender, inEvent){ this.waterfall("showTabContent", inEvent); } }); enyo.kind({ name: "bootstrap.TabContent", classes: "tab-content", published: { active: false }, handle...
Add a waterfalled event on active tab change
Add a waterfalled event on active tab change This allows us to do extra bullshit since Enyo doesn't tend to like being shown/hidden.
JavaScript
mit
pangea/bootstrap-enyo,pangea/bootstrap-enyo
f1be5eb6ef93b8ee3aaf3e7ddcb4a3d1709f111d
src/browser.js
src/browser.js
const result = {} export default result if (typeof navigator != "undefined") { const ie_edge = /Edge\/(\d+)/.exec(navigator.userAgent) const ie_upto10 = /MSIE \d/.test(navigator.userAgent) const ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent) result.mac = /Mac/.test(navigator.platf...
const result = {} export default result if (typeof navigator != "undefined" && typeof document != "undefined") { const ie_edge = /Edge\/(\d+)/.exec(navigator.userAgent) const ie_upto10 = /MSIE \d/.test(navigator.userAgent) const ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent) resul...
Check that `document` is defined
Check that `document` is defined Check that document is defined before determining browser capabilities. Otherwise this fails inside a web worker context. FIX: The package can now be loaded in a web worker context (where `navigator` is defined but `document` isn't) without crashing.
JavaScript
mit
ProseMirror/prosemirror-view
8781e55fee545044c9a66a9e3e601164b15083f0
require-json.js
require-json.js
define(function () { "use strict"; /** * @name require-json * @constructor */ function requireJson(path, onDone) { var xhr = new XMLHttpRequest; xhr.setRequestHeader('Accept', 'application/json'); xhr.onreadystatechange = function(e) { if(xhr.readyState === 4) { ...
define(function () { "use strict"; /** * * @param {String} path * @param {Function} onDone */ function requireJson(path, onDone) { var xhr = new XMLHttpRequest; xhr.open('GET', path, true); xhr.setRequestHeader('Accept', 'application/json'); xhr.onreadystatechange = fu...
Fix JsDoc, throw errors on non 2xx response codes
Fix JsDoc, throw errors on non 2xx response codes
JavaScript
mit
steveukx/require-json
a3f7b8534aa5fe53e5b923859a9d397d59cb10f5
app/scripts/states/main.js
app/scripts/states/main.js
/** * Defines the main routes in the application. Think of this as the entry point into the module * The routes you see here will be anchors '#/' unless specifically configured otherwise. */ define(['./module'], function (states) { 'use strict'; return states.config(['$stateProvider', '$urlRouterProvider',...
/** * Defines the main routes in the application. Think of this as the entry point into the module * The routes you see here will be anchors '#/' unless specifically configured otherwise. */ define(['./module'], function (states) { 'use strict'; return states.config(['$stateProvider', '$urlRouterProvider',...
Update login template URL so login page displays
Update login template URL so login page displays
JavaScript
mit
icompuiz/node-ttkd
2e4893f4c138b08e268014cef6132e5bf4e893f9
js/modules/migrations/migrations_1_database_without_attachment_data.js
js/modules/migrations/migrations_1_database_without_attachment_data.js
const { last } = require('lodash'); const db = require('../database'); const settings = require('../settings'); const { runMigrations } = require('./run_migrations'); // NOTE: Add new migrations that need to traverse entire database, e.g. messages // store, here. These will only run after attachment migration has co...
const { last } = require('lodash'); const db = require('../database'); const settings = require('../settings'); const { runMigrations } = require('./run_migrations'); // IMPORTANT: Add new migrations that need to traverse entire database, e.g. // messages store, below. Whenever we need this, we need to force attachm...
Clarify implications of introducing new migrations
Clarify implications of introducing new migrations
JavaScript
agpl-3.0
nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop
d09f0163f1e5a0f1bf05a0fea075bd83f823ebd0
puppetboard/static/js/dailychart.js
puppetboard/static/js/dailychart.js
jQuery(function ($) { function generateChart(el) { var url = "daily_reports_chart.json"; var certname = $(el).attr('data-certname'); if (typeof certname !== typeof undefined && certname !== false) { // truncate /node/certname from URL, to determine path to json url = window.location.href.repla...
jQuery(function ($) { let url = "daily_reports_chart.json"; let certname = $("#dailyReportsChart").data("certname"); let days = parseInt($("#dailyReportsChart").data("days")); let defaultJSON = [] for (let index = days-1; index >= 0; index--) { defaultJSON.push({ day: moment().startOf('day').subtra...
Fix replacement c3 by billboard
Fix replacement c3 by billboard
JavaScript
apache-2.0
voxpupuli/puppetboard,voxpupuli/puppetboard,voxpupuli/puppetboard
560b233adb18679a617dd9bc7334f59ad5825cb5
util/util_test.js
util/util_test.js
steal( // TODO fixtures work with all libraries "./fixture/fixture_test.js", "./object/object_test.js", "./string/string_test.js")
steal("./fixture/fixture_test.js", "./object/object_test.js", "./string/string_test.js")
Add fixtures to main tests
Add fixtures to main tests
JavaScript
mit
janza/canjs,thomblake/canjs,scorphus/canjs,WearyMonkey/canjs,ackl/canjs,mindscratch/canjs,Psykoral/canjs,thecountofzero/canjs,cohuman/canjs,rjgotten/canjs,ackl/canjs,dimaf/canjs,rasjani/canjs,airhadoken/canjs,sporto/canjs,bitovi/canjs,tracer99/canjs,azazel75/canjs,WearyMonkey/canjs,scorphus/canjs,gsmeets/canjs,Psykoral...
f398078b622b2b71f1ab904464b4bb2c8bf0828c
src/getChart.js
src/getChart.js
'use strict'; // convert an experiment, an array of spectra, to a chart var types=require('./types.js'); module.exports=function (experiments, channels, index) { var channels = channels || 'RGBWT' if (! Array.isArray(experiments)) experiments=[experiments]; var chart = { type: "chart", ...
'use strict'; // convert an experiment, an array of spectra, to a chart var types=require('./types.js'); module.exports=function (experiments, channels, index) { var channels = channels || 'RGBWT' if (! Array.isArray(experiments)) experiments=[experiments]; var chart = { type: "chart", ...
Add concentration in the name
Add concentration in the name
JavaScript
mit
open-spectro/javascript-helper
3671891cc84b086394b87f63dc9f1cca83a47d23
src/components/Board.js
src/components/Board.js
import React, { Component, PropTypes } from 'react' import Tile from './Tile' import { sortBy } from 'lodash' const styles = { row: { position: 'relative', flexDirection: 'row' } } export default class Board extends Component { static propTypes = { tiles: PropTypes.array.isRequire...
import React, { Component, PropTypes } from 'react' import Tile from './Tile' const styles = { row: { position: 'relative', flexDirection: 'row' } } export default class Board extends Component { static propTypes = { tiles: PropTypes.array.isRequired, playTile: PropTypes.f...
Use array index instead of .index
Use array index instead of .index
JavaScript
mit
okonet/fifteens-trix,okonet/fifteens-trix
784720b533709e5ca26a9ba57a7a971721cf6329
src/listener.js
src/listener.js
'use strict'; var bodyParser = require('body-parser'), jsonParser = bodyParser.json(), events = require('events'); module.exports = function(app, config) { var emitter = new events.EventEmitter(); var logger = config.logger; app.use(jsonParser); app.post('/', function(req, res, next) { ...
'use strict'; var bodyParser = require('body-parser'), jsonParser = bodyParser.json(), events = require('events'); module.exports = function(app, config) { var emitter = new events.EventEmitter(); var logger = config.logger; app.use(jsonParser); app.post('/', function(req, res) { i...
Send HTTP 200 to webhook
Send HTTP 200 to webhook
JavaScript
mit
algoni/PogoBot-Telegram,SoloKMV/PogoRocket
7cb32046c5cbe09fe3195d0bffc376f4d5c11ec2
src/db/clients/index.js
src/db/clients/index.js
import mysql from './mysql'; import postgresql from './postgresql'; import sqlserver from './sqlserver'; /** * List of supported database clients */ export const CLIENTS = [ { key: 'mysql', name: 'MySQL' }, { key: 'postgresql', name: 'PostgreSQL', defaultDatabase: 'postgres' }, { key: 'sqlserver', name: 'Micr...
import mysql from './mysql'; import postgresql from './postgresql'; import sqlserver from './sqlserver'; /** * List of supported database clients */ export const CLIENTS = [ { key: 'mysql', name: 'MySQL', defaultPort: 3306, }, { key: 'postgresql', name: 'PostgreSQL', defaultDatabase: '...
Add database default port to consume in client
Add database default port to consume in client
JavaScript
mit
falcon-client/falcon-core,sqlectron/sqlectron-core,falcon-client/falcon-core
01580417200d2cc21d41647fddd17fcd0341c6d7
src/javascript/index.js
src/javascript/index.js
const exportAllFunctions = (obj) => { Object.keys(obj).forEach((key) => { window[key] = obj[key]; }); }; window.$ = window.jQuery = require('jquery'); require('babel-polyfill'); require('promise-polyfill'); // created for handling global onclick exportAllFunctions(require('./binary/common_functions/a...
const exportAllFunctions = (obj) => { Object.keys(obj).forEach((key) => { window[key] = obj[key]; }); }; window.$ = window.jQuery = require('jquery'); require('babel-polyfill'); require('promise-polyfill'); // created for handling global onclick exportAllFunctions(require('./binary/common_functions/a...
Fix safari not triggering load event when using back button
Fix safari not triggering load event when using back button
JavaScript
apache-2.0
ashkanx/binary-static,binary-com/binary-static,4p00rv/binary-static,raunakkathuria/binary-static,binary-com/binary-static,kellybinary/binary-static,binary-static-deployed/binary-static,kellybinary/binary-static,negar-binary/binary-static,kellybinary/binary-static,ashkanx/binary-static,binary-static-deployed/binary-stat...
fc37e0950276a4889694a0a8adb09250bb2c15b1
blacklisted-sites.js
blacklisted-sites.js
// Add your blacklisted sites to this array. Subdomain and TLD are optional and flexible. var BLACKLIST = [ 'agolo.com', 'youtube', 'twitter.com', 'mail.google', 'imgur.com', 'bit.ly', 'tinyurl', 'vine' ]; /** Convert the array to an object and export it **/ var empty = {}; // Adapted from: https://...
// Add your blacklisted sites to this array. Subdomain and TLD are optional and flexible. // Should probably be kept in sync with https://github.com/premgane/agolo-twitterbot/blob/master/server.py var BLACKLIST = [ 'agolo.com', 'youtube', 'twitter.com', 'mail.google', 'imgur.com', 'bit.ly', 'tinyurl', '...
Add comment with a link to agolo-twitterbot
Add comment with a link to agolo-twitterbot
JavaScript
mit
premgane/agolo-slackbot
5b6b584068404b8cd230d88bf390d551ae717990
packages/qunit/lib/qunit-runner.js
packages/qunit/lib/qunit-runner.js
/*globals QUnit spade */ require('jquery'); var qunit = require('./qunit'); var packageName = location.search.match(/package=([^&]+)&?/); packageName = packageName && packageName[1]; var prefix = location.search.match(/prefix=([^&]+)&?/); prefix = prefix && prefix[1]; if (!packageName) { $('#qunit-header').text('...
/*globals QUnit spade */ require('jquery'); var qunit = require('./qunit'); var packageName = location.search.match(/package=([^&]+)&?/); packageName = packageName && packageName[1]; var prefix = location.search.match(/prefix=([^&]+)&?/); prefix = prefix && prefix[1]; if (!packageName) { $('#qunit-header').text('...
Put package name in QUnit header
Put package name in QUnit header
JavaScript
mit
greyhwndz/ember.js,xiujunma/ember.js,howtolearntocode/ember.js,karthiick/ember.js,martndemus/ember.js,soulcutter/ember.js,rwjblue/ember.js,bmac/ember.js,jish/ember.js,slindberg/ember.js,zenefits/ember.js,rubenrp81/ember.js,thoov/ember.js,ridixcr/ember.js,soulcutter/ember.js,nruth/ember.js,mdehoog/ember.js,nicklv/ember....
d88577ecb255c82667d1bbf70a5b466f18b14443
webpack.config.js
webpack.config.js
var webpack = require('webpack') module.exports = { entry: './src/main.js', output: { path: './build', publicPath: '/', filename: 'bundle.js' }, module: { loaders: [ { test: /\.vue$/, loader: 'vue' }, { test: /src\/.+\.js$/, loader: 'babel?prese...
var webpack = require('webpack') module.exports = { entry: './src/main.js', output: { path: './build', publicPath: '/', filename: 'bundle.js' }, module: { loaders: [ { test: /\.vue$/, loader: 'vue' }, { test: /src\/.+\.js$/, loader: 'babel?prese...
Allow dev server to be accessed from the network.
Allow dev server to be accessed from the network.
JavaScript
mit
guidobouman/prsnt.co,guidobouman/prsnt.co
75534d4dfdb9d2e19515a1063eac9ca4bb6070a0
app/js/DiffCodec.js
app/js/DiffCodec.js
const DMP = require('diff-match-patch') const dmp = new DMP() module.exports = { ADDED: 1, REMOVED: -1, UNCHANGED: 0, diffAsShareJsOp(before, after, callback) { const diffs = dmp.diff_main(before.join('\n'), after.join('\n')) dmp.diff_cleanupSemantic(diffs) const ops = [] let position = 0 ...
const DMP = require('diff-match-patch') const dmp = new DMP() // Do not attempt to produce a diff for more than 100ms dmp.Diff_Timeout = 0.1 module.exports = { ADDED: 1, REMOVED: -1, UNCHANGED: 0, diffAsShareJsOp(before, after, callback) { const diffs = dmp.diff_main(before.join('\n'), after.join('\n')) ...
Set the diff-match-patch timeout to 100ms
Set the diff-match-patch timeout to 100ms This might result in worse diffs, but we don't want to spend a second blocking the event loop while we figure out nicer diffs when comparing documents.
JavaScript
agpl-3.0
sharelatex/document-updater-sharelatex,sharelatex/document-updater-sharelatex,sharelatex/document-updater-sharelatex
bc0ccf4e2254af3c1525880bbc4b6521f6d34049
lib/index.js
lib/index.js
'use strict'; const Container = require('./container'); const creationExpression = (parent, options) => new Container(parent, options); const rootFunction = (options) => new Container(null, options); const singleton = (generator) => { let instance = null; return ($container) => { if (!instance) { ...
'use strict'; const Container = require('./container'); const creationExpression = (parent, options) => new Container(parent, options); const rootFunction = (options) => new Container(null, options); /** * Create a container (Compatability shim) * @param {Container} parent - Parent container, optional. ...
Remove partial work on singleton.
Remove partial work on singleton.
JavaScript
mit
steve-gray/somersault
52c522980318206ece3b160220c0d72d4ebff8a5
app/js/home/init.js
app/js/home/init.js
document.addEventListener('DOMContentLoaded', () => { window.setupGol(); window.navUpdate(true); window.setupLaptops(); // Initialize the top laptop window.headerLaptop = new window.Laptop(document.getElementById('header-wrapper').getElementsByClassName('laptop3d')[0], -1); window.onscroll(); setTimeout...
document.addEventListener('DOMContentLoaded', () => { setTimeout(window.browserCheck, 1000); window.setupGol(); window.navUpdate(true); window.setupLaptops(); // Initialize the top laptop window.headerLaptop = new window.Laptop(document.getElementById('header-wrapper').getElementsByClassName('laptop3d')[0]...
Move browser checking before any other scripts
Move browser checking before any other scripts Therefore if an exception is thrown in any of the scripts, browser checking can still be properly run, allowing users on incompatible browsers to be informed of that.
JavaScript
mit
controversial/controversial.io,controversial/controversial.io,controversial/controversial.io
9c57e5785e106f9ad0436bd87e561a5c5ee0bb48
spec/server/components/store/helper-spec.js
spec/server/components/store/helper-spec.js
var storeHelper = require('../../../../server/components/store/helper.js'); describe('validationComponent', function () { describe('checkExsits', function () { it('should return File doesn\'t exist. if the file can\'t be found', function (done) { storeHelper.checkExsits('/home/Abcd123') ...
var storeHelper = require('../../../../server/components/store/helper.js'); describe('validationComponent', function () { describe('checkExsits', function () { it('should return a message (File doesn\'t exist.) if the file can\'t be found', function (done) { storeHelper.checkExsits('/home/Abc...
Add some more tests to helper spec
test(cottontail): Add some more tests to helper spec
JavaScript
apache-2.0
rabix/cottontail,rabix/cottontail,rabix/cottontail
5f8eaafdbe943958092cb5307c909c32b0fcaef1
frontend/src/pages/home/index.js
frontend/src/pages/home/index.js
import React, { Fragment } from 'react'; import { useAuth } from '../../util/auth'; import Navbar from './../../components/Navbar'; import SignInSection from './../../components/SignInSection'; import BalanceReportSection from '../../components/BalanceReportSection'; import './styles.scss'; function HomePage() { con...
import React, { Suspense, Fragment, lazy } from 'react'; import { useAuth } from '../../util/auth'; import Navbar from './../../components/Navbar'; import SignInSection from './../../components/SignInSection'; import './styles.scss'; const BalanceReportSection = lazy(() => import('../../components/BalanceReportSecti...
Add lazy loading of report section
Add lazy loading of report section
JavaScript
isc
bostrom/harvest-balance,bostrom/harvest-balance
168e86700b5e19480e1d17b4080562a5398f3e2a
src/filter/set-list.js
src/filter/set-list.js
import parallel from 'async/parallel'; import defaults from 'lodash-es/defaults'; import handleEtag from '../helper/etag'; import keyFactory from '../helper/key'; export default function setList(cache, options = {}) { options = defaults({}, options, { etag: true, list: null, total: ['where'] }); con...
import parallel from 'async/parallel'; import defaults from 'lodash-es/defaults'; import handleEtag from '../helper/etag'; import keyFactory from '../helper/key'; export default function setList(cache, options = {}) { options = defaults({}, options, { etag: true, list: null, total: ['where'] }); con...
Check if total is set
Check if total is set
JavaScript
mit
scola84/node-api-cache
d053afe96fcb4921af296180492050eb7c69488a
client/src/models/Position.js
client/src/models/Position.js
import Model from 'components/Model' import RS_ICON from 'resources/rs_small.png' import AFG_ICON from 'resources/afg_small.png' export default class Position extends Model { static resourceName = 'Position' static listName = 'positionList' static schema = { name: '', type: '', code: '', status: 'ACTIVE',...
import Model from 'components/Model' import RS_ICON from 'resources/rs_small.png' import AFG_ICON from 'resources/afg_small.png' export default class Position extends Model { static resourceName = 'Position' static listName = 'positionList' static schema = { name: '', type: '', code: '', status: 'ACTIVE',...
Fix RS icon for non-Advisor NATO members
Fix RS icon for non-Advisor NATO members
JavaScript
mit
NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet
aab5b07204a2394c4c330e89e7e6011a378bcf24
imports/api/reports/reports.js
imports/api/reports/reports.js
import { Meteor } from 'meteor/meteor'; const Reports = { columns: {}, rows: {} }; Reports.collection = new Meteor.Collection('Reports'); Reports.add = () => { return Reports.collection.insert({ columns: [], rows: [] }); }; Reports.addToTable = (reportId, type, id) => { if (type === 'measure') { Reports.row...
import { Meteor } from 'meteor/meteor'; const Reports = { columns: {}, rows: {} }; Reports.collection = new Meteor.Collection('Reports'); Reports.add = () => { return Reports.collection.insert({ columns: [], rows: [] }); }; Reports.addToTable = (reportId, type, id) => { if (type === 'measure') { Reports.row...
Replace with for no duplicates
Replace with for no duplicates
JavaScript
mit
minden/data-furnace,minden/data-furnace
f82a5e830145292a6d0dd58de563b6fe0dcc186b
imports/startup/client/i18n.js
imports/startup/client/i18n.js
import { Meteor } from 'meteor/meteor'; import { TAPi18n } from 'meteor/tap:i18n'; let getUserLanguage = function() { // Put here the logic for determining the user language return 'fr'; }; if (Meteor.isClient) { Meteor.startup(function() { TAPi18n.setLanguage(getUserLanguage()).fail(function(error_message) { ...
import { Meteor } from 'meteor/meteor'; import { TAPi18n } from 'meteor/tap:i18n'; import { Bert } from 'meteor/themeteorchef:bert'; let getUserLanguage = () => { // Put here the logic for determining the user language return 'fr'; }; if (Meteor.isClient) { Meteor.startup(() => { TAPi18n.setLanguage(getUserLangu...
Put code into ES6 mode
Put code into ES6 mode
JavaScript
mit
jeremyfourna/basket-live-stats,jeremyfourna/basket-live-stats
7b2ac9bab5cef6e015a61cacd9368e5040271358
app/routes/index.js
app/routes/index.js
'use strict'; var path = process.cwd(); module.exports = function (app) { app.route('/') .get(function (req, res) { res.sendFile(path + '/public/index.html'); }); app.route('/:time') .get(function(req, res) { console.log("Reached the regexp route for", req.url); let timeStr = req.params.time; ...
'use strict'; var path = process.cwd(); module.exports = function (app) { app.route('/') .get(function (req, res) { res.sendFile(path + '/public/index.html'); }); app.route('/:time') .get(function(req, res) { console.log("Reached the regexp route for", req.url); let timeStr = req.params.time; ...
Add a function for formatting a date
Add a function for formatting a date
JavaScript
mit
paperbagcorner/timestamp-microservice,paperbagcorner/timestamp-microservice
dbf5f838d1f9edb84b24d540aeaacebf8ebe0928
app/routes/index.js
app/routes/index.js
'use stricts'; var path = process.cwd(); var Controller = require(path + '/app/controller/parserController.js'); var parserController = new Controller(); module.exports = function(app) { app.route('/') .get(function(req, res){ res.sendFile(path + "/public/index.html"); }); app.route('/whoami') .get(func...
'use stricts'; var path = process.cwd(); var Controller = require(path + '/app/controller/parserController.js'); var parserController = new Controller(); module.exports = function(app) { app.route('/') .get(function(req, res){ res.sendFile(path + "/public/index.html"); }); app.route('/whoami') .get(func...
Make default redirect page in case of no url served
Make default redirect page in case of no url served
JavaScript
mit
anonymint/header-parser-service,anonymint/header-parser-service
21472844d1a1368b471154100370e4ca547bef69
connectors/v2/beatport-www.js
connectors/v2/beatport-www.js
'use strict'; /* global Connector */ Connector.playerSelector = '.player-container'; Connector.artistSelector = '.player-track-name-artist-standard .track-artist'; Connector.getTrack = function() { var trackName = $('.player-track-name-artist-standard .primary-title').text(); var remixedBy = $('.player-track-name...
'use strict'; /* global Connector, MetadataFilter */ Connector.playerSelector = '.player-container'; Connector.artistSelector = '.player-track-name-artist-standard .track-artist'; Connector.trackSelector = '.player-track-name-artist-standard .primary-title'; Connector.getUniqueID = function() { var trackUrl = $('...
Use MetadataFilter to modify track title
Beatport: Use MetadataFilter to modify track title
JavaScript
mit
alexesprit/web-scrobbler,carpet-berlin/web-scrobbler,galeksandrp/web-scrobbler,Paszt/web-scrobbler,david-sabata/web-scrobbler,inverse/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,usdivad/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,Paszt/web-scrobbler,david-sabata/web-scrobbler,alexesprit/web-scrobbler,carpet-ber...
ea6e156a42d42a55f2d5469234ba2a7d6e05b6a6
src/Parser/Rogue/Subtlety/CONFIG.js
src/Parser/Rogue/Subtlety/CONFIG.js
import SPECS from 'common/SPECS'; import SPEC_ANALYSIS_COMPLETENESS from 'common/SPEC_ANALYSIS_COMPLETENESS'; import CombatLogParser from './CombatLogParser'; import CHANGELOG from './CHANGELOG'; export default { spec: SPECS.SUBTLETY_ROGUE, maintainer: '@zealk', completeness: SPEC_ANALYSIS_COMPLETENESS.NEEDS_MO...
import SPECS from 'common/SPECS'; import SPEC_ANALYSIS_COMPLETENESS from 'common/SPEC_ANALYSIS_COMPLETENESS'; import CombatLogParser from './CombatLogParser'; import CHANGELOG from './CHANGELOG'; export default { spec: SPECS.SUBTLETY_ROGUE, maintainer: '@zealk', completeness: SPEC_ANALYSIS_COMPLETENESS.NOT_ACTI...
Update Sub Rogue completion to "not actively maintained" since it hasn't been updated in a long time
Update Sub Rogue completion to "not actively maintained" since it hasn't been updated in a long time
JavaScript
agpl-3.0
fyruna/WoWAnalyzer,anom0ly/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,anom0ly/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,yajinni/WoWAnalyzer,sMteX/WoWAnalyzer,Juko8/WoWAnalyzer,enragednuke/WoWAnalyzer,FaideWW/WoWAnalyzer,yajinni/WoWAnalyzer,FaideWW/WoWAnalyzer,yajinni/WoWAnalyzer,enragednuke/WoWAnalyzer,FaideWW/WoWAnalyzer,sMteX/WoW...
3ed1665eba51c7ece07a2d581d779f1237d9ac3d
js/directives.js
js/directives.js
var app = angular.module('ProductsApp'); app.directive('inplaceEditing', function() { return { restrict: 'E', scope: { edit:'=' }, controller : 'editmodeController as editCtrl', template: "<div class='col-xs-10 list-group-item' ng-show='edit.editMode'> <input...
var app = angular.module('ProductsApp'); app.directive('inplaceEditing', function() { return { restrict: 'E', scope: { edit:'=' }, controller : 'editmodeController as editCtrl', template: "<div id='editTbx' class='col-xs-10 list-group-item' ng-show='edit.edit...
Add focus directive and implement on inplace-editing template
Add focus directive and implement on inplace-editing template
JavaScript
mit
Tribu-Anal/Product-Management,Tribu-Anal/Product-Management
e26cd1f1e965a5ae2a613151eb782a766d4215ba
lib/assets/javascripts/cartodb/common/dialogs/georeference/steps_view.js
lib/assets/javascripts/cartodb/common/dialogs/georeference/steps_view.js
var cdb = require('cartodb.js'); var RowsView = require('./rows_view'); var ChooseGeometryView = require('./choose_geometry_view'); var ViewFactory = require('../../view_factory'); /** * View for the georeference types that requires the two-steps flow. * First select columns values, and then the geometry type to use...
var cdb = require('cartodb.js'); var RowsView = require('./rows_view'); var ChooseGeometryView = require('./choose_geometry_view'); var ViewFactory = require('../../view_factory'); /** * View for the georeference types that requires the two-steps flow. * First select columns values, and then the geometry type to use...
Make methods names more representative
Make methods names more representative
JavaScript
bsd-3-clause
nuxcode/cartodb,thorncp/cartodb,DigitalCoder/cartodb,CartoDB/cartodb,future-analytics/cartodb,nyimbi/cartodb,nuxcode/cartodb,DigitalCoder/cartodb,bloomberg/cartodb,nyimbi/cartodb,DigitalCoder/cartodb,splashblot/dronedb,codeandtheory/cartodb,UCL-ShippingGroup/cartodb-1,dbirchak/cartodb,future-analytics/cartodb,dbirchak/...
d9cfc0f2a4cce7242ee1c50fa7903c7349942ef4
javascript/test/GherkinTest.js
javascript/test/GherkinTest.js
/* eslint-env mocha */ const assert = require('assert') const cm = require('cucumber-messages').io.cucumber.messages const Gherkin = require('../src/Gherkin') describe('Gherkin', () => { it('parses gherkin from the file system', async () => { const messages = await streamToArray( Gherkin.fromPaths(['testda...
/* eslint-env mocha */ const assert = require('assert') const cm = require('cucumber-messages').io.cucumber.messages const Gherkin = require('../src/Gherkin') describe('Gherkin', () => { it('parses gherkin from the file system', async () => { const messages = await streamToArray( Gherkin.fromPaths(['testda...
Add a bit of logging
Add a bit of logging
JavaScript
mit
cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin
c8d204f77d852615389b2930c15ee3e8fc5addb6
spec/string_spec.js
spec/string_spec.js
describe('hasVowels()', function() { it('should always return a boolean', function() { expect('example string'.hasVowels()).toEqual(jasmine.any(Boolean)); }); it('should return true if string has vowels', function() { expect('oreofe'.hasVowels()).toBe(true); expect(('AnDeLa').hasVow...
describe('hasVowels()', function() { it('should always return a boolean', function() { expect('example string'.hasVowels()).toEqual(jasmine.any(Boolean)); }); it('should return true if string has vowels', function() { expect('oreofe'.hasVowels()).toBe(true); expect(('AnDeLa').hasVow...
Add spec to test the returned result of toLower
Add spec to test the returned result of toLower
JavaScript
mit
andela-oolutola/string-class,andela-oolutola/string-class
4e7e134299735332e92908c58f7af12f85b0ae96
externs/browser/deprecated.js
externs/browser/deprecated.js
/* * Copyright 2008 The Closure Compiler Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
/* * Copyright 2008 The Closure Compiler Authors * * 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 ...
Make Option extend HTMLOptionElement instead of Element
Make Option extend HTMLOptionElement instead of Element Fixes #1759. Merge pull request #1760 from Dominator008/closure-compiler Closes https://github.com/google/closure-compiler/pull/1760 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=121322776
JavaScript
apache-2.0
mprobst/closure-compiler,ChadKillingsworth/closure-compiler,MatrixFrog/closure-compiler,ChadKillingsworth/closure-compiler,Dominator008/closure-compiler,mprobst/closure-compiler,LorenzoDV/closure-compiler,mprobst/closure-compiler,Yannic/closure-compiler,brad4d/closure-compiler,nawawi/closure-compiler,superkonduktr/clos...
6e8fafbc7f2f66daa122428288a64440e4115c02
src/mist/io/static/js/app/views/key_list.js
src/mist/io/static/js/app/views/key_list.js
define('app/views/key_list', [ 'text!app/templates/key_list.html', 'ember' ], /** * * Key list page * * @returns Class */ function(key_list_html) { return Ember.View.extend({ tagName: false, init: function() { this._super(); ...
define('app/views/key_list', [ 'text!app/templates/key_list.html', 'ember' ], /** * * Key list page * * @returns Class */ function(key_list_html) { return Ember.View.extend({ tagName: false, init: function() { this._super(); ...
Hide actions after key deletion
Hide actions after key deletion
JavaScript
agpl-3.0
munkiat/mist.io,munkiat/mist.io,kelonye/mist.io,afivos/mist.io,johnnyWalnut/mist.io,DimensionDataCBUSydney/mist.io,DimensionDataCBUSydney/mist.io,johnnyWalnut/mist.io,Lao-liu/mist.io,zBMNForks/mist.io,zBMNForks/mist.io,kelonye/mist.io,zBMNForks/mist.io,DimensionDataCBUSydney/mist.io,johnnyWalnut/mist.io,Lao-liu/mist.io...
40138f244c80cff406ca2a395be3d587a3929dd5
assets/js/googlesitekit-data.js
assets/js/googlesitekit-data.js
/** * External dependencies */ /** * Internal dependencies */ import SiteKitRegistry from 'assets/js/googlesitekit/data'; import { registerSiteKitStores } from 'assets/js/googlesitekit/data/store'; import { collectReducers } from 'assets/js/googlesitekit/data/utils'; if ( typeof global.googlesitekit === 'undefine...
/** * External dependencies */ /** * Internal dependencies */ import SiteKitRegistry from 'assets/js/googlesitekit/data'; import { registerSiteKitStores } from 'assets/js/googlesitekit/data/store'; import { collect, collectReducers } from 'assets/js/googlesitekit/data/utils'; if ( typeof global.googlesitekit === ...
Add collect to data exports.
Add collect to data exports.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
03e037172192914e6625bb0063b8a709994bc2eb
src/createAction.js
src/createAction.js
let id = 0; const identity = arg => arg; export default function createAction(name, mapper = identity) { if (typeof name === 'function') { mapper = name; name = undefined; } if (typeof mapper !== 'function') { mapper = identity; } const action = { id: ++id, type: `[${id}]${name ? ' ' +...
let id = 0; const identity = arg => arg; export default function createAction(name, mapper = identity) { if (typeof name === 'function') { mapper = name; name = undefined; } if (typeof mapper !== 'function') { mapper = identity; } const action = { id: ++id, type: `[${id}]${name ? ' ' +...
Remove dispatch check since there is none for store array
Remove dispatch check since there is none for store array
JavaScript
apache-2.0
xgrommx/redux-act,pauldijou/redux-act,pauldijou/redux-act,xgrommx/redux-act,rstuven/redux-act
0d8cf08adb1e9b8a8ebd780a5f66a66549a5028a
spec/javascripts/student_profile_v2/student_profile_header_spec.js
spec/javascripts/student_profile_v2/student_profile_header_spec.js
//= require ./fixtures describe('StudentProfileHeader', function() { var dom = window.shared.ReactHelpers.dom; var createEl = window.shared.ReactHelpers.createEl; var merge = window.shared.ReactHelpers.merge; var StudentProfileHeader = window.shared.StudentProfileHeader; var SpecSugar = window.shared.SpecSu...
//= require ./fixtures describe('StudentProfileHeader', function() { var dom = window.shared.ReactHelpers.dom; var createEl = window.shared.ReactHelpers.createEl; var merge = window.shared.ReactHelpers.merge; var StudentProfileHeader = window.shared.StudentProfileHeader; var SpecSugar = window.shared.SpecSu...
Add test case for non-Active student
Add test case for non-Active student
JavaScript
mit
erose/studentinsights,studentinsights/studentinsights,jhilde/studentinsights,jhilde/studentinsights,erose/studentinsights,erose/studentinsights,erose/studentinsights,jhilde/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,jhilde/studentinsights
be4ddab218e83a5467021ba21c2e4887599a29e1
awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory-host-filter/smart-inventory-host-filter.controller.js
awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory-host-filter/smart-inventory-host-filter.controller.js
/************************************************* * Copyright (c) 2017 Ansible, Inc. * * All Rights Reserved *************************************************/ export default ['$scope', 'QuerySet', 'InventoryHostsStrings', function($scope, qs, InventoryHostsStrings) { $scope.hostFilterTags = []; ...
/************************************************* * Copyright (c) 2017 Ansible, Inc. * * All Rights Reserved *************************************************/ export default ['$scope', 'QuerySet', 'InventoryHostsStrings', function($scope, qs, InventoryHostsStrings) { $scope.hostFilterTags = []; ...
Hide filter tooltip when host filter is disabled
Hide filter tooltip when host filter is disabled
JavaScript
apache-2.0
snahelou/awx,snahelou/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,wwitzel3/awx
fc4a0c79e5b80d0899b7ae2934e7f105e319a75c
src/cache_client.js
src/cache_client.js
var FileSystem = require('fs'); var RequestHash = require('./request_hash'); var CacheClient = function(cacheDir) { this.cacheDir = cacheDir; } CacheClient.prototype.isCached = function (request) { var self = this; return new Promise(function(resolve, reject) { var mode = FileSystem.F_OK | FileSystem.R_OK |...
var FileSystem = require('fs'); var RequestHash = require('./request_hash'); var CacheClient = function(cacheDir) { this.cacheDir = cacheDir; } CacheClient.prototype.isCached = function (request) { var self = this; var mode = FileSystem.F_OK | FileSystem.R_OK | FileSystem.W_OK; var error; try { error = ...
Add Record Logic to Recall Responses
Add Record Logic to Recall Responses
JavaScript
apache-2.0
blad/mockingjays
157ce6d452a2a7806d559135ad835fb635645bd7
client/src/js/core/feed.js
client/src/js/core/feed.js
import equal from 'deep-equal'; export default class Feed { constructor(api, path, params) { this.api = api; this.path = path; this.params = params; this.nextURL = undefined; this.items = []; } sameAs(other) { return this.path == other.path && equal(this.params, other.params); } f...
import equal from 'deep-equal'; export default class Feed { constructor(api, path, params) { this.api = api; this.path = path; this.params = params; this.nextURL = undefined; this.items = []; } fetchAll() { return new Promise((resolve, reject) => { const next = () => { if...
Remove an unneeded method from Feed class
Remove an unneeded method from Feed class
JavaScript
mit
despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics
0a1321c4965a5522882ed681b0d55011aa1586a3
src/middleware/error/error_handler.js
src/middleware/error/error_handler.js
'use strict'; const { logEvent } = require('../../log'); // Error handler, which sends final response, if server-side errors const errorHandler = async function ({ error, protocolAdapter, config, mInput, }) { // Make sure a response is sent, even empty, or the socket will hang await protocolAdapter.send({...
'use strict'; const { logEvent } = require('../../log'); // Error handler, which sends final response, if server-side errors const errorHandler = async function ({ error, protocolAdapter, config, mInput, }) { // Make sure a response is sent, even empty, or the socket will hang await protocolAdapter.send({...
Make sure server-side errors do not have status SUCCESS
Make sure server-side errors do not have status SUCCESS
JavaScript
apache-2.0
autoserver-org/autoserver,autoserver-org/autoserver
c655d71d499ac55df884f8a80c9c21999c723d5a
src/js/Renderer.js
src/js/Renderer.js
var drawLine = function(sx, sy, dx, dy) { gfx.ctx.beginPath(); gfx.ctx.moveTo(sx, sy); gfx.ctx.lineTo(dx, dy); gfx.ctx.stroke(); } var drawWorld = function(world) { drawGrid(world); } var drawGrid = function(world) { for (var x = 0; x <= world.getWidth(); x++) { var cell_x = (camera....
var drawLine = function(sx, sy, dx, dy) { gfx.ctx.beginPath(); gfx.ctx.moveTo(sx, sy); gfx.ctx.lineTo(dx, dy); gfx.ctx.stroke(); } var drawWorld = function(world) { drawGrid(world); } gfx.ctx.strokeStyle = "#000000"; for (var x = 0; x <= world.getWidth(); x++) { var draw_x = camer...
Improve grid rendering with new camera methods
Improve grid rendering with new camera methods
JavaScript
mit
Tactique/jswars
5a425d99e5e851ad793b6f7e92199004996dc139
karma.conf.js
karma.conf.js
/* global process */ module.exports = function (config) { config.set({ browsers: [ process.env.CONTINUOUS_INTEGRATION ? 'Firefox' : 'Chrome' ], singleRun: true, frameworks: [ 'mocha' ], files: [ 'https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0/react-with-addons.js', ...
/* global process */ module.exports = function (config) { config.set({ browsers: [ process.env.CONTINUOUS_INTEGRATION ? 'Firefox' : 'Chrome' ], singleRun: !!process.env.CONTINUOUS_INTEGRATION, frameworks: [ 'mocha' ], files: [ 'https://cdnjs.cloudflare.com/ajax/libs/react...
Use multiple run for local karma
Use multiple run for local karma
JavaScript
mit
vlad-ignatov/react-numeric-input,vlad-ignatov/react-numeric-input
c742594ec775ed74d073dc4f2e616ceeb1272d66
src/utils/selectors.js
src/utils/selectors.js
import {mapValues} from 'lodash'; import shallowEquals from 'shallow-equal/objects'; // Simplified version of reselect const createSelector = (select, inputEquals) => { let lastInput = null; let lastResult = null; return (...input) => { if (!lastInput || !inputEquals(lastInput, input)) { ...
import {mapValues} from 'lodash'; import shallowEquals from 'shallow-equal/objects'; import arrayShallowEquals from 'shallow-equal/arrays'; // Simplified version of reselect export const createSelector = (select, inputEquals = arrayShallowEquals) => { let lastInput = null; let lastResult = null; return (....
Fix event binding selector in unified mode
Fix event binding selector in unified mode
JavaScript
mit
otakustay/react-diff-view,otakustay/react-diff-view
3868565c26a23b5498a87a2220353293748c03ee
client/views/homes/singleHomeActivityStatus/singleHomeActivityStatus.js
client/views/homes/singleHomeActivityStatus/singleHomeActivityStatus.js
Template.singleHomeActivityStatus.helpers({ "activityLevelCounts": function () { var instance = this; // Get ID of current home var homeId = this._id; return ReactiveMethod.call("getHomeActivityLevelCounts", homeId); } });
Template.singleHomeActivityStatus.onCreated(function () { var instance = this; // Get ID of current home var homeId = instance.data.home._id; // Add variable to hold activity counts instance.activityLevelCounts = new ReactiveVar(); instance.autorun(function () { // Retrieve home residen...
Set up activityLevelCounts instance reactive var
Set up activityLevelCounts instance reactive var
JavaScript
agpl-3.0
GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing
bf79c17fa247ecfef9a6d213fc51ea2eec42bb68
shared/js/migrations/migrations.js
shared/js/migrations/migrations.js
/** * Migrates the database from one version to another. */ function migrateStorage() { var extensionVersion = getExtensionVersion(); getStorageVersion(function(storageVersion) { if (!versionsAreEqual(extensionVersion, storageVersion)) { console.log("Extension and storage versions are not equal", extensionVer...
/** * Migrates the database from one version to another. */ function migrateStorage() { var extensionVersion = getExtensionVersion().major; getStorageVersion(function(storageVersion) { if (extensionVersion != storageVersion) { console.log("Extension and storage versions are not equal", extensionVersion, stora...
Fix comparison of extension and storage versions.
Fix comparison of extension and storage versions.
JavaScript
mit
AntarcticApps/Tiles,AntarcticApps/Tiles