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
e3adf790c0b87f32b83f9b1199268ab8374c9eb8
src/components/DeviceChart.js
src/components/DeviceChart.js
import React, { PropTypes } from 'react'; import rd3 from 'rd3'; const BarChart = rd3.BarChart; const barData = [ { name: 'Series A', values: [ { x: 1, y: 91 }, { x: 2, y: 290 }, { x: 3, y: 30 }, { x: 4, y: 50 }, { x: 5, y: 90 }, { x: 6, y: 100 }, ], }, ]; export cl...
import React, { PropTypes } from 'react'; import rd3 from 'rd3'; const BarChart = rd3.BarChart; export class DeviceChart extends React.Component { constructor(props) { super(props); this.state = { barData: [ { values: [ { x: 1, y: 91 }, { x: 2, y: 290 }, ...
Add data to bar chart
Add data to bar chart
JavaScript
mit
Bucko13/kinects-it,brnewby602/kinects-it,brnewby602/kinects-it,Kinectsit/kinects-it,Bucko13/kinects-it,Kinectsit/kinects-it
d0eace4d14f980d2afd1d8967b0cc9a9cd9a4468
lib/core/config.js
lib/core/config.js
var async = require('async'); var _ = require('lodash'); var readTOML = require('./utils').readTOML; var fileExists = require('./utils').fileExists; var defaults = { account: { username: 'admin', password: 'password', channel: '#riotgames' }, irc: { address: '199.9.253.199' }, server: { ...
var async = require('async'); var _ = require('lodash'); var readTOML = require('./utils').readTOML; var fileExists = require('./utils').fileExists; var defaults = { account: { username: 'admin', password: 'password', channel: '#riotgames' }, irc: { address: '199.9.253.199' }, server: { ...
Fix incorrect use of `_.defaults`
Fix incorrect use of `_.defaults`
JavaScript
mit
KenanY/nwitch
2b86f1e677ff9630159f264d4d89ca73b9fbfd9f
apps/federatedfilesharing/js/settings-admin.js
apps/federatedfilesharing/js/settings-admin.js
$(document).ready(function() { $('#fileSharingSettings input').change(function() { var value = 'no'; if (this.checked) { value = 'yes'; } OC.AppConfig.setValue('files_sharing', $(this).attr('name'), value); }); $('.section .icon-info').tipsy({gravity: 'w'}); });
$(document).ready(function() { $('#fileSharingSettings input').change(function() { var value = 'no'; if (this.checked) { value = 'yes'; } OC.AppConfig.setValue('files_sharing', $(this).attr('name'), value); }); });
Remove unneeded usage of tipsy
Remove unneeded usage of tipsy * tooltip is already initialized
JavaScript
agpl-3.0
jbicha/server,endsguy/server,Ardinis/server,pmattern/server,pixelipo/server,andreas-p/nextcloud-server,pmattern/server,endsguy/server,pixelipo/server,Ardinis/server,michaelletzgus/nextcloud-server,nextcloud/server,xx621998xx/server,whitekiba/server,Ardinis/server,nextcloud/server,jbicha/server,xx621998xx/server,pmatter...
566b86d0c11e8def2e018c0bfcae1ca8c7efb4f4
lib/getGeoFiles.js
lib/getGeoFiles.js
'use strict'; var fs = require('fs'); var path = require('path'); var nodedir = require('node-dir'); var unzipGeoStream = require('./unzipGeoStream'); function discover(input, counter, callback, silent, afterProcessingCb){ var ext = path.extname(input); if(ext){ if(ext === '.zip') return unzipGeoStream(inpu...
'use strict'; var fs = require('fs'); var path = require('path'); var nodedir = require('node-dir'); var unzipGeoStream = require('./unzipGeoStream'); function discover(input, counter, callback, silent, afterProcessingCb){ var ext = path.extname(input); if(ext){ if(ext === '.zip') return unzipGeoStream(inpu...
Allow .csvs to be processed
Allow .csvs to be processed
JavaScript
cc0-1.0
awolfe76/grasshopper-loader,awolfe76/grasshopper-loader,cfpb/grasshopper-loader,cfpb/grasshopper-loader
952b351d8a7be859c22f79ea5d2225acf87b3ccb
rng.js
rng.js
function get(i){ return document.getElementById(i) } function random_number(){ if(value('repeat')<1){ get('repeat').value=1 } i=value('repeat')-1; range=parseInt(value('range'))+1; do{ result+=Math.floor(Math.random()*range+value('base'))+' ' }while(i--); get('result').innerHTML=result; result='' } functio...
function random_number(){ save(); i=value('repeat')-1; range=parseInt(value('range'))+1; do{ result+=Math.floor(Math.random()*range+value('base'))+' ' }while(i--); get('result').innerHTML=result; result='' } function reset(){ if(confirm('Reset settings?')){ get('base').value=0; get('range').value=10; ge...
Save input values to localStorage
Save input values to localStorage
JavaScript
cc0-1.0
iterami/RNG.htm,iterami/RNG.htm
79adb264ac417a93ca252e66750076fd937142f1
lib/request-jwt.js
lib/request-jwt.js
var TokenCache = require('./token-cache'), tokens = new TokenCache(); /** * Returns a JWT-enabled request module. * @param request The request instance to modify to enable JWT. * @returns {Function} The JWT-enabled request module. */ exports.requestWithJWT = function (request) { if (!request) { // use the req...
var TokenCache = require('./token-cache'), tokens = new TokenCache(); /** * Returns a JWT-enabled request module. * @param request The request instance to modify to enable JWT. * @returns {Function} The JWT-enabled request module. */ exports.requestWithJWT = function (request) { if (!request) { // use the req...
Use the Authorization request header field to send the token.
Use the Authorization request header field to send the token. Per http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-14#section-2.1 this is the recommended approach which must be supported by all servers.
JavaScript
mit
extrabacon/google-oauth-jwt,0xPIT/google-oauth-jwt
1634fe192df5994ce9ce4b323de89f5351fbfffb
htdocs/components/00_jquery_togglebutton.js
htdocs/components/00_jquery_togglebutton.js
/* * Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute * * 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.o...
/* * Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute * * 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.o...
Send button state for toggle buttons.
Send button state for toggle buttons.
JavaScript
apache-2.0
Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode
7e894bf4593a3ce542ae8bfd9af05835712497e7
src/Our.Umbraco.Nexu.Web/App_Plugins/Nexu/controllers/related-links-app-controller.js
src/Our.Umbraco.Nexu.Web/App_Plugins/Nexu/controllers/related-links-app-controller.js
(function () { 'use strict'; function RelatedLinksAppController($scope) { var vm = this; vm.relations = $scope.model.viewModel; var currentVariant = _.find($scope.content.variants, function(v) { return v.active }); vm.culture = currentVariant.language.culture; ...
(function () { 'use strict'; function RelatedLinksAppController($scope) { var vm = this; vm.relations = $scope.model.viewModel; var currentVariant = _.find($scope.content.variants, function (v) { return v.active }); if (currentVariant.language) { vm.culture =...
Make sure content app works when there are no variants
Make sure content app works when there are no variants
JavaScript
mit
dawoe/umbraco-nexu,dawoe/umbraco-nexu,dawoe/umbraco-nexu
89a9146eb112386279c5bfb54845e93a571b62a7
www/mobitorSecure.js
www/mobitorSecure.js
module.exports = { isSecure: function (successCallback, errorCallback) { cordova.exec(successCallback, errorCallback, "MobitorSecure", "isSecure", [null]); } };
module.exports = { isSecure: function (successCallback, errorCallback) { cordova.exec(successCallback, errorCallback, "MobitorSecure", "isSecured", [null]); } };
Fix method and add d to isSecure
Fix method and add d to isSecure
JavaScript
mit
jmoore6364/mobitor-cordova-secure,jmoore6364/mobitor-cordova-secure
f95cf530a32f0637536e606d864139d0cde80372
test/compressJavaScript-test.js
test/compressJavaScript-test.js
var vows = require('vows'), assert = require('assert'), AssetGraph = require('../lib/AssetGraph'); vows.describe('transforms.compressJavaScript').addBatch(function () { var test = {}; [undefined, 'uglifyJs', 'yuicompressor', 'closurecompiler'].forEach(function (compressorName) { test[String(com...
var vows = require('vows'), assert = require('assert'), AssetGraph = require('../lib/AssetGraph'); vows.describe('transforms.compressJavaScript').addBatch(function () { var test = {}; // The YUICompressor and ClosureCompiler tests fail intermittently on Travis [undefined, 'uglifyJs'/*, 'yuicompress...
Disable the YUICompressor and closure compiler tests
Disable the YUICompressor and closure compiler tests They're annoying because the fail on Travis half of the time.
JavaScript
bsd-3-clause
jscinoz/assetgraph,jscinoz/assetgraph,papandreou/assetgraph,papandreou/assetgraph,assetgraph/assetgraph,jscinoz/assetgraph,papandreou/assetgraph
801e990ae4b3433ab1800bbdfd6d8c9921fc2029
controllers/api.js
controllers/api.js
'use strict'; /** * GET /api/challenges * List of challenges. */ exports.getChallenges = function getChallenges(req, res) { res.json({ challenges: [] }); }; /** * POST /api/challenges * Create new challenges. */ exports.postChallenges = function postChallenges(req, res) { res.status(201).send("Created n...
'use strict'; /** * GET /api/challenges * List of challenges. */ exports.getChallenges = function get(req, res) { res.json({ challenges: [] }); }; /** * POST /api/challenges/:challengeId * Created a new challenge. */ exports.postChallenge = function post(req, res) { res.status(201).send("Created new challenge...
Update API controller with team and challenge routes
Update API controller with team and challenge routes
JavaScript
mit
lostatseajoshua/Challenger
015f87577e6296419fcf3747629cf095681a2e8f
app/javascript/app/components/compare/compare-ndc-content-overview/compare-ndc-content-overview-selectors.js
app/javascript/app/components/compare/compare-ndc-content-overview/compare-ndc-content-overview-selectors.js
import { createSelector } from 'reselect'; import isEmpty from 'lodash/isEmpty'; import { parseSelectedLocations, getSelectedLocationsFilter, addSelectedNameToLocations } from 'selectors/compare'; // values from search const getSelectedLocations = state => state.selectedLocations || null; const getContentOvervie...
import { createSelector } from 'reselect'; import isEmpty from 'lodash/isEmpty'; import { parseSelectedLocations, getSelectedLocationsFilter, addSelectedNameToLocations } from 'selectors/compare'; // values from search const getSelectedLocations = state => state.selectedLocations || null; const getContentOvervie...
Fix crashing bug: Compare Libya
Fix crashing bug: Compare Libya
JavaScript
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
c554a2b89f64b9f522a16d3080d8c81990b09d82
app.js
app.js
/** * App Dependencies. */ var loopback = require('loopback') , app = module.exports = loopback() , fs = require('fs') , path = require('path') , request = require('request') , TaskEmitter = require('sl-task-emitter'); // expose a rest api app.use(loopback.rest()); // Add static files app.use(loopback.st...
/** * App Dependencies. */ var loopback = require('loopback') , app = module.exports = loopback() , fs = require('fs') , path = require('path') , request = require('request') , TaskEmitter = require('sl-task-emitter'); // expose a rest api app.use(loopback.rest()); // Add static files app.use(loopback.st...
Make it working directory independent
Make it working directory independent
JavaScript
mit
strongloop-bluemix/loopback-example-app,svennam92/loopback-example-app,hacksparrow/loopback-example-app,sam-github/sls-sample-app,jewelsjacobs/loopback-example-app,jewelsjacobs/loopback-example-app,rvennam/loopback-example-app,svennam92/loopback-example-app,rvennam/loopback-example-app,Joddsson/loopback-example-app,rve...
6a1d280e8a0f576b4129b7fe5ca71ba93a1095b6
components/Fork.js
components/Fork.js
import React from 'react' import { makeStyles } from '@material-ui/core/styles' import Fab from '@material-ui/core/Fab' import Badge from '@material-ui/core/Badge' const useStyles = makeStyles(() => ({ fork: { position: 'absolute', right: 30, top: 30 } })) const Fork = ({ stars }) => { const classes = useSty...
import React from 'react' import { makeStyles } from '@material-ui/core/styles' import Fab from '@material-ui/core/Fab' import Badge from '@material-ui/core/Badge' const useStyles = makeStyles(() => ({ fork: { position: 'absolute', right: 30, top: 30 } })) const Fork = ({ stars }) => { const classes = useSty...
Add rel on fork link
Add rel on fork link
JavaScript
mit
ooade/NextSimpleStarter
2d94f56750717d4a6479b8eed940b103b53a0f61
rollup.config.js
rollup.config.js
import sourcemaps from 'rollup-plugin-sourcemaps'; export const globals = { // Apollo 'apollo-client': 'apollo.core', 'apollo-link': 'apolloLink.core', 'apollo-link-batch': 'apolloLink.batch', 'apollo-utilities': 'apollo.utilities', 'zen-observable-ts': 'apolloLink.zenObservable', //GraphQL 'graphql/l...
import sourcemaps from 'rollup-plugin-sourcemaps'; export const globals = { // Apollo 'apollo-client': 'apollo.core', 'apollo-link': 'apolloLink.core', 'apollo-link-batch': 'apolloLink.batch', 'apollo-utilities': 'apollo.utilities', 'apollo-link-http-common': 'apolloLink.utilities', 'zen-observable-ts': ...
Add missing global Rollup alias for apollo-link-http-common
Add missing global Rollup alias for apollo-link-http-common This fixes #521, making it so that the apollo-link-http bundle resolves apollo-link-http-common to global.apolloLink.utilities instead of global.apolloLinkHttpCommon (which does not exist).
JavaScript
mit
apollographql/apollo-link,apollographql/apollo-link
b52476d5f5c59cc2f0d5df2270b4f35b86b166c0
core/src/action.js
core/src/action.js
const elements = document.querySelectorAll('bracket-less'); function doAction(e) { if (e.target.tagName !== 'BRACKET-LESS') return; e.target.classList.toggle('bracket-less'); e.stopPropagation(); } document.body.addEventListener('click', doAction); function toggleCollapse(state) { if (state.collapse) { // pl...
const elements = document.querySelectorAll('bracket-less'); function doAction(e) { e.stopPropagation(); if (e.target.tagName !== 'BRACKET-LESS') return; e.target.classList.toggle('bracket-less'); } document.body.addEventListener('click', doAction); function toggleCollapse(state) { if (state.collapse) { // ...
Stop propogation in any case
Stop propogation in any case
JavaScript
isc
mrv1k/bracketless,mrv1k/bracketless
dd1fa20110373e12ac2b9a67ace0d6cf4dabea0c
pages/_document.js
pages/_document.js
import React from 'react' import Document, { Head, Main, NextScript } from 'next/document' import stylesheet from 'pages/styles.scss' export default class MyDocument extends Document { render () { return ( <html> <Head> <meta charSet='utf-8' /> <meta name='viewport' content='wid...
import React from 'react' import Document, { Head, Main, NextScript } from 'next/document' import stylesheet from './styles.scss' export default class MyDocument extends Document { render () { return ( <html> <Head> <meta charSet='utf-8' /> <meta name='viewport' content='width=d...
Move base style in the header
Move base style in the header
JavaScript
mit
bmagic/acdh-client
a5429590312ce43effd710e22d8892c33b571d85
app/lib/main.js
app/lib/main.js
'use strict'; /*jshint unused:false, newcap:false*/ /** * Enable dubug mode * This allow to console.log in a firefox default configuration */ require('sdk/preferences/service').set('extensions.sdk.console.logLevel', 'debug'); var data = require('sdk/self').data; var { PageMod } = require('sdk/page-mod'); // Creat...
'use strict'; /*jshint unused:false, newcap:false*/ /** * Enable dubug mode * This allow to console.log in a firefox default configuration */ require('sdk/preferences/service').set('extensions.sdk.console.logLevel', 'debug'); var data = require('sdk/self').data; var { PageMod } = require('sdk/page-mod'); // Work ...
Load the style file in Firefox version as well.
Load the style file in Firefox version as well.
JavaScript
mpl-2.0
musically-ut/github-forks-addon,musically-ut/lovely-forks,musically-ut/lovely-forks
0b49d0bb7a4dc577c0664775f2c53d86c3c6f486
greasemonkey-endomondo-design.user.js
greasemonkey-endomondo-design.user.js
// ==UserScript== // @name Greasemonkey EndomondoDesign // @namespace https://github.com/JanisE // @include *www.endomondo.com/* // @version 1 // @grant none // ==/UserScript== var css = document.createElement('style'); css.type = 'text/css'; css.innerHTML = ".feedItem-footer .eoAvatar-image {visibility: hidden} .eoFe...
// ==UserScript== // @name Greasemonkey EndomondoDesign // @namespace https://github.com/JanisE // @description Project URL: https://github.com/JanisE/greasemonkey-endomondo-design // @include *www.endomondo.com/* // @version 1 // @grant none // ==/UserScript== var css = document.createElement('style'); css.type = 'te...
Add a back-reference to the repository.
Add a back-reference to the repository.
JavaScript
mit
JanisE/greasemonkey-endomondo-design
01526d30ab470b2872ac98f62d6a8712d78eddbc
tools/main-transpile-wrapper.js
tools/main-transpile-wrapper.js
// This file exists because it is the file in the tool that is not automatically // transpiled by Babel function babelRegister() { require("meteor-babel/register")({ babelOptions: require("meteor-babel").getDefaultOptions( require("./babel-features.js") ) }); } babelRegister(); // #RemoveInProd this...
// This file exists because it is the file in the tool that is not automatically // transpiled by Babel function babelRegister() { require("meteor-babel/register")({ babelOptions: require("meteor-babel").getDefaultOptions( require("./babel-features.js") ) }); } babelRegister(); // #RemoveInProd this...
Install ES2015 String polyfills in tool code, too.
Install ES2015 String polyfills in tool code, too.
JavaScript
mit
cherbst/meteor,jeblister/meteor,kengchau/meteor,cherbst/meteor,deanius/meteor,karlito40/meteor,h200863057/meteor,Jonekee/meteor,guazipi/meteor,Puena/meteor,planet-training/meteor,deanius/meteor,namho102/meteor,chiefninew/meteor,TechplexEngineer/meteor,allanalexandre/meteor,baiyunping333/meteor,jeblister/meteor,katopz/m...
76f211a93cba95050f5fcbcdada228f9e3c42936
d3/test/spec/test_wgaPipeline.js
d3/test/spec/test_wgaPipeline.js
describe('The constructor is supposed a proper WgaPipeline object', function(){ it('Constructor wgaPipeline exists', function(){ expect(WgaPipeline).toBeDefined(); }); var svg = $('<svg></svg>'); var wga = new WgaPipeline(svg); it('WgaPipelie object is not null', function(){ expect(wga).not.toBeNull(); }); i...
describe('The constructor is supposed a proper WgaPipeline object', function(){ it('Constructor wgaPipeline exists', function(){ expect(WgaPipeline).toBeDefined(); }); var svg = $('<svg></svg>'); var wga = new WgaPipeline(svg); it('WgaPipelie object is not null', function(){ expect(wga).not.toBeNull(); }); i...
Test for functionality of setData method fails
Test for functionality of setData method fails
JavaScript
mit
AliTVTeam/AliTV,BioInf-Wuerzburg/AliTV,AliTVTeam/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV
4b956b5e7fb6206f17fdaf9f770afe6734827455
packages/idyll-editor/src/renderer.js
packages/idyll-editor/src/renderer.js
const components = require('idyll-components'); const IdyllDocument = require('idyll-document'); const React = require('react'); class Renderer extends React.PureComponent { render() { const { idyllMarkup, ast, idyllHash } = this.props; return ( <div className={"renderer"}> <div className={"ren...
const components = require('idyll-components'); const IdyllDocument = require('../../idyll-document/src'); const React = require('react'); class Renderer extends React.PureComponent { render() { const { idyllMarkup, ast, idyllHash } = this.props; return ( <div className={"renderer"}> <div class...
Use relative path until published
Use relative path until published
JavaScript
mit
idyll-lang/idyll,idyll-lang/idyll
b9f34201ddb64378f10320b7a0f9e4ef1d29bb5e
packages/mobile-status-bar/package.js
packages/mobile-status-bar/package.js
Package.describe({ summary: "Good defaults for the mobile status bar", version: "1.0.14" }); Cordova.depends({ 'cordova-plugin-statusbar': '2.3.0' });
Package.describe({ summary: "Good defaults for the mobile status bar", version: "1.0.14" }); Cordova.depends({ 'cordova-plugin-statusbar': '2.4.3' });
Update cordova-plugin-statusbar from 2.3.0 to 2.4.3.
Update cordova-plugin-statusbar from 2.3.0 to 2.4.3. Included by mobile-experience > mobile-status-bar.
JavaScript
mit
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
8b96e99cb55204088d239e2ec63e5af535068786
server/routes.js
server/routes.js
var f = "MMM Do YYYY"; function calcWidth(name) { return 250 + name.length * 6.305555555555555; } WebApp.connectHandlers.use("/package", function(request, response) { if(request.url.split('/')[1] != ''){ var url = `https://atmospherejs.com/a/packages/findByNames\ ?names=${request.url.split('/')[1]}`; HTTP.get...
function calcWidth(name) { return 250 + name.length * 6.305555555555555; } WebApp.connectHandlers.use("/package", function(request, response) { if(request.url.split('/')[1] != ''){ var url = `https://atmospherejs.com/a/packages/findByNames\ ?names=${request.url.split('/')[1]}`; HTTP.get(url, {headers: {'Accept...
Fix undefined name and scope variables
Fix undefined name and scope variables
JavaScript
mit
sungwoncho/meteor-icon,sungwoncho/meteor-icon
fb3508a81f101d1c376deff610d7f93af5d426ba
ghpages/js/stationary-track.js
ghpages/js/stationary-track.js
var playlist = WaveformPlaylist.init({ samplesPerPixel: 3000, mono: true, waveHeight: 100, container: document.getElementById("playlist"), state: 'cursor', waveOutlineColor: '#E0EFF1', colors: { waveOutlineColor: '#E0EFF1', timeColor: 'grey', fadeColor: 'black' }, controls: { sho...
var playlist = WaveformPlaylist.init({ samplesPerPixel: 3000, zoomLevels: [500, 1000, 3000, 5000], mono: true, waveHeight: 100, container: document.getElementById("playlist"), state: 'cursor', waveOutlineColor: '#E0EFF1', colors: { waveOutlineColor: '#E0EFF1', timeColor: 'grey', fadeCo...
Fix zoom levels for example.
Fix zoom levels for example.
JavaScript
mit
naomiaro/waveform-playlist,naomiaro/waveform-playlist
18b70b1dfc2e258215596e561cf37369fc467a9d
stories/Interactions.story.js
stories/Interactions.story.js
import React from 'react' import {withInfo} from '@storybook/addon-info' import {storiesOf} from '@storybook/react' import Board from '../src' const data = { lanes: [ { id: 'lane1', title: 'Planned Tasks', cards: [ {id: 'Card1', title: 'Card1', description: 'foo card', metadata: {id: '...
import React from 'react' import {withInfo} from '@storybook/addon-info' import {storiesOf} from '@storybook/react' import Board from '../src' const data = { lanes: [ { id: 'lane1', title: 'Planned Tasks', cards: [ {id: 'Card1', title: 'Card1', description: 'foo card', metadata: {id: '...
Allow laneId to be passed as param to onCardClick handler
fix: Allow laneId to be passed as param to onCardClick handler https://github.com/rcdexta/react-trello/issues/34
JavaScript
mit
rcdexta/react-trello,rcdexta/react-trello
0605be68fa516a167f6519c238952a23e005bc4d
templates/app/routes/index.js
templates/app/routes/index.js
var path = require('path'), fs = require('fs'); var routes = function (app) { fs.readdirSync(__dirname).filter(function (file) { return path.join(__dirname, file) != __filename; }).forEach(function (file) { require('./' + path.basename(file))(app); }); } module.exports = routes;
var path = require('path'), fs = require('fs'); var routes = function(app) { fs.readdirSync(__dirname).filter(function(file) { return path.join(__dirname, file) != __filename; }).forEach(function(file) { require('./' + path.basename(file))(app); }); } module.exports = routes;
Indent by 4 spaces instead of 2
Indent by 4 spaces instead of 2
JavaScript
mit
saintedlama/bumm,saintedlama/bumm,the-diamond-dogs-group-oss/bumm
bc1ab08e8f40fd8586cfb91e18e2c28868700a21
src/configureRefreshFetch.js
src/configureRefreshFetch.js
// @flow type Configuration = { refreshToken: () => Promise<void>, shouldRefreshToken: (error: any) => boolean, fetch: (url: any, options: Object) => Promise<any> } function configureRefreshFetch (configuration: Configuration) { const { refreshToken, shouldRefreshToken, fetch } = configuration let refreshi...
// @flow type Configuration = { refreshToken: () => Promise<void>, shouldRefreshToken: (error: any) => boolean, fetch: (url: any, options: Object) => Promise<any> } function configureRefreshFetch (configuration: Configuration) { const { refreshToken, shouldRefreshToken, fetch } = configuration let refreshi...
Throw the right error from failing second request
Throw the right error from failing second request Fixes #4.
JavaScript
mit
vlki/refresh-fetch
025bc068d8e681661b740d206db87fbb2da1afeb
src/es6/Machete.js
src/es6/Machete.js
export class Machete { // TODO: Implement polyfills }
export class Machete { // TODO: Implement polyfills /** * Utility function to get an element from the DOM. * It is needed because everytime we get an element from the DOM, * we reset its style to make sure code works as needed. * @param string selector CSS selector * @return Elem...
Add function for retrieving DOM elements
core: Add function for retrieving DOM elements
JavaScript
mpl-2.0
Technohacker/machete
fd626a11bcb51fd499cab6aa24ba3c1ac1f4603a
src/js/settings.js
src/js/settings.js
this.mmooc = this.mmooc || {}; // Course ID for selected course, which frontend page // will be swapped with All Courses list const allCoursesFrontpageCourseID = 14; this.mmooc.settings = { CanvaBadgeProtocolAndHost: 'https://canvabadges-beta-iktsenteret.bibsys.no', useCanvaBadge: false, defaultNumberOfReviews:...
this.mmooc = this.mmooc || {}; // Course ID for selected course, which frontend page // will be swapped with All Courses list const allCoursesFrontpageCourseID = 1; this.mmooc.settings = { CanvaBadgeProtocolAndHost: 'https://canvabadges-beta-iktsenteret.bibsys.no', useCanvaBadge: false, defaultNumberOfReviews: ...
Set allCoursesFrontpageCourseID to 1 as default.
Set allCoursesFrontpageCourseID to 1 as default.
JavaScript
mit
matematikk-mooc/frontend,matematikk-mooc/frontend
626ce2749810d9386c1ae8454796c0ee7cafc23c
src/link_engine.js
src/link_engine.js
var performImage = function() { var t=[]; function prepareString(withUrl) { return '<a href="' + withUrl + '"><img title="'+ withUrl +'" src="' + withUrl + '"></a>'; } // Image tags are the easiest to do. Loop thru the set, and pull up the images out Array.prototype.slice.call(document.getE...
var performImage = function() { var t=[]; function prepareString(withUrl) { return '<a href="' + withUrl + '"><img title="'+ withUrl +'" src="' + withUrl + '"></a>'; } // Image tags are the easiest to do. Loop thru the set, and pull up the images out Array.prototype.slice.call(document.getE...
Fix handling of image tag sources
Fix handling of image tag sources
JavaScript
mit
booc0mtaco/image-sourcer,booc0mtaco/image-sourcer,booc0mtaco/image-sourcer
871c29ed5273a08ca0f4a3413a62ac513c574974
client/test/reducer.spec.js
client/test/reducer.spec.js
import React from 'react'; import { expect } from 'chai'; import { List as ImmutableList, Map } from 'immutable'; import reducer from '../src/reducer'; describe('reducer', () => { it('should return the initial state', () => { const actual = reducer(undefined, {}); const expected = ImmutableList.of(); ex...
import React from 'react'; import { expect } from 'chai'; import { List as ImmutableList, Map } from 'immutable'; import reducer from '../src/reducer'; describe('reducer', () => { it('should return the initial state', () => { const actual = reducer(undefined, {}); const expected = ImmutableList.of(); ex...
Add missing test for reducer action CLEAR_CUSTOMIZATION
Add missing test for reducer action CLEAR_CUSTOMIZATION
JavaScript
mit
marlonbernardes/coding-stickers,marlonbernardes/coding-stickers
bb5b1ebe76361ccf064f96d4c0036e29017946e9
frontend/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js
frontend/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js
//= require spree/frontend/viewport Spree.fetchProductCarousel = function (taxonId, htmlContainer) { return $.ajax({ url: Spree.routes.product_carousel(taxonId) }).done(function (data) { htmlContainer.html(data); htmlContainer.find('.carousel').carouselBootstrap4() }) } Spree.loadCarousel = function...
//= require spree/frontend/viewport Spree.fetchProductCarousel = function (taxonId, htmlContainer) { return $.ajax({ url: Spree.routes.product_carousel(taxonId) }).done(function (data) { htmlContainer.html(data); htmlContainer.find('.carousel').carouselBootstrap4() }) } Spree.loadCarousel = function...
Fix homepage carousels on iOS
[SD-770] Fix homepage carousels on iOS
JavaScript
bsd-3-clause
imella/spree,imella/spree,ayb/spree,imella/spree,ayb/spree,ayb/spree,ayb/spree
1b5f10b9c975b8a055d830e8ac5e112dd059c7d5
electron/index.js
electron/index.js
var menubar = require('menubar'); var ipc = require('ipc'); var shell = require('shell') var mb = menubar({ dir: __dirname, width: 280, height: 87 }); mb.on('ready', function ready () { require('../server'); }) ipc.on('browser', function browser (ev) { shell.openExternal('http://localhost:3000') }) i...
var menubar = require('menubar'); var ipc = require('ipc'); var shell = require('shell') var mb = menubar({ dir: __dirname, width: 280, height: 87, icon: __dirname + '/Icon.png' }); mb.on('ready', function ready () { require('../server'); }) ipc.on('browser', function browser (ev) { shell.openExte...
Fix for updated default icon name
Fix for updated default icon name
JavaScript
mit
origingod/lightning,karissa/lightning,lightning-viz/lightning,cournape/lightning,cournape/lightning,lightning-viz/lightning,origingod/lightning,karissa/lightning
c8f91cf8b2d5b1d0c59e80b3c0fb9f25a49d935e
src/api/index.js
src/api/index.js
import moment from 'moment'; import { maxPages } from '../../data/config'; // Prevent webpack window problem const isBrowser = () => typeof window !== 'undefined'; const isPage = () => (isBrowser() ? window.location.pathname.indexOf('page') === -1 : false); const getCurrentPage = () => { if (isBrowser() === true) ...
import moment from 'moment'; import { maxPages } from '../../data/config'; // Prevent webpack window problem const isBrowser = () => typeof window !== 'undefined'; const isPage = () => (isBrowser() ? window.location.pathname.indexOf('page') === -1 : false); const getCurrentPage = () => { if (isBrowser() === true) ...
Fix date bug in moment.js
Fix date bug in moment.js
JavaScript
mit
calpa/blog
cce7d2b09c0b50300a5c85eefd80f53bae39e7a1
demo/read-input.js
demo/read-input.js
window.__i10c = {}; window.__i10c.getInputValue = (inputEle) => { return inputEle.val; } window.__i10c.setInputValue = (inputEle, val) => { inputEle.value = val; } window.__i10c.allInputValue = () => { var elements = document.getElementsByTagName('input'); for (var i = 0; i < elements.length; i++) { ...
window.__i10c = {}; window.__i10c.getInputValue = (inputEle) => { return inputEle.value; } window.__i10c.setInputValue = (inputEle, val) => { inputEle.value = val; } window.__i10c.getAllInputValues = () => { var elements = document.getElementsByTagName('input'); for (var i = 0; i < elements.length; i...
Fix name and bug for get input value
Fix name and bug for get input value
JavaScript
mit
instartlogic/instartlogic.github.io
af9f12582e288bd2dc1a21a3075d706919b441b3
examples/basic/components/App.js
examples/basic/components/App.js
const React = require('react'); const { Link } = require('react-router'); const { connect } = require('react-redux'); const { updatePath } = require('redux-simple-router'); function App({ updatePath, children }) { return ( <div> <header> Links: {' '} <Link to="/">Home</Link> ...
const React = require('react'); const { Link } = require('react-router'); const { connect } = require('react-redux'); const { pushPath } = require('redux-simple-router'); function App({ pushPath, children }) { return ( <div> <header> Links: {' '} <Link to="/">Home</Link> {' ...
Migrate the basic example to the new API
Migrate the basic example to the new API
JavaScript
mit
rackt/redux-simple-router,reactjs/react-router-redux
8587e62d184bcc6f28988c6a25b4bbf227d85ed8
src/diskdrive.js
src/diskdrive.js
var exec = require('child_process').exec; var self = module.exports; self.eject = function(id) { // are we running on mac? if (process.platform === 'darwin') { // setup optional argument, on mac, will default to 1 id = (typeof id === 'undefined') ? 1 : id; exec('drutil tray eject ' + id, function(err, stdout...
var exec = require('child_process').exec; var self = module.exports; /** * Eject the specified disk drive. * @param {int|string} id Locator for the disk drive. * @param {Function} callback Optional callback for disk drive ejection completion / error. */ self.eject = function(id, callback) { // are ...
Support for completion callback with error
Support for completion callback with error
JavaScript
mit
brendanashworth/diskdrive
cb2a18f55784f2b5ce0305d68dee0a4835430435
tests/loaders/assets.spec.js
tests/loaders/assets.spec.js
/*! * qwebs * Copyright(c) 2016 Benoît Claveau * MIT Licensed */ "use strict"; const Qwebs = require("../../lib/qwebs"); const AssetsLoader = require("../../lib/loaders/assets"); describe("assetsLoader", () => { it("load", done => { return Promise.resolve().then(() => { let $qwebs = new Q...
/*! * qwebs * Copyright(c) 2016 Benoît Claveau * MIT Licensed */ "use strict"; const Qwebs = require("../../lib/qwebs"); const AssetsLoader = require("../../lib/loaders/assets"); describe("assetsLoader", () => { it("Load", done => { return Promise.resolve().then(() => { let $qwebs = new Q...
Test failed to read public folder
Test failed to read public folder
JavaScript
mit
BenoitClaveau/qwebs,beny78/qwebs,BenoitClaveau/qwebs,beny78/qwebs
fa56b7a00fc9d56cfea11f9dce754f9d5e5859f8
src/event/css.js
src/event/css.js
/* --- name: Event.CSS3 description: Provides CSS3 events. license: MIT-style license. authors: - Jean-Philippe Dery (jeanphilippe.dery@gmail.com) requires: - Custom-Event/Element.defineCustomEvent provides: - Event.CSS3 ... */ (function() { // TODO: Property detect if a prefix-less version is available va...
/* --- name: Event.CSS3 description: Provides CSS3 events. license: MIT-style license. authors: - Jean-Philippe Dery (jeanphilippe.dery@gmail.com) requires: - Custom-Event/Element.defineCustomEvent provides: - Event.CSS3 ... */ (function() { // TODO: Property detect if a prefix-less version is available va...
Fix an issue with prefixing animationend and transitionend
Fix an issue with prefixing animationend and transitionend Signed-off-by: Yannick Gagnon <d4b2c45cb5d34b718a9a7e841e45e36d4b2966bc@lemieuxbedard.com>
JavaScript
mit
moobilejs/moobile-core,jpdery/moobile-core,moobilejs/moobile-core,jpdery/moobile-core
4cc9f1f6ede2f3d1b428e7422fd4767c50c5eab3
src/githubApi.js
src/githubApi.js
define(["lib/reqwest", "lib/lodash", "lib/knockout", "githubEvent"], function (reqwest, _, ko, GithubEvent) { var githubApi = {}; var rootUrl = "https://api.github.com"; function getOrganisationMembers(orgName) { return reqwest({ url: rootUrl + '/orgs/' + orgName + '/members', ...
define(["lib/reqwest", "lib/lodash", "lib/knockout", "githubEvent"], function (reqwest, _, ko, GithubEvent) { var githubApi = {}; var rootUrl = "https://api.github.com"; function getOrganisationMembers(orgName) { return reqwest({ url: 'https://api.github.com/orgs/' + orgName + '/memb...
Move event source to Github site feeds, rather than full (rate-limited) API
Move event source to Github site feeds, rather than full (rate-limited) API
JavaScript
mit
pimterry/github-org-feed-page,pimterry/github-org-feed-page
fc5c76afa4402477d7cc70010d253a05e5688603
learnyounode/json-api-server.js
learnyounode/json-api-server.js
var http = require('http') var moment = require('moment') var url = require('url') function stringifyTime(now) { var timeString = '{"hour":' + now.hour() + ',"minute":' + now.minute() + ',"second":' + now.second() + '}' return timeString; } function unixifyTime(now) { var tim...
var http = require('http') var moment = require('moment') var url = require('url') function stringifyTime(time) { return { hour: time.hour(), minute: time.minute(), second: time.second() } } function unixifyTime(time) { return { unixtime: time.valueOf() } } var server = http.createServer(function(r...
Use JS Objects for generating JSON
Use JS Objects for generating JSON Replace hand-coded JSON strings with JSON hashes (or Objects, I'm not sure what they are defined as at this point.)
JavaScript
mit
nmarley/node-playground,nmarley/node-playground
3c3515ca7d264f4fa1d58047d60d4522a8eb21a2
test/index-spec.js
test/index-spec.js
/* eslint-disable prefer-arrow-callback */ /* eslint-env node, mocha, browser */ const assert = require('assert'); const test = require('../src/index').test; const item = require('./harness/component-data'); const path = require('path'); describe('Vue test utils', () => { const pathToHarness = path.resolve(__dirnam...
/* eslint-disable prefer-arrow-callback */ /* eslint-env node, mocha, browser */ const assert = require('assert'); const test = require('../src/index').test; const item = require('./harness/component-data'); const path = require('path'); describe('Vue test utils', () => { const pathToHarness = path.resolve(__dirnam...
Add unit test for verifying window in then callback.
Add unit test for verifying window in then callback.
JavaScript
mit
peripateticus/vue-test-utils
f35ef3ea96f4fb1d696f8f91e150b1869cbcd1ce
lib/precompiled/07-bn128_mul.js
lib/precompiled/07-bn128_mul.js
const utils = require('ethereumjs-util') const BN = utils.BN const bn128_module = require('rustbn.js') const ecMul_precompile = bn128_module.cwrap('ec_mul', 'string', ['string']) module.exports = function (opts) { let results = {} let data = opts.data let inputHexStr = data.toString('hex') try { let ret...
const utils = require('ethereumjs-util') const BN = utils.BN const bn128_module = require('rustbn.js') const ecMul_precompile = bn128_module.cwrap('ec_mul', 'string', ['string']) module.exports = function (opts) { let results = {} let data = opts.data let inputHexStr = data.toString('hex') try { let ret...
Update gas costs for EC mult precompile
Update gas costs for EC mult precompile
JavaScript
mpl-2.0
ethereumjs/ethereumjs-vm,ethereum/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm
cccaf09e5b76b05b42370888f7edd9908f6f63a0
src/pages/qr.js
src/pages/qr.js
import React from 'react' import PropTypes from 'prop-types' import { compose, withProps } from 'recompose' import QRCode from 'qrcode.react' import { withRouter } from 'next/router' import { StaticLayout } from '../components/layouts' import { withLogging } from '../lib' const propTypes = { shortname: PropTypes.st...
import React from 'react' import PropTypes from 'prop-types' import { compose, withProps } from 'recompose' import QRCode from 'qrcode.react' import { withRouter } from 'next/router' import { StaticLayout } from '../components/layouts' import { withLogging } from '../lib' const propTypes = { shortname: PropTypes.st...
Format regex for QR page
Format regex for QR page
JavaScript
agpl-3.0
uzh-bf/klicker-react,uzh-bf/klicker-react
8c23d570176a529519ac869508b1db59c5485a1e
src/lib/utils.js
src/lib/utils.js
module.exports = { getViewPortInfo: function getViewPort () { var e = document.documentElement var g = document.getElementsByTagName('body')[0] var x = window.innerWidth || e.clientWidth || g.clientWidth var y = window.innerHeight || e.clientHeight || g.clientHeight return { width: x, ...
module.exports = { getViewPortInfo: function getViewPort () { var e = document.documentElement var g = document.getElementsByTagName('body')[0] var x = window.innerWidth || e.clientWidth || g.clientWidth var y = window.innerHeight || e.clientHeight || g.clientHeight return { width: x, ...
Add promiseAny until function to get Promise.any support without extending prototype
Add promiseAny until function to get Promise.any support without extending prototype
JavaScript
mit
opbeat/opbeat-angular,jahtalab/opbeat-js,opbeat/opbeat-js-core,opbeat/opbeat-angular,opbeat/opbeat-react,opbeat/opbeat-react,jahtalab/opbeat-js,opbeat/opbeat-react,jahtalab/opbeat-js,opbeat/opbeat-angular,opbeat/opbeat-js-core
6ece176a96ddcc80e681ae668f5bdbf865fec567
src/webpack/presets/eslint.js
src/webpack/presets/eslint.js
import path from 'path' export default { name: 'eslint', configure ({ projectPath }) { return { eslint: { configFile: path.join(projectPath, '.eslintrc') }, module: { preLoaders: [ { test: /\.jsx?$/, loader: 'eslint', exclude: /no...
import path from 'path' export default { name: 'eslint', configure ({ projectPath, enableCoverage }) { if (!enableCoverage) { return {} } return { eslint: { configFile: path.join(projectPath, '.eslintrc') }, module: { preLoaders: [ { test:...
Disable linting when generating coverage
feat(coverage): Disable linting when generating coverage
JavaScript
mit
saguijs/sagui,saguijs/sagui
29d78768f62444fbba32cab9e2ebf8aa3450991a
client/app/services/session.js
client/app/services/session.js
/* globals Stripe */ import Ember from 'ember'; var $ = Ember.$; function registrationDataFromUrl(url) { var matches = url.match(/\?code=(\d+)/); if (matches && matches.length === 2) { return {registration_code: matches[1]}; } else { return {}; } } function initializeStripe(key) { Stripe.setPublish...
/* globals Stripe */ import Ember from 'ember'; var $ = Ember.$; function registrationDataFromUrl(url) { var matches = url.match(/\?code=([a-z0-9]+)/); if (matches && matches.length === 2) { return {registration_code: matches[1]}; } else { return {}; } } function initializeStripe(key) { Stripe.setP...
Update regular expression for registration code
Update regular expression for registration code
JavaScript
mit
mitchlloyd/training,mitchlloyd/training,mitchlloyd/training
c3e1fa56c7b2690a59a2c6790eb83dd068746da0
tests/canvas.js
tests/canvas.js
$(document).ready(function() { module("Canvas presentations"); test("Check Canvas Presentations", function() { expect(1); ok(MITHGrid.Presentation.RaphSVG !== undefined, "RaphSVG Presentation exists"); //ok(MITHGrid.Presentation.SVGRect !== undefined, "SVGRect Presentation exists"); }); test("Check C...
$(document).ready(function() { module("Canvas presentations"); test("Check Canvas Presentations", function() { expect(1); ok(MITHGrid.Presentation.RaphSVG !== undefined, "RaphSVG Presentation exists"); }); test("Check Canvas availability", function() { var presentation; expect(3); try { pres...
Fix test missing the container element
Fix test missing the container element
JavaScript
apache-2.0
umd-mith/OACVideoAnnotator,umd-mith/OACVideoAnnotator,umd-mith/OACVideoAnnotator
a8bec029798389b68fe5081ff6736605cdc613a7
tests/extend.js
tests/extend.js
var $ = require('../') , assert = require('assert') $.import('Foundation') $.NSAutoreleasePool('alloc')('init') // Subclass 'NSObject', creating a new class named 'NRTest' var NRTest = $.NSObject.extend('NRTest') , counter = 0 // Add a new method to the NRTest class responding to the "description" selector NRTes...
var $ = require('../') , assert = require('assert') $.import('Foundation') $.NSAutoreleasePool('alloc')('init') // Subclass 'NSObject', creating a new class named 'NRTest' var NRTest = $.NSObject.extend('NRTest') , counter = 0 // Add a new method to the NRTest class responding to the "description" selector NRTes...
Remove this test case for now... still segfaulting for some crazy reason...
Remove this test case for now... still segfaulting for some crazy reason...
JavaScript
mit
telerik/NodObjC,mralexgray/NodObjC,TooTallNate/NodObjC,TooTallNate/NodObjC,jerson/NodObjC,jerson/NodObjC,telerik/NodObjC,jerson/NodObjC,mralexgray/NodObjC
1e2f798a9a67e57350180e4ac847eac504f11d57
ember-cli-build.js
ember-cli-build.js
/*jshint node:true*/ /* global require, module */ var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function(defaults) { var app = new EmberAddon(defaults, { // Add options here }); /* This build file specifies the options for the dummy test app of this addon, located ...
/*jshint node:true*/ /* global require, module */ var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function(defaults) { var app = new EmberAddon(defaults, { snippetSearchPaths: ['app', 'node_modules/ui-base-theme/addon'] }); /* This build file specifies the options for th...
Fix code snippets in styleguide
Fix code snippets in styleguide
JavaScript
mit
prototypal-io/ui-tomato-theme,prototypal-io/ui-tomato-theme
bfa5e93efef1b135edb4cf1807391b5bfc3646fe
src/redux/store.js
src/redux/store.js
// @flow /* eslint-disable arrow-body-style */ import { applyMiddleware, createStore } from 'redux' import { createEpicMiddleware } from 'redux-observable' import thunk from 'redux-thunk' import promiseMiddleware from 'redux-promise-middleware' import { routerMiddleware } from 'react-router-redux' import { composeWithD...
// @flow /* eslint-disable arrow-body-style */ import { applyMiddleware, createStore, compose } from 'redux' import { createEpicMiddleware } from 'redux-observable' import thunk from 'redux-thunk' import promiseMiddleware from 'redux-promise-middleware' import { routerMiddleware } from 'react-router-redux' import { dev...
Use redux compose with devToolsEnhancer
Use redux compose with devToolsEnhancer
JavaScript
apache-2.0
tribou/react-template,tribou/react-template,tribou/react-template,tribou/react-template,tribou/react-template
316152ea0fed4dca0b38276bdbf94884a2363b5a
packages/articles/server/routes/articles.js
packages/articles/server/routes/articles.js
'use strict'; var articles = require('../controllers/articles'); // Article authorization helpers var hasAuthorization = function(req, res, next) { if (req.article.user.id !== req.user.id) { return res.send(401, 'User is not authorized'); } next(); }; module.exports = function(Articles, app, auth...
'use strict'; var articles = require('../controllers/articles'); // Article authorization helpers var hasAuthorization = function(req, res, next) { if (res.adminEnabled() || (req.article.user && (req.article.user_id === req.user._id))) { next(); } else { return res.send(401, 'User is not a...
Allow for Admin to Edit / Delete
Allow for Admin to Edit / Delete Allow for Admin to Edit / Delete articles. Allow allow for edit / delete of articles if the user was deleted.
JavaScript
mit
rpalacios/preach-lander,paperdev7/web-project,suyesh/mean,Cneubauern/Test,Tukaiz/vmi,pavitlabs/mindappt,webapp-angularjs/football,MericGarcia/deployment-mean,reergymerej/counts,Edifice/OctoDo,dhivyaprp/Lets-Fix,szrobinli/mean,ngEdmundas/mean-user-management,cyberTrebuchet/this_is_forOM,Chien19861128/qa-app,kmdr/farmy,j...
f0144914bb08c8ffd3cd99a35fc9c4d4137b933c
Docs/static/custom/tooltips.js
Docs/static/custom/tooltips.js
var currentTip = null; var currentTipElement = null; function hideTip(evt, name, unique) { var el = document.getElementById(name); el.style.display = "none"; currentTip = null; } function findPos(obj) { // no idea why, but it behaves differently in webbrowser component if (window.location.search == "?inapp"...
var currentTip = null; var currentTipElement = null; function hideTip(evt, name, unique) { var el = document.getElementById(name); el.style.display = "none"; currentTip = null; } function findPos(obj) { var curleft = 0; var curtop = obj.offsetHeight; while (obj) { curleft += obj.offsetLeft; curt...
Fix tooltip positions in tutorial pages
Fix tooltip positions in tutorial pages
JavaScript
apache-2.0
NaseUkolyCZ/FunScript,NaseUkolyCZ/FunScript,mcgee/FunScript,ZachBray/FunScript,mcgee/FunScript,cloudRoutine/FunScript,tpetricek/FunScript,mcgee/FunScript,ovatsus/FunScript,nwolverson/FunScript,ZachBray/FunScript,ovatsus/FunScript,nwolverson/FunScript,ovatsus/FunScript,alfonsogarciacaro/FunScript,mcgee/FunScript,nwolver...
3784330b114e5e5b03c7bf1ab854c6865c0079ef
addon/mixins/token-adapter.js
addon/mixins/token-adapter.js
import Mixin from '@ember/object/mixin'; import { inject } from '@ember/service'; import { get, computed } from '@ember/object'; import { isEmpty } from '@ember/utils'; import config from 'ember-get-config'; import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin'; /** Adapter Mixin that works with...
import Mixin from '@ember/object/mixin'; import { inject } from '@ember/service'; import { get, computed } from '@ember/object'; import { isEmpty } from '@ember/utils'; import config from 'ember-get-config'; import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin'; /** Adapter Mixin that works with...
Fix computed header property issue
Fix computed header property issue
JavaScript
mit
jpadilla/ember-simple-auth-token,jpadilla/ember-cli-simple-auth-token,jpadilla/ember-simple-auth-token,jpadilla/ember-cli-simple-auth-token
6d76e2009091d9997c0a692b4fc983112d889653
src/util-lang.js
src/util-lang.js
/** * util-lang.js - The minimal language enhancement */ function isType(type) { return function(obj) { return {}.toString.call(obj) == "[object " + type + "]" } } var isObject = isType("Object") var isString = isType("String") var isArray = Array.isArray || isType("Array") var isFunction = isType("Function...
/** * util-lang.js - The minimal language enhancement */ var _object = {} function isType(type) { return function(obj) { return _object.toString.call(obj) == "[object " + type + "]" } } var isObject = isType("Object") var isString = isType("String") var isArray = Array.isArray || isType("Array") var isFunc...
Update share one object for check type.
Update share one object for check type.
JavaScript
mit
PUSEN/seajs,121595113/seajs,kuier/seajs,liupeng110112/seajs,evilemon/seajs,twoubt/seajs,treejames/seajs,seajs/seajs,mosoft521/seajs,Gatsbyy/seajs,lianggaolin/seajs,kaijiemo/seajs,coolyhx/seajs,imcys/seajs,sheldonzf/seajs,baiduoduo/seajs,liupeng110112/seajs,hbdrawn/seajs,judastree/seajs,yuhualingfeng/seajs,JeffLi1993/se...
b8a59f454394bcc271966a5ffea5d086c4207ce7
test/spec/controllers/formDropArea.js
test/spec/controllers/formDropArea.js
'use strict'; describe('Controller: FormDropAreaCtrl', function () { // load the controller's module beforeEach(module('confRegistrationWebApp')); var FormDropAreaCtrl, scope; // Initialize the controller and a mock scope beforeEach(inject(function ($controller, $rootScope) { scope = $rootScope.$n...
'use strict'; describe('Controller: FormDropAreaCtrl', function () { // load the controller's module beforeEach(module('confRegistrationWebApp')); var FormDropAreaCtrl, scope; // Initialize the controller and a mock scope beforeEach(inject(function ($controller, $rootScope) { scope = $rootScope.$n...
Test the move block fn
Test the move block fn
JavaScript
mit
CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web
bac969961ad951c10d0cdfa1d8b622c0d121d26f
app/components/select-date.js
app/components/select-date.js
import Ember from 'ember'; export default Ember.Component.extend({ userSettings: Ember.inject.service(), init () { this._super(); this.get('userSettings').timePeriods().then(response => { // Sort by latest on top this.set('timePeriods', response.sortBy('begins').reverse()); // Create ar...
import Ember from 'ember'; export default Ember.Component.extend({ btnActive: false, didReceiveAttrs () { this.set('timePeriodChanged', this.get('currentDate')); }, init () { this._super(); this.get('userSettings').timePeriods().then(response => { // Sort by latest on top this.set('tim...
Set variable for time period base on value passed to component
refactor: Set variable for time period base on value passed to component
JavaScript
mit
pe1te3son/spendings-tracker,pe1te3son/spendings-tracker
a2361ee313e42f3b3446fa4baf3c0bbd4e072c48
app/routes/index.js
app/routes/index.js
import Ember from 'ember'; export default Ember.Route.extend({ model: function() { var person_id = this.controllerFor('application').get('attrs.person.id'); return this.apijax.GET('/identifier.json', { 'person_id': person_id }); }, setupController: function(controller, model) { this._super(controller...
import Ember from 'ember'; export default Ember.Route.extend({ model: function() { var person = this.controllerFor('application').get('attrs.person'), person_id = person.id, model; if (!Ember.isEmpty(person.full_name)) { // we have full passed in details for the person, no need for loo...
Add ability to pass in full details for person
Add ability to pass in full details for person * now no need for ajax call in this case
JavaScript
mit
opengovernment/person-widget,opengovernment/person-widget
3480438a6698868c7cdcd743489d5e597e318cbe
app/main.js
app/main.js
// Install the configuration interface and set default values require('configuration.js'); // Use DIM styling overrides and our own custom styling require('beautification.js'); // Stores weapons pulled from our custom database require('weaponDatabase.js'); // Pulls down weapon data and broadcasts updates require('we...
// Install the configuration interface and set default values require('configuration.js'); // Use DIM styling overrides and our own custom styling require('beautification.js'); // Stores weapons pulled from our custom database require('weaponDatabase.js'); // Pulls down weapon data and broadcasts updates require('we...
Swap over to using fateBus.
Swap over to using fateBus.
JavaScript
mit
rslifka/fate_of_all_fools,rslifka/fate_of_all_fools
829354e73febe532252c48c171537db3b38eb749
public/angular/directives/twitter-button.js
public/angular/directives/twitter-button.js
'use strict'; (function(app) { app.directive('twitterBtn', [function() { var link = function() { !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https'; if(!d.getElementById(id)){ js=d.createElement(s); js.id=id; ...
'use strict'; (function(app) { app.directive('twitterBtn', [function() { var link = function() { !function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location)?'http':'https'; if(!d.getElementById(id)){ js = d.createElement(s); js.id = id...
Add more spaces to twitter js code.
Add more spaces to twitter js code.
JavaScript
mit
clamstew/timer
3c647e872aceea76b8bd4008032488909019a1f2
.eslintrc.js
.eslintrc.js
module.exports = { extends: [ 'nextcloud' ], /** * Allow jest syntax in the src folder */ env: { jest: true }, /** * Allow shallow import of @vue/test-utils in order to be able to use it in * the src folder */ rules: { "node/no-unpublished-import": ["error", { "allowModules": ["@vue/test-util...
module.exports = { extends: [ 'nextcloud' ], }
Remove eslint rules added to the eslint-config module
Remove eslint rules added to the eslint-config module Signed-off-by: Marco Ambrosini <3397c7e210a9d1588196cfebb12b2c6b133f6934@pm.me>
JavaScript
agpl-3.0
nextcloud/spreed,nextcloud/spreed,nextcloud/spreed
0591ffecc36e9b5daebb284de7b74737749c3040
app/components/sortable-items.js
app/components/sortable-items.js
import Ember from 'ember'; import SortableItems from 'sortable-items/components/sortable-items'; export default SortableItems;
import Ember from 'ember'; import SortableItems from 'ember-cli-sortable/components/sortable-items'; export default SortableItems;
Update import for the app with the correct ember-addon name
Update import for the app with the correct ember-addon name
JavaScript
mit
Cryrivers/ember-cli-sortable,JennieJi/ember-cli-sortable,jqyu/ember-cli-sortable,JennieJi/ember-cli-sortable,laantorchaweb/ember-cli-sortable,laantorchaweb/ember-cli-sortable,MaazAli/ember-cli-sortable,Cryrivers/ember-cli-sortable,MaazAli/ember-cli-sortable,jqyu/ember-cli-sortable
ce6666eace0a1b6f0d50db3f751fedf3bf1153a7
utils/context.js
utils/context.js
'use strict'; var _ = require('lodash'); var convert = require('./convert.js'); var context = { getDefaults: getDefaults }; function getDefaults(name, module) { var folderName = convert.moduleToFolder(module); return { module: module, camelName: _.camelCase(name), controller: _.upperFirst(_.camelCas...
'use strict'; var _ = require('lodash'); var convert = require('./convert.js'); var context = { getDefaults: getDefaults }; function getDefaults(name, module) { var folderName = convert.moduleToFolder(module); return _.clone({ module: module, camelName: _.camelCase(name), controller: _.upperFirst(_....
Return new instance of object
Return new instance of object
JavaScript
mit
sysgarage/generator-sys-angular,sysgarage/generator-sys-angular
fad9ff7971146796207687d03df30c8f41d77290
rakuten_mail_unchecker.user.js
rakuten_mail_unchecker.user.js
// ==UserScript== // @name Rakuten Mail Magazine Unchecker // @namespace https://github.com/takamario/gm_script // @description Rakuten Mail Magazine Unchecker // @include https://order.step.rakuten.co.jp/rms/mall/basket/vc* // @include https://basket.step.rakuten.co.jp/rms/mall/bs/confi...
// ==UserScript== // @name Rakuten Mail Magazine Unchecker // @namespace https://github.com/takamario/gm_script // @description Rakuten Mail Magazine Unchecker // @include https://order.step.rakuten.co.jp/rms/mall/basket/vc* // @include https://basket.step.rakuten.co.jp/rms/mall/bs/confi...
Add exclude books cart page
Add exclude books cart page
JavaScript
mit
takamario/gm_script
fb0857c7e26ec7d3f9e1e3dca474769d52fc5cef
addon/mixins/export-to-svg.js
addon/mixins/export-to-svg.js
import Ember from "ember"; var container = '<g transform="scale(%s)">%h</g>'; export default Ember.Mixin.create({ exportToSvg: function(){ var svg = this.$("svg").clone(), width = +svg.find("desc.width")[0].innerHTML, div = document.createElement("div"), svgContent, promise; ...
import Ember from "ember"; var container = '<g transform="scale(%s)">%h</g>'; export default Ember.Mixin.create({ exportToSvg: function(){ var svg = this.$("svg").clone(), width = +svg.find("desc.width")[0].innerHTML, div = document.createElement("div"), svgContent, promise; ...
Remove base svg from exported svg
Remove base svg from exported svg
JavaScript
apache-2.0
porkepic/squiggle,porkepic/squiggle
3690a15fc48242d95456fabd1f923f121dc0a2db
app/components/add-expense.js
app/components/add-expense.js
import Ember from 'ember'; // import $ from 'jquery'; export default Ember.Component.extend({ expense: { sum: '', category: '', name: '' }, currency: '£', expenseCategories: [ 'Charity', 'Clothing', 'Education', 'Events', 'Food', 'Gifts', 'Healthcare', 'Household', ...
import Ember from 'ember'; // import $ from 'jquery'; export default Ember.Component.extend({ expense: { sum: '', category: '', name: '' }, currency: '£', expenseCategories: [ 'Charity', 'Clothing', 'Education', 'Events', 'Food', 'Gifts', 'Healthcare', 'Household', ...
Check if form is valid and then send save action to parent
refactor: Check if form is valid and then send save action to parent
JavaScript
mit
pe1te3son/spendings-tracker,pe1te3son/spendings-tracker
dfbde5dcd59fce8101bdebf51d0b7489a07e209e
Gruntfile.js
Gruntfile.js
'use strict'; module.exports = function(grunt) { // Configuration. grunt.initConfig({ jscs: { options: { config: '.jscsrc' }, grunt: 'Gruntfile.js', tasks: 'tasks/**/*.js' }, jshint: { options: { ...
'use strict'; module.exports = function(grunt) { // Configuration. grunt.initConfig({ jscs: { options: { config: '.jscsrc' }, grunt: 'Gruntfile.js', tasks: 'tasks/**/*.js' }, jshint: { options: { ...
Include testing workflow in default task.
Include testing workflow in default task.
JavaScript
mit
joshuaspence/grunt-npm-validate
631aeb8a4b81645ad36852dc1076396a625208d1
Gruntfile.js
Gruntfile.js
var path = require('path'); module.exports = function(grunt) { grunt.initConfig({ 'pkg': grunt.file.readJSON('package.json'), 'dtsGenerator': { options: { baseDir: './', name: 'core-components', out: './index.d.ts', excludes: [ 'typings/**', '!typings...
var path = require('path'); module.exports = function(grunt) { grunt.initConfig({ 'pkg': grunt.file.readJSON('package.json'), 'dtsGenerator': { options: { baseDir: './', name: 'core-components', out: './index.d.ts', excludes: [ 'typings/**', '!typings...
Add some comments for the vulcanize grunt task
Add some comments for the vulcanize grunt task
JavaScript
mit
debugworkbench/core-components,debugworkbench/core-components,debugworkbench/core-components
0bf04823deb5eb3c673ae8cd7663e5f8ff59de90
Gruntfile.js
Gruntfile.js
'use strict'; module.exports = function (grunt) { require('time-grunt')(grunt); grunt.initConfig({ eslint: { all: { src: [ '*.js', 'bin/grunth', 'lib/*.js', ], }, }, jsc...
'use strict'; module.exports = function (grunt) { require('time-grunt')(grunt); grunt.initConfig({ eslint: { all: { src: [ '*.js', 'bin/grunth', 'lib/*.js', ], }, }, jsc...
Correct messages printed during tests
Correct messages printed during tests
JavaScript
mit
EE/grunth-cli
04df28e0092f11aec568d26fea8cca5118756bce
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-git'); grunt.loadNpmTasks('grunt-shell'); grunt.initConfig( { gitclone: { mastercointools: { options: { repository: 'https://github.com/curtislacy/mastercoin-tools.git', branch: 'Specify-Directory', dire...
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-git'); grunt.loadNpmTasks('grunt-shell'); grunt.initConfig( { gitclone: { mastercointools: { options: { repository: 'https://github.com/curtislacy/mastercoin-tools.git', branch: 'master', directory: 'nod...
Switch to using the master branch of my mastercoin-tools fork.
Switch to using the master branch of my mastercoin-tools fork.
JavaScript
agpl-3.0
VukDukic/omniwallet,ripper234/omniwallet,arowser/omniwallet,Nevtep/omniwallet,FuzzyBearBTC/omniwallet,VukDukic/omniwallet,maran/omniwallet,arowser/omniwallet,achamely/omniwallet,OmniLayer/omniwallet,curtislacy/omniwallet,ripper234/omniwallet,habibmasuro/omniwallet,VukDukic/omniwallet,OmniLayer/omniwallet,habibmasuro/om...
196a15dca3290f4fed10470516840a29b1af3588
Gruntfile.js
Gruntfile.js
'use strict'; module.exports = function (grunt) { grunt.initConfig({ jshint: { options: { jshintrc: '.jshintrc' }, gruntfile: { src: 'Gruntfile.js' }, lib: { src: ['./*.js', 'routes/*.js', 'models/*.js'] } }, watch: { gruntfile: { ...
'use strict'; module.exports = function (grunt) { grunt.initConfig({ jshint: { options: { jshintrc: '.jshintrc' }, gruntfile: { src: 'Gruntfile.js' }, lib: { src: ['./*.js', 'routes/*.js', 'models/*.js'] } }, watch: { gruntfile: { ...
Include watching config.json for changes
Include watching config.json for changes
JavaScript
mit
GuusK/disruptIT,GuusK/disruptIT,GuusK/disruptIT,GuusK/disruptIT
33d989b7a73129a9198da4c0147995cb19500364
js/cookies-init.js
js/cookies-init.js
$(function handleSimpleIntegration() { cookieChoices.showCookieBar({ linkHref: '#', cookieText: 'spine.io uses cookies to help operate the site and gather analytics data. You can read more about it in our', linkText: 'Privacy&nbsp;Statement', dismissText: 'I&nbsp;agree', dis...
$(function handleSimpleIntegration() { cookieChoices.showCookieBar({ linkHref: '#', cookieText: 'spine.io uses cookies to help operate the site and gather analytics data.', // Unlink this 2 lines to add link to Privacy Statements // cookieText: 'spine.io uses cookies to help operate...
Hide link to the Privacy Statement in the cookie notification
Hide link to the Privacy Statement in the cookie notification
JavaScript
apache-2.0
SpineEventEngine/SpineEventEngine.github.io,SpineEventEngine/SpineEventEngine.github.io,SpineEventEngine/SpineEventEngine.github.io,SpineEventEngine/SpineEventEngine.github.io,SpineEventEngine/SpineEventEngine.github.io,SpineEventEngine/SpineEventEngine.github.io
1e6dd2f89b973d9fb1dc8e23d1cd77bb0dce24e4
lib/auth/vault.js
lib/auth/vault.js
import crypto from 'crypto'; import { accountsKeyedbyAccessKey } from './vault.json'; export function hashSignature(stringToSign, secretKey, algorithm) { const hmacObject = crypto.createHmac(algorithm, secretKey); return hmacObject.update(stringToSign).digest('base64'); } const vault = { authenticateV2Re...
import crypto from 'crypto'; import { accountsKeyedbyAccessKey } from './vault.json'; export function hashSignature(stringToSign, secretKey, algorithm) { const hmacObject = crypto.createHmac(algorithm, secretKey); return hmacObject.update(stringToSign).digest('base64'); } const vault = { authenticateV2Re...
Add check for sha256 hashed signature
FT: Add check for sha256 hashed signature
JavaScript
apache-2.0
truststamp/S3,truststamp/S3,tomateos/S3,tomateos/S3,tomateos/S3,truststamp/S3,lucisilv/Silviu_S3-Antidote,lucisilv/Silviu_S3-Antidote,lucisilv/Silviu_S3-Antidote,lucisilv/Silviu_S3-Antidote,scality/S3,lucisilv/Silviu_S3-Antidote,tomateos/S3,tomateos/S3,truststamp/S3,scality/S3,scality/S3,truststamp/S3,lucisilv/Silviu_S...
0b69c73dfa7f9873176aac684f8e5800ce48b308
example-loop.js
example-loop.js
var TiVoRemote = require('./TiVoRemote'); var readline = require('readline'); var config = { ip: '192.168.1.100', port: 31339 } var remote = new TiVoRemote(config); var rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.setPrompt(''); remote.on('channel', function(channel) { cons...
var TiVoRemote = require('./TiVoRemote'); var readline = require('readline'); if (process.argv.length < 3) { console.log('Usage: <script> <ip>'); process.exit(1); } var config = { ip: process.argv[2], port: 31339 } var remote = new TiVoRemote(config); var rl = readline.createInterface({ input: process.stdin,...
Allow setting IP from command line argument
Allow setting IP from command line argument
JavaScript
mit
mattjgalloway/homebridge-tivo
4a67c4969fc66dd10d9fc6fb7c07be91c5ac2838
src/welcome.js
src/welcome.js
import {ArrayExtensions} from './arrayextensions'; import {Letter} from './letter'; import {moveBefore, DIRECTION} from 'aurelia-dragula'; export class Welcome { constructor() { this.dragDirection = DIRECTION.HORIZONTAL; this.reset(); } get unjumbledName() { return this.nameLetters.reduce((previous...
import {ArrayExtensions} from './arrayextensions'; import {Letter} from './letter'; import {moveBefore, DIRECTION} from 'aurelia-dragula'; export class Welcome { constructor() { this.dragDirection = DIRECTION.HORIZONTAL; this.reset(); } get unjumbledName() { return this.nameLetters.reduce((previous...
Make the code slightly clearer
Make the code slightly clearer
JavaScript
apache-2.0
michaelmalonenz/aurelia-dragula-example,michaelmalonenz/aurelia-dragula-example
d7b23057f03f2af55e032999f8161b6458d8dd77
spec/ui/control.js
spec/ui/control.js
define(['backbone', 'cilantro', 'text!/mock/fields.json'], function (Backbone, c, fieldsJSON) { var fields = new Backbone.Collection(JSON.parse(fieldsJSON)); describe('FieldControl', function() { var control; describe('Base', function() { beforeEach(function() { con...
define(['backbone', 'cilantro', 'text!/mock/fields.json'], function (Backbone, c, fieldsJSON) { var fields = new Backbone.Collection(JSON.parse(fieldsJSON)); describe('FieldControl', function() { var control; describe('Base', function() { beforeEach(function() { con...
Update spec to take in account null fields in context model
Update spec to take in account null fields in context model
JavaScript
bsd-2-clause
chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro
ccac850fcd3878adbb54e9ae8f92e08f29c81d6f
test/helper.js
test/helper.js
'use strict'; //supress log messages process.env.LOG_LEVEL = 'fatal'; var chai = require('chai'), cap = require('chai-as-promised'); global.sinon = require('sinon'); global.fs = require('fs'); global.utils = require('radiodan-client').utils; global.EventEmitter = require('events').EventE...
'use strict'; //supress log messages process.env.LOG_LEVEL = 'fatal'; var chai = require('chai'), cap = require('chai-as-promised'); global.sinon = require('sinon'); global.fs = require('fs'); global.utils = require('radiodan-client').utils; global.EventEmitter = require('events').EventE...
Add fake Radiodan client objects
Add fake Radiodan client objects
JavaScript
apache-2.0
radiodan/magic-button,radiodan/magic-button
083c74399f6c260d1738272c60b282d83b2a0b44
document/documentConversion.js
document/documentConversion.js
import DocumentConfigurator from './DocumentConfigurator' import DocumentModel from './DocumentModel' import DocumentJSONConverter from './DocumentJSONConverter' import DocumentHTMLImporter from './DocumentHTMLImporter' import DocumentHTMLExporter from './DocumentHTMLExporter' function importJSON (content) { let doc...
import DocumentConfigurator from './DocumentConfigurator' import DocumentModel from './DocumentModel' import DocumentJSONConverter from './DocumentJSONConverter' import DocumentHTMLImporter from './DocumentHTMLImporter' import DocumentHTMLExporter from './DocumentHTMLExporter' function importJSON (content) { let doc...
Remove the data-id attribute on HTML export
Remove the data-id attribute on HTML export
JavaScript
apache-2.0
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
22b7b0759a48eadbb3268f30d34926e43ee7d2ca
src/database/DataTypes/InsuranceProvider.js
src/database/DataTypes/InsuranceProvider.js
import Realm from 'realm'; export class InsuranceProvider extends Realm.Object {} InsuranceProvider.schema = { name: 'InsuranceProvider', primaryKey: 'id', properties: { id: 'string', name: 'string', comment: 'string?', validityDays: 'int', isActive: 'bool', policies: { type: 'link...
import Realm from 'realm'; export class InsuranceProvider extends Realm.Object {} InsuranceProvider.schema = { name: 'InsuranceProvider', primaryKey: 'id', properties: { id: 'string', name: { type: 'string', optional: true }, comment: { type: 'string', optional: true }, validityDays: { type: 'in...
Add update to provider properties
Add update to provider properties
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
92538b650ec1da071fe6be0697234c6236b118a1
build-dev-bundle.js
build-dev-bundle.js
var path = require("path"); var stealTools = require("steal-tools"); var promise = stealTools.bundle({ config: path.join(__dirname, "package.json!npm") }, { filter: [ "**/*", "package.json" ], minify: true });
var path = require("path"); var stealTools = require("steal-tools"); stealTools.bundle({ config: path.join(__dirname, "package.json!npm") }, { filter: [ "**/*", "package.json" ], minify: true }).catch(function(error) { console.error(error); process.exit(1); });
Exit with an error when the deps-bundle script fails
Exit with an error when the deps-bundle script fails Previously, if you ran the deps-bundle script and steal-tools reported an error, the script would still exit successfully and the next script would run (e.g. when building the site/docs). This would leave you with an out-of-date (or non-existent) dev-bundle. This f...
JavaScript
mit
bitovi/canjs,bitovi/canjs,bitovi/canjs,bitovi/canjs
6552de30288ec17a669a949f1808bd6bb817a1ae
js/change_logos.js
js/change_logos.js
window.addEventListener("load", function() { const EXTRA_IMAGES = document.getElementsByClassName("alt-logo-img"); EXTRA_IMAGES[0].classList.toggle("active"); EXTRA_IMAGES[EXTRA_IMAGES.length - 1].classList.toggle("active"); var just_switched = false; Array.from(EXTRA_IMAGES).forEach(function(img, idx) { var ne...
window.addEventListener("load", function() { const EXTRA_IMAGES = document.getElementsByClassName("alt-logo-img"); EXTRA_IMAGES[0].classList.toggle("active"); EXTRA_IMAGES[EXTRA_IMAGES.length - 1].classList.toggle("active"); var just_switched = false; Array.from(EXTRA_IMAGES).forEach(function(img, idx) { var ne...
Reduce if to a modulo for changing logos
Reduce if to a modulo for changing logos Thanks to @karolsw2 for pointing this out Ref: #1
JavaScript
mit
nabijaczleweli/nabijaczleweli.github.io,nabijaczleweli/nabijaczleweli.github.io
299868764c1340bc5cec893ea1081b8947d14838
scripts/createsearchindex.js
scripts/createsearchindex.js
console.log("================================="); console.log("Creating search index..."); console.log("================================="); // Scan through all content/ directories // For each markdown file // CreateIndex(title,content,path) var lunr = require('lunr'); var idx = lunr(function () { this.fiel...
console.log("================================="); console.log("Creating search index..."); console.log("================================="); // Scan through all content/ directories // For each markdown file // CreateIndex(title,content,path) var lunr = require('lunr'); var idx = lunr(function () { this.fiel...
Add super hero search data. Format the search output.
Add super hero search data. Format the search output.
JavaScript
mit
govau/service-manual
30273baa75c1319034d46f254176b5701125a3b5
server/api/breweries/breweryRoutes.js
server/api/breweries/breweryRoutes.js
'use strict'; const router = require('express').Router(); const brewery = require('./breweryController'); router.route('/') .get(brewery.get) .post(brewery.post); module.exports = router;
'use strict'; const router = require('express').Router(); const brewery = require('./breweryController'); router.route('/:location') .get(brewery.get) .post(brewery.post); module.exports = router;
Add route param for location
Add route param for location
JavaScript
mit
ntoung/beer.ly,ntoung/beer.ly
b2f9d7066c4bf6dff22a448e2d34e3a00f7e1431
lib/catch-links.js
lib/catch-links.js
module.exports = function (root, cb) { root.addEventListener('click', (ev) => { if (ev.altKey || ev.ctrlKey || ev.metaKey || ev.shiftKey || ev.defaultPrevented) { return true } var anchor = null for (var n = ev.target; n.parentNode; n = n.parentNode) { if (n.nodeName === 'A') { ...
module.exports = function (root, cb) { root.addEventListener('click', (ev) => { if (ev.altKey || ev.ctrlKey || ev.metaKey || ev.shiftKey || ev.defaultPrevented) { return true } var anchor = null for (var n = ev.target; n.parentNode; n = n.parentNode) { if (n.nodeName === 'A') { ...
Refactor magnet URI link catch logic
Refactor magnet URI link catch logic
JavaScript
agpl-3.0
ssbc/patchwork,ssbc/patchwork
8de8572bcb78739bc25f471dfbfec3ab7e75964c
lib/bot/queries.js
lib/bot/queries.js
var r = require('rethinkdb'); // Number of seconds after which Reddit will archive an article // (180 days): https://github.com/reddit/reddit/commit/b7b24d2e9fa06ba37ea78e0275dce86d95158e64 var archiveLimit = 180 * 24 * 60 * 60; exports.mostUrgentSubject = r.table('subjects') .between(r.now().sub(archiveLimit),r.no...
var r = require('rethinkdb'); // Number of seconds after which Reddit will archive an article // (180 days): https://github.com/reddit/reddit/commit/b7b24d2e9fa06ba37ea78e0275dce86d95158e64 var archiveLimit = 180 * 24 * 60 * 60; exports.mostUrgentSubject = r.table('subjects') .between(r.now().sub(archiveLimit),r.no...
Put sub-index immediately after limit on query
Put sub-index immediately after limit on query
JavaScript
mit
stuartpb/QIKlaxonBot,stuartpb/QIKlaxonBot
c4c365e613a68109aa33d7a14fc0041b3cf5c148
lib/less/render.js
lib/less/render.js
var PromiseConstructor = typeof Promise === 'undefined' ? require('promise') : Promise; module.exports = function(environment, ParseTree, ImportManager) { var render = function (input, options, callback) { var parse = require('./parse')(environment, ParseTree, ImportManager); if (typeof(options) =...
var PromiseConstructor = typeof Promise === 'undefined' ? require('promise') : Promise; module.exports = function(environment, ParseTree, ImportManager) { var render = function (input, options, callback) { if (typeof(options) === 'function') { callback = options; options = {}; ...
Fix parse refactor - this passed to the plugin manager must be less
Fix parse refactor - this passed to the plugin manager must be less
JavaScript
apache-2.0
foresthz/less.js,chenxiaoxing1992/less.js,wjb12/less.js,NaSymbol/less.js,evocateur/less.js,less/less.js,seven-phases-max/less.js,MrChen2015/less.js,SkReD/less.js,deciament/less.js,christer155/less.js,yuhualingfeng/less.js,xiaoyanit/less.js,NirViaje/less.js,royriojas/less.js,royriojas/less.js,less/less.js,bendroid/less....
f7032ee4eb1b17cdab455259ea46e4bba055b5da
lib/parsers/sax.js
lib/parsers/sax.js
var util = require('util'); var sax = require('sax'); var TreeBuilder = require('./../treebuilder').TreeBuilder; function XMLParser(target) { var self = this; this.parser = sax.parser(true); this.target = (target) ? target : new TreeBuilder(); /* TODO: would be nice to move these out */ this.parser.onope...
var util = require('util'); var sax = require('sax'); var TreeBuilder = require('./../treebuilder').TreeBuilder; function XMLParser(target) { this.parser = sax.parser(true); this.target = (target) ? target : new TreeBuilder(); this.parser.onopentag = this._handleOpenTag.bind(this); this.parser.ontext = thi...
Move methods out of the constructor.
Move methods out of the constructor.
JavaScript
apache-2.0
racker/node-elementtree
73d49ad830e028c64d5a68754757dcfc38d34792
source/test/authenticate-flow-test.js
source/test/authenticate-flow-test.js
import { describe } from 'riteway'; import dsm from '../dsm'; const SIGNED_OUT = 'signed_out'; const AUTHENTICATING = 'authenticating'; const actionStates = [ ['initialize', SIGNED_OUT, ['sign in', AUTHENTICATING // ['report error', 'error', // ['handle error', 'signed out'] // ], // ...
import { describe } from 'riteway'; import dsm from '../dsm'; const SIGNED_OUT = 'signed_out'; const AUTHENTICATING = 'authenticating'; const actionStates = [ ['initialize', SIGNED_OUT, ['sign in', AUTHENTICATING // ['report error', 'error', // ['handle error', 'signed out'] // ], // ...
Fix test to use main unit test files standards
Fix test to use main unit test files standards The main unit test file tested action creators against `reducer().status` instead of the full state. There seems to be inconsistencies in the payload for action creators which caused these tests to fail. I have updated the tests to only check the status instead of the ent...
JavaScript
mit
ericelliott/redux-dsm
12f75878ccc243dbd40a8f755133fb19a97f9954
htmlbars-loader.js
htmlbars-loader.js
var path = require('path') var loaderUtils = require('loader-utils') var HtmlbarsCompiler = require('ember-cli-htmlbars') var DEFAULT_TEMPLATE_COMPILER = 'components-ember/ember-template-compiler.js' var templateTree var appPath /* * options: * - appPath: default assuming webpack.config.js in root folder + ./app ...
var path = require('path') var loaderUtils = require('loader-utils') var HtmlbarsCompiler = require('ember-cli-htmlbars') var DEFAULT_TEMPLATE_COMPILER = 'components-ember/ember-template-compiler.js' var templateTree var appPath /* * options: * - appPath: default assuming webpack.config.js in root folder + ./app ...
Add indentation fix on htmlbar loader.
Add indentation fix on htmlbar loader.
JavaScript
mit
tulios/ember-webpack-loaders
de51636cdf89ae16ab0f9070127acffad5c3b277
js/ClientApp.js
js/ClientApp.js
var div = React.DOM.div; var h1 = React.DOM.h1; var MyTitle = React.createClass({ render: function() { return ( div(null, h1(null, this.props.title)) ) } }) var MyTitleFactory = React.createFactory(MyTitle) var MyFirstComponent = React.createClass({ render: function() { return ( ...
var div = React.DOM.div; var h1 = React.DOM.h1; var MyTitle = React.createClass({ render: function() { return ( div(null, h1({ style: {color: this.props.color} }, this.props.title)) ) } }) var MyTitleFactory = React.createFactory(MyTitle) var MyFirstComponent = React.createClass({ render: fu...
Add props to the components
Add props to the components
JavaScript
mit
jbarbettini/intro-to-react-workshop,jbarbettini/intro-to-react-workshop
197029775986b12767f07084b269f6174e85b988
middleware/intl.js
middleware/intl.js
'use strict'; var path = require('path'); var config = require('../config'); module.exports = function (req, res, next) { var app = req.app, locales = app.get('locales'), locale = req.acceptsLanguage(locales) || app.get('default locale'), messages = require(path.join(config.dirs.i...
'use strict'; var path = require('path'); var config = require('../config'); module.exports = function (req, res, next) { var app = req.app, locales = app.get('locales'), locale = req.acceptsLanguage(locales) || app.get('default locale'), messages = require(path.join(config.dirs.i...
Remove APP prefix from middleware
Remove APP prefix from middleware
JavaScript
bsd-3-clause
ericf/formatjs-site,okuryu/formatjs-site,ericf/formatjs-site
8fc701cdda3fe6bb65d17b854787be36d5236d92
models/analysis.js
models/analysis.js
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var analysisSchema = new Schema({ user_id: {type: Schema.Types.ObjectId, ref: 'User', required: true}, analysis_name: {type: String, required: true}, analysis: {type: String, required: true}, corpora_ids: [{type: String, required: true}],...
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var analysisSchema = new Schema({ user_id: {type: Schema.Types.ObjectId, ref: 'User', required: true}, analysis_name: {type: String, required: true}, eta: {type: Number, required: true}, time_created: {type: Date, required: true}, analysis...
Add eta and time created to db schema
Add eta and time created to db schema
JavaScript
mit
rigatoni/linguine-node,rigatoni/linguine-node,Pastafarians/linguine-node,Pastafarians/linguine-node
eb95bb8ff136c601257b3143f9f2c9ecee7b8fc1
dom-text.js
dom-text.js
module.exports = DOMText function DOMText(value, owner) { if (!(this instanceof DOMText)) { return new DOMText(value) } this.data = value || "" this.length = this.data.length this.ownerDocument = owner || null } DOMText.prototype.type = "DOMTextNode" DOMText.prototype.nodeType = 3 DOMTex...
module.exports = DOMText function DOMText(value, owner) { if (!(this instanceof DOMText)) { return new DOMText(value) } this.data = value || "" this.length = this.data.length this.ownerDocument = owner || null } DOMText.prototype.type = "DOMTextNode" DOMText.prototype.nodeType = 3 DOMText...
Add nodeName property to text nodes
Add nodeName property to text nodes
JavaScript
mit
Raynos/min-document,Raynos/min-document
3a352b8f2d9795eebf2d106dada7cca026c42035
bin/index.js
bin/index.js
#! /usr/bin/env node 'use strict'; var yarnOrNpm = require('../index'); // Execute the command try { const { status } = yarnOrNpm.spawn.sync( process.argv.slice(2), { stdio: 'inherit' } ); process.exit(status); } catch (err) { console.log(err); process.exit(1); }
#! /usr/bin/env node 'use strict'; const yarnOrNpm = require('../index'); // Execute the command try { const status = yarnOrNpm.spawn.sync( process.argv.slice(2), { stdio: 'inherit' } ).status process.exit(status); } catch (err) { console.log(err); process.exit(1); }
Replace destructuring with regular property access
Replace destructuring with regular property access
JavaScript
mit
camacho/yarn-or-npm
64bb2784ffa12a6ae67596dcc98c129bca81f1f6
src/formatter.js
src/formatter.js
class JsonFormatter { static stringify(object, options) { options = { space: options.prettify ? ' ' : null } return JSON.stringify(object, null, options.space) } static parse(string) { return JSON.parse(string) } } export default { json: JsonFormatter }
class JsonFormatter { static stringify(object, options) { options = { space: (options && options.prettify) ? ' ' : null } return JSON.stringify(object, null, options.space) } static parse(string) { return JSON.parse(string) } } export default { json: JsonFormatter }
Make stringify's options parameter optional
Make stringify's options parameter optional
JavaScript
mit
lujjjh/ea-utils
6be75b7f6ce6ee69251ee59f8295e2f1e6bd0356
public/js/oauthLogin.js
public/js/oauthLogin.js
var parts = window.location.hash.slice(1).split('&'); parts.forEach(function (value) { if (value.substr(0, 12) === "access_token") { var token = value.substr(13); $.ajax({ type: 'get', url: 'https://api.andbang.com/me', dataType: 'json', headers: { ...
var parts = window.location.hash.slice(1).split('&'); parts.forEach(function (value) { if (value.substr(0, 12) === "access_token") { var token = value.substr(13); $.ajax({ type: 'get', url: 'https://api.andbang.com/me', dataType: 'json', headers: { ...
Use non-port url for otalk.im ws url
Use non-port url for otalk.im ws url
JavaScript
mit
heyLu/kaiwa,unam3/kaiwa,birkb/kaiwa,warcode/kaiwa,unam3/kaiwa,digicoop/kaiwa,rogervaas/otalk-im-client,birkb/kaiwa,weiss/kaiwa,nsg/kaiwa,lasombra/kaiwa,nsg/kaiwa,syci/kaiwa,digicoop/kaiwa,heyLu/kaiwa,otalk/otalk-im-client,otalk/otalk-im-client,weiss/kaiwa,birkb/kaiwa,nsg/kaiwa,rogervaas/otalk-im-client,warcode/kaiwa,di...
30895bdd709819dbc7c8f2ec0d4398fb377f00f6
node/#/_exclude.js
node/#/_exclude.js
'use strict'; var d = require('d/d') , defineProperty = Object.defineProperty; module.exports = function () { var text; if (!this.parentNode) return; if (!this._domExtLocation) { defineProperty(this, '_domExtLocation', d(this.parentNode.insertBefore( text = this.ownerDocument.createTextNode(''), this.ne...
'use strict'; var d = require('d') , defineProperty = Object.defineProperty; module.exports = function () { var text; if (!this.parentNode) return; if (!this._domExtLocation) { defineProperty(this, '_domExtLocation', d(this.parentNode.insertBefore( text = this.ownerDocument.createTextNode(''), this.next...
Update up to changes in d package
Update up to changes in d package
JavaScript
mit
medikoo/dom-ext
11ad49c32359d07e95487e27651968cd9300e822
src/models/Post.js
src/models/Post.js
import cuid from 'cuid'; import {database, auth} from '@/config/firebase'; export default function (post = {}) { // Properties this.id = post.id || cuid(); this.title = post.title || ''; this.created = post.created || Date.now(); this.lastEdited = post.lastEdited || null; this.lastSaved = post.lastSaved |...
import cuid from 'cuid'; import {database, auth} from '@/config/firebase'; export default function (post = {}) { // Properties this.id = post.id || cuid(); this.created = post.created || Date.now(); this.lastEdited = post.lastEdited || null; this.lastSaved = post.lastSaved || null; this.lastPublished = po...
Refactor the title into a getter method
Refactor the title into a getter method
JavaScript
mit
tuelsch/bolg,tuelsch/bolg
996ed3e9977489df473230cadc3973ba24d0ea6d
tests/controllers/reverseControllerTests.js
tests/controllers/reverseControllerTests.js
describe("ReverseController", function () { var fakeReverseFilter; // See: https://docs.angularjs.org/api/ng/provider/$filterProvider beforeEach(module("app.controllers", function ($filterProvider) { console.log($filterProvider); fakeReverseFilter = jasmine.createSpy("fakeReverseFilter"); ...
describe("ReverseController", function () { var fakeReverseFilter; // See: https://docs.angularjs.org/api/ng/provider/$filterProvider beforeEach(module("app.controllers", function ($filterProvider) { fakeReverseFilter = jasmine.createSpy("fakeReverseFilter"); $filterProvider.register("reve...
Add example of faking a filter
Add example of faking a filter
JavaScript
mit
mariojvargas/angularjs-stringcalc,mariojvargas/angularjs-stringcalc