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
779fdd103374a6edb27d555e23aaace7a6f7caa3
public/assets/default/js/thread.js
public/assets/default/js/thread.js
$(document).ready(function(){ var simplemde = new SimpleMDE({ element: $("#postreply")[0], autosave: { enabled: true, delay: 2000, unique_id: "thread-" + window.thread_id // save drafts based on thread id }, spellChecker: false }); });
$(document).ready(function(){ var simplemde = new SimpleMDE({ element: $("#postreply")[0], // Autosave disabled temporarily because it keeps it's content even after submitting (Clearboard will use a custom AJAX submit function) /*autosave: { enabled: true, delay: 200...
Disable SimpleMDE autosaving, as it retains it would retain it's content after posting
Disable SimpleMDE autosaving, as it retains it would retain it's content after posting
JavaScript
mit
clearboard/clearboard,mitchfizz05/clearboard,mitchfizz05/clearboard,clearboard/clearboard
45dfb547c46f25255759f6ebcdc95f59cf1d9c75
commonjs/cookie-opt.js
commonjs/cookie-opt.js
var componentEvent = require('kwf/component-event'); var cookies = require('js-cookie'); var CookieOpt = {}; CookieOpt.getDefaultOpt = function() { return 'in'; // TODO get from baseProperty }; CookieOpt.isSetOpt = function() { return !!cookies.get('cookieOpt'); }; CookieOpt.getOpt = function() { if (Co...
var componentEvent = require('kwf/component-event'); var cookies = require('js-cookie'); var $ = require('jQuery'); var CookieOpt = {}; CookieOpt.getDefaultOpt = function() { var defaultOpt = $('body').data('cookieDefaultOpt'); if (defaultOpt != 'in' && defaultOpt != 'out') defaultOpt = 'in'; return defau...
Read default cookie opt setting from body data tag
Read default cookie opt setting from body data tag
JavaScript
bsd-2-clause
koala-framework/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework
20347bfe721a0189e77978561400e5cb23132a11
Kwf_js/Utils/YoutubePlayer.js
Kwf_js/Utils/YoutubePlayer.js
Ext.namespace('Kwf.Utils.YoutubePlayer'); Kwf.Utils.YoutubePlayer.isLoaded = false; Kwf.Utils.YoutubePlayer.isCallbackCalled = false; Kwf.Utils.YoutubePlayer.callbacks = []; Kwf.Utils.YoutubePlayer.load = function(callback, scope) { if (Kwf.Utils.YoutubePlayer.isCallbackCalled) { callback.call(scope || win...
Ext.namespace('Kwf.Utils.YoutubePlayer'); Kwf.Utils.YoutubePlayer.isLoaded = false; Kwf.Utils.YoutubePlayer.isCallbackCalled = false; Kwf.Utils.YoutubePlayer.callbacks = []; Kwf.Utils.YoutubePlayer.load = function(callback, scope) { if (Kwf.Utils.YoutubePlayer.isCallbackCalled) { callback.call(scope || win...
Revert "get dynamicly if https or http is supported for youtube iframe api"
Revert "get dynamicly if https or http is supported for youtube iframe api" This reverts commit ffbdfe78a884b06447ff6da01137820224081962.
JavaScript
bsd-2-clause
koala-framework/koala-framework,yacon/koala-framework,nsams/koala-framework,Ben-Ho/koala-framework,Sogl/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework,yacon/koala-framework,kaufmo/koala-framework,Sogl/koala-framework,Ben-Ho/koala-framework,yacon/koala-framework,kaufmo/koala-framework,nsams/koala...
a62a28a4819f038ab46a32fee32869cc54c920e2
web/src/searchQuery.js
web/src/searchQuery.js
// This is a second entry point to speed up our query // to fetch search results. // We've patched react-scripts to add this as another entry // point. E.g., the Webpack config by running lives at // web/node_modules/react-scripts/config/webpack.config.js. // After modifying files in react-scripts, commit the // patche...
// This is a second entry point to speed up our query // to fetch search results. // We've patched react-scripts to add this as another entry // point. E.g., the Webpack config by running lives at // web/node_modules/react-scripts/config/webpack.config.js. // After modifying files in react-scripts, commit the // patche...
Enable prefetching to try it out
Enable prefetching to try it out
JavaScript
mpl-2.0
gladly-team/tab,gladly-team/tab,gladly-team/tab
ba9c863de909906382b55309e1cfe0e0ce935308
spec/html/QueryStringSpec.js
spec/html/QueryStringSpec.js
describe("QueryString", function() { describe("#setParam", function() { it("sets the query string to include the given key/value pair", function() { var windowLocation = { search: "" }, queryString = new j$.QueryString({ getWindowLocation: function() { return windowLoca...
describe("QueryString", function() { describe("#setParam", function() { it("sets the query string to include the given key/value pair", function() { var windowLocation = { search: "" }, queryString = new j$.QueryString({ getWindowLocation: function() { return windowLocat...
Add spec to verify custom query params are left alone
Add spec to verify custom query params are left alone [#29578495]
JavaScript
mit
faizalpribadi/jasmine,danielalexiuc/jasmine,GerHobbelt/jasmine,Contagious06/jasmine,tsaikd/jasmine,negherbon/jasmine,soycode/jasmine,mashroomxl/jasmine,mashroomxl/jasmine,WY08271/jasmine,GerHobbelt/jasmine,songshuangkk/jasmine,rlugojr/jasmine,paulcbetts/jasmine,IveWong/jasmine,leahciMic/jasmine,morsdyce/jasmine,daniela...
585467648d0ec67da6cde967a1e17b07014638b8
src/native/app/components/Text.react.js
src/native/app/components/Text.react.js
import React, { Component, PropTypes } from 'react'; import theme from '../theme'; import { StyleSheet, Text } from 'react-native'; const styles = StyleSheet.create({ text: { color: theme.textColor, fontFamily: theme.fontFamily, fontSize: theme.fontSize, }, }); // Normalize multiline strings because T...
import React, { Component, PropTypes } from 'react'; import theme from '../theme'; import { StyleSheet, Text } from 'react-native'; const styles = StyleSheet.create({ text: { // eslint-disable-line react-native/no-unused-styles color: theme.textColor, fontFamily: theme.fontFamily, fontSize: theme.fontSiz...
Fix native Text computed lineHeight
Fix native Text computed lineHeight
JavaScript
mit
este/este,robinpokorny/este,TheoMer/Gyms-Of-The-World,skallet/este,christophediprima/este,robinpokorny/este,cjk/smart-home-app,christophediprima/este,TheoMer/Gyms-Of-The-World,TheoMer/este,christophediprima/este,christophediprima/este,steida/este,TheoMer/este,TheoMer/este,sikhote/davidsinclair,sikhote/davidsinclair,est...
9692dfc1f91f9fe3c87a1afe4df8d613f78f885c
bin/startBot.js
bin/startBot.js
const RoundpiecesBot = require('./../src/roundpiecesbot'); const token = process.env.ROUNDPIECES_API_KEY; const adminUserName = process.env.ROUNDPIECES_ADMIN_USERNAME; const listPath = process.env.ROUNDPIECES_LIST_PATH; const startSearch = '00 * * * * *'; const endSearch = '30 * * * * *'; const resetSearch = '55 * * ...
const RoundpiecesBot = require('./../src/roundpiecesbot'); const token = process.env.ROUNDPIECES_API_KEY; const adminUserName = process.env.ROUNDPIECES_ADMIN_USERNAME; const listPath = process.env.ROUNDPIECES_LIST_PATH; const startSearch = '00 00 9 * * 4'; // 09.00 Thursdays const endSearch = '00 00 12 * * 4'; // 12....
Set cron ranges to match real arrangement times
Set cron ranges to match real arrangement times
JavaScript
mit
jbroni/roundpieces-slackbot
cc033abb20799f36b170e607ce95297491781eda
utility.js
utility.js
const path = require( 'path' ) const fs = require( 'fs' ) // Create a new path from arguments. const getAbsolutePath = ( ...args ) => path.resolve( path.join.apply( null, args ) ) const isExist = filePath => { try { fs.statSync( path.resolve( filePath ) ) return true } catch( error ){ return false ...
const path = require( 'path' ) const fs = require( 'fs' ) // Create a new path from arguments. const getAbsolutePath = ( ...args ) => path.resolve( path.join.apply( null, args ) ) const isExist = filePath => { try { fs.statSync( path.resolve( filePath ) ) return true } catch( error ){ return false ...
Add method to read and write
Add method to read and write
JavaScript
mit
Yacona/yacona
edeca61db29c3076b41c005eace74e2555f76be3
test/helpers/benchmarkReporter.js
test/helpers/benchmarkReporter.js
const chalk = require('chalk'); function benchmarkResultsToConsole(suite){ console.log("\n"); console.log("=================="); console.log("Benchmark results:"); console.log("------------------"); var bench; for(var testNo = 0; testNo < suite.length; testNo++){ bench = suite[testNo]; ...
const chalk = require('chalk'); function benchmarkResultsToConsole(suite){ console.log("\n"); console.log("=================="); console.log("Benchmark results:"); console.log("------------------"); var bench; for(var testNo = 0; testNo < suite.length; testNo++){ bench = suite[testNo]; ...
Change benchmark results color to magenta
Change benchmark results color to magenta as white on blue is barely visible in travis
JavaScript
mit
baranga/JSON-Patch,Starcounter-Jack/JSON-Patch,baranga/JSON-Patch,Starcounter-Jack/JSON-Patch,baranga/JSON-Patch,baranga/JSON-Patch,Starcounter-Jack/JSON-Patch,Starcounter-Jack/JSON-Patch
f55703a7a027651e141b753058abec7cbdf28e89
test/jsx-no-logical-expression.js
test/jsx-no-logical-expression.js
import test from 'ava'; import avaRuleTester from 'eslint-ava-rule-tester'; import rule from '../src/rules/jsx-no-logical-expression'; const ruleTester = avaRuleTester(test, { parserOptions: { ecmaVersion: 2018, ecmaFeatures: { jsx: true } } }); const ruleId = 'jsx-no-logical-expression'; const ...
import test from 'ava'; import avaRuleTester from 'eslint-ava-rule-tester'; import rule from '../src/rules/jsx-no-logical-expression'; const ruleTester = avaRuleTester(test, { parserOptions: { ecmaVersion: 2018, ecmaFeatures: { jsx: true } } }); const ruleId = 'jsx-no-logical-expression'; const ...
Add another invalid use case
Add another invalid use case
JavaScript
mit
CoorpAcademy/eslint-plugin-coorpacademy
d05e4d520f627b555fc52f243db307275eb7ca39
tests/unit/adapters/github-release-test.js
tests/unit/adapters/github-release-test.js
import { moduleFor, test } from 'ember-qunit'; moduleFor('adapter:github-release', 'Unit | Adapter | github release', { // Specify the other units that are required for this test. // needs: ['serializer:foo'] }); // Replace this with your real tests. test('it exists', function(assert) { let adapter = this.subje...
import { moduleFor, test } from 'ember-qunit'; moduleFor('adapter:github-release', 'Unit | Adapter | github release', { // Specify the other units that are required for this test. // needs: ['serializer:foo'] }); test('it exists', function(assert) { let adapter = this.subject(); assert.ok(adapter); }); test(...
Remove the boilerplate comment now that we have more tests.
Remove the boilerplate comment now that we have more tests.
JavaScript
mit
elwayman02/ember-data-github,jimmay5469/ember-data-github,elwayman02/ember-data-github,jimmay5469/ember-data-github
0b13a34c60150e8eee5394b61233d451c7a933cb
assets/js/app.js
assets/js/app.js
$( document ).ready(function() { /* Sidebar height set */ $('.sidebar').css('min-height',$(document).height()); /* Secondary contact links */ var scontacts = $('#contact-list-secondary'); var contact_list = $('#contact-list'); scontacts.hide(); contact_list.mouseenter(function(){ scontacts.fadeIn(); }); ...
$( document ).ready(function() { /* Sidebar height set */ $('.sidebar').css('min-height',$(document).height()); /* Secondary contact links */ var scontacts = $('#contact-list-secondary'); var contact_list = $('#contact-list'); scontacts.hide(); contact_list.mouseenter(function(){ scontacts.fadeIn(); }); ...
Add target _blank on article links
Add target _blank on article links
JavaScript
mit
meumobi/meumobi.github.io,meumobi/meumobi.github.io,meumobi/meumobi.github.io
59c5b0cf7aade3943a2d9b664c5efacd4f23a14d
src/api-gateway-websocket/lambda-events/WebSocketDisconnectEvent.js
src/api-gateway-websocket/lambda-events/WebSocketDisconnectEvent.js
import WebSocketRequestContext from './WebSocketRequestContext.js' // TODO this should be probably moved to utils, and combined with other header // functions and utilities function createMultiValueHeaders(headers) { return Object.entries(headers).reduce((acc, [key, value]) => { acc[key] = [value] return ac...
import WebSocketRequestContext from './WebSocketRequestContext.js' import { parseHeaders, parseMultiValueHeaders } from '../../utils/index.js' export default class WebSocketDisconnectEvent { constructor(connectionId) { this._connectionId = connectionId } create() { // TODO FIXME not sure where the heade...
Rewrite header handling in websocket disconnect event
Rewrite header handling in websocket disconnect event
JavaScript
mit
dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline
3a1638c1538b902bc8cebbf6b969798240f84157
demo/server.js
demo/server.js
var config = require('./webpack.config.js'); var webpack = require('webpack'); var webpackDevServer = require('webpack-dev-server'); var compiler; var server; // Source maps config.devtool = 'source-map'; config.output.publicPath = '/dist/'; // Remove minification to speed things up. config.plugins.splice(1, 2); //...
var config = require('./webpack.config.js'); var webpack = require('webpack'); var webpackDevServer = require('webpack-dev-server'); var compiler; var server; // Source maps config.devtool = 'eval'; config.output.publicPath = '/dist/'; // Remove minification to speed things up. config.plugins.splice(1, 2); // Add H...
Improve hot loading compile time
Improve hot loading compile time
JavaScript
mit
acorn421/react-html5video-subs,mderrick/react-html5video,Caseworx/inferno-html5video,Caseworx/inferno-html5video,acorn421/react-html5video-subs
49d8d01a14fb235c999473915667144d890e125b
src/components/video_list.js
src/components/video_list.js
import React from 'react' import VideoListItem from './video_list_item' const VideoList = (props) => { const videoItems = props.videos.map((video) => { return <VideoListItem video={video} /> }); return ( <ul className="col-md-4 list-group"> {videoItems} </ul> ); }; export default VideoList...
import React from 'react' import VideoListItem from './video_list_item' const VideoList = (props) => { const videoItems = props.videos.map((video) => { return <VideoListItem key={video.etag} video={video} /> }); return ( <ul className="col-md-4 list-group"> {videoItems} </ul> ); }; export ...
Add etag as unique key
Add etag as unique key Finish 25
JavaScript
mit
fifiteen82726/ReduxSimpleStarter,fifiteen82726/ReduxSimpleStarter
60b20d83f4fdc9c625b56a178c93af1533b82a60
src/redux/modules/card.js
src/redux/modules/card.js
import uuid from 'uuid'; import { Record as record } from 'immutable'; export class CardModel extends record({ name: '', mana: null, attack: null, defense: null, portrait: null, }) { constructor(obj) { super(obj); this.id = uuid.v4(); } }
// import uuid from 'uuid'; import { Record as record } from 'immutable'; export const CardModel = record({ id: null, name: '', mana: null, attack: null, defense: null, portrait: null, });
Remove id from Record and add id field
Remove id from Record and add id field Reason: on CardModel.update() it doesn’t keep the id field, so shit crashes
JavaScript
mit
inooid/react-redux-card-game,inooid/react-redux-card-game
153b9121bc2971e916ddc78045ebc6afc8a8ec5e
src/acorn_plugin/skipBlockComment.js
src/acorn_plugin/skipBlockComment.js
export default function skipSpace() { // https://github.com/ternjs/acorn/blob/master/src/tokenize.js#L100-L116 return function ha(endSign) { const endS = endSign ? endSign : '*/'; let startLoc = this.options.onComment && this.curPosition(); let start = this.pos, end = this.input.indexOf(endS, this.pos +...
// eslint-disable export default function skipSpace() { // https://github.com/ternjs/acorn/blob/master/src/tokenize.js#L100-L116 return function ha(endSign) { const endS = endSign ? endSign : '*/'; let startLoc = this.options.onComment && this.curPosition(); let start = this.pos, end = this.inp...
Disable eslint for this for now.
Disable eslint for this for now.
JavaScript
mit
laosb/hatp
bc24c83daef21248ee0ab141675bd6170c399403
tests/specs/misc/on-error/main.js
tests/specs/misc/on-error/main.js
define(function(require) { var test = require('../../../test') var n = 0 // 404 var a = require('./a') test.assert(a === null, '404 a') // exec error setTimeout(function() { var b = require('./b') }, 0) require.async('./c', function(c) { test.assert(c === null, '404 c') done() }) ...
define(function(require) { var test = require('../../../test') var n = 0 // 404 var a = require('./a') test.assert(a === null, '404 a') // exec error setTimeout(function() { var b = require('./b') }, 0) require.async('./c', function(c) { test.assert(c === null, '404 c') done() }) ...
Improve specs for error event
Improve specs for error event
JavaScript
mit
jishichang/seajs,eleanors/SeaJS,baiduoduo/seajs,ysxlinux/seajs,kaijiemo/seajs,wenber/seajs,uestcNaldo/seajs,PUSEN/seajs,zaoli/seajs,JeffLi1993/seajs,13693100472/seajs,tonny-zhang/seajs,chinakids/seajs,ysxlinux/seajs,kuier/seajs,Gatsbyy/seajs,wenber/seajs,miusuncle/seajs,mosoft521/seajs,treejames/seajs,Lyfme/seajs,imcys...
670dff868d04ab149bd252b6835b224a202a5bd1
lib/provider.js
lib/provider.js
'use babel'; import {filter} from 'fuzzaldrin'; import commands from './commands'; import variables from './variables'; export const selector = '.source.cmake'; export const disableForSelector = '.source.cmake .comment'; export const inclusionPriority = 1; function existy(value) { return value != null; } functi...
'use babel'; import {filter} from 'fuzzaldrin'; import commands from './commands'; import variables from './variables'; export const selector = '.source.cmake'; export const disableForSelector = '.source.cmake .comment'; export const inclusionPriority = 1; function existy(value) { return value != null; } functi...
Move cursor left on function completion.
Move cursor left on function completion.
JavaScript
mit
NealRame/autocomplete-cmake
7bfb2f65427182294c4582bb6bf1234daa193791
shell/Gruntfile.js
shell/Gruntfile.js
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), "download-atom-shell": { version: "0.20.3", outputDir: "./atom-shell", rebuild: true } }); grunt.loadNpmTasks('grunt-download-atom-shell'); };
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), "download-atom-shell": { version: "0.19.5", outputDir: "./atom-shell", rebuild: true } }); grunt.loadNpmTasks('grunt-download-atom-shell'); };
Revert back to older atom-shell where remote-debugging works
Revert back to older atom-shell where remote-debugging works This allows console to work again. In b5b1c142b6d92d3f254c93aa43432230d4d31e14 we upgraded to an atom-shell where remote-debugging /json doesn't seem to work. Details at atom/atom-shell#969
JavaScript
mit
kolya-ay/LightTable,masptj/LightTable,youprofit/LightTable,kausdev/LightTable,0x90sled/LightTable,EasonYi/LightTable,youprofit/LightTable,kenny-evitt/LightTable,kenny-evitt/LightTable,brabadu/LightTable,ashneo76/LightTable,rundis/LightTable,0x90sled/LightTable,youprofit/LightTable,fdserr/LightTable,kolya-ay/LightTable,...
5a3b4b8010d20793c0ffcb36caeb27283aef61c5
src/components/Members/NavbarLink.js
src/components/Members/NavbarLink.js
import React from 'react'; import { Link } from 'react-router'; function NavbarLink({to, href, className, component, children}) { const Comp = component || Link; return ( <span> { href ? <a href={href}>Yo</a> : <Comp to={to} className={className} activeStyle={{ color: '...
import React from 'react'; import { Link } from 'react-router'; function NavbarLink({ children, className, component, href, to }) { const Comp = component || Link; let Linkelement = ( <Comp to={to} className={className} activeStyle={{ color: '#A94545', }}> {children} </Comp> ); if (hre...
Modify link generation to allow off site links
Modify link generation to allow off site links
JavaScript
cc0-1.0
cape-io/acf-client,cape-io/acf-client
f6b0174625f669cef151cf8ef702d38b509fe95a
src/components/finish-order/index.js
src/components/finish-order/index.js
import { Component } from 'preact'; import style from './style'; export default class FinishOrder extends Component { constructor(props) { super(props); } render(props, state) { return ( <div class="container"> <p class=""> Děkujeme, za Vaši objednávku. Budeme Vás kontaktovat. Detaily ...
import { Component } from 'preact'; import style from './style'; export default class FinishOrder extends Component { constructor(props) { super(props); } render(props, state) { return ( <div class="container"> <p class=""> Děkujeme, za Vaši objednávku. Budeme Vás kontaktovat. Detaily ...
Disable redirect button on finish order page
Disable redirect button on finish order page
JavaScript
agpl-3.0
MakersLab/custom-print
741414856087c820963d3e688d5bbf88f5edf82a
src/components/googlemap/TaskPlot.js
src/components/googlemap/TaskPlot.js
import React, { PropTypes } from 'react'; import { List } from 'immutable'; import Polyline from './Polyline'; import Marker from './Marker'; class TaskPlot extends React.Component { shouldComponentUpdate(nextProps) { return (this.props.map !== nextProps.map) || (this.props.googlemaps !== nextProps.google...
import React, { PropTypes } from 'react'; import { List } from 'immutable'; import Polyline from './Polyline'; import Marker from './Marker'; import * as icons from './icons'; class TaskPlot extends React.Component { shouldComponentUpdate(nextProps) { return (this.props.map !== nextProps.map) || (this.pro...
Add labels to task markers.
Add labels to task markers.
JavaScript
mit
alistairmgreen/soaring-analyst,alistairmgreen/soaring-analyst
e8a00e1baad5e8ae7baa8afd9502f20cd0cd0687
src/store/actions.js
src/store/actions.js
import axios from 'axios'; const API_BASE = 'http://api.zorexsalvo.com/v1'; export default { getPosts: ({ commit }) => { axios.get(`${API_BASE}/posts/`).then( (response) => { commit('getPosts', response.data); }, ); }, getPost: ({ commit }, payload) => { axios.get(`${API_BASE}/p...
import axios from 'axios'; const API_BASE = 'https://api.zorexsalvo.com/v1'; export default { getPosts: ({ commit }) => { axios.get(`${API_BASE}/posts/`).then( (response) => { commit('getPosts', response.data); }, ); }, getPost: ({ commit }, payload) => { axios.get(`${API_BASE}/...
Change api url to https
Change api url to https
JavaScript
mit
zorexsalvo/zorexsalvo.github.io,zorexsalvo/zorexsalvo.github.io
d456e2986d4b99f09fa291c990dff7c8d6a0d9d9
src/utils/draw/reset_g.js
src/utils/draw/reset_g.js
// remove all children of the main `g` element // prepare for re-drawing (e.g. during resize) with margins export default ({ g, margin }) => { g.selectAll('*').remove() g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')') }
// remove all children of the main `g` element // and all children of the base `element` that are flagged with a css class named `--delete-on-update` // prepare for re-drawing (e.g. during resize) with margins export default ({ g, element, margin }) => { element.selectAll('.--delete-on-update').remove() g.sel...
Add flag to remove stuff outside of `g` element on resize & update.
Add flag to remove stuff outside of `g` element on resize & update.
JavaScript
mit
simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks
8d94ee098cbde06564c72cbd44574bd47fd207a5
vmdb/app/assets/javascripts/application.js
vmdb/app/assets/javascripts/application.js
//= require cfme_application //= require dialog_import_export //= require widget_import_export //= require jquery.jqplot //= require jqplot-plugins/jqplot.pieRenderer //= require jqplot-plugins/jqplot.barRenderer //= require jqplot-plugins/jqplot.categoryAxisRenderer //= require jqplot-plugins/jqplot.highlighter //= re...
//= require cfme_application //= require dialog_import_export //= require widget_import_export //= require excanvas //= require jquery.jqplot //= require jqplot-plugins/jqplot.pieRenderer //= require jqplot-plugins/jqplot.barRenderer //= require jqplot-plugins/jqplot.categoryAxisRenderer //= require jqplot-plugins/jqpl...
Enable jqplot charts to be visible in IE8
Enable jqplot charts to be visible in IE8 https://bugzilla.redhat.com/show_bug.cgi?id=1058261
JavaScript
apache-2.0
juliancheal/manageiq,jvlcek/manageiq,jameswnl/manageiq,djberg96/manageiq,maas-ufcg/manageiq,josejulio/manageiq,fbladilo/manageiq,romanblanco/manageiq,lpichler/manageiq,agrare/manageiq,romanblanco/manageiq,NaNi-Z/manageiq,aufi/manageiq,jntullo/manageiq,tinaafitz/manageiq,tinaafitz/manageiq,mfeifer/manageiq,branic/manage...
50ff129e6e3a02a03aa63a26e5c7d782a722db0e
src/bacon.react.js
src/bacon.react.js
import Bacon from "baconjs" import React from "react" export default React.createClass({ getInitialState() { return {} }, tryDispose() { const {dispose} = this.state if (dispose) { dispose() this.replaceState({}) } }, trySubscribe(tDOM) { this.tryDispose() if (tDOM) ...
import Bacon from "baconjs" import React from "react" export default React.createClass({ getInitialState() { return {} }, tryDispose() { const {dispose} = this.state if (dispose) { dispose() this.replaceState({}) } }, trySubscribe(props) { this.tryDispose() const {children...
Support className & id attrs and stream of arrays.
Support className & id attrs and stream of arrays.
JavaScript
mit
polytypic/bacon.react
02e191dabf4485f305c09c37592fcdfdf477553b
src/base/Button.js
src/base/Button.js
mi2JS.comp.add('base/Button', 'Base', '', // component initializer function that defines constructor and adds methods to the prototype function(proto, superProto, comp, superComp){ proto.construct = function(el, tpl, parent){ superProto.construct.call(this, el, tpl, parent); this.lastClick = 0; this.listen(...
mi2JS.comp.add('base/Button', 'Base', '', // component initializer function that defines constructor and adds methods to the prototype function(proto, superProto, comp, superComp){ proto.construct = function(el, tpl, parent){ superProto.construct.call(this, el, tpl, parent); this.lastClick = 0; this.listen(...
Use __propName as default action for button
Use __propName as default action for button
JavaScript
mit
hrgdavor/mi2js,hrgdavor/mi2js,hrgdavor/mi2js
4d949a2bc8f628dcc66ee62161ae3680b21766d0
bin/pep-proxy.js
bin/pep-proxy.js
#!/usr/bin/env node var proxy = require('../lib/fiware-orion-pep'), config = require('../config'); proxy.start(function (error, proxyObj) { if (error) { process.exit(); } else { var module; console.log('Loading middlewares'); module = require('../' + config.middlewares.req...
#!/usr/bin/env node var proxy = require('../lib/fiware-orion-pep'), config = require('../config'); proxy.start(function(error, proxyObj) { var module; if (error) { process.exit(); } else { console.log('Loading middlewares'); module = require('../' + config.middlewares.require)...
FIX Move the module definition to the top of the function
FIX Move the module definition to the top of the function
JavaScript
agpl-3.0
telefonicaid/fiware-pep-steelskin,telefonicaid/fiware-pep-steelskin,agroknow/fiware-pep-steelskin,telefonicaid/fiware-pep-steelskin,telefonicaid/fiware-pep-steelskin,agroknow/fiware-pep-steelskin,agroknow/fiware-pep-steelskin,agroknow/fiware-pep-steelskin
a439b552acbd586615b15b86d79ed003979aeaed
static/js/sh_init.js
static/js/sh_init.js
var codes = document.getElementsByTagName("code"); var title, elTitle, elPre; for (var i=0, l=codes.length ; i<l ; i++) { elPre = codes[i].parentNode; if (elPre.tagName != "PRE") continue; // Prepare for highlighting // elPre.className = elPre.className.replace("sourceCode ",""); if (elPre.className.match("s...
var codes = document.getElementsByTagName("code"); var title, elTitle, elPre; for (var i=0, l=codes.length ; i<l ; i++) { elPre = codes[i].parentNode; if (elPre.tagName != "PRE") continue; // Prepare for highlighting // elPre.className = elPre.className.replace("sourceCode ",""); if (elPre.className.match("s...
Add java to automatic conversions
Add java to automatic conversions
JavaScript
bsd-3-clause
MasseR/Blog,MasseR/Blog
c06c26a6987da66dc1722be92625065cacf73603
src/json-chayns-call/json-calls.js
src/json-chayns-call/json-calls.js
import * as jsonCallFunctions from './calls/index'; const jsonCalls = { 1: jsonCallFunctions.toggleWaitCursor, 2: jsonCallFunctions.selectTapp, 4: jsonCallFunctions.showPictures, 14: jsonCallFunctions.requestGeoLocation, 15: jsonCallFunctions.showVideo, 16: jsonCallFunctions.showAlert, 18:...
import * as jsonCallFunctions from './calls/index'; const jsonCalls = { 1: jsonCallFunctions.toggleWaitCursor, 2: jsonCallFunctions.selectTapp, 4: jsonCallFunctions.showPictures, 14: jsonCallFunctions.requestGeoLocation, 15: jsonCallFunctions.showVideo, 16: jsonCallFunctions.showAlert, 18:...
Add support for chayns-call 52
Add support for chayns-call 52
JavaScript
mit
TobitSoftware/chayns-web-light,TobitSoftware/chayns-web-light
e13f0ea5f5e21d63d367e61f4b247ba2a60cfd48
5.AdvancedReactAndRedux/test/test_helper.js
5.AdvancedReactAndRedux/test/test_helper.js
// Set up testing enviroment to run like a browser in the command line // Build 'renderComponent' helper that should render a given react class // Build helper for simulating events // Set up chai-jquery
import jsdom from 'jsdom'; import jquery from 'jquery'; import TestUtils from 'react-addons-test-utils'; // Set up testing enviroment to run like a browser in the command line global.document = jsdom.jsdom('<!doctype html><html><body></body></html>'); global.window = global.document.defaultView; const $ = _$(global.w...
Set up running like browser in command line, build renderComponent helper function
Set up running like browser in command line, build renderComponent helper function
JavaScript
mit
Branimir123/Learning-React,Branimir123/Learning-React
61a7bad245a6b365ff7162421545b9004d79b2d5
firecares/firestation/static/firestation/js/controllers/home.js
firecares/firestation/static/firestation/js/controllers/home.js
'use strict'; (function() { angular.module('fireStation.homeController', []) .controller('home', function($scope, map, $filter) { var homeMap = map.initMap('map', {scrollWheelZoom: false}); homeMap.setView([40, -90], 4); var headquartersIcon = L.FireCARESMarkers.headquarte...
'use strict'; (function() { angular.module('fireStation.homeController', []) .controller('home', function($scope, map, $filter) { var homeMap = map.initMap('map', {scrollWheelZoom: false}); homeMap.setView([40, -90], 4); var headquartersIcon = L.FireCARESMarkers.headquartersmarker(); ...
Update js to bust compressor cache.
Update js to bust compressor cache.
JavaScript
mit
meilinger/firecares,HunterConnelly/firecares,garnertb/firecares,FireCARES/firecares,ROGUE-JCTD/vida,garnertb/firecares,HunterConnelly/firecares,ROGUE-JCTD/vida,ROGUE-JCTD/vida,ROGUE-JCTD/vida,HunterConnelly/firecares,FireCARES/firecares,meilinger/firecares,garnertb/firecares,FireCARES/firecares,FireCARES/firecares,Fire...
6a97907ccc0ceeadcbbef6c66fda080e926c42b2
packages/ember-metal/lib/error_handler.js
packages/ember-metal/lib/error_handler.js
import Logger from 'ember-console'; import { isTesting } from './testing'; let onerror; // Ember.onerror getter export function getOnerror() { return onerror; } // Ember.onerror setter export function setOnerror(handler) { onerror = handler; } let dispatchOverride; // dispatch error export function dispatchError(...
import Logger from 'ember-console'; import { isTesting } from './testing'; // To maintain stacktrace consistency across browsers let getStack = function(error) { var stack = error.stack; var message = error.message; if (stack.indexOf(message) === -1) { stack = message + '\n' + stack; } return stack; };...
Fix Error object's stacktrace inconsistency across browsers
Fix Error object's stacktrace inconsistency across browsers
JavaScript
mit
johanneswuerbach/ember.js,elwayman02/ember.js,kanongil/ember.js,patricksrobertson/ember.js,intercom/ember.js,Patsy-issa/ember.js,sivakumar-kailasam/ember.js,thoov/ember.js,mixonic/ember.js,kennethdavidbuck/ember.js,sivakumar-kailasam/ember.js,bekzod/ember.js,rfsv/ember.js,kaeufl/ember.js,pixelhandler/ember.js,mike-nort...
a0045dd29b77217ed86dbf2f1d26925d5416b0ad
example_test.js
example_test.js
var util = require('util'), webdriver = require('selenium-webdriver'), chrome = require('selenium-webdriver/chrome'), retry = require('./index.js'); var driver = chrome.createDriver( new webdriver.Capabilities({'browserName': 'chrome'}), new chrome.ServiceBuilder('./chromedriver').build()); driver...
var util = require('util'), webdriver = require('selenium-webdriver'), chrome = require('selenium-webdriver/chrome'), retry = require('./index.js'); // Assumes that there is a chromedriver binary in the same directory. var driver = chrome.createDriver( new webdriver.Capabilities({'browserName': 'chrome...
Make the example test run without requiring local server
Make the example test run without requiring local server
JavaScript
mit
bbc/webdriverjs-retry,bbc/webdriverjs-retry,juliemr/webdriverjs-retry
0f3a4183d62b62f288cc9614fe52bc03ba33d01b
test/directory.js
test/directory.js
/* global beforeEach, describe, it */ var watch = require('..'); var join = require('path').join; var fs = require('fs'); var rimraf = require('rimraf'); require('should'); function fixtures(glob) { return join(__dirname, 'fixtures', glob); } describe.skip('directories', function () { beforeEach(function () ...
/* global beforeEach, describe, it */ var watch = require('..'); var join = require('path').join; var fs = require('fs'); var rimraf = require('rimraf'); require('should'); function fixtures(glob) { return join(__dirname, 'fixtures', glob); } describe.skip('directories', function () { beforeEach(function () ...
Add comment in directories test
Add comment in directories test
JavaScript
mit
devm33/gulp-watch,UltCombo/gulp-watch,operatino/gulp-watch,moander/gulp-watch,floatdrop/gulp-watch
cd70ccc9aeb8cb3e26315cd627863ff67e5759f5
rules/inject-local-id.js
rules/inject-local-id.js
/** * Adds the ID of the user object stored on our database * to the token returned from Auth0 */ function (user, context, callback) { var namespace = 'https://techbikers.com/'; context.idToken[namespace + 'user_id'] = user.app_metadata.id; callback(null, user, context); }
/** * Adds the ID of the user object stored on our database * to the token returned from Auth0 */ function (user, context, callback) { var namespace = 'https://techbikers.com/'; // If the user has app_metadata then inject the ID into the token if (user.app_metadata) { context.idToken[namespace + 'user_id'...
Check to make sure app_metadata exists
Check to make sure app_metadata exists There shouldn’t be cases where app_metadata doesn’t exist but if it doesn’t then it will cause an error that prevents the user from being logged in. Signed-off-by: Michael Willmott <4063ad43ea4e0ae77bf35022808393a246bdfa61@gmail.com>
JavaScript
mit
Techbikers/authentication
e4b0d2b5ef01904c7206e855f730a5f3b31a0988
examples/01-add-user.js
examples/01-add-user.js
// use level-dyno and open a new datastore var dyno = require('../level-dyno.js'); var flake = require('flake')('eth0'); // open a new database var db = dyno('/tmp/users'); // do the above sequence db.putItem('chilts', { nick : 'chilts', email : 'me@example.com' }, flake(), function(err) { console.log('putItem():...
// use level-dyno and open a new datastore var dyno = require('../level-dyno.js'); var flake = require('flake')('eth0'); // open a new database var db = dyno('/tmp/users'); var user = 'chilts'; // do the above sequence db.putItem(user, { nick : 'chilts', email : 'me@example.com' }, flake(), function(err) { conso...
Make the example a bit nicer
Make the example a bit nicer
JavaScript
mit
chilts/modb-dyno-leveldb
6bbea72f596cfa83b8cf50d3f546fff1bb3ff900
src/nls/de/urls.js
src/nls/de/urls.js
/* * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the ri...
/* * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the ri...
Add third-party and CC-BY license URLs for 'de' locale
Add third-party and CC-BY license URLs for 'de' locale
JavaScript
mit
Cartman0/brackets,ralic/brackets,MantisWare/brackets,y12uc231/brackets,Mosoc/brackets,iamchathu/brackets,nucliweb/brackets,flukeout/brackets,sophiacaspar/brackets,fronzec/brackets,pkdevbox/brackets,riselabs-ufba/RiPLE-HC-ExperimentalData,zaggino/brackets-electron,mjurczyk/brackets,82488059/brackets,2youyouo2/cocoslite,...
7e84c0227dd793591188454e9cc1e3b63d6b8b9f
examples/example.tls.js
examples/example.tls.js
'use strict'; var spdyPush = require('..') , spdy = require('spdy') , express = require('express') , path = require('path') , fs = require('fs'); var app = express(); app.use(spdyPush.referrer()); app.use(express.static(path.join(__dirname, '../test/site'))); var options = { key: fs.readFileSync(path.join(_...
'use strict'; var spdyPush = require('..') , spdy = require('spdy') , express = require('express') , path = require('path') , fs = require('fs'); var app = express(); app.use(spdyPush.referrer()); app.use(express.static(path.join(__dirname, '../test/site'))); var options = { key: fs.readFileSync(path.join(_...
Fix location of SSL key and certificate
Fix location of SSL key and certificate
JavaScript
mit
halvards/spdy-referrer-push
54315706195e9280beccdaa7e7cffadef1cecdee
website/static/js/filerenderer.js
website/static/js/filerenderer.js
/* * Refresh rendered file through mfr */ 'use strict'; var $ = require('jquery'); var $osf = require('js/osfHelpers'); var FileRenderer = { start: function(url, selector){ this.url = url; this.tries = 0; this.ALLOWED_RETRIES = 10; this.element = $(selector); this.getCac...
/* * Refresh rendered file through mfr */ var $ = require('jquery'); var $osf = require('js/osfHelpers'); function FileRenderer(url, selector) { var self = this; self.url = url; self.tries = 0; self.selector = selector; self.ALLOWED_RETRIES = 10; self.element = $(selector); self.start...
Refactor to OOP ish design
Refactor to OOP ish design
JavaScript
apache-2.0
wearpants/osf.io,monikagrabowska/osf.io,KAsante95/osf.io,cosenal/osf.io,doublebits/osf.io,abought/osf.io,mluo613/osf.io,ticklemepierce/osf.io,GageGaskins/osf.io,billyhunt/osf.io,KAsante95/osf.io,chennan47/osf.io,ZobairAlijan/osf.io,GageGaskins/osf.io,acshi/osf.io,ticklemepierce/osf.io,ckc6cz/osf.io,mluo613/osf.io,bayle...
fb8ff704821e18be2a8aef117f69e32f408cfc5b
models/index.js
models/index.js
/* * Copyright (c) 2014-2020 Bjoern Kimminich. * SPDX-License-Identifier: MIT */ /* jslint node: true */ const fs = require('fs') const path = require('path') const sequelizeNoUpdateAttributes = require('sequelize-noupdate-attributes') const Sequelize = require('sequelize') const sequelize = new Sequelize('database...
/* * Copyright (c) 2014-2020 Bjoern Kimminich. * SPDX-License-Identifier: MIT */ /* jslint node: true */ const fs = require('fs') const path = require('path') const sequelizeNoUpdateAttributes = require('sequelize-noupdate-attributes') const Sequelize = require('sequelize') const sequelize = new Sequelize('database...
Revert SQLite to file-based instead of in-memory
Revert SQLite to file-based instead of in-memory
JavaScript
mit
bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop
2b37f7f163fa4eec831e72e1f876ffad3894e1df
pipeline/app/assets/javascripts/app.js
pipeline/app/assets/javascripts/app.js
'use strict'; var pathwayApp = angular.module('pathwayApp', ['ui.router', 'templates']); pathwayApp.config(function($stateProvider, $urlRouterProvider, $locationProvider) { //Default route $urlRouterProvider.otherwise('/'); $locationProvider.html5Mode(true); $stateProvider .state('home', { url: '/', ...
'use strict'; var pathwayApp = angular.module('pathwayApp', ['ui.router', 'templates']); pathwayApp.config(function($stateProvider, $urlRouterProvider, $locationProvider) { //Default route $urlRouterProvider.otherwise('/'); $locationProvider.html5Mode(true); $stateProvider .state('home', { url: '/', ...
Add logout and register state, remove incorrect templateUrl
Add logout and register state, remove incorrect templateUrl
JavaScript
mit
aattsai/Pathway,aattsai/Pathway,aattsai/Pathway
884def1c71c748655bc294e2b3084c627973a848
test/db-helpers.js
test/db-helpers.js
const fs = require('fs'); const { promisify } = require('util'); const mongodb = require('mongodb'); const request = require('request'); async function readMongoDocuments(file) { const ISODate = (d) => new Date(d); const ObjectId = (id) => mongodb.ObjectID.createFromHexString(id); return eval(await fs.promises.r...
const fs = require('fs'); const { promisify } = require('util'); const mongodb = require('mongodb'); const request = require('request'); async function readMongoDocuments(file) { const ISODate = (d) => new Date(d); const ObjectId = (id) => mongodb.ObjectID.createFromHexString(id); return eval(await fs.promises.r...
Allow importing test data for any db collection
fix(tests): Allow importing test data for any db collection
JavaScript
mit
openwhyd/openwhyd,openwhyd/openwhyd,openwhyd/openwhyd,openwhyd/openwhyd,openwhyd/openwhyd
4a9a3246f633c3ddb358d3e79a38b39bb2a61bb1
src/fetch-error.js
src/fetch-error.js
/** * fetch-error.js * * FetchError interface for operational errors */ /** * Create FetchError instance * * @param String message Error message for human * @param String type Error type for machine * @param String systemError For Node.js system error * @return FetchError...
/** * fetch-error.js * * FetchError interface for operational errors */ /** * Create FetchError instance * * @param String message Error message for human * @param String type Error type for machine * @param String systemError For Node.js system error * @return FetchError...
Remove dependency on Node.js' util module
Remove dependency on Node.js' util module Closes #194.
JavaScript
mit
jkantr/node-fetch,bitinn/node-fetch
8114331a8425621e2eb98f39045289ed08bb2e0d
test/e2e/config/delays.js
test/e2e/config/delays.js
/* * In order to prevent errors caused by e2e tests running too fast you can slow them down by calling the following * function. Use higher values for slower tests. * * utils.delayPromises(30); * */ var promisesDelay = 50; function delayPromises(milliseconds) { var executeFunction = browser.driver.controlFl...
/* * In order to prevent errors caused by e2e tests running too fast you can slow them down by calling the following * function. Use higher values for slower tests. * * utils.delayPromises(30); * */ var promisesDelay = 0; function delayPromises(milliseconds) { var executeFunction = browser.driver.controlFlo...
Set delay to zero for local development.
Set delay to zero for local development.
JavaScript
apache-2.0
codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client
d761c33ce8effc9640fccfb4e409bf6a6ee33a91
util/subtitles.js
util/subtitles.js
const parseTime = (s) => { const re = /(\d{2}):(\d{2}):(\d{2}),(\d{3})/; const [, hours, mins, seconds, ms] = re.exec(s); return 3600*(+hours) + 60*(+mins) + (+seconds) + 0.001*(+ms); }; export const parseSRT = (text) => { const normText = text.replace(/\r\n/g, '\n'); // normalize newlines const re = /(\d+)...
const parseTime = (s) => { const re = /(\d{2}):(\d{2}):(\d{2}),(\d{3})/; const [, hours, mins, seconds, ms] = re.exec(s); return 3600*(+hours) + 60*(+mins) + (+seconds) + 0.001*(+ms); }; export const parseSRT = (text) => { const normText = text.replace(/\r\n/g, '\n'); // normalize newlines const re = /(\d+)...
Trim whitespace on subtitle import
Trim whitespace on subtitle import
JavaScript
mit
rsimmons/voracious,rsimmons/immersion-player,rsimmons/immersion-player,rsimmons/voracious,rsimmons/voracious
de74589c0323ad7d0323345fd9e214fb42498e8c
config/env/production.js
config/env/production.js
/** * Production environment settings * * This file can include shared settings for a production environment, * such as API keys or remote database passwords. If you're using * a version control solution for your Sails app, this file will * be committed to your repository unless you add it to your .gitignore * ...
/** * Production environment settings * * This file can include shared settings for a production environment, * such as API keys or remote database passwords. If you're using * a version control solution for your Sails app, this file will * be committed to your repository unless you add it to your .gitignore * ...
Set port to environment variable.
Set port to environment variable.
JavaScript
mit
aug70/redrum-js-client,aug70/redrum-js-client
e5c01d6b96b1aec411017bf20069d6706623ff60
test/markup-frame-test.js
test/markup-frame-test.js
import React from 'react'; import { expect } from 'chai'; import { mount } from 'enzyme'; import MarkupFrame from '../src'; describe( '<MarkupFrame />', () => { it( 'renders an iframe', () => { const wrapper = mount( <MarkupFrame markup="" /> ); expect( wrapper.some( 'iframe' ) ).to.equal( true ); } ); it( 'in...
import React from 'react'; import { expect } from 'chai'; import { mount } from 'enzyme'; import MarkupFrame from '../src'; describe( '<MarkupFrame />', function() { it( 'renders an iframe', function() { const wrapper = mount( <MarkupFrame markup="" /> ); expect( wrapper.find( 'iframe' ) ).to.have.length( 1 ); }...
Update tests to cover most common cases
Update tests to cover most common cases They don't work, of course, because (I think) some mix of React, jsdom, and iframes don't work correctly together.
JavaScript
mit
sirbrillig/markup-frame
9578954c6b1817ff7a8e8bfa0a4532835c8040e9
client/js/app.js
client/js/app.js
console.log('Tokimeki Memorial');
console.log('Tokimeki Memorial'); var host = window.document.location.host.replace(/:.*/, ''); var ws = new WebSocket('ws://' + host + ':8000'); ws.onmessage = function (event) { //console.log(event); //console.log(JSON.parse(event.data)); };
Make WS connection in index page for testing purposes.
Make WS connection in index page for testing purposes.
JavaScript
apache-2.0
AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers
b8cf678c13325df71135b3e7cc5fc521a3a98b1b
polyfill/fetch.js
polyfill/fetch.js
import "mojave/polyfill/Promise"; import "unfetch/polyfill"; export default window.fetch;
import "mojave/polyfill/promise"; import "unfetch/polyfill"; export default window.fetch;
Fix case of promise polyfill
Fix case of promise polyfill
JavaScript
bsd-3-clause
Becklyn/mojave,Becklyn/mojave,Becklyn/mojave
cc0a3c204f59e1039cad5b592d969fac30c40fbf
src/components/Members/MemberDetail.js
src/components/Members/MemberDetail.js
import React, { Component, PropTypes } from 'react'; class MembersDetail extends Component { render() { const {displayName} = this.props; return ( <div> <h1>{displayName}</h1> </div> ); } } MembersDetail.propTypes = { displayName: PropTypes.string.isRequired, }; export default ...
import React, { Component, PropTypes } from 'react'; class MembersDetail extends Component { render() { const {displayName, image} = this.props; return ( <div> <h1>{displayName}</h1> <img src={image.uri} style={{ display: 'inline-block', paddingRight: '10px', ...
Add image and proptypes for member detail page
Add image and proptypes for member detail page
JavaScript
cc0-1.0
cape-io/acf-client,cape-io/acf-client
d794502bfcc0204aa7fdbe6d9f103a1099919718
kolibri/core/assets/src/state/modules/snackbar.js
kolibri/core/assets/src/state/modules/snackbar.js
export default { state: { isVisible: false, options: { text: '', autoDismiss: true, }, }, getters: { snackbarIsVisible(state) { return state.isVisible; }, snackbarOptions(state) { return state.options; }, }, mutations: { CORE_CREATE_SNACKBAR(state, snack...
export default { state: { isVisible: false, options: { text: '', autoDismiss: true, }, }, getters: { snackbarIsVisible(state) { return state.isVisible; }, snackbarOptions(state) { return state.options; }, }, mutations: { CORE_CREATE_SNACKBAR(state, snack...
Add comment about autodismiss options
Add comment about autodismiss options
JavaScript
mit
lyw07/kolibri,indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,indirectlylit/kolibri,mrpau/kolibri,learningequality/kolibri,indirectlylit/kolibri,lyw07/kolibri,mrpau/kolibri,lyw07/kolibri,indirectlylit/kolibri,learningequality/kolibri,learningequality/kolibri,lyw07/kolibri
23010015c762a1274597e2754d190fabad078cfe
src/components/SearchResultListItem.js
src/components/SearchResultListItem.js
import React from 'react'; import { connect } from 'react-redux'; const DocumentListItem = ({ title, collection, schema }) => ( <tr className={`result result--${schema}`}> <td>{ title }</td> <td className="result__collection">{ collection && collection.label }</td> <td></td> </tr> ); const PersonListI...
import React from 'react'; import { connect } from 'react-redux'; const DocumentListItem = ({ title, collection, schema }) => ( <tr className={`result result--${schema}`}> <td>{ title }</td> <td className="result__collection">{ collection && collection.label }</td> <td></td> </tr> ); const PersonListI...
Add placeholder for loading collection names
Add placeholder for loading collection names
JavaScript
mit
alephdata/aleph,alephdata/aleph,pudo/aleph,pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph
be3331f24e7693c41e012a2eb935d474de224f1f
frontend/web/js/main.js
frontend/web/js/main.js
$(document).ready(function() { $('#global-modal-container').on('show.bs.modal', function (event) { sourceUrl = $(event.relatedTarget).attr('href'); getGlobalModalHtml(sourceUrl); }); }); function getGlobalModalHtml(url) { $.ajax({ url: url, type: "post", success: fu...
$(document).ready(function() { $('#global-modal-container').on('show.bs.modal', function (event) { sourceUrl = $(event.relatedTarget).attr('href'); getGlobalModalHtml(sourceUrl); $('.tooltip').hide(); }); }); function getGlobalModalHtml(url) { $.ajax({ url: url, type...
Hide all tooltips when showing a modal window
Hide all tooltips when showing a modal window
JavaScript
bsd-3-clause
gooGooGaJoob/banthecan,gooGooGaJoob/banthecan,gooGooGaJoob/banthecan
1faf99e332f94ab27fcef68f05ef8760c219bf4c
static-routes/stylesheets.js
static-routes/stylesheets.js
const sass = require('node-sass'); const path = require('path'); const config = require('../config'); const fs = require('fs'); const imdino = require('imdi-no'); const development = config.env === 'development'; module.exports = { "/stylesheets/main.css": function (callback) { const opts = { file: ...
const sass = require('node-sass'); const path = require('path'); const config = require('../config'); const fs = require('fs'); const imdino = require('imdi-no'); const development = config.env === 'development'; module.exports = { "/stylesheets/main.css": function (callback) { const opts = { file: ...
Use require.resolve to locate main.scss
Use require.resolve to locate main.scss
JavaScript
mit
bengler/imdikator,bengler/imdikator
dc50cc1124f8c39b4000eba4d0914191ddd4245a
libs/oada-lib-arangodb/libs/exampledocs/tokens.js
libs/oada-lib-arangodb/libs/exampledocs/tokens.js
module.exports = [ { "_key": "default:token-123", "token": "xyz", "scope": ["oada-rocks:all"], "createTime": 1413831649937, "expiresIn": 60, "user": { "_id": "default:users-frank-123" }, "clientId": "jf93caauf3uzud7f308faesf3@provider.oada-dev.com" } ];
module.exports = [ { "_key": "default:token-123", "token": "xyz", "scope": ["oada.rocks:all"], "createTime": 1413831649937, "expiresIn": 60, "user": { "_id": "default:users-frank-123" }, "clientId": "jf93caauf3uzud7f308faesf3@provider.oada-dev.com" } ];
Add scope to token xyz.
Add scope to token xyz.
JavaScript
apache-2.0
OADA/oada-srvc-docker,OADA/oada-srvc-docker,OADA/oada-srvc-docker,OADA/oada-srvc-docker
ccd35fed533ac20783ccf70a09a81c1aaf611341
templates/javascript/FluxAction.js
templates/javascript/FluxAction.js
'use strict'; var <%= classedName %> = { } <% if (es6) { %> export default <%= classedName %>; <% } else { %>module.exports = <%= classedName %>; <% } %>
'use strict'; var <%= classedName %> = { }; <% if (es6) { %> export default <%= classedName %>; <% } else { %>module.exports = <%= classedName %>; <% } %>
Add missing semicolon to avoid warnings
Add missing semicolon to avoid warnings
JavaScript
mit
mattludwigs/generator-react-redux-kit,mattludwigs/generator-react-redux-kit,react-webpack-generators/generator-react-webpack,newtriks/generator-react-webpack
bd5644d859ccb3639666afe46fda03d3610bb374
public/modules/slideshows/services/slideshows.client.service.js
public/modules/slideshows/services/slideshows.client.service.js
/*global angular*/ (function () { 'use strict'; //Slideshows service used to communicate Slideshows REST endpoints angular.module('slideshows').factory('Slideshows', ['$resource', function ($resource) { return $resource('slideshows/:slideshowId', { slideshow...
/*global angular*/ (function () { 'use strict'; //Slideshows service used to communicate Slideshows REST endpoints angular.module('slideshows').factory('Slideshows', ['$resource', function ($resource) { return $resource('slideshows/:slideshowId', { slideshowId: '@_id' ...
Add name as parameter when geting devices for a slideshow
Add name as parameter when geting devices for a slideshow
JavaScript
mit
tmol/iQSlideShow,tmol/iQSlideShow,tmol/iQSlideShow
dbee31c17ab6f6376683e97cb1904820d37fcd65
website/src/html.js
website/src/html.js
import React from 'react' import PropTypes from 'prop-types' export default function HTML(props) { return ( <html {...props.htmlAttributes}> <head> <meta charSet="utf-8" /> <meta httpEquiv="x-ua-compatible" content="ie=edge" /> <meta ...
import React from 'react' import PropTypes from 'prop-types' export default function HTML(props) { return ( <html {...props.htmlAttributes}> <head> <meta charSet="utf-8" /> <meta httpEquiv="x-ua-compatible" content="ie=edge" /> <meta ...
Revert "Move DocSearch styles before headComponents"
Revert "Move DocSearch styles before headComponents" This reverts commit 1232ccbc0ff6c5d9e80de65cefb352c404973e2f.
JavaScript
mit
spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,honnibal/spaCy
b8f6446ee6a1eb0a149a4f69182f2004b09500ea
app/angular/controllers/games_controller.js
app/angular/controllers/games_controller.js
'use strict'; module.exports = function(app) { app.controller('GamesController', ['$scope', 'UserService', 'FriendService', 'GameService', 'SearchService', function($scope, UserService, FriendService, GameService, SearchService) { let ctrl = this; $scope.FriendService = FriendService; $scope.allFriends ...
'use strict'; module.exports = function(app) { app.controller('GamesController', ['$scope', 'UserService', 'FriendService', 'GameService', 'SearchService', function($scope, UserService, FriendService, GameService, SearchService) { let ctrl = this; $scope.FriendService = FriendService; $scope.allFriends ...
Remove catch from createGame method. Errors are handled by service layer of app.
Remove catch from createGame method. Errors are handled by service layer of app.
JavaScript
mit
sendjmoon/GolfFourFriends,sendjmoon/GolfFourFriends
2acffe782320c79648816c3a181138b71babb60c
config/webpack.common.js
config/webpack.common.js
const webpack = require('webpack'); const helpers = require('./helpers'); module.exports = { entry: { 'index': './src/index.js', // 'test': './src/test.js' }, output: { path: helpers.root('dist'), filename: '[name].js', chunkFilename: '[id].chunk.js', libraryTar...
const webpack = require('webpack'); const helpers = require('./helpers'); module.exports = { entry: { 'index': './src/index.js', // 'test': './src/test.js' }, output: { path: helpers.root('dist'), filename: '[name].js', chunkFilename: '[id].chunk.js', libraryTar...
Update UMD Named define to true
Update UMD Named define to true
JavaScript
mit
maniator/servable,maniator/servable
fc2c58045d1015187ab6c9cad4532238e6c90736
next-migrations/src/migrations/20180605215102_users.js
next-migrations/src/migrations/20180605215102_users.js
exports.up = function(knex, Promise) { return Promise.all([ knex.schema.createTable('next_users', table => { table.bigIncrements() table.string('email') table.string('name') table.string('password') table.string('origin') table.string('baseurl') table.string('phone') ...
exports.up = function(knex, Promise) { return Promise.all([ knex.schema.createTable('next_users', table => { table.bigIncrements() table.string('email') table.string('name') table.string('password') table.string('origin') table.string('baseurl') table.string('phone') ...
Revert to using timestamps in database.
TeikeiNext: Revert to using timestamps in database.
JavaScript
agpl-3.0
teikei/teikei,teikei/teikei,teikei/teikei
aecf231cb6310fba9af5a07ffbcced2e084a799d
config/ember-try.js
config/ember-try.js
module.exports = { scenarios: [ { name: 'default', dependencies: { } }, { name: 'ember-release', dependencies: { 'ember': 'components/ember#release' }, resolutions: { 'ember': 'release' } }, { name: 'ember-beta', dependencies: {...
module.exports = { scenarios: [ { name: 'default', dependencies: { } }, { name: 'ember 1.13', dependencies: { 'ember': '1.13.8' }, resolutions: { 'ember': '1.13.8' } }, { name: 'ember-release', dependencies: { 'ember': '...
Add 1.13 to the test matrix
Add 1.13 to the test matrix
JavaScript
mit
cibernox/ember-power-select,chrisgame/ember-power-select,cibernox/ember-power-select,cibernox/ember-power-select,Dremora/ember-power-select,chrisgame/ember-power-select,esbanarango/ember-power-select,cibernox/ember-power-select,esbanarango/ember-power-select,Dremora/ember-power-select,esbanarango/ember-power-select
38aa4dc763e6903cce4ee66c4cbdfdd104b05cd7
config/processes.js
config/processes.js
'use strict'; const config = {}; /** * Heroku makes it available to help calculate correct concurrency * @see https://devcenter.heroku.com/articles/node-concurrency#tuning-the-concurrency-level */ config.memoryAvailable = parseInt(process.env.MEMORY_AVAILABLE, 10); /** * Expected MAX memory footprint of a single c...
'use strict'; const config = {}; /** * Heroku makes it available to help calculate correct concurrency * @see https://devcenter.heroku.com/articles/node-concurrency#tuning-the-concurrency-level */ config.memoryAvailable = parseInt(process.env.MEMORY_AVAILABLE, 10); /** * Expected MAX memory footprint of a single c...
Load test 170 per process
Load test 170 per process
JavaScript
mit
DoSomething/gambit,DoSomething/gambit
405acc213c0861d4aab21a568c5419d4a48a2b57
test/testHelper.js
test/testHelper.js
require("babel/register")({ stage: 1, ignore: /node_modules/ }); global.Promise = require('bluebird') global.Promise.onPossiblyUnhandledRejection((e) => { throw e; }); global.Promise.config({ // Enable warnings. warnings: false, // Enable long stack traces. longStackTraces: true, // Enable cancellation....
require("babel/register")({ stage: 1, ignore: /node_modules/ }); global.Promise = require('bluebird') global.Promise.onPossiblyUnhandledRejection((e) => { throw e; }); global.Promise.config({ // Enable warnings. warnings: false, // Enable long stack traces. longStackTraces: true, // Enable cancellation....
Add postgres connection and knex to global test variables.
Add postgres connection and knex to global test variables.
JavaScript
mit
golozubov/freefeed-server,golozubov/freefeed-server,SiTLar/freefeed-server,FreeFeed/freefeed-server,FreeFeed/freefeed-server,SiTLar/freefeed-server
79865e36fa70a52d04f586b24da14a216b883432
test/media-test.js
test/media-test.js
/* Global Includes */ var testCase = require('mocha').describe; var pre = require('mocha').before; var preEach = require('mocha').beforeEach; var post = require('mocha').after; var postEach = require('mocha').afterEach; var assertions = require('mocha').it; var assert = require('chai').assert; v...
/* Global Includes */ var testCase = require('mocha').describe; var pre = require('mocha').before; var preEach = require('mocha').beforeEach; var post = require('mocha').after; var postEach = require('mocha').afterEach; var assertions = require('mocha').it; var assert = require('chai').assert; v...
Use time duration of test to measure the success
Media: Use time duration of test to measure the success Signed-off-by: Vaibhav Singh <c267fbcdc94c01eb807238c388b92f321583d99b@samsung.com>
JavaScript
mit
hoondol/artik-sdk,hoondol/artik-sdk
a16b17307bd5658f6ce9eaea4002e7860cea908b
webpack.config.js
webpack.config.js
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // <https://www.apache.org/licenses/LICENSE-2.0> // // Unless required by applicable law or agreed to i...
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // <https://www.apache.org/licenses/LICENSE-2.0> // // Unless required by applicable law or agreed to i...
Support older JavaScript engine shells.
Support older JavaScript engine shells.
JavaScript
apache-2.0
v8/promise-performance-tests
d251916fa362ce6064bbcef28eaa009294e2271a
app/components/summer-note.js
app/components/summer-note.js
/* This is just a proxy file requiring the component from the /addon folder and making it available to the dummy application! */ import SummerNoteComponent from 'ember-cli-bootstrap3-wysiwyg/components/bs-wysihtml5'; export default SummerNoteComponent;
/* This is just a proxy file requiring the component from the /addon folder and making it available to the dummy application! */ import SummerNoteComponent from 'ember-cli-summernote/components/summer-note'; export default SummerNoteComponent;
Fix the import path error.
Fix the import path error.
JavaScript
mit
Flightlogger/ember-cli-summernote,brett-anderson/ember-cli-summernote,vsymguysung/ember-cli-summernote,Flightlogger/ember-cli-summernote,wzowee/ember-cli-summernote,wzowee/ember-cli-summernote,emoryy/ember-cli-summernote,vsymguysung/ember-cli-summernote,emoryy/ember-cli-summernote,brett-anderson/ember-cli-summernote
9a521faa76fd26b762f7b45096d5dc8ec1608429
assets/js/vendor/sb-admin-2.js
assets/js/vendor/sb-admin-2.js
$(function() { $('#side-menu').metisMenu(); }); //Loads the correct sidebar on window load, //collapses the sidebar on window resize. // Sets the min-height of #page-wrapper to window size $(function() { $(window).bind("load resize", function() { topOffset = 50; width = (this.window.innerWidt...
$(function() { $('#side-menu').metisMenu(); }); //Loads the correct sidebar on window load, //collapses the sidebar on window resize. // Sets the min-height of #page-wrapper to window size $(function() { $(window).bind("load resize", function() { topOffset = 50; width = (this.window.innerWidt...
Fix highlighting of menu points for sub-routes.
Fix highlighting of menu points for sub-routes.
JavaScript
mit
kumpelblase2/modlab,kumpelblase2/modlab
3ba0a0fd6bacacb7328fbab9ef335d7697ebb1cb
js/lowlight.js
js/lowlight.js
"use strict"; /* NOT a general purpose escaper! Only valid when *content* of a tag, not within an attribute. */ function escape(code) { return code .replace("&", "&amp;", "g") .replace("<", "&lt;", "g") .replace(">", "&gt;", "g"); } function lowlight(lang, lexer, code) { var ret = "...
"use strict"; /* NOT a general purpose escaper! Only valid when *content* of a tag, not within an attribute. */ function escape(code) { return code .replace("&", "&amp;", "g") .replace("<", "&lt;", "g") .replace(">", "&gt;", "g"); } function lowlight(lang, lexer, code) { var ret = "...
Add span content as content attribute
Add span content as content attribute This allows styles to use it in CSS `.foo[content*=bar]` selectors.
JavaScript
apache-2.0
lucaswerkmeister/ColorTrompon,lucaswerkmeister/ColorTrompon
707e854d6213dd9580c22a08a7e694f3923c723d
src/url_handler.js
src/url_handler.js
import { flashURLHandler } from './urlhandlers/flash_url_handler'; import { nodeURLHandler } from './urlhandlers/mock_node_url_handler'; import { XHRURLHandler } from './urlhandlers/xhr_url_handler'; function get(url, options, cb) { // Allow skip of the options param if (!cb) { if (typeof options === 'function...
import { flashURLHandler } from './urlhandlers/flash_url_handler'; import { nodeURLHandler } from './urlhandlers/mock_node_url_handler'; import { XHRURLHandler } from './urlhandlers/xhr_url_handler'; function get(url, options, cb) { // Allow skip of the options param if (!cb) { if (typeof options === 'function...
Remove useless check from default urlhandler
[util] Remove useless check from default urlhandler
JavaScript
mit
dailymotion/vast-client-js
f5078515f9eea811adb79def7748350c37306c0a
packages/react-hot-boilerplate/webpack.config.js
packages/react-hot-boilerplate/webpack.config.js
var webpack = require('webpack'); module.exports = { devtool: 'eval', entry: [ 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server', './scripts/index' ], output: { path: __dirname + '/scripts/', filename: 'bundle.js', publicPath: '/scripts/' }, plugins: [...
var path = require('path'); var webpack = require('webpack'); module.exports = { devtool: 'eval', entry: [ 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server', './scripts/index' ], output: { path: path.join(__dirname, 'build'), filename: 'bundle.js', publicP...
Use include over exclude so npm link works
Use include over exclude so npm link works
JavaScript
mit
gaearon/react-hot-loader,gaearon/react-hot-loader
fa03a474f29e26078d0a9cd8700eca18c3107e50
js/stopwatch.js
js/stopwatch.js
(function(stopwatch){ var Game = stopwatch.Game = function(seconds){ this.target = 1000 * seconds; // in milliseconds }; Game.prototype.current = function(){ return 0; }; }; var GameView = stopwatch.GameView = function(game, container){ this.game = game; this.con...
(function(stopwatch){ var Game = stopwatch.Game = function(seconds){ this.target = 1000 * seconds; // in milliseconds this.started = false; this.stopped = false; }; Game.prototype.current = function(){ if (this.started) { return (this.stopped ? this.stopTime: this...
Create a start and stop method
Create a start and stop method
JavaScript
mit
dvberkel/StopWatch,dvberkel/StopWatch
3c9cf063b0578c85362a81d76b5e84bb6faae9b2
const_and_let.js
const_and_let.js
#!/usr/bin/env node const constMessage = "Hello, World!"; console.log(constMessage); let letMessage = "Hello, World!"; console.log(letMessage); letMessage = "Goodbye, World!"; console.log(letMessage);
#!/usr/bin/env node const constMessage = "Hello, World!"; console.log(constMessage); let letMessage = "Hello, World!"; console.log(letMessage); letMessage = "Goodbye, World!"; console.log(letMessage); const é = "Accented"; console.log(é); const 学习 = "Learn"; console.log(学习); // const ∃ = "There exists"; CRASH // con...
Add weird variable names to let and const example
Add weird variable names to let and const example
JavaScript
apache-2.0
peopleware/js-training-node-scripting,peopleware/js-training-node-scripting
06f6f2ff1dc60897f707e8a482a8ff1084ae8f7a
src/components/user/repo/trashbin.repo.js
src/components/user/repo/trashbin.repo.js
const { model: trashbinModel } = require('./db/trashbin.schema'); const createUserTrashbin = (userId) => { // access trashbin model const trashbin = trashbinModel({ userId, }); return trashbin.save(); }; const updateUserTrashbin = (userId, data = {}) => { // access trashbin model return trashbinModel.updateOn...
const { model: trashbinModel } = require('./db/trashbin.schema'); const createUserTrashbin = (userId) => { // access trashbin model const trashbin = trashbinModel({ userId, }); return trashbin.save(); }; const updateUserTrashbin = async (id, data = {}) => { // access trashbin model const trashbin = await tras...
Use Mongoose functions for updating
Use Mongoose functions for updating
JavaScript
agpl-3.0
schul-cloud/schulcloud-server,schul-cloud/schulcloud-server,schul-cloud/schulcloud-server
2f5b013afcc40bd90ba26aed33c9c5c142237016
packages/soya-next/src/pages/createBasePage.js
packages/soya-next/src/pages/createBasePage.js
import React from "react"; import { compose } from "react-apollo"; import hoistStatics from "hoist-non-react-statics"; import BaseProvider from "../components/BaseProvider"; import applyRedirect from "../router/applyRedirect"; import withCookies from "../cookies/withCookiesPage"; import withLocale from "../i18n/withLoc...
import React from "react"; import { compose } from "redux"; import hoistStatics from "hoist-non-react-statics"; import BaseProvider from "../components/BaseProvider"; import applyRedirect from "../router/applyRedirect"; import withCookies from "../cookies/withCookiesPage"; import withLocale from "../i18n/withLocalePage...
Replace react-apollo with redux compose
Replace react-apollo with redux compose
JavaScript
mit
traveloka/soya-next
015f85622b33df01971ffc784f0f7594da30c889
app/controllers/name.controller.js
app/controllers/name.controller.js
'use strict'; angular.module('houseBand') .controller('NameCtrl', function($state){ this.roomCheck = function(room){ if(room){ return $state.go('home', {room: room}) } alert('Please name your band') return false } });
'use strict'; angular.module('houseBand') .controller('NameCtrl', function($state){ this.roomCheck = function(room){ if(room){ return $state.go('home', {room: room.toLowerCase()}) } alert('Please name your band'); return false } });
Make room name lower case
Make room name lower case
JavaScript
mit
HouseBand/client,HouseBand/client
55e138a77becada80430cc7795bbb6bd23a66843
lib/index.js
lib/index.js
'use strict'; module.exports = (...trackers) => { const tracker = {}; tracker.createEvent = (eventName, eventData) => { trackers.forEach((tk) => { tk.createEvent(eventName, eventData); }); return tracker; }; return tracker; };
'use strict'; module.exports = function eventTracker() { const tracker = {}; const trackers = Array.prototype.slice.call(arguments); tracker.createEvent = (eventName, eventData) => { trackers.forEach((tk) => { tk.createEvent(eventName, eventData); }); return tracker; }; return tracker; };
Remove destructuring and add arguments
Remove destructuring and add arguments
JavaScript
mit
ZimpFidelidade/universal-event-tracker
9f8fa2f067e7b91cac796268dbabacdce5a3fc6c
test/boost-field-test.js
test/boost-field-test.js
var mongoose = require('mongoose') , elastical = require('elastical') , esClient = new(require('elastical').Client) , should = require('should') , config = require('./config') , Schema = mongoose.Schema , ObjectId = Schema.ObjectId , mongoosastic = require('../lib/mongoosastic'); var TweetSc...
var mongoose = require('mongoose') , elastical = require('elastical') , esClient = new(require('elastical').Client) , should = require('should') , config = require('./config') , Schema = mongoose.Schema , ObjectId = Schema.ObjectId , mongoosastic = require('../lib/mongoosastic'); var TweetSc...
Correct boost test field (support ES 0.9 and 1.0).
Correct boost test field (support ES 0.9 and 1.0). In my tests, the mapping format returned by the getMapping function is not the same between 0.90.11 and 1.0
JavaScript
mit
mongoosastic/mongoosastic,teambition/mongoosastic,ennosol/mongoosastic,francesconero/mongoosastic,ennosol/mongoosastic,guumaster/mongoosastic,francesconero/mongoosastic,mongoosastic/mongoosastic,avastms/mongoosastic,guumaster/mongoosastic,teambition/mongoosastic,mallzee/mongoosastic,guumaster/mongoosastic,mallzee/mongo...
1569457c708195ea017fb047beab7ade7ed918ab
common/components/constants/ProjectConstants.js
common/components/constants/ProjectConstants.js
export const Locations = { OTHER: "Other", PRESET_LOCATIONS: [ "Seattle, WA", "Redmond, WA", "Kirkland, WA", "Bellevue, WA", "Tacoma, WA", "Olympia, WA", "Bay Area, CA", "Baltimore, MD", "Other" ] };
export const Locations = { OTHER: "Other", PRESET_LOCATIONS: [ "Seattle, WA", "Redmond, WA", "Kirkland, WA", "Bellevue, WA", "Tacoma, WA", "Olympia, WA", "Portland, OR", "Bay Area, CA", "Baltimore, MD", "Other" ] };
Add Portland, OR to location list
Add Portland, OR to location list
JavaScript
mit
DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange
38eb816b54300fec9ccf2ed3978f0dc66624981a
lib/index.js
lib/index.js
module.exports = { 'Unit': require('./unit'), 'Lexer': require('./lexer'), };
module.exports = { // Objects 'Unit': require('./unit'), 'Lexer': require('./lexer'), // Methods 'math': require('./math'), };
Add math & clean up.
Add math & clean up.
JavaScript
mit
jamen/craze
51ca67b91d6256ce48171b912e649a08ec7638c1
cosmoz-bottom-bar-view.js
cosmoz-bottom-bar-view.js
/*global Polymer, Cosmoz*/ (function () { 'use strict'; Polymer({ is: 'cosmoz-bottom-bar-view', behaviors: [ Cosmoz.ViewInfoBehavior, Polymer.IronResizableBehavior ], properties: { overflowing: { type: Boolean, value: false, reflectToAttribute: true }, scroller: { type: ...
/*global Polymer, Cosmoz*/ (function () { 'use strict'; Polymer({ is: 'cosmoz-bottom-bar-view', behaviors: [ Cosmoz.ViewInfoBehavior, Polymer.IronResizableBehavior ], properties: { overflowing: { type: Boolean, value: false, reflectToAttribute: true }, scroller: { type: ...
Fix bug where the placeholder would flex out
Fix bug where the placeholder would flex out Might be related to shady DOM or <slot> hybrid mode.
JavaScript
apache-2.0
Neovici/cosmoz-bottom-bar,Neovici/cosmoz-bottom-bar
aea77bd5b10e00005b0df08bd59ac427e19c4f89
karma.conf.js
karma.conf.js
module.exports = function(config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: './', // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ['jasmine'], // list of files / patterns to...
module.exports = function(config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: './', // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ['jasmine'], // list of files / patterns to...
Use Phantom JS alone for speed and ease.
Use Phantom JS alone for speed and ease.
JavaScript
mit
blinkboxbooks/marvin-frontend.js
d1c78416c722a0cf8e1107c8b3a640129f19197a
js/lib/get-absolute-url.js
js/lib/get-absolute-url.js
export function getAbsoluteUrl({ path, getSassFileGlobPattern, glob }, url, includePaths = []) { const { dir, base } = path.parse(url); const baseGlobPattern = getSassFileGlobPattern(base); includePaths.some((includePath) => { glob.sync(path.resolve(includePath, dir, baseGlobPattern)); return false; });...
import globModule from 'glob'; import pathModule from 'path'; import getSassFileGlobPatternModule from './get-sass-file-glob-pattern'; export function getAbsoluteUrl({ path, getSassFileGlobPattern, glob }, url, includePaths = []) { const { dir, base } = path.parse(url); const baseGlobPattern = getSassFileGlobPatt...
Implement the simplified testable module pattern.
Implement the simplified testable module pattern. Read more about the pattern here: https://markus.oberlehner.net/blog/2017/02/the-testable-module-pattern/
JavaScript
mit
maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer
72b517762e82d421e989f5c30b30c8f7ce18f013
test/test.js
test/test.js
'use strict'; var grunt = require('grunt'); /** * Constructs a test case. * * @param {string} file The `package.json` file to be tested. * @param {boolean} valid Flag indicating whether the test is * expected to pass. * @param {Array} [args] ...
'use strict'; var grunt = require('grunt'); /** * Constructs a test case. * * @param {string} file The `package.json` file to be tested. * @param {boolean} valid Flag indicating whether the test is * expected to pass. * @param {Array} [args] ...
Use `ifError` assertion instead of `equal`.
Use `ifError` assertion instead of `equal`.
JavaScript
mit
joshuaspence/grunt-npm-validate
dda90c0bcf7f32e70d9143327bd8e0d91e5a6f00
lib/index.js
lib/index.js
/** * dubdrop compatible task for reading an image file and creating a thumbnail. * * @package thumbdrop * @author drk <drk@diy.org> */ // readAsDataURL /** * Constructor */ function createThumbdrop (_callback) { return function thumbdrop (file, callback) { var reader = new FileReader(); r...
/** * dubdrop compatible task for reading an image file and creating a thumbnail. * * @package thumbdrop * @author drk <drk@diy.org> */ // readAsDataURL /** * Constructor */ function createThumbdrop (callback) { return function thumbdrop (file) { var reader = new FileReader(); reader.onloa...
Remove async handling to comply w/ dubdrop 0.0.3
Remove async handling to comply w/ dubdrop 0.0.3
JavaScript
mit
derekr/thumbdrop
eaef0b0012eacbb4994345fd0f45e6e54e58e583
lib/index.js
lib/index.js
'use strict' let consistentEnv module.exports = function() { if (!consistentEnv) { consistentEnv = require('consistent-env') } return consistentEnv().PATH || '' } module.exports.async = function() { if (!consistentEnv) { consistentEnv = require('consistent-env') } return consistentEnv.async().the...
'use strict' let consistentEnv module.exports = function() { if (process.platform === 'win32') { return process.env.PATH || process.env.Path } if (!consistentEnv) { consistentEnv = require('consistent-env') } return consistentEnv().PATH || '' } module.exports.async = function() { if (process.plat...
Handle different names of PATH on windows
:bug: Handle different names of PATH on windows
JavaScript
mit
steelbrain/consistent-path
51ffd24a0035fe03157ad34e4a0c014e2a4fda04
lib/index.js
lib/index.js
'use strict'; var rump = module.exports = require('rump'); var configs = require('./configs'); var originalAddGulpTasks = rump.addGulpTasks; rump.addGulpTasks = function(options) { originalAddGulpTasks(options); require('./gulp'); return rump; }; rump.on('update:main', function() { configs.rebuild(); rump....
'use strict'; var rump = module.exports = require('rump'); var configs = require('./configs'); var originalAddGulpTasks = rump.addGulpTasks; // TODO remove on next major core update rump.addGulpTasks = function(options) { originalAddGulpTasks(options); require('./gulp'); return rump; }; rump.on('update:main', ...
Handle future event emit for gulp tasks
Handle future event emit for gulp tasks
JavaScript
mit
rumps/rump-less
3e96edbd86dc6f233d34edfcf3d57de693a202ac
lib/index.js
lib/index.js
var mongoose = require('mongoose'); var ShortId = require('./shortid'); var defaultSave = mongoose.Model.prototype.save; mongoose.Model.prototype.save = function(cb) { for (fieldName in this.schema.tree) { if (this.isNew && this[fieldName] === undefined) { var idType = this.schema.tree[fieldName]; ...
var mongoose = require('mongoose'); var ShortId = require('./shortid'); var defaultSave = mongoose.Model.prototype.save; mongoose.Model.prototype.save = function(cb) { for (key in this.schema.tree) { var fieldName = key if (this.isNew && this[fieldName] === undefined) { var idType = this.schema.tree[...
Create a variable in scope to avoid being override
Create a variable in scope to avoid being override
JavaScript
mit
jjwchoy/mongoose-shortid,dashersw/mongoose-shortid,jouke/mongoose-shortid,hoist/mongoose-shortid
43fbb8eddf92a3e6b0fd7125b8e91537f6d21445
lib/index.js
lib/index.js
var createJob = require('./createJob'); module.exports = function (sails) { return { jobs: {}, defaults: {cron: {}}, initialize: function (cb) { var config = sails.config.cron; var tasks = Object.keys(config); tasks.forEach(function (time) { this.jobs[time] = createJob({ ...
var createJob = require('./createJob'); module.exports = function (sails) { return { jobs: {}, defaults: {cron: {}}, initialize: function (cb) { var config = sails.config.cron; var tasks = Object.keys(config); tasks.forEach(function (name) { this.jobs[name] = createJob({ ...
Replace schedule as a key with named job
Replace schedule as a key with named job
JavaScript
mit
ghaiklor/sails-hook-cron
5056f8a50db6d6d17d1b29428fdc90f3abe92a1e
karma.conf.js
karma.conf.js
module.exports = function(config) { config.set({ frameworks: ['jasmine', 'browserify'], files: [ 'test/**/*.js' ], preprocessors: { 'test/**/*.js': ['browserify'] }, browsers: ['PhantomJS'], browserify: { debug: true ...
module.exports = function(config) { config.set({ frameworks: ['jasmine', 'browserify'], files: [ 'test/**/*.js' ], preprocessors: { 'test/**/*.js': ['browserify'] }, browsers: ['PhantomJS'], browserify: { debug: true ...
Update karma, it will run once with npm test
Update karma, it will run once with npm test
JavaScript
mit
vudduu/key-enum
98add101bfda0dd235f2675cfd9ffff04e56b9ba
test/acceptance/global.nightwatch.js
test/acceptance/global.nightwatch.js
module.exports = { waitForConditionPollInterval: 1000, waitForConditionTimeout: 6000, pauseDuration: 5000, retryAssertionTimeout: 2500, }
module.exports = { waitForConditionPollInterval: 2000, waitForConditionTimeout: 12000, pauseDuration: 7500, retryAssertionTimeout: 5000, }
Increase timeouts to improve test runs
Increase timeouts to improve test runs Attempts to address issue with a high perecentage of acceptance test runs failing.
JavaScript
mit
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
ba17d882e72582d5396fa3a3dfb6292656f63b30
lib/index.js
lib/index.js
'use strict'; // VARIABLES // var FLOAT32_VIEW = new Float32Array( 1 ); var UINT32_VIEW = new Uint32Array( FLOAT32_VIEW.buffer ); // 0 11111111 00000000000000000000000 => 2139095040 => 0x7f800000 var PINF = 0x7f800000; // Set the ArrayBuffer bit sequence: UINT32_VIEW[ 0 ] = PINF; // EXPORTS // module.exports = F...
'use strict'; // VARIABLES // var FLOAT32_VIEW = new Float32Array( 1 ); var UINT32_VIEW = new Uint32Array( FLOAT32_VIEW.buffer ); // 0 11111111 00000000000000000000000 => 2139095040 => 0x7f800000 (see IEEE 754-2008) var PINF = 0x7f800000; // Set the ArrayBuffer bit sequence: UINT32_VIEW[ 0 ] = PINF; // EXPORTS //...
Add code comment re: IEEE 754-2008
Add code comment re: IEEE 754-2008
JavaScript
mit
const-io/pinf-float32
edca7f5559e256606c7bc4ece9ffcf1f845c8ee7
src/c/big-input-card.js
src/c/big-input-card.js
import m from 'mithril'; const bigInputCard = { view(ctrl, args) { const cardClass = '.w-row.u-marginbottom-30.card.card-terciary.padding-redactor-description.text.optional.project_about_html.field_with_hint'; return m(cardClass, [ m('div', [ m('label.field-label.fontwe...
import m from 'mithril'; const bigInputCard = { view(ctrl, args) { const cardClass = args.cardClass || '.w-row.u-marginbottom-30.card.card-terciary.padding-redactor-description.text.optional.project_about_html.field_with_hint'; return m(cardClass, {style: (args.cardStyle||{})}, [ m('di...
Adjust bigInputCard to receive a cardStyle and cardClass args
Adjust bigInputCard to receive a cardStyle and cardClass args
JavaScript
mit
catarse/catarse_admin,vicnicius/catarse_admin,vicnicius/catarse.js,mikesmayer/cs2.js,catarse/catarse.js,sushant12/catarse.js
8cdbc23c71c69d628b9f034c11727423c218cf87
db/migrations/20131216232955-external-transactions.js
db/migrations/20131216232955-external-transactions.js
var dbm = require('db-migrate'); var type = dbm.dataType; exports.up = function(db, callback) { db.createTable('bank_transactions', { id: { type: 'int', primaryKey: true, autoIncrement: true }, deposit: { type: 'boolean', notNull: true }, currency: { type: 'string', notNull: true }, cashAmount: { type...
var dbm = require('db-migrate'); var type = dbm.dataType; exports.up = function(db, callback) { db.createTable('external_transactions', { id: { type: 'int', primaryKey: true, autoIncrement: true }, deposit: { type: 'boolean', notNull: true }, currency: { type: 'string', notNull: true }, cashAmount: { ...
Change accountId to externalAccountId in external transactions migration
[FEATURE] Change accountId to externalAccountId in external transactions migration
JavaScript
isc
whotooktwarden/gatewayd,zealord/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,Parkjeahwan/awegeeks,crazyquark/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,crazyquark/gatewayd,zealord/gatewayd
04182efe223fb18e3678615c024ed3ecd806afb9
packages/nova-core/lib/containers/withMutation.js
packages/nova-core/lib/containers/withMutation.js
/* HoC that provides a simple mutation that expects a single JSON object in return Example usage: export default withMutation({ name: 'getEmbedlyData', args: {url: 'String'}, })(EmbedlyURL); */ import { graphql } from 'react-apollo'; import gql from 'graphql-tag'; export default function withMutation({name, a...
/* HoC that provides a simple mutation that expects a single JSON object in return Example usage: export default withMutation({ name: 'getEmbedlyData', args: {url: 'String'}, })(EmbedlyURL); */ import { graphql } from 'react-apollo'; import gql from 'graphql-tag'; export default function withMutation({name, a...
Make mutation hoc accept mutations without arguments
Make mutation hoc accept mutations without arguments
JavaScript
mit
manriquef/Vulcan,SachaG/Zensroom,SachaG/Gamba,bshenk/projectIterate,manriquef/Vulcan,rtluu/immersive,HelloMeets/HelloMakers,dominictracey/Telescope,bshenk/projectIterate,Discordius/Telescope,acidsound/Telescope,dominictracey/Telescope,SachaG/Gamba,VulcanJS/Vulcan,Discordius/Lesswrong2,acidsound/Telescope,Discordius/Les...
23737870dcc77538cf7a094d4f5521c8580f965b
lib/models/UserInstance.js
lib/models/UserInstance.js
/* WePay API for Node.js * (c)2012 Matt Farmer * Release without warranty under the terms of the * Apache License. For more details, see the LICENSE * file at the root of this project. */ var UserInstance = function(params) { //TODO } module.exports = UserInstance;
/* WePay API for Node.js * (c)2012 Matt Farmer * Release without warranty under the terms of the * Apache License. For more details, see the LICENSE * file at the root of this project. */ var UserInstance = function(params) { // Populate any params passed in. if (params && ! params instanceof Object) throw ...
Implement the User instance constructor.
Implement the User instance constructor.
JavaScript
apache-2.0
farmdawgnation/wepay-api-node
b27452b32f6be2bb6544833b422b60a9f1d00e0c
generators/app/templates/gulp_tasks/systemjs.js
generators/app/templates/gulp_tasks/systemjs.js
const gulp = require('gulp'); const replace = require('gulp-replace'); const Builder = require('jspm').Builder; const conf = require('../conf/gulp.conf'); gulp.task('systemjs', systemjs); gulp.task('systemjs:html', updateIndexHtml); function systemjs(done) { const builder = new Builder('./', 'jspm.config.js'); ...
const gulp = require('gulp'); const replace = require('gulp-replace'); const Builder = require('jspm').Builder; const conf = require('../conf/gulp.conf'); gulp.task('systemjs', systemjs); gulp.task('systemjs:html', updateIndexHtml); function systemjs(done) { const builder = new Builder('./', 'jspm.config.js'); ...
Remove jspm scripts on build
Remove jspm scripts on build
JavaScript
mit
FountainJS/generator-fountain-systemjs,FountainJS/generator-fountain-systemjs
827eb5533a6e7f967a40f82871647902dc6b833b
karma.conf.js
karma.conf.js
const base = require('skatejs-build/karma.conf'); module.exports = function (config) { base(config); // Remove all explicit IE definitions. config.browsers = config.browsers.filter(name => !/^internet_explorer/.test(name)); // Only test IE latest. config.browsers.push('internet_explorer_11'); // Shims fo...
const base = require('skatejs-build/karma.conf'); module.exports = function (config) { base(config); // Setup IE if testing in SauceLabs. if (config.sauceLabs) { // Remove all explicit IE definitions. config.browsers = config.browsers.filter(name => !/^internet_explorer/.test(name)); // Only test IE...
Fix tests so that it only tries to run IE11 if running in Sauce Labs.
chore(test): Fix tests so that it only tries to run IE11 if running in Sauce Labs. For some reason it just started happening that it would try to run IE11 outside of Sauce Labs.
JavaScript
mit
chrisdarroch/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,skatejs/skatejs