commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 624 | message stringlengths 15 4.7k | lang stringclasses 3
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
c3907ccc5aa74b7186f020fa3671a2e66f2ef683 | nin/dasBoot/THREENode.js | nin/dasBoot/THREENode.js | class THREENode extends NIN.Node {
constructor(id, options) {
if(!('render' in options.outputs)) {
options.outputs.render = new NIN.TextureOutput();
}
super(id, {
inputs: options.inputs,
outputs: options.outputs,
});
this.options = options;
this.scene = new THREE.Scene();
... | class THREENode extends NIN.Node {
constructor(id, options) {
if(!('outputs' in options)) {
options.outputs = {};
}
if(!('render' in options.outputs)) {
options.outputs.render = new NIN.TextureOutput();
}
super(id, {
inputs: options.inputs,
outputs: options.outputs,
});... | Make sure nodes always have an output property | Make sure nodes always have an output property
4545fcdc1808618723a4f5cd8a228b5c0b121ab7 broke nodes that did not have
an output property specified at all, and that relied on NIN.Node to
provide the whole output setup for them. This made ninjadev/re stop
working, so here's a fix for that.
| JavaScript | apache-2.0 | ninjadev/nin,ninjadev/nin,ninjadev/nin |
92aed6c12583ca9f56dd4bc703193beffed84da5 | feature-detects/css/transformstylepreserve3d.js | feature-detects/css/transformstylepreserve3d.js | /*!
{
"name": "CSS Transform Style preserve-3d",
"property": "preserve3d",
"authors": ["denyskoch", "aFarkas"],
"tags": ["css"],
"notes": [{
"name": "MDN Docs",
"href": "https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style"
},{
"name": "Related Github Issue",
"href": "https://git... | /*!
{
"name": "CSS Transform Style preserve-3d",
"property": "preserve3d",
"authors": ["denyskoch", "aFarkas"],
"tags": ["css"],
"notes": [{
"name": "MDN Docs",
"href": "https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style"
},{
"name": "Related Github Issue",
"href": "https://git... | Fix preserve3d's IE11/Win10 false positive | Fix preserve3d's IE11/Win10 false positive
| JavaScript | mit | Modernizr/Modernizr,Modernizr/Modernizr |
0270da4122605fafc067c72091dc5836f5211f95 | src/app/templates.spec.js | src/app/templates.spec.js | describe('templates', function () {
beforeEach(module('prx', 'templates', function ($provide) {
$provide.decorator('$templateCache', function ($delegate) {
var put = $delegate.put;
$delegate.toTest = [];
$delegate.put = function (uri) {
this.toTest.push(uri);
return put.apply(thi... | describe('templates', function () {
var $scope, $compile;
beforeEach(module('prx', 'templates', function ($provide, $stateProvider) {
$stateProvider.state('fakeState', {});
$provide.decorator('$templateCache', function ($delegate) {
var put = $delegate.put;
$delegate.toTest = [];
$delega... | Set state context in test for template compilability with infinite lineage. | Set state context in test for template compilability with infinite lineage.
| JavaScript | agpl-3.0 | PRX/www.prx.org,PRX/www.prx.org,PRX/www.prx.org |
53ff5ddff1c8e95f74405cbbc557e02574c6557e | src/blocks/block-quote.js | src/blocks/block-quote.js | /*
Block Quote
*/
SirTrevor.Blocks.Quote = (function(){
var template = _.template([
'<blockquote class="st-required st-text-block" contenteditable="true"></blockquote>',
'<label class="st-input-label"> <%= i18n.t("blocks:quote:credit_field") %></label>',
'<input maxlength="140" name="cite" placeholder... | /*
Block Quote
*/
SirTrevor.Blocks.Quote = (function(){
var template = _.template([
'<blockquote class="st-required st-text-block" contenteditable="true"></blockquote>',
'<label class="st-input-label"> <%= i18n.t("blocks:quote:credit_field") %></label>',
'<input maxlength="140" name="cite" placeholder... | Fix quote block type property | Fix quote block type property
They're suppose to be capitalized
| JavaScript | mit | Shorthand/sir-trevor-js,Shorthand/sir-trevor-js,Shorthand/sir-trevor-js |
ff334dfa7d1687a923f476db1166acd47e7ee059 | src/javascripts/frigging_bootstrap/components/timepicker.js | src/javascripts/frigging_bootstrap/components/timepicker.js | let React = require("react")
let cx = require("classnames")
let {errorList, sizeClassNames, formGroupCx, label} = require("../util.js")
let {div, input} = React.DOM
export default class extends React.Component {
static displayName = "Frig.friggingBootstrap.TimePicker"
static defaultProps = Object.assign(require(... | let React = require("react")
let cx = require("classnames")
let {errorList, sizeClassNames, formGroupCx, label} = require("../util.js")
let {div, input} = React.DOM
export default class extends React.Component {
static displayName = "Frig.friggingBootstrap.TimePicker"
static defaultProps = Object.assign(require(... | Add ValueLink To On Change For Timepicker | Add ValueLink To On Change For Timepicker
| JavaScript | mit | frig-js/frig,TouchBistro/frig,frig-js/frig,TouchBistro/frig |
16d9bbe0e294d817a6cc6ce8b9db64049b317f75 | src/commands/dockerize.js | src/commands/dockerize.js | import { spawn } from "cross-spawn";
import path from "path";
import process from "process";
import commandExists from "command-exists";
module.exports = function (name) {
// Check if docker is installed first
commandExists("docker", function(err, commandExists) {
if(commandExists) {
spawn("docker", ["bu... | import { spawn } from "cross-spawn";
import path from "path";
import process from "process";
import commandExists from "command-exists";
import logger from "../lib/logger.js";
module.exports = function (name) {
// Check if docker is installed first
commandExists("docker", function(err, commandExists) {
if(comm... | Add logger for docker warning | Add logger for docker warning
| JavaScript | mit | TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick |
f6793e5fb331d1091702aa2055cb801e133c387f | js/directives/textarea.js | js/directives/textarea.js | webui.directive("textarea", function() {
return {
restrict: "E",
link: function(scope, element) {
element.attr(
"placeholder",
element.attr("placeholder").replace(/\\n/g, "\n")
).bind("keydown keypress", function(event) {
if (event.ctrlKey && event.which === 13) {
... | webui.directive("textarea", function() {
return {
restrict: "E",
link: function(scope, element) {
element.attr(
"placeholder",
function(index, placeholder) {
if (placeholder !== undefined) {
return placeholder.replace(/\\n/g, "\n");
} else {
re... | Fix "Cannot read property 'replace' of undefined" | Fix "Cannot read property 'replace' of undefined"
Signed-off-by: kuoruan <2b8c98b0b69c0b74bfe03cced5a9f738a15f1468@gmail.com>
| JavaScript | mit | ziahamza/webui-aria2,ghostry/webui-aria2,ghostry/webui-aria2,kuoruan/webui-aria2,kuoruan/webui-aria2,ziahamza/webui-aria2 |
ebeeb1a8a0871467b9b7597c3bd82b8b67829364 | src/javascript/binary/components/trackjs_onerror.js | src/javascript/binary/components/trackjs_onerror.js | window._trackJs = {
onError: function(payload, error) {
function itemExistInList(item, list) {
for (var i = 0; i < list.length; i++) {
if (item.indexOf(list[i]) > -1) {
return true;
}
}
return false;
}
... | window._trackJs = {
onError: function(payload, error) {
function itemExistInList(item, list) {
for (var i = 0; i < list.length; i++) {
if (item.indexOf(list[i]) > -1) {
return true;
}
}
return false;
}
... | Add a general 'loading script' to ignore list | Add a general 'loading script' to ignore list
| JavaScript | apache-2.0 | borisyankov/binary-static,borisyankov/binary-static,einhverfr/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,einhverfr/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,tfoertsch/binary-static,tfoertsch/binary-static,massihx/binary-static,massihx/binary-static,brodiecapel16/bi... |
3bd270f245b5e98a4784548d40959337dd050625 | src/javascript/binary/components/trackjs_onerror.js | src/javascript/binary/components/trackjs_onerror.js | window._trackJs = {
onError: function(payload, error) {
function itemExistInList(item, list) {
for (var i = 0; i < list.length; i++) {
if (item.indexOf(list[i]) > -1) {
return true;
}
}
return false;
}
... | window._trackJs = {
onError: function(payload, error) {
function itemExistInList(item, list) {
for (var i = 0; i < list.length; i++) {
if (item.indexOf(list[i]) > -1) {
return true;
}
}
return false;
}
... | Check for TrackJs already loaded and if yes, reinitialize it. Fixed version. | Check for TrackJs already loaded and if yes, reinitialize it. Fixed version.
| JavaScript | apache-2.0 | animeshsaxena/binary-static,tfoertsch/binary-static,einhverfr/binary-static,einhverfr/binary-static,tfoertsch/binary-static,borisyankov/binary-static,einhverfr/binary-static,massihx/binary-static,animeshsaxena/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,brodiecapel16/binary-static,borisyankov/... |
ee0a0699a9804c485e464f521e5c95d506d0fa29 | app/components/audit_log/Export.js | app/components/audit_log/Export.js | import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
const exampleQuery = (slug) => `query {
organization(slug: "${slug}") {
auditEvents(first: 500) {
edges {
node {
type
occurredAt
actor {
name
}... | import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
const exampleQuery = (slug) => `query {
organization(slug: "${slug}") {
auditEvents(first: 500) {
edges {
node {
type
occurredAt
actor {
name
}... | Tweak layout of export component | Tweak layout of export component
| JavaScript | mit | buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend |
3eed8db76786b5c9441cd76aadbf4f94c61ac421 | examples/inject_ol_cesium.js | examples/inject_ol_cesium.js | (function() {
const mode = window.location.href.match(/mode=([a-z0-9\-]+)\&?/i);
const DIST = false;
const isDev = mode && mode[1] === 'dev';
const cs = isDev ? 'CesiumUnminified/Cesium.js' : 'Cesium/Cesium.js';
const ol = (DIST && isDev) ? 'olcesium-debug.js' : '@loader';
if (!window.LAZY_CESIUM) {
do... | (function() {
const mode = window.location.href.match(/mode=([a-z0-9\-]+)\&?/i);
const DIST = false;
const isDev = mode && mode[1] === 'dev';
const cs = isDev ? 'CesiumUnminified/Cesium.js' : 'Cesium/Cesium.js';
const ol = (DIST && isDev) ? 'olcesium-debug.js' : '@loader';
if (!window.LAZY_CESIUM) {
do... | Fix lazy load of Cesium in examples | Fix lazy load of Cesium in examples
| JavaScript | bsd-2-clause | openlayers/ol-cesium,openlayers/ol-cesium,oterral/ol3-cesium,oterral/ol3-cesium,openlayers/ol3-cesium,openlayers/ol3-cesium |
db978592bc49e4a1e2ea6a4ebb1921c2d2439db0 | src/getFilteredOptions.js | src/getFilteredOptions.js | import {find, isEqual, uniqueId} from 'lodash';
import getOptionLabel from './getOptionLabel';
/**
* Filter out options that don't match the input string or, if multiple
* selections are allowed, that have already been selected.
*/
function getFilteredOptions(options=[], text='', selected=[], props={}) {
const {a... | import {find, isEqual, uniqueId} from 'lodash';
import getOptionLabel from './getOptionLabel';
/**
* Filter out options that don't match the input string or, if multiple
* selections are allowed, that have already been selected.
*/
function getFilteredOptions(options=[], text='', selected=[], props={}) {
const {a... | Update how exact match is found | Update how exact match is found
| JavaScript | mit | ericgio/react-bootstrap-typeahead,Neophy7e/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,Neophy7e/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,Neophy7e/react-bootstrap-typeahead |
df5964d6f790513e9b3a8fd9311c1eec13b96b92 | Jakefile.js | Jakefile.js | /* globals desc:false, task: false, complete: fase, jake: false */
(function (desc, task, complete, jake) {
"use strict";
desc('The default task. Runs tests.');
task('default', ['tests'], function () {
});
desc('Run tests');
task('tests', [], function () {
jake.exec(["./node_modules/.b... | /* globals desc:false, task: false, complete: fase, jake: false */
(function (desc, task, complete, jake) {
"use strict";
desc('The default task. Runs tests.');
task('default', ['test'], function () {
});
desc('Run tests');
task('test', [], function () {
jake.exec(["./node_modules/.bin... | Set default jakefile task to 'test' so it gets executed by travis-ci.org | Set default jakefile task to 'test' so it gets executed by travis-ci.org
| JavaScript | mit | ustyme/site-manager,jolira/site-manager,ustyme/site-manager |
246e6599f31ef09f5de204f87d6b10d28e15bc58 | public/js/application.js | public/js/application.js | var mapSketcherClient;
jQuery(function() {
jQuery.getJSON('/config.json', function(config) {
config.hostname = window.location.hostname
mapSketcherClient = new MapSketcherClient(config);
mapSketcherClient.launch();
});
$("a[rel]").overlay({
mask: {
color: '#ebecff'
, loadSpeed: 200
, opaci... | var mapSketcherClient;
jQuery(function() {
jQuery.getJSON('/config.json', function(config) {
config.hostname = window.location.hostname
mapSketcherClient = new MapSketcherClient(config);
mapSketcherClient.launch();
});
$("a[rel]").overlay({
mask: {
color: '#ebecff'
, loadSpeed: 200
, opaci... | Fix enter key on Collaborative Room selection. | Fix enter key on Collaborative Room selection.
| JavaScript | mit | sagmor/mapsketcher |
aa32378fd966b72ec91fa440ba68c079c98e303b | lib/node/buffer/buffer.js | lib/node/buffer/buffer.js | 'use strict';
var Node = require('../node');
var TYPE = 'buffer';
var PARAMS = {
source: Node.PARAM.NODE,
radio: Node.PARAM.NUMBER
};
var Buffer = Node.create(TYPE, PARAMS);
module.exports = Buffer;
module.exports.TYPE = TYPE;
module.exports.PARAMS = PARAMS;
module.exports.create = require('./factory').crea... | 'use strict';
var Node = require('../node');
var TYPE = 'buffer';
var PARAMS = {
source: Node.PARAM.NODE,
radio: Node.PARAM.NUMBER
};
var Buffer = Node.create(TYPE, PARAMS);
module.exports = Buffer;
module.exports.TYPE = TYPE;
module.exports.PARAMS = PARAMS;
module.exports.create = require('./factory').crea... | Use columns from source node | Use columns from source node
| JavaScript | bsd-3-clause | CartoDB/camshaft |
af6a7b20d7332817af15c891d307ff262d886158 | core/devMenu.js | core/devMenu.js | "use strict";
const electron = require("electron");
const {app} = electron;
const {Menu} = electron;
const {BrowserWindow} = electron;
module.exports.setDevMenu = function () {
var devMenu = Menu.buildFromTemplate([{
label: "Development",
submenu: [{
label: "Reload",
accele... | "use strict";
const electron = require("electron");
const {app} = electron;
const {Menu} = electron;
const {BrowserWindow} = electron;
module.exports.setDevMenu = function () {
var devMenu = Menu.buildFromTemplate([{
label: "Development",
submenu: [{
label: "Reload",
accele... | Change reload accelerator to Ctrl+R | Change reload accelerator to Ctrl+R
| JavaScript | mit | petschekr/Chocolate-Shell,petschekr/Chocolate-Shell |
a96ef266eaf8fe8b1248fe69a6cd51d790f170c0 | cypress/integration/list_spec.js | cypress/integration/list_spec.js | describe('The List Page', () => {
beforeEach(() => {
cy.visit('/list.html')
})
it('successfully loads', () => {})
context('navbar', () => {
it("the 'Home' link works", () => {
cy.contains('Home').click({force: true})
cy.title().should('not.equal', 'Error')
})
it("the 'About' link wor... | describe('The List Page', () => {
beforeEach(() => {
cy.visit('/list.html')
})
it('successfully loads', () => {})
context('navbar', () => {
it("the 'Home' link works", () => {
cy.contains('Home').click({force: true})
cy.title().should('not.equal', 'Error')
})
it("the 'About' link w... | Add tests for all current list items | Add tests for all current list items
| JavaScript | mit | itzsaga/slack-list |
4ea7ec98ad1b490b3a031f183dab0efc2feaa1d7 | NotesApp.js | NotesApp.js | function NoteApplication (author) {
this.author = author;
this.notes = [];
this.create = function(note_content) {
if (note_content.length > 0) {
this.notes.push(note_content);
return "You have created a note";
}
else {
return "You haven't entered a valid note";
}
}
t... | function NoteApplication (author) {
this.author = author;
this.notes = [];
this.create = function(note_content) {
if (note_content.length > 0) {
this.notes.push(note_content);
return "You have created a note";
}
else {
return "You haven't entered a valid note";
}
}
t... | Add search, delete and edit methods | Add search, delete and edit methods
| JavaScript | mit | Mayowa-Adegbola/NotesApp,Mayowa-Adegbola/NotesApp |
6e5d872baaa1e4e72bfe95a32e2ebf55ea594dde | public/app/config/translationConfig.js | public/app/config/translationConfig.js | angular.module('app').config(function ($translateProvider) {
$translateProvider.useStaticFilesLoader({
prefix: '/locale/locale-',
suffix: '.json'
});
$translateProvider.preferredLanguage('fr_FR');
}); | angular.module('app').config(function ($translateProvider) {
$translateProvider.useStaticFilesLoader({
prefix: '/locale/locale-',
suffix: '.json'
});
$translateProvider.useSanitizeValueStrategy('escape');
$translateProvider.determinePreferredLanguage();
}); | Determine preferred language and sanitizy stings | Determine preferred language and sanitizy stings
| JavaScript | mit | BenjaminBini/dilemme,BenjaminBini/dilemme |
85a03e97fa83d4fbb37c598db4272a5865b90520 | app/selectors/containers/reservationDeleteModalSelector.js | app/selectors/containers/reservationDeleteModalSelector.js | import { createSelector } from 'reselect';
import ActionTypes from 'constants/ActionTypes';
import ModalTypes from 'constants/ModalTypes';
import modalIsOpenSelectorFactory from 'selectors/factories/modalIsOpenSelectorFactory';
import requestIsActiveSelectorFactory from 'selectors/factories/requestIsActiveSelectorFact... | import { createSelector } from 'reselect';
import ActionTypes from 'constants/ActionTypes';
import ModalTypes from 'constants/ModalTypes';
import modalIsOpenSelectorFactory from 'selectors/factories/modalIsOpenSelectorFactory';
import requestIsActiveSelectorFactory from 'selectors/factories/requestIsActiveSelectorFact... | Fix typo in reservation delete modal selector | Fix typo in reservation delete modal selector
| JavaScript | mit | fastmonkeys/respa-ui |
7003aada95cfe06d1a89843de4c09d1e4ceae3f4 | test/models/user.js | test/models/user.js | 'use strict'
let imponderous = require('../../index')
class User extends imponderous.Model {
static get schema () {
return {
name: {
index: true
},
email: {
unique: true,
required: true,
validator: 'email'
},
dob: {
type: Date
}
}
... | 'use strict'
let imponderous = require('../../index')
class User extends imponderous.Model {
static get schema () {
return {
name: {
index: true
},
email: {
unique: true,
required: true,
validator: 'email'
},
dob: {
type: Date
},
... | Make "spam" property on test User model a String. | Make "spam" property on test User model a String.
| JavaScript | mit | benhutchins/imponderous |
982fb15759b79e9ec91799c0b841fdd65cf8ccc1 | examples/cli.js | examples/cli.js | #!/usr/bin/node
var convert = require('../'),
localProj = require('local-proj'),
fs = require('fs'),
geojson = JSON.parse(fs.readFileSync(process.argv[2])),
mtl = process.argv[3],
mtllibs = process.argv.slice(4),
options = {
projection: localProj.find(geojson),
mtllib: mtllibs
... | #!/usr/bin/env node
var convert = require('../'),
localProj = require('local-proj'),
fs = require('fs'),
geojson = JSON.parse(fs.readFileSync(process.argv[2])),
mtl = process.argv[3],
mtllibs = process.argv.slice(4),
options = {
projection: localProj.find(geojson),
mtllib: mtlli... | Use env to find node | Use env to find node
| JavaScript | isc | perliedman/geojson2obj |
063bf15bfa562f3708f8608c92095010b12180d5 | tests/chat_tests.js | tests/chat_tests.js | var helpers = require('./../helpers.js')
module.exports = {
'Test Sending Message' : function (browser) {
helpers.setupTest(browser)
helpers.enterText('textarea._1eY_aSnr3MDhZqacV8fugZ', 'test', browser)
browser.end();
}
}; | var helpers = require('./../helpers.js')
module.exports = {
'Test Sending Message' : function (browser) {
helpers.setupTest(browser)
helpers.enterText('textarea._1eY_aSnr3MDhZqacV8fugZ', 'test', browser)
browser.end();
},
'Check Sent Message' : function (browser) {
helpers.setupTest(browser)
... | Create test for checking sent message | Create test for checking sent message
| JavaScript | mit | TheLocust3/Drift-Nightwatch |
2445cb9f2d7c216c357943932074c5b23b99ead3 | bin/eslint_d.js | bin/eslint_d.js | #!/usr/bin/env node
'use strict';
var net = require('net');
var fs = require('fs');
var eslint = require('eslint');
var engine = new eslint.CLIEngine();
var formatter = engine.getFormatter('compact');
var server = net.createServer({
allowHalfOpen: true
}, function (con) {
var data = '';
con.on('data', function... | #!/usr/bin/env node
'use strict';
var net = require('net');
var fs = require('fs');
var eslint = require('eslint');
var engine = new eslint.CLIEngine();
var formatter = engine.getFormatter('compact');
var server = net.createServer({
allowHalfOpen: true
}, function (con) {
var data = '';
con.on('data', function... | Remove port file on kill | Remove port file on kill
| JavaScript | mit | mantoni/eslint_d.js,mantoni/eslint_d.js,clessg/eslint_d.js,ruanyl/eslint_d.js |
617ea4b1ac424daddd02f75727c149b016a26c16 | client/tests/integration/components/f-account-test.js | client/tests/integration/components/f-account-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('f-account', 'Integration | Component | f account', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any act... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('f-account', 'Integration | Component | f account', {
integration: true
});
const accountStub = Ember.Object.create({
name: 'name',
email: 'email',
phone: 'phone'
});
test('it can be submi... | Add test suite for f-account component | Add test suite for f-account component
| JavaScript | mit | yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time |
955bd081bf37c5fd0aa336767766145197b0aeea | client/src/js/views/places-view.js | client/src/js/views/places-view.js | import View from '../base/view';
import Feed from '../models/feed';
import {capfirst} from '../utils';
import FeedView from './feed-view';
import itemTemplate from '../../templates/feed-place.ejs';
export default class PlacesView extends View {
constructor({app, model}) {
super({app, model});
this.feed =... | import View from '../base/view';
import Feed from '../models/feed';
import {capfirst} from '../utils';
import FeedView from './feed-view';
import itemTemplate from '../../templates/feed-place.ejs';
export default class PlacesView extends View {
constructor({app, model}) {
super({app, model});
this.feed =... | Exclude cafes from place list | Exclude cafes from place list
| JavaScript | mit | despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics |
197caf952390effc22aaa3c3d11acac23f46a677 | api/lib/domain/models/Assessment.js | api/lib/domain/models/Assessment.js | const _ = require('lodash');
const TYPES_OF_ASSESSMENT_NEEDING_USER = ['PLACEMENT', 'CERTIFICATION'];
const { ObjectValidationError } = require('../errors');
class Assessment {
constructor(attributes) {
Object.assign(this, attributes);
}
isCompleted() {
return this.state === 'completed';
}
getLast... | const _ = require('lodash');
const TYPES_OF_ASSESSMENT_NEEDING_USER = ['PLACEMENT', 'CERTIFICATION'];
const { ObjectValidationError } = require('../errors');
class Assessment {
constructor(attributes) {
Object.assign(this, attributes);
}
isCompleted() {
return this.state === 'completed';
}
getLast... | Add console.log to logs in RA with staging db | Add console.log to logs in RA with staging db
| JavaScript | agpl-3.0 | sgmap/pix,sgmap/pix,sgmap/pix,sgmap/pix |
5ddfe279f1e6d097113c303333198a741bf5f0dd | ghost/admin/models/tag.js | ghost/admin/models/tag.js | /*global Ghost */
(function () {
'use strict';
Ghost.Collections.Tags = Ghost.ProgressCollection.extend({
url: Ghost.paths.apiRoot + '/tags/'
});
}());
| /*global Ghost */
(function () {
'use strict';
Ghost.Collections.Tags = Ghost.ProgressCollection.extend({
url: Ghost.paths.apiRoot + '/tags/',
parse: function (resp) {
return resp.tags;
}
});
}());
| Tag API: Primary Document Format | Tag API: Primary Document Format
Closes #2605
- Change tags browse() response to { tags: [...] }
- Update client side collection to use nested tags document
- Update test references to use response.tags
| JavaScript | mit | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost |
059c261d2b8bdce31133ac9875a59504d89c4f8f | app/routes/courses.server.routes.js | app/routes/courses.server.routes.js | 'use strict';
module.exports = function(app) {
var users = require('../../app/controllers/users.server.controller');
var courses = require('../../app/controllers/courses.server.controller');
var authorized = ['manager', 'admin'];
// Courses Routes
app.route('/courses')
.get(users.requiresLogin, users.ha... | 'use strict';
module.exports = function(app) {
var users = require('../../app/controllers/users.server.controller');
var courses = require('../../app/controllers/courses.server.controller');
var authorized = ['manager', 'admin'];
// Courses Routes
app.route('/courses')
.get(users.requiresLogin, users.ha... | Update permission to show course detail for teachers | Update permission to show course detail for teachers
| JavaScript | mit | combefis/ECM,combefis/ECM,combefis/ECM |
6594732058f60b90ebebbdd47070aa72c176b670 | src/components/home/HomePage.js | src/components/home/HomePage.js | import React from 'react';
import GithubAPI from '../../api/githubAPI';
class HomePage extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {
showResult: "l"
};
this.invokeGitHubAPI = this.invokeGitHubAPI.bind(this);
}
invokeGitHubAPI(){
Github... | import React from 'react';
import GithubAPI from '../../api/githubAPI';
class HomePage extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {
showResult: "l"
};
this.invokeGitHubAPI = this.invokeGitHubAPI.bind(this);
}
invokeGitHubAPI(){
Github... | Change display from updatedAt.toDateString to pushedAt.toTimeString | Change display from updatedAt.toDateString to pushedAt.toTimeString
| JavaScript | mit | compumike08/GitHub_Status_API_GUI,compumike08/GitHub_Status_API_GUI |
f54d70fdd2c28ca99d94eb5e9cb10004418e7338 | allcount.js | allcount.js | #!/usr/bin/env node
var argv = require('minimist')(process.argv.slice(2));
var injection = require('./services/injection');
var _ = require('lodash');
var port = argv.port || process.env.PORT || 9080;
var gitUrl = argv.git || process.env.GIT_URL;
var dbUrl = argv.db || process.env.DB_URL;
if (!gitUrl || !dbUrl) {
... | #!/usr/bin/env node
var argv = require('minimist')(process.argv.slice(2));
var injection = require('./services/injection');
var _ = require('lodash');
var port = argv.port || process.env.PORT || 9080;
var gitUrl = argv.git || process.env.GIT_URL;
var dbUrl = argv.db || process.env.DB_URL;
if (!gitUrl || !dbUrl) {
... | Fix exception when one error is thrown during startup | Fix exception when one error is thrown during startup
| JavaScript | mit | allcount/allcountjs,chikh/allcountjs,allcount/allcountjs,chikh/allcountjs |
f92e1de51f035f660d7c736e2869d3c9fa9a53f8 | build/config.js | build/config.js | module.exports = {
assetPath: '{{govukAssetPath}}',
afterHeader: '{{$afterHeader}}{{/afterHeader}}',
bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}',
bodyEnd: '{{$bodyEnd}}{{/bodyEnd}}',
content: '{{$main}}{{/main}}',
cookieMessage: '{{$cookieMessage}}{{/cookieMessage}}',
footerSupportLinks: '{{$footerSup... | module.exports = {
htmlLang: '{{htmlLang}}',
assetPath: '{{govukAssetPath}}',
afterHeader: '{{$afterHeader}}{{/afterHeader}}',
bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}',
bodyEnd: '{{$bodyEnd}}{{/bodyEnd}}',
content: '{{$main}}{{/main}}',
cookieMessage: '{{$cookieMessage}}{{/cookieMessage}}',
foote... | Add local for htmlLang into template | Add local for htmlLang into template
| JavaScript | mit | UKHomeOffice/govuk-template-compiler,UKHomeOffice/govuk-template-compiler |
25b6749b21e4f4f17b7abb239ce2921d279b0ad3 | app/main.js | app/main.js | let http = require('http');
let url = require('url');
let fs = require('fs');
http.createServer(function (req, res) {
let q = url.parse(req.url, true);
let filename = "app/." + q.pathname;
fs.readFile(filename, function (err, data) {
if (err) {
res.writeHead(404, {'Content-Type': 'text/... | let http = require('http');
let url = require('url');
let fs = require('fs');
http.createServer(function (req, res) {
let q = url.parse(req.url, true);
let filename = "app/." + q.pathname;
fs.readFile(filename, function (err, data) {
if (err) {
res.writeHead(404, {'Content-Type': 'text/... | Add informational message when running server | Add informational message when running server
| JavaScript | mit | adilek/jirtdan,adilek/jirtdan |
ec0c03368db293ede60115050bd201bfbd9566bc | rules/style.js | rules/style.js | module.exports = {
rules: {
// enforce spacing inside array brackets
'array-bracket-spacing': [ 'error', 'always', {
objectsInArrays: false,
arraysInArrays: false,
}],
// specify the maximum length of a line in your program
// https://github.com/eslint/eslint/blob/master/docs/rules/max... | module.exports = {
rules: {
// enforce spacing inside array brackets
'array-bracket-spacing': [ 'error', 'always', {
objectsInArrays: false,
arraysInArrays: false,
}],
// allow/disallow an empty newline after var statement
// https://github.com/eslint/eslint/blob/master/docs/rules/newl... | Remove `max-len` rule and fall back to AirBnb's (100 char) | Remove `max-len` rule and fall back to AirBnb's (100 char)
| JavaScript | mit | wyze/eslint-config-wyze |
b6abcef1e466aa09ab920cf56bfe806e71f727ad | src/javascript/binary/base/__tests__/storage.js | src/javascript/binary/base/__tests__/storage.js | var expect = require('chai').expect;
var storage = require('../storage');
var utility = require('../utility');
describe('text.localize', function() {
var text = new storage.Localizable({
key1: 'value',
key2: 'value [_1]',
});
it('should try to return a string from the localised texts', func... | var expect = require('chai').expect;
var storage = require('../storage');
var utility = require('../utility');
describe('text.localize', function() {
var text = new storage.Localizable({
key1: 'value',
key2: 'value [_1]',
'You_can_view_your_[_1]trading_limits_here_': 'Ihre [_1] Handelslimit... | Test with data from real localisation | Test with data from real localisation
| JavaScript | apache-2.0 | negar-binary/binary-static,negar-binary/binary-static,negar-binary/binary-static,4p00rv/binary-static,fayland/binary-static,fayland/binary-static,teo-binary/binary-static,teo-binary/binary-static,4p00rv/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,kellybinary/binary-... |
1467a50893393792b8ec47df9796733a40877e7d | lib/helpers/bindResources.js | lib/helpers/bindResources.js | 'use strict'
const resources = require('../resources')
const querySyntax = require('./querySyntax')
module.exports = (propToBind, dispatch) => {
resources.forEach(resource => {
propToBind[resource.name] = query =>
new Promise((resolve, reject) => {
let config = { params: querySyntax(query) }
... | 'use strict'
const resources = require('../resources')
const querySyntax = require('./querySyntax')
module.exports = (propToBind, dispatch) => {
resources.forEach(resource => {
propToBind[resource.name] = query => {
let resourceURL = resource.name
let config = null
if (query) {
confi... | Adjust bindResource and allow integer query | Adjust bindResource and allow integer query
| JavaScript | mit | saschabratton/sparkpay |
558bd4544d76beed8e3d2f8c03c8e228227aed46 | gulpfile.js | gulpfile.js | var gulp = require('gulp')
var connect = require('gulp-connect')
var browserify = require('browserify')
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var mocha = require('gulp-mocha');
gulp.task('connect', function () {
connect.server({
root: '',
port: 4000
})
})
gul... | var gulp = require('gulp')
var connect = require('gulp-connect')
var browserify = require('browserify')
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var mocha = require('gulp-mocha');
gulp.task('connect', function () {
connect.server({
root: '',
port: 4000
})
})
gul... | Add comment explaining what test task is | Add comment explaining what test task is
| JavaScript | mit | Martin-Cox/AirFlow,Martin-Cox/AirFlow |
853fcd169a4fea0d8efcfc2be789ee535e49e423 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var imagemin = require('gulp-imagemin');
var open = require('gulp-open');
gulp.task('scripts', function () {
return browserify('./js/main.js')
.bundle()
.pipe(source('bundle.js'))
.pipe(gulp.d... | var gulp = require('gulp');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var imagemin = require('gulp-imagemin');
var open = require('gulp-open');
gulp.task('scripts', function () {
return browserify('./js/main.js')
.bundle()
.pipe(source('bundle.js'))
.pipe(gulp.d... | Break chaining into different lines and change string to single quotes | Break chaining into different lines and change string to single quotes
* Keep styling in file consistent..
| JavaScript | mit | brunops/zombies-game,brunops/zombies-game |
d55fdf086698484fffdbfc095ab7547b05daa0d7 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCSS = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var paths = {
js: ['js/**.js'],
sass: {
src: ['css/sass/**.scss'],
build: 'css/'
}
};
gulp.task... | var gulp = require('gulp');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCSS = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var paths = {
js: ['js/**.js'],
sass: {
src: ['css/sass/**.scss'],
build: 'css/'
}
};
gulp.task... | Build gulp task for generating css and js | Build gulp task for generating css and js | JavaScript | mit | andrew/first-pr,andrew/first-pr |
467cab061de0819402d424d2c340c91a445c4f9d | src/components/App/App.js | src/components/App/App.js | import React, { PropTypes } from 'react';
import ReactDOM from 'react-dom';
import { Link } from 'react-router';
import { createPureComponent } from 'utils/createPureComponent';
export default createPureComponent({
displayName: 'App',
renderLink() {
const isEditing = this.props.location.pathname === '/edit... | import React, { PropTypes } from 'react';
import ReactDOM from 'react-dom';
import { Link } from 'react-router';
import { createPureComponent } from 'utils/createPureComponent';
export default createPureComponent({
displayName: 'App',
renderLink() {
const isEditing = this.props.location.pathname === '/edit... | Revert "Revert "Revert "Revert "Revert "Revert "Revert "kein editor""""""" | Revert "Revert "Revert "Revert "Revert "Revert "Revert "kein editor"""""""
This reverts commit 6795b41f5129310bfe89df0ca9bb904b00913597.
| JavaScript | mit | mattesja/mygame,mattesja/mygame |
d3c9b44d1567eb4f7cd4b6f067d5bc859deb28b1 | src/js/api/QuestionAPI.js | src/js/api/QuestionAPI.js | import { fetchAnswers, fetchQuestion, fetchComparedAnswers, postAnswer, postSkipQuestion } from '../utils/APIUtils';
export function getAnswers(url = `answers`){
return fetchAnswers(url);
}
export function getComparedAnswers(otherUserId, filters, url = `answers/compare-new/${otherUserId}?locale=es${filters.map(fi... | import { fetchAnswers, fetchQuestion, fetchComparedAnswers, postAnswer, postSkipQuestion } from '../utils/APIUtils';
export function getAnswers(url = `answers`){
return fetchAnswers(url);
}
export function getComparedAnswers(otherUserId, filters, url = `answers/compare/${otherUserId}?locale=es${filters.map(filter... | Rename compare route to use definitive one as 'compare' | QS-935: Rename compare route to use definitive one as 'compare'
| JavaScript | agpl-3.0 | nekuno/client,nekuno/client |
d3dd2c2766f04d3984a2445d110f4b370e860ec9 | src/lib/core/hyperline.js | src/lib/core/hyperline.js | import React from 'react'
import PropTypes from 'prop-types'
import Component from 'hyper/component'
import decorate from 'hyper/decorate'
class HyperLine extends Component {
static propTypes() {
return {
plugins: PropTypes.array.isRequired
}
}
styles() {
return {
line: {
display... | import React from 'react'
import PropTypes from 'prop-types'
import Component from 'hyper/component'
import decorate from 'hyper/decorate'
class HyperLine extends Component {
static propTypes() {
return {
plugins: PropTypes.array.isRequired
}
}
styles() {
return {
line: {
display... | Use padding instead of margin for x-axis. | Use padding instead of margin for x-axis.
The overflow: hidden; property on the wrapper isn't taking margin into
account for the x-axis. By using padding instead, the x-axis overflow
is correctly hidden.
| JavaScript | mit | Hyperline/hyperline |
f4985c3b6a55f316f3818ff821ee84718b715459 | app/js/init.js | app/js/init.js | document.addEventListener('DOMContentLoaded', () => {
setTimeout(window.browserCheck, 1000);
window.setupGol();
window.navUpdate(true);
window.setupLaptops();
window.onscroll();
// Configure scrolling when navigation trigger clicked
document.getElementById('navigation-trigger').addEventListener('click'... | document.addEventListener('DOMContentLoaded', () => {
setTimeout(window.browserCheck, 1000);
window.setupGol();
window.navUpdate(true);
window.setupLaptops();
window.onscroll();
// Configure scrolling when navigation trigger clicked
document.getElementById('navigation-trigger').addEventListener('click'... | Allow going back up by clicking navigation toggle again | Allow going back up by clicking navigation toggle again
| JavaScript | mit | controversial/controversial.io,controversial/controversial.io,controversial/controversial.io |
cb60f989e6b0174f3a02a69ae9203f52fd163f2e | app/assets/javascripts/map/views/layers/LandRightsLayer.js | app/assets/javascripts/map/views/layers/LandRightsLayer.js | /**
* The LandRights layer module.
*
* @return LandRightsLayer class (extends CartoDBLayerClass)
*/
define([
'abstract/layer/CartoDBLayerClass',
'text!map/cartocss/land_rights.cartocss'
], function(CartoDBLayerClass, LandRightsCartocss) {
'use strict';
var LandRightsLayer = CartoDBLayerClass.extend({
... | /**
* The LandRights layer module.
*
* @return LandRightsLayer class (extends CartoDBLayerClass)
*/
define([
'abstract/layer/CartoDBLayerClass'
], function(CartoDBLayerClass) {
'use strict';
var LandRightsLayer = CartoDBLayerClass.extend({
options: {
sql: 'SELECT the_geom_webmercator, cartodb_id,... | Revert it to the last state before the update | Revert it to the last state before the update | JavaScript | mit | Vizzuality/gfw,Vizzuality/gfw |
508c3e0267346d6a253dccc7ab1c6014a843c50d | spec/backend/integration/branchesIntegrationSpec.js | spec/backend/integration/branchesIntegrationSpec.js | 'use strict';
let request = require('supertest-as-promised');
const instance_url = process.env.INSTANCE_URL;
let app;
let listOfBranches = (res) => {
if (!('branches' in res.body)) {
throw new Error('branches not found');
}
};
let getBranches = () => {
return request(app)
.get('/branches'... | 'use strict';
const specHelper = require('../../support/specHelper'),
Branch = specHelper.models.Branch,
Group = specHelper.models.Group;
let request = require('supertest-as-promised');
const instanceUrl = process.env.INSTANCE_URL;
let app;
function seed() {
let branchWithGroups;
return Branch.create(... | Add route test for branch groups and set to use spec helper | Add route test for branch groups and set to use spec helper
| JavaScript | agpl-3.0 | rabblerouser/core,rabblerouser/core,rabblerouser/core |
ca9ae7313050e9ff873e04d532a99d5ea3969cba | src/sanity/preview/Reference.js | src/sanity/preview/Reference.js | import {materializeReference} from '../data/fetch'
import {ReferencePreview} from '../../..'
export default ReferencePreview.create(materializeReference)
| import {materializeReference} from '../data/fetch'
import {ReferencePreview} from '../../index'
export default ReferencePreview.create(materializeReference)
| Change path to reference preview | Change path to reference preview
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity |
857d37d8682fc94af2fc9bdd35f35fbb77376f63 | js/fileUtils.js | js/fileUtils.js | export async function genArrayBufferFromFileReference(fileReference) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.onload = function(e) {
resolve(e.target.result);
};
reader.onerror = function(e) {
reject(e);
};
reader.readAsArrayBuffer(fileRe... | export async function genArrayBufferFromFileReference(fileReference) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.onload = function(e) {
resolve(e.target.result);
};
reader.onerror = function(e) {
reject(e);
};
reader.readAsArrayBuffer(fileRe... | Allow multiple files to be loaded via eject | Allow multiple files to be loaded via eject
| JavaScript | mit | captbaritone/winamp2-js,captbaritone/winamp2-js,captbaritone/winamp2-js |
6ed9ff28b456d033fafd5c9defa31486a2e84c09 | scripts/buildexamples.js | scripts/buildexamples.js | var childProcess = require('child_process');
var fs = require('fs');
process.chdir('examples');
childProcess.execSync('npm install', { stdio: 'inherit' });
childProcess.execSync('npm run update', { stdio: 'inherit' });
process.chdir('..');
// Build all of the example folders.
dirs = fs.readdirSync('examples');
var c... | var childProcess = require('child_process');
var fs = require('fs');
process.chdir('examples');
childProcess.execSync('npm install', { stdio: 'inherit' });
childProcess.execSync('npm run update', { stdio: 'inherit' });
process.chdir('..');
// Build all of the example folders.
dirs = fs.readdirSync('examples');
var c... | Make examples build more verbose | Make examples build more verbose
| JavaScript | bsd-3-clause | jupyter/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,TypeFox/jupyterlab,TypeFox/jupyterlab,eskirk/jupyterlab,TypeFox/jupyterlab,TypeFox/jupyterlab,eskirk/jupyterlab,TypeFox/jupyterlab,eskirk/jupyterlab... |
baf3f40889a2d00ce0dec7fa98e0d9b2b170ed68 | src/tizen/AccelerometerProxy.js | src/tizen/AccelerometerProxy.js | (function(win) {
var cordova = require('cordova'),
Acceleration = require('org.apache.cordova.device-motion.Acceleration'),
accelerometerCallback = null;
module.exports = {
start: function (successCallback, errorCallback) {
if (accelerometerCallback) {
win.re... | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); y... | Add license headers to Tizen code | CB-6465: Add license headers to Tizen code
| JavaScript | apache-2.0 | purplecabbage/cordova-plugin-device-motion,corimf/cordova-plugin-device-motion,jomo0825/cordova-plugin-device-motion,jomo0825/cordova-plugin-device-motion,purplecabbage/cordova-plugin-device-motion,blackberry-webworks/cordova-plugin-device-motion,apache/cordova-plugin-device-motion,jomo0825/cordova-plugin-device-motion... |
62aac5749c19a11f797d38ee99cbfba2f6714d46 | test/spec/pointcloud/pointcloud.service.spec.js | test/spec/pointcloud/pointcloud.service.spec.js | 'use strict';
describe('pointcloud.service', function() {
// load the module
beforeEach(module('pattyApp.pointcloud'));
var PointcloudService;
var Potree;
beforeEach(function() {
inject(function(_PointcloudService_, _Potree_) {
PointcloudService = _PointcloudService_;
Potree = _Potree_;
... | 'use strict';
describe('pointcloud.service', function() {
// load the module
beforeEach(module('pattyApp.pointcloud'));
var PointcloudService;
var Potree;
beforeEach(function() {
inject(function(_PointcloudService_, _Potree_) {
PointcloudService = _PointcloudService_;
Potree = _Potree_;
... | Fix test, showStats was not added to test yet. | Fix test, showStats was not added to test yet.
| JavaScript | apache-2.0 | NLeSC/PattyVis,NLeSC/PattyVis |
ab46c8e8ac688107a1a7c52a836ac774a10ebb90 | examples/add-to-basket/index.js | examples/add-to-basket/index.js | const basketItemViews = {
remove: function remove(el) {
el.addEventListener("click", function() {
el.parentNode.remove();
});
},
addToBasket: function addToBasket(el, props) {
el.addEventListener("click", function() {
fetch(props.file)
.then(res => res.text())
.then(data =... | const basketItemViews = {
remove: function remove(el) {
el.addEventListener("click", function() {
el.parentNode.remove();
});
},
addToBasket: function addToBasket(el, props) {
const container = document.querySelector(`.${props.target}`);
el.addEventListener("click", function() {
fetc... | Change selector to outside onclik event | Change selector to outside onclik event
| JavaScript | mit | icelab/viewloader |
af3d1a81abc124affe3e4f5eabefe6946c635b42 | addon/initializers/add-modals-container.js | addon/initializers/add-modals-container.js | /*globals document */
let hasDOM = typeof document !== 'undefined';
function appendContainerElement(rootElementId, id) {
if (!hasDOM) {
return;
}
if (document.getElementById(id)) {
return;
}
let rootEl = document.querySelector(rootElementId);
let modalContainerEl = document.createElement('div');
... | /*globals document */
let hasDOM = typeof document !== 'undefined';
function appendContainerElement(rootElementOrId, id) {
if (!hasDOM) {
return;
}
if (document.getElementById(id)) {
return;
}
let rootEl = rootElementOrId.appendChild ? rootElementOrId : document.querySelector(rootElementOrId);
le... | Handle when App.rootElement can be a node, rather than an id | Handle when App.rootElement can be a node, rather than an id
| JavaScript | mit | yapplabs/ember-modal-dialog,yapplabs/ember-modal-dialog |
d9ca32775708b9d3ede66e4fad902e4b2a7a3966 | example/konami_code/main.js | example/konami_code/main.js | (function () {
var codes = [
38, // up
38, // up
40, // down
40, // down
37, // left
39, // right
37, // left
39, // right
66, // b
65 // a
];
kamo.Stream.fromEventHandlerSetter(window, 'onkeyup').map(function (message) {
return message.keyCode;
}).windowWithCount(c... | (function () {
var codes = [
38, // up
38, // up
40, // down
40, // down
37, // left
39, // right
37, // left
39, // right
66, // b
65 // a
];
kamo.Stream.fromEventHandlerSetter(window, 'onkeyup').map(function (message) {
return message.keyCode;
}).windowWithCount(c... | Remove debug code left by mistake | Remove debug code left by mistake
| JavaScript | mit | r7kamura/kamo.js |
aca431a35442633f68c052764ae132a7184ca118 | app/assets/javascripts/bootstrapper.es6.js | app/assets/javascripts/bootstrapper.es6.js | /*
Bootstrap components and api on DOM Load
*/
import Relay from 'react-relay';
import {
mountComponents,
unmountComponents,
} from './utils/componentMounter';
/* global Turbolinks document */
// Get auth and csrf tokens
import Authentication from './helpers/authentication.es6';
const auth = new Authenticatio... | /*
Bootstrap components and api on DOM Load
*/
import Relay from 'react-relay';
import {
mountComponents,
unmountComponents,
} from './utils/componentMounter';
/* global Turbolinks document */
// Get auth and csrf tokens
import Authentication from './helpers/authentication.es6';
const auth = new Authenticatio... | Remove authrisation token from requests | Remove authrisation token from requests
| JavaScript | artistic-2.0 | Hireables/hireables,Hireables/hireables,gauravtiwari/hireables,Hireables/hireables,gauravtiwari/techhire,gauravtiwari/hireables,gauravtiwari/techhire,gauravtiwari/techhire,gauravtiwari/hireables |
b3ecee926842a8ffc129e9baf01e82be3b326f71 | angular-katex.js | angular-katex.js | /*!
* angular-katex v0.2.1
* https://github.com/tfoxy/angular-katex
*
* Copyright 2015 Tomás Fox
* Released under the MIT license
*/
(function() {
'use strict';
angular.module('katex', [])
.provider('katexConfig', function() {
var self = this;
self.errorTemplate = function(err) {
... | /*!
* angular-katex v0.2.1
* https://github.com/tfoxy/angular-katex
*
* Copyright 2015 Tomás Fox
* Released under the MIT license
*/
(function() {
'use strict';
angular.module('katex', [])
.constant('katex', katex)
.provider('katexConfig', ['katex', function(katex) {
var self = this;
... | Add katex as an angular constant | Add katex as an angular constant
| JavaScript | mit | tfoxy/angular-katex |
7c4f727f9f3f52ab2a6491740e5e8ddbc3b67aa4 | public/app/scripts/app.js | public/app/scripts/app.js | 'use strict';
angular.module('publicApp', [
'ngCookies',
'ngResource',
'ngSanitize',
'ngRoute'
])
.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
})
.when('/users', {
templateUrl: 'views/users.html',... | 'use strict';
angular.module('publicApp', [
'ngCookies',
'ngResource',
'ngSanitize',
'ngRoute'
])
.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
})
.when('/users/:id', {
templateUrl: 'views/user.htm... | Add routes for login, registration and user admin | [FEATURE] Add routes for login, registration and user admin
| JavaScript | isc | Parkjeahwan/awegeeks,xdv/gatewayd,zealord/gatewayd,zealord/gatewayd,crazyquark/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd |
ad7e5373322aa618b2e7374a8699c054b84b2d64 | packages/ember-views/tests/compat/attrs_proxy_test.js | packages/ember-views/tests/compat/attrs_proxy_test.js | import View from "ember-views/views/view";
import { runAppend, runDestroy } from "ember-runtime/tests/utils";
import compile from "ember-template-compiler/system/compile";
import Registry from "container/registry";
var view, registry, container;
QUnit.module("ember-views: attrs-proxy", {
setup() {
registry = ne... | import View from "ember-views/views/view";
import { runAppend, runDestroy } from "ember-runtime/tests/utils";
import compile from "ember-template-compiler/system/compile";
import Registry from "container/registry";
var view, registry, container;
QUnit.module("ember-views: attrs-proxy", {
setup() {
registry = ne... | Fix typo in compat mode attrs test. | Fix typo in compat mode attrs test.
| JavaScript | mit | mfeckie/ember.js,lan0/ember.js,olivierchatry/ember.js,tofanelli/ember.js,miguelcobain/ember.js,mdehoog/ember.js,mitchlloyd/ember.js,Krasnyanskiy/ember.js,femi-saliu/ember.js,nicklv/ember.js,pangratz/ember.js,delftswa2016/ember.js,xtian/ember.js,topaxi/ember.js,cdl/ember.js,vikram7/ember.js,tricknotes/ember.js,selvagsz/... |
c77f36aa39fa95208dd25f9db39abee804aa2c90 | config/index.js | config/index.js | 'use strict';
let config = {};
config.port = 3000;
config.apiKey = process.env.LFM_API_KEY;
config.apiSecret = process.env.LFM_SECRET;
module.exports = config;
| 'use strict';
let config = {};
config.port = 3000;
config.api_key = process.env.LFM_API_KEY;
config.apiSecret = process.env.LFM_SECRET;
config.sk = process.env.LFM_SESSION_KEY;
module.exports = config;
| Add session key to config and update api key | Add session key to config and update api key
| JavaScript | mit | FTLam11/Audio-Station-Scrobbler,FTLam11/Audio-Station-Scrobbler |
9aadb6e0383e7615b66da3fc1cce659c5a475c86 | vendor/assets/javascripts/vendor_application.js | vendor/assets/javascripts/vendor_application.js | //= require jquery
//= require jquery_ujs
//= require turbolinks
//= require foundation
//= require ace/ace
//= require ace/mode-ruby
//= require ace/mode-golang
//= require ace/mode-python
//= require ace/mode-c_cpp
//= require ace/mode-csharp
//= require ace/mode-php
//= require ace/theme-tomorrow_night
//= require... | //= require jquery
//= require jquery_ujs
//= require turbolinks
//= require foundation
//= require ace/ace
//= require ace/mode-ruby
//= require ace/mode-golang
//= require ace/mode-python
//= require ace/mode-c_cpp
//= require ace/mode-csharp
//= require ace/mode-php
//= require ace/worker-php
//= require ace/them... | Revert "Revert "add missing worker-php for ace editor"" | Revert "Revert "add missing worker-php for ace editor""
| JavaScript | mit | tamzi/grounds.io,foliea/grounds.io,grounds/grounds.io,tamzi/grounds.io,grounds/grounds.io,foliea/grounds.io,tamzi/grounds.io,grounds/grounds.io,grounds/grounds.io,foliea/grounds.io,tamzi/grounds.io,foliea/grounds.io |
a6f2abe06879273c426ff7c1cf1f4a4e3365e6ed | app/js/app/services.js | app/js/app/services.js | 'use strict';
define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() {
/* Services */
angular.module('scooter.services', [])
.constant('Repo', {
owner: "ucam-cl-dtg",
... | 'use strict';
define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() {
/* Services */
angular.module('scooter.services', [])
.constant('Repo', {
owner: "isaacphysics",... | Migrate content repo to @isaacphysics | Migrate content repo to @isaacphysics
| JavaScript | mit | ucam-cl-dtg/scooter,ucam-cl-dtg/scooter |
10dce7b80924d70fde48129873be5e63808e30f4 | js/backends/graphics/graphics.js | js/backends/graphics/graphics.js | document.write("<canvas>")
var Graphics = new Processing(document.querySelector('canvas')); | document.write("<canvas>")
var Graphics = new Processing(document.querySelector('canvas'));
Graphics.keyPressed = function() {
World.query("keyboard").forEach(function(e) {
e.key = Graphics.keyCode;
});
}
Graphics.keyReleased = function() {
World.query("keyboard").forEach(function(e) {
delete e.key;
}... | Add key* functions to Graphics backend | Add key* functions to Graphics backend
| JavaScript | mit | sangohan/twelve,nasser/twelve,nasser/twelve,sangohan/twelve |
9bec7b6e05e2b0cdc856959d3358f5cfd3703a7d | public/js/worker.js | public/js/worker.js | importScripts('/js/sha256.js');
onmessage = function(e) {
console.log('received work!');
var date = (new Date()).yyyymmdd();
var bits = 0;
var rand = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);
var name = e.data[0];
var difficulty = e.data[1];
for (var counter = 0; bits < difficul... | importScripts('/js/sha256.js');
onmessage = function(e) {
console.log('received work!');
var date = (new Date()).yyyymmdd();
var bits = 0;
var rand = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);
var name = e.data[0];
var difficulty = e.data[1];
for (var counter = 0; bits < difficul... | Add comments for cash input. | Add comments for cash input.
| JavaScript | mit | martindale/converse,martindale/converse,willricketts/converse,willricketts/converse |
14db2d58cd866166e047e4c50c12bd88e5f64cd3 | push-rich/server.js | push-rich/server.js | // Use the web-push library to hide the implementation details of the communication
// between the application server and the push service.
// For details, see https://tools.ietf.org/html/draft-ietf-webpush-protocol and
// https://tools.ietf.org/html/draft-ietf-webpush-encryption.
var webPush = require('web-push');
we... | // Use the web-push library to hide the implementation details of the communication
// between the application server and the push service.
// For details, see https://tools.ietf.org/html/draft-ietf-webpush-protocol and
// https://tools.ietf.org/html/draft-ietf-webpush-encryption.
var webPush = require('web-push');
we... | Allow startup without setting GCM API key | Allow startup without setting GCM API key
| JavaScript | mit | mozilla/serviceworker-cookbook,mozilla/serviceworker-cookbook |
41991574f6105df69ac940cc6aa27885ec76d503 | js/dictionary.js | js/dictionary.js | var Dictionary = function() {
var jsonURL = './json/dictionary.json';
this._wordList = (function() {
var json = null;
$.ajax({
'async': false,
'global': false,
'url': jsonURL,
'dataType': 'json',
'success': function( data ) {
json = data;
}
});
return jso... | var Dictionary = function() {
var jsonURL = './json/dictionary.json';
this._wordList = (function() {
var json = null;
$.ajax({
'async': false,
'global': false,
'url': jsonURL,
'dataType': 'json',
'success': function( data ) {
json = data;
}
});
return jso... | Fix word search returning the index instead of whether the word exists. | Fix word search returning the index instead of whether the word exists.
| JavaScript | mit | razh/spellquest |
4862fbed37854b9be0fe9271a04d786786c9eca7 | collections.js | collections.js | // CHANGE the current collection
var changeCollection=function(new_index){
dbIndex = new_index;
imageDB = DATABASE[dbIndex];
$("#collectionFooter").text(collections[dbIndex]);
localStorage.setItem("last_visited_index",dbIndex); // saves the state AKA the last collection you had open
if(imageDB==null){
ima... | // CHANGE the current collection
var changeCollection=function(new_index){
dbIndex = new_index;
imageDB = DATABASE[dbIndex];
$("#collectionFooter").text(collections[dbIndex]);
document.title = collections[dbIndex];
localStorage.setItem("last_visited_index",dbIndex); // saves the state AKA the last collection... | Change window title based on current collection | Change window title based on current collection
| JavaScript | cc0-1.0 | johnprattchristian/imagecollection,johnprattchristian/imagecollection |
1e26d91c9706abb49ee0d5b5224b30ce8ce629b8 | test/helpers/mock-htmlmerger.js | test/helpers/mock-htmlmerger.js | (function () {
var server = sinon.fakeServer.create();
server.xhr.useFilters = true;
server.xhr.addFilter(function (method, url) {
//whenever the this returns true the request will not faked
return !url.match(/starcounter\//);
});
server.respondWith('GET', /htmlmerger/, [200, {"Conte... | (function () {
var server = sinon.fakeServer.create();
server.xhr.useFilters = true;
server.xhr.addFilter(function (method, url) {
//whenever the this returns true the request will not faked
return !url.match(/sc\//);
});
server.respondWith('GET', /htmlmerger/, [200, {"Content-Type":... | Update mock server path in test helper for FF and IE | Update mock server path in test helper for FF and IE
| JavaScript | mit | Starcounter/starcounter-include,Starcounter/starcounter-include |
598b062784f68a1fe3c07dfdfeeba89abdc3e148 | src/components/Markup.js | src/components/Markup.js | import React, { Component } from 'react';
import Registry from '../utils/Registry';
export default class Markup extends Component {
render() {
return (
<div dangerouslySetInnerHTML={ {__html: this.props.data}}></div>
)
}
}
Registry.set('Markup', Markup);
| import React, { Component } from 'react';
import Registry from '../utils/Registry';
import { isArray } from 'lodash';
export default class Markup extends Component {
getContent() {
if (this.props.data && isArray(this.props.data) && this.props.data.length > 0) {
return this.props.data[0];
};
if (th... | Add getContent method to markup component | Add getContent method to markup component
| JavaScript | mit | NuCivic/react-dash,NuCivic/react-dashboard,NuCivic/react-dash,NuCivic/react-dash,NuCivic/react-dashboard,NuCivic/react-dashboard |
63afc625a808e66ac2bc1159557fc1547628a23a | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Add the grunt-mocha-test tasks.
[
'grunt-mocha-test',
'grunt-contrib-watch'
]
.forEach( grunt.loadNpmTasks );
grunt.initConfig({
// Configure a mochaTest task
mochaTest: {
test: {
options: {
... | module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Add the grunt-mocha-test tasks.
[
'grunt-mocha-test',
'grunt-contrib-watch'
]
.forEach( grunt.loadNpmTasks );
grunt.initConfig({
// Configure a mochaTest task
mochaTest: {
test: {
options: {
... | Break watch task into separate task | Break watch task into separate task
| JavaScript | mit | BrianSilvia/http-fs-node,BrianSilvia/http-fs-node |
fdcd6a46e85cee80cda021b8dad199101b3d888d | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy: {
jquery: {
expand: true,
flatten: true,
src: 'bower_components/jquery/dist/jquery.min.js',
dest: 'dist/share/git-webui/w... | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy: {
jquery: {
expand: true,
flatten: true,
src: 'bower_components/jquery/dist/jquery.min.js',
dest: 'dist/share/git-webui/w... | Copy file permissions for all files | Copy file permissions for all files
| JavaScript | apache-2.0 | PeterDaveHello/git-webui,peter-genesys/git-webui,alberthier/git-webui,desyncr/git-webui,epicagency/git-webui,desyncr/git-webui,epicagency/git-webui,Big-Shark/git-webui,Big-Shark/git-webui,PeterDaveHello/git-webui,PeterDaveHello/git-webui,desyncr/git-webui,alberthier/git-webui,peter-genesys/git-webui,peter-genesys/git-w... |
7ca0d5b081b5eefafbca80965d5140f9cc8cef0e | Gruntfile.js | Gruntfile.js | /**
* grunt-dco
*
* Copyright (c) 2014 Rafael Xavier de Souza
* Licensed under the MIT license.
*/
"use strict";
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
"Gruntfile.js",
"tasks/**/*.js"
],
options: {
jshint... | /**
* grunt-dco
*
* Copyright (c) 2014 Rafael Xavier de Souza
* Licensed under the MIT license.
*/
"use strict";
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
"Gruntfile.js",
"tasks/**/*.js"
],
options: {
jshint... | Set target on dco grunt task configuration | Set target on dco grunt task configuration
| JavaScript | mit | rxaviers/grunt-dco |
cd931b99fdb37f549ac0362baabc2dbfaab3de3b | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Add the grunt-mocha-test tasks.
[
'grunt-mocha-test',
'grunt-contrib-watch'
]
.forEach( grunt.loadNpmTasks );
grunt.initConfig({
// Configure a mochaTest task
mochaTest: {
test: {
options: {
... | module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Add the grunt-mocha-test tasks.
[
'grunt-mocha-test',
'grunt-contrib-watch'
]
.forEach( grunt.loadNpmTasks );
grunt.initConfig({
// Configure a mochaTest task
mochaTest: {
test: {
options: {
... | Add unit tests back to default grunt task | Add unit tests back to default grunt task
| JavaScript | mit | BrianSilvia/http-fs-node,BrianSilvia/http-fs-node |
5aa65c9489168b55c1b936582609ebd3e80f9e32 | Gruntfile.js | Gruntfile.js | module.exports = function (grunt) {
var paths = require('./paths');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
paths: paths,
watch: {
src: {
files: ['... | module.exports = function (grunt) {
var paths = require('./paths');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
paths: paths,
watch: {
src: {
files: ['... | Build before every test as a way to keep builds up to date (thanks @hodgestar) | Build before every test as a way to keep builds up to date (thanks @hodgestar)
| JavaScript | bsd-3-clause | praekelt/vumi-ureport,praekelt/vumi-ureport |
8aac3f2f829792220578c31ba1df5a308327c1b0 | Gruntfile.js | Gruntfile.js | module.exports = function( grunt ) {
'use strict';
// Project configuration.
grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),
copy: {
main: {
src: [
'includes/**',
'languages/**',
'composer.json',
'CHANGELOG.md',
'LICENSE.txt',
'readme.txt',
'sticky-tax... | module.exports = function( grunt ) {
'use strict';
// Project configuration.
grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),
copy: {
main: {
src: [
'includes/**',
'lib/**',
'languages/**',
'composer.json',
'CHANGELOG.md',
'LICENSE.txt',
'readme.txt',
... | Include lib/* in the build command | Include lib/* in the build command
| JavaScript | mit | liquidweb/sticky-tax,liquidweb/sticky-tax,liquidweb/sticky-tax |
9454a3e4032193b29c498e477a165f04a082afbb | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
'use strict';
require('grunt-horde')
.create(grunt)
.demand('projName', 'sinon-doublist')
.demand('instanceName', 'sinonDoublist')
.demand('klassName', 'sinonDoublist')
.loot('node-component-grunt')
.loot('node-lib-grunt')
.loot('./config/grunt')
.... | module.exports = function(grunt) {
'use strict';
require('grunt-horde')
.create(grunt)
.demand('projName', 'sinon-doublist')
.demand('instanceName', 'sinonDoublist')
.demand('klassName', 'sinonDoublist')
.loot('node-component-grunt')
.loot('node-lib-grunt')
.loot('./config/grunt')
.... | Set home dir for TravisCI | fix(grunt-horde): Set home dir for TravisCI
| JavaScript | mit | codeactual/sinon-doublist |
63bde0dab0d5cb013e8165ed897af201e0eeb5e1 | src/client/controller/meta_controller.js | src/client/controller/meta_controller.js | export default class MetaController {
constructor(PageMetadata) {
this.meta = PageMetadata;
}
}
MetaController.$inject = ['PageMetadata']; | class MetaController {
constructor(PageMetadata) {
this.meta = PageMetadata;
}
}
MetaController.$inject = ['PageMetadata'];
export default MetaController; | Upgrade MetaController to ES6 syntax | Upgrade MetaController to ES6 syntax
| JavaScript | mit | demerzel3/desmond,demerzel3/desmond,demerzel3/desmond,demerzel3/desmond |
c9e083cc8b431390042b744d7252e64ce758b50a | apps/acalc/bg.js | apps/acalc/bg.js | /**
* @license
* Copyright 2014 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | /**
* @license
* Copyright 2014 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | Revert "ACalc: Increased minimum and starting calculator size." | Revert "ACalc: Increased minimum and starting calculator size."
This reverts commit 1747c7b05b30630358a58603da0d1878cf9b2a57.
| JavaScript | apache-2.0 | foam-framework/foam,mdittmer/foam,foam-framework/foam,jlhughes/foam,osric-the-knight/foam,jlhughes/foam,osric-the-knight/foam,jacksonic/foam,foam-framework/foam,jlhughes/foam,mdittmer/foam,jlhughes/foam,osric-the-knight/foam,foam-framework/foam,osric-the-knight/foam,jacksonic/foam,foam-framework/foam,mdittmer/foam,mdit... |
35de520dffd5a7e592b44295ae79e5abd117a630 | app/scripts/models/online-player.js | app/scripts/models/online-player.js | import AsyncPlayer from './async-player.js';
// An online player whose moves are determined by a remote human user
class OnlinePlayer extends AsyncPlayer {
constructor({ game }) {
game.session.on('receive-next-move', ({ column }) => {
game.emit('online-player:receive-next-move', { column });
});
}
... | import AsyncPlayer from './async-player.js';
// An online player whose moves are determined by a remote human user
class OnlinePlayer extends AsyncPlayer {
constructor({ game }) {
// Add a global listener here for all moves we will receive from the
// opponent (online) player during the course of the game; ... | Comment OnlinePlayer code more thoroughly | Comment OnlinePlayer code more thoroughly
| JavaScript | mit | caleb531/connect-four |
ea2d72768aa3eb8f15400ed343662918755df702 | src/document/nodes/image/ImagePackage.js | src/document/nodes/image/ImagePackage.js | import Image from 'substance/packages/image/Image'
import ImageComponent from 'substance/packages/image/ImageComponent'
import ImageMarkdownComponent from './ImageMarkdownComponent'
import ImageHTMLConverter from 'substance/packages/image/ImageHTMLConverter'
import ImageXMLConverter from 'substance/packages/image/Image... | import ImageNode from 'substance/packages/image/ImageNode'
import ImageComponent from 'substance/packages/image/ImageComponent'
import ImageMarkdownComponent from './ImageMarkdownComponent'
import ImageHTMLConverter from 'substance/packages/image/ImageHTMLConverter'
import ImageXMLConverter from 'substance/packages/ima... | Deal with Substance Image -> ImageNode | Deal with Substance Image -> ImageNode
| JavaScript | apache-2.0 | stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila |
aad192238064aa6546555b3391546ebcbc04c0df | src/discord.js | src/discord.js | const Discord = require('discord.js'),
client = new Discord.Client;
client.run = ctx => {
client.on('ready', () => {
if (client.user.bot) {
client.destroy();
} else {
ctx.gui.put(`{bold}Logged in as ${client.user.tag}{/bold}`);
ctx.gui.put('Use the join command to join a guild, dm, or cha... | const Discord = require('discord.js'),
client = new Discord.Client;
client.run = ctx => {
client.on('ready', () => {
if (client.user.bot) {
client.destroy();
} else {
ctx.gui.put(`{bold}Logged in as ${client.user.tag}{/bold}`);
ctx.gui.put('Use the join command to join a guild, dm, or cha... | Write dynamically created messages to GUI | Write dynamically created messages to GUI
| JavaScript | mit | wwwg/retrocord-light,wwwg/retrocord-light |
c9482b9e34a1b2243370d66864f38d9f35d56b79 | tests/snapshot-helpers.js | tests/snapshot-helpers.js | import React from 'react';
import ReactDOMServer from 'react-dom/server';
import jsBeautify from 'js-beautify';
import * as Settings from './settings';
/*
* Render React components to markup in order to compare to a Jest Snapshot. Enzyme render with an actual DOM is needed for components that use <Dialog /> and porta... | import React from 'react';
import ReactDOMServer from 'react-dom/server';
import jsBeautify from 'js-beautify';
import * as Settings from './settings';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
/*
* Render React components to DOM state as a String
*
* Please note, Component is the non-... | Add renderDOM to Jest snapshot helpers | Add renderDOM to Jest snapshot helpers
| JavaScript | bsd-3-clause | salesforce/design-system-react,salesforce/design-system-react,salesforce/design-system-react |
c5ba74bea4488be4a66ab8a32aa2a314fcfcf03b | src/app/utils/preload.js | src/app/utils/preload.js | define( [ "Ember" ], function( Ember ) {
var concat = [].concat;
var makeArray = Ember.makeArray;
return function preload( withError, list ) {
if ( list === undefined ) {
list = withError;
withError = false;
}
function promiseImage( src ) {
if ( !src ) {
return Promise.resolve();
}
var d... | define( [ "Ember" ], function( Ember ) {
var concat = [].concat;
var makeArray = Ember.makeArray;
return function preload( withError, list ) {
if ( list === undefined ) {
list = withError;
withError = false;
}
function promiseImage( src ) {
if ( !src ) {
return Promise.resolve();
}
var d... | Set image to null once it has finished loading | Set image to null once it has finished loading
| JavaScript | mit | streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,bastimeyer/livestreamer-twitch-gui,bastimeyer/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,bastimeyer/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui |
538a1fca657d35875ce2a679f39e6b5868627e3e | src/js/main.js | src/js/main.js | /* PSEUDO CODE FOR LOGIN MENU
1. COLLECT DATA ENTERED INTO THE <INPUT>
2. WHEN .LOGIN-SUBMIT IS 'CLICKED' `GET/users/id` TO DATABASE TO BE VERIFIED?
*/
;(function(){
angular.module('Front-Rails', [ ])
.run(function($http, $rootScope) {
$http.get('https://stackundertow.herokuapp.com/questions')
.then(functi... | /* PSEUDO CODE FOR LOGIN MENU
1. COLLECT DATA ENTERED INTO THE <INPUT>
2. WHEN .LOGIN-SUBMIT IS 'CLICKED' `GET/users/id` TO DATABASE TO BE VERIFIED?
*/
;(function(){
angular.module('Front-Rails', [ ])
.run(function($http, $rootScope) {
$http.get('https://stackundertow.herokuapp.com/questions')
.then(functi... | Remove active class when .list or aside is clicked. | Remove active class when .list or aside is clicked.
| JavaScript | mit | front-rails/GUI,front-rails/GUI |
2d7acc374a01b4342e35dd86aeabf9eee5a5b72d | lib/parse/value_parser.js | lib/parse/value_parser.js | /**
* @fileOverview
*/
define(['parse/parse',
'ecma/ast/value',
'khepri/parse/token_parser'],
function(parse,
astValue,
token){
"use strict";
// Literal
////////////////////////////////////////
var nullLiteral = parse.Parser('Null Literal',
parse.bind(token.nullLiteral, functio... | /**
* @fileOverview
*/
define(['ecma/parse/value_parser'],
function(ecma_value){
"use strict";
return ecma_value;
}); | Use value parser from parse-ecma | Use value parser from parse-ecma
| JavaScript | mit | mattbierner/khepri |
72773fb2aa29ab226a5bcb2a8ce7bf468ede0c69 | src/repositorys/interactionrepository.js | src/repositorys/interactionrepository.js | const winston = require('winston')
const authorisedRequest = require('../lib/authorisedrequest')
const config = require('../config')
function getInteraction (token, interactionId) {
return authorisedRequest(token, `${config.apiRoot}/interaction/${interactionId}/`)
}
function saveInteraction (token, interaction) {
... | const winston = require('winston')
const authorisedRequest = require('../lib/authorisedrequest')
const config = require('../config')
function getInteraction (token, interactionId) {
return authorisedRequest(token, `${config.apiRoot}/interaction/${interactionId}/`)
}
function saveInteraction (token, interaction) {
... | Fix issue causing contacts to list ALL interactions | Fix issue causing contacts to list ALL interactions
| JavaScript | mit | uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2 |
761819fa974fc7b9d1c5f7ae436b54e08546b2cf | lib/settings.js | lib/settings.js | "use strict";
var cacheManager = require("cache-manager");
module.exports = {
// cache system (see https://github.com/BryanDonovan/node-cache-manager)
Cache: cacheManager.caching({
store: "memory",
max: 5000,
ttl: 60 * 60
}),
// default request timeout values
DefaultOpenTim... | "use strict";
var cacheManager = require("cache-manager");
module.exports = {
// cache system (see https://github.com/BryanDonovan/node-cache-manager)
Cache: cacheManager.caching({
store: "memory",
max: 5000,
ttl: 60 * 60
}),
// default request timeout values
DefaultOpenTim... | Use exact default values from needle docs for clarity | Use exact default values from needle docs for clarity
| JavaScript | mit | cubehouse/themeparks |
775532063ca4c85d3217bd25d7476460fe778308 | packages/antwar/src/core/paths/parse-section-name.js | packages/antwar/src/core/paths/parse-section-name.js | const _ = require('lodash');
module.exports = function parseSectionName(sectionName, name) {
const ret = sectionName + name;
// Root exception (/)
return ret.length > 1 ? _.trimStart(ret, '/') : ret;
};
| const _ = require('lodash');
module.exports = function parseSectionName(sectionName, name = '') {
const ret = sectionName + name;
// Root exception (/)
return ret.length > 1 ? _.trimStart(ret, '/') : ret;
};
| Set default value for `parseSectionName` name | fix: Set default value for `parseSectionName` name
Otherwise this can lead to concat with `undefined` which results in
`undefined`. This needs better tests.
| JavaScript | mit | antwarjs/antwar |
347755aa2c6c280a118005dd06b13a43f5496460 | chattify.js | chattify.js | function filterF(i, el) {
var pattern = /(From|To|Subject|Cc|Date):/i;
return el.textContent.match(pattern);
}
$($("blockquote").get().reverse()).each(function(i, el) {
var contents = $(el).contents();
var matches = contents.find("*").filter(filterF).get().reverse();
while (matches.length > 0) {
matches... | function filterF(i, el) {
var pattern = /(From|To|Sent|Subject|Cc|Date):/i;
return el.textContent.match(pattern);
}
// convert From...To... blocks into one-liners
var matches = $(document).find("*").filter(filterF).get().reverse();
while (matches.length > 0) {
matches[0].remove();
matches = $(document).find("... | Move pattern matching to the top | Move pattern matching to the top
| JavaScript | mit | kubkon/email-chattifier,kubkon/email-chattifier |
6dac4d26fde402813c1ad6431d8f9f961d488454 | test/_stubs.js | test/_stubs.js | import sinon from 'sinon';
import config from '../config.default.json';
import DataStoreHolder from '../lib/data-store-holder';
export { getGithubClient } from './_github-client';
const getIssue = (content = 'lorem ipsum') => {
//TODO should use an actual issue instance instead with a no-op github client.
cons... | import sinon from 'sinon';
import config from '../config.default.json';
import DataStoreHolder from '../lib/data-store-holder';
import getGithubClient from './_github-client';
const getIssue = (content = 'lorem ipsum') => {
//TODO should use an actual issue instance instead with a no-op github client.
const la... | Revert "tests: Use exports syntax directly" | Revert "tests: Use exports syntax directly"
This reverts commit 5c2697713268ad03612e93d1c0b285a9b7f9986e.
| JavaScript | mpl-2.0 | mozillach/gh-projects-content-queue |
17ea0550201dea34b44397eec927e00f575bac5d | blueprints/app/files/tests/helpers/module-for-acceptance.js | blueprints/app/files/tests/helpers/module-for-acceptance.js | import { module } from 'qunit';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';
export default function(name, options = {}) {
module(name, {
beforeEach() {
this.application = startApp();
if (options.beforeEach) {
options.beforeEach.apply(this, ar... | import { module } from 'qunit';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';
export default function(name, options = {}) {
module(name, {
beforeEach() {
this.application = startApp();
if (options.beforeEach) {
options.beforeEach.apply(this, ar... | Call destroyApp after afterEach options | Call destroyApp after afterEach options
As discussed in #5348, destroyApp() should be
called after options.afterEach.apply(...).
| JavaScript | mit | martypenner/ember-cli,seawatts/ember-cli,eccegordo/ember-cli,acorncom/ember-cli,kanongil/ember-cli,patocallaghan/ember-cli,nathanhammond/ember-cli,thoov/ember-cli,calderas/ember-cli,johnotander/ember-cli,scalus/ember-cli,jrjohnson/ember-cli,patocallaghan/ember-cli,rtablada/ember-cli,ef4/ember-cli,johnotander/ember-cli,... |
532d59bddb0f38a3d440c1cdabd4ac92d9105b13 | modules/static/plugins/flexboxIE.js | modules/static/plugins/flexboxIE.js | /* @flow */
const alternativeValues = {
'space-around': 'distribute',
'space-between': 'justify',
'flex-start': 'start',
'flex-end': 'end'
}
const alternativeProps = {
alignContent: 'msFlexLinePack',
alignSelf: 'msFlexItemAlign',
alignItems: 'msFlexAlign',
justifyContent: 'msFlexPack',
order: 'msFlexO... | /* @flow */
const alternativeValues = {
'space-around': 'distribute',
'space-between': 'justify',
'flex-start': 'start',
'flex-end': 'end'
}
const alternativeProps = {
alignContent: 'msFlexLinePack',
alignSelf: 'msFlexItemAlign',
alignItems: 'msFlexAlign',
justifyContent: 'msFlexPack',
order: 'msFlexO... | Fix flexBasis property for IE | Fix flexBasis property for IE | JavaScript | mit | rofrischmann/inline-style-prefixer |
a815c7e9d888053d37d6d98a56c84b3836265331 | ui/commands/select_all.js | ui/commands/select_all.js | 'use strict';
var Command = require('./command');
var SelectAll = Command.extend({
static: {
name: 'selectAll'
},
execute: function() {
var ctrl = this.getController();
var surface = ctrl.getSurface();
if (surface) {
var editor = ctrl.getSurface().getEditor();
var newSelection = edi... | 'use strict';
var SurfaceCommand = require('./surface_command');
var SelectAll = SurfaceCommand.extend({
static: {
name: 'selectAll'
},
execute: function() {
var surface = this.getSurface();
if (surface) {
var newSelection = surface.selectAll(surface.getDocument(), surface.getSelection());
... | Fix broken select all command. | Fix broken select all command.
| JavaScript | mit | TypesetIO/substance,jacwright/substance,andene/substance,substance/substance,abhaga/substance,stencila/substance,substance/substance,michael/substance-1,andene/substance,michael/substance-1,TypesetIO/substance,podviaznikov/substance,abhaga/substance,podviaznikov/substance,jacwright/substance |
6fea7c2846d3977e2b6549aa3243d582b4c39c78 | Libraries/react-native/react-native-interface.js | Libraries/react-native/react-native-interface.js | /**
* Copyright (c) 2015-present, 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.
*
* @flow
*/... | /**
* Copyright (c) 2015-present, 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.
*
* @flow
*/... | Remove all the flow errors | [ReactNative] Remove all the flow errors
| JavaScript | mit | Applied-Duality/react-native,judastree/react-native,javache/react-native,corbt/react-native,charlesvinette/react-native,sghiassy/react-native,Poplava/react-native,soxunyi/react-native,cez213/react-native,hengcj/react-native,cdlewis/react-native,tarkus/react-native-appletv,peterp/react-native,BretJohnson/react-native,ed... |
0353d63465f9a393600708c19b158cdf20a817d3 | app/assets/javascripts/autocomplete_point_fields.js | app/assets/javascripts/autocomplete_point_fields.js | $(function () {
$.get("/point_types.json", function (typeList) {
$("#point_type").autocomplete({
source: typeList, delay: 0, minLength: 0, autoFocus: true
});
$("#point_type").focus(function () {
$(this).autocomplete("search", "");
});
});
$.get("/sayges", function (saygeList) {
... | $(function () {
$.get("/point_types.json", function (typeList) {
$("#point_type").autocomplete({
source: typeList, delay: 0, minLength: 0, autoFocus: true
});
$("#point_type").focus(function () {
$(this).autocomplete("search", "");
});
});
$.get("/sayges.json", function (saygeList)... | Use explicit json url on user autocomplete | Use explicit json url on user autocomplete
| JavaScript | bsd-2-clause | Sayhired/SaygePoints,Sayhired/SaygePoints |
792dc7a8405a900c8120739498fc1aaeb5113cf4 | scripts/iltalehti.user.js | scripts/iltalehti.user.js | $(function() {
// Body headings
$('h1.juttuotsikko span.otsikko:last-of-type').satanify();
// Left
$('#container_vasen p a:not(.palstakuva)').satanify(' ');
// Right
$('#container_oikea [class$=link-list] p a:not(.palstakuva)').satanify(' ');
$('#container_oikea .widget a .list-title').satanify();
//... | $(function() {
// Body headings
$('h1.juttuotsikko span.otsikko:last-of-type').each(function() {
// Some of the center title spans on Iltalehti have manual <br /> elements
// inside of them, which our satanify plugin isn't smart enough to handle
// yet. Hack around it with this for now.
var contents... | Add a quick hack for broken Iltalehti titles | Add a quick hack for broken Iltalehti titles
Needs more testing.
| JavaScript | mit | veeti/iltasaatana,veeti/iltasaatana |
316fa2ac078fdad20deeca235580387821f3b29f | src/js/FlexGrid.react.js | src/js/FlexGrid.react.js | /* @flow */
var React = require('react');
var FlexCell: any = require('./FlexCell.react');
var FlexDetail = require('./FlexDetail.react');
class FlexGrid extends React.Component{
state: {detail: string};
render: Function;
constructor(): void {
super();
this.state = {detail:''};
this... | /* @flow */
var React = require('react');
var FlexCell: any = require('./FlexCell.react');
var FlexDetail = require('./FlexDetail.react');
class FlexGrid extends React.Component{
state: {detail: string};
render: Function;
constructor(): void {
super();
this.state = {detail:''};
this... | Make it cleaner to read | Make it cleaner to read
| JavaScript | mit | thewazir/pokemon-react,thewazir/pokemon-react |
f2360e8ac9e7d0ef3c2174df60936c1451daa8d6 | lib/dice-bag.js | lib/dice-bag.js | /*
* Copyright (c) 2015 Steven Soloff
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publi... | /*
* Copyright (c) 2015 Steven Soloff
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publi... | Create closure around enclosing object instead of local variables referencing enclosing object properties. | Create closure around enclosing object instead of local variables referencing enclosing object properties.
| JavaScript | mit | ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js |
96322552efa957b565247b7121a6dcfcd3a037ab | lib/resolver.js | lib/resolver.js | var Module = require('module')
var path = require('path')
var fs = require('fs')
function exists (target, extensions) {
if (fs.existsSync(target)) {
return target
}
if (path.extname(target) === '') {
for (var i = 0; i < extensions.length; i++) {
var resolvedPath = target + extensions[i]
if (... | var Module = require('module')
var path = require('path')
var fs = require('fs')
function exists (target, extensions) {
if (fs.existsSync(target)) {
return target
}
if (path.extname(target) === '') {
for (var i = 0; i < extensions.length; i++) {
var resolvedPath = target + extensions[i]
if (... | Check if request is a built-in module | Check if request is a built-in module
| JavaScript | mit | chrisyip/requere |
be619af686fc09d843e90a246fed60fb26524197 | lib/validate.js | lib/validate.js | 'use strict';
var validate = require('validate.js');
var validateFxoObject = function(type, value, key, options) {
if(options.required) {
if(!value) {
return ' is required';
}
}
if(value && !value.valid) {
return 'is not a valid ' + type + ' input';
}
};
validate.validators.fxoDatetime = f... | 'use strict';
var validate = require('validate.js');
var validateFxoObject = function(type, value, key, options) {
if(options.required) {
if(!value) {
return ' is required';
}
}
if(value && !value.valid) {
return 'is not a valid ' + type + ' input';
}
};
validate.validators.fxoDatetime = f... | Swap key and options params to correct order in fxo validators functions. | Swap key and options params to correct order in fxo validators functions.
| JavaScript | mit | marian2js/flowxo-sdk,equus71/flowxo-sdk,flowxo/flowxo-sdk |
48ff97b172c1c186cbcdacb817f3866a10a1fd58 | angular-uploadcare.js | angular-uploadcare.js | 'use strict';
/**
* @ngdoc directive
* @name angular-uploadcare.directive:UploadCare
* @description Provides a directive for the Uploadcare widget.
* # UploadCare
*/
angular.module('ng-uploadcare', [])
.directive('uploadcareWidget', function () {
return {
restrict: 'E',
replace: true,
requ... | 'use strict';
/**
* @ngdoc directive
* @name angular-uploadcare.directive:UploadCare
* @description Provides a directive for the Uploadcare widget.
* # UploadCare
*/
angular.module('ng-uploadcare', [])
.directive('uploadcareWidget', function () {
return {
restrict: 'E',
replace: true,
requ... | Use current element for widget instead | Use current element for widget instead | JavaScript | mit | uploadcare/angular-uploadcare |
5139a033cc4083fd86416a330e3220babe377341 | cypress/integration/query_report.js | cypress/integration/query_report.js | context('Form', () => {
before(() => {
cy.login('Administrator', 'qwe');
cy.visit('/desk');
});
it('add custom column in report', () => {
cy.visit('/desk#query-report/Permitted Documents For User');
cy.get('#page-query-report input[data-fieldname="user"]').as('input');
cy.get('@input').focus().type('test... | context('Form', () => {
before(() => {
cy.login('Administrator', 'qwe');
cy.visit('/desk');
});
it('add custom column in report', () => {
cy.visit('/desk#query-report/Permitted Documents For User');
cy.get('#page-query-report input[data-fieldname="user"]').as('input');
cy.get('@input').focus().type('test... | Use force true for clicking menu | fix(test): Use force true for clicking menu
| JavaScript | mit | yashodhank/frappe,yashodhank/frappe,mhbu50/frappe,StrellaGroup/frappe,frappe/frappe,StrellaGroup/frappe,frappe/frappe,mhbu50/frappe,vjFaLk/frappe,frappe/frappe,almeidapaulopt/frappe,adityahase/frappe,adityahase/frappe,adityahase/frappe,yashodhank/frappe,mhbu50/frappe,saurabh6790/frappe,saurabh6790/frappe,almeidapaulopt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.