commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
624
message
stringlengths
15
4.7k
lang
stringclasses
3 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
6a26cf39c0ee32e58c73a1e8b5b62422e802e2e6
tests/dummy/app/components/button-cell.js
tests/dummy/app/components/button-cell.js
import Em from 'ember'; import LlamaBodyCell from 'llama-table/components/llama-body-cell/component'; import layout from 'dummy/templates/components/button-cell'; var computed = Em.computed; var gt = computed.gt; var not = computed.not; var ButtonCell = LlamaBodyCell.extend({ layout: layout, showButton: not('isFoote...
import Em from 'ember'; import LlamaBodyCell from 'llama-table/components/llama-body-cell/component'; import layout from 'dummy/templates/components/button-cell'; var computed = Em.computed; var gt = computed.gt; var not = computed.not; var ButtonCell = LlamaBodyCell.extend({ layout: layout, showButton: not('isFoote...
Fix remove button in demo table
Fix remove button in demo table
JavaScript
mit
luxbet/ember-cli-llama-table,j-/ember-cli-llama-table,luxbet/ember-cli-llama-table,j-/ember-cli-llama-table
4c6048b04acc62d35502739d4bf1938fd92f7240
Gruntfile.js
Gruntfile.js
module.exports = function (grunt) { grunt.initConfig({ nodewebkit: { options: { platforms: ['win', 'osx'], buildDir: './build', version: '0.12.1' }, src: [ 'index.html', 'package.json', ...
module.exports = function (grunt) { grunt.initConfig({ nodewebkit: { options: { platforms: ['win', 'osx', 'linux'], buildDir: './build', version: '0.12.1' }, src: [ 'index.html', 'package.jso...
Add linux in build options
Add linux in build options
JavaScript
mit
tnilles/basalt,tnilles/basalt
31da6e2c375d4eec9b4056b05939ebe496915a67
Gruntfile.js
Gruntfile.js
'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { files: ['Gruntfile.js', 'lib/**/*.js'], options: { globalstrict: true, node: true, globals: { jQuery: true, console: false, ...
'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { options: { globalstrict: true, node: true, globals: { jQuery: true, console: false, module: true, document: true ...
Remove `file` field from jshint configuration.
Remove `file` field from jshint configuration. Tests were failing with message "Warning: Path must be a string. Received null" Closes imdone/imdone-core#48
JavaScript
mit
imdone/imdone-core,imdone/imdone-core
18590218bc4096b10bb5aade82e5c83af41768ea
Gruntfile.js
Gruntfile.js
'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { allFiles: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js', 'index.js'], options: { jshintrc: '.jshintrc', } }, ...
'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { allFiles: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js', 'index.js'], options: { jshintrc: '.jshintrc', } }, ...
Update coverage values to match current
Update coverage values to match current
JavaScript
apache-2.0
xmpp-ftw/xmpp-ftw-wtf
d54be665eda70dbb074de72704eb64311e5d8c84
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { // TODO: platforms shouldn't be hardcoded here var platforms = ['win64']; // Build up array of destinations for Twister deamon files var destinations = {files: []}; platforms.forEach(function (platform) { destinations.files.push({ expand: ...
module.exports = function(grunt) { // TODO: platforms shouldn't be hardcoded here var platforms = ['win64']; // Build up array of destinations for Twister deamon files var destinations = {files: []}; platforms.forEach(function (platform) { destinations.files.push({ expand: ...
Fix Grunt file for local testing
Fix Grunt file for local testing
JavaScript
mit
ArcoMul/Twisting,ArcoMul/Twisting
f321bea271fd94c665c1e524a743e2b88ed21134
src/components/Rectangle.js
src/components/Rectangle.js
import React from 'react'; import styles from 'stylesheets/components/common/typography'; const Rectangle = () => ( <div> <h1 className={styles.heading}>Rechteck</h1> <div> <h2>Eingabe</h2> <form> <div> <label id="rechteck_a">a: <input type="text" /> </lab...
import React from 'react'; import styles from 'stylesheets/components/common/typography'; class Rectangle extends React.Component { constructor(props) { super(props); this.state = { edgeA: 0, edgeB: 0, area: 0 }; this.handleChange = this.handleChange.bind(this); } handleChange...
Implement computation of rectangle's area
Implement computation of rectangle's area
JavaScript
mit
laschuet/geometrie_in_react,laschuet/geometrie_in_react
272693c4b3f83542e72cac826171b712903dd0a7
src/components/ImageCardComponent.js
src/components/ImageCardComponent.js
import React from 'react'; class ImageCardComponent extends React.Component { static propTypes = { uri: React.PropTypes.string.isRequired, uploadedAt: React.PropTypes.string.isRequired }; render() { return ( <div className='ImageCardComponent'> <div className='card'> <a href=...
import React from 'react'; class ImageCardComponent extends React.Component { static propTypes = { uri: React.PropTypes.string.isRequired, uploadedAt: React.PropTypes.string.isRequired }; render() { return ( <div className='ImageCardComponent'> <div className='card'> <a href=...
Fix typo 'ploadedAt' => 'uploadedAt'
Fix typo 'ploadedAt' => 'uploadedAt'
JavaScript
mit
ykzts/gyazo-web-client
e714a374e85fbf90dffcdf4c9991cdb0ce1e35c2
lib/deps.js
lib/deps.js
var canihaz = require('canihaz'), fs = require('fs'), p = require('path'); /** * Install dependency modules that are not yet installed, and needed for executing the tasks. * * @param {Array} depNames: an array of dependency module names * @param {String} dir: application directory where node_modules dir is loc...
var canihaz = require('canihaz'), fs = require('fs'), p = require('path'); const GLOBALS = ['npm']; /** * Install dependency modules that are not yet installed, and needed for executing the tasks. * Global modules (like npm) are assumed to already exist. * * @param {Array} depNames: an array of dependency mod...
Add global modules list, to be excluded from lazy installation.
Add global modules list, to be excluded from lazy installation.
JavaScript
mit
cliffano/bob
787aba818986daf0a17342b8d86918c8925541e8
js/links.js
js/links.js
function setupLinkHandling() { window.history.pushState({"html": document.documentElement.outerHTML}, "", window.location.href); var anchors = document.getElementsByTagName("a"); for (var i = 0; i < anchors.length; i++) { if (anchors[i].href.startsWith("http://localhost") || anchors[i].href.starts...
function setupLinkHandling() { window.history.pushState({"html": document.documentElement.outerHTML}, "", window.location.href); var anchors = document.getElementsByTagName("a"); for (var i = 0; i < anchors.length; i++) { if (["localhost", "atomhacks.github.io", "bxhackers.club"].includes(window.l...
Fix custom page loading with new domain
Fix custom page loading with new domain
JavaScript
mit
atomhacks/club,atomhacks/club,atomhacks/club
f27b29bc8075903889eb854f6641a4704add59cf
AppMetadata.js
AppMetadata.js
'use strict'; /** Application-wide metadata is stored here for reuse */ module.exports = { FRONTEND_VERSION: 31 };
'use strict'; /** Application-wide metadata is stored here for reuse */ module.exports = { FRONTEND_VERSION: 32 };
Increment version to force refresh
Increment version to force refresh
JavaScript
mit
nicktindall/cyclon.p2p-webrtc-demo,nicktindall/cyclon.p2p-webrtc-demo
14d3e65b2130937df97b0f1c3837a97bea28b5e9
src/game/vue-game-plugin.js
src/game/vue-game-plugin.js
import GameStateManager from "./GameStates/GameStateManager"; import CommandParser from "./Commands/CommandParser"; import GenerateName from "./Generators/NameGenerator"; export default { install: (Vue) => { Vue.prototype.$game = { startGame() { return GameStateManager.StartGame(); }, g...
import GameStateManager from "./GameStates/GameStateManager"; // import CommandParser from "./Commands/CommandParser"; import GenerateName from "./Generators/NameGenerator"; export default { install: (Vue) => { Vue.prototype.$game = { startGame() { return GameStateManager.StartGame(); }, ...
Stop using command parser file
Stop using command parser file
JavaScript
mit
Trymunx/Dragon-Slayer,Trymunx/Dragon-Slayer
2ba4862ed41b50cf8a2dc7eb67abf0fc7b7426cf
assets/code-blocks.js
assets/code-blocks.js
var fs = require('fs') var path = require('path') var codeBlocks = document.querySelectorAll('code[data-path]') Array.prototype.forEach.call(codeBlocks, function (code) { code.textContent = fs.readFileSync(path.join(__dirname, code.dataset.path)) })
var fs = require('fs') var path = require('path') var codeBlocks = document.querySelectorAll('code[data-path]') Array.prototype.forEach.call(codeBlocks, function (code) { var codePath = code.dataset.path code.textContent = fs.readFileSync(path.join(__dirname, '..', codePath)) })
Use new path based on changed __dirname
Use new path based on changed __dirname
JavaScript
mit
electron/electron-api-demos,electron/electron-api-demos,blep/electron-api-demos,blep/electron-api-demos,electron/electron-api-demos,PanCheng111/XDF_Personal_Analysis,blep/electron-api-demos,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,PanCheng111/XDF_Personal_Analysis
e8a791cb546031733f1e74c2831e28fd0685cec1
webpack.common.js
webpack.common.js
const path = require('path'); const CleanWebpackPlugin = require('clean-webpack-plugin'); module.exports = { entry: { login: './public/src/js/login.js', register: './public/src/js/register.js', 'admin-search': './public/src/js/admin-search.js', 'admin-users': './public/src/js/admin-users.js', 'ad...
const path = require('path'); const CleanWebpackPlugin = require('clean-webpack-plugin'); module.exports = { entry: { login: './public/src/js/login.js', register: './public/src/js/register.js', 'admin-search': './public/src/js/admin-search.js', 'admin-users': './public/src/js/admin-users.js', 'ad...
Use single quotes in webpack config
Use single quotes in webpack config
JavaScript
bsd-3-clause
usi-lfkeitel/packet-guardian,packet-guardian/packet-guardian,packet-guardian/packet-guardian,usi-lfkeitel/packet-guardian,packet-guardian/packet-guardian,usi-lfkeitel/packet-guardian,packet-guardian/packet-guardian,packet-guardian/packet-guardian
94e165492705454da2f6fae8c9d3ca3902e2c35f
js/locales/foundation-datepicker.lv.js
js/locales/foundation-datepicker.lv.js
w/** * Latvian translation for foundation-datepicker * Artis Avotins <artis@apit.lv> */ ;(function($){ $.fn.fdatepicker.dates['lv'] = { days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena", "Svētdiena"], daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S...
/** * Latvian translation for foundation-datepicker * Artis Avotins <artis@apit.lv> */ ;(function($){ $.fn.fdatepicker.dates['lv'] = { days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena", "Svētdiena"], daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S"...
Remove stray character breaking scripts.
Remove stray character breaking scripts.
JavaScript
apache-2.0
najlepsiwebdesigner/foundation-datepicker,najlepsiwebdesigner/foundation-datepicker
277bf2ab16b7936a35dcf65fa886ee836a2f98e5
lib/argv.js
lib/argv.js
var argv = require('cmdenv')('micromono') /** * Parse commmand line and environment options */ argv .allowUnknownOption() .option('-s --service [services]', 'Names of services to require. Use comma to separate multiple services. (e.g. --service account,cache) Env name: MICROMONO_SERVICE') .option('-d --service...
var argv = require('cmdenv')('micromono') /** * Parse commmand line and environment options */ argv .allowUnknownOption() .option('-s --service [services]', 'Names of services to require. Use comma to separate multiple services. (e.g. --service account,cache) Env name: MICROMONO_SERVICE') .option('-d --service...
Add rpc host and remove --allow-pending.
Add rpc host and remove --allow-pending.
JavaScript
mit
lsm/micromono,lsm/micromono,lsm/micromono
f46aae10757ea8d86d1870503972e7c8d379aa81
src/tizen/SplashScreenProxy.js
src/tizen/SplashScreenProxy.js
( function() { win = null; module.exports = { show: function() { if ( win === null ) { win = window.open('splashscreen.html'); } }, hide: function() { if ( win !== null ) { win.close(); win = null; } } }; require("cordova/tizen/comm...
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); y...
Add license headers to Tizen code
CB-6465: Add license headers to Tizen code
JavaScript
apache-2.0
IWAtech/cordova-plugin-splashscreen,Icenium/cordova-plugin-splashscreen,revolunet/cordova-plugin-splashscreen,journeyapps/cordova-splashscreen,bamlab/cordova-plugin-splashscreen,chrskrchr/cordova-plugin-splashscreen,sportstech/cordova-plugin-splashscreen,Panajev/cordova-plugin-splashscreen,journeyapps/cordova-splashscr...
ed720392553313a44aec6903d186021f93b96cb9
newrelic.js
newrelic.js
'use strict'; // Configuration for the New Relic Node.js agent exports.config = { app_name: process.env.NEW_RELIC_APP_NAME || 'app', logging: { filepath: process.env.NEW_RELIC_LOG || 'stdout' } };
'use strict'; // Configuration for the New Relic Node.js agent module.exports.config = { app_name: process.env.NEW_RELIC_APP_NAME || 'app', logging: { filepath: process.env.NEW_RELIC_LOG || 'stdout' } };
Use always "module.exports", not the alias "exports"
Use always "module.exports", not the alias "exports"
JavaScript
mit
dragonservice/sso-server
51df22908705f471b0128416b6843c2351ab2036
app/index.js
app/index.js
const yeoman = require( 'yeoman-generator' ); const description = require( './description' ); module.exports = yeoman.Base.extend({ constructor: function constructor( ...args ) { yeoman.Base.apply( this, args ); this.argument( 'name', { type: String, required: false, desc: description.name, }...
const yeoman = require( 'yeoman-generator' ); const description = require( './description' ); module.exports = yeoman.Base.extend({ constructor: function constructor( ...args ) { yeoman.Base.apply( this, args ); this.argument( 'name', { type: String, required: false, desc: description.name, }...
Rename init method according to the spec.
Rename init method according to the spec.
JavaScript
mit
edloidas/generator-tao
1de0ea9b9793f0695a2e17c2a2d0fd4cff786f4d
Server/src/test/resources/client/sector_identifier.js
Server/src/test/resources/client/sector_identifier.js
[ "https://${test.server.name}/oxauth-rp/home.seam", "https://client.example.org/callback", "https://client.example.org/callback2", "https://client.other_company.example.net/callback", "https://client.example.com/cb", "https://client.example.com/cb1", "https://client.example.com/cb2" ]
[ "https://${test.server.name}/oxauth-rp/home.htm", "https://client.example.org/callback", "https://client.example.org/callback2", "https://client.other_company.example.net/callback", "https://client.example.com/cb", "https://client.example.com/cb1", "https://client.example.com/cb2" ]
Fix uri in secto_identifier js
Fix uri in secto_identifier js
JavaScript
mit
GluuFederation/oxAuth,madumlao/oxAuth,madumlao/oxAuth,GluuFederation/oxAuth,madumlao/oxAuth,GluuFederation/oxAuth,GluuFederation/oxAuth,GluuFederation/oxAuth,madumlao/oxAuth,madumlao/oxAuth
7de243b38dc879ee29e34adf1e3a0fd49f772592
webpack.config.js
webpack.config.js
'use strict'; const NODE_ENV = process.env.NODE_ENV || 'development'; const webpack = require('webpack'); const path = require('path'); const PATHS = { app: path.join(__dirname, 'app'), build: path.join(__dirname, 'build') }; module.exports = { entry: { app: PATHS.app }, output: { ...
'use strict'; const NODE_ENV = process.env.NODE_ENV || 'development'; const webpack = require('webpack'); const path = require('path'); const PATHS = { app: path.join(__dirname, 'app'), build: path.join(__dirname, 'build') }; module.exports = { entry: { app: PATHS.app }, output: { ...
Add include property to babel loader
Add include property to babel loader
JavaScript
mit
boriskaiser/starterkit,boriskaiser/starterkit
d9e2d9c515ba46bae3b86ca44119e445ae51e9ee
lib/services/facebook.service.js
lib/services/facebook.service.js
var serviceName = "facebook"; var request = require("request"); var serviceConfig = require("./../config/services.config.json"); var result = { service: serviceName, status: false } function facebook (cb) { request({ url: serviceConfig[serviceName], method: "GET...
var serviceName = "facebook"; var request = require("request"); var serviceConfig = require("./../config/services.config.json"); function facebook (cb) { var result = { service: serviceName, status: false }; request({ url: serviceConfig[serviceName], ...
Make result object local to function
Make result object local to function
JavaScript
mit
punit1108/upstatejs
780def87c61f5aa1a0af7f25e85abe79a16d55c5
lib/main.js
lib/main.js
'use strict'; var contextify = require('contextify'); var fs = require('fs'); var Context = function () { var rawContext = contextify(); rawContext.globals = rawContext.getGlobal(); return { run: function (source, filename) { rawContext.run(source, filename); }, runF...
'use strict'; var contextify = require('contextify'); var fs = require('fs'); var Context = function () { var rawContext = contextify(); rawContext.globals = rawContext.getGlobal(); return { run: function (source, filename) { rawContext.run(source, filename); }, runF...
Correct typo of 'injector' method name as 'inject'.
Correct typo of 'injector' method name as 'inject'.
JavaScript
mit
fusikky/node-angularcontext,rit/node-angularcontext,thrashr888/node-angularcontext,apparentlymart/node-angularcontext
d8271950357cda3fd4fdefc79e4c1f95432b8c41
public/js/initialize.js
public/js/initialize.js
$(document).ready(function() { $.ajax({ url: '/questions/index', method: 'GET', dataType: 'json' }).done(function(data){ user_questions = data['questions'] updateQuestions(user_questions); }); $(".button").click(function(e){ e.preventDefault(); $('#question_form').show(); $('....
$(document).ready(function(){ var controller = new Controller(View); });
Edit Initialize JS to Activate Controller/View On Load
Edit Initialize JS to Activate Controller/View On Load
JavaScript
mit
n-zeplo/AskDBC,n-zeplo/AskDBC
bd4355e232324d68689443b524683c803b9991ed
public/js/views/home.js
public/js/views/home.js
(function () { 'use strict'; mare.views.Home = Backbone.View.extend({ el: 'body', initialize: function() { // DOM cache any commonly used elements to improve performance this.$featuredPanelOverlay = $( '.panel-overlay' ); // initialize the owl carousel and make an...
(function () { 'use strict'; mare.views.Home = Backbone.View.extend({ el: 'body', initialize: function() { // DOM cache any commonly used elements to improve performance this.$featuredPanelOverlay = $( '.panel-overlay' ); // initialize the owl carousel and make an...
Increase transition time for slideshow images from 3 seconds to 5 seconds
Increase transition time for slideshow images from 3 seconds to 5 seconds
JavaScript
mit
autoboxer/MARE,autoboxer/MARE
9778f7c92896804bca436120471f7dc9577b39f9
src/modules/entityModels.js
src/modules/entityModels.js
import fetch from 'isomorphic-fetch' export const REQUEST_ENTITY_MODELS = 'REQUEST_ENTITY_MODELS' export const RECEIVE_ENTITY_MODELS = 'RECEIVE_ENTITY_MODELS' function requestEntityModels() { return { type: REQUEST_ENTITY_MODELS } } function receiveEntityModels(json) { return { type: RECEIVE_ENTITY_MOD...
import fetch from 'isomorphic-fetch' export const REQUEST_ENTITY_MODELS = 'REQUEST_ENTITY_MODELS' export const RECEIVE_ENTITY_MODELS = 'RECEIVE_ENTITY_MODELS' function requestEntityModels() { return { type: REQUEST_ENTITY_MODELS } } function receiveEntityModels(json) { return { type: RECEIVE_ENTITY_MOD...
Include credentials when entity models are fetched
Include credentials when entity models are fetched
JavaScript
agpl-3.0
tocco/tocco-client,tocco/tocco-client,tocco/tocco-client
2759872ce05575f6d5bc45a5df9f071d8763c089
src/util/defineClass.js
src/util/defineClass.js
import _ from 'lodash' import postcss from 'postcss' export default function(className, properties) { const decls = _.map(properties, (value, property) => { return postcss.decl({ prop: _.kebabCase(property), value: value, }) }) return postcss.rule({ selector: `.${className}`, }).append...
import _ from 'lodash' import postcss from 'postcss' export default function(className, properties) { const decls = _.map(properties, (value, property) => { return postcss.decl({ prop: _.kebabCase(property), value: `${value}`, }) }) return postcss.rule({ selector: `.${className}`, }).a...
Convert all property values to strings
Convert all property values to strings Allows using unquoted numeric values. Tricky to test because only breaks when trying to run the whole thing through cssnext in the full chain. Will figure it out later :)
JavaScript
mit
tailwindcss/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss
6568e4bacc41eb4666aa37a007a39215432fea37
lib/ascii-art.js
lib/ascii-art.js
'use strict'; var ascii = require('image-to-ascii'); function mock() { return function(url, callback) { callback('[ascii art]'); }; } function prod() { return function(url, callback) { ascii({ colored: false, path: url }, function (err, result) { callback(err ? 'Ascii art error...
'use strict'; var ascii = require('image-to-ascii'); function mock() { return function(url, callback) { callback('[ascii art]'); }; } function prod() { return function(url, callback) { ascii({ colored: false, path: url, size: {height: 30} }, function (err, result) { ca...
Set ascii art max height to 30 lines
Set ascii art max height to 30 lines
JavaScript
mit
earldouglas/sectery
adf821a39271131ef5ba4116b29ec38a6a3b13db
lib/countdown.js
lib/countdown.js
'use strict'; (function() { var root = this; var Countdown = function(duration, onTick, onComplete){ this.secondsLeft = duration; var tick = function() { if (this.secondsLeft > 0) { onTick(this.secondsLeft); this.secondsLeft -= 1; } else { clearInterval(...
'use strict'; (function() { var root = this; var Countdown = function(duration, onTick, onComplete){ this.secondsLeft = duration; var tick = function() { if (this.secondsLeft > 0) { onTick(this.secondsLeft); this.secondsLeft -= 1; } else { clearInterval(...
Fix a bug related to the first tick not being called
Fix a bug related to the first tick not being called
JavaScript
mit
gumroad/countdown.js
3857c7cce4967365d560dc8ed4c9436cac6409e9
lib/info-view.js
lib/info-view.js
'use babel' export default class InfoView { constructor(serializedState) { // Create root element this.rootElement = document.createElement('div') this.rootElement.classList.add('root-info') // Create message element const message = document.createElement('div') message.textContent = 'The M...
'use babel' jQuery = require('jquery') export default class InfoView { constructor(serializedState) { // Create root element this.rootElement = document.createElement('div') this.rootElement.classList.add('root-info') // Create message element this.message = document.createElement('div') t...
Add addLines for updating messages
Add addLines for updating messages
JavaScript
mit
THM-MoTE/mope-atom-plugin
02cb89e6786714e27778478c18f9df6b501009c8
lib/selectors.js
lib/selectors.js
'use strict'; const MATHOID_IMG_CLASS = 'mwe-math-fallback-image-inline'; const MediaSelectors = [ '*[typeof^=mw:Image]', '*[typeof^=mw:Video]', '*[typeof^=mw:Audio]', `img.${MATHOID_IMG_CLASS}` ]; const VideoSelectors = MediaSelectors.filter(selector => selector.includes('Video')); const Pronunciat...
'use strict'; const MATHOID_IMG_CLASS = 'mwe-math-fallback-image-inline'; const MediaSelectors = [ '*[typeof^="mw:Image"]', '*[typeof^="mw:Video"]', '*[typeof^="mw:Audio"]', `img.${MATHOID_IMG_CLASS}` ]; const VideoSelectors = MediaSelectors.filter(selector => selector.includes('Video')); const Pron...
Fix 'parsePronunciation' bug causing js string error w/ some articles.
Fix 'parsePronunciation' bug causing js string error w/ some articles. Unsure why this is only happening with some articles. Noticed when using this converter on `enwiki > Elon_Musk`: https://github.com/wikimedia/pcs-html-converter T242479 Change-Id: Id95a75caf2ae708b2b1559dbc475a9bd3bc29fb0
JavaScript
apache-2.0
wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps
a4703dc67d0857d52911c68ce4dc42f20629dc79
step-01/js/main.js
step-01/js/main.js
'use strict'; // On this codelab, you will be streaming only video (video: true). const mediaStreamConstraints = { video: true, }; // Video element where stream will be placed. const localVideo = document.querySelector('video'); // Handles success by adding the MediaStream to the video element. function gotLocalMe...
'use strict'; // On this codelab, you will be streaming only video (video: true). const mediaStreamConstraints = { video: true, }; // Video element where stream will be placed. const localVideo = document.querySelector('video'); // Handles success by adding the MediaStream to the video element. function gotLocalMe...
Remove ; after function definitions
Remove ; after function definitions
JavaScript
apache-2.0
googlecodelabs/webrtc-web,googlecodelabs/webrtc-web
9bbb27f85c6c8b59d19d620803cb75eb24fa74ed
app/reducers.js
app/reducers.js
import { combineReducers } from 'redux' import { reducer as form } from 'redux-form' import filter from './components/filter/filter.reducer' import routes from './components/routes/routes.reducer' import sort from './components/sort/sort.reducer' const rootReducer = combineReducers({ filter, routes, sort, toke...
import { combineReducers } from 'redux' import { reducer as form } from 'redux-form' import filter from './components/filter/filter.reducer' import routes from './components/routes/routes.reducer' import sort from './components/sort/sort.reducer' const rootReducer = combineReducers({ filter, routes, sort, form...
Remove usage of bad import
Remove usage of bad import
JavaScript
mit
chrisronline/route-finder,chrisronline/route-finder
749a1d238ac408827671189820a31d77951f6a07
lib/util.js
lib/util.js
var humps = require('humps'); var STATUS_CONNECTING = 'connecting', STATUS_CONNECTED = 'connected', STATUS_DISCONNECTED = 'disconnected', STATUS_ERROR = 'error', STATUS_CLOSED = 'closed', STATUS_UNKNOWN = 'unknown'; var statusMappings = { 'new': STATUS_CONNECTING, 'checking': STATUS_CONNECTING, 'connected'...
var humps = require('humps'); var STATUS_CONNECTING = 'connecting', STATUS_CONNECTED = 'connected', STATUS_DISCONNECTED = 'disconnected', STATUS_ERROR = 'error', STATUS_CLOSED = 'closed', STATUS_UNKNOWN = 'unknown'; var statusMappings = { 'new': STATUS_CONNECTING, 'checking': STATUS_CONNECTING, 'connected'...
Update iceConnectionState.connected to trigger the connected state, instead of connecting
Update iceConnectionState.connected to trigger the connected state, instead of connecting
JavaScript
apache-2.0
rtc-io/rtc-health,eightyeight/rtc-health
d726aacd848520d79223f6b128cf2768c32b5812
test/ui-testing/stub.js
test/ui-testing/stub.js
module.exports.test = function(uiTestCtx) { describe('Module test: checkout:stub', function() { const { config, helpers: { login, openApp, logout }, meta: { testVersion } } = uiTestCtx; const nightmare = new Nightmare(config.nightmare); this.timeout(Number(config.test_timeout)); describe('Login > O...
module.exports.test = function(uiTestCtx) { describe('Module test: instances:stub', function() { const { config, helpers: { login, openApp, logout }, meta: { testVersion } } = uiTestCtx; const nightmare = new Nightmare(config.nightmare); this.timeout(Number(config.test_timeout)); describe('Login > ...
Fix typo in test log.
Tests: Fix typo in test log.
JavaScript
apache-2.0
cledvina/ui-instances
44811f0ca64f2ebd7aea57ab9398cf80d0371588
src/utils/utils.spec.js
src/utils/utils.spec.js
import { getUrlFromCriterias, storeToArray } from './utils'; describe('Utils', () => { test('getUrlFromCriterias', () => { expect(getUrlFromCriterias()).toBe(''); expect(getUrlFromCriterias({})).toBe(''); expect(getUrlFromCriterias({ key1: 'value-key1' })).toBe( '?key1=value-key1', ); expec...
import { getUrlFromCriterias, storeToArray, verifyVariable } from './utils'; describe('Utils', () => { test('getUrlFromCriterias', () => { expect(getUrlFromCriterias()).toBe(''); expect(getUrlFromCriterias({})).toBe(''); expect(getUrlFromCriterias({ key1: 'value-key1' })).toBe( '?key1=value-key1', ...
Add test for function verifyVariable
Add test for function verifyVariable
JavaScript
mit
InseeFr/Pogues,InseeFr/Pogues,InseeFr/Pogues
05b7b2045613cb6c7cc6507a0ade7028016c9df9
tests/unit/components/email-input-test.js
tests/unit/components/email-input-test.js
import Ember from 'ember'; import { moduleForComponent, test } from 'ember-qunit'; import startApp from '../../helpers/start-app'; var App; moduleForComponent('email-input', 'email-input component', { setup: function() { App = startApp(); }, teardown: function() { Ember.run(App, 'destroy'); }, unit: ...
import Ember from 'ember'; import { moduleForComponent, test } from 'ember-qunit'; import startApp from '../../helpers/start-app'; var App; moduleForComponent('email-input', 'email-input component', { setup: function() { App = startApp(); }, teardown: function() { Ember.run(App, 'destroy'); }, unit: ...
Comment out faulty email-input assertion test
Comment out faulty email-input assertion test
JavaScript
mit
pzuraq/ember-inputmask,blimmer/ember-inputmask,blimmer/ember-inputmask,pzuraq/ember-inputmask
28a144d15ebab7c5eaae35fc8fd432962da25046
migrate/index.js
migrate/index.js
const mongoModel = require('./mongo-model'); const sqlModel = require('./sql-model'); function main() { sqlModel.sequelize.sync() .then(() => mongoModel.find({})) .then(users => { console.log('MongoDB query done. Length: ', users.length); let promises = []; for (let user of users) { ...
const mongoModel = require('./mongo-model'); const sqlModel = require('./sql-model'); function main() { sqlModel.sequelize.sync() .then(() => mongoModel.find({})) .then(users => { console.log('MongoDB query done. Length: ', users.length); let promises = []; for (let user of users) { ...
Use bulk operation in migration script for performance
FEAT: Use bulk operation in migration script for performance
JavaScript
mit
Holi0317/sms-library-helper,Holi0317/sms-library-helper,Holi0317/sms-library-helper,Holi0317/sms-library-helper
386c6336dd96ca76768ff0245eef00bfbd0b167c
newrelic.js
newrelic.js
'use strict' /** * New Relic agent configuration. * * See lib/config.defaults.js in the agent distribution for a more complete * description of configuration variables and their potential values. */ exports.config = { /** * Array of application names. */ app_name: ['My Application'], /** * Your New...
'use strict' /** * New Relic agent configuration. * * See lib/config.defaults.js in the agent distribution for a more complete * description of configuration variables and their potential values. */ exports.config = { /** * Array of application names. */ app_name: [process.env.BLINK_NEW_RELIC_APP_NAME],...
Configure New Relic from env vars
Configure New Relic from env vars
JavaScript
mit
DoSomething/blink,DoSomething/blink
6498f1040644407b5b28d52c54e959d94fa40865
brunch-config.js
brunch-config.js
module.exports.config = { files: { javascripts: { joinTo: { "js/app.js": /^app/, "js/vendor.js": /^(?!app)/ }, order: { before: [ "bower_components/jquery/dist/jquery.js", "bower_components/underscore/underscore.js", "bower_components/react/r...
module.exports.config = { files: { javascripts: { joinTo: { "js/app.js": /^app/, "js/vendor.js": /^(?!app)/ }, order: { before: [ "bower_components/jquery/dist/jquery.js", "bower_components/underscore/underscore.js", "bower_components/bluebir...
Use express server instead of brunch default
Use express server instead of brunch default
JavaScript
mit
chubas/instaband,gdljs/instaband,gdljs/instaband,chubas/instaband
eca9c24ce69b92dfb9d97424c8dd67518dcf3489
tutorials/barChart/barChart.js
tutorials/barChart/barChart.js
function makeBarChart() { var xScale = new Plottable.OrdinalScale().rangeType("bands"); var yScale = new Plottable.LinearScale(); var xAxis = new Plottable.XAxis(xScale, "bottom", function(d) { return d; }); var yAxis = new Plottable.YAxis(yScale, "left"); var renderer = new Plottable.BarRenderer(barData, xS...
function makeBarChart() { var xScale = new Plottable.OrdinalScale().rangeType("bands"); var yScale = new Plottable.LinearScale(); var xAxis = new Plottable.XAxis(xScale, "bottom", function(d) { return d; }); var yAxis = new Plottable.YAxis(yScale, "left"); var renderer = new Plottable.BarRenderer(barData, xS...
Remove padding call from tutorial.
Remove padding call from tutorial.
JavaScript
mit
iobeam/plottable,RobertoMalatesta/plottable,softwords/plottable,iobeam/plottable,jacqt/plottable,danmane/plottable,RobertoMalatesta/plottable,onaio/plottable,NextTuesday/plottable,onaio/plottable,alyssaq/plottable,gdseller/plottable,iobeam/plottable,gdseller/plottable,palantir/plottable,gdseller/plottable,NextTuesday/p...
4b6e340e7683e57a5747d4b3b57e419d4f1545fa
bootstrap.js
bootstrap.js
var slice = [].slice var util = require('util') exports.createInterrupterCreator = function (_Error) { return function (path) { var ejector = function (name, depth, context, properties) { var vargs = slice.call(arguments) name = vargs.shift() typeof vargs[0] == 'number' ...
var slice = [].slice var util = require('util') exports.createInterrupterCreator = function (_Error) { return function (path) { var ejector = function (name, depth, context, properties) { var vargs = slice.call(arguments) name = vargs.shift() typeof vargs[0] == 'number' ...
Fix variable leak to global namespace.
Fix variable leak to global namespace.
JavaScript
mit
bigeasy/interrupt
0897f65359bb90e777866f9af6be8601ed5062c4
src/js/UserAPI.js
src/js/UserAPI.js
/* global console, MashupPlatform */ var UserAPI = (function () { "use strict"; var url = "https://account.lab.fiware.org/user"; /***************************************************************** * C O N S T R U C T O R * *********************************...
/* global console, MashupPlatform */ var UserAPI = (function () { "use strict"; var url = "https://account.lab.fiware.org/user"; /***************************************************************** * C O N S T R U C T O R * **********************************...
Update user api to real functionaliy
Update user api to real functionaliy
JavaScript
apache-2.0
fidash/widget-calendar,fidash/widget-calendar
9d311a37f5381ed26a7e212966f30d5a14bc60ca
src/lib/common.js
src/lib/common.js
/* * Copyright (c) 2013 Csernik Flaviu Andrei * * See the file LICENSE.txt for copying permission. * */ "use strict"; function PropertyNotInitialized(obj, propName) { this.property = propName; this.obj = obj; } PropertyNotInitialized.prototype.toString = function () { return this.obj + " : " + this....
/* * Copyright (c) 2013 Csernik Flaviu Andrei * * See the file LICENSE.txt for copying permission. * */ "use strict"; window.AudioContext = window.AudioContext || window.webkitAudioContext; function PropertyNotInitialized(obj, propName) { this.property = propName; this.obj = obj; } PropertyNotInitial...
Fix AudioContext not define reference error.
Fix AudioContext not define reference error.
JavaScript
mit
archblob/amit
45ec083349602a01eacfaf7416e48c9fb2cd5ca7
test/host/rhino.js
test/host/rhino.js
/*jshint rhino:true*/ print("Rhino showcase"); load("src/boot.js"); java.lang.System.exit(0);
/*jshint rhino:true*/ print("Rhino showcase"); /*exported gpfSourcesPath*/ var gpfSourcesPath = "src/"; load("src/boot.js"); java.lang.System.exit(0);
Allow boot by specifying the source path
Allow boot by specifying the source path
JavaScript
mit
ArnaudBuchholz/gpf-js,ArnaudBuchholz/gpf-js
d2a4451e43db96c425f5546ed5b9fe08bb1588df
website/static/js/clipboard.js
website/static/js/clipboard.js
'use strict'; var $ = require('jquery'); var Clipboard = require('clipboard'); var setTooltip = function (elm, message) { $(elm).tooltip('hide') .attr('title', message) .tooltip('show'); } var hideTooltip = function (elm) { setTimeout(function() { $(elm).tooltip('hide'); }, 2000); } var ...
'use strict'; var $ = require('jquery'); var Clipboard = require('clipboard'); var setTooltip = function (elm, message) { $(elm).tooltip('hide') .attr('title', message) .tooltip('show'); }; var hideTooltip = function (elm) { setTimeout(function() { $(elm).tooltip('hide'); }, 2000); }; va...
Fix styling issues for travis tests
Fix styling issues for travis tests
JavaScript
apache-2.0
Johnetordoff/osf.io,sloria/osf.io,icereval/osf.io,felliott/osf.io,baylee-d/osf.io,felliott/osf.io,cslzchen/osf.io,brianjgeiger/osf.io,chennan47/osf.io,mfraezz/osf.io,TomBaxter/osf.io,crcresearch/osf.io,mattclark/osf.io,adlius/osf.io,caneruguz/osf.io,TomBaxter/osf.io,saradbowman/osf.io,HalcyonChimera/osf.io,icereval/osf...
593695be54f4e68a613cdb1b514ae90d1a3cb362
client/scripts/app.js
client/scripts/app.js
'use strict'; (function() { angular.module('bifrost',[ 'lumx', 'ui.router', 'lbServices', 'leaflet-directive', 'ngMaterial', 'angularFileUpload' ]) .config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('main', { url: '/', templateUrl: 'view...
'use strict'; (function() { angular.module('bifrost',[ 'lumx', 'ui.router', 'lbServices', 'leaflet-directive', 'ngMaterial', 'angularFileUpload' ]) .config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('main', { url: '/', templateUrl: 'view...
Return to login page if didn't login
Return to login page if didn't login
JavaScript
mit
bifrostio/bifrost,bifrostio/bifrost
b25451ded86bab0ed28424131e1a826b4479c69f
rules/core/constants.js
rules/core/constants.js
'use strict'; const COMPOSITION_METHODS = ['compose', 'flow', 'flowRight', 'pipe']; const FOREACH_METHODS = ['forEach', 'forEachRight', 'each', 'eachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight']; const SIDE_EFFECT_METHODS = FOREACH_METHODS.concat(['bindAll']); module.exports = { COMPOSITION_METHODS, FOR...
'use strict'; const COMPOSITION_METHODS = ['compose', 'flow', 'flowRight', 'pipe']; const FOREACH_METHODS = ['forEach', 'forEachRight', 'each', 'eachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight']; const SIDE_EFFECT_METHODS = FOREACH_METHODS.concat(['bindAll', 'defer', 'delay']); module.exports = { COMPOSIT...
Add defer and delay as side-effect methods
Add defer and delay as side-effect methods
JavaScript
mit
jfmengels/eslint-plugin-lodash-fp
c5fdf4c1da80aea1d05a1ba84a03252af371f819
server/config/config.js
server/config/config.js
var path = require('path'); var rootPath = path.normalize(__dirname + '/../../'); module.exports = { local: { baseUrl: 'http://localhost:3051', db: 'mongodb://localhost/rp_local', rootPath: rootPath, port: process.env.PORT || 3051 }, staging : { baseUrl: 'http://...
var path = require('path'); var rootPath = path.normalize(__dirname + '/../../'); module.exports = { local: { baseUrl: 'http://localhost:3030', db: 'mongodb://localhost/rp_local', rootPath: rootPath, port: process.env.PORT || 3016 }, staging : { baseUrl: 'http://...
Add to download links ng-csv
Add to download links ng-csv
JavaScript
mit
NRGI/rp-org-frontend,NRGI/rp-org-frontend
66b3fb8e7f084eda5d25c6d17af213d1596649a7
tests/.eslintrc.js
tests/.eslintrc.js
module.exports = { 'extends': '../.eslintrc.js', 'env': { 'mocha': true }, 'rules': { 'func-names': 0, 'no-unused-expressions': 0, 'no-console': 0, // These are said to be deprecated, but we use them in tests. 'react/no-find-dom-node': 0, 'react/no-render-return-value': 0, }, ...
module.exports = { 'extends': '../.eslintrc.js', 'env': { 'mocha': true }, 'rules': { 'func-names': 0, 'no-unused-expressions': 0, 'no-console': 0 }, 'globals': { 'expect': false } };
Enable back the findDOMNode and render lint rules
Enable back the findDOMNode and render lint rules
JavaScript
mit
NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet
7c402a2c17fb491c5ea2ac212d4a89c15b093c5d
closure/goog/test_module.js
closure/goog/test_module.js
// Copyright 2014 The Closure Library Authors. All Rights Reserved. // // 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 requ...
// Copyright 2014 The Closure Library Authors. All Rights Reserved. // // 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 requ...
Move goog.module.declareLegacyNamespace() calls to be next to goog.module
Move goog.module.declareLegacyNamespace() calls to be next to goog.module ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=271418472
JavaScript
apache-2.0
google/closure-library,lucidsoftware/closure-library,lucidsoftware/closure-library,lucidsoftware/closure-library,google/closure-library,lucidsoftware/closure-library,google/closure-library,google/closure-library,google/closure-library
117ce3f5b86de2ec4d773537bd88c9f2e9d38391
split-file-cli.js
split-file-cli.js
#!/usr/bin/env node var split = require('./split-file.js'); if (require.main === module) { cli(); } function cli() { var option = process.argv[2]; switch (option) { case '-m': cliMerge(); break; case '-s': cliSplit(); break; default: console.log("Choose a option -s for...
#!/usr/bin/env node var split = require('./split-file.js'); if (require.main === module) { cli(); } function cli() { var option = process.argv[2]; switch (option) { case '-m': cliMerge(); break; case '-s': cliSplit(); break; default: printLegend(); } } function cliS...
Add legend for the CLI tool helping new users to understand the CLI commands.
[FEATURE] Add legend for the CLI tool helping new users to understand the CLI commands.
JavaScript
mit
tomvlk/node-split-file
cc2dc0d455685b8294dc9b23bdad33f715afafd6
src/background.js
src/background.js
'use strict'; chrome.app.runtime.onLaunched.addListener(function() { chrome.app.window.create('chrome.html', { 'bounds': { 'width': 1024, 'height': 768 } }); });
'use strict'; // check for update and restart app automatically chrome.runtime.onUpdateAvailable.addListener(function(details) { console.log("Updating to version " + details.version); chrome.runtime.reload(); }); chrome.runtime.requestUpdateCheck(function(status) { if (status === "update_found") { ...
Check for updates on every start of teh chrome app and restart automatically.
Check for updates on every start of teh chrome app and restart automatically.
JavaScript
mit
sheafferusa/mail-html5,clochix/mail-html5,halitalf/mail-html5,kalatestimine/mail-html5,dopry/mail-html5,kalatestimine/mail-html5,whiteout-io/mail,whiteout-io/mail,tanx/hoodiecrow,halitalf/mail-html5,b-deng/mail-html5,dopry/mail-html5,whiteout-io/mail-html5,sheafferusa/mail-html5,whiteout-io/mail-html5,halitalf/mail-htm...
35bb630e30e6ec721a1b2dbfceccc8bdc6fef425
config/environment.js
config/environment.js
/* jshint node: true */ module.exports = function(environment) { var ENV = { environment: environment, baseURL: '/', locationType: 'hash', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true } },...
/* jshint node: true */ module.exports = function(environment) { var ENV = { environment: environment, baseURL: '/', locationType: 'hash', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true } },...
Handle exec-sync failure on Windows.
Handle exec-sync failure on Windows.
JavaScript
apache-2.0
fhchina/Klondike,Stift/Klondike,Stift/Klondike,fhchina/Klondike,fhchina/Klondike,Stift/Klondike,themotleyfool/Klondike,themotleyfool/Klondike,davidvmckay/Klondike,jochenvangasse/Klondike,themotleyfool/Klondike,jochenvangasse/Klondike,davidvmckay/Klondike,jochenvangasse/Klondike,davidvmckay/Klondike
22b4fdbbef2d1fcff51334fa1ae5492345ec6576
packages/antwar/src/config/dev.js
packages/antwar/src/config/dev.js
import * as path from "path"; import merge from "webpack-merge"; import HtmlWebpackPlugin from "html-webpack-plugin"; import webpack from "webpack"; import getCommon from "./common"; module.exports = config => getCommon(config).then(function(commonConfig) { const devConfig = { cache: true, node: { ...
import * as path from "path"; import merge from "webpack-merge"; import HtmlWebpackPlugin from "html-webpack-plugin"; import webpack from "webpack"; import getCommon from "./common"; module.exports = config => getCommon(config).then(function(commonConfig) { const template = config.antwar.template || {}; cons...
Allow initial context to be passed from antwar configuration
fix: Allow initial context to be passed from antwar configuration
JavaScript
mit
antwarjs/antwar
e2d99cbda42e1993f667cbf09e9c20b6f325cdfe
src/reducers/Items.js
src/reducers/Items.js
import types from '../types' import createReducer from '../shared/create-reducer'; const initialState = [] function itemsRequest( state ){ return state } function itemsError( state ){ return state } function itemsSucess(state, action) { return { ...state, data: action.result } } function changeItemState(state, a...
import types from '../types' import createReducer from '../shared/create-reducer'; import Immutable from 'immutable' function itemsRequest( state ){ return state } function itemsError( state ){ return state } function itemsSucess(state, action) { return Immutable.List(action.result); } function changeItemState(st...
Create an inmutable list with server received data; refactor changeItemState
Create an inmutable list with server received data; refactor changeItemState
JavaScript
mit
atSistemas/react-base
c2aa71310c99a5dd6d6c827afa9ee3f3ca2338c7
config/environment.js
config/environment.js
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'letnar-frontend', environment: environment, baseURL: '/', locationType: 'auto', adapterNamespace: 'api', contentSecurityPolicy: { 'connect-src': "*", 'script-src': "'unsafe-eval' *", },...
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'letnar-frontend', environment: environment, baseURL: '/', locationType: 'auto', adapterNamespace: 'api', contentSecurityPolicy: { 'connect-src': "*", 'script-src': "'unsafe-eval' *", },...
Use hash location type for Github pages.
Use hash location type for Github pages.
JavaScript
mit
simi/ember-map-demo,simi/ember-map-demo
14c1746ece7314d8c906aeb4272bb288a15947c3
website/addons/s3/static/s3-rubeus-cfg.js
website/addons/s3/static/s3-rubeus-cfg.js
(function(Rubeus) { Rubeus.cfg.s3 = { uploadMethod: 'PUT', uploadUrl: null, uploadAdded: function(file, item) { var self = this; var parent = self.getByID(item.parentID); var name = file.name; // Make it possible to upload into subfolders ...
(function(Rubeus) { Rubeus.cfg.s3 = { uploadMethod: 'PUT', uploadUrl: null, uploadAdded: function(file, item) { var self = this; var parent = self.getByID(item.parentID); var name = file.name; // Make it possible to upload into subfolders ...
Update file after being uploaded.
Update file after being uploaded.
JavaScript
apache-2.0
Ghalko/osf.io,sloria/osf.io,bdyetton/prettychart,GageGaskins/osf.io,abought/osf.io,petermalcolm/osf.io,erinspace/osf.io,zachjanicki/osf.io,mluo613/osf.io,doublebits/osf.io,CenterForOpenScience/osf.io,jolene-esposito/osf.io,himanshuo/osf.io,lyndsysimon/osf.io,mluke93/osf.io,Johnetordoff/osf.io,danielneis/osf.io,canerugu...
dc5e223410001b9f2099041931d4b4553f769295
server/config/config.js
server/config/config.js
const dotenv = require('dotenv'); dotenv.config(); module.exports = { development: { username: 'Newman', password: 'andela2017', database: 'postit-db-dev', host: '127.0.0.1', port: 5432, secret_key: process.env.SECRET_KEY, dialect: 'postgres' }, test: { username: 'Newman', pa...
const dotenv = require('dotenv'); dotenv.config(); module.exports = { development: { username: 'Newman', password: 'andela2017', database: 'postit-db-dev', host: '127.0.0.1', port: 5432, secret_key: process.env.SECRET_KEY, dialect: 'postgres' }, test: { // username: 'Newman', ...
Troubleshoot failing tests on Travis
Troubleshoot failing tests on Travis
JavaScript
mit
Philipeano/post-it,Philipeano/post-it
9a7d13540e5a731ec868d8051600c17d93683337
src/test/test-main.js
src/test/test-main.js
// Fetch all the files to be loaded by Karma; parse the actual tests // based on '.spec.js' filter var tests = []; for (var file in window.__karma__.files) { if (window.__karma__.files.hasOwnProperty(file)) { if (/\.spec\.js$/.test(file)) { tests.push(file); } } } // Fetch the base (main) config, override by ...
// Fetch all the files to be loaded by Karma; parse the actual tests // based on '.spec.js' filter var tests = []; for (var file in window.__karma__.files) { if (window.__karma__.files.hasOwnProperty(file)) { /* Add all the files within app/test path with .spec.js suffix */ if (/test\/app.+\.spec\.js$/.test(file))...
Make stricter filter for matching the .spec files, so that we don't get 3rd party spec files into the test
Make stricter filter for matching the .spec files, so that we don't get 3rd party spec files into the test
JavaScript
mit
SC5/grunt-boreless-boilerplate,SC5/grunt-boreless-boilerplate
db1dcca22cfc9f5e4adf4c8e90d6e792ce9ee5ca
src/ts-sockets.js
src/ts-sockets.js
// activity item template var itemtemplate = ['<div class="activity-item">', '<a href="{{modifier_url}}">', '<img src="{{modifier_siteicon}}" />', '</a>', '<div>', '<p>', '<a href="{{modifier_url}}">{{modifier}}</a> is {{action}} ', '<a class="tiddler-title" href="{{tiddler_url}}">{{tiddler_title}}</a>', ...
// activity item template var itemtemplate = ['<li class="activity-item">', '<a href="{{modifier_url}}">', '<img src="{{modifier_siteicon}}" />', '</a>', '<div>', '<p>', '<a href="{{modifier_url}}">{{modifier}}</a> is {{action}} ', '<a class="tiddler-title" href="{{tiddler_url}}">{{tiddler_title}}</a>', ...
Improve html markup of added item
Improve html markup of added item
JavaScript
bsd-3-clause
TiddlySpace/tiddlyspacesockets,TiddlySpace/tiddlyspacesockets
3d22c4f290734201fd8466a18c529c82c33a0660
static/js/main.js
static/js/main.js
function AppCtrl($scope, $http) { $scope.search = function() { $scope.loading = true; $scope.movie = null; $http.get('/search/' + $scope.imdbId).then(function(response) { $scope.loading = false; $scope.movie = response.data; }); }; }
function AppCtrl($scope, $http) { $scope.search = function() { $scope.loading = true; $scope.movie = null; $http.get('/search/' + $scope.imdbId.match(/tt[\d]{7}/)[0]).then(function(response) { $scope.loading = false; $scope.movie = response.data; }); }; }
Support full IMDB URLs in the search field.
Support full IMDB URLs in the search field.
JavaScript
mit
renstrom/imdb-api,renstrom/imdb-api
99c430f70769028a876db54df19e359cca03b128
static/js/src/main.js
static/js/src/main.js
// commonjs code goes here (function () { var i18n = window.i18n = require('i18next'); var XHR = require('i18next-xhr-backend'); var lngDetector = require('i18next-browser-languagedetector'); var Cache = require('i18next-localstorage-cache'); var backendOptions = { loadPath: '/static/local...
// commonjs code goes here (function () { var i18n = window.i18n = require('i18next'); var XHR = require('i18next-xhr-backend'); var lngDetector = require('i18next-browser-languagedetector'); var Cache = require('i18next-localstorage-cache'); var backendOptions = { loadPath: '/static/local...
Make English the fallback language in i18next.
Make English the fallback language in i18next. Fixes: #1580
JavaScript
apache-2.0
punchagan/zulip,showell/zulip,andersk/zulip,paxapy/zulip,susansls/zulip,dattatreya303/zulip,timabbott/zulip,verma-varsha/zulip,eeshangarg/zulip,jrowan/zulip,blaze225/zulip,sharmaeklavya2/zulip,jainayush975/zulip,souravbadami/zulip,eeshangarg/zulip,synicalsyntax/zulip,peguin40/zulip,j831/zulip,sup95/zulip,dawran6/zulip,...
1548ab81fd04e92a7a32ddfaeb072cd72493877d
grunt/contrib-connect.js
grunt/contrib-connect.js
// Local web server running on port 9001 with livereload functionality module.exports = function(grunt) { grunt.config('connect', { livereload: { options: { port: 9001, middleware: function(connect, options) { return[ r...
// Local web server running on port 9001 with livereload functionality module.exports = function(grunt) { grunt.config('connect', { livereload: { options: { port: 9001, middleware: function(connect, options) { return[ re...
Fix annoying bug in connect middleware
Fix annoying bug in connect middleware
JavaScript
mit
yellowled/yl-bp,yellowled/yl-bp
f93e4206fd2caf2c25b85940fd377547133cb545
static/userdetails.js
static/userdetails.js
(function() { var user_id = localStorage.getItem('user_id'); var session_id = localStorage.getItem('session_id'); if (user_id == null || session_id == null) { alert('Not signed in.'); } else { alert(user_id + ' ' + session_id); } })();
(function() { var user_id = $.cookie('user_id'); var session_id = $.cookie('session_id'); if (user_id == null || session_id == null) { alert('Not signed in.'); } else { alert(user_id + ' ' + session_id); } })();
Use cookie instead of local storage.
Use cookie instead of local storage.
JavaScript
agpl-3.0
ushahidi/riverid-python,ushahidi/riverid-python,ushahidi/riverid-python
d6cb1d94c0a0397615ba5f4f90ac281b644ab3d9
image_occlusion_enhanced/svg-edit/svg-edit-2.6/extensions/ext-panning.js
image_occlusion_enhanced/svg-edit/svg-edit-2.6/extensions/ext-panning.js
/*globals svgEditor, svgCanvas*/ /*jslint eqeq: true*/ /* * ext-panning.js * * Licensed under the MIT License * * Copyright(c) 2013 Luis Aguirre * */ /* This is a very basic SVG-Edit extension to let tablet/mobile devices panning without problem */ svgEditor.addExtension('ext-panning', function() {'use stri...
/*globals svgEditor, svgCanvas*/ /*jslint eqeq: true*/ /* * ext-panning.js * * Licensed under the MIT License * * Copyright(c) 2013 Luis Aguirre * */ /* This is a very basic SVG-Edit extension to let tablet/mobile devices panning without problem */ svgEditor.addExtension('ext-panning', function() {'use stri...
Switch to appropriate cursor style when panning active
Switch to appropriate cursor style when panning active
JavaScript
bsd-2-clause
Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-enhanced,Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-enhanced
1cebf1bf3cd75e2ba67062078dd178594f41d7e1
js/library.js
js/library.js
/* * Developed by Radu Puspana * Date August 2017 * Version 1.0 */ // Round the n-th decimal of a float number // number Number the floating point number to be rounded // decimalIndex Number the decimal position to be rounded // E.g decimalIndex = 1, the first digit shuld be rounded // E.g decimal...
/* * Developed by Radu Puspana * Date August 2017 * Version 1.0 */ // Round the n-th decimal of a float number // number Number the floating point number to be rounded // decimalIndex Number the decimal position to be rounded // E.g decimalIndex = 1, the first decimal will be rounded // E.g decima...
Edit the roundDecimal() comment correcting mistakes
Edit the roundDecimal() comment correcting mistakes
JavaScript
mit
rpuspana/myExpenses,rpuspana/myExpenses
09b7512cd8196f643440448d9f885e3996670f56
app/assets/javascripts/admin/spree_paypal_express.js
app/assets/javascripts/admin/spree_paypal_express.js
//= require admin/spree_backend SpreePaypalExpress = { hideSettings: function(paymentMethod) { if (SpreePaypalExpress.paymentMethodID && paymentMethod.val() == SpreePaypalExpress.paymentMethodID) { $('.payment-method-settings').children().hide(); $('#payment_amount').prop('disabled', 'disabled'); ...
//= require admin/spree_backend SpreePaypalExpress = { hideSettings: function(paymentMethod) { if (SpreePaypalExpress.paymentMethodID && paymentMethod.val() == SpreePaypalExpress.paymentMethodID) { $('.payment-method-settings').children().hide(); $('#payment_amount').prop('disabled', 'disabled'); ...
Remove dead code around unused payment_method_field data-hook
Remove dead code around unused payment_method_field data-hook
JavaScript
agpl-3.0
mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodn...
480fa7537fda14c7f25d986b2276565271a96323
karma.conf.js
karma.conf.js
'use strict' module.exports = function(config) { config.set({ basePath: '', frameworks: ['jasmine-jquery', 'jasmine'], files: [ 'src/audiochart.js', 'spec/*.html', 'spec/*.js' ], reporters: ['progress'], colors: true, logLevel: config.LOG_INFO, autoWatch: true, // browsers: ['Chrome', 'Firef...
'use strict' module.exports = function(config) { config.set({ basePath: '', frameworks: ['jasmine-jquery', 'jasmine'], files: [ 'src/audiochart.js', 'spec/*.html', 'spec/*.js' ], reporters: ['progress'], colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome', 'Firefox'...
Enable Chrome and Firefox for tests
Enable Chrome and Firefox for tests Safari is not reliable ATM due to https://github.com/karma-runner/karma-safari-launcher/issues/24
JavaScript
mit
matatk/audiochart,matatk/audiochart
59292cc35cbfdebbedd4a58f7527a715d4dc5f55
karma.conf.js
karma.conf.js
const path = require("path"); const parts = require("./webpack.parts"); module.exports = config => { const tests = "tests/*.test.js"; config.set({ frameworks: ["mocha"], files: [ { pattern: tests, }, ], preprocessors: { [tests]: ["webpack"], }, webpack: parts.l...
const path = require("path"); const parts = require("./webpack.parts"); module.exports = config => { const tests = "tests/*.test.js"; process.env.BABEL_ENV = "karma"; config.set({ frameworks: ["mocha"], files: [ { pattern: tests, }, ], preprocessors: { [tests]: ["web...
Set babel env while running Karma
chore: Set babel env while running Karma This is needed for the coverage setup to work.
JavaScript
mit
survivejs-demos/webpack-demo
a92338bff1d78a07bd7598867b9a08e071317394
client/src/initialize.js
client/src/initialize.js
import boot from './boot'; import logger from 'debug'; import React from 'react/addons'; const debug = logger('app:init'); // Executed when the browser has loaded everything. window.onload = () => { debug('`onload` event fired.'); debug('Initialize and start application.'); // TODO: pass global functions...
import boot from './boot'; import logger from 'debug'; import React from 'react/addons'; const debug = logger('app:init'); // Executed when the browser has loaded everything. window.onload = () => { debug('`onload` event fired.'); debug('Initialize and start application.'); // TODO: pass global functions...
Add helper function to help users enable logging
Add helper function to help users enable logging
JavaScript
mit
jsilvestre/tasky,jsilvestre/tasky,jsilvestre/tasky
144d98ff633d3d00868e1aa716d85ea5f9ced5a6
lib/install/void-step.js
lib/install/void-step.js
'use strict'; const BaseStep = require('./base-step'); module.exports = class VoidStep extends BaseStep { start() { return new Promise(() => {}); } };
'use strict'; const BaseStep = require('./base-step'); module.exports = class VoidStep extends BaseStep { constructor(options, action) { super(options); this.action = action; } start() { this.action && this.action(); return new Promise(() => {}); } };
Add an action function to void steps so as to execute code on start
Add an action function to void steps so as to execute code on start It does not alter the step behaviour, it's just a way to trigger additional actions when needed
JavaScript
bsd-3-clause
kiteco/kite-installer
1cee6a5ef930508959fdde398285ea181655fbca
Scripts/Default.js
Scripts/Default.js
// This function is run when the app is ready to start interacting with the host application. // It ensures the DOM is ready before updating the span elements with values from the current message. Office.initialize = function () { $(document).ready(function () { $(window).resize(onResize); initView...
// This function is run when the app is ready to start interacting with the host application. // It ensures the DOM is ready before updating the span elements with values from the current message. Office.initialize = function () { $(document).ready(function () { $(window).resize(onResize); initView...
Set diagnostics into old UI
Set diagnostics into old UI
JavaScript
mit
stephenegriffin/MHA,stephenegriffin/MHA,stephenegriffin/MHA
c1eb5999f16ebb5bae06babafc91e64f34db0c2b
app/components/common/form-inputs/index.js
app/components/common/form-inputs/index.js
import React from 'react'; import PropTypes from 'prop-types'; import Text from './text'; import Radio from './radio'; import Select from './select'; import Date from './date'; import Blob from './blob'; import Number from './number'; // REDUX-FORM custom inputs // http://redux-form.com/6.5.0/docs/api/Field.md/ export...
import React from 'react'; import PropTypes from 'prop-types'; import Text from './text'; import Radio from './radio'; import Select from './select'; import Date from './date'; import Blob from './blob'; // TODO: fix numbers input in iOS as we can't accept the value // import Number from './number'; // REDUX-FORM cust...
Use input text for numbers
Use input text for numbers
JavaScript
mit
Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher
714e1d5cc8a46a1466cc5e1a2e75ddf43e4fc78f
src/io/c9/ace/Config.js
src/io/c9/ace/Config.js
/** * @license * Copyright 2019 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'io.c9.ace', name: 'Config', properties: [ { class: 'Int', name: 'height', value: 500 }, { class: 'Int', name: 'width', ...
/** * @license * Copyright 2019 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'io.c9.ace', name: 'Config', properties: [ { class: 'Int', name: 'height', value: 400 }, { class: 'Int', name: 'width', ...
Change Ace editor default size.
Change Ace editor default size.
JavaScript
apache-2.0
foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2
a2f5836cc763ed63d2bba47e494c636f64ef0b7e
public/javascripts/application.js
public/javascripts/application.js
$(document).ready(function() { if (window.location.href.search(/query=/) == -1) { $('#query').one('click, focus', function() { $(this).val(''); }); } $(document).bind('keyup', function(event) { if ($(event.target).is(':input')) { return; } if (event.which == 83) { $('#query...
$(document).ready(function() { $('#version_for_stats').change(function() { window.location.href = $(this).val(); }); });
Remove JS that handled not-quite-placeholder.
Remove JS that handled not-quite-placeholder.
JavaScript
mit
rubygems/rubygems.org-backup,square/rubygems.org,rubygems/rubygems.org-backup,square/rubygems.org,square/rubygems.org,rubygems/rubygems.org-backup
17fb38813a8b843c889e8fa826e5d686fad4ff1a
gulp/ios.js
gulp/ios.js
import bg from 'gulp-bg'; import gulp from 'gulp'; // If this doesn't work, while manual Xcode works, try: // 1) delete ios/build directory // 2) reset content and settings in iOS simulator gulp.task('ios', ['native'], bg('react-native', 'run-ios'));
import bg from 'gulp-bg'; import gulp from 'gulp'; // If this doesn't work, while manual Xcode works, try: // 1) delete ios/build directory // 2) reset content and settings in iOS simulator gulp.task('ios', ['native'], bg( 'react-native', 'run-ios', '--simulator', 'iPhone 5s' ));
Set iPhone 5s as default simulator
Set iPhone 5s as default simulator Design for the smallest mobile device first.
JavaScript
mit
robinpokorny/este,abelaska/este,TheoMer/este,christophediprima/este,TheoMer/este,syroegkin/mikora.eu,christophediprima/este,sikhote/davidsinclair,TheoMer/este,christophediprima/este,steida/este,amrsekilly/updatedEste,este/este,christophediprima/este,abelaska/este,skallet/este,abelaska/este,skallet/este,sikhote/davidsin...
08b70906907f70d83a2e441bce45863c3f749c85
api/routes/tasks.js
api/routes/tasks.js
import {Router} from 'express' import models from '../models'; export default () => { let app = Router() app.get('/new', (req, res) => { res.render('tasks/new') }) app.get('/:id', (req, res) => { models.Task.find(req.params.id).then((task) => { res.render('tasks/show', {task}) }) }) app.post('/', (re...
import {Router} from 'express' import models from '../models'; export default () => { let app = Router({mergeParams: true}) app.get('/new', (req, res) => { models.Serfs.findAll().then((serfs) => { res.render('tasks/new', {serfs}) }) }) app.get('/:id', (req, res) => { models.Task.find(req.params.id).the...
Add functionality to include serfs
Add functionality to include serfs
JavaScript
mit
taodav/MicroSerfs,taodav/MicroSerfs
a36bd915dfe25fbb53da2fc83b6c048beb5fa5af
js/headless/localserver.js
js/headless/localserver.js
var server = require('webserver').create(), fs = require('fs'); var serverUrl = '127.0.0.1:8888'; var workingDirectory = fs.workingDirectory.replace(/\//g, fs.separator); function create() { var serverCreated = server.listen(serverUrl, function (request, response) { var cleanedUrl = request.url ...
var server = require('webserver').create(), fs = require('fs'); var serverUrl = '127.0.0.1:8888'; var workingDirectory = fs.workingDirectory.replace(/\//g, fs.separator); function create() { var serverCreated = server.listen(serverUrl, function (request, response) { var cleanedUrl = decodeURIComponent...
Fix SVG load with spaces in filename
Fix SVG load with spaces in filename
JavaScript
apache-2.0
bperel/geotime,bperel/geotime,bperel/geotime
90ea06f0d7955419f9f19dc464655b4f589fddee
tasks/reports.js
tasks/reports.js
'use strict'; const r = require('../services/reddit'); let reportedItemNames = new Set(); let hasFinishedFirstRun = false; const SUBREDDITS = ['pokemontrades', 'SVExchange']; module.exports = { period: 60, onStart: true, task () { return r.get_subreddit(SUBREDDITS.join('+')).get_reports({limit: hasFinishedF...
'use strict'; const r = require('../services/reddit'); let reportedItemNames = new Set(); let hasFinishedFirstRun = false; const SUBREDDITS = ['pokemontrades', 'SVExchange']; module.exports = { period: 60, onStart: true, task () { return r.get_subreddit(SUBREDDITS.join('+')).get_reports({limit: hasFinishedF...
Remove initial error if reddit isn't given correct information
Remove initial error if reddit isn't given correct information
JavaScript
apache-2.0
pokemontrades/porygon-bot
fe0608cb308a8f083a7db4502b0f9c92d37b00e9
test/workbook.js
test/workbook.js
import {Workbook} from '../src/parsing/workbook.js'; import {expect} from 'chai'; import fs from 'fs'; describe('Workbook parsing', () => { let file = fs.readFileSync('example/example-with-data.xlsx'); let wb = new Workbook(file); it('should build a Workbook instance from a binary file', () => { ...
import {Workbook} from '../src/parsing/workbook.js'; import {expect} from 'chai'; import fs from 'fs'; describe('Workbook parsing', () => { let file = fs.readFileSync('example/example-with-data.xlsx'); let wb = new Workbook(file); it('should build a Workbook instance from a binary file', () => { ...
Add failing test for Workbook file save function
Add failing test for Workbook file save function
JavaScript
mit
biosustain/microplate
e4dfa6dab47f7fb2e9ad815c4069ae5a198e953b
lib/cli.js
lib/cli.js
'use strict'; var findup = require('findup-sync'); var spawnSync = require('child_process').spawnSync; var gruntPath = findup('node_modules/grunt-cli/bin/grunt', {cwd: __dirname}); process.title = 'grunth'; var harmonyFlags = [ '--harmony_scoping', // '--harmony_modules', // We have `require` and ES6 modules ...
'use strict'; var findup = require('findup-sync'); var spawnSync = require('child_process').spawnSync; var gruntPath = findup('node_modules/grunt-cli/bin/grunt', {cwd: __dirname}); process.title = 'grunth'; var harmonyFlags = [ '--harmony_scoping', // '--harmony_modules', // We have `require` and ES6 modules ...
Enable Symbol (it works fine on Node v0.12 branch)
Enable Symbol (it works fine on Node v0.12 branch)
JavaScript
mit
EE/grunth-cli
3ceb06bb42c156b58e25888b8c97c41f8b320de0
sixpack/static/js/script.js
sixpack/static/js/script.js
$(function () { // Display correct URL on "no-experiments" page. $('#base-domain').html(document.location.origin); // Draw charts on Details page. if ($('#details-page').length) { var id, alternative_name, color; var colors = $('#details-page').find('span.circle').get(); var chart = new Chart($(...
$(function () { // Display correct URL on "no-experiments" page. $('#base-domain').html(document.location.origin); // Draw charts on Details page. if ($('#details-page').length) { var id, alternative_name, color; var colors = $('#details-page').find('span.circle').get(); var chart = new Chart($(...
Load Dashboard charts on scroll.
Load Dashboard charts on scroll.
JavaScript
bsd-2-clause
seatgeek/sixpack,seatgeek/sixpack,llonchj/sixpack,vpuzzella/sixpack,vpuzzella/sixpack,nickveenhof/sixpack,blackskad/sixpack,smokymountains/sixpack,llonchj/sixpack,spjwebster/sixpack,llonchj/sixpack,blackskad/sixpack,vpuzzella/sixpack,smokymountains/sixpack,seatgeek/sixpack,seatgeek/sixpack,vpuzzella/sixpack,nickveenhof...
0e0d3278002b01c4cd0d732fd937141d6a0f262a
api-server/src/routes/auth.js
api-server/src/routes/auth.js
import * as m from '../models' import parse from 'co-body' import jwt from 'koa-jwt' import {JWT_KEY} from '../config' export default ({api}) => { api.post('/auth', async ctx => { const body = await parse.json(ctx) try { if (!body.username) throw new Error('Username is required') if (!body.passw...
import * as m from '../models' import parse from 'co-body' import jwt from 'koa-jwt' import {JWT_KEY} from '../config' export default ({api}) => { api.post('/auth', async ctx => { const body = await parse.json(ctx) try { if (!body.username) throw new Error('Username is required') if (!body.passw...
Set up exp time for JWT
Set up exp time for JWT
JavaScript
mit
websash/q-and-a-react-redux-app,websash/q-and-a-react-redux-app
acbb593cec671d223aa0b13020f1201bb016e987
public/config/example_openidc.js
public/config/example_openidc.js
window.config = { // default: '/' routerBasename: '/', // default: '' relativeWebWorkerScriptsPath: '', servers: { dicomWeb: [ { name: 'Orthanc', wadoUriRoot: 'http://127.0.0.1/pacs/wado', qidoRoot: 'http://127.0.0.1/pacs/dicom-web', wadoRoot: 'http://127.0.0.1/pacs/d...
window.config = { // default: '/' routerBasename: '/', // default: '' relativeWebWorkerScriptsPath: '', servers: { dicomWeb: [ { name: 'Orthanc', wadoUriRoot: 'http://127.0.0.1/pacs/wado', qidoRoot: 'http://127.0.0.1/pacs/dicom-web', wadoRoot: 'http://127.0.0.1/pacs/d...
Make sure we're setting our bearer token; not basic auth
Make sure we're setting our bearer token; not basic auth
JavaScript
mit
OHIF/Viewers,OHIF/Viewers,OHIF/Viewers
8747f9e4501b623c8eaa125c455fe1b45a8669bf
src/project/member/client.js
src/project/member/client.js
'use strict'; let apiClient; class DrushIOMember { constructor(client, project, identifier, data = {}) { apiClient = client; this.identifier = identifier; this.project = project; this.data = data; } /** * Updates the given membership with the provided details. * * @param {Object} deta...
'use strict'; let apiClient; class DrushIOMember { constructor(client, project, identifier, data = {}) { apiClient = client; this.identifier = identifier; this.project = project; this.data = data; } /** * Updates the given membership with the provided details. * * @param {Object} deta...
Allow invitations to members to be re-sent.
Allow invitations to members to be re-sent.
JavaScript
mit
drush-io/api-client-js,drush-io/api-client-js
3f43dbfb81de9cab58fdc83c02f864872ad69210
examples/demo/index.js
examples/demo/index.js
'use strict'; var angular = require('angular'); // Require the almost-static-site main module var mainModule = require('../../main'); // Define the Demo App var app = window.app = angular.module('demoApp', [ 'assMain' ]); // Here you can define app specific angular extensions to the almost-static-site main module...
/*global angular*/ 'use strict'; require('angular'); // Require the almost-static-site main module var mainModule = require('../../main'); // Define the Demo App var app = window.app = angular.module('demoApp', [ 'assMain' ]); // Here you can define app specific angular extensions to the almost-static-site main m...
Fix angular 1.3 CommonJS require on example/demo
Fix angular 1.3 CommonJS require on example/demo
JavaScript
mit
unkhz/almost-static-site,unkhz/almost-static-site
c0bfd8a797232d1ee43f9f554b932f0c6df10b2f
addon/index.js
addon/index.js
let PolarBear = Ember.Object.extend({ schedule(target, f, interval) { return Ember.run.later(this, function() { f.apply(target); this.start(target, f, interval); }, interval); }, kill() { return Ember.run.cancel(this.get('timer')); }, start(target, f, interval = 500) { this.set('...
let PolarBear = Ember.Object.extend({ interval: 1000, schedule(f) { return Ember.run.later(this, function() { f.apply(this); this.start(f); }, this.get('interval')); }, kill() { return Ember.run.cancel(this.get('timer')); }, start(f) { this.set('timer', this.schedule(f)); } ...
Revert "Instantiate when it is imporeted"
Revert "Instantiate when it is imporeted" This reverts commit e80b68bb5791247ae80179e541e04f865002206b.
JavaScript
mit
sozuuuuu/ember-cli-polar-bear,sozuuuuu/ember-cli-polar-bear
7dd9607934d0dc964878f570a21274874c719dbe
hn.js
hn.js
// Adapted from https://github.com/etcet/HNES/blob/master/js/hn.js $(document).ready(function() { $('body > center > table > tbody > tr:first-child').attr('id', 'header'); $('#header td').removeAttr('bgcolor'); $('#header > td > table > tbody > tr > td:first-child').removeAttr('style').attr('id', 'img-wrappe...
// Adapted from https://github.com/etcet/HNES/blob/master/js/hn.js $(document).ready(function() { $('body > center > table > tbody > tr:first-child').attr('id', 'header'); $('#header td').removeAttr('bgcolor'); $('#header > td > table > tbody > tr > td:first-child').removeAttr('style').attr('id', 'img-wrappe...
Add classes to article table elements.
Add classes to article table elements.
JavaScript
mit
johnotander/hckrnws
23a43dc3226d73c9138284051510b6d4315d7dcb
postcss.config.js
postcss.config.js
module.exports = { plugins: [ require('postcss-import'), require('postcss-css-reset'), require('postcss-custom-properties'), require('postcss-extend'), require('postcss-nested'), require('postcss-color-function'), require('postcss-button'), require('postcss-inline-svg'), require('p...
module.exports = { plugins: [ require('postcss-import'), require('postcss-css-reset'), require('postcss-custom-properties'), require('postcss-extend'), require('postcss-nested'), require('postcss-color-function'), require('postcss-button'), require('postcss-inline-svg'), require('p...
Fix value of max. width ('neatMaxWidth') used by postcss-neat
Fix value of max. width ('neatMaxWidth') used by postcss-neat
JavaScript
apache-2.0
input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl-explorer,input-output-hk/cardano-sl-explorer,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/cardano-sl...
671aeb8ef771da601e037ad93af5ce97a2c020c7
app/javascript/old/navtabs.js
app/javascript/old/navtabs.js
$(document).on('turbo:load turbo:render', function() { var $panels, $tabs; $tabs = $('#lab_tests').tabs(); $panels = $('.ui-tabs-panel'); $('#departments').tabs({ cache: true }); $('#departments').tabs('paging', { nextButton: '&rarr;', prevButton: '&larr;', follow: true, followOnSelect: ...
$(document).on('turbo:load turbo:render', function() { $('#departments').tabs({ cache: true }); $('#departments').tabs('paging', { nextButton: '&rarr;', prevButton: '&larr;', follow: true, followOnSelect: true }); $('#order_tests').tabs({ cache: true }); return $('#order_tests').ta...
Remove declared but unused vars
Remove declared but unused vars
JavaScript
mit
Labtec/OpenLIS,Labtec/OpenLIS,Labtec/OpenLIS
152727eb30260004929c5e212cd1217e76deb371
app/javascript/app/providers/agriculture-countries-context-provider/agriculture-countries-context-provider-reducers.js
app/javascript/app/providers/agriculture-countries-context-provider/agriculture-countries-context-provider-reducers.js
export const initialState = { loading: false, loaded: false, data: [], error: false }; const setLoading = (loading, state) => ({ ...state, loading }); const setLoaded = (loaded, state) => ({ ...state, loaded }); const setError = (state, error) => ({ ...state, error }); export default { fetchAgricultureCount...
export const initialState = { loading: false, loaded: false, data: [], error: false }; const setLoading = (loading, state) => ({ ...state, loading }); const setLoaded = (loaded, state) => ({ ...state, loaded }); const setError = (state, error) => ({ ...state, error }); export default { fetchAgricultureCount...
Add meta data to agriculture contexts store
Add meta data to agriculture contexts store
JavaScript
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
1e1aaff133bdc271386a02247811063dcbaf672e
app/js/main.js
app/js/main.js
/* * EksiOkuyucu - unofficial eksisozluk client * http://eksiokuyucu.com/ * * Copyright (C) 2014 Onur Aslan <onuraslan@gmail.com> * Licensed under MIT * https://github.com/onuraslan/EksiOkuyucu/blob/master/COPYING */ require.config ({ paths: { requireLib: 'libs/require', jquery: 'libs/jquery-1.11.0....
/* * EksiOkuyucu - eksisozluk reader * https://github.com/onuraslan/EksiOkuyucu * * Copyright (C) 2015 Onur Aslan <onur@onur.im> * Licensed under MIT */ require.config ({ paths: { requireLib: 'libs/require', jquery: 'libs/jquery-1.11.0.min', underscore: 'libs/underscore-min', backbone: 'libs/...
Update copyright year, homepage and email
Update copyright year, homepage and email
JavaScript
mit
onur/EksiOkuyucu,onuraslan/EksiOkuyucu,onur/EksiOkuyucu,onuraslan/EksiOkuyucu
31cba1e550f8332ca46801b6884159af34324725
package.js
package.js
Package.describe({ summary: "Twilio API Wrapper for Meteor" }); Npm.depends({ "twilio": "1.1.4" }); Package.on_use(function(api) { if (api.export) api.export('Twilio', 'server'); api.add_files('twilio_npm.js', 'server'); });
Package.describe({ summary: "Twilio API Wrapper for Meteor" }); Npm.depends({ "twilio": "1.4.0" }); Package.on_use(function(api) { if (api.export) api.export('Twilio', 'server'); api.add_files('twilio_npm.js', 'server'); });
Update twilio module reference to 1.4.0
Update twilio module reference to 1.4.0 Latest twilio-node: https://github.com/twilio/twilio-node/
JavaScript
mit
bright-sparks/twilio-meteor,andreioprisan/twilio-meteor
f98f628dec56251db734226843b26a3d5c01e97a
app/package.js
app/package.js
const { clone, pull } = require('./lib/git') const path = require('path') const jetpack = require('fs-jetpack') const configuration = require('./configuration') class Package { constructor (url) { this.path = path.join(configuration.pluginDir, url) this.url = url this.clone = clone this.pull = pull ...
const { clone, pull } = require('./lib/git') const path = require('path') const jetpack = require('fs-jetpack') const freshRequire = require('./lib/freshRequire') const configuration = require('./configuration') class Package { constructor (url) { this.path = path.join(configuration.pluginDir, url) this.url...
Allow new blocks to be reloaded.
Allow new blocks to be reloaded.
JavaScript
mit
tinytacoteam/zazu,tinytacoteam/zazu
a472c660b51be2a1aed5012caa68661a0d7906f4
app/utilities/search/index.js
app/utilities/search/index.js
'use strict' const Fuse = require('fuse.js') let fuse = null let fuseIndex = [] const fuseOptions = { shouldSort: true, tokenize: true, matchAllTokens: true, findAllMatches: true, threshold: 0.2, location: 0, distance: 100, maxPatternLength: 32, minMatchCharLength: 1, keys: [ 'description', ...
'use strict' const Fuse = require('fuse.js') let fuse = null let fuseIndex = [] const fuseOptions = { shouldSort: true, tokenize: true, matchAllTokens: true, findAllMatches: true, threshold: 0.2, location: 0, distance: 100, maxPatternLength: 32, minMatchCharLength: 1, keys: [ 'description', ...
Disable the search when the input pattern's length is less than or equal to 1
Disable the search when the input pattern's length is less than or equal to 1
JavaScript
mit
wujysh/Lepton,wujysh/Lepton
10921ad47828ed7b5a2c3d6d3e40e7ad69418bc7
examples/request/app.js
examples/request/app.js
import { Request } from 'react-axios' import React from 'react' import ReactDOM from 'react-dom' class App extends React.Component { constructor(props) { super(props) this.state = {} } render() { return ( <div> <code> <Request method="get" url="/api/request"> {(er...
import { Request, Get, Post, Put, Delete, Head, Patch } from 'react-axios' import React from 'react' import ReactDOM from 'react-dom' class App extends React.Component { constructor(props) { super(props) this.state = {} } renderResponse(error, response, isLoading) { if(error) { return (<div>So...
Add examples for each component type.
Add examples for each component type.
JavaScript
mit
sheaivey/react-axios,sheaivey/react-axios
490ae36bd10f9ccf6c8efc89fec5ac5c981a28aa
examples/profile-cards-react-with-styles/src/components/Profile.js
examples/profile-cards-react-with-styles/src/components/Profile.js
/* eslint-disable react/prop-types */ import React from 'react'; import { Image, View, Text } from 'react-sketchapp'; import { css, withStyles } from '../withStyles'; const Profile = ({ user, styles }) => ( <View {...css(styles.container)}> {/* <Image source={user.profile_image_url} {...css(styles.avatar)} /> */...
/* eslint-disable react/prop-types */ import React from 'react'; import { Image, View, Text } from 'react-sketchapp'; import { css, withStyles } from '../withStyles'; const Profile = ({ user, styles }) => ( <View {...css(styles.container)}> <Image source={user.profile_image_url} {...css(styles.avatar)} /> <V...
Fix commented out avatar in profile-cards-react-with-styles
Fix commented out avatar in profile-cards-react-with-styles
JavaScript
mit
weaintplastic/react-sketchapp
fb057f1f94237885bc027d0f209739cc384166b7
bin/sync-algolia.js
bin/sync-algolia.js
import algolia from 'algoliasearch'; import icons from '../dist/icons.json'; import tags from '../src/tags.json'; const ALGOLIA_APP_ID = '5EEOG744D0'; if ( process.env.TRAVIS_PULL_REQUEST === 'false' && process.env.TRAVIS_BRANCH === 'master' ) { syncAlgolia(); } else { console.log('Skipped Algolia sync.'); } ...
import algolia from 'algoliasearch'; import icons from '../dist/icons.json'; import tags from '../src/tags.json'; const ALGOLIA_APP_ID = '5EEOG744D0'; if ( process.env.TRAVIS_PULL_REQUEST === 'false' && process.env.TRAVIS_BRANCH === 'master' ) { syncAlgolia(); } else { console.log('Skipped Algolia sync.'); } ...
Initialize algolia settings in script
build: Initialize algolia settings in script
JavaScript
mit
colebemis/feather,colebemis/feather
b676b5db32487ef6754bf4a1ddd2df5d7d455ff2
app/js/services.js
app/js/services.js
angular.module('F1FeederApp.services', []) .factory('ergastAPIservice', function($http) { var ergastAPI = {}; ergastAPI.getDrivers = function() { return $http({ method: 'JSONP', url: 'http://ergast.com/api/f1/2013/driverStandings.json?callback=JSON_CALLBACK' }); } ergas...
angular.module('F1FeederApp.services', []) .factory('ergastAPIservice', function($http) { var ergastAPI = {}; ergastAPI.getDrivers = function() { return $http({ method: 'JSONP', url: 'http://ergast.com/api/f1/2016/driverStandings.json?callback=JSON_CALLBACK' }); } ergas...
Update data source to 2016 feed
Update data source to 2016 feed
JavaScript
mit
buchananjason/softsource,buchananjason/softsource
5e766f596a8f5173d77e86079555f82bd90a1c38
shared/config/env/development.js
shared/config/env/development.js
'use strict'; var _ = require('lodash'); var base = require('./base'); const development = _.merge({}, base, { env: 'development', auth0: { callbackURL: process.env.AUTH0_CALLBACK_URL || 'http://localhost:9000/auth/callback', clientID: process.env.AUTH0_CLIENT_ID || 'uyTltKDRg1BKu3nzDu6sLpHS44sInwOu', }...
'use strict'; var _ = require('lodash'); var base = require('./base'); const development = _.merge({}, base, { auth0: { callbackURL: process.env.AUTH0_CALLBACK_URL || 'http://localhost:9000/auth/callback', clientID: process.env.AUTH0_CLIENT_ID || 'uyTltKDRg1BKu3nzDu6sLpHS44sInwOu', }, env: 'development'...
Align ordering of config vars between files
Align ordering of config vars between files
JavaScript
mit
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder