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
a6f9255f268d8b17d2820aa0cc32a18cee3f778f
.postcssrc.js
.postcssrc.js
module.exports = { plugins: { '@wearegenki/ui-postcss': {}, }, };
module.exports = { plugins: { '@wearegenki/ui-postcss': {}, }, }; // TODO: Put this in the docs (both ways, depending on array or object type of config): // https://github.com/michael-ciniawsky/postcss-load-config // const { uiPostcssPreset } = require('@wearegenki/ui'); // module.exports = { // plugins: ...
Add comments about ui-postcss in docs
Add comments about ui-postcss in docs
JavaScript
isc
WeAreGenki/wag-ui
358d2a9b5d2959031fa685045a9f1a07f2d27c78
client.src/shared/views/gistbook-view/views/text/edit/index.js
client.src/shared/views/gistbook-view/views/text/edit/index.js
// // textEditView // Modify text based on a textarea // import ItemView from 'base/item-view'; export default ItemView.extend({ template: 'editTextView', tagName: 'textarea', className: 'gistbook-textarea', // Get the value of the element value() { return this.el.value; } });
// // textEditView // Modify text based on a textarea // import ItemView from 'base/item-view'; export default ItemView.extend({ template: 'editTextView', tagName: 'textarea', className: 'gistbook-textarea', // Get the value of the element, // stripping line breaks from the // start and end value() {...
Remove new lines from text areas on save.
Remove new lines from text areas on save. Resolves #390
JavaScript
mit
jmeas/gistbook,joshbedo/gistbook
5aa339bb60364eb0c43690c907cc391788811a24
src/index.js
src/index.js
/* eslint-disable no-console */ import { createFilter } from 'rollup-pluginutils'; import { resolveSourceMap } from 'source-map-resolve'; import { readFile } from 'fs'; import { promisify } from './utils'; const readFileAsync = promisify(readFile); const resolveSourceMapAsync = promisify(resolveSourceMap); export def...
/* eslint-disable no-console */ import { createFilter } from 'rollup-pluginutils'; import { resolve } from 'source-map-resolve'; import { readFile } from 'fs'; import { promisify } from './utils'; const readFileAsync = promisify(readFile); const resolveSourceMapAsync = promisify(resolve); export default function sour...
Include sourcesContent in source map
Include sourcesContent in source map
JavaScript
mit
maxdavidson/rollup-plugin-sourcemaps,maxdavidson/rollup-plugin-sourcemaps
fbd3bd5365b8dd1b6f4773e22f7b94fe4126acfa
src/index.js
src/index.js
import React from 'react'; import { render } from 'react-dom'; import { Provider } from "react-redux"; import { createStore, applyMiddleware } from "redux"; import thunk from "redux-thunk"; import App from "./containers/App"; import rootReducer from "./reducers"; import { getTodosIfNeeded } from "./actions"; const cre...
import React from 'react'; import { render } from 'react-dom'; import { Provider } from "react-redux"; import { createStore, applyMiddleware } from "redux"; import thunk from "redux-thunk"; import injectTapEventPlugin from "react-tap-event-plugin"; import App from "./containers/App"; import rootReducer from "./reducers...
Add react tap event plugin
Add react tap event plugin
JavaScript
mit
alice02/go-todoapi,alice02/go-todoapi,alice02/go-todoapi
1481d1905b237c768d45335cc431d567f5676d87
src/index.js
src/index.js
//Get the required shit together const config = require("./config.json"); const Discord = require("discord.js"); const client = new Discord.Client(); const MSS = require("./functions/"); const fs = require("fs"); var command = []; //Login to Discord client.login(config.API.discord); //Include all files in the command...
//Get the required shit together const config = require("./config.json"); const Discord = require("discord.js"); const client = new Discord.Client(); const MSS = require("./functions/"); const fs = require("fs"); var command = []; //Login to Discord client.login(config.API.discord); //Include all files in the command...
Include from the functions directory
Include from the functions directory
JavaScript
mit
moustacheminer/MSS-Discord,moustacheminer/MSS-Discord,moustacheminer/MSS-Discord
25e28e9795aee56e9d7acdb09b362c30ee7dad15
src/index.js
src/index.js
define([ "text!src/templates/command.html" ], function(commandTemplate) { var commands = codebox.require("core/commands"); var dialogs = codebox.require("utils/dialogs"); commands.register({ id: "palette.open", title: "Open Command Palette", shortcuts: [ "mod+shift+p...
define([ "text!src/templates/command.html" ], function(commandTemplate) { var commands = codebox.require("core/commands"); var dialogs = codebox.require("utils/dialogs"); commands.register({ id: "palette.open", title: "Command Palette: Open", shortcuts: [ "mod+shift+...
Change command title and hide from palette
Change command title and hide from palette
JavaScript
apache-2.0
etopian/codebox-package-command-palette,CodeboxIDE/package-command-palette,CodeboxIDE/package-command-palette,etopian/codebox-package-command-palette
453d61337dda06c15130b9783b39ce0e58979c86
src/index.js
src/index.js
import React from "react"; import { render } from "react-dom"; import Root from "./Root"; render( React.createElement(Root), document.getElementById("root") );
import React from "react"; import { render } from "react-dom"; import "./index.css"; import Root from "./Root"; render( React.createElement(Root), document.getElementById("root") );
Fix missing root css import
Fix missing root css import
JavaScript
apache-2.0
nwsapps/flashcards,nwsapps/flashcards
6f8019e821d94975cfab7e62c1557af4254be72e
src/index.js
src/index.js
import React from 'react' import { render } from 'react-dom' import createStore from './createStore' const store = createStore() render( <h1>Hello from React</h1>, document.getElementById('react') )
import React from 'react' import { render } from 'react-dom' import createStore from './createStore' import App from './components/App' const store = createStore() render( <App />, document.getElementById('react') )
Use App component in render
Use App component in render
JavaScript
mit
epicsharp/react-boilerplate,epicsharp/react-boilerplate,RSS-Dev/live-html,RSS-Dev/live-html
61c69d309ad8d80812b3467697ef52ead021249a
src/utils.js
src/utils.js
import pf from 'portfinder'; export function homedir() { return process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME']; } export function wait (time) { return new Promise(resolve => { setTimeout(() => resolve(), time); }); } export function getPort () { return new Promise((resolve, rejec...
import fs from 'fs'; import pf from 'portfinder'; export function homedir() { return process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME']; } export function wait (time) { return new Promise(resolve => { setTimeout(() => resolve(), time); }); } export function getPort () { return new Pr...
Fix getPort and add readFile
Fix getPort and add readFile getPort was considering bind to 0.0.0.0 instead of 127.0.0.1. readFile added to provide a promise-based version of fs.readFile
JavaScript
mit
sqlectron/sqlectron-term
a2136a83a4c7eeb988da2a2c1833fd16d4828632
extensions/roc-plugin-dredd/src/roc/index.js
extensions/roc-plugin-dredd/src/roc/index.js
import { lazyFunctionRequire } from 'roc'; import config from '../config/roc.config.js'; import meta from '../config/roc.config.meta.js'; const lazyRequire = lazyFunctionRequire(require); export default { config, meta, actions: [ { hook: 'server-started', description: 'Run...
import { lazyFunctionRequire } from 'roc'; import config from '../config/roc.config.js'; import meta from '../config/roc.config.meta.js'; const lazyRequire = lazyFunctionRequire(require); export default { config, meta, actions: [ { hook: 'server-started', description: 'Run...
Remove superflous settings option on dredd command
Remove superflous settings option on dredd command
JavaScript
mit
voldern/roc-plugin-dredd
83314d1d646ffa3ec5e668ecdc5ae0bbbabfaad8
app/scripts/collections/section.js
app/scripts/collections/section.js
define([ 'underscore', 'backbone', 'models/section', 'config' ], function (_, Backbone, Section, config) { 'use strict'; var SectionCollection = Backbone.Collection.extend({ model: Section, initialize: function(models, options) { if (options) { this.resume = options.resume; } this.fetc...
define([ 'underscore', 'backbone', 'models/section', 'config' ], function (_, Backbone, Section, config) { 'use strict'; var SectionCollection = Backbone.Collection.extend({ model: Section, initialize: function(models, options) { if (options) { this.resume = options.resume; } this.fetc...
Fix url to be not nested.
Fix url to be not nested.
JavaScript
mit
jmflannery/jackflannery.me,jmflannery/jackflannery.me,jmflannery/rez-backbone,jmflannery/rez-backbone
7b3f810e466248d77218a3d59bd674386ff9bd97
src/DB/Mongo.js
src/DB/Mongo.js
var path = require('path'); var fs = require('extfs'); var mongoose = require('mongoose'); import { AbstractDB } from './AbstractDB'; import { Core } from '../Core/Core'; export class Mongo extends AbstractDB { constructor(uri, options) { super(uri, options); } /** * Connect to mongodb * * @return...
var path = require('path'); var fs = require('extfs'); var mongoose = require('mongoose'); import { AbstractDB } from './AbstractDB'; import { Core } from '../Core/Core'; export class Mongo extends AbstractDB { constructor(uri, options) { super(uri, options); } /** * Connect to mongodb * * @return...
Fix a bug if mongoose path does not exist
Fix a bug if mongoose path does not exist
JavaScript
mit
marian2js/rode
3221f816bc32adee59d03fd9b5549507384f5b08
test/disk.js
test/disk.js
var Disk = require( '../' ) var BlockDevice = require( 'blockdevice' ) var assert = require( 'assert' ) const DISK_IMAGE = __dirname + '/data/bootcamp-osx-win.bin' describe( 'Disk', function( t ) { var device = null var disk = null it( 'init block device', function() { assert.doesNotThrow( function() ...
var Disk = require( '../' ) var BlockDevice = require( 'blockdevice' ) var assert = require( 'assert' ) ;[ 'apple-mac-osx-10.10.3.bin', 'bootcamp-osx-win.bin', 'usb-thumb-exfat.bin', 'usb-thumb-fat.bin' ].forEach( function( filename ) { const DISK_IMAGE = __dirname + '/data/' + filename describe( 'Di...
Update test: Run against all test images
Update test: Run against all test images
JavaScript
mit
jhermsmeier/node-disk
170248b70dfe6b4eb9eb476919c19fb98a2e88c8
examples/jquery/http-request.js
examples/jquery/http-request.js
// jQuery built with "grunt custom:-ajax/script,-ajax/jsonp,-css,-deprecated,-dimensions,-effects,-event,-event/alias,-offset,-wrap,-ready,-deferred,-exports/amd,-sizzle" // https://github.com/jquery/jquery#how-to-build-your-own-jquery var $ = require("./lib/jquery.min.js"); var MARGIN = 12; var page = tabris.create(...
// jQuery built with "grunt custom:-ajax/script,-ajax/jsonp,-css,-deprecated,-dimensions,-effects,-event,-event/alias,-offset,-wrap,-ready,-deferred,-exports/amd,-sizzle" // https://github.com/jquery/jquery#how-to-build-your-own-jquery var $ = require("./lib/jquery.min.js"); var MARGIN = 12; var page = tabris.create(...
Rename "Label" to "TextView" in jquery example
Rename "Label" to "TextView" in jquery example Done to reflect eclipsesource/tabris-js@ca0f105e82a2d27067c9674ecf71a93af2c7b7bd Change-Id: I1c267e0130809077c1339ba0395da1a7e1c6b281
JavaScript
bsd-3-clause
moham3d/tabris-js,mkostikov/tabris-js,mkostikov/tabris-js,softnep0531/tabrisjs,softnep0531/tabrisjs,pimaxdev/tabris,pimaxdev/tabris,eclipsesource/tabris-js,moham3d/tabris-js,eclipsesource/tabris-js,eclipsesource/tabris-js
69914fdba918b1a8c38d9f8b08879d5d3d213132
test/trie.js
test/trie.js
var Trie = require('../app/trie'); describe('Trie', function() { var trie; beforeEach(function() { trie = new Trie(); }); it('should be an object', function() { expect(trie).to.be.ok; }); it('should have a root', function() { expect(trie.root).to.be.ok; }); it('should have add method', ...
var Trie = require('../app/trie'); describe('Trie', function() { var trie; beforeEach(function() { trie = new Trie(); }); it('should be an object', function() { expect(trie).to.be.ok; }); it('should have a root', function() { expect(trie.root).to.be.ok; }); it('should have add method', ...
Reword test for add string and find string
Reword test for add string and find string
JavaScript
mit
mgarbacz/nordrassil,mgarbacz/nordrassil
7749879e6c083bd9c5c4d5fc2244399c3cd5e861
releaf-core/app/assets/javascripts/releaf/include/store_settings.js
releaf-core/app/assets/javascripts/releaf/include/store_settings.js
jQuery(function(){ var body = jQuery('body'); var settings_path = body.data('settings-path'); body.on('settingssave', function( event, key_or_settings, value ) { if (!settings_path) { return; } var settings = key_or_settings; if (typeof settings === ...
jQuery(function(){ var body = jQuery('body'); var settings_path = body.data('settings-path'); body.on('settingssave', function( event, key_or_settings, value ) { if (!settings_path) { return; } var settings = key_or_settings; if (typeof settings === ...
Use vanilla-ujs LiteAjax for user settings sending
Use vanilla-ujs LiteAjax for user settings sending
JavaScript
mit
cubesystems/releaf,cubesystems/releaf,graudeejs/releaf,graudeejs/releaf,cubesystems/releaf,graudeejs/releaf
0fa905726bc545f6809aac20c7a3c8579dadb647
bin/collider-run.js
bin/collider-run.js
#!/usr/bin/env node 'use strict'; var pkg = require('../package.json') var cli = require('commander'); var fs = require('fs'); var path = require('path'); var spawn = require('child_process').spawn; cli .version( pkg.version ) .parse( process.argv ); var cwd = process.cwd(); var colliderFile = path.join( c...
#!/usr/bin/env node 'use strict'; var pkg = require('../package.json') var cli = require('commander'); var createError = require('../lib/createError'); var logErrorExit = require('../lib/logErrorExit'); var fs = require('fs'); var path = require('path'); var spawn = require('child_process').spawn; cli .vers...
Use creatError and logErrorExit to handle errors
Use creatError and logErrorExit to handle errors
JavaScript
mit
simonsinclair/collider-cli
4ccd6bf73b26f9910827bf5bd487bcd30e0b24c0
example/__tests__/example-test.js
example/__tests__/example-test.js
import path from 'path'; import webpack from 'webpack'; import config from '../webpack.config'; describe('example', () => { it('combines loader results into one object', () => new Promise(resolve => { webpack(config, (error, stats) => { const bundlePath = path.resolve( stats.compilation.c...
import path from 'path'; import webpack from 'webpack'; import config from '../webpack.config'; describe('example', () => { jest.setTimeout(10000); // 10 second timeout it('combines loader results into one object', () => new Promise(resolve => { webpack(config, (error, stats) => { const bundlePat...
Use a 10-second timeout for the Jest test
Use a 10-second timeout for the Jest test
JavaScript
mit
elliottsj/combine-loader
42e2cac9631969f51352f1c1d04cde129caa0dee
Resources/public/ol6-compat.js
Resources/public/ol6-compat.js
(function () { "use strict"; if (window.ol && ol.source && !ol.source.VectorEventType) { // HACK: monkey patch event types not present in current OL6 repackage build // @see https://github.com/openlayers/openlayers/blob/main/src/ol/source/VectorEventType.js ol.source.VectorEventType = { ...
(function () { "use strict"; if (window.ol && ol.source && !ol.source.VectorEventType) { // HACK: monkey patch event types not present in current OL6 repackage build // @see https://github.com/openlayers/openlayers/blob/main/src/ol/source/VectorEventType.js ol.source.VectorEventType = { ...
Fix "moveFeature" tool initialization errors
Fix "moveFeature" tool initialization errors
JavaScript
mit
mapbender/mapbender-digitizer,mapbender/mapbender-digitizer
83c53032c97e74bff2ba97f1a798ab28cad6f31d
shaders/chunks/normal-perturb.glsl.js
shaders/chunks/normal-perturb.glsl.js
module.exports = /* glsl */ ` #if !defined(USE_TANGENTS) && (defined(USE_NORMAL_MAP) || defined(USE_CLEAR_COAT_NORMAL_MAP)) //http://www.thetenthplanet.de/archives/1180 mat3 cotangentFrame(vec3 N, vec3 p, vec2 uv) { // get edge vectors of the pixel triangle vec3 dp1 = dFdx(p); vec3 dp2 = dFdy(p); ve...
module.exports = /* glsl */ ` #if !defined(USE_TANGENTS) && (defined(USE_NORMAL_MAP) || defined(USE_CLEAR_COAT_NORMAL_MAP)) //http://www.thetenthplanet.de/archives/1180 mat3 cotangentFrame(vec3 N, vec3 p, vec2 uv) { // get edge vectors of the pixel triangle highp vec3 dp1 = dFdx(p); highp vec3 dp2 = dFd...
Use highp for derivatives calculations in perturb normal
Use highp for derivatives calculations in perturb normal Fixes #258
JavaScript
mit
pex-gl/pex-renderer,pex-gl/pex-renderer
7783b4bc586b8522cfe5f516c90051133e06fe84
feature-detects/css/animations.js
feature-detects/css/animations.js
/*! { "name": "CSS Animations", "property": "cssanimations", "caniuse": "css-animation", "polyfills": ["transformie", "csssandpaper"], "tags": ["css"], "warnings": ["Android < 4 will pass this test, but can only animate a single property at a time"], "notes": [{ "name" : "Article: 'Dispelling the Andr...
/*! { "name": "CSS Animations", "property": "cssanimations", "caniuse": "css-animation", "polyfills": ["transformie", "csssandpaper"], "tags": ["css"], "warnings": ["Android < 4 will pass this test, but can only animate a single property at a time"], "notes": [{ "name" : "Article: 'Dispelling the Andr...
Fix broken link in comment
Fix broken link in comment
JavaScript
mit
Modernizr/Modernizr,Modernizr/Modernizr
a8994cdafba3a7f550ea5507530a06a056313dd2
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Remove finishedLoading() call, remove a.close on click method - not using, it was there for trying out items purposes
Remove finishedLoading() call, remove a.close on click method - not using, it was there for trying out items purposes
JavaScript
mit
fma2/nyc-high-school-programs,fma2/nyc-high-school-programs
6da644a00f47a7bf6a238ebed701d8b8677316b9
app/assets/javascripts/rating_form.js
app/assets/javascripts/rating_form.js
$(document).ready(function() { $("#progress").on('submit', '.new_rating', function(event) { event.preventDefault(); const $form = $(this), url = $form.attr('action'), method = $form.attr('method'), data = $form.serialize(); $.ajax({ url: url, method: method, ...
$(document).ready(function() { $("#progress").on('submit', '.new_rating', function(event) { event.preventDefault(); const $form = $(this), url = $form.attr('action'), method = $form.attr('method'), data = $form.serialize(); $.ajax({ url: url, method: method, ...
Refactor rating jquery to clear rating form on submit
Refactor rating jquery to clear rating form on submit
JavaScript
mit
AliasHendrickson/progress,AliasHendrickson/progress,AliasHendrickson/progress
c6bf12e83cdf792c986b3fc4348a0165fe569e8a
frontend/src/Lists/ListsView.js
frontend/src/Lists/ListsView.js
import React, { Component } from "react"; import styled from "styled-components"; import { Row, RowContent, ColumnContainer } from "../SharedComponents.js"; import Loading from "../loading.js"; import List from "./List.js"; import CreateList from "./CreateList.js"; import Notes from "./Notes.js"; class ListsView ex...
import React, { Component } from "react"; import styled from "styled-components"; import { Row, RowContent, ColumnContainer } from "../SharedComponents.js"; import Loading from "../loading.js"; import List from "./List.js"; import CreateList from "./CreateList.js"; import Notes from "./Notes.js"; class ListsView ex...
Move lists to the left
Move lists to the left
JavaScript
mit
Tejpbit/talarlista,Tejpbit/talarlista,Tejpbit/talarlista
cf530df7cebd995e5742b4be488fa3c765d267e6
te-append.js
te-append.js
#!/usr/bin/env node 'use strict'; const program = require('commander'); const addLineNumbers = require('add-line-numbers'); const fs = require('fs'); const listAndRun = require('./list-and-run').listAndRun; const path = '/tmp/te'; program.parse(process.argv); const line = '\n' + program.args; fs.appendFileSync(path, ...
#!/usr/bin/env node 'use strict'; const program = require('commander'); const fs = require('fs'); const listAndRun = require('./list-and-run').listAndRun; const path = '/tmp/te'; program.parse(process.argv); const line = program.args; const file = fs.readFileSync(path, 'utf8'); var lines = []; if (file.length) { ...
Make sure append doesn't create an empty line when the first line of code is added
Make sure append doesn't create an empty line when the first line of code is added
JavaScript
mit
gudnm/te
9c21194c68654e2152d70a28cc9261b13a2035a4
lib/api/middlewares/last-updated-time-layergroup.js
lib/api/middlewares/last-updated-time-layergroup.js
'use strict'; module.exports = function setLastUpdatedTimeToLayergroup () { return function setLastUpdatedTimeToLayergroupMiddleware (req, res, next) { const { mapConfigProvider, analysesResults } = res.locals; const layergroup = res.body; mapConfigProvider.createAffectedTables((err, affec...
'use strict'; module.exports = function setLastUpdatedTimeToLayergroup () { return function setLastUpdatedTimeToLayergroupMiddleware (req, res, next) { const { mapConfigProvider, analysesResults } = res.locals; const layergroup = res.body; mapConfigProvider.createAffectedTables((err, affec...
Set cache buster equal to 0 when there is no affected tables in the mapconfig
Set cache buster equal to 0 when there is no affected tables in the mapconfig
JavaScript
bsd-3-clause
CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb
79f3d9a6a7ca614dce7fb0444d3799d9d55f198c
assets/js/theme/global/mobile-menu.js
assets/js/theme/global/mobile-menu.js
import $ from 'jquery'; export default function() { const $mobileMenuTrigger = $('[data-mobilemenu]'); const $header = $('.header'); const headerHeight = $('.header').outerHeight(); const $mobileMenu = $('#mobile-menu'); function mobileMenu() { $mobileMenuTrigger.on('click', toggleMobileMe...
import $ from 'jquery'; export default function() { const $mobileMenuTrigger = $('[data-mobilemenu]'); const $header = $('.header'); const headerHeight = $('.header').outerHeight(); const $mobileMenu = $('#mobile-menu'); function mobileMenu() { $mobileMenuTrigger.on('click', toggleMobileMe...
Fix mobile hamburger menu contents not appearing
Fix mobile hamburger menu contents not appearing
JavaScript
mit
aaronrodier84/flukerfarms,juancho1/bauhaus,PascalZajac/cornerstone,bigcommerce/stencil,PeteyRev/ud-revamp,aaronrodier84/rouxbrands,bigcommerce/stencil,mcampa/cornerstone,rho1140/cornerstone,ovsokolov/dashconnect-bc,mcampa/cornerstone,PeteyRev/ud-revamp,juancho1/bauhaus,bc-annavu/stencil,aaronrodier84/rouxbrands,mcampa/...
9557e87a24a1b6d33cef2bce1231f9d9b2a35602
app/components/Auth/Auth.js
app/components/Auth/Auth.js
import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import jwtDecode from 'jwt-decode'; import styles from './styles.scss'; import Login from './Login'; import Signup from './Signup'; import Info from './Info'; import { addUser } from '../../actions/use...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import jwtDecode from 'jwt-decode'; import styles from './styles.scss'; import Login from './Login'; import Signup from './Signup'; import Info from './Info'; import Controls from '../Controls'; import...
Add control buttons to auth
Add control buttons to auth
JavaScript
mit
cdiezmoran/AlphaStage-2.0,cdiezmoran/AlphaStage-2.0
1e1e1e351b3d0a9f4f824e5392de8afea93d5ffe
src/components/posts_index.js
src/components/posts_index.js
import _ from 'lodash'; import React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { fetchPosts } from '../actions'; class PostsIndex extends React.Component { componentDidMount() { this.props.fetchPosts(); } renderPosts() { return _.map(this.props...
import _ from 'lodash'; import React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { fetchPosts } from '../actions'; class PostsIndex extends React.Component { componentDidMount() { this.props.fetchPosts(); } renderPosts() { return _.map(this.props...
Add link to link to each page
Add link to link to each page
JavaScript
mit
monsteronfire/redux-learning-blog,monsteronfire/redux-learning-blog
a081e1554614ac92aebe31b0dd514a12484d4ece
app/lib/collections/posts.js
app/lib/collections/posts.js
Posts = new Mongo.Collection('posts'); Posts.allow({ insert: function(userId, doc) { // only allow posting if you are logged in return !! userId; } });
Posts = new Mongo.Collection('posts'); Meteor.methods({ postInsert: function(postAttributes) { check(Meteor.userId(), String); check(postAttributes, { title: String, url: String }); var user = Meteor.user(); var post = _.extend(postAttributes, { userId: user._id, author: ...
Use Meteor.methods to set up post (including user)
Use Meteor.methods to set up post (including user)
JavaScript
mit
drainpip/music-management-system,drainpip/music-management-system
fbae2755bb25ef803cd3508448cb1646868a6618
test/mqtt.js
test/mqtt.js
/** * Testing includes */ var should = require('should'); /** * Unit under test */ var mqtt = require('../lib/mqtt'); describe('mqtt', function() { describe('#createClient', function() { it('should return an MqttClient', function() { var c = mqtt.createClient(); c.should.be.instanceOf(mqtt.Mq...
/** * Testing includes */ var should = require('should'); /** * Unit under test */ var mqtt = require('../lib/mqtt'); describe('mqtt', function() { describe('#createClient', function() { it('should return an MqttClient', function() { var c = mqtt.createClient(); c.should.be.instanceOf(mqtt.Mq...
Add test for MqttConnection creation
Add test for MqttConnection creation
JavaScript
mit
itavy/MQTT.js,bqevin/MQTT.js,AdySan/MQTT.js,mcanthony/MQTT.js,yunba/MQTT.js,jaambee/MQTT.js,daliworks/MQTT.js,jdiamond/MQTT.js,wesley1001/MQTT.js,authere/MQTT.js,RangerMauve/MQTT.js,1248/MQTT.js
41db6cf165dd083d3b284c961c128db609fcad81
src/extend/getConnectivityMatrix.js
src/extend/getConnectivityMatrix.js
'use strict'; var OCL = require('openchemlib'); module.exports = function getConnectivityMatrix(options={}) { var { sdt, mass } = options; this.ensureHelperArrays(OCL.Molecule.cHelperNeighbours); var nbAtoms=this.getAllAtoms(); var result=new Array(nbAtoms); for (var i=0; i<nb...
'use strict'; var OCL = require('openchemlib'); module.exports = function getConnectivityMatrix(options) { var options = options || {}; var sdt=options.sdt; var mass=options.mass; this.ensureHelperArrays(OCL.Molecule.cHelperNeighbours); var nbAtoms=this.getAllAtoms(); var result=new Array(nbA...
Make it compatible with node 4.0
Make it compatible with node 4.0
JavaScript
bsd-3-clause
cheminfo-js/openchemlib-extended
94bc6236e23440d4f3958e601d0ab880b17d09de
public/js/book-app/components/book-app.component.js
public/js/book-app/components/book-app.component.js
;(function() { "use strict"; angular. module("bookApp"). component("bookApp", { template: ` <div class="nav"><a href="new-book">Add new book</a></div> <div class="book-container" ng-repeat="book in $ctrl.books"> <h3>{{book.title}}</h3> <img ng-src="http://theproac...
;(function() { "use strict"; angular. module("bookApp"). component("bookApp", { template: ` <div class="nav"><a href="new-book" class="nav-click">Add new book</a></div> <div class="book-container" ng-repeat="book in $ctrl.books"> <h3>{{book.title}}</h3> <img ng-sr...
Add New Class To Link
Add New Class To Link
JavaScript
mit
fejs-levelup/angular-bookshelf,fejs-levelup/angular-bookshelf
c8b6d8adb8ae1dea1148416acfdfb99502ce281c
app/assets/javascripts/init.js
app/assets/javascripts/init.js
window.atthemovies = { init: function() { var body = document.querySelectorAll("body")[0]; var jsController = body.getAttribute("data-js-controller"); var jsAction = body.getAttribute("data-js-action"); this.pageJS("atthemovies." + jsController + ".init", window); this.pageJS("atthemovies." + jsC...
window.atthemovies = { init: function() { var body = document.querySelectorAll("body")[0]; var jsController = body.getAttribute("data-js-controller"); var jsAction = body.getAttribute("data-js-action"); this.pageJS("atthemovies." + jsController + ".init", window); this.pageJS("atthemovies." + jsC...
Tidy up JS, add commentary
Tidy up JS, add commentary
JavaScript
agpl-3.0
andycroll/atthemovies,andycroll/atthemovies,andycroll/atthemovies,andycroll/atthemovies
d3017cbcd542cc5c310d23c0bd478eae10ceef32
src/modules/ajax/retryAjax.js
src/modules/ajax/retryAjax.js
function doAjax(options, retries, dfr) { $.ajax(options).pipe(function(data) {dfr.resolve(data);}, function(jqXhr) { if (retries > 0) { setTimeout(doAjax, 100, options, retries - 1, dfr); } else { dfr.reject(jqXhr); } }); } export default function retryAjax(options) { var dfr = $.Deferre...
function doAjax(options, retries, dfr) { $.ajax(options).pipe(function(data, textStatus, jqXHR) { dfr.resolve(data, textStatus, jqXHR); }, function(jqXhr, textStatus, errorThrown) { if (retries > 0) { setTimeout(doAjax, 100, options, retries - 1, dfr); } else { dfr.reject(jqXhr, textStatus,...
Return all arguments from AJAX
Return all arguments from AJAX
JavaScript
mit
fallenswordhelper/fallenswordhelper,fallenswordhelper/fallenswordhelper
84c100bbd0fb6749fdcef577690d85beb7aebd34
Gruntfile.js
Gruntfile.js
/* * Copyright 2013, All Rights Reserved. * * Code licensed under the BSD License: * https://github.com/node-gh/gh/blob/master/LICENSE.md * * @author Zeno Rocha <zno.rocha@gmail.com> * @author Eduardo Lundgren <zno.rocha@gmail.com> */ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-jsbeautifi...
/* * Copyright 2013, All Rights Reserved. * * Code licensed under the BSD License: * https://github.com/node-gh/gh/blob/master/LICENSE.md * * @author Zeno Rocha <zno.rocha@gmail.com> * @author Eduardo Lundgren <zno.rocha@gmail.com> */ module.exports = function(grunt) { grunt.initConfig({ jsbeautif...
Add jshint as grunt task
Add jshint as grunt task
JavaScript
bsd-3-clause
henvic/gh,TomzxForks/gh,modulexcite/gh,oouyang/gh,oouyang/gh,TomzxForks/gh,tomzx/gh,dustinryerson/gh,modulexcite/gh,henvic/gh,tomzx/gh,dustinryerson/gh
2818b0138520fbb0e9702cddef9e5d121b8f5ad1
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ pkg : grunt.file.readJSON( 'package.json' ), env: { casper: { BASEURL: "http://www.google.com", PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin", PHANTOMJS_EXECUTABLE: "node_modules/casp...
module.exports = function(grunt) { grunt.initConfig({ pkg : grunt.file.readJSON( 'package.json' ), env: { casper: { BASEURL: "http://www.google.com", PHANTOMJS_EXECUTABLE: "node_modules/casperjs/node_modules/.bin/phantomjs" } }, casperjs: { options: { includes...
Extend the PATH env var instead of replacing it
Extend the PATH env var instead of replacing it
JavaScript
mit
smlgbl/grunt-casperjs-extra
b68b04de0eec208ca389f93b271a52b3db5b8ed7
Tester/src/Tester.js
Tester/src/Tester.js
/* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes.kinder@rhul.ac.uk) for details or support | LICENSE.md for license details */ "use strict"; import {spawn} from 'child_process'; const EXPOSE...
/* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes.kinder@rhul.ac.uk) for details or support | LICENSE.md for license details */ "use strict"; import {spawn} from 'child_process'; const EXPOSE...
Print warnings when tests are taking ages so we can see which ones it is
Print warnings when tests are taking ages so we can see which ones it is
JavaScript
mit
ExpoSEJS/ExpoSE,ExpoSEJS/ExpoSE,ExpoSEJS/ExpoSE
af38d84173285c9ee1203a4cb468a068ae15e2d7
src/scripts/content/visualstudio.js
src/scripts/content/visualstudio.js
/*jslint indent: 2, plusplus: true */ /*global $: false, document: false, togglbutton: false, createTag:false, window: false, MutationObserver: false */ 'use strict'; // Individual Work Item & Backlog page togglbutton.render('.witform-layout-content-container:not(.toggl)', {observe: true}, function () { var link, ...
/*jslint indent: 2, plusplus: true */ /*global $: false, document: false, togglbutton: false, createTag:false, window: false, MutationObserver: false */ 'use strict'; // Individual Work Item & Backlog page togglbutton.render('.witform-layout-content-container:not(.toggl)', {observe: true}, function () { var link, ...
Change VSTS integration for markup change
Change VSTS integration for markup change
JavaScript
bsd-3-clause
glensc/toggl-button,glensc/toggl-button,glensc/toggl-button
d4ca275b1229942dca73b4c4ed27a50f893dd6c9
src/touch-action.js
src/touch-action.js
(function() { function selector(v) { return '[touch-action="' + v + '"]'; } function rule(v) { return '{ -ms-touch-action: ' + v + '; touch-action: ' + v + '; }'; } var attrib2css = [ { rule: 'none', selectors: [ 'none', 'user' ] }, 'pan-x', 'pan-y', ...
(function() { function selector(v) { return '[touch-action="' + v + '"]'; } function rule(v) { return '{ -ms-touch-action: ' + v + '; touch-action: ' + v + '; }'; } var attrib2css = [ { rule: 'none', selectors: [ 'none', 'user' ] }, 'pan-x', 'pan-y', ...
Fix inserting touch action stylesheet for Shadow DOM Polyfill
Fix inserting touch action stylesheet for Shadow DOM Polyfill
JavaScript
bsd-3-clause
roblarsen/pointer-events.js
b7fcfc3e333218e30e10187523176d45b6bd297d
lib/Chunk.js
lib/Chunk.js
let zlib = require('zlib'), NBT = require('kld-nbt'), Tag = NBT.Tag, ReadBuffer = NBT.ReadBuffer; module.exports = class Chunk { constructor() { this.data = null; } static loadCompressedChunk(compressedData, compressionFormat) { var data; if (compressionFormat == 1...
let zlib = require('zlib'), NBT = require('kld-nbt'), Tag = NBT.Tag, ReadBuffer = NBT.ReadBuffer, utils = require('./utils'); module.exports = class Chunk { constructor() { this.data = null; } static loadCompressedChunk(compressedData, compressionFormat) { var data; ...
Add ability to get block type for a position
Add ability to get block type for a position
JavaScript
bsd-3-clause
thelonious/kld-mc-world
e0a5f7e093df4ec140a6cc7828633bb6949e0475
client/models/areaOfStudy.js
client/models/areaOfStudy.js
var _ = require('lodash'); var React = require('react'); var RequirementSet = require("./requirementSet"); var AreaOfStudy = React.createClass({ render: function() { console.log('area-of-study render') var areaDetails = []//getAreaOfStudy(this.props.name, this.props.type); var requirementSets = _.map(areaDet...
var _ = require('lodash'); var React = require('react'); var RequirementSet = require("./requirementSet"); var AreaOfStudy = React.createClass({ render: function() { console.log('area-of-study render') var areaDetails = this.props;//getAreaOfStudy(this.props.name, this.props.type); var requirementSets = _.ma...
Clean up the area of study headings
Clean up the area of study headings
JavaScript
agpl-3.0
hawkrives/gobbldygook,hawkrives/gobbldygook,hawkrives/gobbldygook
a73401e5c10457066171a9ee5060363163ea4e7b
public/modules/core/directives/display-trial-data.client.directive.js
public/modules/core/directives/display-trial-data.client.directive.js
'use strict'; // Display Trial Data for debugging angular.module('core').directive('displayTrialData', function() { return { restrict: 'AE', template: '<div><h3>Trial Data</h3><pre>Subject: {{trialDataJson()}}</pre></div>' } });
'use strict'; // Display Trial Data for debugging angular.module('core').directive('displayTrialData', function() { return { restrict: 'AE', template: '<div><h3>Trial Data</h3><pre>{{trialDataJson()}}</pre></div>' } });
Remove 'Subject:' from displayTrialData text
Remove 'Subject:' from displayTrialData text
JavaScript
mit
brennon/eim,brennon/eim,brennon/eim,brennon/eim
899639def4990c5524d0ca462ebf8f6ab4ca59f5
postcss.config.js
postcss.config.js
module.exports = () => ({ plugins: { 'postcss-easy-import': { extensions: [ '.pcss', '.css', '.postcss', '.sss' ] }, 'stylelint': { configFile: '.stylelintrc' }, 'postcss-mixins': {}, 'postcss-nesting': {}, 'postcss-custom-media': {}, '...
module.exports = () => ({ plugins: { 'postcss-easy-import': { extensions: [ '.pcss', '.css', '.postcss', '.sss' ] }, stylelint: { configFile: '.stylelintrc' }, 'postcss-mixins': {}, 'postcss-nesting': {}, 'postcss-custom-media': {}, 'po...
Fix quoted postcss plugins name
chore: Fix quoted postcss plugins name
JavaScript
mit
PolymerX/polymer-skeleton,PolymerX/polymer-skeleton
46dd15ee2eef96cd693cea63d4a06b1056533356
app/config/routes.js
app/config/routes.js
export default (app, route) => { route.named('hello') .maps('/hello') .to('hello:index') route.named('foo').maps('/foo/{bar}').to(async (req, res, {bar}) => { res.end(`Foo: ${bar}`) }) route.mounted('/bar', route => { route.named('bar_index').maps('/').to(async (req, res) => { res.end("B...
export default (app, route) => { route.named('hello') .maps('/hello') .to('hello:index') route.named('foo').maps('/foo/{bar}').to(async ({req, res}, {bar}) => { res.end(`Foo: ${bar}`) }) route.mounted('/bar', route => { route.named('bar_index').maps('/').to(async ({req, res}) => { res.en...
Fix args of inline controllers to use context
Fix args of inline controllers to use context
JavaScript
mit
CHH/learning-node,CHH/learning-node
c40d33e07a2e835f67bbe10e0bad9ceb66bbbf67
webpack.config.js
webpack.config.js
const path = require('path'); const webpack = require('webpack'); const WebpackNotifierPlugin = require('webpack-notifier'); const styleLintPlugin = require('stylelint-webpack-plugin'); const autoprefixer = require('autoprefixer'); const env = process.env.NODE_ENV; module.exports = { devtool: env === 'production'...
const path = require('path'); const webpack = require('webpack'); const WebpackNotifierPlugin = require('webpack-notifier'); const styleLintPlugin = require('stylelint-webpack-plugin'); const env = process.env.NODE_ENV; module.exports = { devtool: env === 'production' ? 'source-map' : 'eval', entry: './src', ...
Simplify webpack, unsuccessfull at fixing sourcemap output
Simplify webpack, unsuccessfull at fixing sourcemap output
JavaScript
mit
nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,nuruddeensalihu/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,binary-com/binary-next-gen
a7a6a8b5ea4a82660bb0ac7ed290e3d7a6b5c89b
src/store/checkout-store.js
src/store/checkout-store.js
import { Store } from 'consus-core/flux'; import StudentStore from './student-store'; let checkouts = []; let checkoutsByActionId = new Object(null); class CheckoutStore extends Store { getCheckoutByActionId(actionId) { return checkoutsByActionId[actionId]; } } const store = new CheckoutStore(); s...
import { Store } from 'consus-core/flux'; import StudentStore from './student-store'; import ItemStore from './item-store'; let checkouts = []; let checkoutsByActionId = new Object(null); class CheckoutStore extends Store { getCheckoutByActionId(actionId) { return checkoutsByActionId[actionId]; } } ...
Verify that the cart does not contain an unavailable item
Verify that the cart does not contain an unavailable item
JavaScript
unlicense
TheFourFifths/consus,TheFourFifths/consus
49b7b66ac4c3c40893e53e244a2cba7d915d235d
gulp/unit-tests.js
gulp/unit-tests.js
'use strict'; var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); var wiredep = require('wiredep'); gulp.task('test', function () { var bowerDeps = wiredep({ directory: 'app/bower_components', exclude: ['bootstrap-sass-official'], dependencies: true, devDependencies: true }); ...
'use strict'; var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); var wiredep = require('wiredep'); var bowerDeps = wiredep({ directory: 'app/bower_components', exclude: ['bootstrap-sass-official'], dependencies: true, devDependencies: true }); var testFiles = bowerDeps.js.concat([ 'app/s...
Refactor unit tests, add watch task.
Refactor unit tests, add watch task.
JavaScript
mit
tvararu/angular-famous-playground
92e0b46c931e5aa3189db50ad758d5db00cbda9f
server/src/services/scripts/scripts-model.js
server/src/services/scripts/scripts-model.js
'use strict'; // scripts-model.js - A mongoose model // // See http://mongoosejs.com/docs/models.html // for more of what you can do here. const mongoose = require('mongoose'); const Schema = mongoose.Schema; const scriptsSchema = new Schema({ text: { type: String, required: true }, createdAt: { type: Date, 'de...
'use strict'; // scripts-model.js - A mongoose model // // See http://mongoosejs.com/docs/models.html // for more of what you can do here. const mongoose = require('mongoose'); const Schema = mongoose.Schema; const scriptsSchema = new Schema({ issue: { type: String, required: true }, title: { type: String, requ...
Add script issue and title fields
Add script issue and title fields
JavaScript
mit
andreagoulet/callmyreps,andreagoulet/callmyreps,andreagoulet/callmyreps,andreagoulet/callmyreps,andreagoulet/callmyreps
feabc4db34f6a1b15972f1c77306e83a53d61914
src/AsyncCreatable.js
src/AsyncCreatable.js
import React from 'react'; import Select from './Select'; function reduce(obj, props = {}){ return Object.keys(obj) .reduce((props, key) => { const value = obj[key]; if (value !== undefined) props[key] = value; return props; }, props); } const AsyncCreatable = React.createClass({ displayName: 'Asyn...
import React from 'react'; import createClass from 'create-react-class'; import Select from './Select'; function reduce(obj, props = {}){ return Object.keys(obj) .reduce((props, key) => { const value = obj[key]; if (value !== undefined) props[key] = value; return props; }, props); } const AsyncCreat...
Migrate rest of src overto createClass pkg
Migrate rest of src overto createClass pkg
JavaScript
mit
submittable/react-select,serkanozer/react-select,OpenGov/react-select,mmpro/react-select,f-camacho/react-select,JedWatson/react-select,mobile5dev/react-select,JedWatson/react-select
3a1ea1dce763b04c46d2e13e39782d3249aa493f
example/src/main.js
example/src/main.js
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import Router from 'vue-router' import App from './App' import Home from './Home' import Eagle from 'eagle.js' import slideshows from './slideshows/slidesho...
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import Router from 'vue-router' import App from './App' import Home from './Home' import Eagle from 'eagle.js' import 'eagle.js/dist/eagle.css' import slide...
Load dist css file in example
Load dist css file in example
JavaScript
isc
Zulko/eagle.js
9bb7d328e9e64eead6af6bb0ff06dc147ceed2d0
js/responsive-overlay-menu.js
js/responsive-overlay-menu.js
$(document).ready(function () { $(".menu-btn a").click(function () { $(".overlay").fadeToggle(200); $(this).toggleClass('btn-open').toggleClass('btn-close'); }); $('.overlay').on('click', function () { $(".overlay").fadeToggle(200); $(".menu-btn a").toggleClass('btn-open')....
(function ($) { $(".menu-btn a").click(function () { event.preventDefault(); $(".overlay").fadeToggle(200); $(this).toggleClass('btn-open').toggleClass('btn-close'); }); $('.overlay').on('click', function () { $(".overlay").fadeToggle(200); $(".menu-btn a").toggleCl...
Fix js to preventDefault and work more places
Fix js to preventDefault and work more places
JavaScript
mit
marioloncarek/responsive-overlay-menu,marioloncarek/responsive-overlay-menu
1e615e33dc380729cfcf7ab52177c6a38dcf8b36
lib/frame.js
lib/frame.js
/* requestFrame / cancelFrame */"use strict" var array = require("prime/es5/array") var requestFrame = global.requestAnimationFrame || global.webkitRequestAnimationFrame || global.mozRequestAnimationFrame || global.oRequestAnimationFrame || g...
/* requestFrame / cancelFrame */"use strict" var array = require("prime/es5/array") var requestFrame = global.requestAnimationFrame || global.webkitRequestAnimationFrame || global.mozRequestAnimationFrame || global.oRequestAnimationFrame || g...
Fix requestFrame in IE, where splice requires the deleteCount argument.
Fix requestFrame in IE, where splice requires the deleteCount argument.
JavaScript
mit
dehenne/moofx,dehenne/moofx,kamicane/moofx
2ee1a0be3b01cc2a3cfbf8d6bc0f17f12dffbecc
eloquent_js/chapter04/ch04_ex04.js
eloquent_js/chapter04/ch04_ex04.js
function deepEqual(obj1, obj2) { if (typeof obj1 != "object" || obj1 == null || typeof obj2 != "object" || obj2 == null) return obj1 === obj2; let keys1 = Object.keys(obj1), keys2 = Object.keys(obj2); if (keys1.length != keys2.length) return false; for (let key of keys1) { if (!(keys2...
function deepEqual(a, b) { if (!(isObject(a) && isObject(b))) return a === b; for (let key of Object.keys(a)) { if (!(key in b)) return false; if (!deepEqual(a[key], b[key])) return false; } return true; } function isObject(a) { return typeof a == "object" && a != null; }
Add chapter 4, exercise 4
Add chapter 4, exercise 4
JavaScript
mit
bewuethr/ctci
1ab6ab7f1e72bad5f39c55110ba65991f23c9df8
examples/ruleset.js
examples/ruleset.js
var EchoRule = require('../lib/rules/echo.js'), Heartbeat = require('../lib/rules/heartbeat.js') ; var rules = []; rules.push(new EchoRule()); rules.push(new Heartbeat()); module.exports = rules;
var EchoRule = require('../lib/rules/echo.js'), Heartbeat = require('../lib/rules/heartbeat.js'), LoadAverage = require('../lib/rules/load-average.js') ; var rules = []; rules.push(new EchoRule()); rules.push(new Heartbeat()); rules.push(new LoadAverage({ warn: { 1: 1.5, 5: 0.9, ...
Add the `LoadAverage` rule to the example
Add the `LoadAverage` rule to the example
JavaScript
isc
ceejbot/numbat-analyzer,npm/numbat-analyzer,numbat-metrics/numbat-analyzer
936735753f179190f6391f1b2105246e4d10cdab
public/js/view.js
public/js/view.js
(function() { "use strict"; var lastKeys = ""; function fetchRedlines() { var baseUrl = $('#baseUrl').val(); var artworkUrl = $('#artworkUrl').val(); $.get(baseUrl + 'index').done(function(keys) { if (lastKeys === keys) { return; } ...
(function() { "use strict"; var lastKeys = ""; function fetchRedlines() { var baseUrl = $('#baseUrl').val(); var artworkUrl = $('#artworkUrl').val(); $.get(baseUrl + 'index').done(function(keys) { if (lastKeys === keys) { return; } ...
Increase interval to 5 seconds
Increase interval to 5 seconds
JavaScript
bsd-3-clause
Nullreff/redline,Nullreff/redline,Nullreff/redline
36b78042d3f5d38bb7ca96adb6cb1c0ae40deb49
main.js
main.js
var electron = require('electron'); // Module to control application life. var process = require('process'); const {app} = electron; const {BrowserWindow} = electron; let win; // Ensure that our win isn't garbage collected app.on('ready', function() { // Create the browser window. if (process.platform == 'win32'...
var electron = require('electron'); // Module to control application life. var process = require('process'); const {app} = electron; const {BrowserWindow} = electron; let win; // Ensure that our win isn't garbage collected app.on('ready', function() { // Create the browser window. if (process.platform == 'win32'...
Disable the menubar when running from source
Disable the menubar when running from source
JavaScript
mit
NoahAndrews/qmk_firmware_flasher,NoahAndrews/qmk_firmware_flasher,NoahAndrews/qmk_firmware_flasher
e8f93882daad04d6a74c864ac2c32d301c199254
lib/index.js
lib/index.js
var browserify = require('browserify-middleware') var babelify = require('babelify') module.exports = function (entries, brOptions, baOptions) { brOptions = brOptions || {} brOptions.transform = brOptions.transform || [] baOptions = baOptions || {} baOptions.stage = baOptions.stage || 1 brOptions.transform.u...
var browserify = require('browserify-middleware') var babelify = require('babelify') function babelifyMiddleware(entries, brOptions, baOptions) { brOptions = brOptions || {} brOptions.transform = brOptions.transform || [] baOptions = baOptions || {} baOptions.stage = baOptions.stage || 1 brOptions.transform....
Make browserify default settings accessible
Make browserify default settings accessible
JavaScript
mit
luisfarzati/express-babelify-middleware,luisfarzati/express-babelify-middleware
649c9c09c9a66e085b33346f5062976801543423
examples/routing/src/reducers/user.js
examples/routing/src/reducers/user.js
/* Define your initial state here. * * If you change the type from object to something else, do not forget to update * src/container/App.js accordingly. */ const initialState = {}; module.exports = function(state = initialState, action) { /* Keep the reducer clean - do not mutate the original state. */ //let n...
import {LOGIN} from '../actions/const'; /* Define your initial state here. * * If you change the type from object to something else, do not forget to update * src/container/App.js accordingly. */ const initialState = { login: false }; module.exports = function(state = initialState, action) { /* Keep the reduc...
Change login state When LOGIN action was triggered.
Change login state When LOGIN action was triggered.
JavaScript
mit
stylesuxx/generator-react-webpack-redux,stylesuxx/generator-react-webpack-redux
e3e031e4634522e0764a722ad37791c9913ce1cd
domStorage.js
domStorage.js
function DomStorage() { var cache = {}; function getFromCache(selector){ if(!cache[selector]){ cache[selector] = $(selector); } return cache[selector]; } function updateInCache(selector){ if(!cache[selector]){ throw new TypeError("The selector you want to update does not exist in cache"); ...
function DomStorage() { var cache = {}; function getFromCache(selector){ if(!selector) throw new TypeError("Please provide a selector"); if(!cache[selector]){ cache[selector] = $(selector); } return cache[selector]; } function updateInCache(selector){ if(!selector) throw new TypeError...
Check if a user has given a valid selector when trying to get or update
Check if a user has given a valid selector when trying to get or update
JavaScript
mit
kounelios13/Dom-Storage,kounelios13/Dom-Storage
3ff467f3c1a3c5c9ea911403373229650760850e
bin/server.js
bin/server.js
import config from '../config' import server from '../server/main' import _debug from 'debug' const debug = _debug('app:bin:server') const port = config.server_port const host = config.server_host server.listen(port) debug(`Server is now running at ${host}:${port}.`)
import config from '../config' import server from '../server/main' import _debug from 'debug' const debug = _debug('app:bin:server') const port = config.server_port const host = config.server_host server.listen(port) debug(`Server is now running at http://${host}:${port}.`)
Make the app link clickable
chore(compile): Make the app link clickable This small change makes the link clickable in some terminal emulators (like xfce-terminal), which makes it easier to open the app in a browser.
JavaScript
mit
josedab/react-redux-i18n-starter-kit,josedab/react-redux-i18n-starter-kit
e1ee7a46a12715ce5d8bcfc7bf3180a6b254f228
client/common/layout/layout.js
client/common/layout/layout.js
'use strict'; var _ = require('lodash'); // // Observe quicksearch focus to tweak icon style // N.wire.once('navigate.done', function () { $('.navbar-search .search-query') .focus(function () { $(this).next('div').addClass('focused'); }) .blur(function () { $(this).next('div').removeClass('focused'); }); ...
'use strict'; var _ = require('lodash'); // // Observe quicksearch focus to tweak icon style // N.wire.once('navigate.done', function () { $('.navbar-search .search-query') .focus(function () { $(this).next('div').addClass('focused'); }) .blur(function () { $(this).next('div').removeClass('focused'); }); ...
Fix tab selection on the navbar.
Fix tab selection on the navbar. Split API paths by dots to prevent matching of the dots.
JavaScript
mit
nodeca/nodeca.core,nodeca/nodeca.core
94863a27ba7fccb8236592c5b046ad32d7b48341
source/Vibrato/core/RegExp.js
source/Vibrato/core/RegExp.js
// -------------------------------------------------------------------------- \\ // File: RegExp.js \\ // Module: Core \\ // Requires: Core.js ...
// -------------------------------------------------------------------------- \\ // File: RegExp.js \\ // Module: Core \\ // Requires: Core.js ...
Remove capture group from URL reg exp.
Remove capture group from URL reg exp. You get the whole match anyway. And now you can more easily use the source of the regexp as a part for constructing more complicated regular expressions. e.g. var x = new RegExp( RegExp.url.source + "|" + RegExp.email.source, 'i' );
JavaScript
mit
adityab/overture,Hokua/overture,linagora/overture,linagora/overture,fastmail/overture
fc1a61eb29f6cd38f1694fda155a8173432d1999
tasks/help/index.js
tasks/help/index.js
module.exports = function(target) { if (tasks[target]) console.log(tasks[target].help) else console.log("No help documentation exists for " + target + ".") }
var fs = require('fs') module.exports = function(target) { fs.readFile('doc/' + target + '.md', function(err, data) { if (err) console.log("No help documentation exists for " + target + ".") else console.log(data) }) }
Load markdown docs in help command
Load markdown docs in help command Signed-off-by: Nathan Stier <013f9af474b4ba6f842b41368c6f02c1ee9e9e08@gmail.com>
JavaScript
mit
YWebCA/ywca-cli
88a4ce42993665dba7eef5798334419954f55a67
lib/gulp-index-file-stream.js
lib/gulp-index-file-stream.js
var Readable = require('stream').Readable; var path = require('path-posix'); var util = require('util'); var File = require('vinyl'); // Because the index.html files in our site don't necessarily // come from individual files, it's easiest for us to just // create a stream that emits Vinyl File objects rather than // ...
var Readable = require('stream').Readable; var posixPath = require('path-posix'); var util = require('util'); var File = require('vinyl'); // Because the index.html files in our site don't necessarily // come from individual files, it's easiest for us to just // create a stream that emits Vinyl File objects rather tha...
Change path name to posixPath
Change path name to posixPath
JavaScript
mpl-2.0
Pomax/teach.mozilla.org,fredericksilva/teach.webmaker.org,PaulaPaul/teach.mozilla.org,toolness/teach.webmaker.org,alicoding/teach.mozilla.org,AnthonyBobsin/teach.webmaker.org,cadecairos/teach.mozilla.org,fredericksilva/teach.webmaker.org,emmairwin/teach.webmaker.org,mozilla/teach.webmaker.org,ScottDowne/teach.webmaker....
d77f875ffaf501002c30c49ab7c433730a8fce8e
src/modules/lists/components/connector/jsomConnector.service.js
src/modules/lists/components/connector/jsomConnector.service.js
angular .module('ngSharepoint.Lists') .factory('JSOMConnector', function($q, $sp) { return ({ getLists: function() { return $q(function(resolve, reject) { var context = $sp.getContext(); var lists = context.get_web().get_lists(); ...
angular .module('ngSharepoint.Lists') .factory('JSOMConnector', function($q, $sp) { return ({ getLists: function() { return $q(function(resolve, reject) { var context = $sp.getContext(); var lists = context.get_web().get_lists(); ...
Use enumerator instead of lists
Use enumerator instead of lists
JavaScript
apache-2.0
maxjoehnk/ngSharepoint
6e73dbf020236063f8db213f2459c4d56fa2f661
lib/components/Application.js
lib/components/Application.js
import React, { Component } from 'react' import firebase, { reference, signIn } from '../firebase'; import { pick, map, extend } from 'lodash'; import Input from './Input'; import MessageContainer from './MessageContainer'; // import Search from './Search'; // import Users from './Users'; export default class Applica...
import React, { Component } from 'react' import firebase, { reference, signIn } from '../firebase'; import { pick, map, extend } from 'lodash'; import Input from './Input'; import MessageContainer from './MessageContainer'; // import Search from './Search'; // import Users from './Users'; export default class Applica...
Add items to firebase and repopulate on page load or refresh
Add items to firebase and repopulate on page load or refresh
JavaScript
mit
mlimberg/shoot-the-breeze,mlimberg/shoot-the-breeze
521eed5e6a64f1bf28210d03372cdbb353bb019e
scripts/script.js
scripts/script.js
(function(document, MazeGenerator, MazePainter, MazeInteraction) { 'use strict'; // DOM Elements var canvas = document.getElementById('maze'); var bGenerate = document.getElementById('bGenerate'); var bSolve = document.getElementById('bSolve'); // Start painting loop MazePainter.startPainting(); bGen...
(function(document, MazeGenerator, MazePainter, MazeInteraction) { 'use strict'; // DOM Elements var canvas = document.getElementById('maze'); var bGenerate = document.getElementById('bGenerate'); var bSolve = document.getElementById('bSolve'); // Initialization variables var cellSize = 20; var cellCo...
Use variables to initialize the maze
Use variables to initialize the maze
JavaScript
mit
jghinestrosa/maze-generator,jghinestrosa/maze-generator
c3da45397839ff6e5857b6413471ca64fac99b54
src/article/models/Heading.js
src/article/models/Heading.js
import { TextNode, TEXT } from 'substance' export default class Heading extends TextNode {} Heading.schema = { type: 'heading', level: { type: 'number', default: 1 }, content: TEXT() }
import { TextNode, TEXT } from 'substance' import { RICH_TEXT_ANNOS, EXTENDED_FORMATTING, LINKS_AND_XREFS, INLINE_NODES } from './modelConstants' export default class Heading extends TextNode {} Heading.schema = { type: 'heading', level: { type: 'number', default: 1 }, content: TEXT(RICH_TEXT_ANNOS.concat(EXTEND...
Allow annotations and line-breaks in headings.
Allow annotations and line-breaks in headings.
JavaScript
mit
substance/texture,substance/texture
ee3544448dc1755c99b10e0afe52d295deffbdd8
script/postinstall.js
script/postinstall.js
#!/usr/bin/env node var cp = require('child_process') var fs = require('fs') var path = require('path') var script = path.join(__dirname, 'postinstall') if (process.platform === 'win32') { script += '.cmd' } else { script += '.sh' } // Read + execute permission fs.chmodSync(script, fs.constants.S_IRUSR | fs.cons...
#!/usr/bin/env node var cp = require('child_process') var fs = require('fs') var path = require('path') var script = path.join(__dirname, 'postinstall') if (process.platform === 'win32') { script += '.cmd' } else { script += '.sh' } // Make sure all the scripts have the necessary permissions when we execute them...
Mark all scripts as 0o755
Mark all scripts as 0o755 This gives execute permission for everyone even if Atom is installed as root: https://github.com/atom/atom/issues/19367
JavaScript
mit
atom/apm,atom/apm,atom/apm,atom/apm
36d7c61c7d6f7c6dc4e9bb9191f20890ab148e8c
lib/support/browser_script.js
lib/support/browser_script.js
'use strict'; let fs = require('fs'), path = require('path'), Promise = require('bluebird'), filters = require('./filters'); Promise.promisifyAll(fs); /* Find and parse any browser scripts in rootFolder. Returns a Promise that resolves to an array of scripts. Each script is represented by an object with the...
'use strict'; let fs = require('fs'), path = require('path'), Promise = require('bluebird'), filters = require('./filters'); Promise.promisifyAll(fs); /* Find and parse any browser scripts in rootFolder. Returns a Promise that resolves to an array of scripts. Each script is represented by an object with the...
Configure Bluebird before first use of Promise.
Configure Bluebird before first use of Promise. Turn browser_scripts#defaultScripts into a get property, so it's not executed when the file is being required. This to avoid: Error: cannot enable long stack traces after promises have been created
JavaScript
apache-2.0
sitespeedio/browsertime,tobli/browsertime,sitespeedio/browsertime,sitespeedio/browsertime,sitespeedio/browsertime
83d2edc294966aa1c5d29ef16ddf623f6983cce7
index.js
index.js
"use strict"; /** * Properties to prefix. */ var postcss = require("postcss"), props = [ "hyphens", "line-break", "text-align-last", "text-emphasis", "text-emphasis-color", "text-emphasis-style", "word-break", // writing modes "writing-mode", "text-orientation", "text-combine-uprig...
"use strict"; /** * Properties to prefix. */ var postcss = require("postcss"), props = [ // text "hyphens", "line-break", "text-align-last", "text-emphasis", "text-emphasis-color", "text-emphasis-style", "word-break", // writing modes "writing-mode", "text-orientation", "text-co...
Add speech prefixes - still required in 2012, so should be left in due to reader issues
Add speech prefixes - still required in 2012, so should be left in due to reader issues
JavaScript
mit
Rycochet/postcss-epub,antyakushev/postcss-epub
68d0f077935e3d54d08556cb9ec646b30e443acf
index.js
index.js
var net = require('net'); var config = require('hyperflowMonitoringPlugin.config.js'); var MonitoringPlugin = function () { }; MonitoringPlugin.prototype.sendMetrics = function () { var that = this; //TODO: Create connection once and then try to reuse it var parts = config.metricCollector.split(':'); ...
var net = require('net'); var config = require('hyperflowMonitoringPlugin.config.js'); var MonitoringPlugin = function () { }; MonitoringPlugin.prototype.sendMetrics = function () { var that = this; //TODO: Create connection once and then try to reuse it var parts = config.metricCollector.split(':'); ...
Handle supplying metric collector by env var.
Handle supplying metric collector by env var.
JavaScript
mit
dice-cyfronet/hyperflow-monitoring-plugin
92b28424a9d10ded0ebf59ef2a044596d99627cd
index.js
index.js
const webpack = require('webpack'); const WebpackDevServer = require('webpack-dev-server'); const webpackConfig = require('./webpack.config.local'); new WebpackDevServer(webpack(webpackConfig), { publicPath: '/dist/', hot: true, historyApiFallback: true }).listen(3000, 'localhost', (err) => { if (err) ...
const webpack = require('webpack'); const WebpackDevServer = require('webpack-dev-server'); const args = process.argv; const webpackConfig = require(`./webpack.config.${args[2].substring(2)}`); new WebpackDevServer(webpack(webpackConfig), { publicPath: '/dist/', hot: true, historyApiFallback: true }).liste...
Add option to choose between local and npm
[server] Add option to choose between local and npm
JavaScript
mit
KleeGroup/focus-showcase
04ff61e25b17b68a417908758529e2fbb829ac8d
test/ui/fixtures.js
test/ui/fixtures.js
import m from 'mithril'; import AppComponent from '../../app/scripts/components/app.js'; import AIPlayer from '../../app/scripts/models/ai-player.js'; import { qs } from './utils.js'; export function _before() { // Minimize the transition duration to speed up tests (interestingly, a // duration of 0ms will prevent...
import m from 'mithril'; import AppComponent from '../../app/scripts/components/app.js'; import AIPlayer from '../../app/scripts/models/ai-player.js'; import { qs } from './utils.js'; export function _before() { // Minimize the transition duration to speed up tests (interestingly, a // duration of 0ms will prevent...
Reduce test transition-delay from 200ms to 100ms
Reduce test transition-delay from 200ms to 100ms
JavaScript
mit
caleb531/connect-four
9579909492ac9d80cfec0d9c9858ce7d89760aa1
examples/flux-chat/js/app.js
examples/flux-chat/js/app.js
/** * This file is provided by Facebook for testing and evaluation purposes * only. Facebook reserves all rights not expressly granted. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICUL...
/** * This file is provided by Facebook for testing and evaluation purposes * only. Facebook reserves all rights not expressly granted. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICUL...
Enable React devtools by exposing React (setting window.React)
Enable React devtools by exposing React (setting window.React)
JavaScript
bsd-3-clause
eclectriq/flux,ludiculous/flux,ayarulin/flux,nikhyl/flux,debbas/ChatV2,JanChw/flux,crsr/flux,keikun17/flux,jmandel/flux,gfogle/elm-todomvc,Chen-Han/flux,ephetic/flux,ayarulin/flux,superphung/flux,prabhash1785/flux,rstefek/flux,UIKit0/flux-1,Demian-Moschin/flux,avinnakota/flux,mircle/flux,viviancpy/flux,alexeybondarenko...
5bc3d461c0837f1300baeb39c47062d15b2676d7
client/app/bundles/Index/containers/TableHeadCell.js
client/app/bundles/Index/containers/TableHeadCell.js
import { connect } from 'react-redux' import merge from 'lodash/merge' import clone from 'lodash/clone' import pickBy from 'lodash/pickBy' import { encode } from 'querystring' import TableHeadCell from '../components/TableHeadCell' const mapStateToProps = (state, ownProps) => { const { params, field } = ownProps ...
import { connect } from 'react-redux' import merge from 'lodash/merge' import clone from 'lodash/clone' import pickBy from 'lodash/pickBy' import { encode } from 'querystring' import TableHeadCell from '../components/TableHeadCell' const mapStateToProps = (state, ownProps) => { const { params, field } = ownProps ...
Fix for broken sorting on own fields: remove sort_model from params if the field relation is own
Fix for broken sorting on own fields: remove sort_model from params if the field relation is own
JavaScript
mit
clarat-org/claradmin,clarat-org/claradmin,clarat-org/claradmin,clarat-org/claradmin
fb845792abc681eb600b9a17da11120c8064bd07
packages/strapi-plugin-users-permissions/config/layout.js
packages/strapi-plugin-users-permissions/config/layout.js
module.exports = { user: { actions: { create: 'User.create', // Use the User plugin's controller. update: 'User.update', destroy: 'User.destroy', deleteall: 'User.destroyAll', }, attributes: { username: { className: 'col-md-6' }, email: { className...
module.exports = { user: { actions: { create: 'User.create', // Use the User plugin's controller. update: 'User.update', destroy: 'User.destroy', deleteall: 'User.destroyAll', }, attributes: { username: { className: 'col-md-6' }, email: { className...
Fix to allow provider to be shown in the content manager
Fix to allow provider to be shown in the content manager
JavaScript
mit
wistityhq/strapi,wistityhq/strapi
0c2e09addecb2384efe3bc310c0afee033586d86
index.js
index.js
'use strict'; var execFile = require('child_process').execFile; module.exports = function (str, cb) { execFile('osascript', ['-e', str], function (err, stdout) { if (err) { cb(err); return; } cb(err, stdout.trim()); }); };
'use strict'; var execFile = require('child_process').execFile; module.exports = function (str, cb) { if (process.platform !== 'darwin') { throw new Error('Only OS X systems are supported'); } execFile('osascript', ['-e', str], function (err, stdout) { if (err) { cb(err); return; } cb(err, stdout.tr...
Throw error if used on another OS than OS X
Throw error if used on another OS than OS X
JavaScript
mit
sindresorhus/run-applescript
032243593b312553e384dc068255abc5aea77473
index.js
index.js
"use strict"; var util = require('util'); var minimist = require('minimist'); /** * Parse arguments and return command object * @param {array} argv Command line arguments * @param {object} opts Argument parsing options and commands * @return {object} Command object */ module.exports = function(argv, opts...
"use strict"; var util = require('util'); var minimist = require('minimist'); /** * Parse arguments and return command object * @param {array} argv Command line arguments * @param {object} opts Argument parsing options and commands * @return {object} Command object */ module.exports = function(argv, opts...
Use bind instead of intermediate function
Use bind instead of intermediate function Exec method is 'undefined' if no command callback were defined. Signed-off-by: Harri Kovalainen <2ecf1d4f49b9d136d53b819dc389c152487e9e18@gmail.com>
JavaScript
mit
hakovala/node-simpleton
fe52ed79a76c1fa2a3368da23722ce9f5959e227
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-cli-inject-asset-map', // Add asset map hash to asset-map controller postBuild: function (results) { console.log('Injecting asset map hash...'); var fs = require('fs'), path = require('path'), assetMap = res...
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-cli-inject-asset-map', // Add asset map hash to asset-map controller postBuild: function (results) { var fs = require('fs'), path = require('path'), colors = require('colors'), tree = re...
Update to work with new versions of ember-cli
Update to work with new versions of ember-cli
JavaScript
mit
jcaffey/ember-cli-inject-asset-map,jcaffey/ember-cli-inject-asset-map
d49e5b628ef3c352e6664ab290b831b68bd65e3b
notifications/SiteDownNotification.js
notifications/SiteDownNotification.js
"use strict"; var Mail = require('./channels/Mail'); var Console = require('./channels/Console'); class SiteDownNotification { constructor(site) { this.site = site; this.message = site.getAttribute('url') + ' is down!'; } toMail() { return new Mail().setBody(this.message); } toConsole() { return n...
"use strict"; var Mail = require('./channels/Mail'); var Console = require('./channels/Console'); class SiteDownNotification { constructor(site) { this.site = site; this.message = site.getAttribute('url') + ' is down!'; } toMail() { return new Mail().setBody(this.message); } toConsole() { return n...
Send notification based on the sites settings
Send notification based on the sites settings
JavaScript
mit
jonathandey/uptime-monitor,jonathandey/uptime-monitor
7c39d6c44216d85785e064c724f1b11ce0b46745
index.js
index.js
#!/usr/bin/env node var cli = require('cli').enable('version'); var fs = require('fs'); var path = require('path'); var cwd = process.cwd(); var options = cli.parse({ 'append': ['a', 'append to the given FILEs, do not overwrite'], 'ignore-interrupts': ['i', 'ignore interrupt signals'], ...
#!/usr/bin/env node var cli = require('cli').enable('version').setApp('./package.json'); var fs = require('fs'); var path = require('path'); var cwd = process.cwd(); var options = cli.parse({ 'append': ['a', 'append to the given FILEs, do not overwrite'], 'ignore-interrupts': ['i', 'igno...
Fix ntee -h/--help not showing right name and version and showing cli's ones instead
Fix ntee -h/--help not showing right name and version and showing cli's ones instead
JavaScript
mit
stefanmaric/ntee
cfe3214bc9f571c7e428c85dcd4fcb4845ad5832
index.js
index.js
module.exports = Storage function Storage () { if (!(this instanceof Storage)) return new Storage() this.chunks = [] } Storage.prototype.put = function (index, buf, cb) { this.chunks[index] = buf if (cb) process.nextTick(cb) } function nextTick (cb, err, val) { process.nextTick(function () { cb(err, va...
module.exports = Storage function Storage (chunkLength) { if (!(this instanceof Storage)) return new Storage() this.chunks = [] this.chunkLength = Number(chunkLength) this.closed = false if (!this.chunkLength) throw new Error('First argument must be a chunk length') } Storage.prototype.put = function (index...
Add close and destroy; force fixed chunk length
Add close and destroy; force fixed chunk length
JavaScript
mit
mafintosh/memory-chunk-store
eea34dcd016c2b497ff5af29c149d3e97530e566
index.js
index.js
'use strict'; var consecutiveSlash = /(:)?\/+/g; var endsWithExtension = /[^\/]*\.[^\/]+$/g; var fn = function(match, c) { return c ? '://' : '/'; }; var pppath = function(parts, filename) { if (typeof parts === 'string') { parts = [parts]; } if (filename && !endsWithExtension.test(parts[parts.length-1])...
'use strict'; var consecutiveSlash = /(:)?\/+/g; var endsWithExtension = /[^\/]*\.[^\/]+$/g; var fn = function(match, c) { return c ? '://' : '/'; }; var pppath = function(parts, filename) { if (typeof parts === 'string') { parts = [parts]; } if (filename && parts[parts.length-1].search(endsWithExtension...
Use `String.search` instead of `RegExp.test`
Use `String.search` instead of `RegExp.test`
JavaScript
mit
yuanqing/pppath
869ba7c3b24aa0d8b3d15481df4a7de5327a64e9
lib/white.js
lib/white.js
var generatePairs = function(string) { var pairs = []; string = string.toLowerCase(); for (var i = 0; i < string.length - 1; i++) { pair = string.substr(i, 2); if (!/\s/.test(pair)) { pairs.push(pair); } } return pairs; } var whiteSimilarity = function(string1, string2) { string1 = string...
var generatePairs = function(string) { superPairs = string.toUpperCase() .replace(/[^A-Z ]+/g, '') .split(/\s+/); superPairs = superPairs .map(function(word) { breaks = []; for (var i = 0; i < word.length - 1; i++) { breaks.push(word.slice(i, i + 2)); } return breaks; ...
Make pair generation extensible to multiple words
Make pair generation extensible to multiple words
JavaScript
mit
sanchitgera/Lingual
62c1b14f0e0da04c0952865a74ede42b21ae864b
index.js
index.js
module.exports = function (paths, ignores) { let result = [] let edge = String.prototype for (let i = 0, ignoresLength = ignores.length; i < ignoresLength; i++) { let ignore = ignores[i] if (ignore.lastIndexOf('.') > ignore.lastIndexOf('/')) { edge = edge.endsWith } else { edge = edge.st...
function startsWith (value, start) { return value.slice(0, start.length) === start } function endsWith (value, end) { return value.slice(value.length - end.length) === end } module.exports = function (paths, ignores) { let result = [] let edge for (let i = 0, ignoresLength = ignores.length; i < ignoresLeng...
Use startsWith and endsWith functions
Use startsWith and endsWith functions
JavaScript
mit
whaaaley/path-ignore
5b057575255fc56845c37bae3289da0a72fe93a4
src/routerViewPort.js
src/routerViewPort.js
import {TemplateDirective, View, ViewPort, ViewFactory, InitAttrs} from 'templating'; import {Injector, Inject} from 'di'; @TemplateDirective({selector: 'router-view-port'}) export class RouterViewPort { @Inject(ViewFactory, ViewPort, 'executionContext', Injector, InitAttrs) constructor(viewFactory, viewPort, exec...
import {TemplateDirective, View, ViewPort, ViewFactory, InitAttrs} from 'templating'; import {Injector, Inject} from 'di'; @TemplateDirective({selector: 'router-view-port'}) export class RouterViewPort { @Inject(ViewFactory, ViewPort, 'executionContext', Injector, InitAttrs) constructor(viewFactory, viewPort, exec...
Update the newest templating API
chore(templating): Update the newest templating API
JavaScript
apache-2.0
shangyilim/router,JanPietrzyk/router,rakeshbhavsar/router,excellalabs/router,shangyilim/router,loomio/router,kyroskoh/router,angular/router,excellalabs/router,JanPietrzyk/router,kyroskoh/router,IgorMinar/router,AyogoHealth/router,rakeshbhavsar/router,AyogoHealth/router,shangyilim/router,IgorMinar/router,IgorMinar/route...
02b11e3eef293f87a32bae4ff747dcf4f66d436b
index.js
index.js
var path = require('path'), servestatic = require('serve-static'); var basedir = path.dirname(require.resolve('govuk_template_mustache/package.json')); module.exports = { setup: function (app, options) { options = options || {}; options.path = options.path || '/govuk-assets'; app.use...
var path = require('path'), servestatic = require('serve-static'); var basedir = path.dirname(require.resolve('govuk_template_mustache/package.json')); module.exports = { setup: function (app, options) { options = options || {}; options.path = options.path || '/govuk-assets'; app.use...
Include req.baseUrl is asset path
Include req.baseUrl is asset path If app is namespaced under another route then this needs to be taken into account when importing assets
JavaScript
mit
UKHomeOffice/govuk-template-compiler,UKHomeOffice/govuk-template-compiler
288b361b388a23e4b4ea9aef10f659e5ba65a6ca
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-power-select' };
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-power-select', contentFor: function(type /*, config */) { if (type === 'body-footer') { return `<div id="ember-power-select-wormhole"></div>` } } };
Add the wormhole destination in the {{content-for “body-footer”}}
Add the wormhole destination in the {{content-for “body-footer”}}
JavaScript
mit
cibernox/ember-power-select,Dremora/ember-power-select,cibernox/ember-power-select,chrisgame/ember-power-select,esbanarango/ember-power-select,esbanarango/ember-power-select,cibernox/ember-power-select,esbanarango/ember-power-select,cibernox/ember-power-select,chrisgame/ember-power-select,Dremora/ember-power-select
1e9c43f190abf3cddc7e7704e918abde3368a2ee
index.js
index.js
'use strict'; /* * Dependencies.. */ var Ware; Ware = require('ware'); /* * Components. */ var parse, stringify; parse = require('./lib/parse.js'); stringify = require('./lib/stringify.js'); /** * Construct an MDAST instance. * * @constructor {MDAST} */ function MDAST() { this.parser = new Ware()...
'use strict'; /* * Dependencies.. */ var Ware; Ware = require('ware'); /* * Components. */ var parse, stringify; parse = require('./lib/parse.js'); stringify = require('./lib/stringify.js'); /** * Construct an MDAST instance. * * @constructor {MDAST} */ function MDAST() { this.ware = new Ware(); ...
Rename `ware` internally from `parser` to `ware`
Rename `ware` internally from `parser` to `ware`
JavaScript
mit
eush77/remark,tanzania82/remarks,yukkurisinai/mdast,chcokr/mdast,ulrikaugustsson/mdast,yukkurisinai/mdast,ulrikaugustsson/mdast,eush77/remark,wooorm/remark,chcokr/mdast
068ce6d6a58dceb64c32173c37483f821ae8c31e
index.js
index.js
'use strict'; var cheerio = require('cheerio'); var _ = require('underscore'); var multiline = require('multiline'); var template = _.template(multiline(function() { /* <a href="<%= url %>" title="<%= title %>" class="fancybox"> <img src="<%= url %>" alt="<%= title %>"></img> </a> */ })); module...
'use strict'; var cheerio = require('cheerio'); var _ = require('underscore'); var multiline = require('multiline'); var template = _.template(multiline(function() { /* <a href="<%= url %>" title="<%= title %>" target="_self" class="fancybox"> <img src="<%= url %>" alt="<%= title %>"></img> </a> ...
Add target attribute to a.fancybox to prevent default theme's links following
Add target attribute to a.fancybox to prevent default theme's links following
JavaScript
mit
ly-tools/gitbook-plugin-fancybox,LingyuCoder/gitbook-plugin-fancybox
203d8265d7410a3a8c65366db265569c516f3f12
index.js
index.js
'use strict'; const got = require('got'); const awaitUrl = (url, option) => { const config = Object.assign({}, option, { interval : 1000, tries : 60 }); return new Promise((resolve, reject) => { const attempt = async (tries) => { const res = await got(url, { ...
'use strict'; const got = require('got'); const awaitUrl = (url, option) => { const config = Object.assign({}, option, { interval : 1000, tries : 60 }); return new Promise((resolve, reject) => { const attempt = async (tries) => { const res = await got(url, { ...
Increase timeouts for very slow servers
Increase timeouts for very slow servers
JavaScript
mpl-2.0
sholladay/await-url
c7ac887023341250eb1c4c6e9bb70ae5138b23f9
index.js
index.js
var es6tr = require("es6-transpiler"); var createES6TranspilerPreprocessor = function(args, config, logger, helper) { config = config || {}; var log = logger.create('preprocessor.es6-transpiler'); var defaultOptions = { }; var options = helper.merge(defaultOptions, args.options || {}, config.options || {}); ...
var es6tr = require("es6-transpiler"); var createES6TranspilerPreprocessor = function(args, config, logger, helper) { config = config || {}; var log = logger.create('preprocessor.es6-transpiler'); var defaultOptions = { }; var options = helper.merge(defaultOptions, args.options || {}, config.options || {}); ...
Fix options passed to es6-transpiler
Fix options passed to es6-transpiler Otherwise, `options` is useless.
JavaScript
bsd-3-clause
ouhouhsami/karma-es6-transpiler-preprocessor
3651031dc09ea89f35ffc67363af07f444f2caf7
index.js
index.js
'use strict'; var EventEmitter = require('events').EventEmitter; var Promise = require('bluebird'); var emitThen = function (event) { var args = Array.prototype.slice.call(arguments, 1); return Promise .bind(this) .return(this) .call('listeners', event) .map(function (listener) { var a1...
'use strict'; var EventEmitter = require('events').EventEmitter; var Promise = require('bluebird'); function emitThen (event) { var args = Array.prototype.slice.call(arguments, 1); /* jshint validthis:true */ return Promise .bind(this) .return(this) .call('listeners', event) .map(function (...
Use a named function instead of anon
Use a named function instead of anon
JavaScript
mit
bendrucker/emit-then
8fd6bc21784da5a9cb1bb22ba515b85fb9f8f1a3
index.js
index.js
var httpProxy = require('http-proxy'); var http = require('http'); var CORS_HEADERS = { 'access-control-allow-origin': '*', 'access-control-allow-methods': 'HEAD, POST, GET, PUT, PATCH, DELETE', 'access-control-max-age': '86400', 'access-control-allow-headers': "X-Requested-With, X-HTTP-Method-Override, Conten...
var httpProxy = require('http-proxy'); var http = require('http'); var CORS_HEADERS = { 'access-control-allow-origin': '*', 'access-control-allow-methods': 'HEAD, POST, GET, PUT, PATCH, DELETE', 'access-control-max-age': '86400', 'access-control-allow-headers': "X-Requested-With, X-HTTP-Method-Override, Conten...
Move proxyRes out of request handler; trap errors
Move proxyRes out of request handler; trap errors
JavaScript
mpl-2.0
yourcelf/gspreadsheets-cors-proxy
10280069a4c1ecf5cbaebd8b0f9b67f3d9c219d2
index.js
index.js
'use strict'; var execFile = require('child_process').execFile; var wifiName = require('wifi-name'); function getPassword(ssid, cb) { var cmd = 'sudo'; var args = ['cat', '/etc/NetworkManager/system-connections/' + ssid]; var ret; execFile(cmd, args, function (err, stdout) { if (err) { cb(err); return; ...
'use strict'; var execFile = require('child_process').execFile; var wifiName = require('wifi-name'); function getPassword(ssid, cb) { var cmd = 'sudo'; var args = ['cat', '/etc/NetworkManager/system-connections/' + ssid]; var ret; execFile(cmd, args, function (err, stdout) { if (err) { cb(err); return; ...
Add support for WPA2 Enterprise
Add support for WPA2 Enterprise Fixes #1.
JavaScript
mit
kevva/linux-wifi-password
4683e61d4d3eb6fb696f5e5672831b1f0de0d3db
index.js
index.js
'use strict'; const EventEmitter = require('events'); const devtools = require('./lib/devtools.js'); const Chrome = require('./lib/chrome.js'); function CDP(options, callback) { if (typeof options === 'function') { callback = options; options = undefined; } const notifier = new EventEmitt...
'use strict'; const EventEmitter = require('events'); const dns = require('dns'); const devtools = require('./lib/devtools.js'); const Chrome = require('./lib/chrome.js'); // XXX reset the default that has been changed in // (https://github.com/nodejs/node/pull/39987) to prefer IPv4. since // implementations alway b...
Revert the default DNS lookup order to IPv4-first
Revert the default DNS lookup order to IPv4-first Fix #467
JavaScript
mit
cyrus-and/chrome-remote-interface,cyrus-and/chrome-remote-interface
864ce5aa89a99b17051bb41ce243490b8be0d4a1
index.js
index.js
'use strict' var postcss = require('postcss') var isVendorPrefixed = require('is-vendor-prefixed') module.exports = postcss.plugin('postcss-remove-prefixes', function (options) { if (!options) { options = {}; } var ignore = options.ignore ? Array.isArray(options.ignore) ? options.ignore : false : []; if...
'use strict' var postcss = require('postcss') var isVendorPrefixed = require('is-vendor-prefixed') module.exports = postcss.plugin('postcss-remove-prefixes', function (options) { if (!options) { options = { ignore: [] } } if (!Array.isArray(options.ignore)) { throw TypeError("options.ignore m...
Change code as per @johnotander's suggestion
Change code as per @johnotander's suggestion
JavaScript
mit
johnotander/postcss-remove-prefixes
48db09838c934b349250efbada6aadcc95fece9c
index.js
index.js
/* jshint node: true */ 'use strict'; var path = require('path'); var filterInitializers = require('fastboot-filter-initializers'); var VersionChecker = require('ember-cli-version-checker'); var mergeTrees = require('broccoli-merge-trees'); module.exports = { name: 'ember-cli-head', treeForApp: function(defaultT...
/* jshint node: true */ 'use strict'; var path = require('path'); var filterInitializers = require('fastboot-filter-initializers'); var VersionChecker = require('ember-cli-version-checker'); var mergeTrees = require('broccoli-merge-trees'); module.exports = { name: 'ember-cli-head', treeForApp: function(defaultT...
Check ember-source version from NPM, if not found use ember from bower
Check ember-source version from NPM, if not found use ember from bower
JavaScript
mit
ronco/ember-cli-head,ronco/ember-cli-head