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 |
|---|---|---|---|---|---|---|---|---|---|
7d84aa5b1d0c2af75abf70e556470cb67b79b19a | spec/filesize-view-spec.js | spec/filesize-view-spec.js | 'use babel';
import filesizeView from '../lib/filesize-view';
describe('View', () => {
// Disable tooltip for these tests
atom.config.set('filesize.EnablePopupAppearance', false);
const workspaceView = atom.views.getView(atom.workspace);
const view = filesizeView(workspaceView);
describe('when refreshing t... | 'use babel';
import filesizeView from '../lib/filesize-view';
describe('View', () => {
const workspaceView = atom.views.getView(atom.workspace);
const view = filesizeView(workspaceView);
describe('when refreshing the view', () => {
it('should display the human readable size', () => {
workspaceView.ap... | Add config change test to the View spec | Add config change test to the View spec
| JavaScript | mit | mkautzmann/atom-filesize |
05b14b3f817f0cffb06ade8f1ff82bfff177c6bd | starting-angular/starting-angular/cards/cards_usesStaticJSON_cleanestVersion/js/directives.js | starting-angular/starting-angular/cards/cards_usesStaticJSON_cleanestVersion/js/directives.js | /*global cardApp*/
/*jslint unparam: true */
(function () {
'use strict';
// Implements custom validation for card number.
var INTEGER_REGEXP = /^([aAkKjJQq23456789]{1}|(10){1})$/;
cardApp.directive('integer', function () {
return {
require: 'ngModel',
link: function (s... | /*global cardApp*/
/*jslint unparam: true */
cardApp.directive('integer', function () {
'use strict';
// Implements custom validation for card number.
var INTEGER_REGEXP = /^([aAkKjJQq23456789]{1}|(10){1})$/;
return {
require: 'ngModel',
link: function (scope, elm, attrs, ctrl) {
... | Use the angular module pattern instead of using a closure. | Use the angular module pattern instead of using a closure.
| JavaScript | unlicense | bigfont/DevTeach2013,bigfont/DevTeach2013 |
749b9d4b89c9e34808b4d4e8ce5600703ce16464 | clientapp/views/pathway.js | clientapp/views/pathway.js | var HumanView = require('human-view');
var templates = require('../templates');
module.exports = HumanView.extend({
template: templates.pathway,
events: {
'dragstart .columns': 'drag',
'dragover .columns': 'over',
'dragenter .columns': 'enter',
'dragleave .columns': 'leave',
'drop .columns': 'd... | var HumanView = require('human-view');
var templates = require('../templates');
module.exports = HumanView.extend({
template: templates.pathway,
events: {
'dragstart .columns': 'drag',
'dragover .columns': 'over',
'dragenter .columns': 'enter',
'dragleave .columns': 'leave',
'drop .columns': 'd... | Make it work in IE10 | Make it work in IE10
| JavaScript | mpl-2.0 | mozilla/openbadges-discovery |
19a0c4401e5185b71d5ca715d54d13c31cab7559 | lib/sequence/binlog.js | lib/sequence/binlog.js | var Util = require('util');
var Packet = require('../packet');
var capture = require('../capture');
module.exports = function(options) {
var self = this; // ZongJi instance
var Sequence = capture(self.connection).Sequence;
var BinlogHeader = Packet.initBinlogHeader.call(self, options);
function Binlog(callbac... | var Util = require('util');
var Packet = require('../packet');
var capture = require('../capture');
module.exports = function(options) {
var self = this; // ZongJi instance
var Sequence = capture(self.connection).Sequence;
var BinlogHeader = Packet.initBinlogHeader.call(self, options);
function Binlog(callbac... | Add TODO to remove console.log from non-dump functions | Add TODO to remove console.log from non-dump functions
| JavaScript | mit | jmealo/zongji,jmealo/zongji |
85168befaaab2563b91345867087d51789a88dff | client/app/common/global-events/global-events.factory.js | client/app/common/global-events/global-events.factory.js | let GlobalEvents = () => {
let events = {};
return {
off: (eventHandle) => {
let index = events[eventHandle.eventName].findIndex((singleEventHandler) => {
return singleEventHandler.id !== eventHandle.handlerId;
});
events[eventHandle.eventName].splic... | let GlobalEvents = () => {
let events = {};
return {
off: (eventHandle) => {
let index = events[eventHandle.eventName].findIndex((singleEventHandler) => {
return singleEventHandler.id !== eventHandle.handlerId;
});
events[eventHandle.eventName].splic... | Fix trigger exception when no listeners specified | Fix trigger exception when no listeners specified
| JavaScript | apache-2.0 | zbicin/word-game,zbicin/word-game |
2eeb2979a6d7dc1ce5f5559f7437b90b2246c72f | src/DynamicCodeRegistry.js | src/DynamicCodeRegistry.js | /*
Keep track of
*/
import Backbone from "backbone"
import _ from "underscore"
export default class DynamicCodeRegistry {
constructor(){
_.extend(this, Backbone.Events)
this._content = {};
this._origins = {}
}
register(filename, content, origin){
this._content[filename]... | /*
Keep track of
*/
import Backbone from "backbone"
import _ from "underscore"
export default class DynamicCodeRegistry {
constructor(){
_.extend(this, Backbone.Events)
this._content = {};
this._origins = {}
}
register(filename, content, origin){
this._content[filename]... | Fix detecting if it's a dynamic files... script tags from the original html were previously incorrectly identified as dynamic files. | Fix detecting if it's a dynamic files... script tags from the original html were previously incorrectly identified as dynamic files.
| JavaScript | mit | mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS |
efd680a34c23ec2727a3033e37517e309ba29a0c | client/webcomponents/nn-annotable.js | client/webcomponents/nn-annotable.js | /* jshint camelcase:false */
Polymer('nn-annotable', {
ready: function(){
this.baseapi = this.baseapi || window.location.origin;
this.tokens = this.baseapi.split('://');
this.wsurl = this.tokens.shift() === 'https' ? 'wss' : 'ws' + '://' + this.tokens.shift();
this.domain = window.location.hostname;
... | /* jshint camelcase:false */
Polymer('nn-annotable', {
ready: function(){
this.baseapi = this.baseapi || window.location.origin;
this.tokens = this.baseapi.split('://');
this.wsurl = (this.tokens.shift() === 'https' ? 'wss' : 'ws') + '://' + this.tokens.shift();
this.domain = window.location.hostname... | Fix how to calculate ws URL from baseapi URL | Fix how to calculate ws URL from baseapi URL
| JavaScript | mit | sandropaganotti/annotate |
447241fc88b42a03b9091da7066e7e58a414e3a2 | src/geojson.js | src/geojson.js | module.exports.point = justType('Point', 'POINT');
module.exports.line = justType('LineString', 'POLYLINE');
module.exports.polygon = justType('Polygon', 'POLYGON');
function justType(type, TYPE) {
return function(gj) {
var oftype = gj.features.filter(isType(type));
return {
geometries:... | module.exports.point = justType('Point', 'POINT');
module.exports.line = justType('LineString', 'POLYLINE');
module.exports.polygon = justType('Polygon', 'POLYGON');
function justType(type, TYPE) {
return function(gj) {
var oftype = gj.features.filter(isType(type));
return {
geometries:... | Add type check for polygon and polyline arrays | fix(output): Add type check for polygon and polyline arrays
Added a type check to properly wrap polygon and polyline arrays | JavaScript | bsd-3-clause | mapbox/shp-write,mapbox/shp-write |
d62ccfd234f702b66124a673e54076dbdfe693be | lib/util/endpointParser.js | lib/util/endpointParser.js | var semver = require('semver');
var createError = require('./createError');
function decompose(endpoint) {
var regExp = /^(?:([\w\-]|(?:[\w\.\-]+[\w\-])?)\|)?([^\|#]+)(?:#(.*))?$/;
var matches = endpoint.match(regExp);
if (!matches) {
throw createError('Invalid endpoint: "' + endpoint + '"', 'EINV... | var semver = require('semver');
var createError = require('./createError');
function decompose(endpoint) {
var regExp = /^(?:([\w\-]|(?:[\w\.\-]+[\w\-])?)=)?([^\|#]+)(?:#(.*))?$/;
var matches = endpoint.match(regExp);
if (!matches) {
throw createError('Invalid endpoint: "' + endpoint + '"', 'EINVE... | Change name separator of the endpoint (can't use pipe duh). | Change name separator of the endpoint (can't use pipe duh).
| JavaScript | mit | dreamauya/bower,jisaacks/bower,Blackbaud-EricSlater/bower,DrRataplan/bower,rlugojr/bower,grigorkh/bower,omurbilgili/bower,yinhe007/bower,XCage15/bower,gronke/bower,amilaonbitlab/bower,jodytate/bower,Teino1978-Corp/bower,prometheansacrifice/bower,adriaanthomas/bower,unilynx/bower,watilde/bower,rajzshkr/bower,jvkops/bowe... |
0b7ec05717cf6c89e9cbe307bec611326c19ae43 | js/metronome.js | js/metronome.js | function Metronome(tempo, beatsPerMeasure){
this.tempo = Number(tempo);
this.beatsPerMeasure = Number(beatsPerMeasure);
this.interval = null;
}
Metronome.prototype.start = function(){
var millisecondsToWait = this.tempoToMilliseconds(this.tempo);
this.interval = window.setInterval(soundAndCounter, millisecon... | function Metronome(tempo, beatsPerMeasure){
this.tempo = Number(tempo);
this.beatsPerMeasure = Number(beatsPerMeasure);
this.interval = null;
}
Metronome.prototype.start = function(){
var millisecondsToWait = this.tempoToMilliseconds(this.tempo);
this.interval = window.setInterval(soundAndCounter, millisecon... | Add reference to counter in stop method | Add reference to counter in stop method
| JavaScript | mit | dmilburn/beatrice,dmilburn/beatrice |
ab53bc3e982b21a24fa7a0b36d43d98213ffbb7c | lib/winston-syslog-ain2.js | lib/winston-syslog-ain2.js | /*
* MIT LICENCE
*/
var util = require('util'),
winston = require('winston'),
SysLogger = require("ain2");
var ain;
var SyslogAin2 = exports.SyslogAin2 = function (options) {
winston.Transport.call(this, options);
options = options || {};
ain = new SysLogger(options);
};
util.inherits(SyslogAin2, wi... | /*
* MIT LICENCE
*/
var util = require('util'),
winston = require('winston'),
SysLogger = require("ain2");
var SyslogAin2 = exports.SyslogAin2 = function (options) {
winston.Transport.call(this, options);
options = options || {};
this.ain = new SysLogger(options);
};
util.inherits(SyslogAin2, winston... | Fix bug that the old settings of the ain2 is got replaced | Fix bug that the old settings of the ain2 is got replaced
| JavaScript | mit | lamtha/winston-syslog-ain2 |
ec7c6848b01a3e6288b3d5326ca9df677052f7da | lib/action.js | lib/action.js | var _ = require('lodash-node');
var Action = function(name, two, three, four) {
var options, run, helpers;
// Syntax .extend('action#method', function() { ... }, {})
if ( typeof two == 'function' ) {
options = {};
run = two;
helpers = three;
}
// Syntax .extend('action#method', {}, function() {... | var _ = require('lodash-node');
var Action = function(name, two, three, four) {
var options, run, helpers;
// Syntax .extend('action#method', function() { ... }, {})
if ( typeof two == 'function' ) {
options = {};
run = two;
helpers = three;
}
// Syntax .extend('action#method', {}, function() {... | Add connection parameter and change req to request | Add connection parameter and change req to request
| JavaScript | mit | alexparker/actionpack |
cd0341613c11d07d2c9990adb12635f4e7809dfc | list/source/package.js | list/source/package.js | enyo.depends(
"Selection.js",
"FlyweightRepeater.js",
"List.css",
"List.js",
"PulldownList.css",
"PulldownList.js"
); | enyo.depends(
"FlyweightRepeater.js",
"List.css",
"List.js",
"PulldownList.css",
"PulldownList.js"
); | Remove enyo.Selection from layout library, moved into enyo base-UI | Remove enyo.Selection from layout library, moved into enyo base-UI
| JavaScript | apache-2.0 | enyojs/layout |
465e33e170a10ad39c3948cb9bcb852bd5705f91 | src/ol/style/fillstyle.js | src/ol/style/fillstyle.js | goog.provide('ol.style.Fill');
goog.require('ol.color');
/**
* @constructor
* @param {olx.style.FillOptions} options Options.
*/
ol.style.Fill = function(options) {
/**
* @type {ol.Color|string}
*/
this.color = goog.isDef(options.color) ? options.color : null;
};
| goog.provide('ol.style.Fill');
goog.require('ol.color');
/**
* @constructor
* @param {olx.style.FillOptions=} opt_options Options.
*/
ol.style.Fill = function(opt_options) {
var options = goog.isDef(opt_options) ? opt_options : {};
/**
* @type {ol.Color|string}
*/
this.color = goog.isDef(options.co... | Make options argument to ol.style.Fill optional | Make options argument to ol.style.Fill optional
| JavaScript | bsd-2-clause | das-peter/ol3,adube/ol3,mzur/ol3,xiaoqqchen/ol3,Distem/ol3,gingerik/ol3,antonio83moura/ol3,gingerik/ol3,itayod/ol3,bjornharrtell/ol3,tsauerwein/ol3,Antreasgr/ol3,klokantech/ol3raster,pmlrsg/ol3,das-peter/ol3,landonb/ol3,t27/ol3,kkuunnddaannkk/ol3,freylis/ol3,fredj/ol3,Andrey-Pavlov/ol3,kjelderg/ol3,geonux/ol3,elemoine/... |
4f2ecb38e7eed9706dd4709915a532bdb5a943f2 | rcmet/src/main/ui/test/unit/services/RegionSelectParamsTest.js | rcmet/src/main/ui/test/unit/services/RegionSelectParamsTest.js | /*
* 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"); you ... | /*
* 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"); you ... | Resolve CLIMATE-147 - Add tests for regionSelectParams service | Resolve CLIMATE-147 - Add tests for regionSelectParams service
- Add getParameters test.
git-svn-id: https://svn.apache.org/repos/asf/incubator/climate/trunk@1496037 13f79535-47bb-0310-9956-ffa450edef68
Former-commit-id: 3d2be98562f344323a5532ca5757850d175ba25c | JavaScript | apache-2.0 | jarifibrahim/climate,apache/climate,Omkar20895/climate,huikyole/climate,MJJoyce/climate,lewismc/climate,MJJoyce/climate,jarifibrahim/climate,kwhitehall/climate,pwcberry/climate,riverma/climate,MJJoyce/climate,agoodm/climate,riverma/climate,agoodm/climate,MBoustani/climate,MBoustani/climate,riverma/climate,lewismc/clima... |
9750b5683e1a545a66251e78e07ef6b362a8b6d8 | browser/main.js | browser/main.js | const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const Menu = electron.Menu;
var menu = require('./menu');
var argv = require('optimist').argv;
let mainWindow;
app.on('ready', function() {
mainWindow = new BrowserWindow({
center: true,
... | const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const Menu = electron.Menu;
var menu = require('./menu');
var argv = require('optimist').argv;
let mainWindow;
app.on('ready', function() {
mainWindow = new BrowserWindow({
center: true,
... | Add icon that works for linux apps also | Add icon that works for linux apps also
| JavaScript | lgpl-2.1 | GMOD/jbrowse,GMOD/jbrowse,GMOD/jbrowse,nathandunn/jbrowse,nathandunn/jbrowse,nathandunn/jbrowse,GMOD/jbrowse,GMOD/jbrowse,nathandunn/jbrowse,nathandunn/jbrowse |
f5d144abff50c9044cbfeeec16c8169a361aec1c | packages/@sanity/server/src/configs/postcssPlugins.js | packages/@sanity/server/src/configs/postcssPlugins.js | import lost from 'lost'
import postcssUrl from 'postcss-url'
import postcssImport from 'postcss-import'
import postcssCssnext from 'postcss-cssnext'
import resolveStyleImport from '../util/resolveStyleImport'
export default options => {
const styleResolver = resolveStyleImport({from: options.basePath})
const impor... | import path from 'path'
import lost from 'lost'
import postcssUrl from 'postcss-url'
import postcssImport from 'postcss-import'
import postcssCssnext from 'postcss-cssnext'
import resolveStyleImport from '../util/resolveStyleImport'
const absolute = /^(\/|\w+:\/\/)/
const isAbsolute = url => absolute.test(url)
export... | Use custom way to resolve URLs for file assets that are relative | [server] Use custom way to resolve URLs for file assets that are relative
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity |
f0d73e072691c7ae4ee848c7ef0868aebd6c8ce4 | components/prism-docker.js | components/prism-docker.js | Prism.languages.docker = {
'keyword': {
pattern: /(^\s*)(?:ONBUILD|FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|COPY|VOLUME|USER|WORKDIR|CMD|LABEL|ENTRYPOINT)(?=\s)/mi,
lookbehind: true
},
'string': /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*?\1/,
'comment': /#.*/,
'punctuation': /---|\.\.\.|[:[\]{}\-,|>?]/
};
Prism.l... | Prism.languages.docker = {
'keyword': {
pattern: /(^\s*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)/mi,
lookbehind: true
},
'string': /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*?\1/,
'comment': /#.*/,
'punctuation': /---|\... | Update the list of keywords for dockerfiles | Update the list of keywords for dockerfiles
| JavaScript | mit | PrismJS/prism,mAAdhaTTah/prism,PrismJS/prism,CupOfTea696/prism,mAAdhaTTah/prism,PrismJS/prism,byverdu/prism,PrismJS/prism,byverdu/prism,CupOfTea696/prism,mAAdhaTTah/prism,mAAdhaTTah/prism,mAAdhaTTah/prism,PrismJS/prism,CupOfTea696/prism,byverdu/prism,byverdu/prism,CupOfTea696/prism,CupOfTea696/prism,byverdu/prism |
c6db2d07bbda721d18ebce6c3526ec393b61e5b2 | src/ol/geom.js | src/ol/geom.js | /**
* @module ol/geom
*/
export {default as Circle} from './geom/Circle.js';
export {default as Geometry} from './geom/Geometry.js';
export {default as GeometryCollection} from './geom/GeometryCollection';
export {default as LineString} from './geom/LineString.js';
export {default as MultiLineString} from './geom/Mu... | /**
* @module ol/geom
*/
export {default as Circle} from './geom/Circle.js';
export {default as Geometry} from './geom/Geometry.js';
export {default as GeometryCollection} from './geom/GeometryCollection.js';
export {default as LineString} from './geom/LineString.js';
export {default as MultiLineString} from './geom... | Use .js extension for import | Use .js extension for import
Co-Authored-By: ahocevar <02d02e811da4fb4f389e866b67c0fe930c3e5051@gmail.com> | JavaScript | bsd-2-clause | adube/ol3,tschaub/ol3,stweil/openlayers,bjornharrtell/ol3,tschaub/ol3,tschaub/ol3,openlayers/openlayers,stweil/openlayers,stweil/ol3,bjornharrtell/ol3,geekdenz/openlayers,geekdenz/openlayers,geekdenz/ol3,oterral/ol3,oterral/ol3,ahocevar/ol3,geekdenz/ol3,ahocevar/openlayers,geekdenz/ol3,adube/ol3,geekdenz/ol3,bjornharrt... |
030b97c50a57e1487b8459f91ee4a220810a8a63 | babel.config.js | babel.config.js | require("@babel/register")({
only: [
"src",
/node_modules\/alekhine/
]
})
module.exports = {
presets: [
"@babel/preset-env"
],
plugins: [
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-object-rest-spread",
"add-filehash", [
"transform-imports",
{
vueti... | module.exports = {
presets: [
"@babel/preset-env"
],
plugins: [
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-object-rest-spread",
"add-filehash", [
"transform-imports",
{
vuetify: {
transform: "vuetify/src/components/${member}",
preventFullImp... | Revert "compile alekhine as needed in development" | Revert "compile alekhine as needed in development"
This reverts commit 917d5d50fd6ef0bbf845efa0bf13a2adba2fe58a.
| JavaScript | mit | sonnym/bughouse,sonnym/bughouse |
27982b6392b8dcd2adc22fb0db7eb0aecab0f62a | test/algorithms/sorting/testHeapSort.js | test/algorithms/sorting/testHeapSort.js | /* eslint-env mocha */
const HeapSort = require('../../../src').algorithms.Sorting.HeapSort;
const assert = require('assert');
describe('HeapSort', () => {
it('should have no data when empty initialization', () => {
const inst = new HeapSort();
assert.equal(inst.size, 0);
assert.deepEqual(inst.unsortedLi... | /* eslint-env mocha */
const HeapSort = require('../../../src').algorithms.Sorting.HeapSort;
const assert = require('assert');
describe('HeapSort', () => {
it('should have no data when empty initialization', () => {
const inst = new HeapSort();
assert.equal(inst.size, 0);
assert.deepEqual(inst.unsortedLi... | Test Heap Sort: Sort array with equal vals | Test Heap Sort: Sort array with equal vals
| JavaScript | mit | ManrajGrover/algorithms-js |
6a408d16822f596bedeb524912471845ced74048 | ckanext/ckanext-apicatalog_ui/ckanext/apicatalog_ui/fanstatic/cookieconsent/ckan-cookieconsent.js | ckanext/ckanext-apicatalog_ui/ckanext/apicatalog_ui/fanstatic/cookieconsent/ckan-cookieconsent.js | window.cookieconsent.initialise({
container: document.getElementById("cookie_consent"),
position: "top",
type: "opt-in",
static: false,
theme: "suomifi",
onInitialise: function (status){
let type = this.options.type;
let didConsent = this.hasConsented();
if (type === 'opt... | ckan.module('cookie_consent', function (jQuery){
return {
initialize: function() {
window.cookieconsent.initialise({
container: document.getElementById("cookie_consent"),
position: "top",
type: "opt-in",
static: false,
... | Add translations to cookie popup | LIKA-244: Add translations to cookie popup
| JavaScript | mit | vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog |
771e7c0d485a6a0e45d550d555beb500e256ebde | react/react-practice/src/actions/lifeCycleActions.js | react/react-practice/src/actions/lifeCycleActions.js | import {firebaseApp,firebaseAuth,firebaseDb, firebaseStorage, firebaseAuthInstance } from '../components/Firebase.js'
import { browserHistory } from 'react-router';
export function goToNextState() {
return function(dispatch) {
dispatch({type: "GET_SCHEDULE"})
}
}
export function testPromise() {
let response = ne... | import {firebaseApp,firebaseAuth,firebaseDb, firebaseStorage, firebaseAuthInstance } from '../components/Firebase.js'
import { browserHistory } from 'react-router';
export function goToNextState() {
return function(dispatch) {
dispatch({type: "GET_SCHEDULE"})
}
}
export function testPromise() {
let response = ne... | Test promise in the actions | Test promise in the actions | JavaScript | mit | jeremykid/FunAlgorithm,jeremykid/FunAlgorithm,jeremykid/FunAlgorithm,jeremykid/FunAlgorithm |
b9ed588780e616228d133b91117b80930d658140 | src/components/PlaybackCtrl/PlaybackCtrlContainer.js | src/components/PlaybackCtrl/PlaybackCtrlContainer.js | import { connect } from 'react-redux'
import PlaybackCtrl from './PlaybackCtrl'
import { requestPlay, requestPause, requestVolume, requestPlayNext } from 'store/modules/status'
// Object of action creators (can also be function that returns object).
const mapActionCreators = {
requestPlay,
requestPlayNext,
requ... | import { connect } from 'react-redux'
import PlaybackCtrl from './PlaybackCtrl'
import { requestPlay, requestPause, requestVolume, requestPlayNext } from 'store/modules/status'
// Object of action creators (can also be function that returns object).
const mapActionCreators = {
requestPlay,
requestPlayNext,
requ... | Add missing status prop for PlaybackCtrl | Add missing status prop for PlaybackCtrl
| JavaScript | isc | bhj/karaoke-forever,bhj/karaoke-forever |
66b91190f513893efbe7eef9beba1925e32a44d5 | lib/build-navigation/index.js | lib/build-navigation/index.js | 'use strict';
const path = require('path');
const buildNavigation = function(styleguideArray) {
let options = this;
options.navigation = {};
styleguideArray.forEach((obj) => {
let fileName = (obj.writeName || obj.title).replace(/ /g, '_').toLowerCase() + '.html';
options.navigation[obj.title] = fileN... | 'use strict';
const buildNavigation = function(styleguideArray) {
let options = this,
_nav = {};
options.navigation = {};
styleguideArray.forEach((obj) => {
let fileName = (obj.writeName || obj.title).replace(/ /g, '_').toLowerCase() + '.html';
_nav[obj.title] = fileName;
});
Object.keys(_nav... | Update navigation to be in alphabetical order | Update navigation to be in alphabetical order
| JavaScript | mit | tbremer/live-guide,tbremer/live-guide |
de7a0b64dcd24892e0333f9e77f56ca6117cae5a | cli/main.js | cli/main.js | #!/usr/bin/env node
'use strict'
process.title = 'ucompiler'
require('debug').enable('UCompiler:*')
const UCompiler = require('..')
const knownCommands = ['go', 'watch']
const parameters = process.argv.slice(2)
if (!parameters.length || knownCommands.indexOf(parameters[0]) === -1) {
console.log('Usage: ucompiler go... | #!/usr/bin/env node
'use strict'
process.title = 'ucompiler'
require('debug').enable('UCompiler:*')
var UCompiler = require('..')
var knownCommands = ['go', 'watch']
var parameters = process.argv.slice(2)
if (!parameters.length || knownCommands.indexOf(parameters[0]) === -1) {
console.log('Usage: ucompiler go|watch... | Use art instead of const in cli file | :art: Use art instead of const in cli file
| JavaScript | mit | steelbrain/UCompiler |
ac0c31a94428c1180ef7b309c79410bfc28ccdf0 | config.js | config.js | var env = process.env.NODE_ENV || 'development';
var defaults = {
"static": {
port: 3003
},
"socket": {
options: {
origins: '*:*',
log: true,
heartbeats: false,
authorization: false,
transports: [
'websocket',
'flashsocket',
'htmlfile',
'xhr-p... | var env = process.env.NODE_ENV || 'development';
var defaults = {
"static": {
port: 3003
},
"socket": {
options: {
origins: '*:*',
log: true,
heartbeats: false,
authorization: false,
transports: [
'websocket',
'flashsocket',
'htmlfile',
'xhr-p... | Remove prod/staging ports so people don't get the idea to run this on these environments | Remove prod/staging ports so people don't get the idea to run this on these environments
| JavaScript | mit | maritz/nohm-admin,maritz/nohm-admin |
fb0993fb10b597884fb37f819743bce9d63accb0 | src/main/webapp/resources/js/apis/galaxy/galaxy.js | src/main/webapp/resources/js/apis/galaxy/galaxy.js | import axios from "axios";
export const getGalaxyClientAuthentication = clientId =>
axios
.get(
`${window.TL.BASE_URL}ajax/galaxy-export/authorized?clientId=${clientId}`
)
.then(({ data }) => data);
export const getGalaxySamples = () =>
axios
.get(`${window.TL.BASE_URL}ajax/galaxy-export/sam... | import axios from "axios";
export const getGalaxyClientAuthentication = clientId =>
axios
.get(
`${window.TL.BASE_URL}ajax/galaxy-export/authorized?clientId=${clientId}`
)
.then(({ data }) => data);
export const getGalaxySamples = () =>
axios
.get(`${window.TL.BASE_URL}ajax/galaxy-export/sam... | Update library name to be a timestamp | Update library name to be a timestamp
Signed-off-by: Josh Adam <8493dc4643ddc08e2ef6b4cf76c12d4ffb7203d1@canada.ca>
| JavaScript | apache-2.0 | phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida |
6c8ce552cf95452c35a9e5d4a322960bfdf94572 | src/helpers/replacePath.js | src/helpers/replacePath.js | import resolveNode from "../helpers/resolveNode";
import match from "../helpers/matchRedirect";
import {relative, dirname} from "path";
export default function (t, originalPath, {opts: {root, extensions}, file: {opts: {filename}}}, regexps) {
const requiredFilename = resolveNode(dirname(filename), originalPath.node.v... | import resolveNode from "../helpers/resolveNode";
import match from "../helpers/matchRedirect";
import {relative, dirname, extname} from "path";
export default function (t, originalPath, {opts: {root, extensions}, file: {opts: {filename}}}, regexps) {
const requiredFilename = resolveNode(dirname(filename), originalPa... | Fix file extension added when redirect didn't have one | fix(replacement): Fix file extension added when redirect didn't have one
| JavaScript | mit | Velenir/babel-plugin-import-redirect |
3ba06c96a3181c46b2c52a1849bfc284f05e9596 | experiments/GitHubGistUserCreator.js | experiments/GitHubGistUserCreator.js | const bcrypt = require('bcrypt');
const GitHub = require('github-api');
const crypto = require('crypto');
const { User } = require('../models');
const { email } = require('../utils');
const GITHUB_API_TOKEN = process.env.GITHUB_TOKEN;
const GITHUB_GIST_ID = process.env.GITHUB_GIST_ID;
// Authenticate using a GitHub ... | const bcrypt = require('bcrypt');
const GitHub = require('github-api');
const crypto = require('crypto');
const { Spot, User } = require('../models');
const { email } = require('../utils');
const GITHUB_API_TOKEN = process.env.GITHUB_TOKEN;
const GITHUB_GIST_ID = process.env.GITHUB_GIST_ID;
// Authenticate using a G... | Create spot along with user | Create spot along with user
| JavaScript | mit | osumb/challenges,osumb/challenges,osumb/challenges,osumb/challenges |
b4801f092fde031842c4858dda1794863ecaf2d9 | app/assets/javascripts/replies.js | app/assets/javascripts/replies.js | jQuery(function() {
jQuery('a[href=#preview]').click(function(e) {
var form = jQuery('#new_reply');
jQuery.ajax({
url: form.attr('action'),
type: 'post',
data: {
reply: {
content: form.find('#reply_content').val()
}
},
success: function(data) {
... | jQuery(function() {
jQuery('a[href=#preview]').click(function(e) {
var form = jQuery(this).parents('form');
jQuery.ajax({
url: '/previews/new',
type: 'get',
data: {
content: form.find('textarea').val(),
},
success: function(data) {
jQuery('#preview').html(data);
... | Switch to preview rendering in seperate controller | Switch to preview rendering in seperate controller
| JavaScript | agpl-3.0 | paradime/brimir,Gitlab11/brimir,johnsmithpoten/brimir,mbchandar/brimir,himeshp/brimir,viddypiddy/brimir,git-jls/brimir,hadifarnoud/brimir,ask4prasath/brimir_clone,Gitlab11/brimir,fiedl/brimir,johnsmithpoten/brimir,viddypiddy/brimir,fiedl/brimir,Gitlab11/brimir,ask4prasath/madGeeksAimWeb,paradime/brimir,mbchandar/brimir... |
3c84d34e41b14f43b8229fadbce86312ac19f964 | ast/call.js | ast/call.js | module.exports = class Call {
constructor(callee, args) {
this.callee = callee;
this.args = args;
}
analyze(context) {
this.callee.analyze(context);
context.assertIsFunction(this.callee.referent);
this.checkNumberOfArguments(this.callee.referent);
this.checkArgumentNamesAndPositionalRules... | module.exports = class Call {
constructor(callee, args) {
this.callee = callee;
this.args = args;
}
analyze(context) {
this.callee.analyze(context);
context.assertIsFunction(this.callee.referent);
this.checkArgumentMatching(this.callee.referent);
}
checkArgumentMatching(callee) {
let... | Implement proper parameter matching rules | Implement proper parameter matching rules
| JavaScript | mit | rtoal/plainscript |
1d59470c25001556346e252ca344fa7f4d26c453 | jquery.observe_field.js | jquery.observe_field.js | // jquery.observe_field.js
(function( $ ){
jQuery.fn.observe_field = function(frequency, callback) {
frequency = frequency * 1000; // translate to milliseconds
return this.each(function(){
var $this = $(this);
var prev = $this.val();
var check = function() {
var val = $this.val... | // jquery.observe_field.js
(function( $ ){
jQuery.fn.observe_field = function(frequency, callback) {
frequency = frequency * 1000; // translate to milliseconds
return this.each(function(){
var $this = $(this);
var prev = $this.val();
var check = function() {
if(removed()){ // i... | Fix bug in IE9 when observed elements are removed from the DOM | Fix bug in IE9 when observed elements are removed from the DOM
| JavaScript | mit | splendeo/jquery.observe_field,splendeo/jquery.observe_field |
30a3ce599413db184f2ccc19ec362ea8d88f60e6 | js/component-graphic.js | js/component-graphic.js | define([], function () {
'use strict';
var ComponentGraphic = function (options) {
this.color = options.color || "#dc322f";
};
ComponentGraphic.prototype.paint = function paint(gc) {
gc.fillStyle = this.color;
gc.fillRect(0, 0, 15, 15);
};
return ComponentGraphic;
});
| define([], function () {
'use strict';
var ComponentGraphic = function (options) {
options = options || {};
this.color = options.color || "#dc322f";
};
ComponentGraphic.prototype.paint = function paint(gc) {
gc.fillStyle = this.color;
gc.fillRect(0, 0, 15, 15);
};
return ComponentGraphic;... | Set default options for graphic component | Set default options for graphic component
| JavaScript | mit | floriico/onyx,floriico/onyx |
69d2d2a7450b91b3533a18ad2c51e009dd3c58f7 | frontend/webpack.config.js | frontend/webpack.config.js | const webpack = require('webpack');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const path = require('path');
// Extract CSS into a separate file
const extractSass = new ExtractTextPlugin({
filename: "../css/main.css",
});
// Minify JavaScript
const UglifyJsPlugin = new webpack.optimize.Ugli... | const webpack = require('webpack');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const path = require('path');
// Extract CSS into a separate file
const extractSass = new ExtractTextPlugin({
filename: "../css/main.css",
});
// Minify JavaScript
const UglifyJsPlugin = new webpack.optimize.Ugli... | Fix Webpack entry module path | Fix Webpack entry module path
| JavaScript | bsd-2-clause | rub/alessiorapini.me,rub/alessiorapini.me |
1e928e64d6ea914870e2240a12bf33b8b2cf09b0 | src/openfisca-proptypes.js | src/openfisca-proptypes.js | import PropTypes from 'prop-types'
const valuesShape = PropTypes.objectOf(PropTypes.oneOfType([
PropTypes.bool,
PropTypes.number,
PropTypes.string,
]))
export const parameterShape = PropTypes.shape({
id: PropTypes.string,
description: PropTypes.string,
normalizedDescription: PropTypes.string,
values: v... | import PropTypes from 'prop-types'
const valuesShape = PropTypes.objectOf(PropTypes.oneOfType([
PropTypes.bool,
PropTypes.number,
PropTypes.string,
]))
export const parameterShape = PropTypes.shape({
id: PropTypes.string,
description: PropTypes.string,
documentation: PropTypes.string,
normalizedDescrip... | Update parameters and variables shapes | Update parameters and variables shapes
| JavaScript | agpl-3.0 | openfisca/legislation-explorer |
b24727fabb21448e8771e072f8be6ec2716e52ad | deploy/electron/Gruntfile.js | deploy/electron/Gruntfile.js | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"download-electron": {
version: "1.8.8",
outputDir: "./electron",
rebuild: true
}
});
grunt.loadNpmTasks('grunt-download... | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"download-electron": {
version: "2.0.18",
outputDir: "./electron",
rebuild: true
}
});
grunt.loadNpmTasks('grunt-downloa... | Update electron version fixing security issues | Update electron version fixing security issues
| JavaScript | mit | LightTable/LightTable,LightTable/LightTable,LightTable/LightTable |
d0d13e5feea4aa2c3d7f35be31dcbd0299f9a4d3 | client/components/App/App.js | client/components/App/App.js | // @flow
import React from 'react'
import 'normalize.css/normalize.css'
import Footer from 'components/Footer/Footer'
import Nav from '../Nav/Nav'
import MobileFooterToolbar from '../Nav/MobileFooterToolbar/MobileFooterToolbar'
import styles from './App.scss'
import '../../styles/global.scss'
import Content from 'react... | // @flow
import React from 'react'
import 'normalize.css/normalize.css'
import Footer from 'components/Footer/Footer'
import Nav from '../Nav/Nav'
import MobileFooterToolbar from '../Nav/MobileFooterNav/MobileFooterNav'
import styles from './App.scss'
import '../../styles/global.scss'
import Content from 'react-mdc-web... | Fix mobile footer toolbar import rename | Fix mobile footer toolbar import rename
| JavaScript | mit | ncrmro/reango,ncrmro/ango,ncrmro/reango,ncrmro/ango,ncrmro/ango,ncrmro/reango |
edd29b9bcb894ed1fd6511f2e748a87a14d792f3 | assets/site.js | assets/site.js | (function(){
"use strict";
var d = document, inits = [];
window.initializers = inits;
// initializer to manipulate all hyperlinks
inits.push(function(){
var x, h = location.host;
for (var xs = d.links, i = xs.length; i--; ){
var x = xs[i], m = x.getAttribute('data-m');
if (m) {
... | (function(){
"use strict";
var d = document, inits = [];
window.initializers = inits;
// initializer to manipulate all hyperlinks
inits.push(function(){
var x, h = location.host;
for (var xs = d.links, i = xs.length; i--; ){
var x = xs[i], m = x.getAttribute('data-m');
if (m) {
... | Add initializer to set active tab in page header | Add initializer to set active tab in page header | JavaScript | mit | tommy-carlier/www.tcx.be,tommy-carlier/www.tcx.be,tommy-carlier/www.tcx.be |
fd360a1315640847c249b3422790ce0bbd57d0d9 | lib/package/plugins/checkConditionTruth.js | lib/package/plugins/checkConditionTruth.js | /*
Copyright 2019 Google LLC
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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | /*
Copyright 2019 Google LLC
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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | Fix a typing mistake in 'logical absurdity' message | Fix a typing mistake in 'logical absurdity' message
| JavaScript | apache-2.0 | apigee/apigeelint,apigeecs/bundle-linter |
d1293e868ed3d7187423a56717f406e052da41a2 | config/index.js | config/index.js | import defaults from 'defaults'
const API_GLOBAL = '_IMDIKATOR'
const env = process.env.NODE_ENV || 'development'
const DEFAULTS = {
port: 3000,
reduxDevTools: false
}
const globalConfig = (typeof window !== 'undefined' && window[API_GLOBAL] || {})
export default defaults({
env,
port: process.env.PORT,
/... | import defaults from 'defaults'
const API_GLOBAL = '_IMDIKATOR'
const env = process.env.NODE_ENV || 'development'
const DEFAULTS = {
port: 3000,
reduxDevTools: false
}
const globalConfig = (typeof window !== 'undefined' && window[API_GLOBAL] || {})
export default defaults({
env,
port: process.env.PORT,
/... | FIX - changed node api to https | FIX - changed node api to https
| JavaScript | mit | bengler/imdikator,bengler/imdikator |
110e1871555cece764e2dcbfdf3ab7c14c7c164e | bin/gut-cli.js | bin/gut-cli.js | var gut = require('../');
if (process.argv.length > 2 && process.argv[2] === 'status') {
console.log("\n\tGut status: %s", gut.getStatus());
}
console.log('\nI think you meant "git"');
| #!/usr/bin/env node
var gut = require('../');
if (process.argv.length > 2 && process.argv[2] === 'status') {
console.log("\n\tGut status: %s", gut.getStatus());
}
console.log('\nI think you meant "git"');
| Add shabang to bin file | Add shabang to bin file
| JavaScript | mit | itsananderson/gut-status |
c025d9457aa000d0f23252e07ce6f2e2c3c5d971 | releaf-core/app/assets/config/releaf_core_manifest.js | releaf-core/app/assets/config/releaf_core_manifest.js | //= link_tree ../images
//= link releaf/application.css
//= link releaf/application.js
| //= link_tree ../images
//= link_tree ../javascripts/ckeditor
//= link releaf/application.css
//= link releaf/application.js
| Fix releaf ckeditor assets copying | Fix releaf ckeditor assets copying
| JavaScript | mit | cubesystems/releaf,cubesystems/releaf,cubesystems/releaf |
7a3062a02c2e676704ecad75def38d322c45a5d0 | lib/resources/console/scripts/content-editor/plaintext.js | lib/resources/console/scripts/content-editor/plaintext.js | pw.component.register('content-editor-plaintext', function (view, config) {
var self = this;
var mock = document.createElement('DIV');
mock.classList.add('console-content-plaintext-mock')
mock.style.position = 'absolute';
mock.style.top = '-100px';
mock.style.opacity = '0';
mock.style.width = view.node.c... | pw.component.register('content-editor-plaintext', function (view, config) {
var self = this;
var mock = document.createElement('DIV');
mock.classList.add('console-content-plaintext-mock')
mock.style.position = 'absolute';
mock.style.top = '-100px';
mock.style.opacity = '0';
mock.style.width = view.node.c... | Fix text editor wrapping when floating | Fix text editor wrapping when floating
| JavaScript | mit | metabahn/console,metabahn/console,metabahn/console |
a6d0373ea7ca897721d691089567af8e13bab61b | mac/filetypes/open_STAK.js | mac/filetypes/open_STAK.js | define(['itemObjectModel', 'mac/roman'], function(itemOM, macRoman) {
'use strict';
function open(item) {
function onBlock(item, byteSource) {
return byteSource.slice(0, 12).getBytes().then(function(headerBytes) {
var dv = new DataView(headerBytes.buffer, headerBytes.byteOffset, 4);
va... | define(['itemObjectModel', 'mac/roman'], function(itemOM, macRoman) {
'use strict';
function open(item) {
function onBlock(item, byteSource) {
return byteSource.slice(0, 12).getBytes().then(function(headerBytes) {
var dv = new DataView(
headerBytes.buffer, headerBytes.byteOffset, hea... | Use right length of header | Use right length of header | JavaScript | mit | radishengine/drowsy,radishengine/drowsy |
93bc928f2f19bba92ce178325f396c863f34c566 | packages/client/.spinrc.js | packages/client/.spinrc.js | const url = require('url');
const config = {
builders: {
web: {
entry: './src/index.tsx',
stack: ['web'],
openBrowser: true,
dllExcludes: ['bootstrap'],
defines: {
__CLIENT__: true
},
// Wait for backend to start prior to letting webpack load frontend page
... | const url = require('url');
const config = {
builders: {
web: {
entry: './src/index.tsx',
stack: ['web'],
openBrowser: true,
dllExcludes: ['bootstrap'],
defines: {
__CLIENT__: true
},
// Wait for backend to start prior to letting webpack load frontend page
... | Remove unused option for client-side bundle | Remove unused option for client-side bundle
| JavaScript | mit | sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit |
4f2ba69c7a4c2e5906d949fae1d0fc902c6f12df | data/wp/wp-content/plugins/epfl/menus/epfl-menus-admin.js | data/wp/wp-content/plugins/epfl/menus/epfl-menus-admin.js | // It seems that not much documentation exists for the JQuery
// mini-Web-app that is the Wordpress admin menu editor. However,
// insofar as Polylang's business in that mini-Web-app is similar
// to ours, studying the js/nav-menu.js therefrom is helpful.
function initNavMenus ($) {
var $metabox = $('div.add-externa... | function initExternalMenuList ($) {
$('a.page-title-action').remove();
$('h1.wp-heading-inline').after('<button class="page-title-action">' + wp.translations.refresh_button + '</button>');
var $button = $('h1.wp-heading-inline').next();
var spinning = false;
$button.click(function() {
if (sp... | Remove dead code in the JS app | Remove dead code in the JS app
| JavaScript | mit | epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp |
d94120cf7da438722c1bb60dfaa81ada4e48e724 | src/helpers/menu_entry.js | src/helpers/menu_entry.js | const Handlebars = require('handlebars');
const templates = {
active: Handlebars.compile('<li class="active">{{{content}}}</li>'),
unactive: Handlebars.compile('<li><a href="{{link}}">{{{content}}}</a></li>')
};
module.exports = function(entries, current_page) {
const items = entries.map((entry) => {
... | const Handlebars = require('handlebars');
const templates = {
active: Handlebars.compile('<li class="active"><a>{{{content}}}</a></li>'),
unactive: Handlebars.compile('<li><a href="{{link}}">{{{content}}}</a></li>')
};
module.exports = function(entries, current_page) {
const items = entries.map((entry) =>... | Fix active menu item content. | Fix active menu item content.
| JavaScript | mit | NealRame/CV,NealRame/Blog,NealRame/Blog,NealRame/Blog,NealRame/CV |
bc09b643a4763de17f5d6db6b926174667825ad2 | client/app/instructor/newevent/newevent.controller.js | client/app/instructor/newevent/newevent.controller.js | 'use strict';
export default class NewEventCtrl {
/*@ngInject*/
constructor($scope) {
$scope.event = {info:{}};
$scope.stage = {
select: true,
create: false,
assign: false,
done: false
}
$scope.doneSelect = function(create){
$scope.stage.select = false;
if (crea... | 'use strict';
export default class NewEventCtrl {
/*@ngInject*/
constructor($scope) {
$scope.event = {info:{}};
$scope.stage = {
select: false,
create: true,
assign: false,
done: false
}
$scope.doneSelect = function(create){
$scope.stage.select = false;
if (crea... | Change to new event form instead of to selecting an event | Change to new event form instead of to selecting an event
| JavaScript | mit | rcos/venue,rcos/venue,rcos/venue,rcos/venue |
9c61fdff3cf4e40724f2565a5ab55f6d2b3aa0a9 | stats-server/lib/server.js | stats-server/lib/server.js | var express = require('express');
var https = require('https');
var logger = require('./logger');
var security = require('./security');
var db = require('./db');
var app = configureExpressApp();
initializeMongo(initializeRoutes);
startServer(security, app);
function configureExpressApp() {
var app = express();
ap... | var express = require('express');
var https = require('https');
var logger = require('./logger');
var security = require('./security');
var db = require('./db');
var app = configureExpressApp();
initializeMongo(initializeRoutes);
startServer(security, app);
function configureExpressApp() {
var app = express();
ap... | Change port back to 6666 | Change port back to 6666
| JavaScript | agpl-3.0 | cazacugmihai/codebrag,cazacugmihai/codebrag,softwaremill/codebrag,softwaremill/codebrag,cazacugmihai/codebrag,cazacugmihai/codebrag,softwaremill/codebrag,softwaremill/codebrag,cazacugmihai/codebrag |
7e580f82edfbe1b3ba4e6e7a365c216b2b81cb91 | config/index.js | config/index.js | // see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPat... | // see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPat... | Change default dev port to 3000 | Change default dev port to 3000
| JavaScript | mit | adrielpdeguzman/vuelma,adrielpdeguzman/vuelma,vuelma/vuelma,vuelma/vuelma |
87eebeaee3d2930e29f8b9aa7e3784f7f519f444 | jquery.activeNavigation.js | jquery.activeNavigation.js | (function( $ ) {
$.fn.activeNavigation = function(selector) {
var pathname = window.location.pathname
var hrefs = []
$(selector).find("a").each(function(){
if (pathname.indexOf($(this).attr("href")) > -1)
hrefs.push($(this))
})
if (hrefs.length) {... | (function( $ ) {
$.fn.activeNavigation = function(selector) {
var pathname = window.location.pathname
var extension_position;
var href;
var hrefs = []
$(selector).find("a").each(function(){
// Remove href file extension
extension_position = $(this).att... | Remove file extension from href's | Remove file extension from href's
| JavaScript | mit | Vitaa/ActiveNavigation,Vitaa/ActiveNavigation |
26d0c3815f5bdcc23b25709167c1bcf96a8d14c2 | examples/worker-semaphore.js | examples/worker-semaphore.js | var {Worker} = require("ringo/worker")
var {Semaphore} = require("ringo/concurrent")
var {setInterval, clearInterval} = require("ringo/scheduler");
function main() {
// Create a new workers from this same module. Note that this will
// create a new instance of this module as workers are isolated.
var w = n... | var {Worker} = require("ringo/worker")
var {Semaphore} = require("ringo/concurrent")
var {setInterval, clearInterval} = require("ringo/scheduler");
function main() {
// Create a new workers from this same module. Note that this will
// create a new instance of this module as workers are isolated.
var w = n... | Make single worker semaphore example slightly more interesting | Make single worker semaphore example slightly more interesting
| JavaScript | apache-2.0 | Transcordia/ringojs,ringo/ringojs,ringo/ringojs,oberhamsi/ringojs,Transcordia/ringojs,ringo/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,Transcordia/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs |
68a5a2ce778484bf94518ad3e1a2a895c76d25f4 | app/imports/ui/components/form-fields/open-cloudinary-widget.js | app/imports/ui/components/form-fields/open-cloudinary-widget.js | import { Meteor } from 'meteor/meteor';
import { $ } from 'meteor/jquery';
/* global cloudinary */
/**
* Opens the Cloudinary Upload widget and sets the value of the input field with name equal to nameAttribute to the
* resulting URL of the uploaded picture.
* @param nameAttribute The value of the associated input... | import { Meteor } from 'meteor/meteor';
import { $ } from 'meteor/jquery';
/* global cloudinary */
/**
* Opens the Cloudinary Upload widget and sets the value of the input field with name equal to nameAttribute to the
* resulting URL of the uploaded picture.
* @param nameAttribute The value of the associated input... | Change min image size to 200x200 | Change min image size to 200x200
| JavaScript | apache-2.0 | radgrad/radgrad,radgrad/radgrad,radgrad/radgrad |
9bc7cfc00b0a0b96245af835995b39e8493f0a01 | test_frontend/app/views/teacher/modules/assistance_request_list_module_spec.js | test_frontend/app/views/teacher/modules/assistance_request_list_module_spec.js | define((require) => {
describe('requester_module', () => {
beforeEach(() => {
require('app/views/teacher/modules/assistance_request_list_module');
});
define('>RetrieveAssistanceRequests', () => {
it('should be defined', () => {
expect(RetrieveAssist... | define((require) => {
describe('requester_module', () => {
beforeEach(() => {
require('app/views/teacher/modules/assistance_request_list_module');
});
describe('>RetrieveAssistanceRequests', () => {
it('should be defined', () => {
expect(RetrieveAssi... | Fix AR list module test | Fix AR list module test
| JavaScript | mit | samg2014/VirtualHand,samg2014/VirtualHand |
1b77aa7ecddf446637e1bfd14bd92d8d588dcb6d | app/gui/task_view.js | app/gui/task_view.js | define([
'underscore',
'backbone'
], function(_, Backbone) {
var TaskView = Backbone.View.extend({
tagName: 'li',
className: 'task',
events: {
"dragstart" : "on_dragstart",
"dragover" : "on_dragover",
"drop" : "on_drop"
},
initialize: function() {
this.id = 'id-'... | define([
'underscore',
'backbone'
], function(_, Backbone) {
var TaskView = Backbone.View.extend({
tagName: 'li',
className: 'task',
events: {
"dragstart" : "on_dragstart",
"dragover" : "on_dragover",
"drop" : "on_drop",
"click .delete" : "delete"
},
... | Add ability to delete a task | Add ability to delete a task
| JavaScript | mit | lorenzoplanas/tasks,lorenzoplanas/tasks |
edede8b53d19f628c566edf52d426b81d69af306 | client/src/Requests/PanelIssue.js | client/src/Requests/PanelIssue.js | import React from 'react'
import { Panel } from 'react-bootstrap'
import MarkdownBlock from '../shared/MarkdownBlock'
import { getCreator, getContent } from '../shared/requestUtils'
const Issue = props => {
return (
<Panel
header={`${props.issue.title} by ${getCreator(props.issue).name || getCreator(props.... | import React from 'react'
import { Panel } from 'react-bootstrap'
import MarkdownBlock from '../shared/MarkdownBlock'
import { getCreator, getContent } from '../shared/requestUtils'
const Issue = props => {
if (!props.issue)
return null
return (
<Panel
header={`${props.issue.title} by ${getCreator(p... | Work around react router bug | Work around react router bug
<Miss /> sometimes renders even when it should not
| JavaScript | mit | clembou/github-requests,clembou/github-requests,clembou/github-requests |
9c2086204891e1b78e8cc077272018238d0ae5c1 | server/vote.js | server/vote.js | // TODO: should the baseScore be stored, and updated at vote time?
// This interface should change and become more OO, this'll do for now
var Scoring = {
// re-run the scoring algorithm on a single object
updateObject: function(object) {
// just count the number of votes for now
var baseScore = MyVote... | // TODO: should the baseScore be stored, and updated at vote time?
// This interface should change and become more OO, this'll do for now
var Scoring = {
// re-run the scoring algorithm on a single object
updateObject: function(object) {
// just count the number of votes for now
var baseScore = object... | Use an atomic update operation | Use an atomic update operation | JavaScript | mit | mrn3/ldsdiscuss,delgermurun/Telescope,manriquef/Vulcan,SachaG/Gamba,geverit4/Telescope,TribeMedia/Screenings,IQ2022/Telescope,eruwinu/presto,caglarsayin/Telescope,rtluu/immersive,aozora/Telescope,zires/Telescope,cloudunicorn/fundandexit,Daz2345/Telescope,em0ney/Telescope,iraasta/quickformtest,covernal/Telescope,STANAPO... |
d2d1d18134787a398511c60dccec4ee89f636edc | examples/cherry-pick/app/screens/application/index.js | examples/cherry-pick/app/screens/application/index.js | import './base.css';
import './application.css';
import 'suitcss-base';
import 'suitcss-utils-text';
import 'suitcss-components-arrange';
import React from 'react';
module.exports = React.createClass({
contextTypes: {
router: React.PropTypes.object.isRequired
},
link: function () {
var router = this.con... | import './base.css';
import './application.css';
import 'suitcss-base';
import 'suitcss-utils-text';
import 'suitcss-components-arrange';
import React from 'react';
module.exports = React.createClass({
contextTypes: {
router: React.PropTypes.object.isRequired
},
link: function () {
var router = this.con... | Fix links in the cherry-pick demo | Fix links in the cherry-pick demo
| JavaScript | mit | nathanboktae/cherrytree,QubitProducts/cherrytree,QubitProducts/cherrytree,nathanboktae/cherrytree |
4a68f3869ab9af0c3b51bff223c36d49b58e5df3 | app/views/wrapper.js | app/views/wrapper.js | module.exports = function (body) {
return `
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Minor WOT</title>
<link rel="stylesheet" href="/style.css" />
<script src="/app.js" defer></script>
${body}
`;
}
| module.exports = function (body) {
return `
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Minor WOT</title>
<link rel="stylesheet" href="/style.css" />
<script src="/app.js" defer></script>
<div data-root>
${body}
</div>
`;
}
| Add data-root div around main body for later use | Add data-root div around main body for later use
| JavaScript | mit | rijkvanzanten/luaus |
1fa073552fd0c806aae62e6b317199e46aabd085 | src/ParseCliServer.js | src/ParseCliServer.js | import express from 'express';
import bodyParser from 'body-parser';
import AppCache from 'parse-server/lib/cache';
import ParseCliController from './ParseCliController';
import ParseCliRouter from './ParseCliRouter';
import VendorAdapter from './VendorAdapter';
class ParseCliServer {
constructor({
config,
... | import express from 'express';
import bodyParser from 'body-parser';
import AppCache from 'parse-server/lib/cache';
import ParseCliController from './ParseCliController';
import ParseCliRouter from './ParseCliRouter';
import VendorAdapter from './VendorAdapter';
class ParseCliServer {
constructor({
config,
... | Fix typo in limit configuration and remove bodyparser urlencoded middleware. | Fix typo in limit configuration and remove bodyparser urlencoded
middleware.
| JavaScript | mit | back4app/parse-cli-server,luisholanda/parse-cli-server |
1f34969f216a7333a27fbd48b97293f3a22d0ec1 | lib/Object/map-to-array.js | lib/Object/map-to-array.js | 'use strict';
var callable = require('./valid-callable')
, forEach = require('./for-each')
, defaultCb = function (value, key) { return [key, value]; };
module.exports = function (obj, cb/*, thisArg*/) {
var a = [], thisArg = arguments[2];
cb = (cb == null) ? defaultCb : callable(cb);
forEach(obj, function ... | 'use strict';
var callable = require('./valid-callable')
, forEach = require('./for-each')
, call = Function.prototype.call
, defaultCb = function (value, key) { return [key, value]; };
module.exports = function (obj, cb/*, thisArg*/) {
var a = [], thisArg = arguments[2];
cb = (cb == null) ? defaultCb : ca... | Support any callable object as callback | Support any callable object as callback
| JavaScript | isc | medikoo/es5-ext |
f28118fe786bf4fea5b899ff27e185df532e884d | StringManipulation/ConsecutiveString/consecutivestring.js | StringManipulation/ConsecutiveString/consecutivestring.js | var ConsecutiveString = function(){};
/*validate k and length of the array. If the array length is 0 of less than k of k is less thatn or equal to 0
return an empty string.
if k is 1, then return the longest string.
else, loop through the string, */
ConsecutiveString.prototype.longestConsec = function(starr, k){
var... | var ConsecutiveString = function(){};
/*validate k and length of the array. If the array length is 0 of less than k of k is less thatn or equal to 0
return an empty string.
if k is 1, then return the longest string.
else, loop through the string, */
ConsecutiveString.prototype.longestConsec = function(starr, k){
var... | Add Consectutive String Description solution | Add Consectutive String Description solution
| JavaScript | mit | BrianLusina/JS-Snippets |
a4d85bb42cf25879f154fba5b647778f503984a4 | docs/client/lib/navigate.js | docs/client/lib/navigate.js | navigate = function (hash) {
window.location.replace(Meteor.absoluteUrl(null, { secure: true }) + hash);
};
| navigate = function (hash) {
window.location.replace(Meteor.absoluteUrl() + hash);
};
| Remove extra option to absoluteUrl | Remove extra option to absoluteUrl
force-ssl already sets this option by default
| JavaScript | mit | msavin/meteor,daslicht/meteor,dboyliao/meteor,colinligertwood/meteor,chinasb/meteor,yonglehou/meteor,sclausen/meteor,jdivy/meteor,ashwathgovind/meteor,cog-64/meteor,elkingtonmcb/meteor,l0rd0fwar/meteor,meteor-velocity/meteor,brettle/meteor,dfischer/meteor,HugoRLopes/meteor,kencheung/meteor,jdivy/meteor,chiefninew/meteo... |
fe0d1ba2d55121a69791896e0f9fec3aa70f7c3c | public/javascript/fonts.js | public/javascript/fonts.js | WebFontConfig = {
custom: { families: ['Alternate Gothic No.3', 'Clarendon FS Medium', 'Proxima Nova Light', 'Proxima Nova Semibold', 'Stub Serif FS', 'Stub Serif FS'],
urls: [ 'http://f.fontdeck.com/s/css/tEGvGvL6JlBfPjTgf2p9URd+sJ0/' + window.location.hostname + '/5502.css' ] }
};
(function() {
var wf = docume... | WebFontConfig = {
custom: { families: ['Alternate Gothic No.3', 'Clarendon FS Medium', 'Proxima Nova Light', 'Proxima Nova Semibold', 'Stub Serif FS', 'Stub Serif FS', 'Reminder Pro Bold'],
urls: [ 'http://f.fontdeck.com/s/css/tEGvGvL6JlBfPjTgf2p9URd+sJ0/' + window.location.hostname + '/5502.css' ] }
};
(function(... | Add new font to JS | Add new font to JS
| JavaScript | mit | robinwhittleton/static,kalleth/static,tadast/static,robinwhittleton/static,robinwhittleton/static,kalleth/static,robinwhittleton/static,alphagov/static,tadast/static,alphagov/static,alphagov/static,kalleth/static,kalleth/static,tadast/static,tadast/static |
040681cfa5be9a0b095fab6f8f3c84c833245c94 | addon/components/one-way-input.js | addon/components/one-way-input.js | import Ember from 'ember';
const {
Component,
get
} = Ember;
export default Component.extend({
tagName: 'input',
type: 'text',
attributeBindings: [
'accept',
'autocomplete',
'autosave',
'dir',
'formaction',
'formenctype',
'formmethod',
'formnovalidate',
'formtarget',
... | import Ember from 'ember';
const {
Component,
get
} = Ember;
export default Component.extend({
tagName: 'input',
type: 'text',
attributeBindings: [
'accept',
'autocomplete',
'autosave',
'dir',
'formaction',
'formenctype',
'formmethod',
'formnovalidate',
'formtarget',
... | Add placeholder to attribute bindings | Add placeholder to attribute bindings
| JavaScript | mit | AdStage/ember-one-way-controls,dockyard/ember-one-way-input,dockyard/ember-one-way-controls,dockyard/ember-one-way-input,AdStage/ember-one-way-controls,dockyard/ember-one-way-controls |
a0d7b9248e15b04725cc72834cebe1084a2e70e5 | addons/storysource/src/manager.js | addons/storysource/src/manager.js | /* eslint-disable react/prop-types */
import React from 'react';
import addons from '@storybook/addons';
import StoryPanel from './StoryPanel';
import { ADDON_ID, PANEL_ID } from '.';
export function register() {
addons.register(ADDON_ID, api => {
addons.addPanel(PANEL_ID, {
title: 'Story',
render: ... | /* eslint-disable react/prop-types */
import React from 'react';
import addons from '@storybook/addons';
import StoryPanel from './StoryPanel';
import { ADDON_ID, PANEL_ID } from '.';
export function register() {
addons.register(ADDON_ID, api => {
addons.addPanel(PANEL_ID, {
title: 'Story',
render: ... | CHANGE paramKey for storysource addon disable | CHANGE paramKey for storysource addon disable
| JavaScript | mit | storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook |
ff86c57864c82a30f9af6bea2b29b8b2ae68defd | server/routes/heroku.js | server/routes/heroku.js | var express = require('express');
var router = express.Router();
var request = require('request');
router.get('/', function(req, res) {
request({
url: 'https://status.heroku.com/api/v3/current-status',
method: 'GET'
}, function(err, res, body) {
console.log(body);
res.sendStatus(200).end();
});
}... | var express = require('express');
var router = express.Router();
var request = require('request');
router.get('/', function(req, res) {
request({
url: 'https://status.heroku.com/api/v3/current-status',
method: 'GET'
}, function(error, response, body) {
console.log(body); // {"status":{"Production":"gre... | Rename res to not overwrite express res. | Rename res to not overwrite express res.
| JavaScript | mit | jontewks/bc-slack-alerts |
6af9dc39bbf566d6bea1d2bc553d47e9312e7daa | src/Components/EditableTable/EditableTableHeader/index.js | src/Components/EditableTable/EditableTableHeader/index.js | import React from 'react'
import PropTypes from 'prop-types'
const EditableTableHeader = ({columnNames}) => {
return(
<div>
{columnNames.map( columnName => {return <div key={columnName}>{columnName}</div>})}
</div>
)
}
EditableTableHeader.propTypes = {
columnNames: PropTypes.arrayOf(PropTypes.st... | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
const Div = styled.div`
display:flex;
flex-direction:row;
`
const HeaderCell = styled.div`
flex:1;
`
const EditableTableHeader = ({columnNames}) => {
return(
<Div>
{columnNames.map( columnName => {r... | Add styled components to EditableTableHeader | Add styled components to EditableTableHeader
| JavaScript | mit | severnsc/brewing-app,severnsc/brewing-app |
5d3bae193a4258fe1310f677f09df68de082590f | packages/coinstac-common/src/models/computation/remote-computation-result.js | packages/coinstac-common/src/models/computation/remote-computation-result.js | 'use strict';
const ComputationResult = require('./computation-result');
const joi = require('joi');
/* istanbul ignore next */
/**
* @class RemoteComputationResult
* @extends ComputationResult
* @description RemoteComputationResult result container
* @property {string[]} usernames
* @property {string} _id exten... | 'use strict';
const ComputationResult = require('./computation-result');
const joi = require('joi');
/* istanbul ignore next */
/**
* @class RemoteComputationResult
* @extends ComputationResult
* @description RemoteComputationResult result container
* @property {string[]} usernames
* @property {string} _id exten... | Fix remote computation document's start date bug. | Fix remote computation document's start date bug.
This ensures that remote computation documents are created with a
dynamically generated start date.
Closes #185.
| JavaScript | mit | MRN-Code/coinstac,MRN-Code/coinstac,MRN-Code/coinstac |
1178d8d86a2b8774ad9636de8d29ca30d352db51 | lib/assets/javascripts/cartodb/common/background_polling/models/upload_config.js | lib/assets/javascripts/cartodb/common/background_polling/models/upload_config.js |
/**
* Default upload config
*
*/
module.exports = {
uploadStates: [
'enqueued',
'pending',
'importing',
'uploading',
'guessing',
'unpacking',
'getting',
'creating',
'complete'
],
fileExtensions: [
'csv',
'xls',
'xlsx',
'zip',
'kml',
'geojson',
... |
/**
* Default upload config
*
*/
module.exports = {
uploadStates: [
'enqueued',
'pending',
'importing',
'uploading',
'guessing',
'unpacking',
'getting',
'creating',
'complete'
],
fileExtensions: [
'csv',
'xls',
'xlsx',
'zip',
'kml',
'geojson',
... | Allow importing RAR files in the UI | Allow importing RAR files in the UI
Fixes 2366
| JavaScript | bsd-3-clause | splashblot/dronedb,CartoDB/cartodb,bloomberg/cartodb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,codeandtheory/cartodb,codeandtheory/cartodb,bloomberg/cartodb,bloomberg/cartodb,CartoDB/cartodb,bloomberg/cartodb,splashblot/dronedb,CartoDB/cartodb,codeandtheory/cartodb,codeandtheory/cartodb,codeandtheory/cartodb,s... |
19c9ad30143a106ecff8eceb1e03d1b0dc68a208 | packages/redis/index.js | packages/redis/index.js | const Redis = require('ioredis');
module.exports = url => {
const redis = new Redis(url);
redis.setJSON = async (...arguments) => {
arguments[1] = JSON.stringify(arguments[1]);
if (typeof arguments[2] === 'object' && arguments[2].asSeconds) {
arguments[2] = parseInt(arguments[2].asSeconds());
}
... | const Redis = require('ioredis');
module.exports = url => {
const redis = new Redis(url);
redis.setJSON = async (...arguments) => {
arguments[1] = JSON.stringify(arguments[1]);
if (typeof arguments[2] === 'object' && arguments[2].asSeconds) {
arguments[2] = parseInt(arguments[2].asSeconds());
}
... | Fix redis syntax error if third argument is undefined | Fix redis syntax error if third argument is undefined
| JavaScript | mit | maxdome/maxdome-node,maxdome/maxdome-node |
87f5054b206cac2bc48cd908a83ebdce5723da62 | blueprints/ember-cli-typescript/index.js | blueprints/ember-cli-typescript/index.js | /* eslint-env node */
const path = require('path');
module.exports = {
description: 'Initialize files needed for typescript compilation',
files() {
return [
path.join(this.path, 'files', 'tsconfig.json'),
path.join(this.path, 'files', 'app', 'config', 'environment.d.ts'),
];
},
mapFile()... | import { existsSync } from 'fs';
/* eslint-env node */
const path = require('path');
module.exports = {
description: 'Initialize files needed for typescript compilation',
files() {
return [
path.join(this.path, 'files', 'tsconfig.json'),
path.join(this.path, 'files', 'app', 'config', 'environmen... | Add `.e.c-ts` to `.gitignore` on install. | Add `.e.c-ts` to `.gitignore` on install.
| JavaScript | mit | emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript |
fd0db8de5cc41d704148a4b5ad64c8161754e146 | tests/commands/cmmTests.js | tests/commands/cmmTests.js | var cmm = require("__buttercup/classes/commands/command.cmm.js");
module.exports = {
setUp: function(cb) {
this.command = new cmm();
(cb)();
},
callbackInjected: {
callsToCallback: function(test) {
var callbackCalled = false;
var callback = function(comment)... | var cmm = require("__buttercup/classes/commands/command.cmm.js");
module.exports = {
setUp: function(cb) {
this.command = new cmm();
(cb)();
},
callbackInjected: {
callsToCallback: function(test) {
var callbackCalled = false;
var callback = function(comment)... | Test case two for comment contents | Test case two for comment contents
| JavaScript | mit | perry-mitchell/buttercup-core,buttercup-pw/buttercup-core,buttercup/buttercup-core,buttercup-pw/buttercup-core,perry-mitchell/buttercup-core,buttercup/buttercup-core,buttercup/buttercup-core |
73419f13fdb6a10cc0362a108375c062721b612d | eg/piezo.js | eg/piezo.js | var five = require("../lib/johnny-five.js"),
board = new five.Board();
board.on("ready", function() {
// Creates a piezo object and defines the pin to be used for the signal
var piezo = new five.Piezo(3);
// Injects the piezo into the repl
board.repl.inject({
piezo: piezo
});
// Plays a song
piez... | var five = require("../lib/johnny-five.js"),
board = new five.Board();
board.on("ready", function() {
// Creates a piezo object and defines the pin to be used for the signal
var piezo = new five.Piezo(3);
// Injects the piezo into the repl
board.repl.inject({
piezo: piezo
});
// Plays a song
piez... | Change beat to fractional values | Change beat to fractional values
| JavaScript | mit | AnnaGerber/johnny-five,cumbreras/rv,kod3r/johnny-five,kod3r/johnny-five,joelunmsm2003/arduino |
e513455d27aad423afe5bed9d34054430af82473 | plugins/wallhaven_cc.js | plugins/wallhaven_cc.js | var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name: 'wallhaven.cc',
prepareImgLinks: function (callback) {
var res = [];
hoverZoom.urlReplace(res,
'img[src*="/th.wallhaven.cc/"]',
/\/th.wallhaven.cc\/(.*)\/(.*)\/(.*)\.(.*)$/,
'/w.wall... | var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name: 'wallhaven.cc',
version:'3.0',
prepareImgLinks: function (callback) {
var res = [];
hoverZoom.urlReplace(res,
'img[src*="/th.wallhaven.cc/"]',
/\/th.wallhaven.cc\/(.*)\/(.*)\/(.*)\.(.*)$/,... | Update for plug-in : wallhaven.cc | Update for plug-in : wallhaven.cc
| JavaScript | mit | extesy/hoverzoom,extesy/hoverzoom |
9ded25a6bb411da73117adcb50fe5194de8bd635 | chrome/browser/resources/managed_user_passphrase_dialog.js | chrome/browser/resources/managed_user_passphrase_dialog.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.
function load() {
$('unlock-passphrase-button').onclick = function(event) {
chrome.send('checkPassphrase', [$('passphrase-entry').value]);
};
... | // 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.
function load() {
var checkPassphrase = function(event) {
chrome.send('checkPassphrase', [$('passphrase-entry').value]);
};
var closeDialog ... | Improve usability in passphrase input dialog. | Improve usability in passphrase input dialog.
Add the possiblity to press Enter to submit the dialog and to press Escape to
dismiss it.
R=akuegel@chromium.org, jhawkins@chromium.org
BUG=171370
Review URL: https://chromiumcodereview.appspot.com/12321166
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@185194 00... | JavaScript | bsd-3-clause | krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,ondra-novak/chromium.src,ltilve/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswal... |
dc7e4ee88250241d6950b4bdd6da0dc899050ccb | cla_public/static-src/javascripts/modules/cookie-banner.js | cla_public/static-src/javascripts/modules/cookie-banner.js | 'use strict';
require('./cookie-functions.js');
require('govuk_publishing_components/components/cookie-banner.js');
window.GOVUK.DEFAULT_COOKIE_CONSENT = {
'essential': true,
'usage': false,
'brexit': false
}
window.GOVUK.setDefaultConsentCookie = function () {
var defaultConsent = {
... | 'use strict';
require('./cookie-functions.js');
require('govuk_publishing_components/components/cookie-banner.js');
window.GOVUK.DEFAULT_COOKIE_CONSENT = {
'essential': true,
'usage': false,
'brexit': false
}
window.GOVUK.setDefaultConsentCookie = function () {
var defaultConsent = {
... | Remove cookie banner from cookie settings page | Remove cookie banner from cookie settings page
| JavaScript | mit | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public |
6a68619153b8b2cd9c35401e3943d4c4cc218eb6 | generators/server/templates/server/boot/security.js | generators/server/templates/server/boot/security.js | 'use strict';
const cookieParser = require('cookie-parser');
const csrf = require('csurf');
module.exports = function(server) {
let secure = true;
if (process.env.NODE_ENV === 'development') {
secure = false;
}
server.use(cookieParser());
server.use(csrf({cookie: {
key: 'XSRF-SECRET',
... | 'use strict';
const cookieParser = require('cookie-parser');
const csrf = require('csurf');
module.exports = function(server) {
let secure = true;
if (process.env.NODE_ENV === 'development') {
secure = false;
}
server.use(cookieParser());
server.use(csrf({cookie: {
key: 'XSRF-SECRET',
... | Fix linting errors on server | Fix linting errors on server
| JavaScript | apache-2.0 | societe-generale/react-loopback-generator,societe-generale/react-loopback-generator |
05e683ffe8c940d8fe5f762d91b3d76ab95e5b9d | app/js/controllers.js | app/js/controllers.js | 'use strict';
/* Controllers */
var cvAppControllers = angular.module('cvAppControllers', []);
cvAppControllers.controller('HomeController', ['$scope', '$http', function($scope, $http) {
$http.get('/app/info/info.json').success(function(data) {
$scope.stuff = data;
});
}]);
cvAppControllers.controller('AboutCon... | 'use strict';
/* Controllers */
var cvAppControllers = angular.module('cvAppControllers', []);
cvAppControllers.controller('HomeController', ['$scope', '$http', function($scope, $http) {
$http.get('/app/info/info.json').success(function(data) {
$scope.stuff = data;
});
$scope.backgroundImg = "/app/img/kugghjule... | Add kugghjulet.png to home scope | Add kugghjulet.png to home scope
| JavaScript | mit | RegularSvensson/cvApp,RegularSvensson/cvApp |
ac3b1f587ed3a1cc7e0816d4d0a788da8e6d3a09 | lib/node_modules/@stdlib/datasets/stopwords-english/lib/index.js | lib/node_modules/@stdlib/datasets/stopwords-english/lib/index.js | 'use strict';
/**
* A list of English stopwords.
*
* @module @stdlib/datasets/smart-stopwords-en
*
* @example
* var STOPWORDS = require( '@stdlib/datasets/smart-stopwords-en' )
* // returns [ "a", "a's", "able", "about", ... ]
*/
var STOPWORDS = require( './../data/words.json' );
// EXPORTS //
module.exports = STO... | 'use strict';
/**
* A list of English stopwords.
*
* @module @stdlib/datasets/stopwords-en
*
* @example
* var STOPWORDS = require( '@stdlib/datasets/stopwords-en' )
* // returns [ "a", "a's", "able", "about", ... ]
*/
var STOPWORDS = require( './../data/words.json' );
// EXPORTS //
module.exports = STOPWORDS;
| Revert name change of stopwords-english | Revert name change of stopwords-english
| JavaScript | apache-2.0 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib |
cecc6de2d3df51acd077c5e3f8e3c88b8608d987 | app/services/index.js | app/services/index.js | import 'whatwg-fetch';
const apiBaseURL = 'http://localhost:1337';
function parseJSONFromResponse(response) {
return response.json();
}
export const bookshelfApi = {
getBooks() {
return fetch(`${apiBaseURL}/books`)
.then(parseJSONFromResponse)
.catch(error =>
console.error(
`Something wen... | import 'whatwg-fetch';
const apiBaseURL = 'http://localhost:1337';
function parseJSONFromResponse(response) {
return response.json();
}
function stringIsEmpty(str) {
return str === '' || str === undefined || str === null;
}
export const bookshelfApi = {
getBooks() {
return fetch(`${apiBaseURL}/books`)
... | Add method createBook to bookshelfApi connection. | Add method createBook to bookshelfApi connection.
| JavaScript | mit | w1nston/bookshelf,w1nston/bookshelf |
9672073a981ce9ebb88f7911854518ee9d0225ca | test/reducers/sum.spec.js | test/reducers/sum.spec.js | const sum = require('./sum');
test('adds 1 + 2 to equal 3', () => {
expect(sum(1, 2)).toBe(3);
}); | const sum = require('./sum');
test('adds 1 + 2 to equal 3', () => {
expect(sum(1, 2)).toBe(4);
}); | Change test result to test travis ci notification | Change test result to test travis ci notification
| JavaScript | mit | FermORG/FermionJS,FermORG/FermionJS |
2e424fd72f6a1e484da6085238702c989879ad27 | server/server-logic.js | server/server-logic.js | const Q = require('q');
const RegularUsers = require('./../models/userSchema.js');
const BusinessUsers = require('./../models/businessUserSchema.js');
const Events = require('./../models/eventSchema.js');
const utils = require('../utils/utilities.js');
// Promisify a few mongoose methods with the `q` promise library
... | const Q = require('q');
const RegularUsers = require('./../models/userSchema.js');
const BusinessUsers = require('./../models/businessUserSchema.js');
const Events = require('./../models/eventSchema.js');
const utils = require('../utils/utilities.js');
// Promisify a few mongoose methods with the `q` promise library
... | Debug and tested server routes, successful post and get | Debug and tested server routes, successful post and get
| JavaScript | unlicense | DeFieldsEPeriou/DeGreenFields,eperiou/DeGreenFields,eperiou/DeGreenFields,DeFieldsEPeriou/DeGreenFields |
8d885db7d5e7a731f1ae180c0160db046cd1355c | examples/renderinitial/router.js | examples/renderinitial/router.js | var monorouter = require('monorouter');
var reactRouting = require('monorouter-react');
var PetList = require('./views/PetList');
var PetDetail = require('./views/PetDetail');
var Preloader = require('./views/Preloader');
module.exports = monorouter()
.setup(reactRouting())
.route('index', '/', function(req) {
... | var monorouter = require('monorouter');
var reactRouting = require('monorouter-react');
var PetList = require('./views/PetList');
var PetDetail = require('./views/PetDetail');
var Preloader = require('./views/Preloader');
module.exports = monorouter()
.setup(reactRouting())
.route('index', '/', function(req) {
... | Add note about 404 pitfall with renderInitial example | Add note about 404 pitfall with renderInitial example
| JavaScript | mit | matthewwithanm/monorouter |
9c20d0be36788e04838ea8e19e6f7eed3e0f44c3 | app/controllers/control.js | app/controllers/control.js | 'use strict';
/**
* Module dependencies.
*/
/**
* Find device by id
*/
exports.command = function(req, res) {
var client = exports.client;
var channel = '/control/' + req.params.deviceId + '/' + req.params.command;
client.publish(channel, req.body);
console.log('Publish to channel: ' + channel);
... | 'use strict';
/**
* Module dependencies.
*/
/**
* Find device by id
*/
exports.command = function(req, res) {
var client = exports.client;
var channel = '/control/' + req.params.deviceId;
var data = {
command: req.params.command,
body: req.body
}
client.publish(channel, data);
co... | Send command in the published message | Send command in the published message
| JavaScript | apache-2.0 | msprunck/openit-site,msprunck/openit-site |
c75bb56fc01ba261f77d848d5667b7b480c71261 | app/controllers/category/index.js | app/controllers/category/index.js | import Ember from 'ember';
import PaginationMixin from '../../mixins/pagination';
const { computed } = Ember;
export default Ember.Controller.extend(PaginationMixin, {
queryParams: ['page', 'per_page', 'sort'],
page: '1',
per_page: 10,
sort: 'alpha',
totalItems: computed.readOnly('model.meta.tota... | import Ember from 'ember';
import PaginationMixin from '../../mixins/pagination';
const { computed } = Ember;
export default Ember.Controller.extend(PaginationMixin, {
queryParams: ['page', 'per_page', 'sort'],
page: '1',
per_page: 10,
sort: 'downloads',
totalItems: computed.readOnly('model.meta.... | Sort crates within a category by downloads by default | Sort crates within a category by downloads by default
There will be an RFC soon about whether this is the best ordering or
not.
| JavaScript | apache-2.0 | Susurrus/crates.io,steveklabnik/crates.io,steveklabnik/crates.io,Susurrus/crates.io,rust-lang/crates.io,rust-lang/crates.io,Susurrus/crates.io,Susurrus/crates.io,rust-lang/crates.io,rust-lang/crates.io,steveklabnik/crates.io,steveklabnik/crates.io |
8d362700afeaa78d1741b91c7bf9f31553debfa3 | public/src/js/logger.js | public/src/js/logger.js | /**
* public/src/js/logger.js - delish
*
* Licensed under MIT license.
* Copyright (C) 2017 Karim Alibhai.
*/
const util = require('util')
, debounce = require('debounce')
let currentLog = document.querySelector('.lead')
, nextLog = document.querySelector('.lead.next')
/**
* Updates the current log stat... | /**
* public/src/js/logger.js - delish
*
* Licensed under MIT license.
* Copyright (C) 2017 Karim Alibhai.
*/
const util = require('util')
, debounce = require('debounce')
let currentLog = document.querySelector('.lead')
, nextLog = document.querySelector('.lead.next')
/**
* Updates the current log stat... | Change div to p when creating new logs | Change div to p when creating new logs
| JavaScript | mit | karimsa/delish,karimsa/delish,karimsa/delish |
d23d00bafe9fb4a89d92f812506c244d2be595a1 | src/browser/extension/background/getPreloadedState.js | src/browser/extension/background/getPreloadedState.js | export default function getPreloadedState(position, cb) {
chrome.storage.local.get([
'monitor' + position, 'slider' + position, 'dispatcher' + position,
'test-templates', 'test-templates-sel'
], options => {
cb({
monitor: {
selected: options['monitor' + position],
sliderIsOpen: opt... | const getIfExists = (sel, template) => (
typeof sel === 'undefined' ||
typeof template === 'undefined' ||
typeof template[sel] === 'undefined' ?
0 : sel
);
export default function getPreloadedState(position, cb) {
chrome.storage.local.get([
'monitor' + position, 'slider' + position, 'dispatcher' + posi... | Select the test template only if exists | Select the test template only if exists
Related to
https://github.com/zalmoxisus/redux-devtools-test-generator/issues/3
| JavaScript | mit | zalmoxisus/redux-devtools-extension,zalmoxisus/redux-devtools-extension |
0c2a557dbef6674d3d352cd49e9c13f4ed2f8362 | src/js/schemas/service-schema/EnvironmentVariables.js | src/js/schemas/service-schema/EnvironmentVariables.js | let EnvironmentVariables = {
description: 'Set environment variables for each task your service launches in addition to those set by Mesos.',
type: 'object',
title: 'Environment Variables',
properties: {
variables: {
type: 'array',
duplicable: true,
addLabel: 'Add Environment Variable',
... | import {Hooks} from 'PluginSDK';
let EnvironmentVariables = {
description: 'Set environment variables for each task your service launches in addition to those set by Mesos.',
type: 'object',
title: 'Environment Variables',
properties: {
variables: {
type: 'array',
duplicable: true,
addLab... | Move unnecessary things out of env schema | Move unnecessary things out of env schema | JavaScript | apache-2.0 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui |
14c9a161b2362d84905476ffb31be2864eec8a4a | angular-typescript-webpack-jasmine/webpack/webpack.test.js | angular-typescript-webpack-jasmine/webpack/webpack.test.js | const loaders = require("./loaders");
const webpack = require("webpack");
const path = require("path");
module.exports = {
context: path.join(__dirname, ".."),
entry: ["./src/test.ts"],
output: {
filename: "build.js",
path: path.resolve("temp"),
publicPath: "/"
},
resolve: {
extensions: [
... | const rules = require("./rules");
const webpack = require("webpack");
const path = require("path");
module.exports = {
context: path.join(__dirname, ".."),
entry: ["./src/test.ts"],
output: {
filename: "build.js",
path: path.resolve("temp"),
publicPath: "/"
},
resolve: {
extensions: [
"... | Replace loaders -> rules. Delete useless configs | Replace loaders -> rules. Delete useless configs
| JavaScript | mit | var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training |
bb1901f9173c5df8ca7444919cfbe18457ebfa3f | endswith.js | endswith.js | /*! http://mths.be/endswith v0.1.0 by @mathias */
if (!String.prototype.endsWith) {
(function() {
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
var toString = {}.toString;
String.prototype.endsWith = function(search) {
var string = String(this);
if (
this == null ||
(sea... | /*! http://mths.be/endswith v0.1.0 by @mathias */
if (!String.prototype.endsWith) {
(function() {
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
var toString = {}.toString;
String.prototype.endsWith = function(search) {
var string = String(this);
if (
this == null ||
(sea... | Use `charCodeAt` instead of `charAt` | Use `charCodeAt` instead of `charAt`
`charCodeAt` is faster in general.
Ref. #4.
| JavaScript | mit | mathiasbynens/String.prototype.endsWith |
b8173fcb00aa5e8599c2bdca5e888614eebf70eb | lib/models/graph-object.js | lib/models/graph-object.js | // Copyright 2015, EMC, Inc.
'use strict';
module.exports = GraphModelFactory;
GraphModelFactory.$provide = 'Models.GraphObject';
GraphModelFactory.$inject = [
'Model'
];
function GraphModelFactory (Model) {
return Model.extend({
connection: 'mongo',
identity: 'graphobjects',
attribu... | // Copyright 2015, EMC, Inc.
'use strict';
module.exports = GraphModelFactory;
GraphModelFactory.$provide = 'Models.GraphObject';
GraphModelFactory.$inject = [
'Model',
'Constants'
];
function GraphModelFactory (Model, Constants) {
return Model.extend({
connection: 'mongo',
identity: 'gr... | Add active() method to graph object model | Add active() method to graph object model
| JavaScript | apache-2.0 | YoussB/on-core,YoussB/on-core |
6a4390f2cd0731a55bc6f65745ca16156fa74a94 | tests/unit/serializers/ilm-session-test.js | tests/unit/serializers/ilm-session-test.js | import { moduleForModel, test } from 'ember-qunit';
moduleForModel('ilm-session', 'Unit | Serializer | ilm session', {
// Specify the other units that are required for this test.
needs: ['serializer:ilm-session']
});
// Replace this with your real tests.
test('it serializes records', function(assert) {
let reco... | import { moduleForModel, test } from 'ember-qunit';
moduleForModel('ilm-session', 'Unit | Serializer | ilm session', {
// Specify the other units that are required for this test.
needs: [
'model:session',
'model:learner-group',
'model:instructor-group',
'model:user',
'serializer:ilm-session'
... | Fix ilm-session serializer test dependancies | Fix ilm-session serializer test dependancies
| JavaScript | mit | jrjohnson/frontend,gabycampagna/frontend,djvoa12/frontend,thecoolestguy/frontend,gboushey/frontend,stopfstedt/frontend,dartajax/frontend,thecoolestguy/frontend,gboushey/frontend,ilios/frontend,dartajax/frontend,ilios/frontend,jrjohnson/frontend,gabycampagna/frontend,djvoa12/frontend,stopfstedt/frontend |
d12c22bcd977b818dd107cfe5a5fe072f9bbab74 | tests/arity.js | tests/arity.js | var overload = require('../src/overload');
var should = require('should');
describe('overload', function() {
describe('arity', function() {
it('should exist', function() {
overload.should.have.property('arity');
});
it('should work', function() {
var two_or_three = ... | var overload = require('../src/overload');
var should = require('should');
describe('overload', function() {
describe('arity', function() {
it('should exist', function() {
overload.should.have.property('arity');
});
it('should work', function() {
var two_or_three = ... | Add tests for saying more than | Add tests for saying more than
| JavaScript | mit | nathggns/Overload |
e0fcfb103b04c290c4572cf2acacf8b56cd16f59 | example/pub.js | example/pub.js | const R = require("ramda");
const Promise = require("bluebird");
const pubsub = require("../")("amqp://docker");
const publish = (event, index) => {
const data = { number: index + 1 };
console.log(` [-] Published event '${ event.name }' with data:`, data);
event.publish(data)
};
// Create the event.
... | const R = require("ramda");
const Promise = require("bluebird");
const pubsub = require("../")("amqp://docker");
const publish = (event, index) => {
const data = { number: index + 1 };
console.log(` [-] Published event '${ event.name }' with data:`, data);
event.publish(data)
};
// Create the event.
... | Extend timeout before killing process. | Extend timeout before killing process.
| JavaScript | mit | philcockfield/mq-pubsub |
2483669d68dd399e9597db2c413994817ef1ed61 | test/assert.js | test/assert.js | 'use strict';
var CustomError = require('es5-ext/error/custom')
, logger = require('../lib/logger')();
module.exports = function (t, a) {
t = t(logger);
t(true, true, 'foo');
t.ok(false, 'bar');
t.not(false, true, 'not');
t.deep([1, 2], [1, 2], 'deep');
t.notDeep([1, 2], [2, 1], 'not deep');
t.throws(fu... | 'use strict';
var customError = require('es5-ext/error/custom')
, logger = require('../lib/logger')();
module.exports = function (t, a) {
t = t(logger);
t(true, true, 'foo');
t.ok(false, 'bar');
t.not(false, true, 'not');
t.deep([1, 2], [1, 2], 'deep');
t.notDeep([1, 2], [2, 1], 'not deep');
t.throws(fu... | Update up to changes in es5-ext | Update up to changes in es5-ext
| JavaScript | isc | medikoo/tad |
9cb0c8ee1f56dbe8c966ea4b912f4fd73f8d3684 | server.js | server.js | import express from 'express';
import { apolloExpress, graphiqlExpress } from 'apollo-server';
import bodyParser from 'body-parser';
import cors from 'cors';
import { createServer } from 'http';
import { SubscriptionServer } from 'subscriptions-transport-ws';
import { subscriptionManager } from './data/subscriptions';... | import express from 'express';
import { apolloExpress, graphiqlExpress } from 'apollo-server';
import bodyParser from 'body-parser';
import cors from 'cors';
import { createServer } from 'http';
import { SubscriptionServer } from 'subscriptions-transport-ws';
import { printSchema } from 'graphql/utilities/schemaPrinter... | Add /schema path that serves schema as plain text | Add /schema path that serves schema as plain text
| JavaScript | mit | misas-io/misas-server,vincentfretin/assembl-graphql-js-server,misas-io/misas-server,a1528zhang/graphql-mock-server |
4b91adde9fcdac4489f062552dd96c72efa26fda | server.js | server.js | // server.js
'use strict';
const express = require('express');
const app = express();
const mongoose = require('mongoose');
const morgan = require('morgan');
const bodyParser = require('body-parser'); // Pull info from HTML POST
const methodOverride = require('method-override')... | // server.js
//jscs:disable requireTrailingComma, disallowQuotedKeysInObjects
'use strict';
const express = require('express');
const app = express();
const mongoose = require('mongoose');
const morgan = require('morgan');
const bodyParser = require('body-parser'); // Pull inf... | Disable some annoying JSCS stuff | Disable some annoying JSCS stuff
| JavaScript | mit | brandonlee503/Node-Angular-App-Test,brandonlee503/Node-Angular-App-Test |
0d98c7264a78894fbed253e8711bf0ba8c89ba0c | server.js | server.js | 'use strict';
const app = require('./app');
require('./api.js')(app);
require('./static.js')(app);
const PORT = process.env.PORT || 4000;
app.listen(PORT, () => {
console.log(`App listening on port ${PORT}!`);
});
| 'use strict';
const app = require('./app');
// remove the automatically added `X-Powered-By` header
app.disable('x-powered-by');
require('./api.js')(app);
require('./static.js')(app);
const PORT = process.env.PORT || 4000;
app.listen(PORT, () => {
console.log(`App listening on port ${PORT}!`);
});
| Remove the `X-Powered-By` header added by Express | Remove the `X-Powered-By` header added by Express
The `X-Powered-By` header provides no real benefit and also leaks
information about the design of the underlying system that may be
useful to attackers.
| JavaScript | mit | clembou/github-requests,clembou/github-requests,clembou/github-requests |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.