commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
c2812bef92c7f77145654ea55392a1e387281f76
gulp/tasks/sass.js
gulp/tasks/sass.js
'use strict'; import gulp from 'gulp'; import sass from 'gulp-sass'; import gulpif from 'gulp-if'; import browserSync from 'browser-sync'; import autoprefixer from 'gulp-autoprefixer'; import handleErrors from '../util/handle-errors'; import config from '../config'; gulp.task('sass', func...
'use strict'; import gulp from 'gulp'; import sass from 'gulp-sass'; import gulpif from 'gulp-if'; import browserSync from 'browser-sync'; import autoprefixer from 'gulp-autoprefixer'; import handleErrors from '../util/handle-errors'; import config from '../config'; gulp.task('sass', func...
Remove source maps and comments from production
Remove source maps and comments from production
JavaScript
mit
jakemmarsh/react-rocket-boilerplate,jakemmarsh/react-rocket-boilerplate
ef172672651f4e81adb8a700b31b30547bb4ad01
meteor/server/publications.js
meteor/server/publications.js
/* ---------------------------------------------------- +/ ## Publications ## All publications-related code. /+ ---------------------------------------------------- */ /** * Locations * * Publish all locations. There will only ever be a fixed number of locations */ Meteor.publish('allLocations', function() { ...
/* ---------------------------------------------------- +/ ## Publications ## All publications-related code. /+ ---------------------------------------------------- */ /** * Locations * * Publish all locations. There will only ever be a fixed number of locations * * Sort them by the prescribed order. */ Meteo...
Sort the locations on the new model order fields
Sort the locations on the new model order fields
JavaScript
mit
scimusmn/sd-weather,scimusmn/sd-weather
9449c3392fd0ec779e8e4eed8712b973205d515a
test/async.js
test/async.js
/*jshint node:true, laxcomma:true */ /* global describe, it */ 'use strict'; var assert = require('assert') , JBJ = require('jbj') , examples = require('./examples.json'); JBJ.use(require('../lib/')); describe('IST', function () { Object.keys(examples).forEach(function (example) { it(example, function (don...
/*jshint node:true, laxcomma:true */ /* global describe, it */ 'use strict'; var assert = require('assert') , JBJ = require('jbj') , examples = require('./examples.json'); JBJ.use(require('../lib/')); describe('IST', function () { Object.keys(examples).forEach(function (example) { it(example, function (don...
Fix tests: no more time out.
:bug: Fix tests: no more time out.
JavaScript
mit
Inist-CNRS/node-jbj-ist
d9d610106a061158a7759fd0ce4f74e142ace7cd
src/head.html.js
src/head.html.js
module.exports = o => `<head> <title>Tennisvuorot Helsingissä</title> <meta charset="utf-8"/> <meta name="apple-mobile-web-app-capable" content="yes"/> <link rel="apple-touch-icon" href="tennisBall.png"/> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scala...
module.exports = o => `<head> <title>Tennisvuorot Helsingissä</title> <meta charset="utf-8"/> <meta name="apple-mobile-web-app-capable" content="yes"/> <link rel="apple-touch-icon" href="tennisBall.png"/> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scala...
Add meta tag for google
Add meta tag for google
JavaScript
apache-2.0
eeroan/tennishelsinki,eeroan/tennisvuorot,eeroan/tennishelsinki,eeroan/tennisvuorot,eeroan/tennisvuorot
ee7c4d6e4393b799debb2f2e095b1858e931513e
tests/main.js
tests/main.js
describe('Landing page', function() { it('should have the correct title', function(done, server, client) { var title = client.evalSync(function() { var titleText = $('title').text(); emit('return', titleText); }); title.should.equal('NEBUL4'); done(); }); it('should...
describe('Landing page', function() { it('should have the correct title', function(done, server, client) { var title = client.evalSync(function() { var titleText = $('title').text(); emit('return', titleText); }); title.should.equal('NEBUL4'); done(); }); // it('sho...
Comment out now irrelevant laika test
Comment out now irrelevant laika test
JavaScript
mit
tvararu/NEBUL4
ddb5ed1fad38e6c2f90be8862f3f28c9d2561726
app/config/production.js
app/config/production.js
/* * App config for production. */ module.exports = { environment: 'production', db: 'data/dsw-dashboard.sqlite', startDate: '2014-07-01' };
/* * App config for production. */ module.exports = { environment: 'production', connection: { }, db: 'data/dsw-dashboard.sqlite', startDate: '2014-07-01' };
Add empty connection object so Heroku can set the port and host
Add empty connection object so Heroku can set the port and host
JavaScript
bsd-2-clause
evidenceaction/Dispensers-Dashboard-API
c077298a7a5892edd65f48e0485c815b8a6ac08b
src/components/layouts/layout.js
src/components/layouts/layout.js
import React from 'react'; import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import { StaticQuery, graphql } from 'gatsby'; import { ThemeProvider } from 'styled-components'; import Logo from '../Logo'; import Breadcrumb from '../Breadcrumb'; import PageTransition from '../PageTransition'; import ...
import React from 'react'; import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import { StaticQuery, graphql } from 'gatsby'; import { ThemeProvider } from 'styled-components'; import Logo from '../Logo'; import Breadcrumb from '../Breadcrumb'; import PageTransition from '../PageTransition'; // impo...
Hide Blog button for now
Hide Blog button for now
JavaScript
mit
jcmnunes/josenunesxyz
41545cae8fd0dc9785fa260ab83972b5457123cd
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { build: ['Gruntfile.js', 'src/**/*.js'] }, watch: { scripts: { files: 'src/**/*.js', tasks: ['jshint'] } }, copy: { buil...
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { build: ['Gruntfile.js', 'src/**/*.js'] }, watch: { scripts: { files: 'src/**/*.js', tasks: ['jshint'] }, html: { files:...
Add a watch for html changes and launch htmlmin
Add a watch for html changes and launch htmlmin
JavaScript
mit
byanofsky/playa-vista-neighborhood,byanofsky/playa-vista-neighborhood,byanofsky/playa-vista-neighborhood
dc6dd6efc13be6fb6ec7200d93815129c967c0b0
test/unit/finish.js
test/unit/finish.js
 console.log(); console.log('-------------------------------'); console.log(' TESTING COMPLETED'); console.log('-------------------------------'); console.log('Total Tests: ' + assert.count); // ANY ERRORS? if (assert.fail.count) { console.API.color('red', 'Total Failed: ' + assert.fail.count); console.log(); /...
 console.log(); console.log('-------------------------------'); console.log(' TESTING COMPLETED'); console.log('-------------------------------'); console.log('Total Tests: ' + assert.count); // ANY ERRORS? if (assert.fail.count) { console.API.color('red', 'Total Failed: ' + assert.fail.count); console.log(); /...
Return failed test count for CI build
Return failed test count for CI build
JavaScript
mit
sdesalas/trifleJS,sdesalas/trifleJS,sdesalas/trifleJS
14ff135b5974f7aae272a08c03cd7754f3389d87
js/vm/correction.js
js/vm/correction.js
var Correction = function(baseUrl) { var self = this; this.baseUrl = baseUrl; this.erroneousPages = 0; this.erroneousCents = 0; this._printJob = new PrintJob(this.baseUrl, new Cart(baseUrl)); ko.track(this); ko.defineProperty(self, 'erroneousEuros', { get: function() { return self.erroneousCent...
// Handles accounting corrections - erroneously printed pages, etc. var Correction = function(baseUrl) { var self = this; this.baseUrl = baseUrl; this.erroneousPages = 0; this.erroneousCents = 0; // Registering deposit without printing is done by submitting a print job with // non-zero depositCount, but not...
Add a bit of documentation
Add a bit of documentation
JavaScript
mit
TehMillhouse/odie-client,TehMillhouse/odie-client,fsmi/odie-client,fsmi/odie-client,fsmi/odie-client,TehMillhouse/odie-client
f270d11195a9212dbc73d5f23968d779e8ba68b6
background.js
background.js
let isEnabled = false; function toggleState() { isEnabled = !isEnabled; chrome.browserAction.setIcon({ path: isEnabled ? 'icon_enabled.png' : 'icon_disabled.png' }); } chrome .browserAction .onClicked .addListener(toggleState); chrome .runtime .onMessage .addListener(function (request, sender, sendRe...
let isEnabled = false; function toggleState() { isEnabled = !isEnabled; chrome.browserAction.setIcon({ path: isEnabled ? 'icon_enabled.png' : 'icon_disabled.png' }); console.log(`SilverDog is now globally ${isEnabled ? 'enabled' : 'disabled'}.`); } chrome .browserAction .onClicked .addListener(toggleState...
Add logging for status changes
Add logging for status changes
JavaScript
apache-2.0
ubeacsec/Silverdog,ubeacsec/Silverdog
89a105e5b01c32c9b36fdd280edba2545d0c9585
background.js
background.js
var serviceType = '_radiodan-http._tcp.local', serviceFinder = new ServiceFinder(handleServicesFound, serviceType), services = [], recipients = [], pollingInterval = 10000; if (pollingInterval) { window.setInterval(function () { serviceFinder.browseServices(); }, pollingInterval); } ...
var serviceType = '_radiodan-http._tcp.local', serviceFinder = new ServiceFinder(handleServicesFound, serviceType), services = [], recipients = [], pollingInterval = 10000; if (pollingInterval) { window.setInterval(function () { serviceFinder.browseServices(); }, pollingInterval); } ...
Split TXT records into DNS-SD key-value pairs
Split TXT records into DNS-SD key-value pairs
JavaScript
apache-2.0
mediascape/discovery-helper-app
56c5dde135d2184de16ff683c4ab9eb94e633c12
app/props/paddle.js
app/props/paddle.js
import Prop from 'props/prop'; import canvas from 'canvas'; export default class Paddle extends Prop { constructor(x, y) { super(x, y, 10, 60); this.maxY = canvas.height - this.height; this.score = 0; } move(y) { const willBeOutOfBounds = this.y + y >= this.maxY; return super.move(0, willBe...
import Prop from 'props/prop'; import canvas from 'canvas'; export default class Paddle extends Prop { constructor(x, y) { super(x, y, 10, 60); this.maxY = canvas.height - this.height; this.minY = 0; this.score = 0; } move(y) { const willBeOutOfBounds = (this.y + y >= this.maxY) || (this.y +...
Fix out of bounds issue for Ai
Fix out of bounds issue for Ai
JavaScript
mit
oliverbenns/pong,oliverbenns/pong
3bb8e13ad2a41d9242f11e1e6b761f0f338b2768
app/controllers/pollController.server.js
app/controllers/pollController.server.js
'use strict'; var Polls = require('../models/polls.js'); function pollHandler () { this.getPolls = function (req, res) { Polls.find(function (err, polls) { if (err) return res.sendStatus(500); res.render('index', {polls: polls}); }); } this.addPoll = function (req...
'use strict'; var Polls = require('../models/polls.js'); function pollHandler () { this.getPolls = function (req, res) { Polls.find(function (err, polls) { if (err) return res.sendStatus(500); res.render('index', {polls: polls}); }); } this.addPoll = function (req...
Add dummy result to /poll/:id
Add dummy result to /poll/:id
JavaScript
mit
CatherineBacon/voting-app,CatherineBacon/voting-app
5b5ae49acde0a8d80c5544f91f0f187fd3b39b1f
app/scripts/controllers/createProject.js
app/scripts/controllers/createProject.js
'use strict'; /** * @ngdoc function * @name openshiftConsole.controller:CreateProjectController * @description * # CreateProjectController * Controller of the openshiftConsole */ angular.module('openshiftConsole') .controller('CreateProjectController', function ($scope, DataService, Notification, Navigate) { ...
'use strict'; /** * @ngdoc function * @name openshiftConsole.controller:CreateProjectController * @description * # CreateProjectController * Controller of the openshiftConsole */ angular.module('openshiftConsole') .controller('CreateProjectController', function ($scope, AuthService, DataService, Notification, ...
Add AuthService.withUser() call to CreateProjectController
Add AuthService.withUser() call to CreateProjectController This redirects to the login page if the user hits the URL when not logged in.
JavaScript
apache-2.0
openshift/origin-web-console,openshift/origin-web-console,openshift/origin-web-console,openshift/origin-web-console
5261639cb3d46a3e70c6053a5169ae75e526cb23
lib/cli.js
lib/cli.js
'use strict'; var findup = require('findup-sync'); var spawnSync = require('child_process').spawnSync; var gruntPath = findup('node_modules/grunt-cli/bin/grunt', {cwd: __dirname}); process.title = 'grunth'; var harmonyFlags = [ '--harmony_scoping', // '--harmony_modules', // We have `require` and ES6 modules ...
'use strict'; var findup = require('findup-sync'); var spawnSync = require('child_process').spawnSync; var gruntPath = findup('node_modules/grunt-cli/bin/grunt', {cwd: __dirname}); process.title = 'grunth'; var harmonyFlags = [ '--harmony_scoping', // '--harmony_modules', // We have `require` and ES6 modules ...
Remove --harmony_collections & --harmony_iteration, their features are now on by default
Remove --harmony_collections & --harmony_iteration, their features are now on by default
JavaScript
mit
EE/grunth-cli
563d1450e1848e2c34f3bf14b66474ca1dfb4f6d
typescript.js
typescript.js
module.exports = { extends: [ require.resolve('.'), 'plugin:@typescript-eslint/recommended', 'prettier/@typescript-eslint', ], parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint'], settings: { 'import/extensions': ['.js', '.ts', '.tsx'], 'import/parsers': { '@typescri...
module.exports = { extends: [ require.resolve('.'), 'plugin:@typescript-eslint/recommended', 'prettier/@typescript-eslint', ], parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint'], settings: { 'import/extensions': ['.js', '.ts', '.tsx'], 'import/parsers': { '@typescri...
Upgrade severity of TS recommended rules from warning to error
Upgrade severity of TS recommended rules from warning to error
JavaScript
mit
kensho/eslint-config-kensho,kensho/eslint-config-kensho
53059737040c1451f707bdf25d62b07a389f02ed
lib/migrate_task.js
lib/migrate_task.js
'use strict'; var Umzug = require('umzug'); var Sequelize = require('sequelize'); var DataTypes = require('sequelize/lib/data-types'); function createMigrator(opts) { var db = new Sequelize(opts.database, opts.username, opts.password, opts); return new Umzug({ storage: 'sequelize', storageOptions: { ...
'use strict'; var url = require('url'); var Umzug = require('umzug'); var Sequelize = require('sequelize'); var DataTypes = require('sequelize/lib/data-types'); function createMigrator(opts) { if (opts.use_env_variable) { var databaseUrl = url.parse(process.env[opts.use_env_variable]); opts.database = datab...
Add support for use_env_variable in config
Add support for use_env_variable in config
JavaScript
mit
sprymix/grunt-sequelize
edd0e0ce12fc5dd00845a49365cdb109f2cff797
js/lem2-tests.js
js/lem2-tests.js
'use strict'; var expect = require('chai').expect; var LEM2 = require('./lem2.js'); describe('LEM2 Module', function() { it('should exist', function() { expect(LEM2).to.not.be.undefined; }); it('should have an executeProcedure function', function() { expect(LEM2.executeProcedure).to.not.be.u...
'use strict'; var expect = require('chai').expect; var LEM2 = require('./lem2.js'); describe('LEM2 Module', function() { it('should exist', function() { expect(LEM2).to.not.be.undefined; }); it('should have an executeProcedure function', function() { expect(LEM2.executeProcedure).to.be.a('fu...
Change execute procedure exists test
Change execute procedure exists test
JavaScript
mit
lrdodge/lem2,lrdodge/lem2
b4e9b36b124a9b3f1cc79fa94c5e5fdae9312314
lib/GitterBot.js
lib/GitterBot.js
var Gitter = require('node-gitter'); /** * Create new instance of GitterBot * @param {String} key Your API key * @constructor */ function GitterBot(key) { this.setApiKey(key); } GitterBot.prototype = { /** * Set API key to GitterBot instance * @param {String} key New API key * @returns {GitterBot} ...
var Gitter = require('node-gitter'); var fs = require('fs'); var config = fs.existsSync('../config/local.js') ? require('../config/local.js') : {}; /** * Create new instance of GitterBot * @param {String} key Your API key * @constructor */ function GitterBot(key) { this.setApiKey(key); } GitterBot.prototype = {...
Add reading local config from file
Add reading local config from file
JavaScript
mit
ghaiklor/uwcua-vii
7103219ed8931392323b6260779bcebedbb3a306
js/resumeBuilder.js
js/resumeBuilder.js
/* This file contains all of the code needed to create four JSONs corresponding to four distinct sections in index.html: work, education, projects and a header with biographical information. In addition, this file also uses code from helper.js to render index.html correctly. */
/* This file contains all of the code needed to create four JSONs corresponding to four distinct sections in index.html: work, education, projects and a header with biographical information. In addition, this file also uses code from helper.js to render index.html correctly. */ /* JSON object containing biographic...
Add JSON object bio containing biographical info
Add JSON object bio containing biographical info
JavaScript
mit
vishallama/udacity-frontend-online-resume,vishallama/udacity-frontend-online-resume
0a7c71c72eef572fa3ff7b1e6c14cb183b3cc05e
src/plugins/dev-null/dev-null.js
src/plugins/dev-null/dev-null.js
const DEFAULT_CHECK_FREQUENCY = 10; const DEFAULT_MIN_AGE = 5; module.exports = (opts) => { const init = (app) => { app.addCronTrigger(`*/${opts.checkFrequency || DEFAULT_CHECK_FREQUENCY} * * * *`, (bot) => { console.log('trying to clear messages.'); bot.getMessages({ channelID: opts.channel, limit: ...
const DEFAULT_CHECK_FREQUENCY = 10; const DEFAULT_MIN_AGE = 5; module.exports = (opts) => { const init = (app) => { app.addCronTrigger(`*/${opts.checkFrequency || DEFAULT_CHECK_FREQUENCY} * * * *`, (bot) => { console.log('trying to clear messages.'); bot.getMessages({ channelID: opts.channel, limit: ...
Fix delete fail when only single deletion needed
Fix delete fail when only single deletion needed The deleteMessages method only supports deleting more that one message, so deleteMessage is used when there is a single thing to delete.
JavaScript
mit
SarenCurrie/discord-r9k
7ae621fe021f547f81874d2e03d6457478347230
lib/Predictions.js
lib/Predictions.js
import React, { Component } from 'react'; import { StyleSheet, FlatList, View } from 'react-native'; import Prediction from './Prediction'; class Predictions extends Component { constructor(props) { super(props); } render() { return ( <View style={style.container}> ...
import React, { Component } from 'react'; import { StyleSheet, View } from 'react-native'; import Prediction from './Prediction'; class Predictions extends Component { static defaultProps = { predictions: [] } constructor(props) { super(props); } render() { return ...
Change to map rather use `FlatList` to avoid press event handling issues
Change to map rather use `FlatList` to avoid press event handling issues
JavaScript
mit
chrislam/react-native-google-place-autocomplete
0d2c8d035ef89fc9753c2e3769f478a870ac1368
models/rating.js
models/rating.js
module.exports = function (sequelize, DataTypes) { const Rating = sequelize.define('Rating', { id: { primaryKey: true, type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4 }, value: { type: DataTypes.INTEGER, allowNull: false, validate: { min: 0 } }, ...
const _ = require('lodash') const createError = require('http-errors') module.exports = function (sequelize, DataTypes) { const Rating = sequelize.define('Rating', { id: { primaryKey: true, type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4 }, value: { type: DataTypes.INTEGER, ...
Add missing value check to Rating model's beforeBulkCreate
Add missing value check to Rating model's beforeBulkCreate
JavaScript
apache-2.0
cesarandreu/bshed,cesarandreu/bshed
4487a9b0628db7670a3b252db3de8c6e7b46fde0
src/with-raw.js
src/with-raw.js
import { root } from './util'; const { HTMLElement } = root; export function withRaw (Base = HTMLElement) { return class extends Base { static is = null static observedAttributes = [] attributeChangedCallback () {} connectedCallback () {} disconnectedCallback () {} }; }
import { root } from './util'; const { HTMLElement = class {} } = root; export function withRaw (Base = HTMLElement) { return class extends Base { static is = null static observedAttributes = [] attributeChangedCallback () {} connectedCallback () {} disconnectedCallback () {} }; }
Fix broken node test by ensuring a default for HTMLElement.
test: Fix broken node test by ensuring a default for HTMLElement.
JavaScript
mit
skatejs/skatejs,chrisdarroch/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs
7b69a2c8f293ffba1960585894598d029c72155c
modules/marco.js
modules/marco.js
var scrape = require('scrape'); var _ = require('underscore'); var bot = require('..') bot.addListener('message', function (nick, to, text, message) { if(text == "!marco") { var marco = 'http://newmarco.co.uk/new_orderorder_takeaway_in_Cardiganshire_try_Pizzas_c_64751.htm'; scrape.request(marco, function (er...
var scrape = require('scrape'); var _ = require('underscore'); var bot = require('..') bot.addListener('message', function (nick, to, text, message) { if(text == "!marco") { var marco = 'http://newmarco.co.uk/new_orderorder_takeaway_in_Cardiganshire_try_Pizzas_c_64751.htm'; scrape.request(marco, function (er...
Add functionality to see closure message
Add functionality to see closure message
JavaScript
isc
zuzakistan/civilservant,zuzakistan/civilservant
4c9aedd1239f8848c48e885b1bac78e75f6c42bf
options.js
options.js
function restore() { var nurls = 0; for (var k in localStorage) { if (k.match(/^http:/)) { nurls++; var tr = document.createElement('tr'); var info = JSON.parse(localStorage[k]); tr.innerHTML = '<td>' + k + '</td><td><a href="' + info['long...
function restore() { var nurls = 0; for (var k in localStorage) { if (k.match(/^http:/)) { nurls++; var tr = document.createElement('tr'); var info = JSON.parse(localStorage[k]); tr.innerHTML = '<td>' + k + '</td><td><a href="' + info['long...
Replace undefined/null with something human-readable
Replace undefined/null with something human-readable
JavaScript
mit
decklin/explode
85476dde31fc970ebd45969fade0442ecbbc4801
assets/javascripts/my.js
assets/javascripts/my.js
// Заменяем MSN_ID на текстовые описания. function set_userlist_msn(){ $('tr td:nth-child(2)', '.uTable').each(function(i){ var $this = $(this); var h = $this.html(); if (~~h) $this.addClass('fraction-name' + h).html('&nbsp;'); }); } $(function () { // Ссылки на профили...
// Заменяем MSN_ID на текстовые описания. function set_userlist_msn(){ $('tr td:nth-child(2)', '.uTable').each(function(i){ var $this = $(this); var h = $this.html(); if (~~h) $this.addClass('fraction-name' + h).html('&nbsp;'); }); } $(function () { // Ссылки на профили...
Add forgotten JS for VK like button.
Add forgotten JS for VK like button.
JavaScript
mit
nevendaar/nev,nevendaar/nev,nevendaar/nev
aaaa420640fceebadc548d23c4a8192b503ea111
lib/mock/emitter.js
lib/mock/emitter.js
// Copyright (c) 2017 The Regents of the University of Michigan. // All Rights Reserved. Licensed according to the terms of the Revised // BSD License. See LICENSE.txt for details. module.exports = function() { let internal = {}; internal.callbacks = new Map(); let emitter = {}; emitter.emit = function(theEve...
// Copyright (c) 2017 The Regents of the University of Michigan. // All Rights Reserved. Licensed according to the terms of the Revised // BSD License. See LICENSE.txt for details. module.exports = function() { let internal = {}; let emitter = {}; emitter.emit = function(theEvent) { if (internal.callbacks.h...
Move internal definitions to the bottom
:muscle: Move internal definitions to the bottom
JavaScript
bsd-3-clause
daaang/awful-mess
fce3830bed6c03b43e06b648c51154c6f67255ab
assets/scripts/master.js
assets/scripts/master.js
'use strict'; /* * Novicell master * Use this file to call functions in other files, on document ready, window.resize etc. */ var novicell = novicell || {}; var projectName = projectName || {}; // Document ready document.addEventListener('DOMContentLoaded', function(){ svg4everybody(); // Fix SVG spritemap in IE/...
'use strict'; /* * Novicell master * Use this file to call functions in other files, on document ready, window.resize etc. */ var novicell = novicell || {}; var projectName = projectName || {}; // Document ready document.addEventListener('DOMContentLoaded', function(){ novicell.validate.init(); // Init Validation...
Call svg4everybody in a setTimeout
Call svg4everybody in a setTimeout Fixing issue with svg4everybody not handling icons that are loaded with latency in e.g. Vue components
JavaScript
mit
hesselberg/novicell-frontend,hesselberg/novicell-frontend
124aa4bf1d87ef928f0092d8ad597d15c4ea6cb8
src/modules/plugins/editor-auto-resize-textarea/editor-auto-resize-textarea.js
src/modules/plugins/editor-auto-resize-textarea/editor-auto-resize-textarea.js
define('editor-plugin-auto-resize-textarea', [], function () { 'use strict'; return function(markdownEditorNode, options) { return function(editor) { editor.events.subscribe('content:updated', function(mode) { if(mode === editor.constants.MODES.MARKDOWN && markdownEditorNode.scrollHeight > (option...
define('editor-plugin-auto-resize-textarea', [], function () { 'use strict'; return function(markdownEditorNode, options) { return function(editor) { var handleContentUpdate = function () { if(markdownEditorNode.scrollHeight > (options && options.minHeight? options.minHeight : 200)) { ma...
Add UI input event listener and a temp fix for the scrolling issue
Add UI input event listener and a temp fix for the scrolling issue
JavaScript
mit
moneyadviceservice/cms-editor,moneyadviceservice/cms-editor
42fc4ca0059bcff2e638d77d69138bdb4496cdbc
lib/create-redis-client.js
lib/create-redis-client.js
'use strict'; const redis = require('redis'); const url = require('url'); /** * A module for creating Redis clients, which we do a lot. * @module createRedisClient */ module.exports = createRedisClient; /** * Create a Redis client from `$REDIS_URL`. * * Will throw if this variable is not present or can not ...
'use strict'; const redis = require('redis'); const url = require('url'); /** * A module for creating Redis clients, which we do a lot. * @module createRedisClient */ module.exports = createRedisClient; /** * Create a Redis client from `$REDIS_URL`. * * Will throw if this variable is not present or can not ...
Fix url/redisURL in createRedisClient :\
Fix url/redisURL in createRedisClient :\
JavaScript
mit
usecanvas/longhouse,usecanvas/presence,usecanvas/longhouse,usecanvas/presence
f24654581a389e14e55e196946ae7068576054d8
app/transmute.js
app/transmute.js
#!/usr/bin/env node 'use strict'; // Load base requirements const program = require('commander'), dotenv = require('dotenv').config(), path = require('path'); // Load our libraries const utils = require('./libs/utils'), logger = require('./libs/log'), i18n = require('./libs/locale'), que...
#!/usr/bin/env node 'use strict'; // Load base requirements const program = require('commander'), dotenv = require('dotenv').config(), path = require('path'); // Load our libraries const utils = require('./libs/utils'), logger = require('./libs/log'), i18n = require('./libs/locale'), que...
Remove failing example from entry file for now
Remove failing example from entry file for now
JavaScript
apache-2.0
transmutejs/core
821cb5f233085f067e448d4fef61c83f6b73916f
web/wp-content/themes/twentyseventeen-child/source/js/twentyseventeen-child.js
web/wp-content/themes/twentyseventeen-child/source/js/twentyseventeen-child.js
console.log('TwentySeventeen Child Theme Initializing!');
/** * Test ES6 support with const and arrow functions */ const initializeTwentySeventeenChildTheme = () => { console.log('TwentySeventeen Child Theme Initializing!'); }; initializeTwentySeventeenChildTheme();
Test ES6 support with const and arrow functions
Test ES6 support with const and arrow functions
JavaScript
mit
ataylorme/Advanced-WordPress-on-Pantheon,ataylorme/Advanced-WordPress-on-Pantheon,ataylorme/Advanced-WordPress-on-Pantheon
861be32017ecf248f9a9bad303a8003af6a530b0
src/bluetooth/SensorManager.js
src/bluetooth/SensorManager.js
// Default sensor generator. const createSensor = ({ id, macAddress, name, location, batteryLevel, isActive, logInterval }) => ({ id, macAddress, name, location, batteryLevel, isActive, logInterval, }); class SensorManager { constructor(dbService, utils) { this.db = dbService; this.utils = util...
// Default sensor generator. const createSensor = ({ id, macAddress, name, location, batteryLevel, isActive, logInterval }) => ({ id, macAddress, name, location, batteryLevel, isActive, logInterval, }); class SensorManager { constructor(dbService, utils) { this.db = dbService; this.utils = util...
Add default empty code to sensors created through sensor manager
Add default empty code to sensors created through sensor manager
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
7685a22c6021f88123eb5cc05cbc478b941d19ec
thingmenn-frontend/src/widgets/mp/index.js
thingmenn-frontend/src/widgets/mp/index.js
import React from 'react' import PropTypes from 'prop-types' import ListItem from '../list-item' import ListItemImage from '../list-item-image' import ListItemContent from '../list-item-content' import PartyBadge from '../partybadge' import './styles.css' const Mp = ({ id, imagePath, lthing, name, party, ...
import React from 'react' import PropTypes from 'prop-types' import ListItem from '../list-item' import ListItemImage from '../list-item-image' import ListItemContent from '../list-item-content' import PartyBadge from '../partybadge' import './styles.css' const Mp = ({ id, imagePath, lthing, name, partyId,...
Use partyId to display PartyBadge for mps on front page
Use partyId to display PartyBadge for mps on front page
JavaScript
mit
baering/thingmenn,baering/thingmenn,baering/thingmenn,baering/thingmenn
ed04057244432a6b415c638bd65dea3c4a1a857a
lib/video-format.js
lib/video-format.js
var exports = {}; exports.simplePrint = function(video) { return `**${video.title}**`; }; exports.prettyPrint = function(video) { viewCount = video.view_count.replace(/\B(?=(\d{3})+(?!\d))/g, ','); return `**${video.title}** by **${video.author}** *(${viewCount} views)*`; }; exports.prettyPrintWithUser = funct...
var exports = {}; exports.simplePrint = function(video) { return `**${video.title}**`; }; exports.prettyPrint = function(video) { viewCount = video.view_count.replace(/\B(?=(\d{3})+(?!\d))/g, ','); return `**${video.title}** by **${video.author}** *(${viewCount} views)*`; }; exports.prettyPrintWithUser = funct...
Fix a floating point issue
Fix a floating point issue
JavaScript
mit
meew0/Lethe
9c37b6a24994610609077abe792ad066b2d27957
lib/ivy-reporter.js
lib/ivy-reporter.js
module.exports = IvyReporter; function IvyReporter(runner) { var errors = []; runner.on('fail', function(test, error) { errors.push(error); }); runner.on('end', function(){ if (!errors.length) { console.log('OK'); } else { errors.forEach(function (error) { var message = error....
module.exports = IvyReporter; function IvyReporter(runner) { var errors = []; runner.on('fail', function(test, error) { errors.push(error); }); runner.on('end', function(){ if (!errors.length) { console.log('OK'); } else { errors.forEach(function (error) { var message = error....
Update error handling for Node.js 0.12.0.
Update error handling for Node.js 0.12.0. Parse and output the error message context, which are now included in the error output under Node.js 0.12.0.
JavaScript
mit
IvyApp/mocha-ivy-reporter
61a7a13d4e7dcbbb40acdedbcbd0e436c4d94e18
lib/object-event.js
lib/object-event.js
/* * object-event * https://github.com/ileri/object-event * * Copyright (c) 2014 Malte-Maurice Dreyer * Licensed under the MIT license. */ "use strict"; import {initEvent} from "./event"; import {initTarget} from "./target"; var pTarget = Symbol("target"), pEventPhase = Symbol("event phase"), pCurrentT...
"use strict"; import {initEvent} from "./event"; import {initTarget} from "./target"; var pTarget = Symbol("target"), pEventPhase = Symbol("event phase"), pCurrentTarget = Symbol("current target"); initEvent(pTarget, pEventPhase, pCurrentTarget); initTarget(pTarget, pEventPhase, pCurrentTarget); export {Eve...
Remove copyright notice from file
Remove copyright notice from file
JavaScript
mit
ileri/object-event
ba5abbac55975242cae4339a65aa333fd17c7767
assets/modulr.js
assets/modulr.js
var modulr = (function(global) { var _modules = {}, _aliases = {}, _cache = {}, PREFIX = '__module__'; // Prefix identifiers to avoid issues in IE. function log(str) { if (global.console && console.log) { console.log(str); } } function require(identifier) { var m, key = PREFIX + ...
var modulr = (function(global) { var _modules = {}, _aliases = {}, _cache = {}, PREFIX = '__module__'; // Prefix identifiers to avoid issues in IE. function log(str) { if (global.console && console.log) { console.log(str); } } function require(identifier) { var m, key = PREFIX + ...
Use PREFIX pseudo-constant where appropriate.
Use PREFIX pseudo-constant where appropriate.
JavaScript
mit
tobie/modulr,tobie/modulr
498f0fb0cbda02cb5f31df9605a8eeb7413fdf48
src/components/organizations/routes.js
src/components/organizations/routes.js
import React from 'react'; import { Route, Switch } from 'react-router-dom'; import OrganizationExplorer from './organization-explorer'; import OrganizationDetails from './organization-details'; import NotFound from '../not-found' import { proccessPatterns } from '../../utils/router-mapping'; import { connector as orga...
import React from 'react'; import { Route, Switch } from 'react-router-dom'; import OrganizationExplorer from './organization-explorer'; import OrganizationDetails from './organization-details'; import NotFound from '../not-found' import { connector as organizationListConnector } from './organization-explorer' export ...
Handle multiple patterns for organization URIs
Handle multiple patterns for organization URIs
JavaScript
mit
FranckCo/Operation-Explorer,FranckCo/Operation-Explorer
e6a0648f90614f3e490f2f84719b017a26bd1e24
src/utils/matches-ast.js
src/utils/matches-ast.js
import _ from 'lodash'; /** * Creates a function that matches AST against the given pattern, * * Just like _.matches(), but with the addition that a Function * can be provided to assert various conditions e.g. checking * that an array must be of a specific length. * * @param {Object} pattern * @return {Funct...
import _ from 'lodash'; /** * Creates a function that matches AST against the given pattern, * * Similar to LoDash.matches(), but with the addition that a Function * can be provided to assert various conditions e.g. checking * that an array must be of a specific length. * * Additionally the utility extract() ca...
Extend matchesAst() to support extracting fields
Extend matchesAst() to support extracting fields Instead of returning true when match found, the matcher created by matchesAst() will return an object with extracted fields - these are marked inside the object pattern using extract() utility. This allows us to combine the matching and extracting steps into one simple...
JavaScript
mit
lebab/lebab,mohebifar/xto6,mohebifar/lebab
e43f6a95c03fbb745a46b1454e50268e61a61112
src/mago3d/geometry/Point4D.js
src/mago3d/geometry/Point4D.js
'use strict'; /** * 4차원 정보 * @class Point4D */ var Point4D = function(x, y, z, w) { if (!(this instanceof Point4D)) { throw new Error(Messages.CONSTRUCT_ERROR); } if (x !== undefined) { this.x = x; } else { this.x = 0.0; } if (y !== undefined) { this.y = y; } else { this.y = 0.0; } if (z !== un...
'use strict'; /** * 4차원 정보 * @class Point4D * @param {Number} x * @param {Number} y * @param {Number} z * @param {Number} w */ var Point4D = function(x, y, z, w) { if (!(this instanceof Point4D)) { throw new Error(Messages.CONSTRUCT_ERROR); } if (x !== undefined) { this.x = x; } else { this.x = 0.0;...
Make a comment on this file
Make a comment on this file
JavaScript
apache-2.0
Gaia3D/mago3djs
0d2db3f659c1b50544c86fef0f741534add68f0c
src/auth/authActions.js
src/auth/authActions.js
import Promise from 'bluebird'; import steemConnect from 'sc2-sdk'; import Cookie from 'js-cookie'; import request from 'superagent'; import { getFollowing } from '../user/userActions'; import { initPushpad } from './pushpadHelper'; Promise.promisifyAll(steemConnect); Promise.promisifyAll(request.Request.prototype); ...
import Promise from 'bluebird'; import steemConnect from 'sc2-sdk'; import Cookie from 'js-cookie'; import request from 'superagent'; import { getFollowing } from '../user/userActions'; import { initPushpad } from './pushpadHelper'; Promise.promisifyAll(steemConnect); Promise.promisifyAll(request.Request.prototype); ...
Update login api changes for steemconnect-v2
Update login api changes for steemconnect-v2
JavaScript
mit
ryanbaer/busy,ryanbaer/busy,busyorg/busy,busyorg/busy
b738042d9b7d5ea5984744b0fb729d753ebc51e7
client/index.js
client/index.js
import SwaggerUI from 'swagger-ui' import 'swagger-ui/dist/swagger-ui.css'; import './styles.css' window.drsSettings.dom_id = '#rest-swagger-ui'; window.drsSettings.spec = window.drsSpec; window.swagger = SwaggerUI(window.drsSettings);
import SwaggerUI from 'swagger-ui' import 'swagger-ui/dist/swagger-ui.css'; import './styles.css' window.drsSettings.dom_id = '#rest-swagger-ui'; window.drsSettings.spec = window.drsSpec; const csrfTokenInput = window.document.getElementsByName('csrfmiddlewaretoken'); // If present, set CSRF token to request headers...
Set CSRF token to HTTP requests when present
Set CSRF token to HTTP requests when present
JavaScript
bsd-2-clause
marcgibbons/django-rest-swagger,marcgibbons/django-rest-swagger,marcgibbons/django-rest-swagger,marcgibbons/django-rest-swagger
3a3ad392b9f61b8daf936cf80d0a24a20c93f366
app/models/user-role.js
app/models/user-role.js
import DS from 'ember-data'; export default DS.Model.extend({ title: DS.attr('string'), users: DS.hasMany('user', {async: true}), });
import DS from 'ember-data'; export default DS.Model.extend({ title: DS.attr('string'), });
Remove users from UserRole model
Remove users from UserRole model no longer in the API
JavaScript
mit
ilios/frontend,djvoa12/frontend,jrjohnson/frontend,gabycampagna/frontend,djvoa12/frontend,ilios/frontend,dartajax/frontend,gboushey/frontend,thecoolestguy/frontend,stopfstedt/frontend,jrjohnson/frontend,gabycampagna/frontend,dartajax/frontend,gboushey/frontend,stopfstedt/frontend,thecoolestguy/frontend
e4046696a005bb12ec32b0a1a7f8139f22144df3
app/utils/themeUtils.js
app/utils/themeUtils.js
import imageLogoLight from 'app/assets/logo-dark.png'; import imageLogoDark from 'app/assets/logo.png'; export const applySelectedTheme = theme => { document.documentElement.setAttribute('data-theme', theme); global.dispatchEvent(new Event('themeChange')); }; export const getTheme = () => { return ( (docume...
import imageLogoLight from 'app/assets/logo-dark.png'; import imageLogoDark from 'app/assets/logo.png'; export const applySelectedTheme = theme => { if (document) { document.documentElement.setAttribute('data-theme', theme); global.dispatchEvent(new Event('themeChange')); } }; export const getTheme = () =...
Check that document is defined
Check that document is defined
JavaScript
mit
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
3aa73289cfae3fc800532d0acca0832ad180dca3
src/shader.js
src/shader.js
export function createShaderProgram(gl, vs, fs) { var program = gl.createProgram(); function createShader(type, source) { var shader = gl.createShader(type); gl.shaderSource(shader, source); gl.compileShader(shader); gl.attachShader(program, shader); } createShader(gl.VERTEX_SHADER, vs); cre...
export function createShaderProgram(gl, vs, fs) { var program = gl.createProgram(); function createShader(type, source) { var shader = gl.createShader(type); gl.shaderSource(shader, source); gl.compileShader(shader); gl.attachShader(program, shader); } createShader(gl.VERTEX_SHADER, vs); cre...
Add setVec3Uniform and remove createIndicesBuffer
Add setVec3Uniform and remove createIndicesBuffer Draw with gl.TRIANGLES instead of using indices.
JavaScript
mit
razh/js13k-2016,razh/js13k-2016
de3065ecd56fb6b1b8b6af25033be5afc1bd6c3e
pages/dropdowns.js
pages/dropdowns.js
const React = require('react'); const Page = require('./components/Page'); const Example = require('./components/Example'); const CodeEditor = require('./components/CodeEditor'); const Panel = require('../src/Panel'); const Dropdown = require('../src/Dropdown'); const Button = require('../src/Button'); const Icon = r...
const React = require('react'); const Page = require('./components/Page'); const Example = require('./components/Example'); const CodeEditor = require('./components/CodeEditor'); const Panel = require('../src/Panel'); const Dropdown = require('../src/Dropdown'); const Button = require('../src/Button'); const Icon = r...
Add button caret to example for dropdown
Add button caret to example for dropdown
JavaScript
apache-2.0
GitbookIO/styleguide,rlugojr/styleguide,GitbookIO/styleguide,rlugojr/styleguide
31cb18dabb765d0473e17962fe8eac882ed242d7
lib/simple-queue.js
lib/simple-queue.js
module.exports = SimpleQueue; function SimpleQueue() { var self = this; self.fifo = []; self.executing = false; } SimpleQueue.prototype.push = function (fn) { var self = this; self.fifo.push(fn); self.maybeNext(); }; SimpleQueue.prototype.maybeNext = function () { var self = this; if (!se...
module.exports = SimpleQueue; function SimpleQueue() { var self = this; self.fifo = []; self.executing = false; } SimpleQueue.prototype.push = function (fn) { var self = this; self.fifo.push(fn); self.maybeNext(); }; SimpleQueue.prototype.maybeNext = function () { var self = this; if (!se...
Add next() function to SimpleQueue
Add next() function to SimpleQueue
JavaScript
mit
silveirado/node-ibm_db,jbaxter0810/node-odbc,silveirado/node-ibm_db,gmahomarf/node-odbc,abiliooliveira/node-ibm_db,Akpotohwo/node-ibm_db,jbaxter0810/node-odbc,Papercloud/node-odbc,qpresley/node-ibm_db,Akpotohwo/node-ibm_db,jbaxter0810/node-odbc,gmahomarf/node-odbc,ibmdb/node-ibm_db,strongloop-forks/node-ibm_db,bustta/n...
5875ad9cda798b1c08f7e82c6b4cbf5e7364754c
playground/index.js
playground/index.js
'use strict'; import React, { Component } from 'react'; import Pic from '../lib/index.js'; export default class Playground extends Component { render() { return ( <html> <head> <meta charSet='UTF-8' /> <title>react-pic</title> </head> <body> <div id="r...
'use strict'; import React, { Component } from 'react'; import Pic from '../lib/index.js'; export default class Playground extends Component { render() { return ( <html> <head> <meta charSet='UTF-8' /> <title>react-pic</title> </head> <body> <div id="r...
Update playground sizes to be more representitive of real-world usage
Update playground sizes to be more representitive of real-world usage
JavaScript
mit
benox3/react-pic
5432996d05e278ccb487198f86ecddf70cc17557
public/js/forum.js
public/js/forum.js
function likeComment(event, commentId) { console.log(forumId); console.log(commentId); $.ajax({ 'url': '/forums/' + forumId + '/comments/' + commentId + "/like", 'type': 'PUT', 'success': function(res) { console.log(res); $(event.target).children('p').text(res...
function redirectLogin() { window.location.href = '/log_in'; } function likeComment(event, commentId) { console.log(forumId); console.log(commentId); $.ajax({ 'url': '/forums/' + forumId + '/comments/' + commentId + "/like", 'type': 'PUT', 'success': function(res) { ...
Add redirect to login endpoint if 401 received
Add redirect to login endpoint if 401 received
JavaScript
mit
tsangjustin/CS546-Product_Forum,tsangjustin/CS546-Product_Forum
1a94ba91341b4e77ca7f28cf1c408e89074833cb
lists/pick_ngram.js
lists/pick_ngram.js
// Pick a random ngram weighted by frequency. function(head, req) { provides("json", function () { var allowEmpty = !("nonempty" in req.query); var total = 0; var rows = []; var row; while (row = getRow()) { if (allowEmpty || row.key.some(Boolean)) { rows.push(row); total += row.value; row.cum...
// Pick a random ngram weighted by frequency. function(head, req) { provides("json", function () { var allowEmpty = !("nonempty" in req.query); // Two modes. If chosenIndex is null, read all rows and pick a random // one. If chosenIndex is a number, read up to the row with that // cumulative value, and return...
Allow picking ngrams (list) by cumulative index
Allow picking ngrams (list) by cumulative index
JavaScript
mit
clehner/couchgrams
7c48ddb0ba38a6ac2e9ee24d780e8ce779b6f639
test/index.js
test/index.js
var ACME = require( '..' ) var assert = require( 'assert' ) var nock = require( 'nock' ) suite( 'ACME', function() { var acme = new ACME({ baseUrl: 'https://mock_encrypt.example.com', }) test( 'throws an error if baseUrl is not a string', function() { assert.throws( function() { new ACME({ baseUr...
var ACME = require( '..' ) var assert = require( 'assert' ) var nock = require( 'nock' ) suite( 'ACME', function() { var client = new ACME({ baseUrl: 'https://api.example.com', }) test( 'throws an error if baseUrl is not a string', function() { assert.throws( function() { new ACME({ baseUrl: 42 }) }) ...
Update test: Simplify, compact formatting
Update test: Simplify, compact formatting
JavaScript
mit
jhermsmeier/node-acme-protocol
ab4b9fcded294202c0535e7314b3b940ac1bd5f7
app/assets/javascripts/dashboard.js
app/assets/javascripts/dashboard.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 any plugin's vendor/assets/javascripts directory can be referenced here using a relative ...
// 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 any plugin's vendor/assets/javascripts directory can be referenced here using a relative ...
Add missing "require" after refactor
Add missing "require" after refactor
JavaScript
mit
testributor/katana,testributor/katana,testributor/katana,testributor/katana
2208acb88f95488a26406259ecb8f21c0bdb3c4f
app/javascripts/ConferenceDetail.js
app/javascripts/ConferenceDetail.js
import React from 'react'; import {List, ListItem} from 'material-ui/List'; import Divider from 'material-ui/Divider'; import Subheader from 'material-ui/Subheader'; class ConferenceDetail extends React.Component { constructor(props) { super(props); this.state = {}; // Initialize this.props.getDetail...
import React from 'react'; import {List, ListItem} from 'material-ui/List'; import Divider from 'material-ui/Divider'; import Subheader from 'material-ui/Subheader'; class ConferenceDetail extends React.Component { constructor(props) { super(props); this.state = {}; } componentDidMount(){ // Initial...
Refactor to call getDetail on componentDidMount rather than on constructor
Refactor to call getDetail on componentDidMount rather than on constructor
JavaScript
mit
makoto/blockparty,makoto/blockparty
0e4a8ab29f004af63e2fd26905213980d64b89ca
background.js
background.js
var re = new RegExp('([?&](mkt_tok|(g|fb)clid|utm_(source|medium|term|campaign|content|cid|reader|referrer|name))=[^&#]*)', 'ig'); chrome.webRequest.onBeforeRequest.addListener(function(details) { var url = details.url; var queryStringIndex = url.indexOf('?'); if (url.indexOf('utm_') > queryStringIndex || ...
/* * Pattern matching the prefix of at least one stripped query string * parameter. We'll search the query string portion of the URL for this * pattern to determine if there's any stripping work to do. */ var searchPattern = new RegExp('utm_|clid|mkt_tok', 'i'); /* * Pattern matching the query string parameters (...
Use a regexp for the initial string search
Use a regexp for the initial string search Previously, we were using multiple String.indexOf() checks to determine if the URL contained any query string parameters we might need to strip. String.indexOf() is case-sensitive while our replacement pattern is not, so there were rare times when we wouldn't match an expecte...
JavaScript
mit
jparise/chrome-utm-stripper
79edc5bce3a20abd2cf82d9ddbde3e72df1ba4c5
ruby-preferences.js
ruby-preferences.js
define(function (require, exports, module) { 'use strict'; var AppInit = app.getModule('utils/AppInit'); var Core = app.getModule('core/Core'); var PreferenceManager = app.getModule('core/PreferenceManager'); var preferenceId = 'ruby'; var rubyPreferences = { }; function getId() { return prefere...
define(function (require, exports, module) { 'use strict'; var AppInit = app.getModule('utils/AppInit'); var Core = app.getModule('core/Core'); var PreferenceManager = app.getModule('core/PreferenceManager'); var preferenceId = 'ruby'; var rubyPreferences = { 'ruby.gen': { text: 'Ruby Code Gene...
Add generate to_s method option
Add generate to_s method option
JavaScript
mit
meisyal/staruml-ruby
ab62edb0862435eec5c1a44a4959cf5d4de367e6
src/arg.js
src/arg.js
'use strict'; (function () { var utils = require('./utils'); var getNodeProperties = utils.getNodeProperties; var validateName = utils.validateName; var serializeOptions = utils.serializeOptions; var validOptions = { alias: { type: 'string' }, description: { type: 'string' }, ...
'use strict'; (function () { var utils = require('./utils'); var getNodeProperties = utils.getNodeProperties; var validateName = utils.validateName; var serializeOptions = utils.serializeOptions; var validOptions = { description: { type: 'string' }, options: { type: 'array' } ...
Remove alias option from Arg
Remove alias option from Arg
JavaScript
mit
JakeSidSmith/jargs
5a41dd44055f70e492ab09b366d884b148196f82
doc/asset/doc/core.js
doc/asset/doc/core.js
var DOC = { 'menu':['api','configuration','recipe','core'], 'vars':{sass:{},rake:{}}, 'modules':{}, 'go':function(name, fade){ var page, fadeTime = typeof fade == 'undefined' ? 400 : parseInt(fade); name = name.toLowerCase() $('#content').fadeOut...
var DOC = { 'menu':['api','configuration','recipe','core'], 'vars':{sass:{},rake:{}}, 'modules':{}, 'go':function(name, fade){ var page, fadeTime = typeof fade == 'undefined' ? 400 : parseInt(fade); name = name.toLowerCase() $('#content').fadeOut...
Add responsive support for side menu
Add responsive support for side menu
JavaScript
bsd-3-clause
ebollens/WebBlocks1,ucla/WebBlocks,ebollens/WebBlocks1,ucla/WebBlocks
297f95b4831d4fc44eb3dc98c17a9b50b83b37d0
src/components/Infos/index.js
src/components/Infos/index.js
import React from 'react'; import styled from 'styled-components'; import generalInfos from '../../globals/data/general-info'; const Infos = styled.section` text-align: center; margin: 0.67em 0; `; const Name = styled.h1` font-size: 2.5rem; @media (max-width: 600px) { font-size: 2.2rem; } `; const Info...
import React from 'react'; import styled from 'styled-components'; import generalInfos from '../../globals/data/general-info'; const Infos = styled.section` text-align: center; margin: 0.67em 0; `; const Name = styled.h1` font-size: 2.5rem; @media (max-width: 600px) { font-size: 2.2rem; } `; const Info...
Add target to open in a new tab
Add target to open in a new tab
JavaScript
mit
raulfdm/cv
89ebb9b43b67ad60294f38be98eb7903e1c10893
redux/src/main/renderer/actions/app.js
redux/src/main/renderer/actions/app.js
import { receivedAccount } from './account'; import { fetchHomeTimeline, receivedHomeTimeline } from './timeline'; import { onError } from './error-handler'; import { TwitterAction } from '../middlewares/twitterClient'; export function setUp(credential) { return new TwitterAction({ credential, invoke: twitte...
import { fetchAccount } from './account'; import { fetchHomeTimeline, receivedHomeTimeline } from './timeline'; import { TwitterAction } from '../middlewares/twitterClient'; /** * * @param {Credential} credential * @return {TwitterAction} */ export function setUp(credential) { return new TwitterAction({ cred...
Use fetchAccount instead of receivedAccount
[Refactor] Use fetchAccount instead of receivedAccount
JavaScript
mit
wozaki/twitter-js-apps,wozaki/twitter-js-apps
3d3660f81626d6fe75da76483e797871b9841e29
rollup.config.js
rollup.config.js
const config = { dir: 'dist', sanitizeFileName: (f) => f.includes('tXml') ? f.toLowerCase() : f, }; export default { input: ['index.js', 'tXml.js', 'transformStream.js'], output: [ { ...config, format: 'cjs', entryFileNames: '[name].js', }, { ...config, format: 'esm', ...
const config = { dir: 'dist', // Small hack to lowercase tXml in bundle sanitizeFileName: (f) => f.includes('tXml') ? f.toLowerCase() : f, }; export default { input: ['index.js', 'tXml.js', 'transformStream.js'], output: [ { ...config, format: 'cjs', entryFileNames: '[name].js', }, ...
Add comment on sanitizeFileName option
Add comment on sanitizeFileName option
JavaScript
mit
TobiasNickel/tXml
d2318e6f1ee9eb6f5e8508f0a4f75d2f8daa7c44
ActionCreator.js
ActionCreator.js
// Synchronous export const acName = () => { return { }; }; // Async using Redux Thunk export const acName = () => { return dispatch => { }; };
// Synchronous export const acName = () => { return { }; }; // Async using Redux Thunk export const acName = () => { return dispatch => { }; }; // Using Axios export const acName = () => { return dispatch => { dispatch({ type: VERB_RESOURCE_LOADING }); return axios.get(`${ROOT_URL}/res...
Add snipper for action creator with Axios
Add snipper for action creator with Axios
JavaScript
mit
nbkhope/react-generator
347087929f7d199c8a713869417be64e32c450cb
test/WebpackFeatures.js
test/WebpackFeatures.js
var request = require('axios') var WebpackFeatures = function(featuresContext) { this.each = function(fn) { this.list().then(function(files) { files.forEach(fn) }) } this.list = function() { var pendingRequests = [] var featureFilenames = featuresContext.keys() ...
var request = require('axios') var WebpackFeatures = function(featuresContext) { this.each = function(fn) { this.list().then(function() { var files = arguments[0] files.forEach(fn) }) } this.list = function() { var pendingRequests = [] var featureFil...
Fix bug when processing ajax response
Fix bug when processing ajax response
JavaScript
mit
samzhao/yadda-karma-webpack,samzhao/yadda-karma-webpack
408772e6e55e1b8b48c16c71955ce7e6fa026a8a
admin/panel.js
admin/panel.js
$(document).ready(function () { $('#tweetfeature-change-tweet').click(function() { $.getJSON('https://api.twitter.com/1/statuses/oembed.json?callback=?', { url: $('#tweetfeature-tweet').val(), maxwidth: 450, align: 'center' }, function(data) { if (dat...
$(document).ready(function () { $('#tweetfeature-change-tweet').click(function() { $.getJSON('https://api.twitter.com/1/statuses/oembed.json?callback=?', { url: $('#tweetfeature-tweet').val(), maxwidth: 450, align: 'center' }, function(data) { if (dat...
Refresh tweet when shown/displayed on timer.
Refresh tweet when shown/displayed on timer. Suggested by #HotLange.
JavaScript
mit
fwdcp/tweet-live-graphic,fwdcp/tweet-live-graphic
cfcc0fb845794b4ac4363074ca8e5b8e465e04fb
demoServer.js
demoServer.js
/** * The simplest possible server for nodebotui **/ var app = require('http').createServer(), ui = require('./lib/nodebotui').listen(app); app.listen(3000); console.log("Server running at\n => http://localhost:3000\nCTRL + C to shutdown");
/** * A simple server for nodebotui **/ var url = require('url'), send = require('send'), http = require('http'), app = http.createServer(function(req, res){ var root = req.url.indexOf('nodebotui') !== -1 ? 'client/' : 'eg/'; send(req, req.url).root(root).pipe(res); }), ui = require('./lib...
Add support for serving static files in eg folder
Add support for serving static files in eg folder
JavaScript
mit
davatron5000/NodebotUI,dtex/NodebotUI
b39b0de59b53da086d06facc7b0b484e1fcb7798
webview.js
webview.js
"use strict"; const {ipcRenderer} = require("electron"); window.addEventListener("DOMContentLoaded", () => { const form = $("#form"); $(".full").removeClass("hidden"); $(".tofullversion").addClass("hidden"); $(".tosimpleversion").removeClass("hidden"); form.on("submit", (ev) => { ev.prev...
"use strict"; const {ipcRenderer} = require("electron"); window.addEventListener("DOMContentLoaded", () => { const form = $("#form"); $(".full").removeClass("hidden"); $(".tofullversion").addClass("hidden"); $(".tosimpleversion").removeClass("hidden"); $("#type").val("gradle-project"); form...
Make gradle the first choice
Make gradle the first choice
JavaScript
mit
dayflower/electron-spring-initializr,dayflower/electron-spring-initializr
56d7f8223366d088692d93e051e382c057bbb1ad
addon-test-support/utils/find-tooltip.js
addon-test-support/utils/find-tooltip.js
import $ from 'jquery'; export default function findTooltip(selector) { if (!selector) { // In case of passing null, undefined, etc selector = '.ember-tooltip, .ember-popover'; } /* We .find() tooltips from $body instead of using ember-test-helper's find() method because tooltips and popovers are often r...
import $ from 'jquery'; export default function findTooltip(selector) { if (!selector) { // In case of passing null, undefined, etc selector = '.ember-tooltip, .ember-popover'; } /* We .find() tooltips from $body instead of using ember-test-helper's find() method because tooltips and popovers are often r...
Add comment around tooltip lookup based on component class
Add comment around tooltip lookup based on component class
JavaScript
mit
sir-dunxalot/ember-tooltips,sir-dunxalot/ember-tooltips
fa1c8767d8c99bae568b8fc9bb6d521011c15a32
Resources/ui/common/baseui/image_view_positioning.js
Resources/ui/common/baseui/image_view_positioning.js
function image_view_position() { var win = Ti.UI.createWindow(); var view = Ti.UI.createImageView({ image:'http://www.appcelerator.com/wp-content/uploads/2009/06/titanium_desk.png', top:10, left:10, height:'auto', width:'auto' }); win.add(view); var label = Ti.UI.createLabel({ text:'Image should ...
function image_view_position() { var win = Ti.UI.createWindow(); var view = Ti.UI.createImageView({ image:'http://static.appcelerator.com/images/header/appc_logo.png', top:10, left:10, height:'auto', width:'auto' }); win.add(view); var label = Ti.UI.createLabel({ text:'Image should be at top 10 a...
Remove non wprking remote image url
[TIMOB-10000] Remove non wprking remote image url
JavaScript
apache-2.0
appcelerator/KitchenSink,emilyvon/KitchenSink,ashcoding/KitchenSink,FokkeZB/KitchenSink,appcelerator-developer-relations/KitchenSink,ashcoding/KitchenSink,FokkeZB/KitchenSink,cheekiatng/KitchenSink,appcelerator/KitchenSink,emilyvon/KitchenSink,appcelerator-developer-relations/KitchenSink
bbd2ab80606f1b5598f6d9f536765aa6c1bf484f
graphql-api/.eslintrc.js
graphql-api/.eslintrc.js
module.exports = { "extends": "airbnb-base", "rules": { "no-console": "off" } };
module.exports = { "extends": "airbnb-base", "rules": { "no-console": "off", "class-methods-use-this": [ 2, { "exceptMethods": ["getChannel", "getServer"] }] } };
Add temporary exceptions to "use this" eslint rule In the future, the getServer and getChannel methods of the repositories will use the "this" keyword. However, we dont want builds to fail for now, so we just add exceptions to the rule which will be removed later
Add temporary exceptions to "use this" eslint rule In the future, the getServer and getChannel methods of the repositories will use the "this" keyword. However, we dont want builds to fail for now, so we just add exceptions to the rule which will be removed later
JavaScript
mit
bumblepie/haikubot
d940979153729bf3c4f753c126b368ac5831442f
lib/user/user-session-spec.js
lib/user/user-session-spec.js
var mockMbaasServiceProxy = require('./stub/mbaas-service-proxy'); var mediator = require('fh-wfm-mediator/lib/mediator'); var express = require('express'); var proxyquire = require('proxyquire'); var sinon = require('sinon'); var assert = require('assert'); var sessionManager; describe("User Sessions", function() { ...
var mockMbaasServiceProxy = require('./stub/mbaas-service-proxy'); var mediator = require('fh-wfm-mediator/lib/mediator'); var express = require('express'); var proxyquire = require('proxyquire'); var sinon = require('sinon'); var assert = require('assert'); var sessionManager; describe("User Sessions", function() { ...
Change done-based mocha tests to use returned promises
Change done-based mocha tests to use returned promises
JavaScript
mit
feedhenry-raincatcher/raincatcher-user
293151145b85aaeb1171987778ae71a39c06381f
test/support/loadComponent.js
test/support/loadComponent.js
import fs from "fs"; import path from "path"; import babel from "babel"; import nodeEval from "eval"; import {parse, SyntaxError} from "../../src/compiler/parser"; import emit from "../../src/compiler/emit"; export default function loadComponent(name) { const file = fs.readFileSync(path.join(__dirname, `../fixtures/...
import fs from "fs"; import path from "path"; import babel from "babel"; import nodeEval from "eval"; import {parse, SyntaxError} from "../../src/compiler/parser"; import emit from "../../src/compiler/emit"; export default function loadComponent(name) { const file = fs.readFileSync(path.join(__dirname, `../fixtures/...
Transform emitted code with babel
Transform emitted code with babel
JavaScript
mit
seanchas116/konomi
34ff37a975219e3b006cf93cecae5a7a773dad61
read_serial_port.js
read_serial_port.js
/* * * Read and decode Pelco D CCTV commands from a Serial Port / COM Port (using node-serialport) * Copyright 2016 Roger Hardiman * */ // External Dependencies var SerialPort = require('serialport').SerialPort; var PelcoD_Decoder = require('./pelcod_decoder'); // User Settings var SERIAL_PORT = 'COM2'; // or...
/* * * Read and decode Pelco D and Pelco P CCTV commands from a Serial Port / COM Port (using node-serialport) * Copyright 2016 Roger Hardiman * * You will need to set the SERIAL_PORT and the BAUD_RATE * Note that the Serial Port varies between operating systems * E.g. COM1 on Windows * E.g. /dev/ttyUSB0 on...
Add notes on Pelco P serial port baud rate
Add notes on Pelco P serial port baud rate
JavaScript
mit
RogerHardiman/node-pelcod-decoder
2749bc9bf4138dbabdefeee8d8d8817083dd055b
examples/src/index.js
examples/src/index.js
import { AppContainer } from 'react-hot-loader' import { applyMiddleware, compose, createStore } from 'redux' import { createBrowserHistory } from 'history' import { routerMiddleware, syncHistoryWithStore } from 'connected-react-router' import { Provider } from 'react-redux' import React from 'react' import ReactDOM fr...
import { AppContainer } from 'react-hot-loader' import { applyMiddleware, compose, createStore } from 'redux' import { createBrowserHistory } from 'history' import { routerMiddleware } from 'connected-react-router' import { Provider } from 'react-redux' import React from 'react' import ReactDOM from 'react-dom' import ...
Remove syncHistoryWithStore from example code
Remove syncHistoryWithStore from example code
JavaScript
mit
supasate/connected-react-router
f4efbdd4800a09322a03cba82bd942bd7eefe646
src/common/utils.js
src/common/utils.js
var $ = require('jquery'); var SirTrevor = require('sir-trevor-js'); module.exports = { loadLocale: function(localeName, locale) { SirTrevor.Locales[localeName] = SirTrevor.Locales[localeName] || {}; $.extend(true, SirTrevor.Locales[localeName], locale); }, loadMixin: function(mixin) { SirTrevor.BlockMix...
var $ = require('jquery'); var SirTrevor = require('sir-trevor-js'); module.exports = { loadLocale: function(localeName, locale) { SirTrevor.Locales[localeName] = SirTrevor.Locales[localeName] || {}; $.extend(true, SirTrevor.Locales[localeName], locale); }, loadMixin: function(mixin) { SirTrevor.BlockMix...
Fix loadBlocks initializing all blocks to Undefined
Fix loadBlocks initializing all blocks to Undefined
JavaScript
mit
Upplication/sir-trevor-blocks,Upplication/sir-trevor-blocks
0f8f6539d9c6f6c2f05a0f0ae627fdac8a8d49ce
lib/api/start_gateway.js
lib/api/start_gateway.js
var GatewayProcessManager = require(__dirname+'/../process_manager.js'); /** * @function startGateway * @requires GatewayProcessManager * @description Starts gateway processes. * @param opts */ function startGateway(opts, fn) { processManager = new GatewayProcessManager(); processManager.start(opts, function...
var GatewayProcessManager = require(__dirname+'/../process_manager.js'); /** * @function startGateway * @requires GatewayProcessManager * @description Starts gateway processes. * @param opts */ function startGateway(opts) { processManager = new GatewayProcessManager(); processManager.start(opts); } module.e...
Revert "[CHORE] refactor startGateway function to take callback."
Revert "[CHORE] refactor startGateway function to take callback." This reverts commit 6cf2e71a48801b7b6edee80d28806a48bc83aa17.
JavaScript
isc
zealord/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd
bf7926d1cb1e7f01485e655f1a74fdaee03c8b60
routes/emoticons.js
routes/emoticons.js
const express = require('express'), router = express.Router({mergeParams: true}), db = require('../models'); router.get('/', function(req, res, next) { db.Emoticon.find({}).then(function(emoticons) { res.render('emoticons/index', {emoticons}); }).catch(function(err) { console.log(err); })...
const express = require('express'), router = express.Router({mergeParams: true}), db = require('../models'); router.get('/', function(req, res, next) { db.Emoticon.find({}).then(function(emoticons) { res.render('emoticons/index', {emoticons}); }).catch(function(err) { console.log(err); })...
Rename DELETE request route to reflect prepended /collection
Rename DELETE request route to reflect prepended /collection
JavaScript
mit
tymeart/mojibox,tymeart/mojibox
34b2375e179f934f005277ae3aca9c337cb49f54
test/index-test.js
test/index-test.js
var vows = require('vows'); var assert = require('assert'); var util = require('util'); var oauth2orize = require('index'); var Server = require('server'); vows.describe('oauth2orize').addBatch({ 'should export module function': function () { assert.strictEqual(oauth2orize, oauth2orize.createServer); }, ...
var vows = require('vows'); var assert = require('assert'); var util = require('util'); var oauth2orize = require('index'); var Server = require('server'); vows.describe('oauth2orize').addBatch({ 'should export module function': function () { assert.strictEqual(oauth2orize, oauth2orize.createServer); }, ...
Test case for grant and exchange aliases.
Test case for grant and exchange aliases.
JavaScript
mit
jaredhanson/oauth2orize,rakesh-mohanta/oauth2orize,mattyao1984/oauth2orize,FrankHassanabad/oauth2orize,benjipott/oauth2orize,Sajan129/oauth2orize,saurabh-malik/oauth2orize,IskenHuang/oauth2orize-example,IskenHuang/oauth2orize-example,DaAwesomeP/oauth2orize,eskygo/oauth2orize
b91354192699055ecfcafe96cbf8d7425f9274a4
test/karma.conf.js
test/karma.conf.js
module.exports = function(config) { config.set({ basePath: '../', frameworks: ['jasmine'], autoWatch: false, browsers: ['Chrome', 'PhantomJS'], files: [ // angular libs 'bower_components/jquery/dist/jquery.js', 'bower_components/angular/angular.js', 'bower_compon...
module.exports = function(config) { config.set({ basePath: '../', frameworks: ['jasmine'], autoWatch: false, browsers: ['PhantomJS'], files: [ // angular libs 'bower_components/jquery/dist/jquery.js', 'bower_components/angular/angular.js', 'bower_components/boots...
Set only PhantomJS as the test browser for TravisCI.
Set only PhantomJS as the test browser for TravisCI.
JavaScript
mit
briehl/repo-matic,briehl/repo-matic
2551a3628b5017a342beb8f9820a2f4d7a73499b
src/client/formValidations.js
src/client/formValidations.js
const $ = require('jquery'); const Keys = require('keys/dist/client'); $(() => { $('body').on('click', '[type="submit"]', ev => { const $btn = $(ev.target); const $form = $btn.closest('form'); Keys.clearFieldErrors($form); $form.find('[required]').each((i, el) => { const $el = $(el); ...
const $ = require('jquery'); const Keys = require('keys/dist/client'); $(() => { $('body').on('click', '[type="submit"]', ev => { const $btn = $(ev.target); const $form = $btn.closest('form'); Keys.clearFieldErrors($form); $form.find('[required]').each((i, el) => { const $el = $(el); ...
Allow blank non-required e-mail fields.
[Admin] Allow blank non-required e-mail fields.
JavaScript
agpl-3.0
n2liquid/keys,n2liquid/keys
c89f85ff8f0092befe39ed44bc82dfbd20ec8a6b
test/sampleTest.js
test/sampleTest.js
'use strict'; const TwitterService = require('./twitterService'); const assert = require('chai').assert; const _ = require('lodash'); suite('Candidate API tests', function () { let service; before((done) => { service = new TwitterService(); service.start(done); }); beforeEach(() => { service.clea...
'use strict'; const TwitterService = require('./twitterService'); const assert = require('chai').assert; const _ = require('lodash'); suite('Sample tests', function () { let service; before((done) => { service = new TwitterService(); service.start(done); }); beforeEach(() => { service.clearDB(); ...
Fix typo in sample test
Fix typo in sample test
JavaScript
mit
FritzFlorian/true-parrot,FritzFlorian/true-parrot
9587c200346ec30173ab5e4a76c4601135c0aa81
lib/utilities/logging.js
lib/utilities/logging.js
var winston = require('winston'); var moment = require('moment'); let fs = require('fs') function getLogger(nconf) { var log_level = nconf.get('loglevel'); var logger = new (winston.Logger)({ transports: [ new (winston.transports.Console)({ "level": log_level, "json": nconf.get('json'), ...
var winston = require('winston'); var moment = require('moment'); let fs = require('fs') function getLogger(nconf) { var log_level = nconf.get('loglevel'); var logger = new (winston.Logger)({ transports: [ new (winston.transports.Console)({ "level": log_level, "json": nconf.get('json'), ...
Remove logzio and make json log single line
Remove logzio and make json log single line
JavaScript
mit
heytrav/nodepp
bd3c29d690b3c96b21239adc98c89098ba755415
test/utils_test.js
test/utils_test.js
var expect = require('expect.js'); var utils = require("../lib/utils"); describe("Utils", function() { describe("dominantMovement", function() { it("returns the dominant movement as a direction and distance", function() { var movementOne = [1, 2, 3]; var movementTwo = [2, -4, 4]; expect(utils....
var expect = require('expect.js'); var utils = require("../lib/bluegel").Utils; describe("Utils", function() { describe("dominantMovement", function() { it("returns the dominant movement as a direction and distance", function() { var movementOne = [1, 2, 3]; var movementTwo = [2, -4, 4]; expec...
Include modules to test through Bluegel, not individually
Include modules to test through Bluegel, not individually
JavaScript
mit
arsduo/bluegel.js
4c348a222e59fec2590e252b52c9890bec373568
gulp/index.js
gulp/index.js
'use strict'; import fs from 'fs'; import onlyScripts from './util/scriptFilter'; const tasks = fs.readdirSync('./gulp/tasks/').filter(onlyScripts); tasks.forEach((task) => { require('./tasks/' + task); });
'use strict'; import gulp from 'gulp'; import fs from 'fs'; import onlyScripts from './util/scriptFilter'; const tasks = fs.readdirSync('./gulp/tasks/').filter(onlyScripts); tasks.forEach((task) => { require('./tasks/' + task); }); gulp.task('default', ['dev']);
Add dev as default gulp task
Add dev as default gulp task
JavaScript
mit
cshaver/angularjs-gulp-browserify-boilerplate,cshaver/angularjs-gulp-browserify-boilerplate
05163d9fb503777a5bb4056bba52ad745f4b52c0
lib/eval-script.js
lib/eval-script.js
module.exports = function(el) { // console.log("going to execute script", el) var code = (el.text || el.textContent || el.innerHTML || "") var src = (el.src || ""); var parent = el.parentNode || document.querySelector("head") || document.documentElement var script = document.createElement("script") if (co...
module.exports = function(el) { var code = (el.text || el.textContent || el.innerHTML || "") var src = (el.src || ""); var parent = el.parentNode || document.querySelector("head") || document.documentElement var script = document.createElement("script") if (code.match("document.write")) { if (console && ...
Stop dispatching extraneous `pjax:complete` events, correct typo
Stop dispatching extraneous `pjax:complete` events, correct typo
JavaScript
mit
MoOx/pjax,MoOx/pjax,MoOx/pjax
34600e10b23c54f97ce3d5c0a870b7e39e8ac9f2
server/services/event/hooks/includeQuotas.js
server/services/event/hooks/includeQuotas.js
module.exports = () => (hook) => { const sequelize = hook.app.get('sequelize'); hook.params.sequelize = { attributes: [ 'id', 'title', 'date', 'registrationStartDate', 'registrationEndDate', 'openQuotaSize', 'signupsPublic', ], distinct: true, raw: false, ...
module.exports = () => (hook) => { const sequelize = hook.app.get('sequelize'); hook.params.sequelize = { attributes: [ 'id', 'title', 'date', 'registrationStartDate', 'registrationEndDate', 'openQuotaSize', 'signupsPublic', ], distinct: true, raw: false, ...
Hide draft events from public event list
Hide draft events from public event list
JavaScript
mit
peksi/ilmomasiina,athenekilta/ilmomasiina,athenekilta/ilmomasiina,peksi/ilmomasiina
50c10c2aa12e80d061d11a9ee145fd5435dbb633
bin/sync-index.js
bin/sync-index.js
'use strict' let winston = require('winston') let Rat = require('../api/models/rat') let Rescue = require('../api/models/rescue') let User = require('../api/models/user') let mongoose = require('mongoose') let count = 0 mongoose.connect('mongodb://localhost/fuelrats') winston.info('Beginning Index Model Sync') win...
'use strict' let winston = require('winston') let Rat = require('../api/models/rat') let Rescue = require('../api/models/rescue') let User = require('../api/models/user') let mongoose = require('mongoose') let count = 0 let streamsClosed = 0 mongoose.connect('mongodb://localhost/fuelrats') winston.info('Beginning I...
Exit syncing script when it's done
Exit syncing script when it's done
JavaScript
bsd-3-clause
FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com
7a6d6f14986a6972d06819d27a2e319f5f509d07
app/assets/javascripts/test-dependencies.js
app/assets/javascripts/test-dependencies.js
// This file contains dependencies that are only needed when running in a test // environment. In the dev and live environment these are provided by static. //= require govuk_publishing_components/dependencies //= require govuk_publishing_components/lib/cookie-functions //= require govuk_publishing_components/lib/heade...
// This file contains dependencies that are only needed when running in a test // environment. In the dev and live environment these are provided by static. //= require govuk_publishing_components/dependencies //= require govuk_publishing_components/lib/cookie-functions //= require govuk_publishing_components/analytics...
Remove reference to missing file
Remove reference to missing file - this file was recently removed in https://github.com/alphagov/govuk_publishing_components/pull/2632 as it is no longer needed, so this reference to it is no longer needed
JavaScript
mit
alphagov/collections,alphagov/collections,alphagov/collections,alphagov/collections
99a196c32ec06098aa50feeff90da7c05cb8fa3b
app/routes/dashboard/group-manager/index.js
app/routes/dashboard/group-manager/index.js
import Ember from 'ember'; import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; export default Ember.Route.extend(AuthenticatedRouteMixin, { currentUser: Ember.inject.service('current-user'), model: function() { let user = this.get('currentUser.user.id'); return this.ge...
import Ember from 'ember'; import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; export default Ember.Route.extend(AuthenticatedRouteMixin, { currentUser: Ember.inject.service('current-user'), model: function() { let user = this.get('currentUser.user.id'); return this.ge...
Expand pagination for Group manager
Expand pagination for Group manager
JavaScript
bsd-2-clause
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
48df4fcd0274e703e9973d8bcc01269bd7f9d7c1
app/controllers/core.server.controller.js
app/controllers/core.server.controller.js
'use strict'; /** * Module dependencies. */ var mailChimp = require('../../node_modules/mailchimp-api/mailchimp'), validator = require('../../node_modules/email-validator'), config = require('../../config/mc-config.json'); var mc = new mailChimp.Mailchimp(config.apikey); exports.index = function(req, res) { res...
'use strict'; /** * Module dependencies. */ var mailChimp = require('../../node_modules/mailchimp-api/mailchimp'), validator = require('../../node_modules/email-validator'), config = require('../../config/mc-config.json'); var mc = new mailChimp.Mailchimp(config.apikey); exports.index = function(req, res) { res...
Add check to mail subscribe route to only subscribe on production.
Add check to mail subscribe route to only subscribe on production.
JavaScript
mit
CodeLily/codelily.education,CodeLily/codelily.education,CodeLily/codelily.education
962d8f7c7545b36725a8d652684eeebb1b982350
install-bundles.sh.js
install-bundles.sh.js
require('shelljs/global'); var installBundle = function(gitPath) { gitPath = gitPath.trim().replace(/#.*/, ''); if(!gitPath) { return; } var repoName = gitPath.replace(/.*\//, ''); if(exec('git clone https://github.com/'+gitPath+'.git bundle/'+repoName).code != 0) { echo('Checkout failed for bundle '+gitPa...
require('shelljs/global'); var repoNameFromGitPath = function(gitPath) { return gitPath.replace(/.*\//, ''); }; var installBundle = function(gitPath) { var repoName = gitPath.replace(/.*\//, ''); if(exec('git clone https://github.com/'+gitPath+'.git bundle/'+repoName).code !== 0) { echo('Checkout failed for...
Update bundle if already installed
fix: Update bundle if already installed
JavaScript
mit
jtrussell/vimfiles
5f4a4442d985140cb4bba20554a3b0ad122d37f2
src/jquery-input-file-text.js
src/jquery-input-file-text.js
/** */ (function($) { $.fn.inputFileText = function(userOptions) { var MARKER_ATTRIBUTE = 'data-inputFileText'; if(this.attr(MARKER_ATTRIBUTE) === 'true') { // Plugin has already been applied to input file element return this; } var options = $.extend({ ...
/** */ (function($) { $.fn.inputFileText = function(userOptions) { var MARKER_ATTRIBUTE = 'data-inputFileText'; if(this.attr(MARKER_ATTRIBUTE) === 'true') { // Plugin has already been applied to input file element return this; } var options = $.extend({ ...
Use span rather than input text element to display selected file
Use span rather than input text element to display selected file
JavaScript
mit
datchung/jquery.inputFileText,datchung/jquery.inputFileText
ae0b63052cc66ea55f573c513981d051c711a569
app/scripts/services/customers-service.js
app/scripts/services/customers-service.js
'use strict'; (function() { angular.module('ncsaas') .service('customersService', ['RawCustomer', customersService]); function customersService(RawCustomer) { /*jshint validthis: true */ var vm = this; vm.getCustomersList = getCustomersList; vm.createCustomer = createCustomer; vm.getCustom...
'use strict'; (function() { angular.module('ncsaas') .service('customersService', ['RawCustomer', customersService]); function customersService(RawCustomer) { /*jshint validthis: true */ var vm = this; vm.getCustomersList = getCustomersList; vm.createCustomer = createCustomer; vm.getCustom...
Add update method to raw customer (saas-97)
Add update method to raw customer (saas-97)
JavaScript
mit
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
a72f1b1b72e81856ca26f42e10a5f8f8460a5d0b
codeSHOW/pages/settings/settings.js
codeSHOW/pages/settings/settings.js
(function () { "use strict"; var appdata = Windows.Storage.ApplicationData.current; var tileColors = q("#tileColors > div"); WinJS.UI.Pages.define("/pages/settings/settings.html", { ready: function (element, options) { init(); loadPrefs(); } ...
(function () { "use strict"; var appdata = Windows.Storage.ApplicationData.current; var tileColors; WinJS.UI.Pages.define("/pages/settings/settings.html", { ready: function (element, options) { init(); loadPrefs(); } }); function init(...
Fix bug in Settings | Preferences
Fix bug in Settings | Preferences
JavaScript
apache-2.0
carloszapata/codeshow,codefoster/codeshow,ladyinblack/codeshow,Harsha03/codeshow,mariotristan/codeshow,Impertatore/codeshow,kupala/codeshow,Twin86/codeshow,mariotristan/codeshow,ladyinblack/codeshow,kupala/codeshow,carloszapata/codeshow,Impertatore/codeshow,Harsha03/codeshow,Harsha03/codeshow,codefoster/codeshow,Impert...
bea4059fe7998a1d70ce0b232e608dd7580c4555
assets/support.rackspace.com/src/js/site.js
assets/support.rackspace.com/src/js/site.js
var $ = require('jquery'); window.$ = window.jQuery = $; var setupHomepage = require('./homepage'); var setupAllArticles = require('./all-articles'); var setupAdmonish = require('./admonish'); // kick things off $(document).ready(function(){ // FAQs toggle content $("div.faq h4").nextUntil("h4, h3, hr, .legal-c...
var $ = require('jquery'); window.$ = window.jQuery = $; var setupHomepage = require('./homepage'); var setupAllArticles = require('./all-articles'); var setupAdmonish = require('./admonish'); // kick things off $(document).ready(function(){ // FAQs toggle content $("div.faq h4").nextUntil("h4, h3, hr, .legal-c...
Remove KC banner from repo
Remove KC banner from repo
JavaScript
apache-2.0
meker12/nexus-control,meker12/nexus-control,rackerlabs/nexus-control,rackerlabs/nexus-control,rackerlabs/nexus-control,meker12/nexus-control
143944a30b1c6b97fb8c86030a4d500f8807b5e3
deploy-docs.js
deploy-docs.js
var Travis = require('travis-ci'); var child_process = require('child_process'); var repo = "excaliburjs/excaliburjs.github.io"; var travis = new Travis({ version: '2.0.0' }); var branch = process.env.TRAVIS_BRANCH; if (branch !== "master") { console.log("Current branch is `" + branch + "`, skipping docs deployme...
var Travis = require('travis-ci'); var child_process = require('child_process'); var repo = "excaliburjs/excaliburjs.github.io"; var travis = new Travis({ version: '2.0.0', headers: { 'User-Agent': 'Travis/1.0' } }); var branch = process.env.TRAVIS_BRANCH; if (branch !== "master") { console.log("Curren...
Add Travis UA for API calls
Add Travis UA for API calls
JavaScript
bsd-2-clause
htalat/Excalibur,excaliburjs/Excalibur,htalat/Excalibur,excaliburjs/Excalibur,htalat/Excalibur,excaliburjs/Excalibur
1c8a38094003e3398a468877efafdb7367a36083
js/stats/variation.js
js/stats/variation.js
'use strict'; /** * Internal dependencies */ let SampleProportion = require( './sample-proportion' ); function Variation( name, color, participants, conversions ) { this.name = name; this.color = color; this.participants = participants; this.conversions = conversions; this.proportion = new SampleProportion( pa...
'use strict'; /** * Internal dependencies */ let SampleProportion = require( './sample-proportion' ); class Variation { constructor( name, color, participants, conversions ) { this.name = name; this.color = color; this.participants = participants; this.conversions = conversions; this.proportion = new Sam...
Convert Variation class to ES6
Convert Variation class to ES6
JavaScript
mit
mattm/abtestcalculator,mattm/abtestcalculator
08a2fa8e6c05ec9569fcf98a19e7c6f9e91b982c
src/common/store.js
src/common/store.js
import {createStore, combineReducers, compose, applyMiddleware} from 'redux'; import {routerReducer, routerMiddleware} from 'react-router-redux'; import {reducer as reduxAsyncConnect} from 'redux-connect'; import thunkMiddleware from 'redux-thunk'; function configureStoreCreator(reducers, middleware = [thunkMiddleware...
import {createStore, combineReducers, compose, applyMiddleware} from 'redux'; import {routerReducer, routerMiddleware} from 'react-router-redux'; import {reducer as reduxAsyncConnect} from 'redux-connect'; import thunkMiddleware from 'redux-thunk'; function configureStoreCreator(reducers, middleware = () => [thunkMidd...
Provision of middleware now requires function to allow request to be passed in on server-side
Provision of middleware now requires function to allow request to be passed in on server-side
JavaScript
mit
andy-shea/react-cornerstone
cb6c1f9d2b5c020bfa86d2573b074bf56217d0db
src/common/utils.js
src/common/utils.js
import _ from 'lodash' export function saveCursorPosition ({ target }) { if (target.selectionStart) { return target.selectionStart } if (document.selection) { // IE support target.focus() // To get cursor position, get empty selection range const selectionRange = document.selection.createRange()...
import _ from 'lodash' export function saveCursorPosition ({ target }) { if (target.selectionStart !== void 0) { return target.selectionStart } if (document.selection) { // IE support target.focus() // To get cursor position, get empty selection range const selectionRange = document.selection.cr...
Save position on zero start
fix: Save position on zero start
JavaScript
mit
bouvens/state-control