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
cbeb462999816caa93d57c309d7f4fd3168ac58a
src/js/UrlBuilder.js
src/js/UrlBuilder.js
class UrlBuilder { constructor(name, absolute, ziggyObject) { this.name = name; this.ziggy = ziggyObject; this.route = this.ziggy.namedRoutes[this.name]; if (typeof this.name === 'undefined') { throw new Error('Ziggy Error: You must provide a route name'); } els...
class UrlBuilder { constructor(name, absolute, ziggyObject) { this.name = name; this.ziggy = ziggyObject; this.route = this.ziggy.namedRoutes[this.name]; if (typeof this.name === 'undefined') { throw new Error('Ziggy Error: You must provide a route name'); } els...
Remove check for matching base domain and update host string concatenation to *append* the port rather than reconstructing the whole string
Remove check for matching base domain and update host string concatenation to *append* the port rather than reconstructing the whole string
JavaScript
mit
tightenco/ziggy,tightenco/ziggy
605dc42c521d6d4faea36dde4773f5a802fae594
lib/util.js
lib/util.js
/** * Copyright (c) 2013, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ exports.guessTabWi...
/** * Copyright (c) 2013, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ var hasOwn = Objec...
Use hasOwnProperty when setting defaults
Use hasOwnProperty when setting defaults
JavaScript
bsd-2-clause
rafaelstz/regenerator,RReverser/js-goto-transpiler,sebmck/regenerator,rafaelstz/regenerator,RReverser/js-goto-transpiler,juliocanares/regenerator,liviuignat/regenerator,facebook/regenerator,jlongster/unwinder,facebook/regenerator,kittens/regenerator,jlongster/unwinder,liviuignat/regenerator,jlongster/transmogrifier,Jer...
b82f55f9527ff90ab1c2cd481f6f86cc51c1a5f7
src/components/Raw.js
src/components/Raw.js
import MJMLElement from './decorators/MJMLElement' import React, { Component } from 'react' @MJMLElement({ tagName: 'mj-raw' }) class Raw extends Component { render () { const { mjContent } = this.props return ( <tr className="mj-raw" dangerouslySetInnerHTML={{ __html: mjContent() }...
import MJMLElement from './decorators/MJMLElement' import React, { Component } from 'react' @MJMLElement({ tagName: 'mj-raw' }) class Raw extends Component { getTagName () { const { parentMjml } = this.props let tagName switch (parentMjml.get('tagName')) { case 'mj-column' : tagName = '...
Fix tagName on mj-raw when parent is mj-column
Fix tagName on mj-raw when parent is mj-column
JavaScript
mit
rogierslag/mjml,mjmlio/mjml,rogierslag/mjml
493028e4d8409fb6dc3dddf52efa607df9a926f7
src/js/typography.js
src/js/typography.js
(function(d) { var config = { kitId: 'kyi0gmx', scriptTimeout: 3000, async: true }, h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.c...
(function(d) { var config = { kitId: 'kyi0gmx', scriptTimeout: 3000, async: true }, h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.cl...
Remove code that uses Lettering.js
Remove code that uses Lettering.js
JavaScript
mit
trevormunoz/katherine-anne,trevormunoz/katherine-anne,trevormunoz/katherine-anne
60aeebf66899641a6d31614bacccfe237864dd73
test/unit/io_clock.js
test/unit/io_clock.js
const test = require('tap').test; const Clock = require('../../src/io/clock'); const Runtime = require('../../src/engine/runtime'); test('spec', t => { const rt = new Runtime(); const c = new Clock(rt); t.type(Clock, 'function'); t.type(c, 'object'); t.type(c.projectTimer, 'function'); t.type(...
const test = require('tap').test; const Clock = require('../../src/io/clock'); const Runtime = require('../../src/engine/runtime'); test('spec', t => { const rt = new Runtime(); const c = new Clock(rt); t.type(Clock, 'function'); t.type(c, 'object'); t.type(c.projectTimer, 'function'); t.type(...
Test that clock is reset on runtime dispose
Test that clock is reset on runtime dispose
JavaScript
bsd-3-clause
LLK/scratch-vm,LLK/scratch-vm,LLK/scratch-vm
4bcf5996d570c665ee0558ea655c669861878cf2
public/javascripts/jquery.comboEdit.js
public/javascripts/jquery.comboEdit.js
(function($) { jQuery.fn.comboEdit = function(options){ options.selector = jQuery(this).selector; var onClick = function(e){ var toBeReplaced = jQuery(this); var data = {}; var parent_id = jQuery(this).parent().parent().find("."+options.parentIdClass).val(); ...
(function($) { jQuery.fn.comboEdit = function(options){ options.selector = jQuery(this).selector; var onClick = function(e){ var toBeReplaced = jQuery(this); var data = {}; var parent_id = jQuery(this).parent().parent().find("."+options.parentIdClass).val(); ...
Add child_id params as well to prevent clash in some cases
Add child_id params as well to prevent clash in some cases
JavaScript
agpl-3.0
jpartogi/projexion,jpartogi/projexion
937dcdccdae6ab3750fd8cb2c80a82f41220f38c
app/assets/javascripts/application.js
app/assets/javascripts/application.js
$(document).ready(function(){ // var turbolinks = require('turbolinks') $("#walk-me-home").on("click", function(e){ e.preventDefault(); $.ajax({ url: "http://172.16.50.232:8080/start", crossDomain : true, }) .done(function(serverResponse){ $("#walk-me-home").hide(); $("#ho...
$(document).ready(function(){ // var turbolinks = require('turbolinks') $("#walk-me-home").on("click", function(e){ e.preventDefault(); $.ajax({ url: "/sms/text_friend" }) .done(function(serverResponse){ console.log(serverResponse + " This is the server response"); }) ....
Add ajax call to sms controller
Add ajax call to sms controller
JavaScript
mit
ShawnTe/guardian,ShawnTe/guardian,ShawnTe/guardian
7cf5683e1284152d5003dc199de2ac1faeb587f9
app/assets/javascripts/csvDownload.js
app/assets/javascripts/csvDownload.js
PT = PT || {}; PT.downloadCsv = function(serverResponse){ var survey = serverResponse.survey; var responses = serverResponse.responses; var a = document.createElement('a'); var csvString = ""; //Write title & prompts csvString += survey.title + "\n"; csvString += 'Date of submission,"Location of submiss...
PT = PT || {}; PT.downloadCsv = function(serverResponse){ var survey = serverResponse.survey; var responses = serverResponse.responses; var a = document.createElement('a'); var csvString = ""; //Write title & prompts csvString += survey.title + "\n"; csvString += 'Date of submission,"Location of submiss...
Add utf-8 BOM to CSV download
Add utf-8 BOM to CSV download
JavaScript
mit
c4fcm/Promise-Tracker-Builder,c4fcm/Promise-Tracker-Builder,c4fcm/Promise-Tracker-Builder
406e90b5ec08119ab0edc0bd7415b0bb88c20d67
new/src/config/.entry.js
new/src/config/.entry.js
/** DO NOT MODIFY **/ import React, { Component } from "react"; import { render } from "react-dom"; import { Root } from "gluestick-shared"; import { match } from "react-router"; import routes from "./routes"; import store from "./.store"; import { StyleRoot } from "radium"; // Make sure that webpack considers new de...
/** DO NOT MODIFY **/ import React, { Component } from "react"; import { render } from "react-dom"; // Make sure that webpack considers new dependencies introduced in the Index // file import "../../Index.js"; import { Root } from "gluestick-shared"; import { match } from "react-router"; import routes from "./routes"...
Move Index import to the top to fix css order issue
Move Index import to the top to fix css order issue
JavaScript
mit
TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick
559edf7f8230d8b1c317714f28bee22633714d04
virun.js
virun.js
console.log("Helllo world"); var virus = document.querySelector("div"); virus.style.top = "400px"; var x = 1; var velocity = .1; // px per millisecond var startTime = Date.now(); timer = setInterval(function() { var t = Date.now() - startTime; x = velocity * t; virus.style.left = x + "px"; if ( x > screen.widt...
console.log("Helllo world"); var virus = document.querySelector("div"); virus.style.top = "400px"; var x = 1; var y = 0; var vy = 0; var velocity = .1; // px per millisecond var startTime = Date.now(); var clickTime; timer = setInterval(function animate() { var t = Date.now() - startTime; x = velocity * t; virus...
Add y-dimension, downwards movement, clickHandler
Add y-dimension, downwards movement, clickHandler
JavaScript
mit
BOZ2323/virun,BOZ2323/virun
54660dd8d8ed9bed0d013baacbb313db26bf62c1
karma.conf.js
karma.conf.js
// Karma configuration file, see link for more information // https://karma-runner.github.io/0.13/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular/cli'], plugins: [ require('karma-jasmine'), require('karma-chr...
// Karma configuration file, see link for more information // https://karma-runner.github.io/0.13/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular/cli'], plugins: [ require('karma-jasmine'), require('karma-chr...
Fix tests runtime error. Add extension ".ts" MIME type.
Fix tests runtime error. Add extension ".ts" MIME type.
JavaScript
mit
Chan4077/angular-rss-reader,Chan4077/angular-rss-reader,Chan4077/angular-rss-reader
3053ae9ae08a8561a57d0dbb62e2fe0eb4d54a8a
tutorial/run_specs.js
tutorial/run_specs.js
Johnson.load(PLUGIN_PREFIX + "/lib/jquery.fn.js"); Johnson.load(PLUGIN_PREFIX + "/lib/jquery.print.js"); Johnson.load(PLUGIN_PREFIX + "/tutorial/tabs.js"); Johnson.load(PLUGIN_PREFIX + "/lib/screw.builder.js"); Johnson.load(PLUGIN_PREFIX + "/lib/screw.matchers.js"); Johnson.load(PLUGIN_PREFIX + "/lib/screw.events.js");...
Johnson.load(PLUGIN_PREFIX + "/lib/jquery.fn.js"); Johnson.load(PLUGIN_PREFIX + "/lib/jquery.print.js"); Johnson.load(PLUGIN_PREFIX + "/tutorial/tabs.js"); Johnson.load(PLUGIN_PREFIX + "/lib/screw.builder.js"); Johnson.load(PLUGIN_PREFIX + "/lib/screw.matchers.js"); Johnson.load(PLUGIN_PREFIX + "/lib/screw.events.js");...
Make XHRs synchronous so they can be tested more easily
Make XHRs synchronous so they can be tested more easily
JavaScript
mit
wycats/blue-ridge,wycats/blue-ridge,wycats/blue-ridge,wycats/blue-ridge
90d17f0a51468ee41cd28143b72f059a02abf72b
lib/images.js
lib/images.js
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-images/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-images/tachyons-images.min.css', 'utf8') var moduleObj = css...
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-images/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-images/tachyons-images.min.css', 'utf8') var moduleObj = css...
Add site footer to each documentation generator
Add site footer to each documentation generator
JavaScript
mit
getfrank/tachyons,matyikriszta/moonlit-landing-page,tachyons-css/tachyons,topherauyeung/portfolio,topherauyeung/portfolio,fenderdigital/css-utilities,cwonrails/tachyons,fenderdigital/css-utilities,pietgeursen/pietgeursen.github.io,topherauyeung/portfolio
4d94e0373133848e09818698b8031961fee1730f
shared/profile/edit-avatar.desktop.js
shared/profile/edit-avatar.desktop.js
/* @flow */ import React from 'react' import {Avatar, Box, Text, Button} from '../common-adapters' import {globalStyles, globalMargins} from '../styles' import {noAvatarMessage, hasAvatarMessage} from './edit-avatar.shared' import type {Props} from './edit-avatar' const Render = ({keybaseUsername, hasAvatar, onAck}:...
/* @flow */ import React from 'react' import {Avatar, Box, Text, Button} from '../common-adapters' import {globalStyles, globalMargins} from '../styles' import {noAvatarMessage, hasAvatarMessage} from './edit-avatar.shared' import type {Props} from './edit-avatar' const Render = ({keybaseUsername, hasAvatar, onAck}:...
Fix vertical alignment of edit avatar screen
Fix vertical alignment of edit avatar screen
JavaScript
bsd-3-clause
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
4f483d4be71d501ae0a1b1b54765763f26ae1ddf
tests/DOM/SetSpec.js
tests/DOM/SetSpec.js
describe("$.set", function() { it("exists", function() { expect($.set).to.exist; }); it("sets options on the provided subject", function() { var element = $.set(document.createElement("nav"), { style: { color: "red" } }); expect(element).to.exist; expect(element.style.color).to.equal("red"); }...
describe("$.set", function() { it("exists", function() { expect($.set).to.exist; }); it("sets options on the provided subject", function() { var element = $.set(document.createElement("nav"), { style: { color: "red" } }); expect(element).to.exist; expect(element.style.color).to.equal("red"); }...
Add failing test for calling set on arrays
Add failing test for calling set on arrays There seems to be a bug here. Enable pending test by changing `xit` to `it`.
JavaScript
mit
zdfs/bliss,LeaVerou/bliss,LeaVerou/bliss,dperrymorrow/bliss,dperrymorrow/bliss,zdfs/bliss
de023d3df490721a9f254b7537356e2b57289b8c
DrawingManager.js
DrawingManager.js
var p; var drawings = []; var DrawingManager = function (p5Sketch) { p = p5Sketch; }; DrawingManager.prototype.add = function (pulse) { console.log('Added ' + pulse); drawings.push(pulse); } DrawingManager.prototype.drawAll = function () { for (var i = drawings.length - 1; i >= 0; i--) { drawings[i].draw...
var p; var drawings = []; var DrawingManager = function (p5Sketch) { p = p5Sketch; }; DrawingManager.prototype.add = function (drawing) { console.log('Added ' + drawing); drawings.unshift(drawing); } DrawingManager.prototype.drawAll = function () { for (var i = drawings.length - 1; i >= 0; i--) { drawing...
Add add garbage collection and fix drawing order in the manager
Add add garbage collection and fix drawing order in the manager
JavaScript
mit
Dermah/pulsar,Dermah/pulsar
a5c098721527b788d3c09484074ceb433a7bb208
app/food/route.js
app/food/route.js
import Ember from 'ember'; export default Ember.Route.extend({ });
import Ember from 'ember'; import config from '../config/environment'; export default Ember.Route.extend({ model: function(params) { var CLIENT_ID = config.myCLIENT_ID; var CLIENT_SECRET = config.myCLIENT_SECRET; var location= Object.values(params); var url = 'https://api.foursquare.com/v2/...
Add a model to access the data from Foursquare API
Add a model to access the data from Foursquare API
JavaScript
mit
marynganga/FunSquare,marynganga/FunSquare
b88547979c1bcbf9eb21f662cd30bf4a51d5b9e2
lib/task-data/tasks/bootstrap-ubuntu.js
lib/task-data/tasks/bootstrap-ubuntu.js
// Copyright 2015, EMC, Inc. module.exports = { friendlyName: 'Bootstrap Ubuntu', injectableName: 'Task.Linux.Bootstrap.Ubuntu', implementsTask: 'Task.Base.Linux.Bootstrap', options: { kernelFile: 'vmlinuz-3.16.0-25-generic', initrdFile: 'initrd.img-3.16.0-25-generic', kernelUri...
// Copyright 2015, EMC, Inc. module.exports = { friendlyName: 'Bootstrap Ubuntu', injectableName: 'Task.Linux.Bootstrap.Ubuntu', implementsTask: 'Task.Base.Linux.Bootstrap', options: { kernelFile: 'vmlinuz-3.13.0-32-generic', initrdFile: 'initrd.img-3.13.0-32-generic', kernelUri...
Revert discovery images used to the 3.13.0-32-generic kernel
Revert discovery images used to the 3.13.0-32-generic kernel
JavaScript
apache-2.0
bbcyyb/on-tasks,AlaricChan/on-tasks,AlaricChan/on-tasks,nortonluo/on-tasks,nortonluo/on-tasks,bbcyyb/on-tasks
244e856c01cc5d33b9e312c906e86cbfcf6aa429
database/schemas/user.js
database/schemas/user.js
module.exports = (db, Sequelize) => { var User = db.define('users', { id: { type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true }, name: Sequelize.STRING, email: Sequelize.STRING, address: Sequelize.STRING, role: Sequelize.STRING, }); return User; };
module.exports = (db, Sequelize) => { var User = db.define('users', { id: { type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true }, name: Sequelize.STRING, email: Sequelize.STRING, address: Sequelize.STRING, city: Sequelize.STRING, state: Sequelize.STRING, z...
Split User address data into separate properties
Split User address data into separate properties
JavaScript
mit
Darkrender/raptor-ads,Velocies/raptor-ads,wolnewitz/raptor-ads,Darkrender/raptor-ads,Velocies/raptor-ads,bwuphan/raptor-ads,wolnewitz/raptor-ads,bwuphan/raptor-ads
7e5bd7b7d41b474fde6aaaa32b6c434b41c90503
src/renderer/store/modules/twitter.js
src/renderer/store/modules/twitter.js
import Twitter from 'twitter' import config from 'config' import storage from 'electron-json-storage-sync' const OAUTH_TOKEN_KEY = 'oauthToken' const oauthInfo = storage.get(OAUTH_TOKEN_KEY) const client = new Twitter({ consumer_key: config.get('consumerKey'), consumer_secret: config.get('consumerSecret'), acc...
import Twitter from 'twitter' import config from 'config' import storage from 'electron-json-storage-sync' const OAUTH_TOKEN_KEY = 'oauthToken' const oauthInfo = storage.get(OAUTH_TOKEN_KEY) const client = new Twitter({ consumer_key: config.get('consumerKey'), consumer_secret: config.get('consumerSecret'), acc...
Add fetch mention timeline method
Add fetch mention timeline method
JavaScript
mit
megos/asagao,megos/asagao
424048651d155f371a8bda3a71b69a015be9d89c
src/server/session/dispatchSession.js
src/server/session/dispatchSession.js
import { atob } from 'Base64'; import { PrivateAPI } from '@r/private'; import Session from '../../app/models/Session'; import makeSessionFromData from './makeSessionFromData'; import setSessionCookies from './setSessionCookies'; import * as sessionActions from '../../app/actions/session'; export default async (ctx, ...
import { atob } from 'Base64'; import { PrivateAPI } from '@r/private'; import Session from '../../app/models/Session'; import makeSessionFromData from './makeSessionFromData'; import setSessionCookies from './setSessionCookies'; import * as sessionActions from '../../app/actions/session'; export default async (ctx, ...
Add logic to convert reddit dot com cookies
Add logic to convert reddit dot com cookies
JavaScript
mit
ajacksified/reddit-mobile,ajacksified/reddit-mobile,ajacksified/reddit-mobile,ajacksified/reddit-mobile
9193fe64d7e9753603755fe1ce3acb75b3a8af25
utilities/routes.js
utilities/routes.js
/** * Created by djarosz on 11/6/15. */ /** * The purpose of this file is to store all functions and utilities that are used by multiple routes. */ function filterBody(strings) { return function (req, res, next) { var k, found = false; for (k in req.body) { if (req.body.hasOwnProper...
/** * Created by djarosz on 11/6/15. */ /** * The purpose of this file is to store all functions and utilities that are used by multiple routes. */ function filterBody(strings) { return function (req, res, next) { var k, found = false; for (k in req.body) { if (req.body.hasOwnProper...
Add a utility that checks if a user has a certain role
Add a utility that checks if a user has a certain role
JavaScript
mit
iTerminate/traveler,iTerminate/traveler,dongliu/traveler,iTerminate/traveler,dongliu/traveler,iTerminate/traveler,dongliu/traveler
8d2e6ec5f7f5cf79b22f8f15abff33e4ea4b8764
sandboxes/table/index.js
sandboxes/table/index.js
import React from "react"; import ReactDOM from "react-dom"; import Chart from "react-google-charts"; // Ref : https://developers.google.com/chart/interactive/docs/gallery/histogram const data = [ ["Name", "Salary", "Full time employee"], ["Mike", { v: 10000, f: "$10,000" }, true], ["Jim", { v: 8000, f: "$8,000"...
import React from "react"; import ReactDOM from "react-dom"; import Chart from "react-google-charts"; // Ref : https://developers.google.com/chart/interactive/docs/gallery/histogram const data = [ ["Name", "Salary", "Full time employee"], ["Mike", { v: 10000, f: "$10,000" }, true], ["Jim", { v: 8000, f: "$8,000"...
Add pagesize to table demo.
Add pagesize to table demo.
JavaScript
mit
RakanNimer/react-google-charts,rakannimer/react-google-charts,rakannimer/react-google-charts
9a074d9e7ec9de9a3bc3122f400994e371859dc2
examples/tddbin-standalone.js
examples/tddbin-standalone.js
var $ = document.getElementById.bind(document); var exampleTests = require('./example-tests'); var Main = require('../src/main/main-controller'); var providedByAceEditor = function() {/* noop() */}; var isMac = navigator.platform.indexOf('Mac') === 0; var metaKey = isMac ? 'Meta' : 'Control'; var shortcuts = [ [[met...
var $ = document.getElementById.bind(document); var exampleTests = require('./example-tests'); var Main = require('../src/main/main-controller'); var Shortcut = require('../src/keyboard-shortcut/shortcut'); var providedByAceEditor = function() {/* noop() */}; var isMac = navigator.platform.indexOf('Mac') === 0; var me...
Create shortcut instances for each one.
Create shortcut instances for each one.
JavaScript
mit
tddbin/tddbin-frontend,tddbin/tddbin-frontend,tddbin/tddbin-frontend
c3fe8ffc9e6ca6f082e49612f9c1ee86f19b7d11
app/assets/scripts/utils/format.js
app/assets/scripts/utils/format.js
export function capitalizeFirstLetter (string) { return string.charAt(0).toUpperCase() + string.slice(1) } export function shortenNumber (number, decimals, abbreviate) { decimals = (decimals === undefined) ? 0 : decimals abbreviate = (abbreviate === undefined) ? true : abbreviate let k = 'K' let m = 'M' le...
export function capitalizeFirstLetter (string) { return string.charAt(0).toUpperCase() + string.slice(1) } export function shortenNumber (number, decimals, abbreviate) { decimals = (decimals === undefined) ? 0 : decimals abbreviate = (abbreviate === undefined) ? true : abbreviate let k = 'K' let m = 'M' le...
Set function to work with negative numbers as well
Set function to work with negative numbers as well
JavaScript
mit
worldbank-cdrp/disaster-risk-explorer,worldbank-cdrp/disaster-risk-explorer,worldbank-cdrp/disaster-risk-explorer
4b5c61e6c07987ddb2131635bac6813a32054c58
app/scripts/controllers/account.js
app/scripts/controllers/account.js
'use strict'; angular.module('geboRegistrantHaiApp') .controller('AccountCtrl', function ($scope, Token) { $scope.friends = []; /** * init */ $scope.init = function() { Token.request({ action: 'ls', resource: 'friends', fields: ['name', ...
'use strict'; angular.module('geboRegistrantHaiApp') .controller('AccountCtrl', function ($scope, Token) { $scope.friends = []; $scope.agent = Token.data(); /** * init */ $scope.init = function() { console.log('AccountCtrl init'); Token.request({ action: '...
Add recipient param to ls and agent to scope
Add recipient param to ls and agent to scope
JavaScript
mit
RaphaelDeLaGhetto/gebo-registrant-hai
632fc9dc71b868059123e56149a2588f5645a279
config/staging.js
config/staging.js
module.exports = { app_host_port: 'streetmix-staging.herokuapp.com', header_host_port: 'streetmix-staging.herokuapp.com', restapi: { baseuri: '/api' }, facebook_app_id: '175861739245183', l10n: { use_local: false } }
module.exports = { app_host_port: 'streetmix-staging.herokuapp.com', header_host_port: 'streetmix-staging.herokuapp.com', restapi: { baseuri: '/api', protocol: 'https://' }, facebook_app_id: '175861739245183', l10n: { use_local: false } }
Fix bug from redirectUrl sent to auth0
Fix bug from redirectUrl sent to auth0
JavaScript
bsd-3-clause
codeforamerica/streetmix,codeforamerica/streetmix,codeforamerica/streetmix
513de1a10e7179044cc86579a495c985671da37f
source/userscript.js
source/userscript.js
// ==UserScript== // @name Flight Management Computer for GeoFS // @description This extension adds an FMC which controls features such as VNAV, LNAV, route, progress information, etc. // @namespace GeoFS-Plugins // @match http://*/geofs.php* // @run-at document-end // @version 0.5.1-beta // @grant none // ==/UserScrip...
// ==UserScript== // @name Flight Management Computer for GeoFS // @description This extension adds an FMC which controls features such as VNAV, LNAV, route, progress information, etc. // @author Harry Xue // @namespace GeoFS-Plugins // @match http://*/geofs.php* // @run-at document-end // @version 0.5.2 // @grant none...
Update to v0.5.2 for release
Update to v0.5.2 for release
JavaScript
agpl-3.0
gefs-plugins/fmc-requirejs,gefs-plugins/fmc-requirejs
a7759b45fd1181bb0d675a2c38e7f887374934d7
index.js
index.js
/** * The default irc-framework interface for nodejs * Usage: var IrcFramework = require('irc-framework'); */ module.exports.Client = require('./build/client'); module.exports.Client.setDefaultTransport(require('./build/transports/net')); module.exports.ircLineParser = require('./build/irclineparser');
/** * The default irc-framework interface for nodejs * Usage: var IrcFramework = require('irc-framework'); */ module.exports.Client = require('./src/client'); module.exports.Client.setDefaultTransport(require('./src/transports/net')); module.exports.ircLineParser = require('./src/irclineparser');
Use /src/ unless running in the browser for easier debugging
Use /src/ unless running in the browser for easier debugging
JavaScript
mit
kiwiirc/irc-framework
e5da5488cd2300200ca94441602e638312224974
index.js
index.js
"use strict"; var fs = require('fs'); exports.deleteFileSync = function(filePath, timeInterval) { function iterator(filePath, dirs) { var stat = fs.stat(filePath); if(stat.isDirectory()) { dirs.unshift(filePath);//collection dirs inner(filePath, dirs); } else if(st...
"use strict"; var fs = require('fs'); exports.deleteFileSync = function(filePath, timeInterval, callback) { function iterator(filePath, dirs, callback) { fs.stat(filePath, function(err, stats){ if(err){ if (err.message === 'No such file or directory') { // ...
Modify Async && Sync Delete
Modify Async && Sync Delete
JavaScript
bsd-3-clause
EricCat/Node-File-Delete
63d22bc6452a5319ba084f35509490eba625c07e
index.js
index.js
#!/usr/bin/env node /** * Module dependencies. */ var Hapi = require('hapi'), handlers = require('./handlers'); var server = Hapi.createServer(8000); server.route([ { method: 'GET', path: '/search/{prefix}', handler: handlers.search }, { method: 'POST', path: '/dictionary', handle...
#!/usr/bin/env node /** * Module dependencies. */ var Hapi = require('hapi'), handlers = require('./handlers'); var server = Hapi.createServer(8000, { payload: { maxBytes: process.env.MAX_PAYLOAD_SIZE || 5242880 } }); server.route([ { method: 'GET', path: '/search/{prefix}', handler: hand...
Set default max payload size to 5 MiB
Set default max payload size to 5 MiB
JavaScript
mit
imiric/usearch,imiric/usearch
b1d8ab5a2744bedc8b17bb0c0db48cd638ffb0c2
server/build/loaders/polyfill-loader.js
server/build/loaders/polyfill-loader.js
import { getOptions, stringifyRequest } from 'loader-utils' module.exports = function (content, sourceMap) { this.cacheable() const options = getOptions(this) const { buildId, modules } = options this.callback(null, ` // Webpack Polyfill Injector function main() {${modules.map(module => `\n require(${st...
import { getOptions, stringifyRequest } from 'loader-utils' module.exports = function (content, sourceMap) { this.cacheable() const options = getOptions(this) const { buildId, modules } = options this.callback(null, ` // Webpack Polyfill Injector function main() {${modules.map(module => `\n require(${st...
Use callback for polyfill loading
Use callback for polyfill loading
JavaScript
mit
kpdecker/next.js
609e7f388dd69747d8236bab3f8de4a796971ed9
index.js
index.js
module.exports = concatStreams; function concatStreams(readables, writable) { var fn = function asyncRead(s) { return new Promise(function(res, rej) { var chunks = ''; s.on('data', chunk => chunks += chunk); s.on('end', () => res(chunks)); }); }; var promises = readables.map(fn); ...
module.exports = concatStreams; function concatStreams(readables, writable) { var promises = readables.map(asyncRead); var results = Promise.all(promises); results.then(buffers => { var data = Buffer.concat(buffers); writable.write(data); }); } function asyncRead(stream) { return new Promise(resol...
Update `concatStreams` to use `Buffer.concat`
Update `concatStreams` to use `Buffer.concat` Now it is possible to concat binary files.
JavaScript
mit
vekat/vcat
30b523e1b5e7bc96864ec8b3bb488f10433bdd80
public/app.js
public/app.js
function something() { var x = window.localStorage.getItem('bbb'); x = x * 1 + 1; window.localStorage.setItem('bbb', x); alert(x); } function add_to_cart(id) { var key = 'product_' + id; var x = window.localStorage.getItem(key); x = x * 1 + 1; window.localStorage.setItem(key, x); update_orders_inpu...
function something() { var x = window.localStorage.getItem('bbb'); x = x * 1 + 1; window.localStorage.setItem('bbb', x); alert(x); } function add_to_cart(id) { var key = 'product_' + id; var x = window.localStorage.getItem(key); x = x * 1 + 1; window.localStorage.setItem(key, x); update_orders_inpu...
Clear local Storage on cancel
Clear local Storage on cancel
JavaScript
mit
TarrinRos/PizzaShop,TarrinRos/PizzaShop,TarrinRos/PizzaShop
f8dd49eea9b277685ca1bf6417cdad1bd23eed52
index.js
index.js
const core = require("sdk/view/core"); const hotkeys = require("sdk/hotkeys"); const tabs = require("sdk/tabs"); const windows = require("sdk/windows").browserWindows; const helpers = require("./lib/helpers"); const state = require("./lib/state"); function registerListeners(window) { let lowLevelWindow = core.vie...
const core = require("sdk/view/core"); const hotkeys = require("sdk/hotkeys"); const tabs = require("sdk/tabs"); const windows = require("sdk/windows").browserWindows; const helpers = require("./lib/helpers"); const state = require("./lib/state"); function registerListeners(window) { let lowLevelWindow = core.vie...
Add empty onUnload to pass test
Add empty onUnload to pass test
JavaScript
mit
sblask/firefox-open-tabs-next-to-current
449d2df4fb7538b2b809d96142a8ec60a5f9464d
index.js
index.js
'use strict'; var fs = require('fs'), path = require('path'); /* * function readSsl (options, callback) * Reads the SSL certificate information in the * specified options: * * options.root * options.cert * options.key * options.ca */ module.exports = function (options, callback) { var read = {}; fun...
'use strict'; var fs = require('fs'), path = require('path'); /* * function readSsl (options, callback) * Reads the SSL certificate information in the * specified options: * * options.root * options.cert * options.key * options.ca */ module.exports = function (options, callback) { var read = {}; fun...
Add fix for "no ca" case.
[fix] Add fix for "no ca" case.
JavaScript
mit
indexzero/read-ssl
0ac654172de6eebae5ed4235a03f10d9bd3813a5
index.js
index.js
var util = require('util'); var mochaFormatter = { suite: "describe('%s', function () {", test: "it('%s');", end: '});' }; function format(line, type) { return util.format(mochaFormatter[type], line.trim()); } function getIndentLength(line) { return (line.match(/ {2}/g) || []).length; } module.exports ...
var util = require('util'); var mochaFormatter = { suite: "describe('%s', function () {", test: "it('%s');", end: '});' }; function format(line, type) { if (type === 'end') { return mochaFormatter.end; } else { return util.format(mochaFormatter[type], line.trim()); } } function getIndentLength...
Revert "Remove the 'end' type from format()"
Revert "Remove the 'end' type from format()" This reverts commit aff79b167029fa45c3bef6af187d795e1b012cd1.
JavaScript
mit
nicolasmccurdy/procrastinate,nicolasmccurdy/procrastinate
8d68c4abb924a645febf27a8c845f500575e600e
index.js
index.js
'use strict'; var childProcess = require('child_process'); var nodeBin = process.argv[0]; module.exports = sleep; function sleep(milliseconds) { var start = Date.now(); if (milliseconds !== Math.floor(milliseconds)) { throw new TypeError('sleep only accepts an integer number of milliseconds'); } else if (mi...
'use strict'; var childProcess = require('child_process'); var nodeBin = process.argv[0]; module.exports = sleep; function sleep(milliseconds) { var start = Date.now(); if (milliseconds !== Math.floor(milliseconds)) { throw new TypeError('sleep only accepts an integer number of milliseconds'); } else if (mi...
Use timeout to handle very slow node on some platforms
Use timeout to handle very slow node on some platforms [closes #17]
JavaScript
mit
ForbesLindesay/thread-sleep
f1d5c0b1b69b5c03f32993b191aeb7bdc6b89567
src/public/js/app.js
src/public/js/app.js
$(function() { var $body = $('body'), $caption = $('#caption'), $img = $('#main-image'); var getImage = (function() { var index = 0, images = [], lastCall = Date.now(), WAIT_TIME = 1800000; // 30 minutes function updateImages() { $.getJSON('med...
$(function() { var $body = $('body'), $caption = $('#caption'), $img = $('#main-image'); var getImage = (function() { var index = 0, images = [], lastCall = Date.now(), WAIT_TIME = 1800000; // 30 minutes function updateImages() { $.getJSON('med...
Create a new image element instead of changing the image src. This is a potential fix to a memory issue in Chromium.
Create a new image element instead of changing the image src. This is a potential fix to a memory issue in Chromium.
JavaScript
mit
acingraham/AwwFrame,acingraham/AwwFrame,acingraham/AwwFrame
4a875ad61bc484997162cd2608531510b55c10e0
assembler/bin/index.js
assembler/bin/index.js
var Fs = require("fs") , ArcAssembler = require("./lib") ; const OUTPUT_FILE = __dirname + "/out" , INPUT_FILE = __dirname + "/Test.asm" ; var outputStream = Fs.createWriteStream(OUTPUT_FILE); Fs.readFile(INPUT_FILE, "utf-8", function (err, lines) { var result = ArcAssembler.compile(lines); resu...
// Dependencies var Fs = require("fs") , ArcAssembler = require("../lib") , Argv = require("yargs") .alias("s", "source") .alias("o", "output") .argv , Path = require("path") ; // Constants const INPUT_FILE = Path.resolve(process.cwd() + Argv.source) , OUTPUT_FILE = Path.resolve(process.cwd(...
Use yargs to parse the command line args
Use yargs to parse the command line args
JavaScript
mit
IonicaBizau/arc-assembler,IonicaBizau/arc-assembler,IonicaBizau/arc-assembler
1e109702cc638a146455eeaf05d2db035e3787d3
frontend/app/routes/visualize/graph.js
frontend/app/routes/visualize/graph.js
import Route from '@ember/routing/route'; import ResetScrollPositionMixin from 'frontend/mixins/reset-scroll-position'; export default Route.extend(ResetScrollPositionMixin, { model() { const host = this.store.adapterFor('summarized-statistic').get('host'); return fetch(`${host}/chart_data/similarities.json`...
import fetch from 'fetch'; import Route from '@ember/routing/route'; import ResetScrollPositionMixin from 'frontend/mixins/reset-scroll-position'; export default Route.extend(ResetScrollPositionMixin, { model() { const host = this.store.adapterFor('summarized-statistic').get('host'); return fetch(`${host}/ch...
Add fetch polyfill for IE
Add fetch polyfill for IE
JavaScript
mit
roschaefer/rundfunk-mitbestimmen,roschaefer/rundfunk-mitbestimmen,roschaefer/rundfunk-mitbestimmen
728bc20f2dce0c524e5ce55a62c3ec9dec8d0fa0
source/javascripts/LazyLoadApp/index.js
source/javascripts/LazyLoadApp/index.js
export default function lazyLoader (images: NodeList<HTMLElement>): void { const callback = function(entries, observer) { for (let entry of entries) { if (entry.isIntersecting && !entry.target.src) { let target = entry.target target.setAttribute('src', target.getAttribute('data-src')) ...
export default function lazyLoader (images: NodeList<HTMLElement>): void { const callback = function(entries, observer) { for (let entry of entries) { if (entry.isIntersecting && !entry.target.src) { let target = entry.target target.setAttribute('src', target.getAttribute('data-src')) ...
Remove style after image loaded
feat: Remove style after image loaded
JavaScript
mit
Leko/WEB-EGG,Leko/WEB-EGG,Leko/WEB-EGG
339e37284ffd0c67594fa9661af66ca89abf8054
server/app.js
server/app.js
var express = require('express'); var app = express(); var http = require('http'); var mongoose= require('mongoose'); app.set('port', process.env.PORT || 3000); app.use(express.favicon()); app.use(express.logger('dev')); app.use(express.json()); app.use(express.urlencoded()); app.use(express.methodOverride())...
var express = require('express'); var app = express(); var http = require('http'); var mongoose= require('mongoose'); app.set('port', process.env.PORT || 3000); app.use(express.favicon()); app.use(express.logger('dev')); app.use(express.json()); app.use(express.urlencoded()); app.use(express.methodOverride()...
Fix previous error. Add require('./models/task')
Fix previous error. Add require('./models/task') Fix previous error. Add require('./models/task') Contact: 0a00ae03c9edd21d50a229f9fa1f98d9b3912b9e@isla.io
JavaScript
unlicense
joaquindev/learning-mongoose
06c8491a352d389a0866a4e8614126b7fd1bce56
proxy.js
proxy.js
var fs = require('fs'), http = require('http'), https = require('https'), httpProxy = require('http-proxy') environment = process.env.NODE_ENV || 'production' config = require('./config.' + environment) var options = { https: { key: fs.readFileSync(config.ssl.key, 'utf8'), cert: f...
var fs = require('fs'), http = require('http'), https = require('https'), httpProxy = require('http-proxy') environment = process.env.NODE_ENV || 'production' config = require('./config.' + environment) var options = { https: { key: fs.readFileSync(config.ssl.key, 'utf8'), cert: f...
Update the cipher list to pass ssllabs BEAST tests
Update the cipher list to pass ssllabs BEAST tests
JavaScript
apache-2.0
pinittome/proxy
92bc8ca56d4042b1b43f04a7e8e7b6ef348e4463
react.js
react.js
var assign = require('object-assign'); var baseRules = require('./base'); var rules = assign(baseRules, { 'jsx-quotes': [2, 'prefer-single'], 'react/jsx-no-bind': 1, 'react/sort-comp': 0, // enable when https://github.com/yannickcr/eslint-plugin-react/issues/128 is fixed }); module.exports = { extends: 'airbnb...
var assign = require('object-assign'); var baseRules = require('./base'); var rules = assign(baseRules, { 'jsx-quotes': [2, 'prefer-single'], 'react/jsx-curly-spacing': [2, 'never'], 'react/jsx-no-bind': 1, 'react/sort-comp': 0, // enable when https://github.com/yannickcr/eslint-plugin-react/issues/128 is fixed...
Enforce no curly spacing in jsx
Enforce no curly spacing in jsx
JavaScript
mit
webkom/eslint-config-webkom
4444b398a11594579d79293f3667534f8ab8fd52
config.js
config.js
export default { authToken: process.env.AUTH_TOKEN || 'secret', env: process.env.NODE_ENV, host: process.env.HOST || 'localhost', github: { apiUrl: 'https://api.github.com', username: process.env.GITHUB_USERNAME || 'username' }, jobs: { frequency: { githubActivity: process.env.JOBS_FREQUEN...
export default { authToken: process.env.AUTH_TOKEN || 'secret', env: process.env.NODE_ENV, host: process.env.HOST || 'localhost', github: { apiUrl: 'https://api.github.com', username: process.env.GITHUB_USERNAME || 'username' }, jobs: { frequency: { githubActivity: process.env.JOBS_FREQUEN...
Add update cache frequency option
Add update cache frequency option
JavaScript
mit
franvarney/franvarney-api
35dfbc117fc7bb8dd0cc6c8513f2d3a551baa8e3
api/models/Project.js
api/models/Project.js
'use strict' const Model = require('trails-model') /** * @module Project * @description Workspace group by users */ module.exports = class Project extends Model { static config () { } static schema () { return { name: { type: 'string' }, status: { type: 'string' ...
'use strict' const Model = require('trails-model') /** * @module Project * @description Workspace group by users */ module.exports = class Project extends Model { static config () { } static schema () { return { name: { type: 'string' }, status: { type: 'string' ...
Add position and zoom in project
Add position and zoom in project
JavaScript
mit
agustim/fiberfy-server,agustim/fiberfy-server
aedf41a210d7609694589aa41eeb796de802066f
app/js/controllers.js
app/js/controllers.js
'use strict'; /* Controllers */ angular.module('myApp.controllers', []) .controller('HomeController', ['$scope', function($scope) { }]) .controller('AlbumsController', ['$scope', function($scope) { }]) .controller('ArtistsController', ['$scope', function($scope) { }]) .controller('SongsController', ['$s...
'use strict'; /* Controllers */ angular.module('myApp.controllers', []) .controller('HomeController', ['$scope', function($scope) { }]) .controller('AlbumsController', ['$scope', function($scope) { $scope.albums = []; }]) .controller('ArtistsController', ['$scope', function($scope) { $scope.artists ...
Create containers to hold music data
Create containers to hold music data I.e. empty arrays for songs, artists, albums, and favorites
JavaScript
mit
wh1tney/recordly,wh1tney/recordly,wh1tney/recordly,wh1tney/recordly
daf4bda805649b9b4000d649f4729effaffad25e
test/e2e/tests/billing/testPlanUsage.js
test/e2e/tests/billing/testPlanUsage.js
import instances from '../../tempInstances'; import { addTestNamePrefixes } from '../../utils'; import _ from 'lodash'; export default addTestNamePrefixes({ tags: ['planUsage'], beforeEach: (client) => { const { account_key: accountKey } = instances.account; client .loginUsingLocalStorage(accountKey...
import instances from '../../tempInstances'; import { addTestNamePrefixes } from '../../utils'; import _ from 'lodash'; export default addTestNamePrefixes({ tags: ['planUsage'], beforeEach: (client) => { const { account_key: accountKey } = instances.account; client .loginUsingLocalStorage(accountKey...
Fix randomly failing plan usage e2e tests
[DASH-2334] Fix randomly failing plan usage e2e tests
JavaScript
mit
Syncano/syncano-dashboard,Syncano/syncano-dashboard,Syncano/syncano-dashboard
fec22dc41e822964861c709a3be41bf1a86ab9ee
src/main.js
src/main.js
import localforage from 'localforage'; import Vue from 'vue' import Vuex from 'vuex' import SpotifyWebApi from 'spotify-web-api-js' import App from './App.vue' Vue.use(Vuex); var store = new Vuex.Store({ state: { loggedIn: false }, mutations: { LOGGED_IN (state) { state.loggedIn = true; }, ...
import localforage from 'localforage'; import Vue from 'vue' import Vuex from 'vuex' import SpotifyWebApi from 'spotify-web-api-js' import App from './App.vue' Vue.use(Vuex); var store = new Vuex.Store({ state: { loggedIn: false, trackCart: [] }, mutations: { LOGGED_IN (state) { state.loggedI...
Add simple track cart state management to Vuex store.
Add simple track cart state management to Vuex store.
JavaScript
apache-2.0
eamonnbell/sortzzi,eamonnbell/sortzzi
f2996953f93fee025e0e6ea451779514c66df187
src/main.js
src/main.js
window.ReflectionVariable = require('./ReflectionVariable'); window.ReflectionAssignedFunctionExpression = require('./ReflectionAssignedFunctionExpression'); window.ReflectionFunctionExpression = require('./ReflectionFunctionExpression'); window.ReflectionFunctionDeclaration = require('./ReflectionFunctionDeclaration')...
global.ReflectionVariable = require('./ReflectionVariable'); global.ReflectionAssignedFunctionExpression = require('./ReflectionAssignedFunctionExpression'); global.ReflectionFunctionExpression = require('./ReflectionFunctionExpression'); global.ReflectionFunctionDeclaration = require('./ReflectionFunctionDeclaration')...
Replace the uses of window with global
Replace the uses of window with global
JavaScript
mit
yannickglt/esreflect
6a46b1f1340a233a7b8ed0b748496478dabb07b9
src/helpers.js
src/helpers.js
export default { /** * Naive polyfill for Object.assign() * Why I did it? Because even modular lodash adds too much code in final build * @param {Object} target * @return {Object} */ assign(target) { for (let i = 1; i < arguments.length; i++) { let obj = Object(argum...
export default { /** * Naive polyfill for Object.assign() * Why I did it? Because even modular lodash adds too much code in final build * @param {Object} target * @return {Object} */ assign(target) { for (let i = 1; i < arguments.length; i++) { let obj = Object(argum...
Correct implementation of joinParams() helper
Correct implementation of joinParams() helper
JavaScript
mit
albburtsev/talaria,JulianWielga/fetch-please,albburtsev/fetch-please
a04d5aaf70986c162b60d22ac1c1081578f89b98
src/socket.js
src/socket.js
import SocketIO from 'socket.io'; import { createClient } from 'redis'; import { redisUrl } from './config'; const io = SocketIO(); io.use((socket, next) => { return next(); }); io.of('/live-chatroom') .use((socket, next) => { return next(); }) .on('connection', (socket) => { const redis = createCli...
import SocketIO from 'socket.io'; import { createClient } from 'redis'; import { redisUrl } from './config'; const io = SocketIO(); io.use((socket, next) => { return next(); }); io.of('/live-chatroom') .use((socket, next) => { return next(); }) .on('connection', (socket) => { const redisSubscriber =...
Fix redis error => If redis client subscribed a key, it cannot run another commands.
Fix redis error => If redis client subscribed a key, it cannot run another commands.
JavaScript
mit
Calvin-Huang/LiveAPIExplore-Server,Calvin-Huang/LiveAPIExplore-Server
e55dc73574cfeec52293e0fd28f2d536172dd2c1
tasks/mkdir.js
tasks/mkdir.js
module.exports = function(grunt) { return grunt.registerMultiTask('mkdir', 'Make directories.', function() { var options; options = this.options({ mode: null, create: [] }); grunt.verbose.writeflags(options, 'Options'); return options.create.forEach(function(filepath) { var e; ...
module.exports = function(grunt) { return grunt.registerMultiTask('mkdir', 'Make directories.', function() { var options; options = this.options({ mode: null, create: [] }); grunt.verbose.writeflags(options, 'Options'); return options.create.forEach(function(filepath) { grunt.log...
Replace e removed during build by _error
Replace e removed during build by _error
JavaScript
mit
rubenv/grunt-mkdir
4aabd0fecd731ad83cc45a0d537bd33f4017ca7d
test/qrcode.js
test/qrcode.js
expect =require('chai').expect; fs = require('fs'); PNG = require('png-js'); QrCode = require('../dist/index.js'); it('should work with basic image', function(done) { c = fs.readFileSync(__dirname + '/image.png'); p = new PNG(c); p.decode(function(data) { qr = new QrCode(); qr.callback =...
var expect = require('chai').expect; var fs = require('fs'); var PNG = require('png-js'); var QrCode = require('../dist/index.js'); it('should work with basic image', function(done) { var c = fs.readFileSync(__dirname + '/image.png'); var p = new PNG(c); p.decode(function(data) { var qr = new Qr...
Use local variables instead of globals
test: Use local variables instead of globals
JavaScript
apache-2.0
edi9999/jsqrcode
5ac51a7ced6ceafea2738e2d69741788fc7110f6
lib/components/TenDay.js
lib/components/TenDay.js
import React from 'react'; import icons from '../weather_icons/WeatherIcons'; const TenDay = ({ tenDayForecast }) => { if (!tenDayForecast) { return null; } const forecastArray = tenDayForecast.simpleforecast.forecastday; const tenDayDataLoop = forecastArray.map((day, i) => { return ( <div classN...
import React from 'react'; import icons from '../weather_icons/WeatherIcons'; const TenDay = ({ tenDayForecast }) => { if (!tenDayForecast) { return null; } const forecastArray = tenDayForecast.simpleforecast.forecastday; const tenDayDataLoop = forecastArray.map((day, i) => { return ( <div classN...
Create line break for icons div.
Create line break for icons div.
JavaScript
mit
thatPamIAm/weathrly,thatPamIAm/weathrly
907faebf3c5fd536a31edd61e08414a4c6ec09a0
modules/whs-module-audio/src/index.js
modules/whs-module-audio/src/index.js
import { PositionalAudio, AudioListener, AudioLoader } from 'three'; export default class PositionalAudioModule { constructor(params = {}) { this.params = Object.assign({ loop: true }, params); this.audioListener = new AudioListener(); this.positionalAudio = new PositionalAudio(this.audi...
import { PositionalAudio, AudioListener, AudioLoader } from 'three'; export default class PositionalAudioModule { constructor(params = {}) { this.params = Object.assign({ loop: true }, params); this.audioListener = new AudioListener(); this.audioLoader = new AudioLoader(); this.posi...
Move methods to module scope
Move methods to module scope Former-commit-id: cc0e31d8f83f92fb8240f2cf88839322b4ce36b4
JavaScript
mit
WhitestormJS/whs.js,WhitestormJS/whs.js
8696b6454857ec853bc50f6cfa0c4f1095a2d6a6
source/javascript/keyboardShortcuts.js
source/javascript/keyboardShortcuts.js
define(function (require) { var documentKeyboardHandler = require("utilities/documentKeyboardHandler"); var keyboardShortcuts = function (eventBus) { documentKeyboardHandler(function (event, isDown, isRepeated) { // spacebar if (isDown && event.which === 32) { if (!isRepeated) eventBus.trigger("togg...
define(function (require) { var $ = require("jquery"); var documentKeyboardHandler = require("utilities/documentKeyboardHandler"); var keyboardShortcuts = function (eventBus) { documentKeyboardHandler(function (event, isDown, isRepeated) { // spacebar if (isDown && event.which === 32) { if (!isRepeated)...
Disable keyboard shortcut if target element is an input element.
Disable keyboard shortcut if target element is an input element.
JavaScript
mit
stuartkeith/webaudiosequencer,stuartkeith/webaudiosequencer
b378ee9b9330ac37ebf8b6e26db7ed1003e1e8d7
test/moreLessSpec.js
test/moreLessSpec.js
( function() { 'use strict'; describe( 'vui', function() { var node; beforeEach( function () { jasmine.addMatchers( d2l.jasmine.matchers ); node = document.body.appendChild( document.createElement( 'div' ) ); } ); afterEach( function() { document.body.removeChild( node ); } ); ...
( function() { 'use strict'; describe( 'vui.moreLess', function() { var node, $container1; beforeEach( function () { jasmine.addMatchers( d2l.jasmine.matchers ); node = document.body.appendChild( document.createElement( 'div' ) ); $container1 = $( "<div class='vui-moreless'><p>some content</p></div...
Add basic widget create/destroy tests.
Add basic widget create/destroy tests.
JavaScript
apache-2.0
Brightspace/jquery-valence-ui-more-less
254d4551036abbd61eb1b809d7640d5adb863ba3
Libraries/StyleSheet/splitLayoutProps.js
Libraries/StyleSheet/splitLayoutProps.js
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow strict-local */ 'use strict'; import type {DangerouslyImpreciseStyle} from './StyleSheet'; const OUTER_PROPS...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow strict-local */ 'use strict'; import type {DangerouslyImpreciseStyle} from './StyleSheet'; const OUTER_PROPS...
Add type annotations to prevent issues with planned Flow changes
Add type annotations to prevent issues with planned Flow changes Summary: We're planning a fix in Flow (D24112595) that uncovers some existing errors that were previously suppressed. Adding these annotations prevents them from surfacing during the deploy of the fix. Changelog: [Internal] Reviewed By: dsainati1 Diff...
JavaScript
mit
myntra/react-native,facebook/react-native,janicduplessis/react-native,facebook/react-native,facebook/react-native,javache/react-native,arthuralee/react-native,javache/react-native,javache/react-native,arthuralee/react-native,myntra/react-native,pandiaraj44/react-native,janicduplessis/react-native,janicduplessis/react-n...
8b64cf08d34234b15fef4d7b15c5eb958270f9d0
src/client/app/cursors/Cursors.view.js
src/client/app/cursors/Cursors.view.js
import React, { Component } from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Cursor from './Cursor'; class Cursors extends Component { render() { return ( <div> {this.props.displayedUsers.map(user => ( <Cursor username={user.get('username')} ...
import React, { Component } from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Cursor from './Cursor'; class Cursors extends Component { render() { return ( <div> {this.props.displayedUsers.valueSeq().toArray().map(user => ( <Cursor key={user.get...
Adjust Cursors render method map to iterate through a normal array
Adjust Cursors render method map to iterate through a normal array
JavaScript
bsd-3-clause
jackrzhang/boardsession,jackrzhang/boardsession
bcada25f33f4c8595b54c2af03ea84142535b62b
src/common/containers/Layout/Header.js
src/common/containers/Layout/Header.js
import React, {Component, PropTypes} from 'react'; import {IndexLink, Link} from 'react-router'; import {connect} from 'react-redux'; @connect( state => ({ loggedIn: state.auth.loggedIn }) ) export default class Header extends Component { static propTypes = { loggedIn: PropTypes.bool } render() { ...
import React, {Component, PropTypes} from 'react'; import {IndexLink, Link} from 'react-router'; import {connect} from 'react-redux'; @connect( state => ({ loggedIn: state.auth.loggedIn }) ) export default class Header extends Component { static propTypes = { loggedIn: PropTypes.bool } render() { ...
Add link to 404 example page
Add link to 404 example page
JavaScript
mit
ufocoder/redux-universal-boilerplate
ace1c1af8bf9224130c0b7304e793241e39c17fb
chrome/app/content.js
chrome/app/content.js
'use strict'; function setElementsValueByName(name, value) { var elements = document.getElementsByName(name); for(var i = 0; i < elements.length; i++) { elements[i].value = value; } } function serializeForms() { var fields = []; for(var i = 0; i < document.forms.length; i++) { var elements = documen...
'use strict'; function setElementsValueByName(name, value) { var elements = document.getElementsByName(name); for(var i = 0; i < elements.length; i++) { elements[i].value = value; } } function serializeForms() { var fields = []; for(var i = 0; i < document.forms.length; i++) { var elements = documen...
Stop serialising fields with no name
Stop serialising fields with no name
JavaScript
mit
proglottis/oyster,proglottis/oyster,proglottis/oyster,proglottis/oyster
b33cf1790b36d4c1e08d24f7dea68026ebb3ce05
testrunners/run-tests.js
testrunners/run-tests.js
const chai = require('chai') chai.should() const fs = require('fs') const testFolder = fs.readdirSync('./test') const ignoreFiles = [ '__tests-setup.js', 'mocha.opts' ] const testFiles = testFolder.filter(function (f) { return ignoreFiles.indexOf(f) === -1 }) export default function runTests (getTestSubject) { r...
const chai = require('chai') chai.should() const fs = require('fs') const testFolder = fs.readdirSync('./test') const ignoreFiles = [ '__tests-setup.js', 'mocha.opts' ] const testFiles = testFolder.filter(function (f) { return ignoreFiles.indexOf(f) === -1 }) function shouldBeCurried (name, fn) { return name !== ...
Make sure all functions are curried
Make sure all functions are curried An extra test was added to the testrunner. Non functions and curry itself are ignored. The test checks that the result of calling the function with no arguments is the function itself since this is a property of a curried function and not expected to be true for any other function....
JavaScript
mit
TheLudd/unary,TheLudd/unary,TheLudd/yafu
fa86d04b62d0e8b79b8a1178a722e665bf058090
tests/chord-regex.js
tests/chord-regex.js
const chordRegex = require('../src/chord-regex') const tape = require('tape') tape('Regex against valid chords', function (test) { let chords = [ 'C', 'D', 'E', 'F', 'G', 'A', 'B', // white keys 'C#', 'Eb', 'F#', 'Ab', 'G#', 'Bb', // sharps and flats 'Db', 'D#', 'Gb', 'A#', // for those who like to use n...
const chordRegex = require('../src/chord-regex') const tape = require('tape') tape('Regex against valid chords', function (test) { let chords = [ 'C', 'D', 'E', 'F', 'G', 'A', 'B', // white keys 'C#', 'Eb', 'F#', 'Ab', 'G#', 'Bb', // sharps and flats 'Db', 'D#', 'Gb', 'A#', // for those who like to use n...
Add 7th chords with alt names to the test
Add 7th chords with alt names to the test
JavaScript
mit
gldraphael/chordsheet
a24d16f5229b80f884c748b3f392f899efc6a48a
config/environment.js
config/environment.js
'use strict'; module.exports = function(/* environment, appConfig */) { return { }; };
'use strict'; module.exports = function(/* environment, appConfig */) { return { EmberENV: { _ENABLE_LEGACY_CONTROLLER_SUPPORT: true } }; };
Add flag to skip controller keyword assertion
Add flag to skip controller keyword assertion
JavaScript
mit
emberjs/ember-legacy-controllers,emberjs/ember-legacy-controllers
09e10f0febdee51b3a46bbf739ecc82ca2c80a3a
lib/server/messages/need-more-params.js
lib/server/messages/need-more-params.js
var extend = req('/utilities/extend'), ServerMessage = req('/lib/server/message'), ReplyNumerics = req('/constants/reply-numerics'), CommandValidator = req('/validators/command'), ErrorReasons = req('/constants/error-reasons'), InvalidCommandError = req('/lib/errors/invalid-com...
var extend = req('/utilities/extend'), ServerMessage = req('/lib/server/message'), ReplyNumerics = req('/constants/reply-numerics'), CommandValidator = req('/validators/command'), ErrorReasons = req('/constants/error-reasons'), InvalidCommandError = req('/lib/errors/invalid-com...
Fix parsing error in ERR_NEEDMOREPARAMS
Fix parsing error in ERR_NEEDMOREPARAMS
JavaScript
isc
burninggarden/pirc,burninggarden/pirc
d6a77f5f9435ceff2da25c14b2c9ad2cb41f360d
app/routes/thread.js
app/routes/thread.js
import Ember from "ember"; import ResetScroll from '../mixins/reset-scroll'; import config from '../config/environment'; export default Ember.Route.extend(ResetScroll, { model: function(params) { this.set("thread_id", params["thread_id"]); return this.store.find("thread", params["thread_id"]); }, after...
import Ember from "ember"; import ResetScroll from '../mixins/reset-scroll'; import config from '../config/environment'; export default Ember.Route.extend(ResetScroll, { model: function(params) { return this.store.find("thread", params["thread_id"]); }, afterModel: function() { console.log("After model...
Fix PUT request for marking as visite
Fix PUT request for marking as visite
JavaScript
mit
fi-ksi/web-frontend,fi-ksi/web-frontend,fi-ksi/web-frontend
f69a6945c3889ca4f9f3faa57f728d373918c6a0
source/assets/javascripts/app/_gdpr.js
source/assets/javascripts/app/_gdpr.js
(function ($, dc) { "use strict"; $(function gdprBanner() { if (!dc.hasItem("gdpr-accept")) { var gdpr = $("<div class='gdpr-cookie-banner'>").on("click", ".gdpr-close", function(e) { dc.setItem("gdpr-accept", "yes"); $(document.body).removeClass("with-gdpr"); gdpr.remove(); ...
(function ($, dc) { "use strict"; $(function gdprBanner() { if (!dc.hasItem("gdpr-accept")) { var gdpr = $("<div class='gdpr-cookie-banner'>").on("click", ".gdpr-close", function(e) { dc.setItem("gdpr-accept", "yes"); $(document.body).removeClass("with-gdpr"); gdpr.remove(); ...
Add `rel="noopener noreferrer"` to external links on GDPR banner
Add `rel="noopener noreferrer"` to external links on GDPR banner See https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/ Thanks @ketan
JavaScript
apache-2.0
gocd/gocd.github.io,ketan/www.go.cd,GaneshSPatil/www.go.cd,ketan/www.go.cd,GaneshSPatil/www.go.cd,ketan/gocd.github.io,gocd/gocd.github.io,gocd/gocd.github.io,ketan/gocd.github.io,gocd/www.go.cd,GaneshSPatil/www.go.cd,ketan/gocd.github.io,gocd/www.go.cd,ketan/www.go.cd,gocd/www.go.cd,gocd/gocd.github.io,GaneshSPatil/ww...
5a6bf4ef77a0005fb2ea05f7616d5d99ab9df10f
src/js/bpm-counter.js
src/js/bpm-counter.js
class BpmCounter { constructor() { this.numTaps = 0; this.bpm = 0; this.lastTappedTime = new Date(); } restart() { this.numTaps = 0; this.bpm = 0; this.lastTappedTime = new Date(); } tick() { this.numTaps++; let currentTime = new Date(); let timeDifferenceInMS = current...
class BpmCounter { constructor() { this.numTaps = 0; this.bpm = 0; this.startTapTime = new Date(); } restart() { this.numTaps = 0; this.bpm = 0; } tick() { if (this.numTaps === 0) { this.startTapTime = new Date(); } this.numTaps++; let currentTime = new Date(); ...
Fix bug where the BPM calculated was wrong
Fix bug where the BPM calculated was wrong
JavaScript
mit
khwang/plum,khwang/plum
c058f0bdcdc88fd0d2c76d6618eac7ce1080bccd
app/main.js
app/main.js
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App.js'; import Home from './components/Home'; import Programs from './components/Programs'; import Program from './components/Program'; import Login from './components/Login'; import Register from './components/Register'; import { Router, ...
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App.js'; import Home from './components/Home'; import Programs from './components/Programs'; import Program from './components/Program'; import Login from './components/Login'; import Register from './components/Register'; import { Router, ...
Remove _k parameter from url. This is used for old browsers.
Remove _k parameter from url. This is used for old browsers.
JavaScript
mit
henrikra/gym-diary,henrikra/gym-diary,henrikra/gym-diary
bd374f3a2a30da01f176574817173711f106a1df
app/js/arethusa.search/search.service.js
app/js/arethusa.search/search.service.js
"use strict"; angular.module('arethusa.search').service('search', function(state, configurator) { var self = this; this.conf = configurator.configurationFor('search'); this.name = this.conf.name; this.template = this.conf.template; this.queryTokens = function() { var tokens = self.tokenQuery.split(' ');...
"use strict"; angular.module('arethusa.search').service('search', function(state, configurator) { var self = this; this.conf = configurator.configurationFor('search'); this.name = this.conf.name; this.template = this.conf.template; this.queryByRegex = this.conf.regex; function findByRegex(str) { // We...
Enable regex searching in search plugin
Enable regex searching in search plugin
JavaScript
mit
fbaumgardt/arethusa,Masoumeh/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa
904040a11cd6892737595eb1d5ea063c64a8a065
assets/javascripts/spoiler_alert_main.js
assets/javascripts/spoiler_alert_main.js
(function() { Discourse.addInitializer(function () { var applySpoilers = function($post) { // text $('.spoiler:not(:has(img))', $post).removeClass('spoiler') .addClass('spoiled') .spoilText(); // images $('...
(function() { Discourse.addInitializer(function () { var applySpoilers = function($post) { // text $('.spoiler:not(:has(img))', $post).removeClass('spoiler') .addClass('spoiled') .spoilText(); // images $('...
Apply spoilers to embedded posts as well.
Apply spoilers to embedded posts as well.
JavaScript
mit
cyberkoi/discourse-spoiler-alert,discourse/discourse-spoiler-alert,cyberkoi/discourse-spoiler-alert,discourse/discourse-spoiler-alert
cb63d5abb577de034bae80ccfd79fc9b8f994ad4
src/components/course/CoursesPage.js
src/components/course/CoursesPage.js
import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import * as courseActions from '../../actions/courseActions'; class CoursesPage extends React.Component { constructor(props, context) { super(props, context); this.state = { cou...
import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import * as courseActions from '../../actions/courseActions'; class CoursesPage extends React.Component { constructor(props, context) { super(props, context); } courseRow(course, inde...
Remove course management concerns from course page
Remove course management concerns from course page
JavaScript
mit
mtheoryx/react-redux-es6,mtheoryx/react-redux-es6
530ce484e5515aa032a020cf93a3652cc0886c07
src/edit/actions/FreeRotateAction.js
src/edit/actions/FreeRotateAction.js
L.FreeRotateAction = L.EditAction.extend({ initialize: function(map, overlay, options) { options = options || {}; options.toolbarIcon = { svg: true, html: 'crop_rotate', tooltip: overlay.options.translation.freeRotateImage, className: 'freeRotate', }; L.DistortableImage.action...
L.FreeRotateAction = L.EditAction.extend({ initialize(map, overlay, options) { options = options || {}; options.toolbarIcon = { svg: true, html: 'crop_rotate', tooltip: overlay.options.translation.freeRotateImage, className: 'freeRotate', }; L.DistortableImage.action_map.f = '...
Update method creation syntax to ES6 FreeRotationAction.js
Update method creation syntax to ES6 FreeRotationAction.js
JavaScript
bsd-2-clause
publiclab/Leaflet.DistortableImage,publiclab/Leaflet.DistortableImage
2a6f75e5e87e1ee780cabdd131988fbcc418dce6
spec/client/spec.client_bootstrap.js
spec/client/spec.client_bootstrap.js
define([ 'client/client_bootstrap', 'client/controllers/dashboard' ], function (bootstrap, DashboardController) { describe('client bootstrap', function () { var config; beforeEach(function () { spyOn(DashboardController.prototype, 'render'); config = { 'page-type': 'dashboard' }...
define([ 'client/client_bootstrap', 'client/controllers/dashboard' ], function (bootstrap, DashboardController) { describe('client bootstrap', function () { var config; beforeEach(function () { spyOn(DashboardController.prototype, 'render'); config = { 'page-type': 'dashboard' }...
Fix tests for client bootstrap
Fix tests for client bootstrap Add tests for ready classes
JavaScript
mit
tijmenb/spotlight,tijmenb/spotlight,alphagov/spotlight,keithiopia/spotlight,tijmenb/spotlight,alphagov/spotlight,keithiopia/spotlight,keithiopia/spotlight,alphagov/spotlight
f50d3e7a1bd9c5a0c3d93a50902d29f3816b6d67
js/controllers.js
js/controllers.js
angular.module('controllers', []) .controller('NavCtrl', function ($scope) { }) .controller('HomeCtrl', function ($scope, json) { var data = json.data var width = 200 var max = 5 var resizeTimer $scope.resolution = 0 var size = function (callback) { var number = Math.round($(window).width() / widt...
angular.module('controllers', []) .controller('NavCtrl', function ($scope, $state) { $scope.state = $state.current.name }) .controller('HomeCtrl', function ($scope, json) { var data = json.data var width = 200 var max = 5 var resizeTimer $scope.resolution = 0 var size = function (callback) { va...
Add scope variable for current nav tab
Add scope variable for current nav tab
JavaScript
mit
Cwejman/martina,Cwejman/martina
d69ea73c70bb57c4fc46f7ae517ab69213547d9e
backend/server/resources/project-access-cache.js
backend/server/resources/project-access-cache.js
module.exports = function(access) { 'use strict'; let _ = require('lodash'); let projectAccessCache = {}; return { find: find, clear: clear, validateAccess: validateAccess }; // find looks up a given project in the project cache. // If the projectAccessCache hasn't ...
module.exports = function(access) { 'use strict'; let _ = require('lodash'); let projectAccessCache = {}; let adminUsersCache = {}; return { find: find, clear: clear, validateAccess: validateAccess }; // find looks up a given project in the project cache. // If ...
Load and test for admin users.
Load and test for admin users.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
93d1eea1c2801d7cda49c2dd8e816e4d5fccf40d
public/js/application.js
public/js/application.js
$(document).ready(function() { $('#show').on('click', displayList); $('#hide').on('click', hideList); $('.say').on('click', sayText); $(window).bind("pageshow", function(event) { if(event.originalEvent.persisted) { window.location.reload() } }); }); var displayList = function(event){ ev...
$(document).ready(function() { $('#show').on('click', displayList); $('#hide').on('click', hideList); $('.say').on('click', sayText); $(window).bind("pageshow", function(event) { if(event.originalEvent.persisted) { window.location.reload() } }); }); var displayList = function(event){ ev...
Change TTS voice to sound more like yoda, voice name = bruce
Change TTS voice to sound more like yoda, voice name = bruce
JavaScript
mit
schaui6/yodalize,schaui6/yodalize,schaui6/yodalize
d315825c0713fb6ea0d89f7490637be5da29e094
public/app/scripts/controllers/users.js
public/app/scripts/controllers/users.js
'use strict'; angular.module('publicApp') .controller('UsersCtrl', ['$scope', '$http', '$location', '$route', '$routeParams', 'UserService', function ($scope, $http, $location, $route, $routeParams, $user) { $scope.user = $user; if ($user.isLogged) { if (($user.id == $routeParams.id) || $user.admin) { ...
'use strict'; angular.module('publicApp') .controller('UsersCtrl', ['$scope', '$http', '$location', '$route', '$routeParams', 'UserService', function ($scope, $http, $location, $route, $routeParams, $user) { $scope.user = $user; if ($user.isLogged) { if (($user.id == $routeParams.id) || $user.admin) { ...
Update user links in angular to get resources.
[FEATURE] Update user links in angular to get resources.
JavaScript
isc
xdv/gatewayd,crazyquark/gatewayd,xdv/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,whotooktwarden/gatewayd
3dd8ecd4fa809d864f366d521d592b131c9e7d0b
server/models/resources/menuSection.js
server/models/resources/menuSection.js
var mongoose = require('mongoose'), ObjectId = mongoose.Schema.Types.ObjectId, Product = require('./product'); var menuSectionSchema = new mongoose.Schema({ title: String, content: [Product.schema] }) menuSectionSchema.methods = {} menuSectionSchema.statics = { getByName: function(name,...
var mongoose = require('mongoose'), ObjectId = mongoose.Schema.Types.ObjectId, Place = require('./place'), Product = require('./product'); var menuSectionSchema = new mongoose.Schema({ title: String, content: [Product.schema] }) menuSectionSchema.methods = { attachToPlace: function(...
Attach menu sections to place
Attach menu sections to place
JavaScript
mit
tenevdev/beacon-valley-hackathon
0b524eb8d5bba8ed978da786fb5151e70cab4b96
app/initializers/skype.js
app/initializers/skype.js
import SkypeService from '../services/skype'; export function initialize(application) { application.register('service:skype', SkypeService, { initialize: true, singleton: true }); } export default { name: 'skype', initialize };
import SkypeService from '../services/skype'; export function initialize(application) { application.register('service:skype', SkypeService, { initialize: true, singleton: true }); window.App = application; } export default { name: 'skype', initialize };
Add App global object for sanity
Add App global object for sanity
JavaScript
mit
MyPureCloud/skype-for-business-purecloud-app,MyPureCloud/skype-for-business-purecloud-app
afaf97f2fbd0c3e63b722850dcda3508ec7ed53a
src/__tests__/util.js
src/__tests__/util.js
jest.dontMock('../util'); let {toCharCodeArray, simpleHashFn} = require('../util'); describe('toCharCodeArray', function() { it('returns an array of proper char codes', function() { expect(toCharCodeArray('abr')).toEqual([97, 98, 114]); expect(toCharCodeArray('Brian R. Bondy')).toEqual([ 66, 114, 105, 97, 110,...
jest.dontMock('../util'); let {toCharCodeArray, simpleHashFn, setBit, isBitSet} = require('../util'); describe('toCharCodeArray', function() { it('returns an array of proper char codes', function() { expect(toCharCodeArray('abr')).toEqual([97, 98, 114]); expect(toCharCodeArray('Brian R. Bondy')).toEqual([ 66, ...
Add tests for isBitSet and setBit
Add tests for isBitSet and setBit
JavaScript
mpl-2.0
bbondy/bloom-filter-js
3f7e67114253aeaed70c7022ad7a3116be2fd26f
lib/status-bar-item.js
lib/status-bar-item.js
'use babel' export default class StatusBarItem { constructor () { this.element = document.createElement('a') this.element.className = 'line-ending-tile' this.setLineEndings(new Set()) } setLineEndings (lineEndings) { this.lineEndings = lineEndings this.element.textContent = lineEndingName(li...
'use babel' export default class StatusBarItem { constructor () { this.element = document.createElement('a') this.element.className = 'line-ending-tile inline-block' this.setLineEndings(new Set()) } setLineEndings (lineEndings) { this.lineEndings = lineEndings this.element.textContent = line...
Add 'inline-block' to status-bar item for proper margin-left
Add 'inline-block' to status-bar item for proper margin-left
JavaScript
mit
bolinfest/line-ending-selector,clintwood/line-ending-selector,download13/line-ending-selector,atom/line-ending-selector
8d467ef0f3733f6ea1a841136aa2626a7e4d8663
src/components/game/game_plan/index.js
src/components/game/game_plan/index.js
var React = require('react'); var DrawingArea = require('./drawing_area'); module.exports = React.createClass({ // TODO chat.offsetWidth or gameplan.offsetLeft (+5 border size of // drawingarea) render: function () { return ( <div id="gameplan"> <div id="timer"> <div id="timer-p...
var React = require('react'); var DrawingArea = require('./drawing_area'); module.exports = React.createClass({ getInitialState: function () { return { offset: { x: 0, y: 0 } }; }, componentDidMount: function () { this.setState({ offset: { x: this.refs.gameplan.getDOMNode().offse...
Set offset from gameplan offset
Set offset from gameplan offset
JavaScript
mit
klambycom/Skissa-och-gissa,klambycom/Skissa-och-gissa,klambycom/Skissa-och-gissa
4e6de903787a1e24a4ab55c02e9ca9ffe4945895
src/prop-utilities.js
src/prop-utilities.js
// Removes component props that shouldn't be set on the form control. const cleanProps = (props) => { const { // These props come from formsy-react // https://github.com/christianalfoni/formsy-react/blob/6b167cbfe15a72430ff475a92a70273e67a663f5/src/main.js#L441 mapping, validationE...
// Removes component props that shouldn't be set on the form control. const cleanProps = (props) => { const { // These props come from formsy-react // https://github.com/christianalfoni/formsy-react/blob/6b167cbfe15a72430ff475a92a70273e67a663f5/src/main.js#L441 mapping, validationE...
Update for newly-added validateOnSubmit prop.
Update for newly-added validateOnSubmit prop.
JavaScript
mit
twisty/formsy-react-components,kishorevarma/formsy-bulma-components,twisty/formsy-react-components,twisty/formsy-react-components
899f6c911d1ed73eb59f21c5a79975ceb41e9c0a
www/js/secondPage.js
www/js/secondPage.js
function done(){ console.log('nailed that done'); var userName=document.getElementById('userInput').value; var time=document.getElementById('timeInput').value; window.localStorage.setItem("name", userName); window.localStorage.setItem("time", time); window.localStorage.setItem("changeTime", true); window.locatio...
function done(){ console.log('nailed that done'); var userName=document.getElementById('userInput').value; var time=document.getElementById('timeInput').value; window.localStorage.setItem("name", userName); window.localStorage.setItem("time", time); window.localStorage.setItem("changeTime", true); window.locatio...
Read in settings when loading settings page.
Read in settings when loading settings page.
JavaScript
apache-2.0
UTD-CSLLC/Door-Karma-Client
1f052f7a72bbda303b3a34d260551e3e29fbad71
Gruntfile.js
Gruntfile.js
var matchdep = require('matchdep'); module.exports = function(grunt){ matchdep.filterDev('grunt-*').forEach(grunt.loadNpmTasks); grunt.loadTasks('tasks'); var config = require('load-grunt-config')(grunt, { configPath: __dirname + '/tasks/options', init: false }); config.pkg = require('./package'); ...
var matchdep = require('matchdep'); module.exports = function(grunt){ matchdep.filterDev('grunt-*').forEach(grunt.loadNpmTasks); grunt.loadTasks('tasks'); var config = require('load-grunt-config')(grunt, { configPath: __dirname + '/tasks/options', init: false }); config.pkg = require('./package'); ...
Add missing task `grunt test`
Add missing task `grunt test` This command for test is documented in [README.md#from-the-cli](https://github.com/emberjs/data#from-the-cli).
JavaScript
mit
BBLN/data,trisrael/em-data,bf4/data,bf4/data,fsmanuel/data,Turbo87/ember-data,heathharrelson/data,Kuzirashi/data,lostinpatterns/data,lostinpatterns/data,PrecisionNutrition/data,whatthewhat/data,FinSync/ember-data,yaymukund/data,duggiefresh/data,wecc/data,fpauser/data,eriktrom/data,BookingSync/data,funtusov/data,HeroicE...
2bdb2f55204c676094e59413097fc8ec61e1b1de
web_external/js/models/StudyModel.js
web_external/js/models/StudyModel.js
isic.models.StudyModel = girder.Model.extend({ resourceName: 'study', /** * Add a user to the study. */ addUser: function (userId) { girder.restRequest({ path: this.resourceName + '/' + this.get('_id') + '/user', type: 'POST', data: { us...
isic.models.StudyModel = girder.Model.extend({ resourceName: 'study', /** * Add a user to the study. */ addUser: function (userId) { girder.restRequest({ path: this.resourceName + '/' + this.get('_id') + '/user', type: 'POST', data: { us...
Add method to check whether a user is a study administrator
Add method to check whether a user is a study administrator
JavaScript
apache-2.0
ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive
6ec02570f3e5a6e0a670dedd97689be0e0005e81
webapp/scripts/folder-create-menu.js
webapp/scripts/folder-create-menu.js
// folder-create-menu.js jQuery(function($) { $('#create-menu').one('click', function() { $.ajax({ type: 'GET', url: $('#create-menu-json')[0].href + encodeURIComponent(calli.getUserIri()), xhrFields: calli.withCredentials, dataType: 'json', succe...
// folder-create-menu.js jQuery(function($) { $('#create-menu').one('click', function() { var wait = calli.wait(); $.ajax({ type: 'GET', url: $('#create-menu-json')[0].href + encodeURIComponent(calli.getUserIri()), xhrFields: calli.withCredentials, da...
Add wait cursor when loading folder create menu
Add wait cursor when loading folder create menu
JavaScript
apache-2.0
3-Round-Stones/callimachus,edwardsph/callimachus,edwardsph/callimachus,edwardsph/callimachus,jimmccusker/callimachus,edwardsph/callimachus,edwardsph/callimachus,3-Round-Stones/callimachus,jimmccusker/callimachus,jimmccusker/callimachus,jimmccusker/callimachus,3-Round-Stones/callimachus,jimmccusker/callimachus,3-Round-S...
84e13e6f77545dc1756057e6c074e5dbe1da2bce
Gruntfile.js
Gruntfile.js
/*global module, require*/ module.exports = function(grunt){ 'use strict'; var gruntConfig = { pkg: grunt.file.readJSON('package.json') }; // lint grunt.loadNpmTasks('grunt-contrib-jshint'); gruntConfig.jshint = { all: [ 'Gruntfile.js', 'dice-roller.js' ], options: { jsh...
/*global module, require*/ module.exports = grunt => { 'use strict'; const gruntConfig = { pkg: grunt.file.readJSON('package.json') }; // lint grunt.loadNpmTasks('grunt-contrib-jshint'); gruntConfig.jshint = { all: [ 'Gruntfile.js', 'dice-roller.js' ], options: { jshintr...
Use ES6 bits in gruntfile
Use ES6 bits in gruntfile Reference #42
JavaScript
mit
GreenImp/rpg-dice-roller
55aa9aa1468557ea74f85cf418e671d8a2370ca6
server.js
server.js
const express = require('express'); const fs = require('fs'); const app = express(); const port = 3000; const gifFolder = './public/gifs'; let fileNames = []; app.use(express.static('public')); app.get('/', function(req, res) { res.sendFile(path.join(__dirname + '/public/index.html')); }); fs.readdir(gifFolder, (...
const express = require('express'); const fs = require('fs'); const app = express(); const port = 3000; const gifFolder = './public/gifs'; app.use(express.static('public')); app.get('/', function(req, res) { res.sendFile(path.join(__dirname + '/public/index.html')); }); fs.readdir(gifFolder, (err, files) => { fs...
Fix readdir -> writeFileSync to write filenames once
Fix readdir -> writeFileSync to write filenames once
JavaScript
mit
davidrayoussef/full-screen-gif-slider,davidrayoussef/full-screen-gif-slider
f3ed48bb5309597d5020560d5f9e964823e01883
server.js
server.js
const path = require('path') const express = require('express') const app = express() const port = process.env.PORT ? process.env.PORT : 8081 const dist = path.join(__dirname, 'public') app.use(express.static(dist)) app.all('*', function (req, res, next) { // eslint-disable-line if (req.headers['x-forwarded-proto...
const path = require('path') const express = require('express') const app = express() const port = process.env.PORT ? process.env.PORT : 8081 const dist = path.join(__dirname, 'public') function ensureSecure(req, res, next) { // eslint-disable-line if (req.secure) { return next() } res.redirect(`https://...
Fix ensure secure connection middleware
Fix ensure secure connection middleware
JavaScript
mit
developer239/workbox-webpack-react,developer239/workbox-webpack-react
015b09207dfd639579dbb3e9cd3cd1f0f3cf5e6b
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 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 ...
Mark notes as checkbox as checked if focus on textarea
Mark notes as checkbox as checked if focus on textarea
JavaScript
apache-2.0
lm-tools/work-you-could-do,lm-tools/work-you-could-do,lm-tools/work-you-could-do,lm-tools/work-you-could-do
6dd6e3dbecdc23b124586f4607e125de1968766b
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...
Change timeout time to 500, remove call for finishedLoading method
Change timeout time to 500, remove call for finishedLoading method
JavaScript
mit
fma2/nyc-high-school-programs,fma2/nyc-high-school-programs
557f276f3886a35bf97eb44e8192dfe682243112
app/scripts/widgets/visualizations.js
app/scripts/widgets/visualizations.js
'use strict'; var _ = require('lodash'); var $ = require('jquery'); function render(container, options) { container = $(container); options = _.extend({ items: [] }, options); _.each(options.items, function(url) { var wrapper = $('<div>') .css({ position: 'relative', paddingTop:...
'use strict'; var _ = require('lodash'); var $ = require('jquery'); function render(container, options) { container = $(container); options = _.extend({ items: [] }, options); _.each(options.items, function(url) { var wrapper = $('<div>') .css({ position: 'relative', minHeight: ...
Remove top padding from the iframe's wrapping div and set minimum height. Also, remove the .col-xs-12 class
Remove top padding from the iframe's wrapping div and set minimum height. Also, remove the .col-xs-12 class
JavaScript
mit
openspending/subsidystories.eu,openspending/subsidystories.eu,openspending/subsidystories.eu
04eebc1c92c8d1d5f031ff2b1681ebe7de1fec11
backend/server/schema/schema-rules.js
backend/server/schema/schema-rules.js
module.exports = function(model) { return { mustExist: mustExist, mustNotExist: mustNotExist }; function mustExist(what, modelName, done) { 'use strict'; model[modelName].get(what).then(function(value) { let error = null; if (!value) { ...
var _ = require('lodash'); module.exports = function(model) { 'use strict'; let propertyTypes = [ 'number', 'string', 'histogram', 'composition' ]; let propertyUnits = [ 'mm', 'm', 'c', 'f' ]; return { mustExist: mustExis...
Add rules for validating property schema _type and units.
Add rules for validating property schema _type and units.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
f80b44a8b67e411356539ad999452a7549875e1c
agGridPropertiesCheck.js
agGridPropertiesCheck.js
// satisfy ag-grid HTMLElement dependency HTMLElement = typeof HTMLElement === 'undefined' ? function () {} : HTMLElement; HTMLSelectElement = typeof HTMLSelectElement === 'undefined' ? function () {} : HTMLSelectElement; HTMLInputElement = typeof HTMLInputElement === 'undefined' ? function () {} : HTMLInputElement; HT...
// satisfy ag-grid HTMLElement dependency HTMLElement = typeof HTMLElement === 'undefined' ? function () {} : HTMLElement; HTMLSelectElement = typeof HTMLSelectElement === 'undefined' ? function () {} : HTMLSelectElement; HTMLInputElement = typeof HTMLInputElement === 'undefined' ? function () {} : HTMLInputElement; HT...
Fix regression - internal reflect lib changes!
Fix regression - internal reflect lib changes!
JavaScript
mit
ceolter/ag-grid,ceolter/angular-grid,ceolter/angular-grid,ceolter/ag-grid-ng2,ceolter/ag-grid,ceolter/ag-grid-ng2
3c861924204637aee67ea9e9d6e19145b7098935
src/tracing/trace_model/timed_event.js
src/tracing/trace_model/timed_event.js
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; base.require('base.guid'); base.require('tracing.trace_model.event'); /** * @fileoverview Provides the TimedEvent class. */ base.exp...
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; base.require('base.guid'); base.require('tracing.trace_model.event'); /** * @fileoverview Provides the TimedEvent class. */ base.exp...
Fix TimedEvent sets GUID twice
Fix TimedEvent sets GUID twice TBR=nduca@chromium.org BUG= Review URL: https://codereview.appspot.com/12746044 git-svn-id: 3a56fcae908c7e16d23cb53443ea4795ac387cf2@896 0e6d7f2b-9903-5b78-7403-59d27f066143
JavaScript
bsd-3-clause
bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer
fc1e78ffdf023cfaf7b90bb8081955204d71e9c5
domready.js
domready.js
/** * Execute a given function once the document has finished loading * @param {Function} cb - Function to execute once the document has finished loading */ export default function domReady(once) { return (cb) => { if(typeof cb !== 'function') { return; } if(document.readyState === 'complete') { return cb...
import _once from './once'; import isFunction from './isFunction'; /** * Build a method that executes a given function once the document has finished loading * @param {Function} once - The 'once' (single trigger event) method to use * @return {Function} - The 'domready' method using the given once method */ ex...
Create a 'domReadyBuilder' and imporve algorithm
domReady: Create a 'domReadyBuilder' and imporve algorithm
JavaScript
mit
Tokimon/vanillajs-helpers,Tokimon/vanillajs-helpers,Tokimon/vanillajs-helpers